1. 14 Dec, 2002 2 commits
    • mjs's avatar
      Reviewed by Ken. · f273a9fd
      mjs authored
      	- further corrections to number printing.
              * kjs/ustring.cpp:
              (UString::from): Make number printing match the ECMA standard
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs's avatar
      Reviewed by Dave. · 957a1b3b
      mjs authored
      	- fix toString() conversion for numbers less than 1. Negative
      	exponents are still wrong though (things like 1E-34).
              * kjs/ustring.cpp:
      	(UString::from): Don't print empty string for numbers less than 1,
      	and remember to add extra 0s after the decimal for negative
      	decimal positions.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3051 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  2. 13 Dec, 2002 1 commit
  3. 12 Dec, 2002 5 commits
  4. 11 Dec, 2002 1 commit
    • mjs's avatar
      Reviewed by Don. · 9132b10b
      mjs authored
      	- Add kjsprint global function in Development build for ease of	debugging.
      	- Print uncaught JavaScript exceptions to the console in Development.
      	- Improve wording of exception error messages.
              * kjs/function.cpp:
              * kjs/function.h:
              * kjs/internal.cpp:
              * kjs/interpreter.cpp:
              * kjs/nodes.cpp:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3009 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  5. 10 Dec, 2002 1 commit
    • sullivan's avatar
      Tools: · 0e8b5efe
      sullivan authored
      	Fixed more "Alexander"s that were lurking in places
      	I forgot to look before.
              * Scripts/embed-into-alex:
              * Scripts/run-plt:
      	many occurrences
              * Scripts/set-alex-version:
      	occurred in comment only
              * Scripts/time-alex-startup:
      	my $alex = $ENV{"SAFARI"} || "$symroots/Safari.app";
      	if ($alex =~ /Safari\.app$/) {
      	    $alex .= "/Contents/MacOS/Safari";
      	Fixed more "Alexander"s that were lurking in places I forgot
      	to look before.
              Reviewed by Darin
              * Makefile.am:
      	"rm -rf $(SYMROOTS)/Safari.app/Frameworks/JavaScriptCore.framework"
      	Fixed more "Alexander"s that were lurking in places I forgot
      	to look before.
              Reviewed by Darin
              * Makefile.am:
      	"rm -rf $(SYMROOTS)/Safari.app/Frameworks/WebFoundation.framework"
      	Fixed more "Alexander"s that were lurking in places I forgot
      	to look before.
              Reviewed by Darin
              * Makefile.am:
      	"rm -rf $(SYMROOTS)/Safari.app/Frameworks/WebCore.framework"
      	Fixed more "Alexander"s that were lurking in places I forgot
      	to look before.
              Reviewed by Darin
              * Makefile.am:
      	"rm -rf $(SYMROOTS)/Safari.app/Frameworks/WebKit.framework"
      	Fixed more "Alexander"s that were lurking in places
      	I forgot to look before.
              Reviewed by Darin
              * Makefile.am:
      	"rm -rf $(SYMROOTS)/Safari.app" in make clean
              * Preferences.subproj/English.lproj/GeneralPreferences.nib:
      	"When Safari Quits"
              * Scripting.subproj/Safari.scriptSuite:
      	value for Name key
              * copy-frameworks-to-dstroot.sh:
              * embed-frameworks.sh:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2995 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  6. 09 Dec, 2002 2 commits
    • darin's avatar
      Tools: · 030cad4c
      darin authored
              Reviewed by Maciej.
              * Scripts/set-alex-version: Make it bump the source version and marketing version
      	of all our subprojects, because that's what we need up until Alex 1.0.
              Reviewed by Maciej.
              * JavaScriptCore.pbproj/project.pbxproj: Bump versions to 0.8 and 35u.
      	* English.lproj/InfoPlist.strings: In here too.
              Reviewed by Maciej.
      	- fixed problems I noticed in my review of Chris's change (which came in too late)
              * CacheLoader.subproj/WebResourceLoad.m: (_guessMIMEType): Fix && vs. || confusion that
      	will make CR, LF, and tab not qualify as text characters. Also take end of loop check
      	out of the loop.
      	- added a method for use in user-agent computations
              * Misc.subproj/WebNSUserDefaultsExtras.h: Added _web_preferredLanguageCode.
              * Misc.subproj/WebNSUserDefaultsExtras.m:
              (+[NSUserDefaults _web_preferredLanguageCode]): Use _web_HTTPStyleLanguageCode on the
      	first element of the AppleLanguages array.
              * WebFoundation.pbproj/project.pbxproj: Bump versions to 0.8 and 35u.
      	Make WebNSUserDefaultsExtras.h SPI so we can use it in WebKit. Re-sort things a bit.
      	* English.lproj/InfoPlist.strings: Bump versions in here too.
              * English.lproj/StringsNotToBeLocalized.txt: Updated for these and other recent changes.
              Reviewed by Maciej.
              * WebCore.pbproj/project.pbxproj: Bump versions to 0.8 and 35u.
              Reviewed by Maciej.
      	- fixed 3028664 -- change user agent string to include application name and version
              * WebView.subproj/WebController.m:
              (-[WebController setApplicationNameForUserAgent:]): Remove locking, unneeded since we changed
      	how WebFoundation handles user agent.
              (-[WebController setCustomUserAgent:]): Ditto.
              (-[WebController resetUserAgent]): Ditto.
              (-[WebController userAgentForURL:]): Remove locking. Also add new algorithm for computing the
      	user agent which takes the preferred language into account, and incorporates the WebKit version
      	and the application name.
              * WebView.subproj/WebControllerPrivate.h: No need for a lock.
              * WebView.subproj/WebControllerPrivate.m:
              (-[WebControllerPrivate init]): Don't create a lock.
              (-[WebControllerPrivate dealloc]): Don't release a lock.
              * WebKit.pbproj/project.pbxproj: Bump versions to 0.8 and 35u.
      	* English.lproj/InfoPlist.strings: In here too.
              * English.lproj/StringsNotToBeLocalized.txt: Updated for these and other recent changes.
              Reviewed by Maciej.
      	- pass properly-formatted application name string to WebKit so it can make a good user-agent
              * BrowserWebController.m: (-[BrowserWebController initWithBrowserDocument:]):
      	Instead of passing "Mr. Poopypants", pass Sherlock, augmented with version strings,
      	to setApplicationNameForUserAgent:. Later we will pass Safari instead.
              * WebBrowser.pbproj/project.pbxproj: Bump version to 35u (we won't use " unofficial" any more).
              * English.lproj/StringsNotToBeLocalized.txt: Updated for these changes.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs's avatar
      Reviewed by Ken. · ca7af085
      mjs authored
      	- fixed 3059637 - all articles missing at excite.com sports page
      	- fixed 3065903 - most of content missing at excite.com news page
      	These bugs both came up because a JavaScript function has a var
      	declaration that collides with a function parameter name.
              * kjs/nodes.cpp:
              (VarDeclNode::processVarDecls): Don't set the property to
      	undefined if a property with that name is already set on the
      	global object. Otherwise we may clobber function parameters with
      	undefined even before hitting a possible var initializer.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2974 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  7. 06 Dec, 2002 1 commit
    • mjs's avatar
      JavaScriptCore: · 7c2d8083
      mjs authored
              Reviewed by: Darin Adler
      	- made framework embedding work correctly with buildit
              * JavaScriptCore.pbproj/project.pbxproj: Give framework a relative
      	install path, don't install it the normal way, and copy it
      	manually to /AppleInternal/Library/Frameworks if installing.
              Reviewed by: Darin Adler
      	- made framework embedding work correctly with buildit
              * WebFoundation.pbproj/project.pbxproj: Give framework a relative
      	install path, don't install it the normal way, and copy it
      	manually to /AppleInternal/Library/Frameworks if installing.
              Reviewed by: Darin Adler
      	- made framework embedding work correctly with buildit
              * WebCore.pbproj/project.pbxproj: Give framework a relative
      	install path, don't install it the normal way, and copy it
      	manually to /AppleInternal/Library/Frameworks if installing. Also
      	look for other frameworks in
              Reviewed by: Darin Adler
      	- made framework embedding work correctly with buildit
              * WebKit.pbproj/project.pbxproj: Give framework a relative
      	install path, don't install it the normal way, and copy it
      	manually to /AppleInternal/Library/Frameworks if installing. Also
      	look for other frameworks in
              Reviewed by: Darin Adler
      	- made framework embedding work correctly with buildit
              * copy-frameworks-to-dstroot.sh: Copy frameworks from
              * embed-frameworks.sh: Fixed typo.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2958 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  8. 05 Dec, 2002 1 commit
  9. 04 Dec, 2002 5 commits
    • mjs's avatar
      Reviewed by: Richard Williamson · e5d3a406
      mjs authored
      	Added explicit lock/unlock methods so Sherlock can grab the
      	interpreter lock as needed.
      	- partially addressed 3084320 - JavaScriptCore crash
              * kjs/internal.cpp:
              * kjs/internal.h:
              * kjs/interpreter.cpp:
              * kjs/interpreter.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs's avatar
      Added missing reviewer. · 365dd053
      mjs authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2934 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs's avatar
      Reviewed by: NOBODY (OOPS!) · 21dbd392
      mjs authored
      	Set things up so JavaScriptCore builds in PCRE and uses it for
      	regular expressions. This fixes many form validation bugs:
      	- fixed 3103197 - javascript at fidelity.com rejects valid input
      	- fixed 2942552 - form validation at weather.com fails
      	- fixed 3079752 - js always reports textarea is empty
      	- fixed 3079719 - covad.com "check availalbility" fails
              * Makefile.am: Add pcre subdir.
              * kjs/config.h: define HAVE_PCREPOSIX to true.
      	* kjs/regexp.h: Don't include pcreposix.h since nothing from there
      	is used.
      	* pcre/.cvsignore: Added.
              * pcre/ChangeLog: Removed.
              * pcre/INSTALL: Removed.
              * pcre/Makefile.am: Added.
              * pcre/Makefile.in: Removed.
              * pcre/NEWS: Removed.
              * pcre/NON-UNIX-USE: Removed.
              * pcre/README: Removed.
              * pcre/chartables.c: Added.
              * pcre/config.guess: Removed.
              * pcre/config.in: Removed.
              * pcre/config.sub: Removed.
              * pcre/configure: Removed.
              * pcre/configure.in: Removed.
              * pcre/dll.mk: Removed.
              * pcre/doc/Tech.Notes: Removed.
              * pcre/doc/pcre.3: Removed.
              * pcre/doc/pcre.html: Removed.
              * pcre/doc/pcre.txt: Removed.
              * pcre/doc/pcregrep.1: Removed.
              * pcre/doc/pcregrep.html: Removed.
              * pcre/doc/pcregrep.txt: Removed.
              * pcre/doc/pcreposix.3: Removed.
              * pcre/doc/pcreposix.html: Removed.
              * pcre/doc/pcreposix.txt: Removed.
              * pcre/doc/pcretest.1: Removed.
              * pcre/doc/pcretest.html: Removed.
              * pcre/doc/pcretest.txt: Removed.
              * pcre/doc/perltest.txt: Removed.
              * pcre/install-sh: Removed.
              * pcre/ltmain.sh: Removed.
              * pcre/pcre-config.h: Added.
              * pcre/pcre-config.in: Removed.
              * pcre/internal.h: Include pcre-config.h instead of config.h
              * pcre/pcre.c:
              (ord2utf8): Fix warnings.
              (pcre_compile): Fix warnings.
              * pcre/pcre.def: Removed.
              * pcre/pcre.h: Added.
              * pcre/pcre.in: Removed.
              * JavaScriptCore.pbproj/project.pbxproj: Added pcre files to build.
              * JavaScriptCorePrefix.h: Guard c++ headers with #ifdef __cplusplus.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2933 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs's avatar
      top level: · fb68e855
      mjs authored
              Reviewed by: Richard Williamson
              * pcre/doc/*: Added.
              * pcre/testdata/*: Added.
         (i)   Added long-form option names like gnu grep.
         (ii)  Added --help to list all options with an explanatory phrase.
         (iii) Added -r, --recursive to recurse into sub-directories.
         (iv)  Added -f, --file to read patterns from a file.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2927 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs's avatar
      Reviewed by: Darin Adler · e62e1a3c
      mjs authored
      	- imported PCRE 3.9 into the tree; this isn't actually compiled or
      	used yet.
              * pcre/*: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  10. 03 Dec, 2002 3 commits
  11. 27 Nov, 2002 1 commit
  12. 26 Nov, 2002 5 commits
    • sheridan's avatar
      Alex-34 stamp · 28b2189d
      sheridan authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2884 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs's avatar
      Change ActivationImp to be allocated via the garbage collector · 0e6b4f09
      mjs authored
      	again instead of on the stack. This fixes the following four
      	regressions but sadly it causes a 6% performance hit. It's
      	probably possibly to reduce the hit a bit by being smarter about
      	inlining and the way the marking list variant is implemented, but
      	I'll look into that later.
      	- fixed 3111500 - REGRESSION: crash in "KJS::ScopeChain::mark()" on www.posci.com
      	- fixed 3111145 - REGRESSION: reproducible crash in KJS hashtable lookup at time.com
      	- fixed 3110897 - REGRESSION: javascript crasher on http://bmwgallery.tripod.com/
      	- fixed 3109987 - REGRESSION: Reproducible crash in KJS ObjectImp at live365.com
      	- improved DEBUG_COLLECTOR mode a bit by never giving memory back
      	to the system.
              * kjs/collector.cpp:
              * kjs/context.h:
              * kjs/function.cpp:
              * kjs/function.h:
              * kjs/internal.cpp:
              * kjs/list.cpp:
              * kjs/list.h:
              * kjs/value.cpp:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2883 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      * kjs/property_map.cpp: · 13d73dc6
      darin authored
      	(PropertyMap::save): Look at the attributes the same way in the single hash entry
      	case as in the actual hash table case. Change the rule for which attributes to save
      	to "attributes that don't have the ReadOnly, DontEnum, or Function bit set".
              Also fix bug where saving an empty property map would leave the count set to the old value.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2882 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • rjw's avatar
      JavaScriptCore · 3f05b75a
      rjw authored
              Remove debugging code.  Could be cause of performance regresssion.
              * kjs/nodes.cpp:
              Restire attributes correctly.
              * kjs/property_map.cpp:
      WebKit        Only cache page if the load has completed.
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _setState:]):
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2881 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • rjw's avatar
      JavaScriptCore · e67107bd
      rjw authored
              Use delete[] (not delete) operator to delete array.
              * kjs/property_map.cpp:
              Use cleaned up API to enable/disable page cache.
              * Debug/DebugUtilities.m:
              (-[BrowserDocument toggleBackForwardEnabled:]):
              Cleanup up leaking objects in page cache.
              * kwq/KWQKHTMLPart.mm:
              * kwq/WebCoreBridge.mm:
              (-[KWQPageState initWithDocument:DOM::URL:windowProperties:KJS::locationProperties:KJS::]):
              (-[KWQPageState dealloc]):
              Cleanup leaking objects in page cache.
              Cleaned up API a bit.
              * History.subproj/WebBackForwardList.h:
              * History.subproj/WebBackForwardList.m:
              (-[WebBackForwardList dealloc]):
              (+[WebBackForwardList setUsesPageCache:]):
              (+[WebBackForwardList usesPageCache]):
              (+[WebBackForwardList setPageCacheSize:]):
              (+[WebBackForwardList pageCacheSize]):
              * History.subproj/WebHistoryItem.h:
              * History.subproj/WebHistoryItem.m:
              (-[WebHistoryItem setHasPageCache:]):
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge saveDocumentToPageCache:]):
              * WebKit.exp:
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _canCachePage]):
              (-[WebFrame _purgePageCache]):
              (-[WebFrame _setState:]):
              (-[WebFrame _continueLoadRequestAfterNavigationPolicy:request:]):
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2874 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  13. 25 Nov, 2002 3 commits
    • rjw's avatar
      i Added a debug menu to turn back/forward cache on and off. · 683c446f
      rjw authored
              Off by default.  Use with discretion.  Still leaks like
              a sieve.  Useful to provide a sense of potential speed up.
              * Debug/DebugUtilities.m:
              (-[DebugUtilities createDebugMenu]):
              (-[BrowserDocument validate_showDOMTree:]):
              (-[BrowserDocument toggleBackForwardEnabled:]):
              Changes fro back/forward cache.
              * History.subproj/WebHistoryItem.h:
              * History.subproj/WebHistoryItem.m:
              (+[WebHistoryItem setUsePageCache:]):
              (+[WebHistoryItem usePageCache]):
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge saveDocumentToPageCache:]):
              * WebView.subproj/WebFramePrivate.h:
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _detachFromParent]):
              (-[WebFrame _canCachePage]):
              (-[WebFrame _setState:]):
              Tweaked some debugging info.
              * khtml/xml/dom_docimpl.cpp:
              Added debugging info.  Fixed property map save function.
              * kjs/nodes.cpp:
              * kjs/property_map.cpp:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • rjw's avatar
      Changes for back/forward. Currently disabled. · b0eb2ac5
      rjw authored
              * History.subproj/WebHistoryItem.h:
              * History.subproj/WebHistoryItem.m:
              (-[WebHistoryItem dealloc]):
              (-[WebHistoryItem setPageCacheEnabled:]):
              (-[WebHistoryItem pageCache]):
              * Misc.subproj/WebKitLogging.h:
              * Misc.subproj/WebKitLogging.m:
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge saveDocumentToPageCache:]):
              * WebView.subproj/WebDataSource.m:
              (-[WebDataSource startLoading]):
              * WebView.subproj/WebDataSourcePrivate.h:
              * WebView.subproj/WebDataSourcePrivate.m:
              (-[WebDataSource _startLoading:]):
              (-[WebDataSource _startLoading]):
              (-[WebDataSource _commitIfReady:]):
              (-[WebDataSource _commitIfReady]):
              (-[WebDataSource _setStoredInPageCache:]):
              (-[WebDataSource _storedInPageCache]):
              * WebView.subproj/WebFramePrivate.h:
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _transitionToCommitted:]):
              (-[WebFrame _canCachePage]):
              (-[WebFrame _purgePageCache]):
              (-[WebFrame _setState:]):
              (-[WebFrame _continueFragmentScrollAfterNavigationPolicy:request:]):
              (-[WebFrame _continueLoadRequestAfterNavigationPolicy:request:]):
              Changes for back/forward.  Currently disabled.
              * ForwardingHeaders/kjs/property_map.h: Added.
              * khtml/ecma/kjs_window.cpp:
              * khtml/ecma/kjs_window.h:
              * khtml/khtmlpart_p.h:
              * khtml/xml/dom_docimpl.cpp:
              * khtml/xml/dom_docimpl.h:
              * kwq/KWQKHTMLPart.h:
              * kwq/KWQKHTMLPart.mm:
              * kwq/WebCoreBridge.h:
              * kwq/WebCoreBridge.mm:
              (-[WebCoreBridge openURL:reload:headers:lastModified:pageCache:]):
              (-[WebCoreBridge saveDocumentToPageCache]):
              (-[WebCoreBridge canCachePage]):
              (-[KWQPageState initWithDocument:DOM::URL:windowProperties:KJS::locationProperties:KJS::]):
              (-[KWQPageState dealloc]):
              (-[KWQPageState DOM::]):
              (-[KWQPageState URL]):
              (-[KWQPageState KJS::]):
              Changes for back/forward.  Currently disabled.
              * kjs/property_map.cpp:
              * kjs/property_map.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2863 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      JavaScriptCore: · d4ca2268
      darin authored
              * kjs/property_map.cpp: Rearrange code a little bit and tweak indentation.
      	This might provide a tiny speedup because we don't look at the single entry
      	any more in cases where the _table pointer is non-0.
      	- fixed a problem I discovered in testing where multiple identical bookmarks confuse us
              * Bookmarks.subproj/WebBookmarkList.m:
              (-[WebBookmarkList removeChild:]): Use indexOfObjectIdenticalTo: and removeObjectIdenticalTo:
      	instead of containsObject: and removeObject:.
              (-[WebBookmarkList insertChild:atIndex:]): Use indexOfObjectIdenticalTo: instead of
      	containsObject: in the assertion.
              - fixed 3042781 -- slidey animation sometimes draws partial item behind overflow indicator
              - fixed 3090845 -- would be nice to be able to drop bookmarks into folders using the bookmark toolbar
              - fixed 3107422 -- bookmark in toolbar gets stuck highlighted if window is moved by the stacking code
              - fixed problem where you would get an overflow indicator even if there was room for the last bookmark
              - fixed problem where the cursor could change to an I-beam during a constrained drag
              * FavoriteButton.h: Add canAcceptDroppedBookmark, setHighlighted, and
      	acceptDroppedBookmark methods for use when doing a constrained drag that
      	drop items into folders. Also add a category on NSView to be used to pause
      	animation when over a button that will accept a drop.
              * FavoriteButton.m:
              (-[FavoriteButton registerForDraggedTypes]): Accept DraggedFavoriteButtonPboardType.
              (-[FavoriteButton initTrackingRect]): Add an observer so we update the tracking rect
      	when the window moves too. This fixes bug 3107422.
              (-[FavoriteButton bookmarksFromPasteboard:]): Added. Helper method that accepts drag
      	from DraggedFavoriteButtonPboardType as well as the other bookmark pasteboard types,
      	but only within the same superview.
              (-[FavoriteButton determineDragOperation:]): Call [self bookmarksFromPasteboard:]
      	instead of [WebBookmark bookmarksFromPasteboard].
              (-[FavoriteButton draggingEntered:]): Pause animation when we enter a button that can
      	accept a dropped bookmark. This makes sure that the button doesn't slide out from under
      	the mouse.
              (-[FavoriteButton draggingUpdated:]): Don't do any highlighting here because it's not
              (-[FavoriteButton draggingExited:]): Resume the animation in case we paused it.
              (-[FavoriteButton performDragOperation:]): Call [self bookmarksFromPasteboard:]
      	instead of [WebBookmark bookmarksFromPasteboard]. Also resume the animation in case we
      	paused it.
              (-[FavoriteButton canAcceptDroppedBookmark]): Added. Returns YES if the bookmark's type
      	is WebBookmarkTypeList.
              (-[FavoriteButton setHighlighted:]): Added. Calls setHighlighted: on the button's cell.
              (-[FavoriteButton acceptDroppedBookmark:]): Added. Does the same work that performDragOperation
      	does for the case of moving a button within the same bar.
              (-[FavoriteButton _hitTest:dragTypes:]): Don't accept drags at the edges of the button.
      	This makes space between buttons so there's room to put new buttons between two old ones, even
      	if the old ones are both for folders.
              (-[NSView pauseAnimation]): Added. Passes the call up the superview chain.
              (-[NSView resumeAnimation]): Added. Passes the call up the superview chain.
              * FavoritesBar.m:
              (-[FavoritesBar maxButtonXWithoutClipIndicator]): Added. Leaves a margin,
      	currently 3 pixels.
              (-[FavoritesBar maxButtonXWithClipIndicator]): Added. Leaves a margin,
      	currently 3 pixels.
              (-[FavoritesBar maxButtonX]): Modified to call either maxButtonXWithoutClipIndicator
      	or maxButtonXWithClipIndicator depending on whether the clip indicator is showing.
              (-[FavoritesBar slideButtonsIntoPlace]): Slide buttons off the right side of the bar
      	if they are going to be clipped out. Allow the last button to go all the way to the
      	right, using the space that would otherwise be used by the clip indicator. Make the
      	clip indicator disappear if buttons are going to slide past it to the left or the right.
              (-[FavoritesBar _layOutButtons]): Include the smarts about leaving space for the
      	item to be dropped and about leaving out the currently dragged item that was formerly
      	only in slideButtonsIntoPlace. Also include the smarts about positioning mentioned
      	above, and do positioning here, rather than in _refreshButtons. To allow calling this
      	during constrained dragging, add the dragged item after adding all the other items.
              (-[FavoritesBar finishedSlidingAnimation:]): Added. Calls _layOutButtons. This is used
      	to make the clip indicator reappear in case slideButtonsIntoPlace made it disappear.
              (-[FavoritesBar addButtonForBookmark:]): Removed left edge parameter. This no method longer
              tries to position bookmarks at all.
              (-[FavoritesBar _refreshButtons]): Get rid of code that attempts to position the buttons.
      	We now do that in _layOutButtons.
              (-[FavoritesBar initWithView:]): Initialize _dragSourceIndexIfMoving to NSNotFound.
      	Make us the animation's delegate so we get a finishedSlidingAnimation:.
              (-[FavoritesBar performDragOperation:]): Check for drags within the favorites bar by
      	checking _dragSourceIndexIfMoving rather than looking for DraggedFavoriteButtonPboardType.
      	Also reset _dropIndex since _layOutButtons now looks at it.
              (-[FavoritesBar draggingEnded:]): Reset _dragSourceIndexIfMoving since _layOutButtons
      	now looks at it.
              (-[FavoritesBar reorderFavoriteButton:fromMouseDownEvent:]): Disable cursor rectangles and
      	set the cursor to the arrow cursor during the reorder process. Add hit testing so that the
      	constrained dragging can drop items in FavoriteButtons that are folders. Pause animation
      	when over such a FavoriteButton, and resume it when not over it.
              (-[FavoritesBar pauseAnimation]): Added.
              (-[FavoritesBar resumeAnimation]): Added.
              * FavoritesBarView.h: Add pauseAnimation and resumeAnimation methods to the delegate.
              * FavoritesBarView.m:
              (-[FavoritesBarView pauseAnimation]): Pass call on to the delegate.
              (-[FavoritesBarView resumeAnimation]): Ditto.
              * SlidingAnimation.h: Add delegate, setDelegate method, pause and resume methods, and
      	finishedSlidingAnimation: method for the delegate.
              * SlidingAnimation.m:
              (-[SlidingAnimation updateTimer]): Take the paused state into account, and also call the
      	finishedSlidingAnimation: method when the animation completes.
              (-[SlidingAnimation showNextFrame]): Simplify by using a call to updateTimer to do most
      	of the work.
              (-[SlidingAnimation setDelegate:]): Added. Just sets the delegate field.
              (-[SlidingAnimation pause]): Added. Just sets the paused state and calls updateTimer.
              (-[SlidingAnimation resume]): Added. Just sets the paused state and calls updateTimer.
      	- fixed a problem I discovered in testing where multiple identical bookmarks confuse us
              * BookmarksViewController.m:
              ([BookmarksViewController anyAncestorOfBookmark:inArray:]): Use indexOfObjectIdenticalTo:
      	instead of containsObject:, because we want to use identity on bookmarks, not equality
      	([BookmarksViewController bookmarkOrAnyAncestor:inArray:]): Ditto.
      	([BookmarksViewController newContentItemWithTitle:URLString:type:positionIgnoresSelection:]): Ditto.
      	([BookmarksViewController sourceRowForBookmark:]): Ditto.
      	([BookmarksViewController outlineView:validateDrop:proposedItem:proposedChildIndex:]): Ditto.
      	([BookmarksViewController paste:]): Ditto.
      	([UndoRemoveInfo initWithBookmark:]): Ditto.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  14. 24 Nov, 2002 4 commits
    • darin's avatar
      JavaScriptCore: · 8d450d34
      darin authored
      	- changed ScopeChain to not ref each item in the chain, and use
              marking instead; gains 1% on JavaScript iBench
              * kjs/context.h: Return chain by reference.
              * kjs/internal.cpp: (ContextImp::mark): Mark the scope chain.
              * kjs/interpreter.cpp: (Context::scopeChain): Return chain by reference.
              * kjs/interpreter.h: Make some Context methods inline.
              * kjs/nodes.cpp:
              (ThisNode::evaluate): Get at ContextImp directly.
              (ResolveNode::evaluateReference): Ditto.
              (VarDeclNode::evaluate): Ditto.
              (VarDeclNode::processVarDecls): Ditto.
              (FuncDeclNode::processFuncDecl): Pass ScopeChain directly to avoid copying.
              (FuncExprNode::evaluate): Ditto.
              * kjs/object.cpp: Make scope and setScope inline.
              * kjs/object.h: Make scope return a chain by reference. Make scope and
      	setScope both be inline. Use a normal ScopeChain instead of NoRefScopeChain
      	since they are now one and the same.
              * kjs/scope_chain.cpp: Remove all the code to ref and deref objects.
      	Merge NoRefScopeChain in with ScopeChain since they both work this way now.
              * kjs/scope_chain.h: Remove NoRefScopeChain and simplify the ref counts.
      	Make more functions inline.
              * force-js-clean-timestamp: Touch for ScopeChain change.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2851 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs's avatar
      - fixed 3098356 - Hard hang on movie search at www.movietickets.com · c082d008
      mjs authored
              * kjs/string_object.cpp:
              (StringProtoFuncImp::call): When doing a regexp replacement that
      	results in an empty match, always move on to the next character
      	after doing the replacement. The previous code would hit an
      	infinite loop if an initial empty match was replaced with the
      	empty string.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs's avatar
      - fixed 3095446 - Crash on AppleScript page due to very long argument list · 219ed0ac
      mjs authored
              * kjs/grammar.y: Don't try to construct the argument list in the
      	right order, since that blows out the parser stack.
      	* kjs/nodes.cpp:
              (ArgumentsNode::ArgumentsNode): Instead reverse the argument list
              * kjs/nodes.h: Make ArgumentsNode a friend of ArgumentListNode.
              * kjs/grammar.cpp: Updated from grammar.y.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2847 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs's avatar
      - completed Darin's mostly-fix for 3037795 - Resource use · 1a9f113f
      mjs authored
      	increases when accessing very high index value in array
      	The two missing pieces were handling sparse properties when
      	shrinking the array, and when sorting. Thse are now both taken
      	care of.
              * kjs/array_instance.h:
              * kjs/array_object.cpp:
              * kjs/identifier.h:
              * kjs/object.h:
              * kjs/property_map.cpp:
              * kjs/property_map.h:
              * kjs/reference_list.cpp:
              * kjs/reference_list.h:
              * kjs/ustring.cpp:
              * kjs/ustring.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  15. 23 Nov, 2002 2 commits
    • mjs's avatar
      Numerous collector changes for a net gain of 3% on JS ibench: · 5a7a3882
      mjs authored
      	- Replaced per-block bitmap with free list.
      	- Increased number of empty blocks kept around to 2.
      	- Doubled block size.
      	- When scanning heap in collector, skip scanning the rest of a
      	block as soon as we see as many live cells as the the number of
      	used cells it had originally.
      	Also the following collector changes unrelated to performance:
      	- Made constants `const int' instead of `static const int'.
      	- Miscellaneous code cleanup.
              * kjs/collector.cpp:
      	- Added debugging mode enabled by defining DEBUG_GC which asserts
      	when a destroyed ValueImp
              * kjs/internal.cpp:
              * kjs/value.cpp:
              * kjs/value.h:
      	* kjs/config.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2845 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      JavaScriptCore: · ff399e06
      darin authored
      	- replaced List class with a vector rather than a linked list, changed it
      	to use a pool of instances instead of all the nodes allocated off of the
      	heap; gives 10% gain on iBench
              * kjs/list.h: Complete rewrite.
              * kjs/list.cpp: Ditto.
              * kjs/array_object.cpp: (compareWithCompareFunctionForQSort): Go back to
      	doing a clear and two appends here. Fast with the new list implementation.
              * kjs/collector.h: Remove _COLLECTOR hack and just make rootObjectClasses
      	return a const void *.
              * kjs/collector.cpp: Remove _COLLECTOR hack, and various other minor tweaks.
              * khtml/ecma/kjs_window.cpp: Remove _COLLECTOR hack.
              * kwq/WebCoreJavaScript.h:
              * kwq/WebCoreJavaScript.mm:
              (+[WebCoreJavaScript rootObjectClasses]):
      	Update for name change -- root object classes, not all live object classes.
              * force-js-clean-timestamp: Make sure we don't have more build problems.
              * Misc.subproj/WebCoreStatistics.h:
              * Misc.subproj/WebCoreStatistics.m:
              (+[WebCoreStatistics javaScriptRootObjectClasses]):
      	Update for name change -- root object classes, not all live object classes.
              * Debug/CacheController.m: (-[CacheController refreshJavaScriptStatisticsMatrix]):
      	Update for name change -- root object classes, not all live object classes.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  16. 22 Nov, 2002 3 commits
    • darin's avatar
      - prepare to reimplement KJS::List; move to its own file, add statistics · 6afbb079
      darin authored
              * kjs/function_object.cpp: (FunctionProtoFuncImp::call): Use new copyTail()
      	function rather than copy() and removeFirst().
              * kjs/identifier.cpp: Add statistics, off by default.
              * kjs/property_map.cpp: Add statistics, off by default.
              * kjs/list.cpp: Added. Moved code here. To be rewritten.
              * kjs/list.h: Added. Moved interface here. To be rewritten.
              * kjs/types.cpp: Removed.
              * kjs/types.h: Now just an empty header that includes other headers.
              * JavaScriptCore.pbproj/project.pbxproj: Add new files, rearrange.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2834 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs's avatar
      - reduce cell size to 56 bytes from 64, now that nearly all · db3db8e9
      mjs authored
      	objects fit in that size. .5% speed gain and probably some
      	footprint gain.
              * kjs/collector.cpp: Change CELL_SIZE from 64 to 56.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2825 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      JavaScriptCore: · 7b978750
      darin authored
      	- change ScopeChain to be a singly linked list shares tails, gives 11% gain on iBench
              * kjs/context.h:
              (ContextImp::pushScope): Make inline, use push instead of prepend, and pass imp pointer.
              (ContextImp::popScope): Make inline, use pop instead of removeFirst.
              * kjs/function.cpp: (DeclaredFunctionImp::DeclaredFunctionImp): No need to copy.
              * kjs/function_object.cpp: (FunctionObjectImp::construct): Use push instead of
      	prepend, and pass imp pointer.
              * kjs/internal.cpp: (ContextImp::ContextImp): Use clear, push instead of prepend,
      	and pass imp pointers.
              * kjs/nodes.cpp: (ResolveNode::evaluateReference): Use isEmpty, pop, and top instead
      	of ScopeChainIterator.
              * kjs/object.h: Change _scope to be a NoRefScopeChain.
              * kjs/object.cpp: No need to initialize _scope any more, since it's not a NoRefScopeChain.
              * kjs/scope_chain.h: Rewrite, different implementation and interface.
              * kjs/scope_chain.cpp: More of the same.
              * khtml/ecma/kjs_dom.cpp: (DOMNode::pushEventHandlerScope): Change to push handlers
      	on an existing scope chain rather than returning one. Name change too.
              * khtml/ecma/kjs_dom.h: More of the same.
              * khtml/ecma/kjs_html.cpp: (KJS::HTMLElement::pushEventHandlerScope): And here.
              * khtml/ecma/kjs_html.h: And here.
              * khtml/ecma/kjs_events.cpp: (JSEventListener::handleEvent): Use the pushEventHandlerScope
      	function, and also don't worry about optimizing the "no change" case, because that already
      	works pretty efficiently.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2824 268f45cc-cd09-0410-ab3c-d52691b4dbfc