1. 18 Dec, 2002 8 commits
    • sheridan's avatar
      Alexander-40 stamp · a5f80239
      sheridan authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a5f80239
    • trey's avatar
      WebCore: · bf7d82ff
      trey authored
      	3098388 - Pressing the back button goes back two levels at allmusic.com
      
      	In support of the fix for this bug, WebCore passes khtml's lockHistory setting
      	up through the bridge.
      
              Reviewed by Darin
      
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::redirectionTimerStartedOrStopped):  Pass it along.
              * kwq/WebCoreBridge.h:
      
      WebKit:
      
      	3098388 - Pressing the back button goes back two levels at allmusic.com
      
      	I rewrote the logic we use to decide whether a given redirect should be
      	treated as part of the previous navigation.  We make use of WebCore's
      	lockHistory setting, the delay time and the frame state.
      
              Reviewed by Darin.
      
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge reportClientRedirectToURL:delay:fireDate:lockHistory:]):
      	Pass lockHistory up to the frame.
              * WebView.subproj/WebFramePrivate.h:
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _clientRedirectedTo:delay:fireDate:lockHistory:]):
      	New logic.  No quick summary, best to read the code.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bf7d82ff
    • mjs's avatar
      Tools: · cc196b5c
      mjs authored
      	Reviewed by John.
      
      	- fixed 3131171 - Change Alex versions to satisfy both marketing and B&I requirements
      
              * Scripts/set-alex-version: New the script takes 3 different
      	versions, source version, marketing version and internal version.
      
      JavaScriptCore:
      
      	Reviewed by John.
      
      	- fixed 3131171 - Change Alex versions to satisfy both marketing and B&I requirements
      
              * English.lproj/InfoPlist.strings:
              * JavaScriptCore.pbproj/project.pbxproj:
      
      WebFoundation:
      
      	Reviewed by John.
      
      	- fixed 3131171 - Change Alex versions to satisfy both marketing and B&I requirements
      
              * English.lproj/InfoPlist.strings:
              * WebFoundation.pbproj/project.pbxproj:
      
      WebCore:
      
      	Reviewed by John.
      
      	- fixed 3131171 - Change Alex versions to satisfy both marketing and B&I requirements
      
              * English.lproj/InfoPlist.strings:
      
      WebKit:
      
      	Reviewed by John.
      
      	- fixed 3131171 - Change Alex versions to satisfy both marketing and B&I requirements
      
              * English.lproj/InfoPlist.strings:
      
      WebBrowser:
      
      	Reviewed by John.
      
      	- fixed 3131171 - Change Alex versions to satisfy both marketing and B&I requirements
      
              * English.lproj/InfoPlist.strings:
              * WebBrowser.pbproj/project.pbxproj:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3126 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cc196b5c
    • mjs's avatar
      WebFoundation: · b1432259
      mjs authored
              Reviewed by Trey and Darin.
      
      	Minor fixes required to fix these bugs:
      
      	3124933 - abcnews.com leads to empty window with sheet complaining about javascript: URL
      	3091248 - picture does not show up in window from epinions
      
      	* CacheLoader.subproj/WebResourceResponse.h: Don't include uninstalled headers
      	in this private but installed header.
              * ProtocolHandlers.subproj/WebAboutProtocolHandler.m:
              (-[WebAboutProtocolHandler setResponseMetadata:]): "about:blank"
      	should be a blank html document, not a blank plain text document.
              * Misc.subproj/WebNSURLExtras.h:
              * Misc.subproj/WebNSURLExtras.m:
              (-[NSString _web_shouldLoadAsEmptyDocument]): New method.
      	* English.lproj/StringsNotToBeLocalized.txt: Updated.
      
      WebCore:
      
              Reviewed by Trey and Darin.
      
      	- fixed 3124933 - abcnews.com leads to empty window with sheet complaining about javascript: URL
      	- fixed 3091248 - picture does not show up in window from epinions
      
      
              * khtml/ecma/kjs_window.cpp:
              (Window::get): Put back document-creating code that was in #if
      	!APPLE_CHANGES.
      	(Window::isSafeScript): Extend access to a window that was opened
      	to no URL or to about:blank by the active window.
              (shouldLoadAsEmptyDocument): Helper for the above.
              (WindowFunc::tryCall): Update APPLE_CHANGES comments - now it's
      	clear we don't need to create a document in a fresh window
      	(accessing document will take care of that), and that it will be
      	counter-productive, possibly adding a useless entry to the
      	back/forward list.
              * khtml/khtml_part.cpp:
              (KHTMLPart::begin): If we're not loading a URL, make a dummy
      	document (the call will check if we have a dummy document
      	already).
              * kwq/KWQKHTMLPart.mm:
      	(KWQKHTMLPart::createEmptyDocument): Isntead of setting up a
      	half-assed document, ask bridge to synchronously load a fully
      	assed (but empty) document. Renamed from createDummyDocument.
              * kwq/KWQKHTMLPartBrowserExtension.mm:
              (KHTMLPartBrowserExtension::openURLRequest): Decode script. Also,
      	check if return value is a string - if so, write it into the
      	document. Maybe we want this to be more general.
              * kwq/KWQKURL.mm:
              (KURL::KURL): Changed to successfully resolve absolute URLs
      	against an empty base URL.
              * kwq/WebCoreBridge.h: prototyped new
      	loadEmptyDocumentSynchronously method.
      
      WebKit:
      
              Reviewed by Darin and Trey.
      
      	- fixed 3124933 - abcnews.com leads to empty window with sheet complaining about javascript: URL
      	- fixed 3091248 - picture does not show up in window from epinions
      	- made "about:blank" load synchronously, which I'm told is required by some sites.
      
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge createWindowWithURL:frameName:]): If the URL is nil
      	or empty, pass a nil request - otherwise WebBrowser will try to
      	load it, resulting in an extra back/forward list entry.
              (-[WebBridge loadEmptyDocumentSynchronously]): Tell the frame to
      	load a request with an empty URL - this will cause a synchronous
      	load of an empty html document
              * WebView.subproj/WebBaseResourceHandleDelegate.h:
              * WebView.subproj/WebBaseResourceHandleDelegate.m:
      	(-[WebBaseResourceHandleDelegate loadWithRequest:]): Split off
      	startLoading: part of method to allow behavior to be subclassed.
              (-[WebBaseResourceHandleDelegate startLoading:]):
              * WebView.subproj/WebDataSourcePrivate.m:
              (-[WebDataSource _commitIfReady:]): Lie and claim the URL is
      	"about:blank" if it's really empty to avoid confusing WebCore.
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _transitionToCommitted:]): Don't put the empty URL in
      	global history.
              (-[WebFrame
      	_checkNavigationPolicyForRequest:dataSource:andCall:withSelector:]):
      	Don't check policy if URL is empty - this is likely to confuse the
      	client and we know what the right behavior here is.
              * WebView.subproj/WebMainResourceClient.m:
      	(-[WebMainResourceClient startLoading:]): Try to load
      	"about:blank" and the empty URL synchronously, bypassing
      	WebFoundation.
              (-[WebMainResourceClient continueAfterContentPolicy:response:]): Ditto.
              (-[WebMainResourceClient setDefersCallbacks:]): Ditto.
              * English.lproj/StringsNotToBeLocalized.txt: Updated.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b1432259
    • cblu's avatar
      WebCore: · c7670d69
      cblu authored
      	Fixed: 3052731 - qt file complains about lack of active-x handler
      	Fixed: 3025872 - Black square where lion should be on mgm.com
      
      	3052731: The page has a syntax error. Notice the missing ">"? He treat this as an OBJECT without an EMBED. khtml actually has a fallback for this. They check the classid and map a mime type to it. They currently map for  realaudio and flash, but not quicktime. I added a quicktime mapping as well as a mapping for shockwave.
      
      	3025872: khtml was unable to parse the EMBED tag within the OBJECT tag (similar to 3052731). When this happens, it looks at the classid and maps it to a mime type. This part was successful because it has a classid->mime type mapping for flash. The strange thing was that it was setting the main URL of the plug-in to "dummy". The code has this comment:
      
      	url = "dummy"; // Not needed, but KHTMLPart aborts the request if empty
      
      	It does this even if the url is valid. It even handles the invalid url case before even calling the part. The fix is to disable this line of code.
      
              Reviewed by trey.
      
              * khtml/rendering/render_frames.cpp:
              (RenderPartObject::updateWidget):
      
      WebKit:
      
      	Fixed: 2862385 - need to pass browser's user agent and version to plug-ins
      	Added some more error checking to the plug-in code
      
              Reviewed by trey.
      
              * Plugins.subproj/WebBaseNetscapePluginView.h:
              * Plugins.subproj/WebBaseNetscapePluginView.m:
              (+[WebBaseNetscapePluginView setCurrentPluginView:]): new, sets a global variable for the current plug-in
              (+[WebBaseNetscapePluginView currentPluginView]): new, returns the current plug-in
              (-[WebBaseNetscapePluginView start]): check if NPP_New fails, return NO if it does, set the current plug-in view. Currently, this is the only place we need to do this.
              (-[WebBaseNetscapePluginView userAgent]): made instance-specific because it depends on the plug-in view's WebController
              * Plugins.subproj/WebBaseNetscapePluginViewPrivate.h:
              * Plugins.subproj/WebNetscapePluginEmbeddedView.m:
              (-[WebNetscapePluginEmbeddedView viewDidMoveToWindow]): don't start the stream is start fails
              * Plugins.subproj/npapi.m:
              (NPN_MemAlloc): tweak
              (NPN_RequestRead): tweak
              (pluginViewForInstance): returns the instance's plug-in view if it has one, if not, return the current plug-in view
              (NPN_GetURLNotify): get the instance from pluginViewForInstance
              (NPN_GetURL):
              (NPN_PostURLNotify):
              (NPN_PostURL):
              (NPN_NewStream):
              (NPN_Write):
              (NPN_DestroyStream):
              (NPN_UserAgent):
              (NPN_Status):
              (NPN_InvalidateRect):
              (NPN_InvalidateRegion):
              (NPN_ForceRedraw):
              (NPN_GetValue):
              (NPN_SetValue):
              (NPN_GetJavaEnv):
              (NPN_GetJavaPeer):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c7670d69
    • trey's avatar
      3105755 - can't log in to amex · a7641c27
      trey authored
      	The problem was on c/r khtml would not pick a submit button to add to the
      	form state that is sent.  We now "activate" the first submit button that meets the
      	criteria for being a "successful" form element, if no button was already
      	activated by being clicked on.
      
              Reviewed by Darin.
      
              * khtml/html/html_formimpl.cpp:
              (HTMLFormElementImpl::submit):  Pick a submit button to use, if none was already
      	chosen by virtue of being clicked.
              (HTMLButtonElementImpl::isSuccessfulSubmitButton):  New getter to support
      	submit button selection.
              (HTMLButtonElementImpl::isActivatedSubmit):  New getter on existing prop.
              (HTMLButtonElementImpl::setActivatedSubmit):  New setter on existing prop.
              (HTMLInputElementImpl::isSuccessfulSubmitButton):  New getter to support
      	submit button selection.
              (HTMLInputElementImpl::isActivatedSubmit):  New getter on existing prop.
              (HTMLInputElementImpl::setActivatedSubmit):  New setter on existing prop.
              * khtml/html/html_formimpl.h:  Add new methods to common superclass.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3119 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a7641c27
    • gramps's avatar
      Reviewed by Joyce Chow. · eea8bd44
      gramps authored
      * khtml/misc/arena.cpp:
      * khtml/misc/arena.h:
      * khtml/rendering/render_arena.cpp:
      * khtml/rendering/render_arena.h:
      * khtml/rendering/render_layer.cpp:
      * khtml/rendering/render_layer.h:
      
      Changed copyright and licensing.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3118 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eea8bd44
    • hyatt's avatar
      NOWRAP was completely broken. This fixes the problem · a408e2ee
      hyatt authored
      	and makes porsche.com look ok again.
      
      	Bug #3131287.
      
              Reviewed by gramps
      
              * khtml/rendering/bidi.cpp:
              (RenderFlow::findNextLineBreak):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a408e2ee
  2. 17 Dec, 2002 7 commits
    • darin's avatar
      JavaScriptCore: · 7894002d
      darin authored
              Reviewed by Trey.
      
              * JavaScriptCore.pbproj/project.pbxproj: Removed signature.
      
      WebFoundation:
      
              Reviewed by Trey.
      
              * WebFoundation.pbproj/project.pbxproj: Remove signature.
      
      WebCore:
      
              Reviewed by Trey.
      
              * WebCore.pbproj/project.pbxproj: Remove signature.
              * kwq/KWQColor.mm: Turn off inlining so we can build even on the
      	compiler that warns about static data in inline functions.
      
      WebKit:
      
              Reviewed by Trey.
      
              * WebKit.pbproj/project.pbxproj: Remove signature.
              * WebView.subproj/WebController.m: Turn off inlining so we can build even on the
      	compiler that warns about static data in inline functions.
      
      WebBrowser:
      
              Reviewed by Trey.
      
              * Scripting.subproj/Safari.scriptSuite: Change signature to sfri.
              * WebBrowser.pbproj/project.pbxproj: Change signature to sfri.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3115 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7894002d
    • mjs's avatar
      Reviewed by John. · 7a011888
      mjs authored
      	- fixed 3120729 - HOMEPAGE: Can't set a DIV innerHTML property
      	with html content starting with <html><head><head/><body>
      
              * khtml/html/html_elementimpl.cpp:
              (HTMLElementImpl::createContextualFragment): Pop <html> and
      	<body>, and remove <head> to allow a full HTML document to be made
      	and inserted as a contextual fragment.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3112 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7a011888
    • sheridan's avatar
      Alexander-39, submitting to B&I · 7146c87d
      sheridan authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3110 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7146c87d
    • hyatt's avatar
      Make sure that anonymous block construction works properly · 762cbd61
      hyatt authored
      	when you try to insert a block in between two inlines that
      	have already been wrapped in an anonymous block.
      
              Reviewed by mjs
      
              * khtml/rendering/render_flow.cpp:
              (RenderFlow::addChildToFlow):
              (RenderFlow::makeChildrenNonInline):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3109 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      762cbd61
    • sheridan's avatar
      Alex-38 · 6535a5fe
      sheridan authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3107 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6535a5fe
    • darin's avatar
      top level: · fc4fd1d0
      darin authored
              Reviewed by Don and Maciej.
      
              * force-clean-timestamp: Trigger a full build since we are setting
      	MACOSX_DEPLOYMENT_TARGET to 10.2, which requires remaking all PFEs.
      
      Tools:
      
              * Scripts/check-copyright: Added.
      
      JavaScriptCore:
      
              Reviewed by Don and Maciej.
      
      	- fixed 3129115 -- need Apple copyright added to open source documents
      
      	* tons of files: Added our copyright to files we modified, and updated all to standard format.
      
      	- other changes
      
              * JavaScriptCore.pbproj/project.pbxproj: Set MACOSX_DEPLOYMENT_TARGET to 10.2.
      	Also removed completion.cpp.
              * kjs/completion.cpp: Removed.
              * kjs/completion.h: Made the Completion constructor inline.
      
              * kjs/grammar.y: Removed an obsolete "pretend ifdef". No need to put these in APPLE_CHANGES now.
      
      WebFoundation:
      
              Reviewed by Don and Maciej.
      
              * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
              * WebFoundation.pbproj/project.pbxproj: Set MACOSX_DEPLOYMENT_TARGET to 10.2.
      
      WebCore:
      
              Reviewed by Don and Maciej.
      
      	- fixed 3129115 -- need Apple copyright added to open source documents
      
      	* tons of files: Added copyright message to files we modified and
      	standardized format of copyrights too.
      
      	- fixed 3129235 -- assert in LRUList visiting apple.com if "Display images" preference is off
      
              * khtml/misc/loader.cpp:
              (Cache::getLRUListFor): Use the first list for 0-sized objects.
              (Cache::removeFromLRUList): Allow 0-sized objects.
      
      	- other changes
      
              * khtml/rendering/render_style.h: Remove bogus unused private constructor.
      
              * kwq/KWQFont.h: Added copy constructor and assignment operator.
              * kwq/KWQFont.mm:
              (QFont::QFont): Copy constructor now retains the NSFont. The old version didn't which could
      	cause retain/release problems.
              (QFont::operator=): Retain the new NSFont and release the old one.
      
              * WebCore.pbproj/project.pbxproj: Set MACOSX_DEPLOYMENT_TARGET to 10.2.
      
      WebKit:
      
              Reviewed by Don and Maciej.
      
              * WebView.subproj/WebUserAgentSpoofTable.gperf: Added a couple of new domains to the list we
      	spoof as Mac IE, and added comments.
              * WebView.subproj/WebUserAgentSpoofTable.c: Regenerated.
      
              * WebKit.pbproj/project.pbxproj: Set MACOSX_DEPLOYMENT_TARGET to 10.2
      
      WebBrowser:
      
              Reviewed by Don and Maciej.
      
      	- fixed 3106686 -- Remove "world leak" debugging window before beta
      
              * Test/PageLoadTestController.m:
              (-[PageLoadTestController windowDidLoad]): (Not part of the bug fix.) Changed the combo
      	box so it automatically sizes to the number of pltsuite files so we don't have to edit
      	the nib all the time.
              (-[PageLoadTestController anyWindowWillClose:]): Don't do any world leak test when the
      	window closes. The one in the page load test window is still there.
      
              * Debug/DebugUtilities.m: (-[NSApplication validate_toggleAlwaysCheckForWorldLeaks:]):
      	Don't enable or check the debug menu item at all. Put an ifdef in so we can turn it on later.
      
      	- fixed 3124310 -- remove "app refuses to launch" code before shipping
      
              * main.m: (main): Remove all the licensing code.
      
      	- other changes
      
              * BrowserNSNetServiceExtras.m: Made all locally-defined-and used functions static
      	so we would know if any were unused and for cleanliness.
              (-[NSNetService hostName:andPort:]): Remove some silly assertions.
              (decode_name): Change printf for errors to ERROR.
              (decode_srv): Ditto.
      	(decode_txt): Removed because it's unused.
              (skip_question): Ditto.
              (MyDictionaryKeyHashCallBack): Removed silly assertion.
              (MyCreateCFDictionaryFromTXT): Ditto.
      
              * WebBrowser.pbproj/project.pbxproj: Set MACOSX_DEPLOYMENT_TARGET to 10.2
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fc4fd1d0
    • mjs's avatar
      Reviewed by Darin. · 1dbdf723
      mjs authored
      	- fixed 3125283 - HOMEPAGE: in onload of an IMG, the width and height are equal to zero
      
      	There were two problems here. First, the calls to get image width
      	and height didn't force a layout in all the cases where it was
      	required. Second, layout wouldn't lay out images at all until
      	parsing was done, due to a hack to block inline layout until that
      	point. I'm not sure if this will have other bad consquences, but
      	nearly every page I tried, including Hebrew and Japanese pages as
      	well as every page on the base PLT laid out properly.
      
              * khtml/html/html_imageimpl.cpp:
              (HTMLImageElementImpl::width): Force a layout if not laid out.
              (HTMLImageElementImpl::height): Likewise.
              * khtml/html/htmlparser.cpp:
      	(KHTMLParser::insertNode): Remove setBlockBidi hack - this was
      	preventing images from getting laid out until the document was
      	totally done parsing.
              * khtml/rendering/render_flow.cpp:
              (RenderFlow::RenderFlow): More setBLockBidi removal.
              (RenderFlow::layout): Likewise.
              (RenderFlow::close): Likewise.
              (RenderFlow::addChildToFlow): Likewise.
              (RenderFlow::printTree): Likewise.
              * khtml/rendering/render_flow.h:
              * khtml/rendering/render_object.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1dbdf723
  3. 16 Dec, 2002 12 commits
    • hyatt's avatar
      When a clear occurs (thus causing a block to move underneath · 857986be
      hyatt authored
      	a float), make sure the block gets a fresh layout, so that it
      	can readjust its contents now that they don't have to flow
      	around the float.
      
              Reviewed by darin
      
              * khtml/rendering/render_flow.cpp:
              (RenderFlow::layoutBlockChildren):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3095 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      857986be
    • rjw's avatar
      Fixed 3128477. Check KJS::Window before saving js objects. · 653ea5bd
      rjw authored
              Reviewed by darin.
      
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::saveWindowProperties):
              (KWQKHTMLPart::saveLocationProperties):
              (KWQKHTMLPart::restoreWindowProperties):
              (KWQKHTMLPart::restoreLocationProperties):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3093 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      653ea5bd
    • sheridan's avatar
      submitting to B&I. Alexander-37 · 28c6394a
      sheridan authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3091 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      28c6394a
    • mjs's avatar
      Reviewed by Darin. · ef118386
      mjs authored
      	- fixed 3125412 - HOMEPAGE: 2nd load of html in the same div fails.
      	- fixed 3052113 - HOMEPAGE: "site menu" part of .mac home page editing doesn't work
      	- fixed 3075392 - HOMEPAGE: "pages" section of mac.com homepage editing is missing
      
              * khtml/html/html_baseimpl.h:
              * khtml/html/html_baseimpl.cpp:
              (HTMLFrameElementImpl::updateForNewURL): Function that loads new URL,
      	to be called if src attribute is set explicitly and the element is already
      	attached.
              (HTMLFrameElementImpl::parseAttribute): Call updateForNewURL when src
      	attrinute is set.
              (HTMLFrameElementImpl::contentDocument): Don't involve render widget
      	in getting the content document.
              * khtml/html/html_elementimpl.cpp:
              (HTMLElementImpl::createContextualFragment): Allow contextual
      	fragments to be created (and therefore innerHTML to be set on) TR
      	and HTML elements.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ef118386
    • hyatt's avatar
      Use the layer's bounds as the damage rect not the object's. · 218c4e41
      hyatt authored
      	The layer knows about the overflow out of the object.  The
      	object does not.  Duh.
      
      	Fixes disney.com bustage.
      
              Reviewed by sullivan
      
              * khtml/rendering/render_layer.cpp:
              (RenderLayer::constructZTree):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      218c4e41
    • hyatt's avatar
      Code needs to go in calcMinMaxWidth instead, so parents computing · f9030452
      hyatt authored
      	their own minmax widths will get the correct value during the ifrst
      	pass.  With this change weather.com is actually fixed.
      
              Reviewed by mjs
      
              * khtml/rendering/render_box.cpp:
              (RenderBox::calcWidth):
              * khtml/rendering/render_flow.cpp:
              (RenderFlow::calcMinMaxWidth):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f9030452
    • hyatt's avatar
      Fix for 3128843, horked layout on weather.com. Ensure that · d8d042fb
      hyatt authored
      	overflow: hidden elements bounds-check their minwidth and maxwidth
      	values to ensure that you don't grow the clipped element.
      
              Reviewed by mjs
      
              * khtml/rendering/render_box.cpp:
              (RenderBox::calcWidth):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d8d042fb
    • trey's avatar
      3129175 - we're doing needless GETs when using b/f cache · 040136ef
      trey authored
      	Turns out that an empty UserStyle was causing WebCore to reload the base URL
      	of the page, since it tried to load the style "".
      
              Reviewed by Darin
      
              * khtml/khtml_part.cpp:
              (KHTMLPart::reparseConfiguration):  Of the UserStyle is empty, set it to an
      	empty string instead of an empty URL.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3086 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      040136ef
    • mjs's avatar
      Reviewed by Darin. · 81a1bf4e
      mjs authored
      	- fixed 3129008 - REGRESSION: Successive hot/cached runs of cvs-base PLT are slightly slower
      
      	This was due to me reintroducing a leak of the document. Now fixed.
      
              * khtml/ecma/kjs_dom.cpp:
              (DOMDocument::~DOMDocument): forget self from cached DOM object table.
              (KJS::getDOMDocumentNode): Instead of storing the document in the
      	marked per-document table, store it in the unmarked table, and as
      	a property on the Window object.
              (KJS::getDOMNode): use getDocumentNode when appropriate.
              * khtml/ecma/kjs_dom.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      81a1bf4e
    • hyatt's avatar
      Fix for 3128728. Ensure that list markers get placed into an · b5891db3
      hyatt authored
      	existing line box if possible.  This patch also fixes RTL bullets
      	and line height calculations involving image bullets that are the
      	biggest thing on the line.  List markers also correctly move
      	to avoid floats.
      
              Reviewed by mjs
      
              * khtml/rendering/render_list.cpp:
              (RenderListItem::setStyle):
              (getLineBoxParent):
              (RenderListItem::layout):
              (RenderListMarker::calcMinMaxWidth):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3083 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b5891db3
    • hyatt's avatar
      Fix for 3128728. Ensure that list markers get placed into an · 019f2358
      hyatt authored
      	existing line box if possible.  This patch also fixes RTL bullets
      	and line height calculations involving image bullets that are the
      	biggest thing on the line.  List markers also correctly move
      	to avoid floats.
      
              Reviewed by mjs
      
              * khtml/rendering/render_list.cpp:
              (RenderListItem::setStyle):
              (getLineBoxParent):
              (RenderListItem::layout):
              (RenderListMarker::calcMinMaxWidth):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      019f2358
    • darin's avatar
      Reviewed by Maciej. · a93db722
      darin authored
      	- fixed 3128766 -- macconnection.com tries to add properties to the navigator DOM object, which fails
      
              * khtml/ecma/kjs_window.cpp: (Window::get): Set up properties named navigator and clientInformation
      	the first time either is queried. These will hold a persistent shared object rather than making one
      	every time it's asked for.
      
              * WebCore.pbproj/project.pbxproj: Let Electron undo Maciej's evil.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a93db722
  4. 15 Dec, 2002 13 commits
    • mjs's avatar
      Tools: · fcbad401
      mjs authored
              Reviewed by Darin.
      
              * Scripts/set-module-version: Accept `u' in source version.
      
      WebCore:
      
              Reviewed by Darin.
      
              * WebCore.pbproj/project.pbxproj: Updated source version to 37u2.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fcbad401
    • 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
      2e80479f
    • mjs's avatar
      Reviewed by Darin. · 4d93d495
      mjs authored
      	- fixed 3128383 - DOM nodes should always use the same JS object
      
              * khtml/ecma/kjs_binding.h:
              * khtml/ecma/kjs_binding.cpp:
              (ScriptInterpreter::ScriptInterpreter): Set auto-delete to true on
      	document dictionary.
              (ScriptInterpreter::getDOMObjectForDocument): New function - gets
      	DOM object from per-document dictionary.
              (ScriptInterpreter::putDOMObjectForDocument): New function - put
      	DOM object into per-document dictionary.
              (ScriptInterpreter::deleteDOMObjectsForDocument): Clear all
      	objects from specific per-document dictionary.
              (ScriptInterpreter::mark): Mark per-document objects.
      	(ScriptInterpreter::forgetDOMObjectsForDocument): Clear objects
      	for this document from all interpreters.
              * khtml/ecma/kjs_dom.h:
              * khtml/ecma/kjs_dom.cpp:
              (KJS::getDOMNode): Use per-document rather than general DOM object
      	dictionary.
              * khtml/xml/dom_docimpl.cpp:
              (DocumentImpl::~DocumentImpl): Call forgetDOMObjectsForDocument.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3070 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4d93d495
    • hyatt's avatar
      Fix for 3057974 and 3128713. I needed to make frames check to · 1a418d9c
      hyatt authored
      	see if their parentNode had a renderer to complete the FOUC
      	fix.  Completing the FOUC fix finally solves 3057974.
      
              Reviewed by darin
      
              * khtml/html/html_baseimpl.cpp:
              (HTMLFrameElementImpl::attach):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1a418d9c
    • hyatt's avatar
      Fix for 3109226, epinions page is mostly blank. Add a hack · baa79d0b
      hyatt authored
      	to disallow > but only inside attribute values for which there
      	is no corresponding attribute name.
      
      	Also fix attribute values with no name so that the value is
      	used as the name so that e.g., <option "selected"> works.
      
              Reviewed by darin
      
              * khtml/html/htmltokenizer.cpp:
              (HTMLTokenizer::HTMLTokenizer):
              * khtml/html/htmltokenizer.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3068 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      baa79d0b
    • 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
      b50226ef
    • hyatt's avatar
      Make sure framesets don't get built twice when FOUC delays · fcdd4691
      hyatt authored
      	their loading.
      
              Reviewed by gramps
      
              * khtml/css/cssstyleselector.cpp:
              * khtml/css/cssstyleselector.h:
              * khtml/html/html_baseimpl.cpp:
              (HTMLFrameSetElementImpl::attach):
              * khtml/rendering/render_style.cpp:
              (RenderStyle::operator==):
              (RenderStyle::isStyleAvailable):
              * khtml/rendering/render_style.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3064 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fcdd4691
    • darin's avatar
      Reviewed by Dave. · 3aaa7d9f
      darin authored
      	- fixed ==/= typo in QFontMetrics that caused a part of my recent speedup to not take effect
      	- fixed 3128582 -- REGRESSION: Crash on planetquake.com
      
              * kwq/KWQFontMetrics.mm:
      	(QFontMetricsPrivate::setFont): Fix a horrifying "== instead of =" mistake.
              (QFontMetrics::ascent): Give an ERROR message, don't crash, when this is called on a
      	font metrics object that hasn't been updated to work for a particular font.
              (QFontMetrics::descent): Ditto.
              (QFontMetrics::lineSpacing): Ditto.
              (QFontMetrics::xHeight): Ditto.
              (QFontMetrics::width): Ditto.
              (QFontMetrics::floatWidth): Ditto.
              (QFontMetrics::floatCharacterWidths): Ditto.
      
              * khtml/html/html_inlineimpl.cpp: (HTMLBRElementImpl::attach):
      	Eliminated what was causing us to hit the above. BR elements need to respect display() == NONE.
      
      	- fixed the fix for operator==; needs to work even if the pseudo type was
      	  extracted already for one of the two, and not the other
      
              * khtml/css/cssparser.cpp:
              (CSSSelector::extractPseudoType): Only do work when the selector is Pseudo.
              (CSSSelector::operator==): Call pseudoType() instead of going right at _pseudoType.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3063 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3aaa7d9f
    • hyatt's avatar
      Fix for 3128402, missing content on voodooextreme. Don't allow · 5767599b
      hyatt authored
      	object/embed inside the head.
      
              Reviewed by cblu
      
              * khtml/html/dtd.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5767599b
    • 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
      c6715640
    • hyatt's avatar
      operator== on CSSSelectors needed to be updated to compare · 76287b3e
      hyatt authored
      	_pseudoTypes.  A nice subtle bug from the mega-patch.
      
              Reviewed by mjs
      
              * khtml/css/cssparser.cpp:
              (CSSSelector::operator == ):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3060 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      76287b3e
    • hyatt's avatar
      Fix for 3128429, sans-serif font got broken. Just a typo · e2fbbd40
      hyatt authored
      	from darin's mega-patch.
      
              Reviewed by mjs
      
              * khtml/css/cssstyleselector.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e2fbbd40
    • darin's avatar
      JavaScriptCore: · 107c53d2
      darin authored
              Reviewed by Maciej.
      
              * JavaScriptCore.pbproj/project.pbxproj: Make dtoa.h visible as an SPI so I can
      	use it inside QString.
      
      WebFoundation:
      
              Reviewed by Maciej.
      
              * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
      
      WebCore:
      
              Reviewed by Maciej and Dave.
      
      	- optimizations that improve speed; total is 13.8% on cached cvs-base on my machine
      
              * khtml/css/css_valueimpl.h: Add isKonqBody() and genericFamilyType() to find out if
      	a font is a standard one. This is much faster than doing string comparisons all the time.
              * khtml/css/css_valueimpl.cpp: (FontFamilyValueImpl::FontFamilyValueImpl):
      	Check the font names against the standard ones on time when the FontFamilyValueImpl
      	object is constructed rather than every time the stuff is matched.
              * khtml/css/cssparser.h: Add pseudoType() and extractPseudoType() to CSSSelector so we
      	don't have to do string compares all the time.
              * khtml/css/cssparser.cpp:
              (StyleBaseImpl::parseValue): Use QConstString in a way that's effective (with an
      	object that has a long enough lifetime), or don't use it at all.
              (StyleBaseImpl::parseContent): Ditto.
              (StyleBaseImpl::preprocess): Preprocess into a buffer, usually on the stack, rather than
      	using QString += QChar over and over again.
              (CSSSelector::extractPseudoType): Convert the value string into a type, and get rid of it.
      	Saves memory because the string goes away. And doing it once is much faster than string
      	comparing each time.
              * khtml/css/cssstyleselector.cpp:
      	(cleanPath): Restructure to save one find() in the common case.
      	(checkPseudoState): Restructure to avoid some DOMString creation/destruction in the case
      	where the tag is not an <A>. Also use QConstString correctly.
      	(CSSStyleSelector::checkOneSelector): Use the new pseudoType() instead of string compares.
      	(CSSStyleSelector::applyRule): Use isKonqBody() and genericFamilyType() instead of string
      	comparisons.
      
              * khtml/dom/dom_string.h: Make the destructor non-virtual. This was a big win, and a mistake
      	the way it was before. Also make the DOMString constructor with no parameters inline.
              * khtml/dom/dom_string.cpp:
              (DOMString::string): Don't use QConstString here, since it does no good.
              (DOM::operator==): Rewrite to do things faster and avoid calling strlen.
      
              * khtml/html/html_objectimpl.h: Don't use QConstString in places where it does harm and no good.
              * khtml/html/html_objectimpl.cpp: (HTMLEmbedElementImpl::parseAttribute): Use QConstString properly.
      
              * khtml/html/htmltokenizer.cpp:
              (tagMatch): Added.
              (HTMLTokenizer::parseSpecial): Change tokenizing so it doesn't construct temporary strings (with
      	QConstString) just to compare small substrings.
      
              * khtml/khtml_part.cpp: (KHTMLPart::write): Don't use a decoder object when source is all ASCII.
      
              * kwq/KWQColor.mm:
              (hex2int): Don't bother with uppercase hex since we always lowercase anyway.
              (QColor::setNamedColor): Use a new gperf-based table instead of an NSDictionary to look up colors.
              * kwq/KWQColorData.c: Added this autogenerated file.
              * kwq/KWQColorData.gperf: Added. Source file with list of colors and color values.
              * kwq/Makefile.am: Build KWQColorData.c from KWQColorData.gperf.
              * WebCore.pbproj/project.pbxproj: Added KWQColorData.gperf.
      
              * khtml/misc/helper.cpp: (khtml::setNamedColor): Don't call setNamedColor again with the lowercased
      	color name, since our QColor::setNamedColor already has to lowercase the name (because it has to check
      	all names before checking any hex values).
      
              * khtml/rendering/font.h: Don't initialize the QFontMetrics since in every case we end up changing
      	the font later anyway. Also remove unused field.
              * khtml/rendering/font.cpp: (Font::update): Use the new QFontMetrics::setFont for speed.
      
              * khtml/rendering/render_object.cpp: (RenderObject::enclosingLayer): Change it so it doesn't get
      	the layer twice. This function showed up on the sample so we know it's hot.
      
              * khtml/xml/dom_stringimpl.cpp: (DOMStringImpl::containsOnlyWhitespace): Did a faster implementation
      	that doesn't call QChar::direction() except for non-ASCII characters.
      
              * kwq/KWQFontMetrics.h: Add empty constructor for use in font.cpp. Add accessor and setter for the
      	font too. Made baselineOffset() inline since it's trivial.
              * kwq/KWQFontMetrics.mm:
      	(QFontMetricsPrivate::QFontMetricsPrivate): Don't make the renderer until we use it.
      	(QFontMetricsPrivate::getRenderer): Make it here.
      	(QFontMetricsPrivate::font): Added.
      	(QFontMetricsPrivate::setFont): Added. Dumps the renderer if the font is different.
              (QFontMetrics::QFontMetrics): Added empty constructor.
              (QFontMetrics::setFont): Added.
      
              * kwq/KWQKURL.mm: (KURL::parse): Avoid function call overhead calling strncasecmp and strncmp.
      	Also made the check for localhost case insensitive.
      
              * kwq/KWQString.h: Remove _isUnicodeInternal and _isAsciiInternal, since they are trivially
      	computed, and it saves time to not have that extra field to manipulate. Removed private
      	data() function since it's the same as *dataHandle and not really more clear. Made ascii()
      	and unicode() simpler and inline. Also made latin1() and getCFString() inline. Renamed
      	QStringData to KWQStringData.
              * kwq/KWQString.mm:
              (QStringData::QStringData): Remove initializers for the xxxInternal.
              (QStringData::initialize): Removed some unnecessary if statements, and made a slight improvement
      	in the case of a 0-length string that comes with a pointer for Unicode (can't do it in the
              char * case because it's a feature that's used).
              (QString::makeSharedNull): No need to set _isUnicodeInternal.
              (QStringData::~QStringData): Use the new functions instead of the old bits.
              (QStringData::increaseAsciiSize): Grow faster when we get to larger sizes where the "good size"
      	call doesn't have as much of an effect. Simplified by removing unneeded code.
              (QStringData::increaseUnicodeSize): Ditto.
              (QStringData::makeAscii): Update for removal of _isAsciiInternal.
              (QStringData::makeUnicode): Update for removal of _isUnicodeInternal.
              (QString::detachIfInternal): Add this new inline to speed things up for the common case where
      	there's no detaching needed.
              (QString::at): Simplify, there were excess if branches here.
              (QString::toDouble): Use kjs_strtod and don't copy the string using QCString for additional speed.
              (QString::lower): Don't detach if the string is already all lowercase. Added a FIXME about the
      	code that assumes all "ASCII" bytes are truly ASCII. This code blurs the distinction between Latin-1
      	and ASCII in a way that will not work right for Latin-1 characters in an 8-byte character QString.
              (QString::detachInternal): Update for removal of _isUnicodeInternal.
              (QString::detach): Removed a special case for shared_null that was dead code since shared_null has
      	the _isUnicodeValid flag set.
              (operator==): Rewrote the comparison with char * to avoid the costly call to strlen.
      
              * Makefile.am: Updated the rules here so the force clean timestamp works right.
              * force-clean-timestamp: Touched this since the header dependencies don't seem right
      	for the DOMString constructor change, at least.
      	* WebCore-tests.exp: Exported a symbol now needed by tests since QString does more inlining.
      	* WebCore-combined.exp: Re-generated.
      
      WebBrowser:
      
              Reviewed by Maciej.
      
              * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3058 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      107c53d2