1. 18 Jan, 2003 1 commit
    • mjs's avatar
      Reviewed by John. · 0a04d8f2
      mjs authored
      	- fixed 3123041 - VIP: Spewage at bottom of oregonlive.com and other similar pages
      
              * WebView.subproj/WebUserAgentSpoofTable.gperf: Added nj.com to spoof list
      	below oregonlive.com (which was already in there). Added comment explaining the
      	need to spoof a bit more.
              * WebView.subproj/WebUserAgentSpoofTable.c:
              (hash):
              (_web_findSpoofTableEntry): Regenerated.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0a04d8f2
  2. 17 Jan, 2003 1 commit
    • cblu's avatar
      WebFoundation: · d3ed1c91
      cblu authored
      	Fixed: 3143656 - crash in MIMETypeForFile when a large QT movie is dragged over window
      
      	Removed all unnecessary content sniffing as that work is already done in WebResourceLoad.
      
              Reviewed by darin.
      
              * CacheLoader.subproj/WebResourceLoad.m:
              (-[WebResourceLoad _sendResponseMetadataCallbackCheckingPreconditions:]): only sniff here, call _web_guessedMIMEType
              * Misc.subproj/WebMultipartForm.m: include WebNSDataExtras
              * Misc.subproj/WebNSDataExtras.h: Added.
              * Misc.subproj/WebNSDataExtras.m: Added.
              (-[NSMutableData _web_appendFormat:]):
              (-[NSMutableData _web_appendEncodedString:format:arguments:]):
              (-[NSMutableData _web_appendEncodedString:format:]):
              (-[NSData _web_guessedMIMEType]): was _guessMIMEType in WebResourceLoad
              * Misc.subproj/WebNSMutableDataExtras.h: Removed.
              * Misc.subproj/WebNSMutableDataExtras.m: Removed.
              * Misc.subproj/WebNSStringExtras.h: removed 2 unneeded methods
              * Misc.subproj/WebNSStringExtras.m:
              * ProtocolHandlers.subproj/WebFileProtocolHandler.m:
              (-[WebFileProtocolHandler didLoadData:]): get the MIME type from the extension, don't sniff
              * ProtocolHandlers.subproj/WebSimpleHTTPProtocolHandler.m:
              (-[WebSimpleHTTPProtocolHandler _extractResponseStatusLineFromBytes:length:]): don't sniff
              * WebFoundation.pbproj/project.pbxproj:
      
      WebKit:
      
      	Fixed: 3143656 - crash in MIMETypeForFile when a large QT movie is dragged over window
      
              Reviewed by darin.
      
              * WebView.subproj/WebControllerPrivate.m:
              (+[WebController _MIMETypeForFile:]): rewrote, now calls _web_guessedMIMEType
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d3ed1c91
  3. 16 Jan, 2003 1 commit
  4. 15 Jan, 2003 1 commit
    • darin's avatar
      WebCore: · c12a0350
      darin authored
              Reviewed by Ken.
      
      	- fixed problem where Content-Type was coming in with suffixes like "charset"
      
              * kwq/WebCoreBridge.h: Add contentType and refresh parameters, and remove "headers"
      	parameter, from openURL method.
              * kwq/WebCoreBridge.mm:
              (-[WebCoreBridge openURL:reload:contentType:refresh:lastModified:pageCache:]): Get the
      	content type from a parameter, and the refresh header from a separate parameter rather
      	than extracting both from a headers dictionary.
      
      WebKit:
      
              Reviewed by Ken.
      
      	- fixed problem where Content-Type was going into WebCore with suffixes like "charset"
      
              * WebView.subproj/WebDataSourcePrivate.m: (-[WebDataSource _commitIfReady:]):
      	Pass in contentType from the response, rather than the "Content-Type" header.
      	Also pass in the refresh header separately.
      
              * English.lproj/StringsNotToBeLocalized.txt: Updated for above change.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3326 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c12a0350
  5. 14 Jan, 2003 2 commits
    • darin's avatar
      Reviewed by Dave. · a15075e3
      darin authored
              * Plugins.subproj/WebBaseNetscapePluginStream.m:
              (-[WebBaseNetscapePluginStream finishedLoadingWithData:]):
      	Fixed uninitialized variable warning so builds work again.
      
              * WebView.subproj/WebDataSourcePrivate.m: (+[WebDataSource _repTypes]): Added "application/xml".
              * WebView.subproj/WebViewPrivate.m: (+[WebView _viewTypes]): Added "application/xml".
      
      	* English.lproj/Localizable.strings: Regenerated.
      	* English.lproj/StringsNotToBeLocalized.txt: Updated for above change.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3323 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a15075e3
    • darin's avatar
      Reviewed by Trey, John, and Maciej, and given the seal of approval by Don. · 31d40d53
      darin authored
      	- fixed 3143317 -- plug-in supplied URLs cause correspondingly named files in /tmp to be deleted
      	- fixed 3143330 -- plug-in supplied URLs can overwrite files used in other windows by same plug-in
      
              * Plugins.subproj/WebBaseNetscapePluginStream.h: Make path be a char * rather than an NSString.
              * Plugins.subproj/WebBaseNetscapePluginStream.m:
              (-[WebBaseNetscapePluginStream dealloc]): Use unlink() to delete the temporary file we made.
      	Since we created the file, we know it doesn't have any fancy stuff like a resource fork.
              (-[WebBaseNetscapePluginStream finishedLoadingWithData:]): Create the file with mkstemp instead of
      	trying to come up with our own filename. This eliminates the need to delete an old file (because we
      	are guaranteed the file is new) and also mkstemp opens the file for us, so we just need to write
      	the contents.
      
              * English.lproj/StringsNotToBeLocalized.txt: Updated for above changes.
      
              - unrelated change to help with other bug analysis
      
              * WebView.subproj/WebBaseResourceHandleDelegate.m: Added assertions.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3318 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      31d40d53
  6. 13 Jan, 2003 1 commit
    • cblu's avatar
      WebFoundation: · bd135e16
      cblu authored
      	Fix for checking and creating proper download filenames.
      
              Reviewed by mjs, kocienda, trey.
      
              * CacheLoader.subproj/WebResourceResponse.h:
              * CacheLoader.subproj/WebResourceResponse.m: removed the filename method. That is now a category in WebKit
              * CacheLoader.subproj/WebResourceResponsePrivate.h:
              * Misc.subproj/WebNSStringExtras.h:
              * Misc.subproj/WebNSStringExtras.m:
              (-[NSString _web_filenameByFixingIllegalCharacters]): new, turns "/" into "-", strips leading dots
              * ProtocolHandlers.subproj/WebHTTPProtocolHandler.m:
              (-[WebHTTPProtocolHandler setResponseMetadata:]): don't parse out the content disposition. This is done in WebKit.
      
      WebKit:
      
      	Fix for checking and creating proper download filenames.
      
              Reviewed by mjs, kocienda, trey.
      
              * WebKit.pbproj/project.pbxproj:
              * WebView.subproj/WebControllerPolicyDelegate.h: changes for renamed savePathForResponse:andRequest: method
              * WebView.subproj/WebDefaultPolicyDelegate.m: changes for renamed savePathForResponse:andRequest: method
              (-[WebDefaultPolicyDelegate savePathForResponse:andRequest:]): renamed
              * WebView.subproj/WebMainResourceClient.m:
              (-[WebMainResourceClient continueAfterContentPolicy:response:]): changes for renamed savePathForResponse:andRequest: method
      
      WebBrowser:
      
      	Fix for checking and creating proper download filenames.
      
              Reviewed by mjs, kocienda, trey.
      
              * BrowserDocument.m:
              (-[BrowserDocument pageName]): call _web_filenameByFixingIllegalCharacters on the web page title when saving the document
              * BrowserWebController.m:
              (-[BrowserWebController savePathForResponse:andRequest:]): renamed, removed temporary that checks for invalid filename. That work is done in WebKit.
              * HTMLSourceDocument.m:
              (-[HTMLSourceDocument displayName]): call suggestedFilenameForSaving
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bd135e16
  7. 12 Jan, 2003 1 commit
    • darin's avatar
      Reviewed by John. · f9855741
      darin authored
      	- fixed 3144882 -- pretend to be WinIE for abcnews.com
      
              * WebView.subproj/WebControllerPrivate.h: Add an enum, UserAgentStringType, with values
      	Safari, MacIE, and WinIE. Also add NumUserAgentStringTypes and turn the userAgent and
      	userAgentWhenPretendingToBeMacIE strings into an array indexed by type.
      
              * WebView.subproj/WebController.m:
              (-[WebController setApplicationNameForUserAgent:]): Use a loop to discard the user agent
      	strings, since we have an array now.
              (-[WebController userAgentForURL:]): Change user agent algorithm to check two strings rather
      	than once against the spoof table, allowing two dots in the "domain name", which is needed
      	for "abcnews.go.com". Get a user agent string type from the table rather than just a boolean
      	"pretend to be MacIE". Store a string per type rather than one for normalcy and one for MacIE.
      	Add a case for WinIE to the user agent computations.
      
      	* English.lproj/StringsNotToBeLocalized.txt: Update for change above.
      
              * WebView.subproj/WebControllerPrivate.m:
              (-[WebControllerPrivate dealloc]): Use a loop to discard the user agent strings, since we have
      	an array now.
              (-[WebController _defaultsDidChange]): Ditto.
      
              * WebView.subproj/WebUserAgentSpoofTable.gperf: Add a UserAgentStringType field to the struct.
      	Add MacIE to each existing table entry, and add a new one that says WinIE for abcnews.go.com.
      
              * Makefile.am: Pass "-F ,0" to gperf so that we don't get warnings compiling empty entries
      	in the hash table.
      
              * WebView.subproj/WebUserAgentSpoofTable.c: Re-generated.
      
              - other changes
      
              * WebView.subproj/WebHTMLView.m: Removed some old, dead, #if 0'd code.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f9855741
  8. 09 Jan, 2003 2 commits
    • trey's avatar
      WebKit: · 38b5508b
      trey authored
      	3143294 - need short-term bulletproofing of download code against bad filenames
      
      	We protect against a download location that is not an absolute path.
      
              Reviewed by Darin
      
              * WebView.subproj/WebMainResourceClient.m:
              (-[WebMainResourceClient continueAfterContentPolicy:response:]):
      	Bail on download if we don't have a abs path to write to.
      
      WebBrowser:
      
      	3143294 - need short-term bulletproofing of download code against bad filenames
      
      	We protect against slashes and leading periods, as well as handling empty filenames.
      
              Reviewed by Darin
      
              * BrowserWebController.m:
              (-[BrowserWebController saveFilenameForResponse:andRequest:]):
      	Check results of [response filename] carefully
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      38b5508b
    • trey's avatar
      3142201 - home directory nuked during power download session · 66177e0b
      trey authored
      	We add checks for various error cases that could combine to cause this problem.  While we
      	never got a reproducible case, we are confident that this is the only file removal done
      	in the download code, and its ability to wreak havoc has been clipped.
      
              Reviewed by Richard.
      
              * Downloads.subproj/WebDownloadHandler.m:
              (-[WebDownloadHandler cleanUpAfterFailure]):  Only nuke the partial download if in fact we created
      	a new download file.  Never nuke a directory.
              (-[WebDownloadHandler createFileIfNecessary]):  Don't add "." to the foo-1 filenames we generate
      	if the original filename doesn't have any extension.
              * WebView.subproj/WebMainResourceClient.m:
              (-[WebMainResourceClient continueAfterContentPolicy:response:]):
      	If the policyDelegate gives us a nil filename, just stop the whole load, instead of trying to
      	overwrite the user's home directory.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3281 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      66177e0b
  9. 03 Jan, 2003 3 commits
  10. 02 Jan, 2003 2 commits
    • rjw's avatar
      Increase the minimum font size to 9pt. This bounds the lower · 3d3be9b3
      rjw authored
              size of the sizes array used for named sizes.  Net effect is
              to increase xx-small from 8pt to 9pt.  xx-small is used by
              www.microsoft.com.
      
              Reviewed by hyatt.
      
              * WebView.subproj/WebPreferences.m:
              (+[WebPreferences load]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3239 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3d3be9b3
    • darin's avatar
      Reviewed by John and Don. · 23b9ad79
      darin authored
      	- fixed 3137661 -- REGRESSION: autoscroll selection is broken
      
      	The new logic in WebCore is slightly pickier, and can't abide a mouse-moved event
      	coming in during a drag. Unfortunately, we were sending a fake mouse-moved event
      	during a drag, so lets not do that.
      
              * WebView.subproj/WebHTMLView.m:
              (-[WebHTMLView mouseDown:]): Cancel any scheduled fake mouse-moved event.
              (-[WebHTMLView mouseUp:]): Send a fake mouse-moved event because we didn't update during the drag.
      
              * WebView.subproj/WebHTMLViewPrivate.m: (-[WebHTMLView _frameOrBoundsChanged]):
      	Don't schedule a fake mouse-moved event if the mouse is down, because that means we are in the
              middle of a drag.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3232 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      23b9ad79
  11. 01 Jan, 2003 4 commits
    • mjs's avatar
      WebCore: · 51e8fadc
      mjs authored
              Reviewed by Darin.
      
      	- fixed 3130831 - HOMEPAGE: JavaScript that tries to intercept onmousedown fails, image gets dragged instead
      	- fixed 3125554 - while dragging to select text in a nested frame, you can start dragging a link or image
      
              * kwq/KWQKHTMLPart.h:
              * kwq/KWQKHTMLPart.mm:
      	(KWQKHTMLPart::KWQKHTMLPart): Initialize new mouseDownMayStartDrag
      	and mouseDownMayStartSelect methods.
              (KWQKHTMLPart::khtmlMousePressEvent): Make sure a mouse down
      	won't be used to start a drag or selection if the default action
      	is prevented on the mouse down event.
      	(KWQKHTMLPart::mouseDown): Since the default action wasn't
      	prevented, decide if this might be the start of a drag or
      	selection.
              (KWQKHTMLPart::khtmlMouseMoveEvent): On a drag or selection, call
      	back to the bridge to handle selection or autoscrolling
      	appropriately.
      	* kwq/WebCoreBridge.h: Prototype new methods.
      
      WebKit:
      
      	Reviewed by Darin.
      
      	- fixed 3130831 - HOMEPAGE: JavaScript that tries to intercept onmousedown fails, image gets dragged instead
      	- fixed 3125554 - while dragging to select text in a nested frame, you can start dragging a link or image
      
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge handleMouseDragged:]): New method; call through the WebHTMLView.
              (-[WebBridge mayStartDragWithMouseDown:]): Likewise.
              (-[WebBridge handleAutoscrollForMouseDragged:]): Likewise.
              * WebView.subproj/WebHTMLView.m:
              (-[WebHTMLView mouseDragged:]): Instead of doing drag handling
      	here, just pass the event to WebCore.
      	(-[WebHTMLView draggedImage:endedAt:operation:]): Send a fake
      	mousemove event instead of sending the current event (likely a
      	mouse up as if it were a mouse move).
              * WebView.subproj/WebHTMLViewPrivate.h:
              * WebView.subproj/WebHTMLViewPrivate.m:
              (-[WebHTMLViewPrivate dealloc]): Release drag element if any.
              (-[WebHTMLView _dragImageForElement:]): New method. Split out the
      	code to make the special drag image for links.
      	(-[WebHTMLView _handleMouseDragged:]): Move all the drag handling
      	here. This method will get called only if WebCore hasn't blocked
      	default drag handling.
              (-[WebHTMLView _handleAutoscrollForMouseDragged:]): Do
      	autoscroll. Autoscroll is still lame, we need a timer.
              (-[WebHTMLView _mayStartDragWithMouseDown:]): Determine if the element
      	is a link or image and so may be dragged; remember the drag element.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      51e8fadc
    • rjw's avatar
      Correct fix for 3137430 that doesn't always effectively disable · afb789f4
      rjw authored
              the cache.
      
              Reviewed by kocienda.
      
              * History.subproj/WebHistoryItem.m:
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _continueLoadRequestAfterNavigationPolicy:request:]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3227 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      afb789f4
    • rjw's avatar
      Don't reset the cookie policy URL if it has already been set. Fixes to 3109590. · f146ac5e
      rjw authored
              Reviewed by Maciej.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f146ac5e
    • darin's avatar
      WebKit: · c594b671
      darin authored
              Reviewed by Trey.
      
      	- fixed 3137287 -- REGRESSION: Java applets don't work when you go back to them (Java 1.4.1 plug-in)
      
      	By attaching the plug-in controller to the frame, we run into trouble.
      	It really needs to be attached to the data source, which has the right lifetime
      	and is kept around in the page cache.
      
              * Plugins.subproj/WebPluginController.h: Keep a reference to a data source, not a frame.
      	Add a new _started variable. Rename addPluginView: to addPlugin:, get rid of didAddPluginView:,
      	replace destroyAllPlugins with dataSourceWillBeDeallocated, add startAllPlugins and stopAllPlugins.
              * Plugins.subproj/WebPluginController.m:
              (-[WebPluginController initWithDataSource:]): Store a data source reference, not a frame reference.
      	Don't bother registering for the window will close notification, WebHTMLView handles that fine.
              (-[WebPluginController startAllPlugins]): Do nothing if they are already started, call pluginStart on each otherwise.
              (-[WebPluginController stopAllPlugins]): Do nothing if they are not started, call pluginStop on each otherwise.
              (-[WebPluginController addPlugin:]): Initialize the plugin if it's not already in our list. Also start
      	it if we are in "started" mode.
              (-[WebPluginController dataSourceWillBeDeallocated]): Stop all the plugins, then destroy them.
      	Also nil out the fields of the object. This is always called before the controller is released so we
      	don't need to override dealloc.
              (-[WebPluginController showURL:inFrame:]): Added error checking and changed now that we start with a data source.
              (-[WebPluginController showStatus:]): Ditto.
      
              * WebCoreSupport.subproj/WebBridge.m: (-[WebBridge pluginViewWithPackage:attributes:baseURL:]):
      	Use the data source, not the view. Don't add the plugin here, wait until we are ready to start.
      
              * WebView.subproj/WebDataSourcePrivate.h: Store a pointer to the plug-in controller here.
              * WebView.subproj/WebDataSourcePrivate.m:
              (-[WebDataSourcePrivate dealloc]): Tell the plug-in controller to go away.
      	(-[WebDataSource _makeHandleDelegates:deferCallbacks:]): Remove unused empty method.
              (-[WebDataSource _pluginController]): Create a plug-in controller if needed.
      
              * WebView.subproj/WebFramePrivate.h: Remove plug-in controller code.
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFramePrivate dealloc]): Remove plug-in controller code.
              (-[WebFrame _detachFromParent]): Remove plug-in controller code.
              (-[WebFrame _transitionToCommitted:]): Remove plug-in controller code.
      
              * WebView.subproj/WebHTMLView.m:
              (-[WebHTMLView viewWillMoveToWindow:]): Stop plug-ins when view moves out of a window.
      	This includes the case when the window is being destroyed.
              (-[WebHTMLView viewDidMoveToWindow]): Start plug-ins when view moves into a window.
              (-[WebHTMLView addSubview:]): Add plug-ins to the controller as they are added to us.
      
              * WebView.subproj/WebController.m: Added now-needed include due to header change.
              * WebView.subproj/WebDefaultContextMenuDelegate.m: Ditto.
      
      WebBrowser:
      
              Reviewed by Don and Ken.
      
      	- worked around 3137387 -- Using Java 1.4.1 plug-in causes world leak (NSDocument close never called)
      
              * BrowserWindow.m:
              (-[BrowserWindow setDelegate:]): If someone tries to set the delegate to something other than the
      	BrowserWindowController, don't let them.
              (-[BrowserWindow setWindowController:]): Same thing for the controller.
      
      	- fixed 3137494 -- loading bad URL with PLT window in "world leak check mode" indicates leak, prevents quit
      
              Filed bug 3137567 about the AppKit part of this.
      
              * Test/PageLoadTestRunner.m: (-[NSWindow closeIfBrowserWindow]): Close the sheet, if any, before
      	closing the window.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3223 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c594b671
  12. 30 Dec, 2002 3 commits
    • trey's avatar
      3137110 - REGRESSION: calls from 2nd and subsequent instances of Java 1.4.1... · 872e16f0
      trey authored
      	3137110 - REGRESSION: calls from 2nd and subsequent instances of Java 1.4.1 plug-in seem to be ignored
      
      	We had previously made changes to "numb" a plugin controller after its frame
      	was tossed or changed content.  We now finish the job by making sure a new
      	controller is created when we go to a new page with plugins.  To so this we
      	release the old controller whenever we flush the plugins from a page.
      
              Reviewed by Maciej.
      
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _detachFromParent]):  Call newly factored code.
              (-[WebFrame _transitionToCommitted:]):  Call newly factored code.
              (-[WebFrame _destroyPluginController]):  New method to tear down plugins.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3217 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      872e16f0
    • trey's avatar
      3135025 - Assertion failure in _transitionToCommitted on espn nba scoreboard · 3296b190
      trey authored
      	For blank pages we decided that there would be no b/f entry.  This means that
      	subframes within such pages (created via doc.write()), should not try to make
      	WebHistoryItems, since they have no parent items to attach them to.
      
              Reviewed by Darin.
      
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _transitionToCommitted:]):  Don't make a history item for a subframe
      	it the parent frame has no item.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3296b190
    • trey's avatar
      3135779 - REGRESSION: reproducible assertion failure, going back from ~orubin... · c4784143
      trey authored
      	3135779 - REGRESSION: reproducible assertion failure, going back from ~orubin to the main spies.com page	
      	3136218 - REGRESSION: Assertion failure in _restoreScrollPosition running browser buster
      
      	Both were caused by subtle interactions between new code for short-circuiting loading of
      	blank pages, and the WebHistoryItem manipulations we do for b/f and reload of child frames.
      
              Reviewed by Maciej
      
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _loadURL:intoChild:]):  Setup provisional or current item before jumping into
      	the real work of loading the URL.
              (-[WebFrame _restoreScrollPosition]):  Tweaked to make the assertion message clearer.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3212 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c4784143
  13. 29 Dec, 2002 1 commit
    • darin's avatar
      Reviewed by Ken and Don. · 05df9e7f
      darin authored
      	- fixed 3136120 -- much content missing at www.olympic.org
      
      	This site gives modern CSS to "Internet Explorer" or "Netscape 6". Since we are neither of
      	those, we need to pretend to be one or the other. So we add olympic.org to our MacIE spoofing list.
      
              * WebView.subproj/WebUserAgentSpoofTable.gperf: Add olympic.org to the list of pages that give us better
      	CSS if we claim to be Internet Explorer.
              * WebView.subproj/WebUserAgentSpoofTable.c: Regenerated.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      05df9e7f
  14. 28 Dec, 2002 1 commit
    • darin's avatar
      Reviewed by Don. · 7570c92e
      darin authored
      	- fixed 3136206 -- Can't display images in Ambrosia Software image viewer
      
      	WebKit wasn't creating the frames correctly when they weren't HTML.
      
              * WebView.subproj/WebFramePrivate.m: (-[WebFrame _makeDocumentView]): Added. Calls the
      	WebView to make the document view and then installs the new view, as WebHTMLView used to do.
              (-[WebFrame _transitionToCommitted:]): Call _makeDocumentView instead of calling WebView
      	directly. These are all the calls to _makeDocumentViewForDataSource:.
      
              * WebView.subproj/WebViewPrivate.h: Add return value to _makeDocumentViewForDataSource:.
              * WebView.subproj/WebViewPrivate.m: (-[WebView _makeDocumentViewForDataSource:]):
      	Return the newly-created view.
      
              * WebView.subproj/WebHTMLView.m: (-[WebHTMLView setDataSource:]): Removed the code here
      	since it's done by WebFrame now.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7570c92e
  15. 23 Dec, 2002 1 commit
    • darin's avatar
      Reviewed by John and Don. · e72b8ee6
      darin authored
      	- fixed 3134282 -- REGRESSION: text encoding setting reverts when you go to a new location
      
              * WebView.subproj/WebFrame.m: (-[WebFrame loadRequest:]): Propagate an override encoding if there
      	was an existing data source and it had an override encoding.
              * WebView.subproj/WebFramePrivate.m: (-[WebFrame _loadRequest:triggeringAction:loadType:]): Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3176 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e72b8ee6
  16. 20 Dec, 2002 3 commits
  17. 19 Dec, 2002 1 commit
    • darin's avatar
      WebKit: · 27fa8d4c
      darin authored
              Reviewed by John.
      
      	- corrected the name of a method that was leading to trouble elsewhere
      
              * WebView.subproj/WebDataSource.h: Change fileType to fileExtension for clarity.
              * WebView.subproj/WebDataSource.m: (-[WebDataSource fileExtension]): Ditto.
      
      WebBrowser:
      
              Reviewed by John.
      
      	- fixed 3132671 -- REGRESSION: Saving an HTML file with Safari doesn't append .html (its used to)
      
              * BrowserDocument.m: (-[BrowserDocument fileType]): Call [NSDocumentController typeFromFileExtension:]
      	instead of using the extension as the file type, which only works if you happen to have a file type that's
      	named exactly the same as the extension.
              * HTMLSourceDocument.m: (-[HTMLSourceDocument fileType]): Ditto.
      
              * WebBrowser.pbproj/project.pbxproj: Added capitalized file types, fixed .jp2 to be separate from .jpg,
      	These came from looking over NSImage's file type list.
              * English.lproj/InfoPlist.strings: Added JPEG 2000.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3140 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      27fa8d4c
  18. 18 Dec, 2002 5 commits
    • darin's avatar
      Reviewed by Richard. · e95b8af8
      darin authored
      	- fixed 3127490 -- pages w/frames sometimes show up blank
      
              * WebView.subproj/WebHTMLView.m: (-[WebHTMLView drawRect:]):
      	Updated the optimization where we draw the entire view if we did a layout
      	so that it works properly for the case where the clip is narrower because of
      	the parent WebHTMLView.
      
              * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3131 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e95b8af8
    • trey's avatar
      WebCore: · bf7d82ff
      trey authored
      	3098388 - Pressing the back button goes back two levels at allmusic.com
      
      	In support of the fix for this bug, WebCore passes khtml's lockHistory setting
      	up through the bridge.
      
              Reviewed by Darin
      
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::redirectionTimerStartedOrStopped):  Pass it along.
              * kwq/WebCoreBridge.h:
      
      WebKit:
      
      	3098388 - Pressing the back button goes back two levels at allmusic.com
      
      	I rewrote the logic we use to decide whether a given redirect should be
      	treated as part of the previous navigation.  We make use of WebCore's
      	lockHistory setting, the delay time and the frame state.
      
              Reviewed by Darin.
      
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge reportClientRedirectToURL:delay:fireDate:lockHistory:]):
      	Pass lockHistory up to the frame.
              * WebView.subproj/WebFramePrivate.h:
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _clientRedirectedTo:delay:fireDate:lockHistory:]):
      	New logic.  No quick summary, best to read the code.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bf7d82ff
    • rjw's avatar
      Fixed 3129951. Don't allow pages that are stopping to enter the page cache. · 345bce15
      rjw authored
              (Fixed yesterday, forgot to checkin.)
      
              Reviewed by trey.
      
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _setState:]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3125 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      345bce15
    • mjs's avatar
      WebFoundation: · b1432259
      mjs authored
              Reviewed by Trey and Darin.
      
      	Minor fixes required to fix these bugs:
      
      	3124933 - abcnews.com leads to empty window with sheet complaining about javascript: URL
      	3091248 - picture does not show up in window from epinions
      
      	* CacheLoader.subproj/WebResourceResponse.h: Don't include uninstalled headers
      	in this private but installed header.
              * ProtocolHandlers.subproj/WebAboutProtocolHandler.m:
              (-[WebAboutProtocolHandler setResponseMetadata:]): "about:blank"
      	should be a blank html document, not a blank plain text document.
              * Misc.subproj/WebNSURLExtras.h:
              * Misc.subproj/WebNSURLExtras.m:
              (-[NSString _web_shouldLoadAsEmptyDocument]): New method.
      	* English.lproj/StringsNotToBeLocalized.txt: Updated.
      
      WebCore:
      
              Reviewed by Trey and Darin.
      
      	- fixed 3124933 - abcnews.com leads to empty window with sheet complaining about javascript: URL
      	- fixed 3091248 - picture does not show up in window from epinions
      
      
              * khtml/ecma/kjs_window.cpp:
              (Window::get): Put back document-creating code that was in #if
      	!APPLE_CHANGES.
      	(Window::isSafeScript): Extend access to a window that was opened
      	to no URL or to about:blank by the active window.
              (shouldLoadAsEmptyDocument): Helper for the above.
              (WindowFunc::tryCall): Update APPLE_CHANGES comments - now it's
      	clear we don't need to create a document in a fresh window
      	(accessing document will take care of that), and that it will be
      	counter-productive, possibly adding a useless entry to the
      	back/forward list.
              * khtml/khtml_part.cpp:
              (KHTMLPart::begin): If we're not loading a URL, make a dummy
      	document (the call will check if we have a dummy document
      	already).
              * kwq/KWQKHTMLPart.mm:
      	(KWQKHTMLPart::createEmptyDocument): Isntead of setting up a
      	half-assed document, ask bridge to synchronously load a fully
      	assed (but empty) document. Renamed from createDummyDocument.
              * kwq/KWQKHTMLPartBrowserExtension.mm:
              (KHTMLPartBrowserExtension::openURLRequest): Decode script. Also,
      	check if return value is a string - if so, write it into the
      	document. Maybe we want this to be more general.
              * kwq/KWQKURL.mm:
              (KURL::KURL): Changed to successfully resolve absolute URLs
      	against an empty base URL.
              * kwq/WebCoreBridge.h: prototyped new
      	loadEmptyDocumentSynchronously method.
      
      WebKit:
      
              Reviewed by Darin and Trey.
      
      	- fixed 3124933 - abcnews.com leads to empty window with sheet complaining about javascript: URL
      	- fixed 3091248 - picture does not show up in window from epinions
      	- made "about:blank" load synchronously, which I'm told is required by some sites.
      
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge createWindowWithURL:frameName:]): If the URL is nil
      	or empty, pass a nil request - otherwise WebBrowser will try to
      	load it, resulting in an extra back/forward list entry.
              (-[WebBridge loadEmptyDocumentSynchronously]): Tell the frame to
      	load a request with an empty URL - this will cause a synchronous
      	load of an empty html document
              * WebView.subproj/WebBaseResourceHandleDelegate.h:
              * WebView.subproj/WebBaseResourceHandleDelegate.m:
      	(-[WebBaseResourceHandleDelegate loadWithRequest:]): Split off
      	startLoading: part of method to allow behavior to be subclassed.
              (-[WebBaseResourceHandleDelegate startLoading:]):
              * WebView.subproj/WebDataSourcePrivate.m:
              (-[WebDataSource _commitIfReady:]): Lie and claim the URL is
      	"about:blank" if it's really empty to avoid confusing WebCore.
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _transitionToCommitted:]): Don't put the empty URL in
      	global history.
              (-[WebFrame
      	_checkNavigationPolicyForRequest:dataSource:andCall:withSelector:]):
      	Don't check policy if URL is empty - this is likely to confuse the
      	client and we know what the right behavior here is.
              * WebView.subproj/WebMainResourceClient.m:
      	(-[WebMainResourceClient startLoading:]): Try to load
      	"about:blank" and the empty URL synchronously, bypassing
      	WebFoundation.
              (-[WebMainResourceClient continueAfterContentPolicy:response:]): Ditto.
              (-[WebMainResourceClient setDefersCallbacks:]): Ditto.
              * English.lproj/StringsNotToBeLocalized.txt: Updated.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b1432259
    • rjw's avatar
      Fixed 3109590. We now set the cookie policy URL to a frame's URL if the · db57d554
      rjw authored
              contents of the frame changes as a result of user action.  The site mentioned
              is this bug branded a service by wrapping it in their own frameset.  That frameset
              had a different domain than the service, so our cookie policy prevented cookies
              from being set.
      
              Reviewed by trey.
      
              * WebView.subproj/WebDataSourcePrivate.m:
              (-[WebDataSource _startLoading:]):
              * WebView.subproj/WebFrame.m:
              (-[WebFrame loadRequest:]):
              * WebView.subproj/WebFramePrivate.h:
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _loadItem:fromItem:withLoadType:]):
              (-[WebFrame _addExtraFieldsToRequest:alwaysFromRequest:]):
              (-[WebFrame _loadURL:loadType:triggeringEvent:isFormSubmission:]):
              (-[WebFrame _postWithURL:data:contentType:triggeringEvent:]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      db57d554
  19. 17 Dec, 2002 4 commits
    • darin's avatar
      JavaScriptCore: · 7894002d
      darin authored
              Reviewed by Trey.
      
              * JavaScriptCore.pbproj/project.pbxproj: Removed signature.
      
      WebFoundation:
      
              Reviewed by Trey.
      
              * WebFoundation.pbproj/project.pbxproj: Remove signature.
      
      WebCore:
      
              Reviewed by Trey.
      
              * WebCore.pbproj/project.pbxproj: Remove signature.
              * kwq/KWQColor.mm: Turn off inlining so we can build even on the
      	compiler that warns about static data in inline functions.
      
      WebKit:
      
              Reviewed by Trey.
      
              * WebKit.pbproj/project.pbxproj: Remove signature.
              * WebView.subproj/WebController.m: Turn off inlining so we can build even on the
      	compiler that warns about static data in inline functions.
      
      WebBrowser:
      
              Reviewed by Trey.
      
              * Scripting.subproj/Safari.scriptSuite: Change signature to sfri.
              * WebBrowser.pbproj/project.pbxproj: Change signature to sfri.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3115 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7894002d
    • rjw's avatar
      Fixed 3127932. Added WebFrameLoadTypeReloadAllowingStaleData to cases that do not · 4ba64b84
      rjw authored
              get cached in the b/f cache.
      
              Reviewed by trey.
      
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _setState:]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3106 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4ba64b84
    • trey's avatar
      WebKit: · 2113543f
      trey authored
      	Reworking the code to update the page icon led me to roll the WebIconDB API
      	for URL to NSString.  In addition, the vestigial "Site" was removed.
      
      	Everything below is renaming, except where noted.
      
              Reviewed by Darin
      
              * English.lproj/StringsNotToBeLocalized.txt:
              * History.subproj/WebHistoryItem.m:
              (-[WebHistoryItem _retainIconInDatabase:]):
              (-[WebHistoryItem icon]):
              * Misc.subproj/WebIconDatabase.h:
              * Misc.subproj/WebIconDatabase.m:
              (-[WebIconDatabase init]):
              (-[WebIconDatabase iconForURL:withSize:cache:]):  Use _web_isFileURL.
              (-[WebIconDatabase iconForURL:withSize:]):
              (-[WebIconDatabase retainIconForURL:]):
              (-[WebIconDatabase releaseIconForURL:]):
              (-[WebIconDatabase _iconDictionariesAreGood]):
              (-[WebIconDatabase _loadIconDictionaries]):
              (-[WebIconDatabase _updateFileDatabase]):
              (-[WebIconDatabase _iconForFileURL:withSize:]):  Cons up a NSURL to get the path.
      	Test explicitly for .htm and .html suffixes.
              (-[WebIconDatabase _setIcon:forIconURL:]):
              (-[WebIconDatabase _setIconURL:forURL:]):
              (-[WebIconDatabase _releaseIconForIconURLString:]):
              (-[WebIconDatabase _retainFutureIconForURL:]):
              (-[WebIconDatabase _releaseFutureIconForURL:]):
              (-[WebIconDatabase _sendNotificationForURL:]):
              * Misc.subproj/WebIconDatabasePrivate.h:
              * Misc.subproj/WebIconLoader.m:
              (-[WebIconLoader handleDidFinishLoading:]):
              * WebKit.exp:
              * WebView.subproj/WebDataSourcePrivate.m:
              (-[WebDataSource _updateIconDatabaseWithURL:]):
              (-[WebDataSource _loadIcon]):
      
      WebBrowser:
      
      	3127109 - REGRESSION: generic favicon shown while page from same domain is loading
      
      	We now avoid jumping to the generic icon when we're loading and are moving
      	to a URL within the same domain as the current one.
      
      	In addition, some name changes for the URL->NSString changes in the WebIconDB API.
      
              Reviewed by John
      
              * BookmarkSource.m:
              (-[BookmarkSource imageForContentItem:]):  Adopt API change.
              * BrowserWindowController.h:  New ivar, _acceptsGenericIcon.
              * BrowserWindowController.m:
              (-[BrowserWindowController windowDidLoad]):  Init new ivar.
              (-[BrowserWindowController acceptsGenericIcon]):  New getter.
              (-[BrowserWindowController setAcceptsGenericIcon:]):  New setter.
              (-[BrowserWindowController updateLocationFieldIcon]):  Obey new ivar as to
      	we will accept a generic icon when updating.
              * LocationChangeHandler.m:
              (-[LocationChangeHandler locationChangeStartedForDataSource:]):  If the new URL
      	is in the same site as the old one, avoid accepting a generic icon.
              (-[LocationChangeHandler locationChangeDone:forDataSource:]):  Reset _acceptsGenericIcon
              * NewBookmarksController.m:
              (-[NewBookmarksController awakeFromNib]):  Adopt API change.
              * TitleBarButton.m:
              (-[TitleBarButton drawPathRepresentingPopUpMenuForEvent:URL:]):  Adopt API change.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3104 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2113543f
    • darin's avatar
      top level: · fc4fd1d0
      darin authored
              Reviewed by Don and Maciej.
      
              * force-clean-timestamp: Trigger a full build since we are setting
      	MACOSX_DEPLOYMENT_TARGET to 10.2, which requires remaking all PFEs.
      
      Tools:
      
              * Scripts/check-copyright: Added.
      
      JavaScriptCore:
      
              Reviewed by Don and Maciej.
      
      	- fixed 3129115 -- need Apple copyright added to open source documents
      
      	* tons of files: Added our copyright to files we modified, and updated all to standard format.
      
      	- other changes
      
              * JavaScriptCore.pbproj/project.pbxproj: Set MACOSX_DEPLOYMENT_TARGET to 10.2.
      	Also removed completion.cpp.
              * kjs/completion.cpp: Removed.
              * kjs/completion.h: Made the Completion constructor inline.
      
              * kjs/grammar.y: Removed an obsolete "pretend ifdef". No need to put these in APPLE_CHANGES now.
      
      WebFoundation:
      
              Reviewed by Don and Maciej.
      
              * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
              * WebFoundation.pbproj/project.pbxproj: Set MACOSX_DEPLOYMENT_TARGET to 10.2.
      
      WebCore:
      
              Reviewed by Don and Maciej.
      
      	- fixed 3129115 -- need Apple copyright added to open source documents
      
      	* tons of files: Added copyright message to files we modified and
      	standardized format of copyrights too.
      
      	- fixed 3129235 -- assert in LRUList visiting apple.com if "Display images" preference is off
      
              * khtml/misc/loader.cpp:
              (Cache::getLRUListFor): Use the first list for 0-sized objects.
              (Cache::removeFromLRUList): Allow 0-sized objects.
      
      	- other changes
      
              * khtml/rendering/render_style.h: Remove bogus unused private constructor.
      
              * kwq/KWQFont.h: Added copy constructor and assignment operator.
              * kwq/KWQFont.mm:
              (QFont::QFont): Copy constructor now retains the NSFont. The old version didn't which could
      	cause retain/release problems.
              (QFont::operator=): Retain the new NSFont and release the old one.
      
              * WebCore.pbproj/project.pbxproj: Set MACOSX_DEPLOYMENT_TARGET to 10.2.
      
      WebKit:
      
              Reviewed by Don and Maciej.
      
              * WebView.subproj/WebUserAgentSpoofTable.gperf: Added a couple of new domains to the list we
      	spoof as Mac IE, and added comments.
              * WebView.subproj/WebUserAgentSpoofTable.c: Regenerated.
      
              * WebKit.pbproj/project.pbxproj: Set MACOSX_DEPLOYMENT_TARGET to 10.2
      
      WebBrowser:
      
              Reviewed by Don and Maciej.
      
      	- fixed 3106686 -- Remove "world leak" debugging window before beta
      
              * Test/PageLoadTestController.m:
              (-[PageLoadTestController windowDidLoad]): (Not part of the bug fix.) Changed the combo
      	box so it automatically sizes to the number of pltsuite files so we don't have to edit
      	the nib all the time.
              (-[PageLoadTestController anyWindowWillClose:]): Don't do any world leak test when the
      	window closes. The one in the page load test window is still there.
      
              * Debug/DebugUtilities.m: (-[NSApplication validate_toggleAlwaysCheckForWorldLeaks:]):
      	Don't enable or check the debug menu item at all. Put an ifdef in so we can turn it on later.
      
      	- fixed 3124310 -- remove "app refuses to launch" code before shipping
      
              * main.m: (main): Remove all the licensing code.
      
      	- other changes
      
              * BrowserNSNetServiceExtras.m: Made all locally-defined-and used functions static
      	so we would know if any were unused and for cleanliness.
              (-[NSNetService hostName:andPort:]): Remove some silly assertions.
              (decode_name): Change printf for errors to ERROR.
              (decode_srv): Ditto.
      	(decode_txt): Removed because it's unused.
              (skip_question): Ditto.
              (MyDictionaryKeyHashCallBack): Removed silly assertion.
              (MyCreateCFDictionaryFromTXT): Ditto.
      
              * WebBrowser.pbproj/project.pbxproj: Set MACOSX_DEPLOYMENT_TARGET to 10.2
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fc4fd1d0
  20. 16 Dec, 2002 1 commit
  21. 15 Dec, 2002 1 commit
    • darin's avatar
      Reviewed by Dave. · cda39631
      darin authored
      	- implemented user-agent spoofing as described in bug 3044569
      
              * WebView.subproj/WebController.m: (-[WebController userAgentForURL:]):
      	Find the suffix of the host name that contains exactly one dot, lower-case it,
      	and look it up in the user-agent spoof table. For now, anything in the table
      	pretends to be MacIE. Don't fret that this table is simple. We will complicate it
      	as needed. The technique is flexible, even though it may not look it now.
      
              * WebView.subproj/WebControllerPrivate.h: Add userAgentWhenPretendingToBeMacIE field.
              * WebView.subproj/WebControllerPrivate.m:
              (-[WebControllerPrivate dealloc]): Release userAgentWhenPretendingToBeMacIE.
              (-[WebController _defaultsDidChange]): Release and nil userAgentWhenPretendingToBeMacIE.
      
              * Makefile.am: Added rules to build WebUserAgentSpoofTable.c using gperf.
              * WebView.subproj/WebUserAgentSpoofTable.c: Added. Generated file.
              * WebView.subproj/WebUserAgentSpoofTable.gperf: Added. Table
      
              * English.lproj/StringsNotToBeLocalized.txt: Update for above changes.
      
      	- fixed a crash I saw in a simplistic way
      
              * WebView.subproj/WebHTMLViewPrivate.m: (-[WebHTMLView _elementAtPoint:]):
      	Don't assert if the webFrame is nil, just return a partial dictionary.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3073 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cda39631