1. 17 Jan, 2003 2 commits
  2. 15 Jan, 2003 1 commit
    • trey's avatar
      3144458 - user's credentials are present in a form that is revisited via b/f or history · 2c65ac11
      trey authored
      	We now never save/restore password fields.  Also if the page has a form with a password
      	field that would be submitted securely, we do not save anything on that page.
              Reviewed by Darin.
              * force-clean-timestamp:  PB isn't smart enough to know what to rebuild.
              * khtml/html/html_formimpl.cpp:
              (HTMLFormElementImpl::formWouldHaveSecureSubmission):  Utility function.
              (HTMLFormElementImpl::attach):  Tell doc if we've added a secure form.
              (HTMLFormElementImpl::parseAttribute):  Tell doc if form became secure.
              (HTMLInputElementImpl::state):  Assert that we never save password fields.
              (HTMLInputElementImpl::restoreState):  Assert that we never restore password fields.
              (HTMLInputElementImpl::attach):  Tell doc if we've added a password field.
              * khtml/html/html_formimpl.h:
              * khtml/xml/dom_docimpl.cpp:
              (DocumentImpl::DocumentImpl):  Init count of secure forms, password fields.
              (DocumentImpl::hasPasswordField):  New methods to count password fields.
              (DocumentImpl::hasSecureForm):  New methods to count secure forms.
              * khtml/xml/dom_docimpl.h:
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::canCachePage):   Never let pages with password fields in the page cache.
              (KWQKHTMLPart::saveDocumentState):  Do not save form state if page has a form with
      	a password field that would be submitted securely
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3328 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  3. 13 Jan, 2003 1 commit
    • darin's avatar
      Reviewed by Ken. · 908cf2a7
      darin authored
      	- fixed 3143781 -- submitting the same form twice doesn't work properly
      	(example at directory.apple.com)
              * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::submitForm): Only run the "don't submit the same
      	form twice" logic when the form is one that affects the frame that the form is in.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  4. 12 Jan, 2003 1 commit
    • darin's avatar
      Reviewed by Dave. · d8d3bd9d
      darin authored
      	- minor cleanup of plug-in-related classes in ECMA directory
              * khtml/ecma/kjs_navigator.cpp: Remove unneeded PluginBase member functions
      	ref() and deref(). Instead just make Plugin and MimeType both derive from
      	PluginBase and remove APPLE_CHANGES.
              (Navigator::getValueProperty): Don't use "Konqueror" for the fallback.
      	Just return Undefined() for that case since we will never reach it anyway.
      	- simplify the logic in khtmlMoveMouseEvent so it's easier to decipher
              * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::khtmlMouseMoveEvent): By merging two
      	identical if statements, the logic of this function becomes much clearer.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3305 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  5. 08 Jan, 2003 1 commit
    • cblu's avatar
      WebCore: · 0ce577a1
      cblu authored
      	Fixed: 3111432 - Support OBJECT tags with type text/plain or text/html
              Reviewed by dave.
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::createPart): call [_bridge frameRequiredForMIMEType:] to determine if we should create a plug-in view or iframe
              * kwq/WebCoreBridge.h: add frameRequiredForMIMEType:
      	Fixed: 3111432 - Support OBJECT tags with type text/plain or text/html
              Reviewed by dave.
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge frameRequiredForMIMEType:]): added, returns YES for non-plug-in views
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3279 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  6. 01 Jan, 2003 1 commit
    • 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
              (KWQKHTMLPart::khtmlMouseMoveEvent): On a drag or selection, call
      	back to the bridge to handle selection or autoscrolling
      	* kwq/WebCoreBridge.h: Prototype new methods.
      	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
  7. 29 Dec, 2002 1 commit
  8. 28 Dec, 2002 1 commit
    • kocienda's avatar
      WebCore: · 11bb1581
      kocienda authored
              Reviewed by Gramps and Richard.
      	Fix for this bug:
      	Radar 3112233 (400 response when attaching files at mail.yahoo.com)
      	KHTML multipart form code called into KMimeType class to determine
      	the mime type for file attachments, however, our implementation of
      	KMimeType has only stubs which call ERROR.
      	I added some code into KWQKHTMLPart and WebCoreBridge so that the
      	code in html_formimpl can call through to the WebFoundation mime
      	file map we maintain.
              * khtml/html/html_formimpl.cpp:
              * kwq/KWQKHTMLPart.h:
              * kwq/KWQKHTMLPart.mm:
              * kwq/WebCoreBridge.h:
               Reviewed by Gramps and Richard
               Fix for this bug:
               Radar 3112233 (400 response when attaching files at mail.yahoo.com)
               I added the MIMETypeForPath method which accesses the WebFoundation mime
               file map we maintain. KHTML can now access this map by using the bridge.
               * WebCoreSupport.subproj/WebBridge.m:
               (-[WebBridge MIMETypeForPath:])
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3195 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  9. 23 Dec, 2002 1 commit
    • darin's avatar
      Reviewed by NOBODY (OOPS!). · 34039077
      darin authored
      	- fixed 3134558 -- REGRESSION: Lord of the Rings site problems
      	This regression was caused when we fixed the abcnews.com problem (3124933).
              * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::createEmptyDocument):
      	Despite its name, this function was never intended to overwrite an existing document with
      	an empty document. When we changed it do do the creation in a better way, we lost the
      	check that prevents it from doing anything at all if we already have a document.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  10. 22 Dec, 2002 1 commit
  11. 20 Dec, 2002 2 commits
    • kocienda's avatar
      Reviewed by Darin · 51317c14
      kocienda authored
      	Fix for this bug:
      	Radar 3132171 (trying to login at mypage.apple.com gives "Already Connected" message)
      	The issue is that we submit the login form more than once when the user hits
      	the return key to submit rather than clicking the submit button. We are also
      	susceptible to double form submissions from buggy scripts that ask to submit
      	more than one form.
      	The fix is to prevent the KWQKHTMLPart from submitting more than one form by
      	setting and checking a flag.
              * kwq/KWQKHTMLPart.h: Add a form submit flag.
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::submitForm): Check form submit flag. Return if a form
      	has already been submitted.
              (KWQKHTMLPart::setView): Reset form flag. This is done since the part
      	may have been retrieved for reuse from the bac/forward cache.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3153 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      Reviewed by John. · 6acf1805
      darin authored
      	- fixed 3129824 -- crash in QWidget::getView in KWQKHTMLPart::passSubframeEventToSubframe
              * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::passWidgetMouseDownEventToWidget):
      	Check for a nil QWidget in a RenderWidget, and ERROR and return true in that case.
      	We don't want to return false because otherwise the KHTML code will try to draw a frame splitter.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3150 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  12. 19 Dec, 2002 1 commit
    • darin's avatar
      Reviewed by John. · 8ed959e6
      darin authored
      	A number of non-reproducible bugs look like they may be due to bad
      	event objects. I was assuming that callers retained the events until
      	the functions handling them returned, but that assumption may be wrong.
      	So I'm retaining/releasing the current event. This is correct in any case.
      	I'm also adding a new assertion, but since assertions are in Development
      	builds only that is very low risk.
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::keyEvent): Add retain/release and a new assertion.
              (KWQKHTMLPart::mouseDown): Ditto.
              (KWQKHTMLPart::mouseDragged): Ditto.
              (KWQKHTMLPart::mouseUp): Ditto.
              (KWQKHTMLPart::mouseMoved): Ditto.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3142 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  13. 18 Dec, 2002 2 commits
    • 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:
      	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
    • 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.
              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
      	(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
              * 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.
              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.
      	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
              (-[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
  14. 16 Dec, 2002 1 commit
  15. 15 Dec, 2002 3 commits
    • darin's avatar
      Reviewed by Trey. · 2e80479f
      darin authored
      	- fixed regression where clicked-on buttons were getting keyboard focus
              * kwq/KWQKHTMLPart.mm:
      	(KWQKHTMLPart::khtmlMousePressEvent): Check clickCount here the way NSWindow does.
      	See below for rationale.
      	(KWQKHTMLPart::passWidgetMouseDownEventToWidget): I didn't read the code in
      	[NSWindow sendEvent:] that I was stealing carefully enough. The old needsPanelToBecomeKey
      	flag is used to decide whether something should really get first responder, and I need to
      	do check that too. And while I was in here, did the same clickCount check that NSWindow
      	does for good measure.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      Reviewed by Dave. · b50226ef
      darin authored
      	- fixed 3127900 -- REGRESSION: text fields select all their text when clicked on with the mouse
              * kwq/KWQKHTMLPart.h: Add _firstResponderAtMouseDownTime.
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::khtmlMousePressEvent): Don't call makeFirstResponder: if it's already set.
              (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Using _firstResponderAtMouseDownTime, catch the
      	case where an NSTextField's editor was just created and became first responder. In those cases,
      	pass the mouseDown: to the text field, not the newly created editor. Even though it shouldn't make
      	a difference it does. Also don't makeFirstResponder: if it's already set.
              (KWQKHTMLPart::mouseDown): Set _firstResponderAtMouseDownTime.
              * kwq/KWQWidget.mm: (QWidget::setFocus): Don't call makeFirstResponder: if it's already set.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      Reviewed by Ken. · c6715640
      darin authored
      	- fixed 3127898 -- Crash going to altavista.com after visiting sony.com
              * khtml/ecma/kjs_window.cpp: (Window::get): Change lots of properties to return "undefined"
      	rather than crashing when the view is NULL. I'm not sure that undefined is the perfect thing
      	to return in this case, but it's better than crashing the program. We can refine later as needed.
      	- fixed 3127157 -- REGRESSION: applet does not become first responder when clicked-on
      	- fixed 3127934 -- Crash in KWQKHTMLPart::widgetWillReleaseView scrolling around
              * kwq/KWQKHTMLPart.h: Get rid of widgetWillReleaseView(). Add mouseDownViewIfStillGood().
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Call makeFirstResponder: in the same way that
      	the NSWindow does before delivering a mouseDown: message. This oversight caused the applet problem.
              (findViewInSubviews): Added.
              (KWQKHTMLPart::mouseDownViewIfStillGood): Added. Gets _mouseDownView, but then checks that it's
      	still a subview before returning it. A little inefficient, but the only way to do it given that
      	there's no general way to find out that an NSView is being removed from your view hierarchy or deallocated.
      	This fixes the crash in widgetWillReleaseView.
              (KWQKHTMLPart::khtmlMouseMoveEvent): Use mouseDownViewIfStillGood() instead of _mouseDownView directly.
              (KWQKHTMLPart::khtmlMouseReleaseEvent): Ditto.
              (KWQKHTMLPart::passSubframeEventToSubframe): Ditto.
              * kwq/KWQWidget.mm:
              (QWidget::~QWidget): Remove call to widgetWillReleaseView().
              (QWidget::setView): Ditto.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3061 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  16. 13 Dec, 2002 1 commit
    • darin's avatar
      Reviewed by John. · 15cdfc52
      darin authored
      	Overall speedup on cvs-base is about 5%.
      	- reduce QString use in the tokenizer and tighten up QString implementation for a speedup
      	- fix up the QFontFamily implementation, using new QString features too, for a speedup
              * khtml/html/htmltokenizer.h: Take const QString & instead of QString to avoid an extra copy.
              * khtml/html/htmltokenizer.cpp:
              (HTMLTokenizer::begin): Use QString::null instead of "" for QString objects; faster.
              (HTMLTokenizer::scriptHandler): In APPLE_CHANGES, use new prepend that avoids the need to
      	create a temporary QString. Use QString::null instead of QString() for a null string, and
      	also made other small fixes to avoid temporary QStrings.
      	(HTMLTokenizer::setSrc): Take const QString & instead of QString to avoid an extra copy.
              * kwq/KWQFont.h: Rename QFontFamily to KWQFontFamily. Make family() inline, add inline
      	familyIsEmpty(). Change KWQFontFamily to store both the QString for the family and the
      	NSString instead of only the NSString to avoid constant conversions back and forth.
      	Remove type cases in CREATE_FAMILY_ARRAY that could result in copying the font object.
              * kwq/KWQFont.mm:
              (KWQFontFamily::KWQFontFamily): Fix bug where a copied family object would have a random
      	ref count instead of a ref count of 0. Also update for NSString change.
              (KWQFontFamily::operator=): Use the ref before deref algorithm instead of the check for
              (KWQFontFamily::getNSFamily): Compute the NSString for the family name here. To avoid
      	making an NSString every time, use a CFDictionary with QString as a key and NSString as
      	a value instead of using an NSSet.
              (KWQFontFamily::setFamily): Invalidate the NSString family when the QString family is
      	changed. Moved the code to make things unique to getNSFamily.
              (KWQFontFamily::operator==): Call getNSFamily rather than
              * kwq/KWQString.h: Added a prepend and insert overload that take a QChar pointer and length, for
      	use in the tokenizer, and a hash function, for use in CFDictionary. Also added a global set of
              * kwq/KWQString.mm:
              (QString::prepend): New overload calls new insert overload.
              (QString::insert): Old insert slightly tightened by calling detach() only after the early exit
      	and removing an extra detach from a function that already does forceUnicode. Added the new insert
      	that takes a QChar * and a length.
              (operator==): Rewrite this so that it is efficient and doesn't involve creating a QString temporary
      	or doing a function call.
              (QString::hash): Wrote this. Used the same hash algorithm I did in my recent KJS work.
              (retainQString): Added. For use in CFDictionaryKey callback.
              (releaseQString): Added. For use in CFDictionaryKey callback.
              (describeQString): Added. For use in CFDictionaryKey callback.
              (equalQString): Added. For use in CFDictionaryKey callback.
              (hashQString): Added. For use in CFDictionaryKey callback.
              * khtml/rendering/font.h: Change name to KWQFontFamily.
              * khtml/rendering/font.cpp: (Font::update): Call familyIsEmpty() instead of family().isEmpty()
      	to avoid making and destroying a QString every time. Also put this batch of KWQFontFamily-specific
      	changes inside #if APPLE_CHANGES. Much to my dismay, we have others elsewhere that aren't ifdef'd.
              * khtml/css/cssstyleselector.cpp: (CSSStyleSelector::applyRule): Change name to KWQFontFamily.
      	Clearly this code needs some #if APPLE_CHANGES, and changing the class name helps make that clear.
      	- change KHTMLSettings so using it doesn't require copying QStrings for a speedup
              * kwq/KWQKHTMLSettings.h: Made all the functions static members to avoid the unnecessary
      	overhead of passing a this pointer. Added lots of setXXX functions for use by the WebCoreSettings
      	code that gets called by WebKit when settings are changed. Return objects by reference because we
      	can and it avoids copying QString objects.
              * kwq/KWQKHTMLSettings.mm: Changed all the functions in here to return the same global object
      	each time, and made the set functions update those globals.
              * kwq/WebCoreSettings.mm: All the setters now call through to KHTMLSettings set functions.
              - fixed 3126513 -- crash in KWQKHTMLPart::clearTimers() deallocating KWQPageState
      	- did some cleanup in the bridge and the part; part of the process of moving real work out of the bridge
              * kwq/KWQKHTMLPart.h: Rearrange things to be a little more logical. Mark isFrameSet() const.
      	added an attributedString function here so it's not inside WebCoreBridge. Added an overload
      	of clearTimers that takes a view parameter.
              * kwq/KWQKHTMLPart.cpp: (KWQKHTMLPart::isFrameSet): Mark this const.
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::clearTimers): Add the overload that takes the view parameter.
              (KWQKHTMLPart::attributedString): Moved this code in here from the bridge.
              * kwq/WebCoreBridge.mm:
              (-[WebCoreBridge selectedAttributedString]): Call the attributedString function in its new home in
              (-[WebCoreBridge attributedStringFrom:startOffset:to:endOffset:]): Ditto.
              (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:]):
      	Take a const KURL & instead of a KURL to avoid unnecessary copying.
              (-[KWQPageState dealloc]): Call the new clearTimers that takes a view parameter. This should fix the
      	crash in autorelease pool deallocation mentioned above.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  17. 12 Dec, 2002 4 commits
    • darin's avatar
      Reviewed by Ken. · a440d629
      darin authored
      	- fixed 3126042 -- Failure to send onkeypress event on key down causes forms to submit incorrectly
              * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::keyEvent): Fixed the code to send the second event with repeat
      	set equal to true. Before it was constructing the event but never sending it because result was true.
      	Also fixed a problem where it was considering sending a second mouse up event. What we're doing here
      	is a bit of a hack and probably should be fixed -- it seems that the behavior in dispatchKeyEvent where
      	it sends only a down and not a press for the a non-autorepeat event is a KHTML bug that we should fix
      	instead of work around eventually.
              - fix to something that made this harder to debug
              * khtml/xml/dom2_eventsimpl.cpp: (KeyEventImpl::KeyEventImpl): Logging the type was showing the wrong
      	type, and I narrowed it down to this code here. Changing m_id after the fact doesn't change the type
      	string, so you need to compute the correct ID and pass it to the constructor.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3024 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      Reviewed by Trey and Ken. · 358180db
      darin authored
      	- fixed 3125613 -- REGRESSION: resizing frames after clicking on scroll bar doesn't work right
              The problem was that the mouse dragged events were going to the scroll bar because the new click
              on the frame resizer didn't fall into the code path that sets _mouseDownView.
              * kwq/KWQKHTMLPart.h: Add override of khtmlMouseMoveEvent.
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Don't set _mouseDownView. This is now handled
      	at the higher level when the mouseDown comes in.
              (KWQKHTMLPart::khtmlMouseMoveEvent): Added. Pass along mouseDragged: events. I didn't have this
      	before because I don't want or need to pass mouseMoved: events along, but the KHTML mouse move
      	event corresponds to both AppKit mouseDragged and mouseMoved.
              (KWQKHTMLPart::khtmlMouseReleaseEvent): Don't clear _mouseDownView. This is now handled at the
      	higher level when the mouseUp comes in.
              (KWQKHTMLPart::passSubframeEventToSubframe): Ditto.
              (KWQKHTMLPart::mouseDown): Set _mouseDownView to nil; it will be set by passWidgetMouseDownEventToWidget
      	if we end up passing the event down. This is the change that actually fixes the bug mentioned above.
              (KWQKHTMLPart::mouseUp): Set _mouseDownView to nil after handling the mouseUp. It's OK if we don't
      	clear this out in cases where we don't get a mouseUp event -- we'll get a mouseDown later -- but it's
      	still probably a good idea to clear it when we know the mouse is no longer down.
      	- used update-kwq-assert to update the code that's a shared copy of WebFoundation code
              * kwq/KWQAssertions.m: (vprintf_stderr_objc): Got the UTF-8 fix I did a while back.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3021 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • 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.
              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
    • 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.
              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
  18. 11 Dec, 2002 3 commits
    • rjw's avatar
      · f8849e1a
      rjw authored
              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:]):
              Fixed 3124121, 3124716 (and other dupes).  Regressions related to b/f crash.
              Reviewed by hyatt.
              * kwq/KWQKHTMLPart.h:
              * kwq/KWQKHTMLPart.mm:
              * 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
    • 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.
              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
    • 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
  19. 10 Dec, 2002 4 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
    • mjs's avatar
      Reviewed by Don. · c192d2d2
      mjs authored
      	- really fixed 3123727 - SJ: Viewmaster arm sometimes doesn't animate on
              * 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
    • mjs's avatar
      Reviewed by Trey. · 9402c8fd
      mjs authored
      	- fixed 3123727 - SJ: Viewmaster arm sometimes doesn't animate on
              * 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
    • 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.
              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
  20. 09 Dec, 2002 1 commit
    • 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
  21. 08 Dec, 2002 1 commit
    • darin's avatar
      WebFoundation: · 70b6438f
      darin authored
              Reviewed by Don and Dave.
              * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
              * WebFoundation.pbproj/project.pbxproj: Let Electron be Electron.
              Reviewed by Don and Dave.
      	- fixed 3115845 -- bad-pointer crash destroying DOM tree reproducible at a particular site
      	All hail libgmalloc, without which this would just be another bug I can't reproduce!
      	This memory trasher bug was caused bug calling setChildrenLoaded after casting a node to
      	HTMLObjectElementImpl, when the node wasn't always an object element. It turns out that this
              fix was made obsolete a while back when I changed close on renderers to be delivered even for
              cases where the renderer is not created yet at close time.
              * khtml/html/htmlparser.cpp: (KHTMLParser::processCloseTag): Remove the special case for
      	</object>. Now that this is fixed another way we don't need this at all.
              * khtml/html/html_objectimpl.h: Remove setChildrenLoaded and m_childrenLoaded.
              * khtml/html/html_objectimpl.cpp: (HTMLObjectElementImpl::HTMLObjectElementImpl):
      	Remove code that sets m_childrenLoaded to false.
              (HTMLObjectElementImpl::attach): Remove code that looks at m_childrenLoaded, since we don't
      	need it any more (and in fact there's no way to set it any more).
      	- fixed 3120578 -- REGRESSION: going to about:blank creates null view
      	If no tokens are ever sent to the parser, then we end up without a render tree.
              * khtml/html/htmlparser.h: Add finished() function.
              * khtml/html/htmlparser.cpp: (KHTMLParser::finished): Make an HTML element if the document is still
      	empty at this point. This is identical to what KHTMLParser::insertNode does when you insert any kind
      	of element other than an HTML element.
              * khtml/html/htmltokenizer.cpp: (HTMLTokenizer::end): Call finished() to let the parser know.
              * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::paint): Turn on the "paint red" feature in development builds.
      	Null view problems are particularly hard to debug without something like this, and we don't care
      	if development builds are ever-so-slightly slower. No change in deployment.
      	- fixed 3121527 -- crash in WebCoreBridge frameBorderStyle
              * kwq/WebCoreBridge.mm: (-[WebCoreBridge frameBorderStyle]): Handle case where this is called and
      	we don't have a KHTMLView yet.
      	- other changes
              * WebCore.pbproj/project.pbxproj: Electron is doing his thing.
              Reviewed by Don and Dave.
      	- fixed 3120578 -- REGRESSION: going to about:blank creates null view
      	This part of the fix makes sure that a renderer is created, even when there are no bytes
      	of data passed through. This makes the empty document about:blank case work just like the
      	"document with just whitespace in it case". There's another part of the fix in WebCore that
      	takes care of the remaining problem.
              * WebView.subproj/WebHTMLRepresentation.m:
              (-[WebHTMLRepresentation finishedLoadingWithDataSource:]):
      	Call receivedData:withDataSource: on the bridge with nil for the data. It would be even more
      	elegant to add a new call for the case where we finish, but it's not necessary, since the
      	existing receivedData: call does all the right things if passed nil.
              * WebView.subproj/WebDataSourcePrivate.m: (-[WebDataSource _finishedLoading]):
      	Call finishedLoadingWithDataSource: here, to make sure it's done after committing.
      	This parallels what we already do for the didReceiveData call.
              * WebView.subproj/WebMainResourceClient.m: (-[WebMainResourceClient handleDidFinishLoading:]):
      	Remove the call to finishedLoadingWithDataSource: because it's handled by _finishedLoading now.
      	This parallels what we already do for the didReceiveData call.
      	- fixed long standing problem where resizing could make you see a "null view"
              * WebView.subproj/WebView.m:
              (-[WebView drawRect:]): Add a "paint cyan" feature in development builds.
      	Null view problems are particularly hard to debug without something like this,
      	and we don't care if development builds are slightly slower. No change in deployment.
              (-[WebView setFrameSize:]): Tell the scroll view to draw the background if we are
      	resized. We can't do our "let the old bits show through" thing any more if we have to
      	redraw because of resizing.
      	- other changes
              * WebKit.pbproj/project.pbxproj: Remove the old -DAPPLE_CHANGES and -DHAVE_CONFIG_H that we
              once needed when WebKit used to compile  C++ headers from the KHTML part of WebCore.
              We haven't needed those for ages. Also sort things a bit, using the new Electron feature for
      	sorting lists of files alphabetically, and some by hand.
              * English.lproj/StringsNotToBeLocalized.txt: Update for recent changes.
      	Reviewed by Don and Dave.
              * English.lproj/StringsNotToBeLocalized.txt: Update for recent changes.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2970 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  22. 04 Dec, 2002 1 commit
    • darin's avatar
      WebCore: · 6f5b5073
      darin authored
              Reviewed by Trey and Maciej.
      	- fixed 3117558 -- Assertion failure in KWQKHTMLPart::slotData after typing "amazon.com" twice
      	- got rid of the per-part NSEvent in preparation for NSView mouse event handling going through WebCore
              * khtml/khtml_part.h: Added declaration for didOpenURL.
              * khtml/khtml_part.cpp: (KHTMLPart::openURL): Changed name to didOpenURL in the APPLE_CHANGES
      	version because calls to openURL from within KHTML need to make the round trip to WebKit.
      	Also disabled the "scroll to anchor" part.
              * kwq/KWQKHTMLPart.cpp: (KWQKHTMLPart::isFrameSet): Fix to return false when document is 0.
              * kwq/KWQKHTMLPart.h: Add scrollToAnchor, remove setCurrentEvent and _currentEvent
              * kwq/KWQKHTMLPart.mm:
              (KHTMLPart::openURL): Pass the openURL call to the KWQKHTMLPart.
              (KWQKHTMLPart::KWQKHTMLPart): Don't initialize _currentEvent.
              (KWQKHTMLPart::~KWQKHTMLPart): Don't release _currentEvent.
              (KWQKHTMLPart::submitForm): Pass [NSApp currentEvent] instead of _currentEvent.
              (KWQKHTMLPart::urlSelected): Pass [NSApp currentEvent] instead of _currentEvent.
              (KWQKHTMLPart::scrollToAnchor): Added. Contains the code from the anchor case inside
              * kwq/WebCoreBridge.h: Added scrollToAnchorWithURL:.
              * kwq/WebCoreBridge.mm:
              (-[WebCoreBridge openURL:reload:headers:lastModified:pageCache:]): Change around so that we
      	don't do a bunch of irrelevant stuff in the page cache case. I think we might just want to
      	make a separate method for the page cache case.
              (-[WebCoreBridge scrollToAnchorWithURL:]): Added.
              (-[WebCoreBridge mouseUp:]): Simplify check for nil view. Remove calls to setCurrentEvent.
              (-[WebCoreBridge mouseDown:]): Simplify check for nil view. Fix event type constants for
      	right mouse button and other mouse button.
              (-[WebCoreBridge mouseMoved:]): Simplify check for nil view.
              (-[WebCoreBridge mouseDragged:]): Simplify check for nil view.
              Reviewed by Trey and Maciej.
      	- fixed 3117558 -- Assertion failure in KWQKHTMLPart::slotData after typing "amazon.com" twice
      	- update NSEvent handling in preparation for NSView mouse event handling going through WebCore
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _loadItem:fromItem:withLoadType:]): Added FIXME comments about matching the _loadURL
      	case more closely.
              (-[WebFrame _actionInformationForNavigationType:event:originalURL:]): Only use the event if it's
      	a mouse down event. This prevents trouble when we have other kinds of events coming through.
              (-[WebFrame _continueFragmentScrollAfterNavigationPolicy:request:]): Call the new scrollToAnchorWithURL:
      	instead of openURL:. This fixes the assertion failure in the bug above.
              (-[WebFrame _loadURL:loadType:triggeringEvent:isFormSubmission:]): Update checks here to more closely
      	match the ones in KHTMLPart::openURL that we are replacing. Add more comments.
              * WebView.subproj/WebHTMLView.m: (-[WebHTMLView hitTest:]): Function to intercept all clicks at the
      	WebHTMLView level, disabled for now because we are not yet ready.
      	- started a gzip download decoder, not yet hooked up
              * Downloads.subproj/WebGZipDecoder.h: Added.
              * Downloads.subproj/WebGZipDecoder.m: Added.
              * WebKit.pbproj/project.pbxproj: Add WebGZipDecoder and zlib.
      	- other changes
              * Panels.subproj/WebAuthenticationPanel.m: Fixed screwed-up indentation.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2932 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  23. 03 Dec, 2002 1 commit
    • hyatt's avatar
      Remove the moveWidgetsAside function. This fixes all the · 5b1f3979
      hyatt authored
      	form controls on livepage.apple.com that were getting hosed
      	by the scrolling marquee.
              Reviewed by: darin
              * khtml/html/html_tableimpl.cpp:
              * khtml/misc/loader.cpp:
              * khtml/rendering/render_root.cpp:
              * kwq/KWQKHTMLPart.h:
              * kwq/KWQKHTMLPart.mm:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2916 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  24. 26 Nov, 2002 1 commit
    • rjw's avatar
      JavaScriptCore · e67107bd
      rjw authored
              Use delete[] (not delete) operator to delete array.
              * kjs/property_map.cpp:
              Use cleaned up API to enable/disable page cache.
              * Debug/DebugUtilities.m:
              (-[BrowserDocument toggleBackForwardEnabled:]):
              Cleanup up leaking objects in page cache.
              * kwq/KWQKHTMLPart.mm:
              * kwq/WebCoreBridge.mm:
              (-[KWQPageState initWithDocument:DOM::URL:windowProperties:KJS::locationProperties:KJS::]):
              (-[KWQPageState dealloc]):
              Cleanup leaking objects in page cache.
              Cleaned up API a bit.
              * History.subproj/WebBackForwardList.h:
              * History.subproj/WebBackForwardList.m:
              (-[WebBackForwardList dealloc]):
              (+[WebBackForwardList setUsesPageCache:]):
              (+[WebBackForwardList usesPageCache]):
              (+[WebBackForwardList setPageCacheSize:]):
              (+[WebBackForwardList pageCacheSize]):
              * History.subproj/WebHistoryItem.h:
              * History.subproj/WebHistoryItem.m:
              (-[WebHistoryItem setHasPageCache:]):
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge saveDocumentToPageCache:]):
              * WebKit.exp:
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _canCachePage]):
              (-[WebFrame _purgePageCache]):
              (-[WebFrame _setState:]):
              (-[WebFrame _continueLoadRequestAfterNavigationPolicy:request:]):
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2874 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  25. 25 Nov, 2002 2 commits
    • rjw's avatar
      Changed ordering of cachability check. · cd8e3a0d
      rjw authored
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _setState:]):
              Added check for non-nil doc.
              * kwq/KWQKHTMLPart.mm:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • rjw's avatar
      Changes for back/forward. Currently disabled. · b0eb2ac5
      rjw authored
              * History.subproj/WebHistoryItem.h:
              * History.subproj/WebHistoryItem.m:
              (-[WebHistoryItem dealloc]):
              (-[WebHistoryItem setPageCacheEnabled:]):
              (-[WebHistoryItem pageCache]):
              * Misc.subproj/WebKitLogging.h:
              * Misc.subproj/WebKitLogging.m:
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge saveDocumentToPageCache:]):
              * WebView.subproj/WebDataSource.m:
              (-[WebDataSource startLoading]):
              * WebView.subproj/WebDataSourcePrivate.h:
              * WebView.subproj/WebDataSourcePrivate.m:
              (-[WebDataSource _startLoading:]):
              (-[WebDataSource _startLoading]):
              (-[WebDataSource _commitIfReady:]):
              (-[WebDataSource _commitIfReady]):
              (-[WebDataSource _setStoredInPageCache:]):
              (-[WebDataSource _storedInPageCache]):
              * WebView.subproj/WebFramePrivate.h:
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _transitionToCommitted:]):
              (-[WebFrame _canCachePage]):
              (-[WebFrame _purgePageCache]):
              (-[WebFrame _setState:]):
              (-[WebFrame _continueFragmentScrollAfterNavigationPolicy:request:]):
              (-[WebFrame _continueLoadRequestAfterNavigationPolicy:request:]):
              Changes for back/forward.  Currently disabled.
              * ForwardingHeaders/kjs/property_map.h: Added.
              * khtml/ecma/kjs_window.cpp:
              * khtml/ecma/kjs_window.h:
              * khtml/khtmlpart_p.h:
              * khtml/xml/dom_docimpl.cpp:
              * khtml/xml/dom_docimpl.h:
              * kwq/KWQKHTMLPart.h:
              * kwq/KWQKHTMLPart.mm:
              * kwq/WebCoreBridge.h:
              * kwq/WebCoreBridge.mm:
              (-[WebCoreBridge openURL:reload:headers:lastModified:pageCache:]):
              (-[WebCoreBridge saveDocumentToPageCache]):
              (-[WebCoreBridge canCachePage]):
              (-[KWQPageState initWithDocument:DOM::URL:windowProperties:KJS::locationProperties:KJS::]):
              (-[KWQPageState dealloc]):
              (-[KWQPageState DOM::]):
              (-[KWQPageState URL]):
              (-[KWQPageState KJS::]):
              Changes for back/forward.  Currently disabled.
              * kjs/property_map.cpp:
              * kjs/property_map.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2863 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  26. 24 Nov, 2002 1 commit
    • hyatt's avatar
      This landing adds support for blocks inside inlines. It · d18db816
      hyatt authored
      	gets rid of the old broken way KHTML used to handle this
      	and implements a brand new mechanism.
      	With this change, I have decreased the tag priority of <font>
      	and <a> to match other inlines (<i>, <span>, etc.), and I
      	now allow all the inlines to contain blocks for relaxed parsing.
      	Now if you open an <i> or a <b> and just leave it open across
      	blocks, this will work.
      	I also fixed a bad DHTML bug caused by the WebCoreBridge
      	forceLayout method.  The basic pattern is that someone does
      	a tiny repaint of just a sliver of the window, then someone
      	schedules a layout (which means they want a full repaint), but
      	then drawRect comes along and calls forceLayout which unschedules
      	the layout, thus preventing the full repaint from occurring.
      	Any basic DHTML that used append/remove child was broken because
      	of this pattern.  For now I have just removed the unscheduleLayout
      	call at the end of forceLayout.
              * khtml/html/dtd.cpp:
              * khtml/html/htmlparser.cpp:
              * khtml/rendering/render_container.cpp:
              * khtml/rendering/render_flow.cpp:
              * khtml/rendering/render_flow.h:
              * khtml/rendering/render_object.cpp:
              * khtml/rendering/render_object.h:
              * kwq/KWQKHTMLPart.mm:
              * kwq/WebCoreBridge.mm:
              (-[WebCoreBridge copyRenderNode:copier:]):
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2854 268f45cc-cd09-0410-ab3c-d52691b4dbfc