- fix mistake from fix for 8952 that was breaking layout tests

        * editing/SelectionController.cpp: (WebCore::SelectionController::nodeWillBeRemoved):
        Justin was right! I changed the behavior of the function by accident. Changed it
        back so that it doesn't blow away the selection on the DOM side in the case where
        it didn't before.

        I will write 100 times on the blackboard: "When Justin says something about editing,
        assume he is right."



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15461 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Maciej.

        - Moved the arguments passed to JSClassCreate into a single structure,
        called JSClassDefinition. This will enable easier structure 
        migration/versioning in the future, if necessary.
        
        - Added support for class names.
        
        - kJSClassDefinitionNull replaces kJSObjectCallbacksNone.
        
        - JSClass is becoming a fairly complex struct, so I migrated all of its
        implementation other than reference counting to the sruct.
        
        - Also moved JSClass* functions in the API to JSObjectRef.cpp, since they're
        declared in JSObjectRef.h
        
        - Also added some more informative explanation to the class structure doc.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Maciej.
        
        - JSObjectMakeFunctionWithBody includes a function name and named parameters now.

        * API/JSObjectRef.cpp:
        (JSObjectMakeFunctionWithBody):
        * API/JSObjectRef.h:
        * API/testapi.c:
        (assertEqualsAsUTF8String): More informative failure reporting.
        (main): Test more function cases.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15463 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Maciej.

        * API/JSNode.h: Made an array parameter const.
        * API/JSObjectRef.h: Made array parameters const. Fixed a comment.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15464 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        - oops, missed a few more arrays that had to be const

        * API/JSNode.c:
        (JSNodePrototype_appendChild): Added const.
        (JSNodePrototype_removeChild): Ditto.
        (JSNodePrototype_replaceChild): Ditto.
        (JSNode_construct): Ditto.
        * API/JSNodeList.c:
        (JSNodeListPrototype_item): Ditto.
        * API/JSObjectRef.cpp:
        (JSObjectMakeFunctionWithBody): Ditto.
        (JSObjectCallAsFunction): Ditto.
        (JSObjectCallAsConstructor): Ditto.
        * API/minidom.c:
        (print): Ditto.
        * API/testapi.c:
        (MyObject_callAsFunction): Ditto.
        (MyObject_callAsConstructor): Ditto.
        (print_callAsFunction): Ditto.
        (myConstructor_callAsConstructor): Ditto.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore has no need to look for frameworks in WebKit's umbrella framework path anymore.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15466 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptGlue has no need to look for frameworks in WebKit's umbrella framework path anymore.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15467 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore:

        Reviewed by Darin.
        
        - switch property lists to be vector+set of Identifiers instead of list of References
        
        This has the following benefits:
        
        - no duplicates in property lists
        - simplifies API calls
        - probably more efficient, since linked list is gone
        - entirely removed Reference, ReferenceList and ProtectedReference types from the API

        * kjs/PropertyNameArray.cpp: Added.
        (KJS::PropertyNameArray::add): Check set, if not already there, add to
        vector.
        * kjs/PropertyNameArray.h: Added.
        (KJS::PropertyNameArray::PropertyNameArray): Newly added type, combines
        a set and a vector to make a unique but ordered list of identifiers.
        (KJS::PropertyNameArray::begin): ditto
        (KJS::PropertyNameArray::end): ditto
        (KJS::PropertyNameArray::size): ditto
        (KJS::PropertyNameArray::operator[]): ditto
        * kjs/array_instance.h:
        * kjs/array_object.cpp:
        (ArrayInstance::getPropertyNames): renamed from getPropertyList, updated
        for PropertyNameArray
        (ArrayInstance::setLength): updated for PropertyNameArray
        (ArrayInstance::pushUndefinedObjectsToEnd): ditto
        * kjs/nodes.cpp:
        (ForInNode::execute): updated for PropertyNameArray
        * kjs/nodes.h:
        * kjs/object.cpp:
        (KJS::JSObject::getPropertyNames): renamed from getPropertyList, updated
        for PropertyNameArray
        * kjs/object.h:
        * kjs/property_map.cpp:
        (KJS::PropertyMap::getEnumerablePropertyNames): updated for PropertyNameArray
        (KJS::PropertyMap::getSparseArrayPropertyNames): ditto
        * kjs/property_map.h:
        * kjs/protected_reference.h: Removed.
        * kjs/reference.cpp: Removed.
        * kjs/reference.h: Removed.
        * kjs/reference_list.cpp: Removed.
        * kjs/reference_list.h: Removed.
        * kjs/scope_chain.cpp:
        (KJS::ScopeChain::print): Use PropertyNamesArray instead of ReferenceList.
        * kjs/string_object.cpp:
        (StringInstance::getPropertyNames): Updated for new approach.
        * kjs/string_object.h:
        * kjs/ustring.h:
        * API/APICast.h:
        (toJS): Added overload for PropertyNameAccumulatorRef / PropertyNameArray*
        (toRef): ditto
        * API/JSBase.h:
        * API/JSCallbackObject.cpp:
        (KJS::JSCallbackObject::getPropertyNames): Fixed for new API.
        * API/JSCallbackObject.h:
        * API/JSObjectRef.cpp:
        (__JSPropertyNameArray::__JSPropertyNameArray): Type used for a publicly vended
        JSPropertyNameArrayRef.
        (JSObjectCopyPropertyNames): New API call - renamed / refactored from 
        JSObjectCreatePropertyList
        (JSPropertyNameArrayRetain): new retain call for JSPropertyNameArray.
        (JSPropertyNameArrayRelease): new release call for - " -.
        (JSPropertyNameArrayGetCount): Instead of having to use a stateful enumerator you
        can now get the count and items in any order.
        (JSPropertyNameArrayGetNameAtIndex): See above.
        (JSPropertyNameAccumulatorAddName): What you add properties to is now an opaque 
        accumulator object.
        * API/JSObjectRef.h: Prototyped new functions, removed old ones
        * JavaScriptCore.exp: Updated exported symbols.
        * JavaScriptCore.xcodeproj/project.pbxproj: Added new files, removed old.
        * API/testapi.c:
        (MyObject_getPropertyNames): Renamed / fixed callback to fit new paradigm.
        (main): Updated for new API.

JavaScriptGlue:

        Reviewed by Darin.

        - switch property lists to be vector+set of Identifiers instead of list of References
        
        * JSUtils.cpp:
        (KJSValueToCFTypeInternal): updated for JSC SPI changes
        * JSValueWrapper.cpp:
        (JSValueWrapper::JSObjectCopyPropertyNames): ditto
        * UserObjectImp.cpp:
        (UserObjectImp::getPropertyNames): ditto
        * UserObjectImp.h:

LayoutTests:

        Reviewed by Darin.
        
        - new test case and updated results for property list changes

        * fast/js/for-in-avoid-duplicates-expected.txt: Added.
        * fast/js/for-in-avoid-duplicates.html: Added.
        * fast/js/kde/Array-expected.txt:
        * fast/js/resources/for-in-avoid-duplicates.js: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15468 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Maciej.
        
        - Added names to functions.
        
        - Removed GetPrivate/SetPrivate from callbackFunctions and callbackConstructors.
        The private data idiom is that a JS object stores its native implementation
        as private data. For functions and constructors, the native implementation is nothing
        more than the callback they already store, so supporting private data, too,
        confuses the idiom. If you *really* want, you can still create a custom 
        function with private data.

        * API/JSCallbackConstructor.cpp:
        * API/JSCallbackConstructor.h:
        * API/JSCallbackFunction.cpp:
        (KJS::JSCallbackFunction::JSCallbackFunction):
        * API/JSCallbackFunction.h:
        * API/JSCallbackObject.cpp:
        (KJS::JSCallbackObject::staticFunctionGetter):
        * API/JSObjectRef.cpp:
        (JSObjectMakeFunction):
        (JSObjectMakeFunctionWithBody):
        (JSObjectGetPrivate):
        (JSObjectSetPrivate):
        * API/JSObjectRef.h:
        * API/minidom.c:
        (main):
        * API/testapi.c:
        (main):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Maciej.

        Fix for <rdar://problem/4616595> REGRESSION: Problems with world 
        clock widget clock hand motion on 9A211 + 4604574

        The second hand on the widget was jiggling because the rotation was 
        messing up the use of the affine transformation matrix while 
        rounding to pixel boundaries in device space. We are mainly 
        concerned with rounding to pixel boundaries with the scale in mind, 
        so this patch extracts the scale to device space from the matrix, 
        and rounds to pixel boundaries using only the scale. This doesn't 
        seem like it is a perfect solution, but it definitely solves the 
        immediate problem. We will probably need to re-address what should 
        happen to avoid pixel cracks with rotations at non-integral scale 
        factors. 

        * platform/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::roundToDevicePixels):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests:

        Reviewed by John Sullivan (new test, not the changes to existing ones).

        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9943
          <rdar://problem/4590613>
          REGRESSION (Tiger-TOT): menus are offset to the right at http://movies.aol.com/movie-photo-bts/superman-returns

        * fast/html/body-offset-properties-expected.txt: Added.
        * fast/html/body-offset-properties.html: Added.

        * editing/execCommand/findString-2.html: Update to not depend on the buggy body.offseLeft/Top.
        Instead hardcode the default body margin of 8.
        * editing/pasteboard/drop-text-without-selection.html: Ditto.
        * editing/selection/click-before-and-after-table.html: Ditto.
        * editing/selection/mixed-editability-1.html: Ditto.
        * fast/table/click-near-anonymous-table.html: Ditto.

        * editing/selection/drag-to-contenteditable-iframe.html: Remove unnecessary use of body.offsetLeft/Top
        that are always 0.

WebCore:

        Reviewed by John Sullivan.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9943
          <rdar://problem/4590613>
          REGRESSION (Tiger-TOT): menus are offset to the right at http://movies.aol.com/movie-photo-bts/superman-returns

        The problem turns out to be the fact that body.offsetLeft is returning a non-zero value.
        I have no idea why the menus worked in Tiger Safari, because body.offsetLeft behavior has not changed.
        Presumably some other bug that we fixed had been compensating.

        Test: fast/html/body-offset-properties.html

        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::offsetLeft): Always return 0 for any object without an offsetParent.
        (WebCore::RenderObject::offsetTop): Ditto.
        (WebCore::RenderObject::offsetParent): Return 0 for the body (treat as a special case).



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15471 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        - fixed typo in expected results

        * fast/js/for-in-avoid-duplicates-expected.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Maciej.
        
        - Properly document and handle NULL callbacks for static properties. We
        throw an exception in any case other than a ReadOnly property with a NULL
        setProperty callback, because a NULL callback almost certainly indicates 
        a programming error. Also throw an exception if hasProperty returns true
        for a property that getProperty can't get.
        
        - If a static setProperty callback returns 'false', to indicate that the
        property was not set, we no longer forward the set request up the class
        chain, because that's almost certainly not what the programmer expected.

        * API/JSCallbackObject.cpp:
        (KJS::JSCallbackObject::getOwnPropertySlot):
        (KJS::JSCallbackObject::put):
        (KJS::JSCallbackObject::staticValueGetter):
        (KJS::JSCallbackObject::staticFunctionGetter):
        (KJS::JSCallbackObject::callbackGetter):
        * API/JSObjectRef.h:
        * API/minidom.js:
        * API/testapi.c:
        (MyObject_hasProperty):
        * API/testapi.js:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15473 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Maciej.
        
        - Change getProperty* to return undefined, rather than NULL, for missing
        properties, since that's what the spec says. Also added exception out
        parameters to the *Index functions, because they can call through to the
        regular functions, which can throw for custom objects.

        * API/JSObjectRef.cpp:
        (JSObjectGetProperty):
        (JSObjectGetPropertyAtIndex):
        (JSObjectSetPropertyAtIndex):
        * API/JSObjectRef.h:
        * API/testapi.c:
        (main):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        - fixed a couple of files I checked in wrong

        * fast/html/body-offset-properties-expected.txt: Removed property cruft.
        * fast/html/body-offset-properties.html: Ditto.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        - try to fix Windows build

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        Added some recently added files, removed some recently removed.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKitTools:

        Reviewed by Darin.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9875
          Teach svn-apply and svn-unapply to use patch(1) for additions and deletions

        * Scripts/svn-apply:
        (addDirectoriesIfNeeded): Don't try to add a directory that's already in svn.
        (checksum): Added.
        (patch): Use patch(1) for non-binary additions and deletions.
        * Scripts/svn-unapply:
        (checksum): Added.
        (patch): Use patch(1) for reverting non-binary additions and deletions.
        (revertDirectories): Don't try to revert a directory that hasn't changed in svn.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests:

        Reviewed by Darin.

        * fast/dynamic/move-node-with-selection-expected.checksum:
        Removed "No newline at end of file" that snuck in as part of the "apply patch" process.

WebCore:

        Reviewed by Darin.

        * dom/NodeFilter.idl:
        Removed "No newline at end of file" that snuck in as part of the "apply patch" process.
        * manual-tests/input-empty-on-focus.html:
        Removed "Property changes" that snuck in as part of the "apply patch" process.

WebKitTools:

        Reviewed by Darin.

        * BuildSlaveSupport/build.webkit.org-config/buildbot.css:
        Removed "No newline at end of file" that snuck in as part of the "apply patch" process.
        * GdkLauncher/mk:
        Removed "Property changes" that snuck in as part of the "apply patch" process.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests:

        Reviewed by Darin.

        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9954
          REGRESSION: document.dir should return empty string in <head>

        * fast/dom/document-dir-property-expected.txt: Added.
        * fast/dom/document-dir-property.html: Added.

WebCore:

        Reviewed by Darin.

        - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9954
          REGRESSION: document.dir should return empty string in <head>

        Test: fast/dom/document-dir-property.html

        * bindings/js/kjs_html.cpp:
        (KJS::JSHTMLDocument::getValueProperty): Return an empty string instead of an
        undefined value for an unset document.dir property.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Approved by Maciej, RS by Beth.
        
        JSObjectMakeFunction -> JSObjectMakeFunctionWithCallback
        JSObjectMakeFunctionWithBody -> JSObjectMakeFunction
        
        because the latter is more common, and more fundamental, than the former.

        * API/APICast.h:
        (toJS):
        * API/JSBase.h:
        * API/JSCallbackObject.cpp:
        (KJS::JSCallbackObject::getOwnPropertySlot):
        (KJS::JSCallbackObject::put):
        (KJS::JSCallbackObject::deleteProperty):
        (KJS::JSCallbackObject::getPropertyNames):
        (KJS::JSCallbackObject::staticValueGetter):
        (KJS::JSCallbackObject::staticFunctionGetter):
        * API/JSClassRef.cpp:
        (OpaqueJSClass::OpaqueJSClass):
        (OpaqueJSClass::~OpaqueJSClass):
        * API/JSClassRef.h:
        * API/JSObjectRef.cpp:
        (JSClassCreate):
        (JSObjectMakeFunctionWithCallback):
        (JSObjectMakeFunction):
        (OpaqueJSPropertyNameArray::OpaqueJSPropertyNameArray):
        (JSObjectCopyPropertyNames):
        * API/JSObjectRef.h:
        * API/minidom.c:
        (main):
        * API/testapi.c:
        (main):
        * ChangeLog:
        * JavaScriptCore.exp:



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