1. 21 Nov, 2002 1 commit
  2. 17 Nov, 2002 2 commits
    • darin's avatar
      WebCore: · b1961817
      darin authored
      	- moved all NSURL and CFURL use out of WebCore
              * kwq/KWQKURL.h: Remove getNSURL() and getNSURLFromString().
              * kwq/KWQKURL.mm: Ditto.
              * kwq/KWQKCookieJar.mm:
              (KWQKCookieJar::cookie): Pass an NSString instead of an NSURL.
              (KWQKCookieJar::setCookie): Ditto.
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::openURL): Ditto.
              (KWQKHTMLPart::openURLRequest): Ditto.
              (KWQKHTMLPart::submitForm): Ditto.
              (KWQKHTMLPart::urlSelected): Ditto.
              (KWQKHTMLPart::createPart): Ditto.
              (KWQKHTMLPart::redirectionTimerStartedOrStopped): Ditto.
              (KWQKHTMLPart::userAgent): Ditto.
              (KWQKHTMLPart::requestedURLString): Receive an NSString instead of an NSURL.
              * kwq/KWQKHTMLPartBrowserExtension.mm:
              (KHTMLPartBrowserExtension::createNewWindow): Pass an NSString instead of an NSURL.
              (KHTMLPartBrowserExtension::setIconURL): Ditto.
              (KHTMLPartBrowserExtension::setTypedIconURL): Ditto.
              * kwq/KWQKJavaAppletWidget.h: Remove use of NSURL, just use QString instead.
              * kwq/KWQKJavaAppletWidget.mm:
              (KJavaAppletWidget::KJavaAppletWidget): No need to set the QString to nil.
              (KJavaAppletWidget::~KJavaAppletWidget): No need to release the QString.
              (KJavaAppletWidget::showApplet): Pass an NSString instead of an NSURL.
              * kwq/KWQLoader.mm:
              (KWQServeRequest): Pass an NSString instead of an NSURL.
              (KWQCheckCacheObjectStatus): Ditto.
              * kwq/WebCoreBridge.h: Change all methods to use NSString instead of NSURL.
              * kwq/WebCoreBridge.mm:
              (-[WebCoreBridge openURL:reload:headers:]): Receive an NSString instead of an NSURL.
              (-[WebCoreBridge completeURLForDOMString:]): Return an NSString instead of an NSURL.
              (-[WebCoreBridge elementAtPoint:]): WebCoreElementLinkURL and WebCoreElementImageURL
      	are now strings.
              (-[WebCoreBridge URL]): Return an NSString instead of an NSURL.
              * kwq/WebCoreCookieAdapter.h: Change all methods to use NSString instead of NSURL.
              * kwq/WebCoreCookieAdapter.m:
              (-[WebCoreCookieAdapter cookiesForURL:]): Ditto.
              (-[WebCoreCookieAdapter setCookies:forURL:policyBaseURL:]): Ditto.
              * khtml/rendering/render_applet.cpp: (RenderApplet::processArguments):
      	Tweaked this file a tiny bit, mainly because header dependencies weren't working
      	and we need this file to be recompiled due to inline function changes.
      	- update for change to WebCore API so it never uses NSURL
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge createWindowWithURL:frameName:]): Take NSString instead of NSURL.
              (-[WebBridge startLoadingResource:withURL:]): Ditto.
              (-[WebBridge objectLoadedFromCacheWithURL:response:size:]): Ditto.
              (-[WebBridge reportClientRedirectToURL:delay:fireDate:]): Ditto.
              (-[WebBridge setIconURL:]): Ditto.
              (-[WebBridge setIconURL:withType:]): Ditto.
              (-[WebBridge loadURL:reload:triggeringEvent:isFormSubmission:]): Ditto.
              (-[WebBridge postWithURL:data:contentType:triggeringEvent:]): Ditto.
              (-[WebBridge createChildFrameNamed:withURL:renderPart:allowsScrolling:marginWidth:marginHeight:]): Ditto.
              (-[WebBridge userAgentForURL:]): Ditto.
              (-[WebBridge requestedURL]): Return NSString instead of NSURL.
              (-[WebBridge viewForPluginWithURL:attributes:baseURL:MIMEType:]): Take NSString instead of NSURL.
              (-[WebBridge viewForJavaAppletWithFrame:attributes:baseURL:]): Take NSString instead of NSURL.
              * WebCoreSupport.subproj/WebCookieAdapter.m:
              (-[WebCookieAdapter cookiesForURL:]): Take NSString instead of NSURL.
              (-[WebCookieAdapter setCookies:forURL:policyBaseURL:]): Ditto.
              * WebView.subproj/WebDataSourcePrivate.m:
              (-[WebDataSource _commitIfReady]): Pass NSString instead of NSURL.
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _continueFragmentScrollAfterNavigationPolicy:request:]): Pass NSString instead of NSURL
              (-[WebFrame _loadURL:loadType:triggeringEvent:isFormSubmission:]): Turn bridge URL into NSURL so we
      	can call _web_URLByRemovingFragment on it.
              * WebView.subproj/WebHTMLViewPrivate.m:
              (-[WebHTMLView _elementAtPoint:]): Convert NSString to NSURL when making the WebKit element dictionary.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2720 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs's avatar
      WebCore: · bb798fe2
      mjs authored
      	- fixed 2949193 - implement onKeyDown, onKeyPress, and onKeyUp event handlers
              * khtml/html/html_formimpl.cpp:
              * kwq/KWQEvent.h:
              * kwq/KWQEvent.mm:
              (QKeyEvent::QKeyEvent): Implemented.
              (QKeyEvent::key): Likewise.
              (QKeyEvent::state): Likewise.
              (QKeyEvent::accept): Likewise.
              (QKeyEvent::ignore): Likewise.
              (QKeyEvent::isAutoRepeat): Likewise.
              (QKeyEvent::text): Likewise.
              (QKeyEvent::ascii): Likewise.
              (QKeyEvent::count): Likewise.
              (QKeyEvent::isAccepted): Likewise.
              * kwq/KWQKHTMLPart.h:
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::keyEvent): Translate the event to a QEvent and send
      	it through the DOM event mechanism.
              * kwq/WebCoreBridge.h:
              * kwq/WebCoreBridge.mm:
              (-[WebCoreBridge interceptKeyEvent:toView:]): Pass event to the
      	KWQ part.
      	* kwq/WebCoreBridgePrivate.h: Added.
              * WebCore.pbproj/project.pbxproj: Added new file.
      	- fixed 2949193 - implement onKeyDown, onKeyPress, and onKeyUp event handlers
              * WebView.subproj/WebHTMLViewPrivate.h:
              * WebView.subproj/WebHTMLViewPrivate.m:
              (+[WebHTMLView load]): Pose as NSWindow too now.
              (-[WebHTMLView _interceptKeyEvent:toView:]): Pass event to WebCore and
      	see if WebCore wants to block it.
              (-[WebNSWindow sendEvent:]): For all key events that would go to a
      	subview of a WebHTMLView, let the WebHTMLView take a first crack
      	at it.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2718 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  3. 13 Nov, 2002 2 commits
    • darin's avatar
      WebCore: · aa70db1b
      darin authored
      	- fixed 3083982 -- Logging into AOL gives null view
      	Turns out AOL was using a refresh header, which we were not supporting.
              * khtml/khtml_part.h: Declare receivedFirstData, a private member function.
              * khtml/khtml_part.cpp:
              (KHTMLPart::receivedFirstData): Separate out the part of slotData we
      	want to share, which really seems kinda separate anyway.
              (KHTMLPart::slotData): More of the same.
              * kwq/KWQKHTMLPart.h: Declare addMetaData.
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::slotData): Call receivedFirstData instead of doing the same
      	thing ourselves.
              (KWQKHTMLPart::addMetaData): Added. Puts metadata into the job.
              * kwq/KWQKHTMLPartBrowserExtension.mm:
              (KHTMLPartBrowserExtension::createNewWindow): Fix bug where this was calling
      	openURL: but meant to call loadURL:.
              * kwq/WebCoreBridge.h: Add headers to openURL method. Remove setContentType.
              * kwq/WebCoreBridge.mm:
              (-[WebCoreBridge openURL:withHeaders:]): Handle Content-Type and Refresh.
      	This method is big enough that I should probably move the guts to KWQKHTMLPart.
      	- other things
              * kwq/KWQListImpl.mm: (KWQListImpl::~KWQListImpl): I overlooked something
      	while doing my "bug fix" in here a while back. Change an assignment statement
      	to an assert.
      	- fixed 3083982 -- Logging into AOL gives null view
      	Turns out AOL was using a refresh header, which we were not supporting.
              * WebView.subproj/WebDataSourcePrivate.m: (-[WebDataSource _commitIfReady]):
      	Call openURL: and pass headers in.
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _loadURL:loadType:clientRedirect:triggeringEvent:isFormSubmission:]):
      	Pass nil for headers in this case, since we know it's just an anchor change.
      	- other things
              * WebCoreSupport.subproj/WebBridge.h: Remove dataSourceChanged and dataSource
      	methods. We try to keep the bridge methods down to actual bridging.
              * WebCoreSupport.subproj/WebBridge.m: Remove dataSourceChanged altogether,
      	and move dataSource up in the file.
              * WebView.subproj/WebHTMLRepresentation.m:
              (-[WebHTMLRepresentation setDataSource:]): Keep the data source around, so we
      	don't need to ask the bridge for it.
              (-[WebHTMLRepresentation documentSource]): Use it here.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs's avatar
      WebCore: · 368154da
      mjs authored
      	- fixed 3050447 - Policy handlers have no way of telling client
      	that the proposed navigation is a form post
              * khtml/khtml_part.cpp:
              (KHTMLPart::submitForm): Call kwq->submitForm
              * kwq/KWQKHTMLPart.h:
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::openURL): Adjusted for bridge API change.
              (KWQKHTMLPart::openURLRequest): Removed POST handling.
      	(KWQKHTMLPart::submitForm): Added this back, because we need to
      	know what URL navigations are caused by form submission, even if
      	they are not POSTs.
              (KWQKHTMLPart::urlSelected): Adjusted for bridge API change.
              * kwq/WebCoreBridge.h: Add triggeringEvent: parameter to postURL:
      	and isFormSubmission: parameter to loadURL:.
      	- fixed 3050447 - Policy handlers have no way of telling client
      	that the proposed navigation is a form post
      	Now we pass form submissions through all the normal policy steps.
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge loadURL:reload:triggeringEvent:isFormSubmission:]):
              (-[WebBridge postWithURL:data:contentType:triggeringEvent:]):
              (-[WebBridge createChildFrameNamed:withURL:renderPart:allowsScrolling:marginWidth:marginHeight:]):
              * WebView.subproj/WebDataSourcePrivate.h:
              * WebView.subproj/WebDataSourcePrivate.m:
              (-[WebDataSourcePrivate dealloc]):
              (-[WebDataSource _setTriggeringAction:]):
              (-[WebDataSource _triggeringAction]):
              (-[WebDataSource _lastCheckedRequest]):
              (-[WebDataSource _setLastCheckedRequest:]):
              * WebView.subproj/WebFrame.m:
              (-[WebFrame setProvisionalDataSource:]):
              * WebView.subproj/WebFramePrivate.h:
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _shouldShowRequest:]):
              (-[WebFrame _loadRequest:triggeringAction:]):
              (-[WebFrame _actionInformationForNavigationType:event:]):
              (-[WebFrame _continueAfterNavigationPolicyForRequest:dataSource:]):
              (-[WebFrame _loadURL:loadType:clientRedirect:triggeringEvent:isFormSubmission:]):
              (-[WebFrame _loadURL:intoChild:]):
              (-[WebFrame _postWithURL:data:contentType:triggeringEvent:]):
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  4. 12 Nov, 2002 1 commit
    • darin's avatar
      - fixed 3079499 -- blank page at http://www.sonyericsson.com/T68i/ · 0fe57232
      darin authored
              * khtml/misc/loader.cpp:
              (CachedCSSStyleSheet::checkNotify): Copy the clients list before iterating
      	over it, since clients can move around in the list or be removed.
              (CachedScript::checkNotify): Ditto.
              (CachedImage::do_notify): Ditto.
              (CachedImage::movieStatus): Ditto.
      	- fixed double calls to openURL I noticed
              * khtml/khtml_part.cpp: (KHTMLPart::processObjectRequest):
      	Don't call openURL here at all. That happens indirectly as a result
      	of the load we kick off.
              * kwq/KWQKHTMLPart.mm: Tweaks.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  5. 11 Nov, 2002 3 commits
    • darin's avatar
      - fixed 3084704 -- crash in HTMLTokenizer on page with JavaScript · 43befc74
      darin authored
      	HTMLDocument::Close inside a <script>
      	I think it's going to work this time. The key was to hook up the
      	KHTML submitFormAgain machinery.
              * khtml/khtml_part.cpp: (KHTMLPart::submitForm): Take out the APPLE_CHANGES
      	ifdef that was disabling the submitFormAgain logic.
              * kwq/KWQKHTMLPart.h: Remove submitForm(), because openURLRequest() handles it fine.
              * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::openURLRequest): Move the logic for handling
      	POST here from submitForm() and remove submitForm().
              * kwq/KWQSlot.mm:
              (KWQSlot::KWQSlot): Add support for the submitFormAgain slot.
              (KWQSlot::call): Ditto.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      - fixed 3092421 -- javascript: URL that opens window crashes Alex if typed into empty window · 0e8c0cec
      darin authored
              * kwq/KWQKHTMLPart.h:
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::KWQKHTMLPart): Set _ownsView to false.
              (KWQKHTMLPart::~KWQKHTMLPart): Delete the view if we own it. Also release
      	_currentEvent to fix a leak.
              (KWQKHTMLPart::setView): Delete the old view if we own it. Also, set the
      	_ownsView flag.
              (KWQKHTMLPart::createDummyDocument): Create a dummy view too.
              * kwq/KWQDummyView.h: Added.
              * kwq/KWQDummyView.m: Added.
              * WebCore.pbproj/project.pbxproj: Added KWQDummyView.
              * kwq/WebCoreBridge.h: Remove bridgeOwnsKHTMLView and currentEvent.
              * kwq/WebCoreBridge.mm:
              (-[WebCoreBridge createKHTMLViewWithNSView:marginWidth:marginHeight:]):
      	Pass true to setView instead of setting bridgeOwnsKHTMLView.
              (-[WebCoreBridge removeFromFrame]): Just call setView on the part. It
      	knows how to handle ownership now.
              (-[WebCoreBridge installInFrame:]): Call setOwnsView instead of setting
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • trey's avatar
      First checkin of making frames work with the back forward list, restoring... · 9ca0d00f
      trey authored
      First checkin of making frames work with the back forward list, restoring scroll position and form state.  Fixing:
      3014555 Lose frameset context going back/forward
      3078151 History inconsistency after loading frame content
      3089551 REGRESSION: www.bmwusa.com frames don't load in alex-30
      3095878 refresh doesn't preserve frame state
              * khtml/khtml_part.cpp:
              (KHTMLPart::requestFrameName):  Call through bridge to get generated frame name.
              * kwq/KWQKHTMLPart.h:
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::generateFrameName):  New call that just forwards through the bridge.
              * kwq/WebCoreBridge.h:
              * History.subproj/WebBackForwardList.m:
              (-[WebBackForwardList addEntry:]):  Yank code to avoid adding a duplicate entry, to catch the
      	refresh case.  That's dealt with in WebFramePrivate now.
              (-[WebBackForwardList description]):  Enhanced to print more info.
              * History.subproj/WebHistoryItem.h:
      	History items now hold an array of subitems to mirror the frame tree.  One item in the tree
      	is designated the target of the navigation.
              * History.subproj/WebHistoryItem.m:
              (-[WebHistoryItem dealloc]):  Release new ivars.
              (-[WebHistoryItem isTargetItem]):
              (-[WebHistoryItem setIsTargetItem:]):
      	New setter and setter.
              (-[WebHistoryItem _recurseToFindTargetItem]):
              (-[WebHistoryItem targetItem]):
      	Search the tree to find the target item.
              (-[WebHistoryItem children]):
              (-[WebHistoryItem addChildItem:]):
              (-[WebHistoryItem childItemWithName:]):
      	Maintain and search new child item list.
              (-[WebHistoryItem description]):
      	Enhanced to print out the tree of items.
              (-[WebHistoryItem dictionaryRepresentation]):
              (-[WebHistoryItem initFromDictionaryRepresentation:]):
      	Save and load the new state.
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge generateFrameName]):  New call from KWQ, just forwards to Frame.
              (-[WebBridge createChildFrameNamed:withURL:renderPart:allowsScrolling:marginWidth:marginHeight:]):
      	Call new frame method dedicated to this case.
              (-[WebBridge saveDocumentState:]):
              (-[WebBridge documentState]):
      	Call frame methods to get the right item to save/restore to/from.
              * WebView.subproj/WebController.m:
              (-[WebController _goToItem:withLoadType:]):  Stop any current loading before going to a new item.
              (-[WebController goBack]):
              (-[WebController goForward]):
              (-[WebController goBackOrForwardToItem:]):  Name change of private method (for consistency)
              * WebView.subproj/WebDataSourcePrivate.h:
      	ProvisionalItem and PreviousItem are moved back up to WebFrame, where we know more about the
      	state transitions that happen during loading.
              * WebView.subproj/WebDataSourcePrivate.m:
              (-[WebDataSourcePrivate dealloc]): Don't release removed ivars.
              (-[WebDataSource _commitIfReady]): Make the view representations -after- the transition to committed.
      	This allows us to save away the scroll location successfully, since making the view was resetting it.
              * WebView.subproj/WebFrame.h:
              * WebView.subproj/WebFrame.m:
              (-[WebFrame setProvisionalDataSource:]):  Saving the scroll location has moved elsewhere to handle frames.
              (-[WebFrame stopLoading]):  Skip all the work if we're already state=complete.
              * WebView.subproj/WebFramePrivate.h:
      	The frame now holds a ref to the current, previous and provisional back-forward items.
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFramePrivate dealloc]):  Release new state.
              (-[WebFramePrivate setProvisionalItem:]):
              (-[WebFramePrivate setPreviousItem:]):
              (-[WebFramePrivate setCurrentItem:]):	New setters (1 line getters were missed by script)
              (-[WebFrame _addBackForwardItemClippedAtTarget:]):  Adds a BF item to the top of the BF list.
              (-[WebFrame _createItem]):  Create a single BF item.
              (-[WebFrame _createItemTreeWithTargetFrame:clippedAtTarget:]):  Create a tree of BF items, which
      	mirror the frame tree.
              (-[WebFrame _immediateChildFrameNamed:]):  New frame search utility (doesn't recurse)
              (-[WebFrame _detachFromParent]):  Save the scroll position when detaching a frame.
              (-[WebFrame _transitionToCommitted]):  Maintain new item ivars.  Save scroll position when
      	appropriate.  Hook up items for child frames to their parent, as they are created.
              (-[WebFrame _setState:]):  Clear previousItem whenever we reach committed.
              (-[WebFrame _isLoadComplete]):  Clear previousItem if we are committed.
              (-[WebFrame _childFramesMatchItem:]):  Does the frame's frame tree match the one held by the item?
              (-[WebFrame _loadItem:fromItem:withLoadType:]):  Only do simple anchor navigation if the frame
      	has no children (fixes oddball corner case with a frame reloading itself).  Set provisional item.
              (-[WebFrame _recursiveGoToItem:fromItem:withLoadType:]):  Heart of returning to an item that had
      	frames.  We either find that the existing content is good, or initiate a load.
              (-[WebFrame _goToItem:withLoadType:]):  Adjust the BF list cursor, and recurse to do the work.
              (-[WebFrame _loadURL:loadType:clientRedirect:triggeringEvent:]):  Only do anchor-style nav if
      	the destination URL has a fragment.  Save scroll position.
              (-[WebFrame _loadURL:intoChild:]):  If returning to an item with frames, possibly replace the
      	new content with the stuff that was there at the time, substituting the URL.
              (-[WebFrame _saveScrollPositionToItem:]):  Don't croak on nil item or view.
              (-[WebFrame _restoreScrollPosition]):  Do croak (ASSERT) on nil item.
              (-[WebFrame _scrollToTop]):  Nit cleanup.
              (-[WebFrame _addFramePathToString:]):  Add a component for our frame to the frame name we're generating.
              (-[WebFrame _generateFrameName]):  Generate a frame name that is repeatable.
              (-[WebFrame _itemForSavingDocState]):  Returns correct item to use for formstate save.
              (-[WebFrame _itemForRestoringDocState]):  Returns correct item to use for formstate restore
              * BrowserDocument.m:
              (-[BrowserDocument _addItem:toMenu:]):
      	For a back-forward item that's a tree because its for a frameset, use the
      	right item of the tree to generate the menu contents.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  6. 08 Nov, 2002 1 commit
  7. 04 Nov, 2002 1 commit
    • mjs's avatar
      Changes to send NSEvents all the way through WebCore and then pass · 04150d1f
      mjs authored
      	them back out to WebKit, so that click policy can have a
      	WebResourceRequest added.
              * kwq/KWQKHTMLPart.h:
              * kwq/KWQKHTMLPart.mm:
              * kwq/WebCoreBridge.h:
              * kwq/WebCoreBridge.mm:
              (-[WebCoreBridge mouseUp:]):
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  8. 30 Oct, 2002 2 commits
    • darin's avatar
      - fixed crash when you open an empty window and just hit tab, tab, tab · 9e04d6dc
      darin authored
              * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::nextKeyViewInFrame): Check for nil.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      WebCore: · d6ad6b4c
      darin authored
      	- fixed 3086564 -- REGRESSION: meta-refresh to the same page doesn't refresh
      	The key is to get args.reload passed through to the bridge.
              * kwq/WebCoreBridge.h: Add reload parameter to loadURL:.
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::openURL): Pass NO for reload.
              (KWQKHTMLPart::openURLRequest): Pass args.reload for reload.
              (KWQKHTMLPart::urlSelected): Pass args.reload for reload.
              (KWQKHTMLPart::submitForm): Pass args.reload for reload.
      	- fixed a memory problem with the use of NSBrowser in KWQListBox
              - fixed 2863040 -- multiple default items in select list not selected
      	Switched to use NSTableView instead of NSBrowser. This should also create
      	a measurable speedup due to other changes to this class.
              * kwq/KWQListBox.h: Remove firstItem(), the insertItem() that takes a QListBoxItem
      	parameter, and deleteItems(). Add _items, _width, and _widthGood. Removed _head.
      	Removed the QListBoxItem and QListBoxText classes.
              * kwq/KWQListBox.mm:
              (QListBox::QListBox): Create a KWQListBoxScrollView and put an NSTableView
      	inside it. Also create an NSMutableArray to hold the items.
              (QListBox::~QListBox): Disconnect the table view from the delegate before
      	releasing it. Also release the items array.
              (QListBox::count): Return the array count.
              (QListBox::clear): Do a reloadData here instead of loadColumnZero.
              (QListBox::setSelectionMode): Update for table view.
              (QListBox::insertItem): Update for table view.
              (QListBox::insertGroupLabel): Just calls insertItem for now.
              (QListBox::endBatchInsert): Update for table view.
              (QListBox::setSelected): Update for table view, including support for multiple
              (QListBox::isSelected): Update for table view.
              (QListBox::sizeForNumberOfLines): Use the table view cell for width, and
      	cache it so we don't have to measure all the strings over and over again.
              (-[KWQListBoxScrollView setFrameSize:]): Resize the table view column whenever
      	the entire scroll view is resized.
              (-[KWQListBoxTableViewDelegate initWithListBox:]): Store box pointer and
              pointer to items array.
              (-[KWQListBoxTableViewDelegate numberOfRowsInTableView:]): Return count.
              (-[KWQListBoxTableViewDelegate tableView:objectValueForTableColumn:row:]):
      	Get the data from the items array.
              (-[KWQListBoxTableViewDelegate tableViewSelectionDidChange:]): Call both the
      	selection-changed signal and the clicked signal.
              * khtml/rendering/render_form.cpp: (RenderSelect::updateFromElement):
      	Get rid of the one place here that gets at a list box item by calling a KWQ
      	function insertGroupLabel instead of making a QListBoxText. Also call
              beginBatchInsert() before clear() for a slight additional speed boost.
      	- fixed 3067572 -- javascript: URLs typed into page address field or
      	bookmarks don't work in empty window
      	We needed a document for DOM, so we make a dummy one. This works for an empty
      	window, and also for a window with non-HTML content.
              * kwq/KWQKHTMLPart.h: Added createDummyDocument().
              * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::createDummyDocument): Create an empty
      	DOM document if there isn't one already.
              * kwq/WebCoreBridge.mm:
              (-[WebCoreBridge stringByEvaluatingJavaScriptFromString:]): Call the new
      	createDummyDocument() instead of checking and doing nothing if there is no
      	document present when this is called.
      	- other stuff
              * kwq/WebCoreBridge.mm: (-[WebCoreBridge DOMDocument]): Removed a stray printf.
              * kwq/KWQTextArea.mm: Tweaked code a little.
      	- fixed 3086564 -- REGRESSION: meta-refresh to the same page doesn't refresh
      	The key is to respect the new reload: parameter from the bridge.
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge loadURL:reload:]): Don't ever treat a reload as a redirect.
      	Set the cache policy to WebRequestCachePolicyLoadFromOrigin if it's a reload.
      	- fixed 3087214 -- REGRESSION: <WebKit/WebKit.h> contains #import of non-existent header
              * Misc.subproj/WebKit.h: Removed import of WebControllerSets.h, which is private.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2507 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  9. 28 Oct, 2002 1 commit
    • darin's avatar
      - fixed 3070484 -- icon rollovers are very slow on Mac OS X website · 9809576b
      darin authored
      	The problem was simply that the part didn't know it was complete.
      	To let it know, I hooked up some loader signals, and now it works.
              * khtml/khtml_part.cpp:
              (KHTMLPart::init): Create the KWQKHTMLPart a little earlier so we have
      	a chance to initialize the cache before it's used.
              (KHTMLPart::slotLoaderRequestStarted): Take this out of ifdefs.
              (KHTMLPart::slotLoaderRequestDone): Ditto.
              * khtml/misc/loader.h: Add a KWQLoader pointer to the loader.
              * khtml/misc/loader.cpp:
              (Loader::Loader): Create a KWQLoader;
              (Loader::~Loader): Destroy the KWQLoader.
              (Loader::load): Take out ifdefs around code that emits requestStarted.
              * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::KWQKHTMLPart): Call Cache::init().
              * kwq/KWQLoader.h: Add a class KWQLoader, with three signals in it.
              * kwq/KWQLoader.mm: (KWQLoader::KWQLoader): Initialize the three signals.
              * kwq/KWQSignalStubs.mm:
              (Loader::requestDone): Emit the signal using KWQLoader.
              (Loader::requestFailed): Ditto.
              (Loader::requestStarted): Ditto.
              * kwq/KWQSlot.h: Add an overload for slots with loader and cached object
      	parameters so we can handle the new slots.
              * kwq/KWQSlot.mm:
              (KWQSlot::KWQSlot): Added slotLoaderRequestDone and slotLoaderRequestStarted.
              (KWQSlot::call): Added the new overload to handle those two signals.
              * kwq/KWQSignal.h: Add an overload for signals with loader and cached object
      	parameters so we can handle the new signals.
              * kwq/KWQSignal.mm: (KWQSignal::call): Ditto.
              * kwq/KWQObject.mm: (QObject::connect): Remove the special casing that
      	prevents complaints about slotLoaderRequestDone and slotLoaderRequestStarted,
      	since we support those now.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2501 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  10. 26 Oct, 2002 3 commits
    • darin's avatar
      - changed naming scheme in KWQ for files like qstring.h · b381a87d
      darin authored
              Now use names like KWQString.h and make a forwarding header called qstring.h.
              * tons of files
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      WebCore: · a8052be3
      darin authored
      	- fixed 3068404 -- eliminate all user-visible messages from WebCore
              * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Use runJavaScriptPrompt
      	function instead of the more generic QInputDialog.
              * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::altText): Get
      	submit alt text for input element from the view factory, rather than using
      	i18n, since we don't support that.
              * khtml/html/htmlparser.cpp: (KHTMLParser::handleIsindex): Ditto, for the
      	intro that says "This is a searchable index".
              * khtml/rendering/render_form.cpp:
              (RenderSubmitButton::defaultLabel): Ditto, for "Submit".
              (RenderResetButton::defaultLabel): Ditto, for "Reset".
              (RenderFileButton::slotClicked): Ifdef'd out this unused code that had i18n text in it.
              * khtml/xml/xml_tokenizer.cpp:
              (XMLHandler::errorString): Put in an ifdef and a FIXME to avoid i18n.
              (XMLHandler::fatalError): Ditto.
              (XMLTokenizer::finish): Ditto.
              * khtml/misc/decoder.cpp: (Decoder::decode): Ifdef'd the check for the first
      	language being "ja", since that's not how we're going to trigger Japanese
              * khtml/rendering/render_applet.cpp: (RenderEmptyApplet::RenderEmptyApplet):
      	Turned off the code that does the empty applet label. I don't think it worked,
      	and it used i18n. We'll have to tackle this eventually.
              * kwq/KWQKHTMLPartImpl.h: Added runJavaScriptPrompt.
              * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::runJavaScriptPrompt): Moved the code
      	here that used to be in KWQInputDialog.
              * kwq/kdecore/klocale.h: Remove i18n() and KLocale::languageList(), added the functions
      	that are listed below.
              * kwq/KWQKLocale.mm:
              (inputElementAltText): Added specific function for getting one of the very few
      	translated strings that we need in WebCore.
              (resetButtonDefaultLabel): Ditto.
              (searchableIndexIntroduction): Ditto.
              (submitButtonDefaultLabel): Ditto.
              (KLocale::language): Use the view factory to ask for the language code, since there's no
      	public API to get it that WebCore can use.
              * kwq/WebCoreViewFactory.h: Add new API for above.
              * ForwardingHeaders/qinputdialog.h: Added empty file.
              * kwq/qt/qinputdialog.h: Removed.
              * kwq/KWQInputDialog.mm: Removed.
              * WebCore.pbproj/project.pbxproj: Removed QInputDialog files.
              * WebCoreSupport.subproj/WebViewFactory.m:
              (-[WebViewFactory inputElementAltText]): Added.
              (-[WebViewFactory resetButtonDefaultLabel]): Added.
              (-[WebViewFactory searchableIndexIntroduction]): Added.
              (-[WebViewFactory submitButtonDefaultLabel]): Added.
              (-[WebViewFactory defaultLanguageCode]): Added.
              * English.lproj/Localizable.strings: Update.
              * English.lproj/StringsNotToBeLocalized.txt: Update.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      WebCore: · db9d82e2
      darin authored
      	Remove some user-visible strings. We can't have any strings that need
      	localization in WebCore, given our translation strategy.
              * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::encoding):
      	Put APPLE_CHANGES around some i18n dialog code.
              * khtml/khtml_part.cpp: (KHTMLPart::submitForm): Ditto.
              * khtml/rendering/render_frames.cpp:
              (RenderPartObject::slotPartLoadingErrorNotify): Ditto.
              * khtml/ecma/kjs_window.cpp:
              (Window::get): Ditto.
              (Window::scheduleClose): Ditto.
              (WindowFunc::tryCall): Put APPLE_CHANGES in to use JavaScript-specific methods
              in the part of calling the generic ones from KMessageBox.
              * ForwardingHeaders/kmessagebox.h: Added (empty file).
              * kwq/KWQKHTMLPartImpl.h: Added new runJavaScript functions.
              * kwq/KWQKHTMLPartImpl.mm:
              (KWQKHTMLPartImpl::runJavaScriptAlert): Added.
              (KWQKHTMLPartImpl::runJavaScriptConfirm): Added.
              * kwq/WebCoreViewFactory.h: Added runJavaScriptAlertPanelWithMessage and
              * kwq/kdeui/kmessagebox.h: Removed.
              * kwq/KWQKMessageBox.mm: Removed.
              * WebCore.pbproj/project.pbxproj: Removed the KMessageBox files.
              * WebCoreSupport.subproj/WebViewFactory.m:
              (-[WebViewFactory runJavaScriptAlertPanelWithMessage:]): Added.
              (-[WebViewFactory runJavaScriptConfirmPanelWithMessage:]): Added.
              * English.lproj/Localizable.strings: Update.
              * English.lproj/StringsNotToBeLocalized.txt: Update.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  11. 25 Oct, 2002 1 commit
    • cblu's avatar
      WebCore: · 20be1bdc
      cblu authored
      	Cleaned up the frame searching shenanigans. Things are much cleaner and clearer now.
              * kwq/KWQKHTMLPartBrowserExtension.mm:
              (KHTMLPartBrowserExtension::createNewWindow): call findFrameNamed
              * kwq/KWQKHTMLPartImpl.mm:
              (KWQKHTMLPartImpl::bridgeForFrameName): call findOrCreateFramedNamed
              * kwq/WebCoreBridge.h:
      	Cleaned up the frame searching shenanigans. Things are much cleaner and clearer now.
              * Plugins.subproj/WebBaseNetscapePluginView.m:
              (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:]): call findOrCreateFramedNamed
              * Plugins.subproj/WebPluginController.m:
              (-[WebPluginController showURL:inFrame:]): call findOrCreateFramedNamed
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge childFrames]): moved
              (-[WebBridge mainFrame]): moved
              (-[WebBridge findOrCreateFramedNamed:]): call findOrCreateFramedNamed on the frame
              (-[WebBridge pluginViewWithPackage:attributes:baseURL:]): call _pluginController
              * WebView.subproj/WebControllerPrivate.m:
              (-[WebController _frameInThisWindowNamed:]): call _descendantFrameNamed
              * WebView.subproj/WebFrame.h:
              * WebView.subproj/WebFrame.m:
              (-[WebFrame findFrameNamed:]): was frameNamed. First checks special-case frame names, descendant frames, then the whole controller, then other controllers.
              (-[WebFrame findOrCreateFramedNamed:]): calls findFrameNamed, opens new window if necessary
              * WebView.subproj/WebFramePrivate.h:
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _descendantFrameNamed:]): searches children, children's children etc.
              (-[WebFrame _pluginController]): this method needed an "_"
              * WebView.subproj/WebHTMLView.m:
              (-[WebHTMLView addSubview:]): call _pluginController
              * WebView.subproj/WebHTMLViewPrivate.m:
              (-[WebHTMLView _elementAtPoint:]): no need to special case for "_blank" since findFrameNamed will return nil for that name
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  12. 24 Oct, 2002 2 commits
    • cblu's avatar
      WebCore: · ba812dc9
      cblu authored
      	Removed didAddSubview calls because that can easily be done in WebKit. Duh!
              * khtml/rendering/render_frames.cpp:
              * kwq/KWQKHTMLPartImpl.h:
              * kwq/KWQKHTMLPartImpl.mm:
              * kwq/KWQKJavaAppletWidget.mm:
              * kwq/WebCoreBridge.h:
      	Some clean-up and bug fixes for new plug-in support.
              * Plugins.subproj/WebPluginController.m:
              (-[WebPluginController initWithWebFrame:]): need a colon after windowWillClose
              (-[WebPluginController addPluginView:]): added logging
              (-[WebPluginController didAddPluginView:]): added logging
              (-[WebPluginController startAllPlugins]): added logging
              (-[WebPluginController stopAllPlugins]): added logging
              (-[WebPluginController destroyAllPlugins]): added logging
              * Plugins.subproj/WebPluginPackage.m:
              (-[WebPluginPackage getMIMEInformation]): use correct dict key for getting MIME descriptions
              * WebCoreSupport.subproj/WebBridge.m: no more didAddSubview
              * WebView.subproj/WebFramePrivate.h: no more didAddSubview
              * WebView.subproj/WebFramePrivate.m: no more didAddSubview
              * WebView.subproj/WebHTMLView.m:
              (-[WebHTMLView addSubview:]): call didAddPluginView on WebPluginController
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2459 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • cblu's avatar
      WebCore: · e584e6f1
      cblu authored
      	Use "MIMEType" instead of "serviceType".
              * kwq/KWQKHTMLPartImpl.mm:
              * kwq/WebCoreBridge.h:
      	- Use "MIMEType" instead of "serviceType".
              * Plugins.subproj/WebBasePluginPackage.h:
              * Plugins.subproj/WebBasePluginPackage.m:
              (-[WebBasePluginPackage load]):
              (-[WebBasePluginPackage dealloc]):
              (-[WebBasePluginPackage filename]):
              (-[WebBasePluginPackage setPath:]):
              * Plugins.subproj/WebNetscapePluginEmbeddedView.h:
              * Plugins.subproj/WebNetscapePluginEmbeddedView.m:
              (-[WebNetscapePluginEmbeddedView initWithFrame:plugin:URL:baseURL:MIMEType:attributes:]):
              * Plugins.subproj/WebNetscapePluginPackage.m:
              (-[WebNetscapePluginPackage getMIMEInformation]): changed name.
              (-[WebNetscapePluginPackage initWithPath:]):
              * Plugins.subproj/WebNullPluginView.h:
              * Plugins.subproj/WebNullPluginView.m:
              (-[WebNullPluginView initWithFrame:MIMEType:attributes:]):
              (-[WebNullPluginView dealloc]):
              (-[WebNullPluginView viewDidMoveToWindow]): send missing plug-ins notification here
              * Plugins.subproj/WebPluginPackage.m:
              (-[WebPluginPackage getMIMEInformation]): new, gets MIME info from plist
              (-[WebPluginPackage initWithPath:]):
              (-[WebPluginPackage dealloc]):
              (-[WebPluginPackage viewFactory]):
              (-[WebPluginPackage load]):
              (-[WebPluginPackage unload]):
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge viewForPluginWithURL:attributes:baseURL:MIMEType:]):
              (-[WebBridge viewForJavaAppletWithFrame:attributes:baseURL:]):
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  13. 23 Oct, 2002 4 commits
    • cblu's avatar
      WebCore: · 65b3be08
      cblu authored
      	WebKit now gets called when render_frame subviews are added.
              * khtml/rendering/render_frames.cpp:
              (RenderPart::setWidget): call didAddWidget on the part
              * kwq/KWQKHTMLPartImpl.h:
              * kwq/KWQKHTMLPartImpl.mm:
              (KWQKHTMLPartImpl::didAddWidget): added, calls didAddSubview on the bridge
      	Support for new plug-in API. This is about as much as I can do without the new java plug-in and java root.
              * Plugins.subproj/WebPluginController.h:
              * Plugins.subproj/WebPluginController.m:
              (-[WebPluginController initWithWebFrame:]): observe window close changes
              (-[WebPluginController dealloc]): remove observer, assert if we're still tracking plug-ins
              (-[WebPluginController didAddSubview:]): start the plug-in
              (-[WebPluginController stopAllPlugins]): stop and destroy all plug-ins.
              (-[WebPluginController windowWillClose:]): call stopAllPlugins if the window in question is closing
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _transitionToCommitted]): call stopAllPlugins on WebPluginController
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      WebFoundation: · 01481afe
      darin authored
              * English.lproj/StringsNotToBeLocalized.txt:
      	- finished up the job of moving the file button to WebKit
      	I did this mainly for localization reasons.
              * kwq/KWQFileButton.h: Remove filename(), add filenameChanged(),
      	make KWQFileButton be a QWidget subclass, not a QPushButton one.
      	Remove clicked() and paint() virtual functions, _filename, _icon,
      	and _label data members.
              * kwq/KWQFileButton.mm:
              (KWQFileButton::KWQFileButton): Just make a WebCoreFileButton.
              (KWQFileButton::~KWQFileButton): Less to do here now.
              (KWQFileButton::setFilename): Call the button to do the work.
              (KWQFileButton::sizeHint): Ditto.
              (KWQFileButton::frameGeometry): Ditto.
              (KWQFileButton::setFrameGeometry): Ditto.
              (KWQFileButton::baselinePosition): Ditto.
              (KWQFileButton::filenameChanged): Added. Sends message.
              (-[KWQFileButtonAdapter initWithKWQFileButton:]): Observe the "filename
      	changed notification".
              (-[KWQFileButtonAdapter dealloc]): Stop observing.
              (-[KWQFileButtonAdapter filenameChanged:]): Send a signal when the notification
      	comes in, so KHTML finds out.
              * kwq/KWQSlot.mm:
              (KWQSlot::KWQSlot): Remove handling for RenderFileButton slotReturnPressed.
              (KWQSlot::call): Ditto.
              * kwq/WebCoreViewFactory.h: Remove bestSize. Add setVisualFrame, visualFrame, and
              * kwq/KWQInputDialog.mm: Tweaked includes. Long-term we want to use "", not <>.
              * kwq/KWQKConfigBase.mm: Ditto.
              * kwq/KWQKHTMLPartImpl.mm: Ditto.
      	- finished up the job of moving the file button here from WebCore.
      	I did this mainly for localization reasons.
              * WebCoreSupport.subproj/WebFileButton.m:
              (-[WebFileButton initWithFrame:]): Set up button control size, font, bezel style,
      	target, and action. Also add it as a subview.
              (-[WebFileButton drawRect:]): Center icon in the "visual frame" part of the view,
      	not the entire bounds.
              (-[WebFileButton setFilename:]): Don't show any icon when the filename is empty.
              (-[WebFileButton bestVisualFrameSize]): Implemented this.
              (-[WebFileButton visualFrame]): Ditto.
              (-[WebFileButton setVisualFrame:]): Ditto.
              (-[WebFileButton baseline]): Ditto.
              (-[WebFileButton beginSheet]): Added. Shared between button presses and other clicks.
              (-[WebFileButton chooseButtonPressed:]): Call beginSheet.
              (-[WebFileButton mouseDown:]): Ditto.
              (-[WebFileButton openPanelDidEnd:returnCode:contextInfo:]): Send the notification,
      	WebCoreFileButtonFilenameChanged, when the filename is changed.
              * WebView.subproj/WebController.m: (-[WebController policyDelegate]):
      	Add a FIXME about the leak I found here.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2440 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • cblu's avatar
      WebCore: · 0a2d9abd
      cblu authored
      	Call the arguments for plug-ins "attributes" everywhere.
              * kwq/KWQKHTMLPartImpl.mm:
              * kwq/KWQKJavaAppletWidget.mm:
              * kwq/WebCoreBridge.h:
      	Call the arguments for plug-ins "attributes" everywhere.
              * Plugins.subproj/WebBaseNetscapePluginView.h:
              * Plugins.subproj/WebBaseNetscapePluginView.m:
              (-[WebBaseNetscapePluginView setAttributes:]):
              * Plugins.subproj/WebNetscapePluginEmbeddedView.h:
              * Plugins.subproj/WebNetscapePluginEmbeddedView.m:
              (-[WebNetscapePluginEmbeddedView initWithFrame:plugin:URL:baseURL:mime:attributes:]):
              * Plugins.subproj/WebNullPluginView.h:
              * Plugins.subproj/WebNullPluginView.m:
              (-[WebNullPluginView initWithFrame:mimeType:attributes:]):
              (-[WebNullPluginView drawRect:]):
              * Plugins.subproj/WebPluginController.h:
              * Plugins.subproj/WebPluginController.m:
              (-[WebPluginController initWithWebFrame:]):
              (-[WebPluginController dealloc]):
              (-[WebPluginController addPluginView:]):
              * Plugins.subproj/WebPluginPackage.h:
              * Plugins.subproj/WebPluginPackage.m:
              (-[WebPluginPackage viewFactory]):
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge pluginViewWithPackage:attributes:baseURL:]):
              (-[WebBridge viewForPluginWithURL:attributes:baseURL:serviceType:]):
              (-[WebBridge viewForJavaAppletWithFrame:attributes:baseURL:]):
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2439 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • cblu's avatar
      WebCore: · 341cf3cb
      cblu authored
      	For the new plug-in API, we need to pass a WebPluginContainer to the plug-in view upon creation. The is owned by the WebFrame. To make this all work, I had to move the WebCore plug-in and java view constructors to WebBridge from WebViewFactory since WebBridge has the frame.
              * khtml/khtml_part.cpp:
              (KHTMLPart::createJavaContext): New APPLE_CHANGES around the java context constructor so we pass the part.
              * kwq/KWQKHTMLPartImpl.mm:
              (KWQKHTMLPartImpl::createPart): call the bridge to create the view
              * kwq/KWQKJavaAppletWidget.mm:
              (KJavaAppletWidget::KJavaAppletWidget): save the context
              (KJavaAppletWidget::showApplet): call the bridge to create the view
              * kwq/WebCoreBridge.h:
              * kwq/WebCoreViewFactory.h:
              * kwq/khtml/java/kjavaappletcontext.h: made constructor take the part
              * kwq/khtml/java/kjavaappletwidget.h: ivar for the context
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge requestedURL]):
              (-[WebBridge viewForPluginWithURL:serviceType:arguments:baseURL:]):
              (-[WebBridge viewForJavaAppletWithFrame:baseURL:parameters:]):
              * WebCoreSupport.subproj/WebViewFactory.m:
              (-[WebViewFactory fileButton]):
              (-[WebViewFactory pluginsInfo]):
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2438 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  14. 22 Oct, 2002 1 commit
  15. 16 Oct, 2002 1 commit
    • darin's avatar
      - fixed 3045570 -- can't select a printer at inkfinder.com · 2bd3a508
      darin authored
              * khtml/khtml_part.cpp: (KHTMLPart::processObjectRequest):
      	Call the new openURL for the case where we are reusing a part.
      	We do this backwards from how KHTML does, so it's twisted.
              * kwq/KWQKHTMLPartImpl.h: Add openURL.
              * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::openURL):
      	Tell the bridge to load the URL.
              * kwq/mac-encodings.txt: Tweak Korean encoding names.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  16. 15 Oct, 2002 4 commits
    • darin's avatar
      WebCore: · 58af41be
      darin authored
      	WebCore support for using referrer even in loads that are not initiated
      	by WebCore itself.
              * kwq/KWQKHTMLPartBrowserExtension.mm:
              (KHTMLPartBrowserExtension::createNewWindow): Don't pass a referrer.
      	We get the referrer from the part.
              * kwq/KWQKHTMLPartImpl.h: Add a new referrer method that works on the
      	part, and remove the old one that got it from the URL arguments.
              * kwq/KWQKHTMLPartImpl.mm:
              (KWQKHTMLPartImpl::bridgeForFrameName): Don't pass a referrer when
      	creating a new window.
              (KWQKHTMLPartImpl::openURLRequest): Don't pass a referrer when doing a load.
              (KWQKHTMLPartImpl::urlSelected): Don't pass a referrer when doing a load.
              (KWQKHTMLPartImpl::createPart): Don't pass a referrer when creating a child
      	frame for this window.
              (KWQKHTMLPartImpl::submitForm): Don't pass a referrer when doing a load.
              (KWQKHTMLPartImpl::referrer): Added.
              * kwq/KWQLoaderImpl.mm: (KWQServeRequest): Don't pass a referrer when starting
      	a load.
              * kwq/WebCoreBridge.h: Add referrer method. Remove referrer parameter from
      	many other methods.
              * kwq/WebCoreBridge.mm: (-[WebCoreBridge referrer]): Added.
      	- fixed 3062393 -- need to send proper referrer for "open in new window" menu items and keyboard shortcuts
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge createWindowWithURL:frameName:]): Don't take a referrer parameter any more.
      	Get the referrer by calling to the other side of the bridge, instead.
              (-[WebBridge startLoadingResource:withURL:]): Ditto.
              (-[WebBridge loadURL:]): Ditto.
              (-[WebBridge postWithURL:data:contentType:]): Ditto.
              (-[WebBridge createChildFrameNamed:withURL:renderPart:allowsScrolling:marginWidth:marginHeight:]):
              * WebView.subproj/WebDefaultContextMenuDelegate.m:
              (-[WebDefaultContextMenuDelegate openNewWindowWithURL:]): Don't take a referrer parameter,
      	which was always nil anyway. Instead, get the referrer from the bridge.
              (-[WebDefaultContextMenuDelegate openLinkInNewWindow:]): Don't pass nil for referrer.
              (-[WebDefaultContextMenuDelegate openImageInNewWindow:]): Ditto.
              (-[WebDefaultContextMenuDelegate openFrameInNewWindow:]): Ditto.
              * WebView.subproj/WebHTMLViewPrivate.m:
              (-[WebHTMLView _continueAfterClickPolicyForEvent:]): Pass a referrer from the bridge, rather
      	than nil, for both WebClickPolicyOpenNewWindow and WebClickPolicyOpenNewWindowBehind.
              * Plugins.subproj/WebBaseNetscapePluginView.m:
              (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:]): Add a FIXME.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2336 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      WebCore: · a820a16e
      darin authored
              * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::urlSelected):
      	Move the special case of a different anchor within the same
      	page into WebKit from here.
              * kwq/kdecore/kurl.h: Mark urlcmp as a friend.
              * kwq/KWQKURL.mm: (urlcmp): Implement the ignoreRef feature, which
      	is needed to make the KHTMLPart::openURL function work right.
              * kwq/WebCoreBridge.h: Removed addBackForwardItemWithURL:anchor:
      	and added URL method.
              * kwq/WebCoreBridge.mm: (-[WebCoreBridge URL]): Added.
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge loadURL:referrer:]): Add a special case for when the URL is the
      	same as the previous URL for the same frame. This relies on some logic in
      	KHTML's openURL method that handles this case too.
              * WebView.subproj/WebDataSource.m:
              (-[WebDataSource initWithRequest:]): Don't bother keeping an inputURL.
              (-[WebDataSource URL]): Just return [[self request] URL]. Maybe we can
      	remove this altogether.
              * WebView.subproj/WebDataSourcePrivate.h: Remove inputURL, finalURL.
              * WebView.subproj/WebDataSourcePrivate.m:
              (-[WebDataSourcePrivate dealloc]): No need to release inputURL, finalURL.
              (-[WebDataSource _setURL:]): Used only by the new code above. Makes a copy
      	of the request, changes the URL, and then drops the old request.
              (-[WebDataSource _setRequest:]): Changed to no longer call _setURL. Now
      	does much of the work that _setURL used to do.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      WebCore: · 7a848867
      darin authored
      	- fixed 3074558 -- frames multiply at: http://www.iarsn.com/
      	The key was to make the name attribute work properly.
              * khtml/ecma/kjs_window.cpp:
              (Window::get): Enable the "name" attribute.
              (Window::put): Enable the "name" attribute, but don't do the
      	conversion to an 8-bit string -- leave it as a QString.
              * kwq/WebCoreBridge.h: Add setName/name methods.
              * kwq/WebCoreBridge.mm:
              (-[WebCoreBridge setName:]): Added. Calls part->setName().
              (-[WebCoreBridge name]): Added. Calls part->name().
              * kwq/kparts/part.h: Added setName/name to ReadOnlyPart.
              * kwq/KWQKHTMLPartImpl.mm: Remove old bogusish comment.
      	WebKit part of improved frame name support.
              * WebView.subproj/WebFrame.m:
              (-[WebFrame initWithName:webView:provisionalDataSource:controller:]):
      	Call setName on the newly created part.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      - fixed 3054791 -- crash in WebCoreSettings _updateAllViews changing font · 963c996f
      darin authored
              * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::~KWQKHTMLPartImpl):
      	Pass in the "this" pointer so that the right instance is removed from the
      	instances list. Before, we would always remove the first instance from the
      	list, leaving the list broken.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  17. 09 Oct, 2002 1 commit
    • darin's avatar
      WebCore: · c7a89cb8
      darin authored
      	- fixed 3069264 -- REGRESSION: windows created for links with
      	target=blank start out hidden (window menu only)
              * kwq/WebCoreBridge.h: Removed openNewWindowWithURL:referrer:frameName: and
      	added createWindowWithURL:referrer:frameName: and showWindow.
              * kwq/KWQKHTMLPartBrowserExtension.mm:
              (KHTMLPartBrowserExtension::createNewWindow): Call createWindowWithURL,
      	and then showWindow after the window is set up. Also change the code that
      	flips coordinates to always use the height of the first screen instead of
      	using the height of the screen the window is on, which sounds right, but
      	is wrong.
              * kwq/KWQKHTMLPartImpl.mm:
              (KWQKHTMLPartImpl::bridgeForFrameName): Call createWindowWithURL and then
      	showWindow in the case where we create a window.
              (KWQKHTMLPartImpl::urlSelected): Remove unused command-click code. The real
      	command-click code is in the browser now.
      	WebKit support for creating windows and then showing them later
      	after setting them up.
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge createWindowWithURL:referrer:frameName:]): Replaced the old
      	openNewWindowWithURL with this. It calls the new window operations delegate
              (-[WebBridge showWindow]): Added. Calls the window operations delegate showWindow method.
              (-[WebBridge createChildFrameNamed:withURL:referrer:renderPart:allowsScrolling:marginWidth:marginHeight:]):
      	Call _createFrameNamed instead of createFrameNamed.
              * WebView.subproj/WebWindowOperationsDelegate.h: Replaced the openNewWindowWithURL
      	method with a new method named createWindowWithURL. Added showWindow and showWindowBehindFrontmost.
              * WebView.subproj/WebControllerPrivate.h: Renamed createFrameNamed to _createFrameNamed
      	and removed the data source parameter. Added _openNewWindowWithURL:referrer:behind:
      	for the convenience of those who used to call the window operations delegate directly
      	to open the window.
              * WebView.subproj/WebControllerPrivate.m:
              (-[WebController _createFrameNamed:inParent:allowsScrolling:]): Renamed, and removed
      	the data source parameter.
              (-[WebController _openNewWindowWithURL:referrer:behind:]): Added.
              * Plugins.subproj/WebBaseNetscapePluginView.m:
              (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:]):
              * WebView.subproj/WebDefaultContextMenuDelegate.m:
              (-[WebDefaultContextMenuDelegate openNewWindowWithURL:referrer:]):
              * WebView.subproj/WebFrame.m: (-[WebFrame frameNamed:]):
              * WebView.subproj/WebHTMLViewPrivate.m:
              (-[WebHTMLView _continueAfterClickPolicyForEvent:]):
      	Use a private WebController method instead of calling the delegate directly,
      	because it now takes two method calls to create and display a new window.
              * Misc.subproj/WebNSViewExtras.m:
              * WebCoreSupport.subproj/WebSubresourceClient.m:
              * WebView.subproj/WebController.m:
              * WebView.subproj/WebDataSource.m:
              * WebView.subproj/WebFramePrivate.m:
              * WebView.subproj/WebHTMLView.m:
              * WebView.subproj/WebMainResourceClient.m:
              * WebView.subproj/WebPreferences.m:
              * WebView.subproj/WebView.m:
              * WebView.subproj/WebViewPrivate.m:
      	Tweaked comments.
      	WebBrowser support for creating windows and then showing them later
      	after setting them up.
              * BrowserDocumentController.h: Add a new policy, CreateHiddenWindow.
              * BrowserDocumentController.m:
              (-[BrowserDocumentController _goToEachURL:referrer:windowPolicy:]):
      	Pass NO for display if policy is CreateHiddenWindow.
              (-[BrowserDocumentController tryMultipleURLs:windowPolicy:]): Ditto.
              * BrowserWebController.m:
              (-[BrowserWebController createWindowWithURL:referrer:]): Added. Like
      	the old openNewWindowWithURL method, but uses CreateHiddenWindow.
              (-[BrowserWebController showWindow]): Added. Tells the window controller
      	to show the window.
              (-[BrowserWebController showWindowBehindFrontmost]): Added. Tells the
      	window controllers to show the window after telling the document that
      	the window should open behind the frontmost.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2291 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  18. 08 Oct, 2002 1 commit
  19. 07 Oct, 2002 1 commit
    • darin's avatar
      WebFoundation: · fde25760
      darin authored
      	WebFoundation part of implementation of multipart forms posting.
              * ProtocolHandlers.subproj/WebSimpleHTTPProtocolHandler.m:
              (-[WebSimpleHTTPProtocolHandler _addRequestMessageBody:]):
              * ProtocolHandlers.subproj/WebCFNetworkHTTPProtocolHandler.m:
              (-[WebCFNetworkHTTPProtocolHandler addRequestMessageBody:]):
      	Remove obsolete support for non-NSData form data. Use the contentType
      	in the request, if present.
              * ProtocolHandlers.subproj/WebHTTPResourceRequest.h: Add contentType
      	and setContentType methods; convenience for setting the Content-Type header.
              * ProtocolHandlers.subproj/WebHTTPResourceRequest.m:
              (-[WebResourceRequest _headerForKey:]): Added.
              (-[WebResourceRequest userAgent]): Use _headerForKey.
              (-[WebResourceRequest referrer]): Ditto.
              (-[WebResourceRequest contentType]): Added. Use _headerForKey.
              (-[WebResourceRequest setContentType:]): Added.
              * ProtocolHandlers.subproj/WebHTTPProtocolHandler.h: Remove requestData.
              * ProtocolHandlers.subproj/WebHTTPProtocolHandler.m: Ditto.
      	WebCore part of implementation of multipart forms posting.
              * kwq/WebCoreBridge.h: Add a contentType parameter to the bridge's
      	[postWithURL:referrer:data:] method.
              * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::submitForm):
      	Extract the content type from the args, and pass it along to the bridge.
      	WebKit part of implementation of multipart forms posting.
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge postWithURL:referrer:data:contentType:]):
      	Add a contentType parameter to match change in WebCore API.
      	Put the contentType value into the request.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2270 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  20. 02 Oct, 2002 1 commit
    • darin's avatar
      WebCore: · 7638f30c
      darin authored
      	Moved "overURL" handling out of WebCore into WebKit and Alex.
      	Also separated the two levels of the "element dictionary" so they
      	don't rely on having the same keys.
              * khtml/khtml_part.h: Revert the APPLE_CHANGES to overURL.
              * khtml/khtml_part.cpp:
              (KHTMLPart::overURL): Removed the APPLE_CHANGES and just ifdef'd out
      	the whole thing for our version.
              (KHTMLPart::khtmlMouseMoveEvent): Get rid of the APPLE_CHANGES and
      	don't do any of the status bar setup.
              * kwq/KWQKHTMLPartImpl.h: Remove overURL.
              * kwq/KWQKHTMLPartImpl.mm: Ditto.
              * kwq/WebCoreBridge.h: Change keys so they don't match the WebKit ones so
      	we don't accidentally rely on that. Add WebCoreElementLinkTarget.
              * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): Add code to
      	set up WebCoreElementLinkTarget.
      	Machinery so we can handle mouseover feedback at the browser level.
              * WebView.subproj/WebWindowOperationsDelegate.h: Added mouseDidMoveOverElement:modifierFlags:.
              * WebKit.exp: Export WebElementLinkTargetFrameKey.
              * WebView.subproj/WebController.h: Add WebElementLinkTargetFrameKey.
              * WebView.subproj/WebController.m: Ditto.
              * WebView.subproj/WebHTMLView.m:
              (-[WebHTMLView removeMouseMovedObserver]): Send a callback when we
      	stop tracking the mouse altogether.
              (-[WebHTMLView viewDidMoveToWindow]): Only set up the mouse moved
      	observer if we are the top-level HTML view.
              (-[WebHTMLView windowDidBecomeMain:]): Ditto.
              (-[WebHTMLView mouseMovedNotification:]): Handle mouse over if we are
      	over any subview of the HTML view. Also send the callback.
              * WebView.subproj/WebHTMLViewPrivate.h: Added lastMouseOverElementWasNotNil,
      	_mouseOverElement:modifierFlags: and _insideAnotherHTMLView.
              * WebView.subproj/WebHTMLViewPrivate.m:
              (-[WebHTMLView _elementAtPoint:]): Copy over each element separately so
      	we don't rely on keys matching. Find the target frame given the target string,
      	and include it in the dictionary.
              (-[WebHTMLView _mouseOverElement:modifierFlags]): Added. Calls the window
      	operations delegate method, but doesn't call it over and over again if the
      	information is still "nil".
              (-[WebHTMLView _insideAnotherHTMLView]): Added.
              (-[NSMutableDictionary _web_setObjectIfNotNil:forKey:]): Added. Helper for
      	the _elementAtPoint method which could be moved to WebNSDictionaryExtras some day.
      	- fixed 2935687 -- cmd-shift-click should open new window behind
      	- fixed 3050456 -- Click modifier actions are decided by WebBrowser,
      	but status messages come from WebCore
              * BrowserWebController.m:
              (-[BrowserWebController mouseDidMoveOverElement:modifierFlags:]): Added.
      	Contains the same logic that used to be in WebCore for mouseover messages,
      	but translated into WebKit-ese as opposed to WebCore-ese.
              * WebBrowser.pbproj/project.pbxproj: Change encoding of BrowserWebController.m
      	to UTF-8. Be careful if you open this file without having the project open in
      	Project Builder.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2232 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  21. 28 Sep, 2002 1 commit
    • darin's avatar
      WebCore: · d8c534a0
      darin authored
      	- fixed 2886111 -- changing font or size preference causes open
      	windows to redraw incorrectly
              * khtml/rendering/render_table.cpp: (RenderTable::addColInfo):
      	Fix logic about when a recalc of the minWidth and maxWidth is needed.
      	Fixed bug where changing the text size multiplier would cause the
      	window to redraw twice -- once with the text size changed, and then
      	later with the layout changed.
              * khtml/khtmlview.h: Added unscheduleRelayout.
              * khtml/khtmlview.cpp: (KHTMLView::unscheduleRelayout): Added.
              * kwq/KWQKHTMLPartImpl.h: Added forceLayout.
              * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::forceLayout): Call
      	both layout and unscheduleRelayout.
              * kwq/WebCoreBridge.h: Add setNeedsLayout.
              * kwq/WebCoreBridge.mm:
              (-[WebCoreBridge forceLayout]): Call KWQKHTMLPartImpl::forceLayout.
              (-[WebCoreBridge setTextSizeMultiplier:]): Call forceLayout.
              * WebCoreSupport.subproj/WebBridge.m: (-[WebBridge setNeedsLayout]): Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  22. 27 Sep, 2002 1 commit
    • rjw's avatar
      WebBrowser no longer responsible for setting page title in history. · baa288b2
      rjw authored
              * LocationChangeHandler.m:
              (-[LocationChangeHandler receivedPageTitle:forDataSource:]):
              Fixed 3060158:  REGRESSION: iframes added to session history
              Also moved setting title in history to WebKit.
              * History.subproj/WebHistory.h:
              * History.subproj/WebHistory.m:
              (+[WebHistory sharedHistory]):
              (+[WebHistory webHistoryWithFile:]):
              (-[WebHistory addEntryForURL:]):
              (-[WebHistory addEntries:]):
              * History.subproj/WebHistoryPrivate.h:
              * History.subproj/WebHistoryPrivate.m:
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge requestedURL]):
              * WebView.subproj/WebDataSourcePrivate.m:
              (-[WebDataSource _setTitle:]):
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _transitionToCommitted]):
              * WebView.subproj/WebHTMLView.m:
              (-[WebHTMLView mouseDragged:]):
              Fixed 3059237:  Visited links do not appear in a different color on yahoo.com
              Fixed 3051288:  visited links are not colored in local files
              Fixed 3060158:  REGRESSION: iframes added to session history
              Always use the canonical originally requested URL as the URL entered in history.
              * khtml/khtml_part.cpp:
              * kwq/KWQKHTMLPartImpl.h:
              * kwq/KWQKHTMLPartImpl.mm:
              * kwq/KWQKHistoryProvider.mm:
              * kwq/WebCoreBridge.h:
              * kwq/WebCoreHistory.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2189 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  23. 26 Sep, 2002 1 commit
    • darin's avatar
      - fixed 3060459 -- REGRESSION: crash leaving page that sets cookie in JavaScript · bd2301e7
      darin authored
      	unload handler
              * khtml/khtml_part.cpp: (KHTMLPart::begin): Call updatePolicyBaseURL to set
      	the "policy base URL" on the documents so the cookie can be based on the URL
      	of the main document.
              * khtml/dom/html_document.h: Add setPolicyBaseURL.
              * khtml/dom/html_document.cpp: (HTMLDocument::setPolicyBaseURL): Call the impl.
              * khtml/html/html_documentimpl.h: Add policyBaseURL, setPolicyBaseURL.
              * khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::setCookie): Pass the
      	base URL that's stored here instead of getting at the part through the view,
      	since the view will be 0 during the unload event.
              * kwq/KWQKHTMLPartImpl.h: Add updatePolicyBaseURL and setPolicyBaseURL.
              * kwq/KWQKHTMLPartImpl.mm:
              (KWQKHTMLPartImpl::updatePolicyBaseURL): Set the base URL based on the URL
      	if this is the topmost part, based on the parent's policy base URL if this
      	is not the topmost part.
              (KWQKHTMLPartImpl::setPolicyBaseURL): Change the policy base URL for this
      	part and all the subparts.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  24. 22 Sep, 2002 1 commit
    • darin's avatar
      Change code that moves NSViews out of the way to run inside drawRect · 94aae382
      darin authored
      	after a layout change rather than running at layout time. This makes
      	sure that views are in the right place when propagating dirty rects.
              * kwq/KWQKHTMLPartImpl.h: Add paint method and _needsToSetWidgetsAside flag.
              * kwq/KWQKHTMLPartImpl.mm:
              (KWQKHTMLPartImpl::KWQKHTMLPartImpl): Set _needsToSetWidgetsAside to false.
              (KWQKHTMLPartImpl::layout): Set _needsToSetWidgetsAside to true. Don't call
      	moveWidgetsAside any more.
              (KWQKHTMLPartImpl::paint): Moved the code here from the bridge, but also call
      	moveWidgetsAside if _needsToSetWidgetsAside flag is set.
              * kwq/WebCoreBridge.mm:
              (-[WebCoreBridge drawRect:withPainter:]): Call KWQKHTMLPartImpl::paint, which
      	is where I moved this code.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2118 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  25. 18 Sep, 2002 1 commit
    • darin's avatar
      - fixed 3037974 -- successful Find does not deselect text field · 7c54faaf
      darin authored
              * khtml/khtml_part.cpp: (KHTMLPart::checkCompleted):
      	Turn off the code that restores the cursor position because we don't
      	use the KHTML saveState/restoreState. But we should.
              * khtml/xml/dom_docimpl.cpp:
              (DocumentImpl::setSelection): Call setFocusNode(0), because on the
      	Macintosh, selection and focus are mutually exclusive.
              (DocumentImpl::close): Remove no-longer-needed APPLE_CHANGES.
              (DocumentImpl::setFocusNode): Set focus to the KHTMLView when focus
      	is being removed from a particular node. Clear the selection when
      	focus is set on a particular node because on the Macintosh, selection
      	and focus are mutually exclusive.
              * kwq/KWQKHTMLPartImpl.h: Add set/clearDocumentFocus functions that we can use
      	to keep document's idea of focused node in sync. with AppKit's.
              * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::setDocumentFocus): Added.
      	(KWQKHTMLPartImpl::clearDocumentFocus): Added.
              * kwq/KWQNSTextField.mm:
              (-[KWQNSTextField becomeFirstResponder]): Call setDocumentFocus.
              (-[KWQSecureTextField becomeFirstResponder]): Call setDocumentFocus.
              * kwq/qt/qwidget.h: Removed endEditing().
              * kwq/KWQWidget.mm: (QWidget::clearFocus): Call clearDocumentFocus.
      	(QWidget::endEditing): Removed.
              * khtml/rendering/render_form.h:
              * khtml/rendering/render_form.cpp:
              (RenderImageButton::RenderImageButton): Remove the KWQInvisibleButton
      	hack, which is no longer needed.
              * kwq/KWQInvisibleButton.h: Removed.
              * kwq/KWQInvisibleButton.mm: Removed.
              * WebCore.pbproj/project.pbxproj: Removed KWQInvisibleButton.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  26. 17 Sep, 2002 1 commit
    • darin's avatar
      WebCore: · e391c785
      darin authored
      	- fixed 2936933 -- Pages that claim to be UTF-8 but contain invalid
      	sequences do not render at all
      	Misc. speed improvements. Total 2.6% speedup for cvs-base.
      	Improvements for signals.
              * kwq/KWQChar.mm:
              (QChar::isSpace): Add fast case for ASCII.
              (QChar::lower): Add fast case for ASCII.
              (QChar::upper): Add fast case for ASCII.
              * kwq/qt/qcolor.h: Just store RGB values, not NSColor objects.
              * kwq/KWQColor.mm:
              (QColor::QColor): No need to set color to nil.
              (QColor::name): Use QString::sprintf instead of NSString.
              (QColor::setNamedColor): Use KWQInvalidColor instead of nil.
              (QColor::getNSColor): Make an autoreleased NSColor.
              * kwq/KWQKHTMLPartImpl.mm:
              (moveWidgetsAside): Use isWidget() instead of dynamic_cast.
              * kwq/KWQSignal.h: use a QValueList instead of a fixed-size array.
              * kwq/KWQSignal.mm:
              (KWQSignal::connect): Append to list.
              (KWQSignal::disconnect): Remove from list.
              (KWQSignal::call): Use the QValueList.
              * kwq/KWQSlot.mm:
              (KWQSlot::call): Use static_cast instead of dynamic_cast where possible.
              * kwq/qt/qstring.h: Add return value to forceUnicode.
              * kwq/KWQString.mm:
              (QString::fromStringWithEncoding): Implemented using the Text Encoding
      	Converter instead of CFString.
              (compareIgnoringCaseForASCIIOnly): New function. Faster find.
              (QString::find): Separate case-sensitive from case-insensitive and speed
      	up both of them.
              (QString::stripWhiteSpace): Use the new forceUnicode for simplicity.
              (QString::simplifyWhiteSpace): Ditto.
              (QString::insert): Ditto.
              (QString::remove): Ditto.
              (QString::forceUnicode): Return the unicode pointer.
              (QString::fill): Use the new forceUnicode for simplicity.
              * kwq/WebCoreBridge.mm:
              (-[WebCoreBridge mouseUp:]): Fix two bugs. First, don't treat a slow
      	click as a double click. Second, deliver a mouse release event even for
      	a double click, as Qt does.
      	Don't update the tool tip rectangles every time we update the
      	background image. This makes things a little faster.
              * TextFieldWithControls.h: Boolean for whether tool tip rectangles
      	are up to date.
              * TextFieldWithControls.m:
              (-[TextFieldWithControls updateToolTips]): Do work only if flag is
      	NO. Set flag to YES when done.
              (-[TextFieldWithControls backgroundImage]): Don't update the tool
      	tip rectangles here.
              (-[TextFieldWithControls setFrameOrigin:]): Mark the tool tip rectangles
      	as out of date.
              (-[TextFieldWithControls setFrameSize:]): Mark the tool tip rectangles
      	as out of date.
              (-[TextFieldWithControls drawRect:]): Update the tool tips if needed.
              (-[TextFieldWithControls showRightButton:]): Mark the tool tip rectangles
      	as out of date.
              (-[TextFieldWithControls setLeftButtonImage:withOrigin:]): Ditto.
              (-[TextFieldWithControls setRightButtonImage:withOrigin:]): Ditto.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2076 268f45cc-cd09-0410-ab3c-d52691b4dbfc