1. 12 Dec, 2002 7 commits
    • mjs's avatar
      JavaScriptCore: · 7884603b
      mjs authored
              Reviewed by Darin.
      
      	- fixed 3056449 - can't select state at tucows.com
      
              * kjs/array_instance.h:
              * kjs/array_object.cpp:
      	(ArrayInstanceImp::propList): Add numeric proprties that are in
      	special storage.
              * kjs/array_object.h:
              * kjs/object.h: Make propList a virtual method.
      
      WebCore:
      
              Reviewed by Darin.
      
              * force-js-clean-timestamp: Update for JavaScriptCore changes.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3018 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7884603b
    • darin's avatar
      WebCore: · 2da8a2a4
      darin authored
              Reviewed by Maciej.
      
      	- fixed 3125504 -- REGRESSION: Selection not working correctly for text area on http://glish.com/css/7.asp
      
              * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::khtmlMousePressEvent): Call makeFirstResponder here explicitly,
      	since we are disabling the makeFirstResponder that normally happens during window event dispatching
      	in WebKit.
      
              * kwq/KWQScrollView.h: Define getDocumentView().
              * kwq/KWQScrollView.mm: Use getDocumentView() everywhere.
              (QScrollView::getDocumentView): Define it here.
      
      WebKit:
      
              Reviewed by Maciej.
      
      	- fixed 3125504 -- REGRESSION: Selection not working correctly for text area on http://glish.com/css/7.asp
      
      	The problem is that the text area lost its first responder status because WebHTMLView took the click,
      	and NSWindow wanted WebHTMLView to become first responder too.
      
              * WebView.subproj/WebHTMLView.m: (-[WebHTMLView acceptsFirstResponder]):
      	Don't allow the NSWindow to make this the first responder during the early part of mouseDown event
      	handling. But do allow anyone else to make this the first responder, for example from keyboard events,
      	or from calls back from WebCore once we begin mouse-down event handling.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3017 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2da8a2a4
    • darin's avatar
      WebCore: · c9a8d22b
      darin authored
              Reviewed by Maciej and Richard.
      
      	- fixed 3125497 -- REGRESSION: Infinite recursion with mouseUp: events
      
      	The problem was that events could end up back at the same part due to the responder chain.
      
              * kwq/KWQKHTMLPart.h: Added mouseDown, mouseDragged, mouseUp, mouseMoved, buttonForCurrentEvent,
      	and stateForCurrentEvent. Remove setCurrentEvent and currentEvent. Renamed handleMouseDownEventForWidget
      	to passWidgetMouseDownEventToWidget. John and I had agreed to this name change before the last commit,
      	but I forgot.
      
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::KWQKHTMLPart): Initialize _sendingEventToSubview to false. No need to initialize
      	_mouseDownWasInSubframe at all since it's only looked at when _mouseDownView is non-nil.
              (KWQKHTMLPart::keyEvent): Save and restore _currentEvent instead of setting to nil.
      	Use stateForCurrentEvent instead of stateForEvent:.
              (KWQKHTMLPart::khtmlMousePressEvent): Name change.
              (KWQKHTMLPart::khtmlMouseDoubleClickEvent): Name change.
              (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Name change. Set _sendingEventToSubview when
              sending event to subview.
              (KWQKHTMLPart::khtmlMouseReleaseEvent): Name change. Set _sendingEventToSubview when sending
      	event to subview.
              (KWQKHTMLPart::passSubframeEventToSubframe): Name change. Set _sendingEventToSubview when
      	sending event to subview.
              (KWQKHTMLPart::buttonForCurrentEvent): Added. Similar to code I moved here from WebCoreBridge.
              (KWQKHTMLPart::stateForCurrentEvent): Added. Similar to code I moved here from WebCoreBridge.
              (KWQKHTMLPart::mouseDown): Added. Similar to code I moved here from WebCoreBridge, except returns
      	and does nothing if _sendingEventToSubview is set.
              (KWQKHTMLPart::mouseDragged): Ditto.
              (KWQKHTMLPart::mouseUp): Ditto.
              (KWQKHTMLPart::mouseMoved): Added. Similar to code I moved here from WebCoreBridge.
      
              * kwq/WebCoreBridge.mm:
              (-[WebCoreBridge mouseDown:]): Just call _part->mouseDown().
              (-[WebCoreBridge mouseDragged:]): Just call _part->mouseDragged().
              (-[WebCoreBridge mouseUp:]): Just call _part->mouseUp().
              (-[WebCoreBridge mouseMoved:]): Just call _part->mouseMoved().
      
              * kwq/WebCoreBridgePrivate.h: Removed.
              * WebCore.pbproj/project.pbxproj: Removed WebCoreBridgePrivate.h.
      
      WebKit:
      
              Reviewed by Maciej and Richard.
      
              - fixed reentrancy crash I ran into while debugging infinite recursion bugs
      
              * WebView.subproj/WebHTMLViewPrivate.m:
              (-[WebHTMLView _updateMouseoverWithFakeEvent]): Added. Does part of what _frameOrBoundsChanged did.
              (-[WebHTMLView _frameOrBoundsChanged]): Schedule the mouseover update to happen soon, rather than
              doing it right away. If we do it right away, we might reenter because sending a mouse moved event
              can result in another layout since mouse moved events are the same as mouse dragged events in KHTML.
              * WebView.subproj/WebHTMLView.m:
              (-[WebHTMLView viewWillMoveToWindow:]): Cancel the scheduled mouseover update.
      
              * WebKit.pbproj/project.pbxproj: Electron uber alles.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3016 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c9a8d22b
    • mjs's avatar
      Revert stuff I committed by mistake. · 13f7326c
      mjs authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3015 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      13f7326c
    • rjw's avatar
      · 9e6d6e83
      rjw authored
              Fixed 3125583.  Don't redraw view under resize bar
              on mouseup.
      
              Reviewed by gramps.
      
              * khtml/rendering/render_frames.cpp:
              (RenderFrameSet::userResize):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3014 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9e6d6e83
    • mjs's avatar
      Added missing reviewer. · ec2578ca
      mjs authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3013 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ec2578ca
    • rjw's avatar
      Fixed 3125585. One click crasher option clicking on · ca801f5a
      rjw authored
              any link.  Added additional check to curtail overly
              zealous ASSERT.
      
              Reviewed by mjs.
      
              * WebView.subproj/WebControllerPrivate.m:
              (-[WebController _mainReceivedError:fromDataSource:complete:]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3012 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ca801f5a
  2. 11 Dec, 2002 14 commits
    • hyatt's avatar
      Fix hang on monkeyvoodoo.net and on skramkoob.com. The bugs · c3731d43
      hyatt authored
      	are 3105714 and 3045965.  Also fix margin collapsing churn
      	on thestar by not laying out a second time when collapsing
      	margins make you move unless you contain floats.
      
              Reviewed by: gramps
      
              * khtml/rendering/bidi.cpp:
              (RenderFlow::findNextLineBreak):
      	* khtml/rendering/render_flow.cpp:
      	(RenderFlow::layoutBlockChildren);
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3011 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c3731d43
    • rjw's avatar
      Fixed 3125425. Just call super if view isn't in view heirarchy, · 08c8577e
      rjw authored
              rather than asserting.  The assert was firing because NSText
              was trying to perform a background layout on an item view that
              was moved to the page cache.
      
              Reviewed by gramps.
      
              * WebView.subproj/WebHTMLView.m:
              (-[WebHTMLView visibleRect]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3010 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      08c8577e
    • 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:
              (GlobalFuncImp::call):
              * kjs/function.h:
              * kjs/internal.cpp:
              (InterpreterImp::initGlobalObject):
              * kjs/interpreter.cpp:
              (Interpreter::evaluate):
              * kjs/nodes.cpp:
              (NewExprNode::evaluate):
              (FunctionCallNode::evaluate):
              (RelationalNode::evaluate):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3009 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9132b10b
    • rjw's avatar
      · f8849e1a
      rjw authored
      WebKit:
      
              Fixed 3124121, 3124716 (and other dupes).  Regressions related to b/f crash.
      
              Reviewed by hyatt.
      
              * ChangeLog:
              * History.subproj/WebHistoryItem.m:
              (-[WebHistoryItem _scheduleRelease]):
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge saveDocumentToPageCache:]):
              * WebCoreSupport.subproj/WebImageRenderer.m:
              (-[WebImageRenderer incrementalLoadWithBytes:length:complete:]):
              (-[WebImageRenderer drawClippedToValidInRect:fromRect:]):
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _setState:]):
      
      
      WebCore:
      
              Fixed 3124121, 3124716 (and other dupes).  Regressions related to b/f crash.
      
              Reviewed by hyatt.
      
              * kwq/KWQKHTMLPart.h:
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::openURLFromPageCache):
              * kwq/WebCoreBridge.h:
              * kwq/WebCoreBridge.mm:
              (-[WebCoreBridge dealloc]):
              (-[WebCoreBridge openURL:reload:headers:lastModified:pageCache:]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3008 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f8849e1a
    • rjw's avatar
      Fixed 3123375. Provide SPI to release all pending page caches · 7dd25690
      rjw authored
              Reviewed by kocienda.
      
              * History.subproj/WebBackForwardList.m:
              * History.subproj/WebHistoryItem.h:
              * History.subproj/WebHistoryItem.m:
              * History.subproj/WebHistoryItemPrivate.h: Added.
              * WebCoreSupport.subproj/WebBridge.m:
              * WebKit.pbproj/project.pbxproj:
              * WebView.subproj/WebFramePrivate.m:
      
              Fixed 3123375.  Call SPI to release all pending page caches
      
              Reviewed by kocienda.
      
              * Test/PageLoadTestController.m:
              (-[PageLoadTestController anyWindowWillClose:]):
              * Test/PageLoadTestRunner.m:
              (-[PageLoadTestRunner closeBrowserWindowsAndFinishCheckingForWorldLeaks]):
              (-[PageLoadTestRunner checkForWorldLeaksSoon]):
              (-[PageLoadTestRunner checkForWorldLeaksNow]):
              (-[PageLoadTestRunner startTest]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3007 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7dd25690
    • kocienda's avatar
      Reviewed by: Gramps · c41c79e6
      kocienda authored
      	Change name of cache size file from ".size" to "size"
      
              * Database.subproj/WebFileDatabase.m:
              * English.lproj/StringsNotToBeLocalized.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3005 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c41c79e6
    • darin's avatar
      WebFoundation: · 039a8a81
      darin authored
              Reviewed by Richard.
      
      	- fixed 3124837 -- Crash trying to handle weird javascript URL in page address field
      
              * Misc.subproj/WebNSURLExtras.h: Added _web_scriptIfJavaScriptURL for both NSURL and NSString,
      	and _web_stringByReplacingValidPercentEscapes.
              * Misc.subproj/WebNSURLExtras.m:
              (-[NSURL _web_scriptIfJavaScriptURL]): Added. Call the NSString version on our absoluteString.
              (isHexDigit): Added.
              (hexDigitValue): Added.
              (-[NSString _web_stringByReplacingValidPercentEscapes]): Added. Converts the sequences into
      	character, and then re-encodes as UTF-8. Added a FIXME about doing even better.
              (-[NSString _web_scriptIfJavaScriptURL]): Check for a javascript: prefix, then turn the suffix
      	into a script by replacing percent escapes.
      
              * English.lproj/StringsNotToBeLocalized.txt: Updated.
      
      WebCore:
      
              Reviewed by Richard.
      
      	- fixed 3124263 -- REGRESSION: Crash running development build of PLT
      
              * kwq/KWQWidget.mm:
              (QWidget::~QWidget): Don't worry about the outer view here, since we can never hit one of those.
      	Just pass the view to KWQKHTMLPart::widgetWillReleaseView.
              (QWidget::getOuterView): Re-add the assertion I had removed.
      
      	- fixed 3124837 -- Crash trying to handle weird javascript URL in page address field
      
              * kwq/KWQKURL.mm: (KURL::decode_string): Made this function return the URL still encoded
      	rather than a null string (actually, crashing) when CFURLCreateStringByReplacingPercentEscapes
      	rejects the passed-in string. Also updated the FIXME.
              (appendEscapingBadChars): Fixed problem with high-bit-set characters.
              * kwq/KWQString.mm: (QString::setBufferFromCFString): Made this tolerant of NULL.
      
      WebKit:
      
              Reviewed by Richard.
      
      	- fixed 3124837 -- Crash trying to handle weird javascript URL in page address field
      
              * Plugins.subproj/WebBaseNetscapePluginView.m:
              (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:]):
      	Use the new _web_scriptIfJavaScriptURL to simplify the check for JavaScript URLs,
      	and to use a more tolerant unescaper.
      
              * English.lproj/StringsNotToBeLocalized.txt: Updated.
      
      WebBrowser:
      
              Reviewed by Richard.
      
      	- fixed 3124837 -- Crash trying to handle weird javascript URL in page address field
      
              * BrowserWebBookmarkExtras.m: (-[WebBookmark _goToWithWindowPolicy:]):
              * BrowserWindowController.m: (-[BrowserWindowController goToToolbarLocation:]):
      	Use the new _web_scriptIfJavaScriptURL to simplify the check for JavaScript URLs,
      	and to use a more tolerant unescaper.
      
              * BrowserWebController.m: (-[BrowserWebController mouseoverTextForElement:modifierFlags:]):
      	Use _web_stringByReplacingValidPercentEscapes, since it is more tolerant than
      	CFURLCreateStringByReplacingPercentEscapes.
      
              * English.lproj/StringsNotToBeLocalized.txt: Updated.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3004 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      039a8a81
    • darin's avatar
      WebCore: · a9ca05fe
      darin authored
              Reviewed by John.
      
      	- fixed handling of mouse events so I could turn the mechanism on all the way
      	- fixed anomalies in the red-painting-for-null-view-detection
      	- fixed 3123105 -- REGRESSION: Crash in KHTMLView::unscheduleRelayout on exit
      	- fixed 3124047 -- REGRESSION: crash in KWQKHTMLPart::handleMouseDownEventForWidget at nwa.com
      
              * kwq/KWQKHTMLPart.h: Add setCurrentEvent()/currentEvent()/_currentEvent back, because we can
      	end up doing a lot of work and processing a lot of events before we get around to handling the
      	current event, so [NSApp currentEvent] won't cut it. Also add clearTimers, passSubframeEventToSubframe,
      	an overload for handleMouseDownEventForWidget, and _mouseDownWasInSubframe boolean.
      
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::submitForm): Use _currentEvent.
              (KWQKHTMLPart::urlSelected): Use _currentEvent.
              (KWQKHTMLPart::paint): Fixed red-drawing-for-debug code by using KWQPainter instead of going
      	directly to the AppKit level.
              (KWQKHTMLPart::keyEvent): Moved the check for null node up a bit, and set _currentEvent.
              (KWQKHTMLPart::handleMouseDownEventForWidget): Break into two pieces, so we can share the
      	code with the new passSubframeEventToSubframe. Set _mouseDownWasInSubframe to false
      	when setting _mouseDownView. Use getView() instead of getOuterView() since we really don't
      	care about the WebView after all. Use _currentEvent. Add a check for nodes that lack a renderer
      	to fix the crash at nwa.com above.
              (KWQKHTMLPart::khtmlMouseReleaseEvent): Use _currentEvent.
              (KWQKHTMLPart::clearTimers): Added. Checks for null view, which fixes the crash on exit above.
              (KWQKHTMLPart::passSubframeEventToSubframe): Added. Checks for the categories of events that we
      	can pass to subframes, which are mouse down, up, and dragged events, and passes them along.
      	This is the main fix that makes subframes work properly.
      
              * khtml/khtmlview.cpp:
              (KHTMLView::viewportMousePressEvent): Add call to the new passSubframeEventToSubframe.
              (KHTMLView::viewportMouseDoubleClickEvent): Ditto.
              (KHTMLView::viewportMouseMoveEvent): Ditto.
              (KHTMLView::viewportMouseReleaseEvent): Ditto.
      
              * kwq/WebCoreBridge.mm:
              (-[WebCoreBridge saveDocumentToPageCache]): Call clearTimers on the part now, instead of the document.
              (-[WebCoreBridge mouseUp:]): Call setCurrentEvent.
              (-[WebCoreBridge mouseDown:]): Ditto.
              (-[WebCoreBridge mouseMoved:]): Ditto.
              (-[WebCoreBridge mouseDragged:]): Ditto.
              (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:]): Call clearTimers on the
      	part now, instead of the document.
      
      	- other changes
      
              * khtml/ecma/kjs_window.lut.h: Let this be regenerated. I think I accidentally checked
      	in an obsolete version of this earlier.
      
              * khtml/html/html_documentimpl.h: Remove clearTimers(). We don't need it here in APPLE_CHANGES.
              * khtml/html/html_documentimpl.cpp: Ditto.
      
              * khtml/khtmlpart_p.h: Removed unneeded APPLE_CHANGES. We don't use m_frameNameId any more, nor
      	do we need m_savingPageState or m_restoringPageState.
              * khtml/khtml_part.cpp: (KHTMLPart::clear): Removed unneeded APPLE_CHANGES, now that we don't
      	use m_frameNameId any more.
      
              * kwq/KWQWidget.mm: (KWQWidget::getOuterView): Tolerate nil for view here, so we can use this from
              the QWidget destructor.
      
      WebKit:
      
              Reviewed by John.
      
      	- turned on the mechanism that passes events through WebCore, now that it's working better
      
              * WebView.subproj/WebHTMLViewPrivate.m:
              (-[WebHTMLView hitTest:]): Moved this function in here. Rewrote it. It has a new feature where
      	you can set a global and do a normal hit test, needed for the mouse-moved handling below. Also,
      	for efficiency, it does the actual hit testing of itself, rather than calling super, which recurses,
      	and ignoring the result. The sum total is that it always returns self for mouse-moved events, so
      	we pass them all over the bridge at the topmost frame.
      
              (-[WebHTMLView _updateMouseoverWithEvent:]):
              * WebView.subproj/WebHTMLView.m: Moved hitTest: out of here.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3003 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a9ca05fe
    • sullivan's avatar
      WebKit: · 4e8d846d
      sullivan authored
      	- fixed 3124640 -- Crash importing IE Favorites if there
      	are no IE favorites
      
              Reviewed by Darin
      
              * Bookmarks.subproj/WebBookmarkImporter.m:
              (-[WebBookmarkImporter initWithPath:]):
      	use alloc/init instead of autoreleasing constructor for error since
      	it's kept around until dealloc.
      
      WebBrowser:
      
      	- fixed 3123763 -- lose context when organizing bookmarks
      	- handled empty or non-existent IE Favorites case better
      
              Reviewed by Darin
      
              * BookmarksController.m:
              (-[BookmarksController importInternetExplorerFavorites]):
      	Don't add a folder for IE Favorites if there are none.
      
              * BookmarksViewController.m:
              (-[BookmarksViewController selectBookmarkSource:]):
      	new method to select an item in Collections column
              (-[BookmarksViewController revealFavorite:expandChildren:]):
      	call selectBookmarkSource
              (-[BookmarksViewController tableView:draggedImage:endedAt:operation:]):
      	save and restore selected item in Collections column since row indices might change
              (-[BookmarksViewController tableView:acceptDrop:row:operation:]):
      	save and restore selected item in Collections column since row indices might change
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3002 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4e8d846d
    • darin's avatar
      Reviewed by John. · 19bd5e70
      darin authored
      	- fixed 3117611 -- REGRESSION: exception in mouseoverTextForElement with accented characters in status
      
              * WebView.subproj/WebHTMLViewPrivate.m:
              (-[NSMutableDictionary _web_setObjectIfNotNil:forKey:]):
      	Remove the object from the dictionary rather than just leaving the dictionary alone if it's nil.
      	This is needed since we now are reusing an already-existing dictionary.
      
              * English.lproj/StringsNotToBeLocalized.txt: Update for recent changes.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3001 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      19bd5e70
    • cblu's avatar
      Fixed: 3118430 - crash / loop trying to copy url of link to clipboard · e57f106e
      cblu authored
      	Fixed: 3122585 - REGRESSION: dragging links to the desktop or a Finder window does not do anything
      
              Reviewed by john.
      
      	We were reusing the drag types from the previous drag pasteboard. For example, we would declare image types when dragging URLs. This would confuse the Finder, so location files weren't being created. This would occasional cause us to crash because we weren't providing the declared data.
      
              * Misc.subproj/WebNSPasteboardExtras.h:
              * Misc.subproj/WebNSPasteboardExtras.m:
              (+[NSPasteboard _web_dragTypesForURL]): Added more types that we handle
              (-[NSPasteboard _web_writeURL:andTitle:withOwner:declareTypes:]): declares the provided types, writes URL and title
              (-[NSPasteboard _web_writeURL:andTitle:withOwner:]): call _web_writeURL:andTitle:withOwner:types: with _web_dragTypesForURL
              * Misc.subproj/WebNSViewExtras.h:
              * Misc.subproj/WebNSViewExtras.m:
              (-[NSView _web_dragPromisedImage:origin:URL:fileType:title:event:]): call _web_writeURL:andTitle:withOwner: types: plus images types
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3000 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e57f106e
    • darin's avatar
      Rolled out changes I accidentally checked in last night. · e3a5634f
      darin authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2999 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e3a5634f
    • trey's avatar
      WebKit: · 94f4668f
      trey authored
      	3092966 - going back goes to different page (can't go back to a POST page)
      
      	We will rePOST data upon back/forward/refresh if our caches fail us.  The policy delegate
      	gets a crack at confirming this operation.  Latent bugs where the policy delegate was double
      	queried are fixed.  A bug in the b/f cursor when a page failed to load is fixed.
      
              Reviewed by Maciej.
      
              * English.lproj/StringsNotToBeLocalized.txt:  Usual suspects.
              * History.subproj/WebHistoryItem.h:  Add state for reposting forms.
              * History.subproj/WebHistoryItem.m:  Boilerplate changes for new state.
              (-[WebHistoryItem dealloc]):
              (-[WebHistoryItem setFormData:]):
              (-[WebHistoryItem setFormContentType:]):
              (-[WebHistoryItem formData]):
              (-[WebHistoryItem formContentType]):
              (-[WebHistoryItem description]):
              * WebView.subproj/WebController.m:
              (-[WebController _goToItem:withLoadType:]):  Tighten up an assert as I clarified an
      	assumption as I worked through this task.
              * WebView.subproj/WebControllerPolicyDelegate.h:  New WebNavigationType's for back/forward,
      	refresh, and repost.
              * WebView.subproj/WebFrame.m:
              (-[WebFrame loadRequest:]):  Eliminate extra copy of a request.
              (-[WebFrame reload]):  Eliminate extra copy of a request.  Setup triggeringAction properly
      	if we're about to rePOST.
              * WebView.subproj/WebFramePrivate.h:  Started moving some private methods into the .m file.
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _createItem]):  Save form state with history items.
              (-[WebFrame _isLoadComplete]):  Fix up b/f cursor on page error before commit succeeds.
              (-[WebFrame _loadItem:fromItem:withLoadType:]):  Set up request to rePOST if that's what the
      	HistoryItem demands.  Add call to _addExtraFieldsToRequest so we don't do a double
      	query of the policy delegate.  Pre-flight the form post vs. WF cache to setup triggering
      	action properly.
              (-[WebFrame _actionInformationForLoadType:isFormSubmission:event:originalURL:]):
      	New utility method to help build action dict.
              (-[WebFrame _continueAfterNavigationPolicy:]):  Comment only.
              (-[WebFrame _loadURL:loadType:triggeringEvent:isFormSubmission:]):  Call new utility method
      	instead (just code factoring).
              (-[WebFrame _postWithURL:data:contentType:triggeringEvent:]):  Call new utility method
      	instead (just code factoring).  Add call to _addExtraFieldsToRequest so we don't do a double
      	query of the policy delegate.
              (-[WebFrame _reloadAllowingStaleDataWithOverrideEncoding:]):  Whitespace only.
              (-[WebFrame _resetBackForwardListToCurrent]):  Utility routine to fix up b/f cursor on page error.
              (-[WebFrame _continueLoadRequestAfterNavigationPolicy:request:]):  Fix up b/f cursor on page
      	error before commit succeeds.
      
      WebBrowser:
      
      	3092966 - going back goes to different page (can't go back to a POST page)
      
      	The app now puts up a confirmation sheet when the user tries to return to a
      	page resulting from a POST, if all of our caches failed.
      
              Reviewed by Maciej.
      
              * BrowserWebController.m:
              (-[BrowserWebController confirmSendSheetDidEnd:returnCode:contextInfo:]):  Changed name of
      	existing routine to be more generic, as its used for two sheets.
              (-[BrowserWebController decideNavigationPolicyForAction:andRequest:inFrame:decisionListener:]):
      	Put up the sheet if we're about to rePOST.
              * English.lproj/Localizable.strings:  The usual.
              * English.lproj/StringsNotToBeLocalized.txt:  The usual.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2998 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      94f4668f
    • darin's avatar
      Reviewed by Maciej. · dfe0f89f
      darin authored
      	- fixed 3124302 -- REGRESSION: Can't use directory.apple.com because
      	frame resize bar intercepts mouse clicks
      
              * WebView.subproj/WebHTMLView.m: (-[WebHTMLView hitTest:]):
      	Don't steal clicks for views that are inside nested WebViews.
              This isn't the real fix, but it's good enough for now. The real fix will be in WebCore.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2997 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dfe0f89f
  3. 10 Dec, 2002 10 commits
    • darin's avatar
      - fixed fix for 3124081 -- REGRESSION: partial progress is left in address field after download · 5694c4dd
      darin authored
              Reviewed by Chris.
      
      	Need to move it down one line so the data source is clear before callback.
      
              * WebView.subproj/WebMainResourceClient.m:
              (-[WebMainResourceClient interruptForPolicyChangeAndKeepLoading:]):
      	Do the _clearProvisionalDataSource before the locationChangeDone: callback.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2996 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5694c4dd
    • 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:
      	EMBED_HOST="${SYMROOTS}/Safari.app"
      
              * 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";
      
      JavaScriptCore:
      
      	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"
      
      WebFoundation:
      
      	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"
      
      WebCore:
      
      	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"
      
      WebKit:
      
      	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"
      
      WebBrowser:
      
      	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:
      	app_name
      
              * embed-frameworks.sh:
      	app_name
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2995 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0e8b5efe
    • darin's avatar
      - fixed 3124081 -- REGRESSION: partial progress is left in address field after download · 4d7baba1
      darin authored
              Reviewed by Chris.
      
              * WebView.subproj/WebMainResourceClient.m:
              (-[WebMainResourceClient interruptForPolicyChangeAndKeepLoading:]):
      	Put in code to call the locationChangeDone: method on the location change delegate if
      	keepLoading is YES. Since the data source is not finished loading WebFrame won't do it.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2994 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4d7baba1
    • cblu's avatar
      Fixed: 3124079 - REGRESSION: Downloads never complete · b26ce3ec
      cblu authored
              Reviewed by darin.
      
              * WebView.subproj/WebMainResourceClient.m:
              (-[WebMainResourceClient handleDidFinishLoading:]): release and set to nil the download handler after calling [super handleDidFinishLoading:h]
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2993 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b26ce3ec
    • mjs's avatar
      Reviewed by Don. · c192d2d2
      mjs authored
      	- really fixed 3123727 - SJ: Viewmaster arm sometimes doesn't animate on
      	http://www.pixar.com/howwedoit/
      
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::KWQKHTMLPart): Call Cache::init before
      	KHTMLPart::init so we have a loader to connect the signals to.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2992 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c192d2d2
    • rjw's avatar
      Fixed 3115427. Page now draws instantly instead of 20 seconds. · 90d0b661
      rjw authored
              I added the substitution font we get from the appkit to the character to glyph
              cache.
      
              Fixed early return optimization from letter forming function.  It was too
              eager to return!
      
              Reviewed by mjs.
      
              * Misc.subproj/WebUnicode.m:
              (shapedString):
              * WebCoreSupport.subproj/WebTextRenderer.h:
              * WebCoreSupport.subproj/WebTextRenderer.m:
              (glyphForCharacter):
              (glyphForUnicodeCharacter):
              (widthForGlyph):
              (widthForCharacter):
              (_fontContainsString):
              (-[WebTextRenderer substituteFontForString:families:]):
              (-[WebTextRenderer _computeWidthForSpace]):
              (-[WebTextRenderer _floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:withPadding:applyRounding:attemptFontSubstitution:widths:fonts:glyphs:numGlyphs:letterSpacing:wordSpacing:fontFamilies:]):
              (-[WebTextRenderer extendUnicodeCharacterToGlyphMapToInclude:]):
              (-[WebTextRenderer updateGlyphEntryForCharacter:glyphID:font:]):
              (-[WebTextRenderer extendCharacterToGlyphMapToInclude:]):
              (-[WebTextRenderer extendGlyphToWidthMapToInclude:]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2991 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      90d0b661
    • mjs's avatar
      Reviewed by Trey. · 9402c8fd
      mjs authored
      	- fixed 3123727 - SJ: Viewmaster arm sometimes doesn't animate on
      	http://www.pixar.com/howwedoit/
      
              * khtml/khtml_part.cpp:
              (KHTMLPart::KHTMLPart): Don't call KHTMLPart::init at all...
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::KWQKHTMLPart): Call it here instead so that signal
      	connections happen properly.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2990 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9402c8fd
    • sullivan's avatar
      WebKit: · 4e31aef1
      sullivan authored
      	- tweaked the API of WebBookmarkImporter while implementing
      	real "Import IE Favorites" UI
      
              Reviewed by Ken
      
              * Bookmarks.subproj/WebBookmarkImporter.h:
      	fixed a typo in a constant
              * Bookmarks.subproj/WebBookmarkImporter.m:
              (-[WebBookmarkImporter initWithPath:]):
      	Don't pass a group here. This method now creates the topBookmark
      	(as it was doing before) but does not attempt to insert it
      	anywhere. It's up to the client to fetch the topBookmark and do
      	something with it. Also, don't name the new folder here; leave
      	that to the caller also.
      
              * English.lproj/Localizable.strings:
      	kept this file up to date
      
      WebBrowser:
      
      	- fixed 3123342 -- Import IE bookmarks at first startup
      	- fixed 3122497 -- Descenders cut off in bookmarks view
      	- removed "Google Search" from View menu since it's not
      	working yet and we're hoping to get by without it using
      	a direct manipulation approach instead
      
              Reviewed by Ken
      
              * BookmarksController.m:
              (-[BookmarksController importInternetExplorerFavorites]):
      	new method, moved here from DebugUtilities and tweaked to match
      	changes in WebBookmarkImporter's API
              (-[BookmarksController importInternetExplorerFavoritesIfNecessary]):
      	new method, checks NSUserDefaults value to bail out if importing has already
      	occurred, and sets NSUserDefaults value after importing.
              (-[BookmarksController awakeFromNib]):
      	call importInternetExplorerFavoritesIfNecessary
      
              * Debug/DebugUtilities.m:
              (-[DebugUtilities createDebugMenu]):
      	remove IE importing stuff from here
      
              * English.lproj/Localizable.strings:
      	kept this file up to date
      
              * English.lproj/MainMenu.nib:
      	removed "Google Search" menu item from View menu
      
              * PreferenceKeys.h:
      	added preference key to remember whether we've imported
      	IE favorites
      
              * TextCell.m:
              (-[TextCell drawInteriorWithFrame:inView:]):
      	Rather than insetting frame to make text appear vertically
      	centered, just move down the top edge. This fixes 3122497.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2989 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4e31aef1
    • hyatt's avatar
      Fix for 3116996. My hack to make selects ignore fixed CSS · a551c783
      hyatt authored
      	widths that are smaller than their intrinsic width was not
      	good.  Remove the hack.
      
              Reviewed by darin
      
              * khtml/rendering/render_box.cpp:
              (RenderBox::calcReplacedWidth):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2988 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a551c783
    • darin's avatar
      WebCore: · 9c03760c
      darin authored
              Reviewed by John.
      
      	- fixed 3108912 -- onclick handlers not supported on form elements
      
      	We now pass the events back to the NSView here in WebCore; they pass through all the
      	machinery in the DOM before getting sent on.
      
              * kwq/KWQKHTMLPart.h: Add widgetWillReleaseView and handleMouseDownEventForWidget functions,
      	overrides for khtmlMousePressEvent, khtmlMouseDoubleClickEvent, khtmlMouseReleaseEvent, and
      	a new _mouseDownView field.
      
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::KWQKHTMLPart): Initialize _mouseDownView to nil.
              (KWQKHTMLPart::khtmlMousePressEvent): Call handleMouseDownEventForWidget, but if it returns
      	false call through to the base class function.
              (KWQKHTMLPart::khtmlMouseDoubleClickEvent): Ditto.
              (KWQKHTMLPart::handleMouseDownEventForWidget): Do a hit test to find out which view to send
      	the mouse down event to, and then send it.
              (KWQKHTMLPart::khtmlMouseReleaseEvent): Send the mouse up event to the view we sent a mouse
      	down event to, or call through to the base class otherwise.
              (KWQKHTMLPart::widgetWillReleaseView): Clear out the _mouseDownView field if the view is
      	being released by the QWidget that owns it.
      
              * kwq/KWQWidget.mm:
              (QWidget::~QWidget): Call KWQKHTMLPart::widgetWillReleaseView.
              (QWidget::setView): Call KWQKHTMLPart::widgetWillReleaseView on the old view.
      
      WebKit:
      
              Reviewed by John.
      
      	- fixed 3108912 -- onclick handlers not supported on form elements
      
              * WebView.subproj/WebHTMLView.m: (-[WebHTMLView hitTest:]):
      	Take over hit testing so that all clicks on subviews are handled by the WebHTMLView.
      	WebCore now handles getting the mouse events to the subviews after passing
      	the events through the DOM.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2987 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9c03760c
  4. 09 Dec, 2002 9 commits
    • mjs's avatar
      Reviewed by Trey. · 102b38ae
      mjs authored
      	- fixed 3123057 - SJ: DHTML doesn't always work on http://www.pixar.com/howwedoit/
      
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _loadURL:loadType:triggeringEvent:isFormSubmission:]):
      	Treat a click on a link to the same URL with an anchor as a scroll
      	to anchor, not a same URL load.
              (-[WebFrame _continueFragmentScrollAfterNavigationPolicy:request:]): Avoid
      	adding the same anchor URL to the back/forward list many times.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      102b38ae
    • 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.
      
      JavaScriptCore:
      
              Reviewed by Maciej.
      
              * JavaScriptCore.pbproj/project.pbxproj: Bump versions to 0.8 and 35u.
      	* English.lproj/InfoPlist.strings: In here too.
      
      WebFoundation:
      
              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.
      
      WebCore:
      
              Reviewed by Maciej.
      
              * WebCore.pbproj/project.pbxproj: Bump versions to 0.8 and 35u.
      
      WebKit:
      
              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.
      
      WebBrowser:
      
              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
      030cad4c
    • mjs's avatar
      Reviewed by Dave. · 2222d328
      mjs authored
      	- fixed 3117734 - fail at document.releaseEvents in js at rollingstone.com
      
              * khtml/ecma/kjs_html.cpp:
      	(KJS::HTMLDocFunction::tryCall): Added no-op implementations of
      	captureEvents and releaseEvents.
              (KJS::HTMLDocument::tryGet):
              * khtml/ecma/kjs_html.h:
              * khtml/ecma/kjs_window.cpp:
              (Window::get, WindowFunc::tryCall): Added no-op implementation of
      	releaseEvents.
      	* khtml/ecma/kjs_window.h:
              * khtml/ecma/kjs_html.lut.h: Regenerated.
              * khtml/ecma/kjs_window.lut.h: Regenerated.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2984 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2222d328
    • hyatt's avatar
      Fix for the CSS test suite link. Need to make sure inlines · 328bb2dc
      hyatt authored
      	that are obscured by blocks are properly considered to be
      	above the block background.
      
              Reviewed by LUCKY WINNER
      
              * khtml/rendering/render_object.cpp:
              (RenderObject::nodeAtPoint):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      328bb2dc
    • darin's avatar
      Reviewed by Trey. · b45dd6a2
      darin authored
      	- made KWQKHTMLPart a subclass of KHTMLPart so we can override virtual functions
      
              * khtml/khtml_part.h: Get rid of kwq pointer.
              * khtml/khtml_part.cpp:
              (KHTMLPart::init): No need to make a KWQKHTMLPart any more.
              (KHTMLPart::~KHTMLPart): No need to delete a KWQKHTMLPart any more.
              (KHTMLPart::closeURL): KWQKHTMLPart does saveDocumentState in an override now.
              (KHTMLPart::begin): KWQ() instead of ->kwq.
              (KHTMLPart::checkCompleted): KWQ() instead of ->kwq, and ifdef out some unneeded code.
              (KHTMLPart::urlSelected): KWQ() instead of ->kwq.
              (KHTMLPart::requestFrameName): KWQ() instead of ->kwq.
              (KHTMLPart::processObjectRequest): Just call openURL, since we are now KWQKHTMLPart.
              (KHTMLPart::submitForm): KWQ() instead of ->kwq.
              (KHTMLPart::popupMenu): Did a bit more ifdef'int out here.
      
              * kwq/KWQKHTMLPart.h: Include "khtml_part.h" and remove includes we don't need any more.
      	Inherit from KHTMLPart instead of QObject. Remove KHTMLPart parameter from constructor.
      	Override openURL and closeURL. Remove part and d pointers. Add KWQ() inline to avoid casting.
              * kwq/KWQKHTMLPart.mm:
              (KHTMLPart::completed): KWQ() instead of ->kwq.
              (KHTMLPart::openURL): Never reached now, since we override.
              (KHTMLPart::setStatusBarText): KWQ() instead of ->kwq.
              (KHTMLPart::started): KWQ() instead of ->kwq.
              (KWQKHTMLPart::KWQKHTMLPart): No need to deal with separate part.
              (KWQKHTMLPart::bridgeForFrameName): KWQ() instead of ->kwq.
              (KWQKHTMLPart::openURL): Add bool return value so we can override the existing openURL.
              (KWQKHTMLPart::slotData): Remove unneeded part->.
              (KWQKHTMLPart::setView): Remove unneeded part->.
              (KWQKHTMLPart::document): Remove unneeded part->.
              (KWQKHTMLPart::renderer): Remove unneeded part->.
              (KWQKHTMLPart::userAgent): Remove unneeded part->.
              (KWQKHTMLPart::nextKeyViewInFrame): KWQ() instead of ->kwq.
              (KWQKHTMLPart::nextKeyViewInFrameHierarchy): KWQ() instead of ->kwq.
              (KWQKHTMLPart::canCachePage): Remove unneeded part->.
              (KWQKHTMLPart::saveWindowProperties): Use this instead of part.
              (KWQKHTMLPart::saveLocationProperties): Use this instead of part.
              (KWQKHTMLPart::restoreWindowProperties): Use this instead of part.
              (KWQKHTMLPart::restoreLocationProperties): Use this instead of part.
              (KWQKHTMLPart::openURLFromPageCache): Remove unneeded part->.
              (KWQKHTMLPart::partForNode): KWQ() instead of ->kwq.
              (KWQKHTMLPart::updatePolicyBaseURL): Remove unneeded part->.
              (KWQKHTMLPart::setPolicyBaseURL): Remove unneeded part->.
              (KWQKHTMLPart::createDummyDocument): Use this instead of part.
              (KWQKHTMLPart::scrollToAnchor): Remove unneeded part->.
              (KWQKHTMLPart::closeURL): Added. Calls saveDocumentState().
      
              * kwq/WebCoreBridge.h: Use KWQKHTMLPart instead of KHTMLPart.
              * kwq/WebCoreBridge.mm: (-[WebCoreBridge init]): Make a KWQKHTMLPart.
      	Use _part instead of _part->kwq in the rest of the file.
      
              * kwq/KWQSignal.mm: (KWQSignal::disconnect): Add the names of a few signals that are
      	disconnected after the KWQKHTMLPart part of the KHTMLPart is destroyed, to avoid noise.
      
              * khtml/ecma/kjs_navigator.cpp: (Navigator::getValueProperty): KWQ() instead of ->kwq.
              * khtml/ecma/kjs_proxy.cpp: (KJSProxyImpl::initScript): KWQ() instead of ->kwq.
              * khtml/ecma/kjs_window.cpp:
              (Window::scheduleClose): KWQ() instead of ->kwq.
              (WindowFunc::tryCall): KWQ() instead of ->kwq.
              * khtml/xml/dom_docimpl.cpp: (DocumentImpl::setTitle): KWQ() instead of ->kwq.
              * kwq/KWQKHTMLPartBrowserExtension.mm:
              (KHTMLPartBrowserExtension::openURLRequest): KWQ() instead of ->kwq.
              (KHTMLPartBrowserExtension::createNewWindow): KWQ() instead of ->kwq.
              (KHTMLPartBrowserExtension::setIconURL): KWQ() instead of ->kwq.
              (KHTMLPartBrowserExtension::setTypedIconURL): KWQ() instead of ->kwq.
              * kwq/KWQKJavaAppletWidget.mm: (KJavaAppletWidget::showApplet): KWQ() instead of ->kwq.
              * kwq/KWQLoader.mm:
              (KWQServeRequest): Cast to KWQKHTMLPart instead of casting to KHTMLPart and doing ->kwq.
              (KWQCheckIfReloading): Ditto.
              (KWQCheckCacheObjectStatus): Ditto.
      
              * WebCore.pbproj/project.pbxproj: Let Electron punish the wicked.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2982 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b45dd6a2
    • rjw's avatar
      Many changes for b/f list. · 763b3866
      rjw authored
              1.  Always attempt to cache snap back items.
              2.  Lazily release resources from page cache.  This garners gains on the PLT (and presumably iBench) tests, both for uncached.
              3.  Set the page cache size to 4 (+ snap back items).  After releasing resources we hover around 28MB footprint.  Closing windows releases all resources.
              4.  Turn on the back/forward cache by default.  The menu item still allows you to toggle b/f on and off.  Useful when conducting speed comparison in the PLT.
              5.  Addition of lazy update to PLT memory statistics to show footprint after lazy release of page cache resources.
              6.  Delayed to leak detector to account for lazy release of resources.
              7.  A change when saving a page to back/forward cache to clear and restore the documents root renderer.  Without this fix pages would appear to 'flicker' more when content arrived.
              8.  A change to ensure a layout when restoring a page from the b/f cache.  Without this fix scrollbars wouldn't appear correctly.
              9.  A change to ensure that khtmlview layout and paint timers are unscheduled when a page is placed in the b/f cache.
              10.  A fix to decouple of khtmlview from it's part when placed in the b/f cache.  This fixed a crash caused by inappropriate deference of the part when a page cache item was released.
              11.  A comment in KHTMLPageCache.h explaining the that our page cache is not the same as the khtml page cache.  (Their cache just cached the html source.)
              12.  Reapply styles when loading page from cache.  This ensures that visited link get the appropriate style.
      
              Reviewed by kocienda.
      
              * History.subproj/WebBackForwardList.m:
              (+[WebBackForwardList pageCacheSize]):
              (+[WebBackForwardList setUsesPageCache:]):
              (+[WebBackForwardList usesPageCache]):
              * History.subproj/WebHistoryItem.h:
              * History.subproj/WebHistoryItem.m:
              (-[WebHistoryItem setAlwaysAttemptToUsePageCache:]):
              (-[WebHistoryItem alwaysAttemptToUsePageCache]):
              (+[WebHistoryItem _invalidateReleaseTimer]):
              (-[WebHistoryItem _scheduleRelease]):
              (+[WebHistoryItem _releaseAllPendingPageCaches]):
              (-[WebHistoryItem _releasePageCache:]):
              (-[WebHistoryItem setHasPageCache:]):
              (-[WebWindowWatcher windowWillClose:]):
              * WebView.subproj/WebDataSourcePrivate.h:
              * WebView.subproj/WebDataSourcePrivate.m:
              (-[WebDataSource _startLoading:]):
              (-[WebDataSource _commitIfReady:]):
              (-[WebDataSource _loadingFromPageCache]):
              * WebView.subproj/WebDynamicScrollBarsView.h:
              * WebView.subproj/WebFramePrivate.h:
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _purgePageCache]):
              (+[WebFrame _timeOfLastCompletedLoad]):
              (-[WebFrame _setState:]):
              (-[WebFrame _opened]):
              (-[WebFrame _continueLoadRequestAfterNavigationPolicy:request:]):
              * WebView.subproj/WebPreferences.m:
              (+[WebPreferences load]):
      
      WebCore
              Reviewed by kocienda.
      
              * khtml/html/html_documentimpl.cpp:
              (HTMLDocumentImpl::clearTimers):
              * khtml/html/html_documentimpl.h:
              * khtml/khtmlview.cpp:
              (KHTMLView::clearPart):
              (KHTMLView::timerEvent):
              * khtml/khtmlview.h:
              * khtml/xml/dom_docimpl.cpp:
              (DocumentImpl::restoreRenderer):
              (DocumentImpl::detach):
              * khtml/xml/dom_docimpl.h:
              * kwq/KWQKHTMLPageCache.h:
              * kwq/WebCoreBridge.mm:
              (-[WebCoreBridge openURL:reload:headers:lastModified:pageCache:]):
              (-[WebCoreBridge saveDocumentToPageCache]):
              (-[KWQPageState initWithDocument:DOM::URL:windowProperties:KJS::locationProperties:KJS::]):
              (-[KWQPageState dealloc]):
              (-[KWQPageState KJS::]):
              (-[KWQPageState khtml::]):
      
      WebBrowser
              Make the memory check fire again after a delay.
              This will show the high water mark first, and then
              the footprint after the lazy release of resource has completed.
      
              Reviewed by kocienda.
      
              * BrowserDocument.m:
              (-[BrowserDocument setSearchResultsForSnapBack:]):
              (-[BrowserDocument setPageForSnapBack:]):
              * Debug/DebugUtilities.m:
              (-[DebugUtilities createDebugMenu]):
              * Test/PageLoadTestController.m:
              (-[PageLoadTestController testFinishedNotification:]):
              * Test/PageLoadTestRunner.m:
              (-[PageLoadTestRunner checkForWorldLeaks]):
              (-[PageLoadTestRunner checkForWorldLeaksNow]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      763b3866
    • darin's avatar
      Oops. · 11147cbf
      darin authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2980 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      11147cbf
    • darin's avatar
      Reviewed by Chris. · 83523a59
      darin authored
      	- fixed 3122608 -- REGRESSION: Downloads can't be cancelled
      
      	When I fixed the leak for other categories of policy interruption, I messed
      	things up for downloads. Added new parameters to handle this right.
      
              * WebView.subproj/WebBaseResourceHandleDelegate.h: Remove isDownload flag.
              * WebView.subproj/WebBaseResourceHandleDelegate.m:
              (-[WebBaseResourceHandleDelegate isDownload]): Return NO, override in subclass.
              (-[WebBaseResourceHandleDelegate handle:didReceiveResponse:]): Call isDownload
      	method instead of looking at flag directly.
      
              * WebView.subproj/WebControllerPrivate.h: Add complete: parameter to _mainReceivedError:.
              * WebView.subproj/WebControllerPrivate.m:
              (-[WebController _mainReceivedError:fromDataSource:complete:]): If complete is NO, then
      	don't mark the primary load as complete.
              * WebView.subproj/WebMainResourceClient.m:
              (-[WebMainResourceClient isDownload]): Added. Returns YES if downloadHandler is non-nil.
              (-[WebMainResourceClient receivedError:complete:]): Added complete parameter. Call the
      	_setPrimaryLoadComplete: method in the download case (fixes a possible leak), and pass
      	the complete parameter through to the controller.
              (-[WebMainResourceClient cancel]): Pass complete:YES.
              (-[WebMainResourceClient interruptForPolicyChangeAndKeepLoading:]): Added the keepLoading
      	flag, and pass complete:!keepLoading.
              (-[WebMainResourceClient stopLoadingForPolicyChange]): Pass keepLoading:NO.
              (-[WebMainResourceClient continueAfterContentPolicy:response:]): Pass keepLoading:YES,
      	and remove the call to the now-obsolete setIsDownload:.
              (-[WebMainResourceClient handle:didFailLoadingWithError:]): Pass complete:YES.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2979 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      83523a59
    • darin's avatar
      Reviewed by Chris. · caa79c01
      darin authored
      	- fixed 3122608 -- Downloads can't be cancelled
      
      	When I fixed the leak for other categories of policy interruption, I messed
      	things up for downloads. Added new parameters to handle this right.
      
              * WebView.subproj/WebBaseResourceHandleDelegate.h: Remove isDownload flag.
              * WebView.subproj/WebBaseResourceHandleDelegate.m:
              (-[WebBaseResourceHandleDelegate isDownload]): Return NO, override in subclass.
              (-[WebBaseResourceHandleDelegate handle:didReceiveResponse:]): Call isDownload
      	method instead of looking at flag directly.
      
              * WebView.subproj/WebControllerPrivate.h: Add complete: parameter to _mainReceivedError:.
              * WebView.subproj/WebControllerPrivate.m:
              (-[WebController _mainReceivedError:fromDataSource:complete:]): If complete is NO, then
      	don't mark the primary load as complete.
              * WebView.subproj/WebMainResourceClient.m:
              (-[WebMainResourceClient isDownload]): Added. Returns YES if downloadHandler is non-nil.
              (-[WebMainResourceClient receivedError:complete:]): Added complete parameter. Call the
      	_setPrimaryLoadComplete: method in the download case (fixes a possible leak), and pass
      	the complete parameter through to the controller.
              (-[WebMainResourceClient cancel]): Pass complete:YES.
              (-[WebMainResourceClient interruptForPolicyChangeAndKeepLoading:]): Added the keepLoading
      	flag, and pass complete:!keepLoading.
              (-[WebMainResourceClient stopLoadingForPolicyChange]): Pass keepLoading:NO.
              (-[WebMainResourceClient continueAfterContentPolicy:response:]): Pass keepLoading:YES,
      	and remove the call to the now-obsolete setIsDownload:.
              (-[WebMainResourceClient handle:didFailLoadingWithError:]): Pass complete:YES.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      caa79c01