1. 16 Jan, 2003 1 commit
    • rjw's avatar
      Fixed 3148932. Account for zero width characters · 77a985bc
      rjw authored
              in <pre> fixed-width optimization.
              Reviewed by hyatt.
              * khtml/rendering/render_text.cpp:
              Reviewed by Richard (written by Mike S.)  'Clean' implementations of these
              functions that were too similar to the Qt implementations.
              * kwq/KWQString.mm:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  2. 14 Jan, 2003 1 commit
  3. 12 Jan, 2003 1 commit
    • darin's avatar
      Reviewed by Dave. · 50560aa1
      darin authored
      	- fixed a bunch of places where KHTML did !x == y instead of !(x == y) or x != y.
              * khtml/css/cssstyleselector.cpp: (CSSStyleSelector::applyRule):
              * khtml/html/htmlparser.cpp: (KHTMLParser::insertNode):
              * khtml/misc/loader.cpp: (Cache::requestImage), (Cache::requestStyleSheet):
              * khtml/rendering/render_flow.cpp: (RenderFlow::setStyle):
      	Changed !x == y to x != y. In each case, there's a reason that this does not create
      	any problem in practice, which is why we didn't rush to get this in for beta 1.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3304 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  4. 09 Jan, 2003 2 commits
    • mjs's avatar
      Reviewed by Dave. · 3de55bfc
      mjs authored
      	- fixed Radar 3143013 - hang trying to load spiny.com/software
              * khtml/rendering/render_table.cpp:
              (RenderTable::layoutRows): Check for the render root as a loop
      	termination condition, to avoid an infinite loop for an absolute
      	but non-fixed table cell.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • hyatt's avatar
      Revert the redundancy that dirk noticed. · 5066da21
      hyatt authored
      	Fixing issue #3 on diveintomark.org's list, which actually involved
      	merging calcAbsoluteVertical to KHTML's trunk and then fixing
      	a math error in the bottom computation.
              Reviewed by NOBODY (OOPS!).
              * khtml/html/html_baseimpl.cpp:
              * khtml/rendering/render_box.cpp:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3280 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  5. 03 Jan, 2003 2 commits
    • rjw's avatar
      WebCore: · b026936c
      rjw authored
              Fixed 3138743, 3138678, and 3138854.  Removed the RenderText
              widths cache, replaced it with a much simply monospace character
              cache.  Should be much faster for covered cases too!  Also fixed
              buffer overrun problem causing the crash in 3138854.
              Reviewed by darin.
              * khtml/rendering/font.cpp:
              * khtml/rendering/font.h:
              * khtml/rendering/render_text.cpp:
              * khtml/rendering/render_text.h:
              * kwq/KWQFont.h:
              * kwq/KWQFont.mm:
              * kwq/WebCoreTextRendererFactory.h:
              * kwq/WebCoreTextRendererFactory.m:
              (-[WebCoreTextRendererFactory isFontFixedPitch:]):
              Support for fixes to 3138743, 3138678.  Added
              isFontFixedPitch used to determine if font is fixed
              pitch.  Makes use of appkit private _isFakeFixedPitch
              (detects courier and monoca).  Updated our fakey test
              to use the appkit's version.
              Reviewed by darin.
              * WebCoreSupport.subproj/WebTextRenderer.m:
              * WebCoreSupport.subproj/WebTextRendererFactory.m:
              (-[WebTextRendererFactory isFontFixedPitch:]):
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3250 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • hyatt's avatar
      Fix for percentage table heights. A check was missing to · 7c6e5520
      hyatt authored
      	look for a fixed height on the containing block.
              Reviewed by darin
              * khtml/rendering/render_table.cpp:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3247 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  6. 02 Jan, 2003 3 commits
  7. 30 Dec, 2002 3 commits
    • hyatt's avatar
      Fix for 3129016, make sure that zero-height tables and lists · 5873ea08
      hyatt authored
      	will be skipped in a search for floats that occur before
      	them.  Makes usatoday work.
              Reviewed by gramps
              * khtml/rendering/render_flow.cpp:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3214 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      Reviewed by Maciej. · 58521793
      darin authored
      	- fixed 3135642 -- ad frames are missing at channels.netscape.com
              * khtml/rendering/render_frames.cpp: (RenderPartObject::updateWidget): Updated to use the
      	same rule as Mozilla: Empty URL for an iframe means "about:blank".
              * khtml/ecma/kjs_window.cpp: (Window::isSafeScript): Loosen things so that it's safe for
      	a frame to manipulate an empty child frame, as well as an empty opened window. Also remove
      	the useless check for an empty document -- it never happens in practice.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3213 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      Reviewed by Don. · c5764f8d
      darin authored
      	- fixed 3130566 -- REGRESSION: list item numbers are overlapping the text of the list items
      	Moved the hack that handles list items that are not in lists out of the parser and into
      	the DOM and Render tree code itself. This fixes the issue where the parser doesn't know which
      	will be the parent node of the list item, and other problems with the old hack.
              * khtml/html/html_listimpl.cpp: (HTMLLIElementImpl::attach): Find the parent list (OL or UL).
      	If there is no parent list, set a "not in list" flag on the render object so it knows to render
      	"inside" no matter what the style says. Also use this parent and a safer check to make the
      	start attribute work even when there is an intervening DOM element in the hierarchy.
              * khtml/html/htmlparser.cpp: (KHTMLParser::getElement): Remove the code that tries to set
      	the style of an LI based on the current node at the time it's parsed, because the current node
      	is now often not the OL or the UL due to our DTD fix to allow other nodes in lists.
              * khtml/rendering/render_list.h: Add isInside() to RenderListMarker, setNotInList(), notInList(),
      	and _notInList to RenderListItem.
              * khtml/rendering/render_list.cpp:
              (RenderListItem::RenderListItem): Initialize _notInList to false.
              (RenderListMarker::paintObject): Use isInside() instead of checking listStylePosition().
              (RenderListMarker::calcMinMaxWidth): Ditto.
              (RenderListMarker::baselinePosition): Ditto.
              (RenderListMarker::isInside): Return true if we are not in a list, or if "inside" style is requested.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3208 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  8. 28 Dec, 2002 1 commit
    • darin's avatar
      Reviewed by Don. · ee114f40
      darin authored
      	- fixed 3136262 -- Shockwave Flash at movies.yahoo.com does not work
              * khtml/rendering/render_frames.cpp: (RenderPartObject::updateWidget):
      	Moved the class ID special case MIME types out of the if statement so they can be shared
      	in the case where we have an embed tag but no MIME type.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3190 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  9. 25 Dec, 2002 1 commit
    • rjw's avatar
      Fix for 3134543 (and widely reported dupes). Don't use render_text · 8f03ce2d
      rjw authored
              widths cache except for whitespace == PRE.  The problem was that additional
              spaces in the RenderText's string were being inappropiately measured.
              An alternate, more complex and risky, fix would account for the whitespace
              properties during scanning of the RenderText width buffer.  Considering
              the scenario for which this optimization was added (3133261), this
              simpler fix is adequate.
              Reviewed by Darin and Don.
              * khtml/rendering/render_text.cpp:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3186 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  10. 20 Dec, 2002 6 commits
    • hyatt's avatar
      Fix for 3134133. Back out the render_text code I gave to rjw · a18024a4
      hyatt authored
      	to check in.  It wasn't filling in a value for hasBreak, so it
      	became random whether or not you'd break or not.
              Reviewed by rjw
              * khtml/rendering/render_text.cpp:
              * khtml/rendering/render_text.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3166 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • hyatt's avatar
      Fix for 3133081, slashdot messed up when changing font sizes. · 385c7722
      hyatt authored
      	setStyle in RenderFlow was messed up for continuations.  A
      	block in the middle of a continuation incorrectly propagated
      	its style to the following inlines.
              Reviewed by darin
              * khtml/rendering/render_flow.cpp:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3164 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • hyatt's avatar
      Remove the clip hack from setLayout and make it · f3f98f68
      hyatt authored
      	asynchronous instead.  This fixes the crasher
      	on autosite.com, which had a sync layout occur
      	while in the middle of making a block box's
      	children get wrapped in anonymous boxes.  It
      	was only half done when the layout got
      	triggered, which is what caused the assert to fire.
      	The bug # is 3129534.
              Reviewed by rjw
              * khtml/khtmlview.cpp:
              * khtml/khtmlview.h:
              * khtml/rendering/render_object.cpp:
              * khtml/rendering/render_object.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3160 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • rjw's avatar
      WebCore: · 9409ba5b
      rjw authored
              Fixed 3133261.  This fix really has two parts.  This first part
              fixes the stupid stack allocated buffer that caused the crash.
              The second part makes any RenderText with a large string perform
              much faster.  The page mentioned in the bug used to load and draw
              in about 15 minutes.  Now it loads in about 10 seconds and draws in about
              2 seconds.  The performance optimization caches a widths array
              for the string in the RenderText, and only updates that array if
              the font or text for the RenderText change.
              Reviewed by john.
              * khtml/rendering/render_text.cpp:
              * khtml/rendering/render_text.h:
              Fixed 3133261.  This fix really has two parts.  This first part
              is here in WebTextRenderer.  The second part adds some width
              caching to RenderText.  I was using a stack allocated array,
              this would blow out the stack for large strings.
              Reviewed by john.
              * WebCoreSupport.subproj/WebTextRenderer.m:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3152 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      Reviewed by Richard and John. · 2b5e6e2c
      darin authored
      	- fixed 3133207 -- crash in HTMLFrameElementImpl updateForNewURL at home.real.com
      	This refines Maciej's fix for 3052113, 3075392, and 3125412.
              * khtml/html/html_baseimpl.h: Remove detach() and parentWidget from HTMLFrameElementImpl.
              * khtml/html/html_baseimpl.cpp:
              (HTMLFrameElementImpl::HTMLFrameElementImpl): Take out initialization of unused parentWidget.
              (HTMLFrameElementImpl::updateForNewURL): Add case for when we are attached by did not allocate
      	a render object. In that case we just detach so we can attach again. Also fix the self-reference
      	check which was in there but not working.
              (HTMLFrameElementImpl::detach): Remove method since all it did was set unused parentWidget.
              (HTMLIFrameElementImpl::attach): Remove unused depth computation.
      	- fixed more leaks
              * khtml/rendering/render_replaced.h: Made the deref method inherited from khtml::Shared
      	private by using private inheritance. Changed the name of arenaDeref to deref, but it still
      	takes an arena parameter. Now incorrect deref's are compile-time errors instead of potential leaks.
              * khtml/rendering/render_replaced.cpp:
              (RenderWidget::detach): Rename arenaDeref to deref.
              (RenderWidget::resizeWidget): Ditto.
              (RenderWidget::eventFilter): Ditto.
              (RenderWidget::deref): Ditto.
              * khtml/rendering/render_form.cpp: (RenderFormElement::slotClicked):
      	Pass the arena when deref'ing the RenderFormElement.
              * kwq/WebCoreBridge.h: Add a field for the arena for the RenderPart.
              * kwq/WebCoreBridge.mm:
              (-[WebCoreBridge dealloc]): Pass the arena when deref'ing the RenderPart.
              (-[WebCoreBridge setRenderPart:]): Pass the arena when deref'ing the RenderPart. Store the arena
      	of the new part when storing the part pointer.
              * khtml/xml/dom_docimpl.cpp: (DocumentImpl::~DocumentImpl): Assert that the render object is
      	not nil, in an attempt to catch a leak I observed yesterday.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3148 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      Reviewed by Dave. · 35355e5d
      darin authored
      	- fixed 3129129 -- leak of 820 RenderStyle objects each time we run cvs-base
      	The RenderStyle objects were the tip of an iceberg.
              I fixed a lot of leaks, but there are still some remaining.
      	Note that these changes will make Development builds slower because they disable
      	the arena allocator in favor of assertions that check we are using it correctly.
      	But the changes make Deployment builds slightly faster.
              * khtml/html/html_baseimpl.cpp: (HTMLFrameSetElementImpl::attach):
      	Fix a leak in the !isStyleAvailable() case by ref'ing and deref'ing the style.
              * khtml/html/html_formimpl.cpp:
              (HTMLFormElementImpl::attach): Fix a leak by getting the style from the render
      	object instead of calling styleForElement again, which makes a new one.
              (HTMLFormElementImpl::parseAttribute): Ditto.
              (HTMLInputElementImpl::attach): Fix a leak by using the style in the local
      	variable rather than calling styleForElement again.
              * khtml/html/html_imageimpl.cpp:
              (HTMLImageElementImpl::parseAttribute): Fix a leak by getting the style from the render
      	object instead of calling styleForElement again, which makes a new one.
              (HTMLImageElementImpl::attach): Fix a leak by using the style in the local
      	variable rather than calling styleForElement again.
              * khtml/html/html_inlineimpl.cpp: (HTMLBRElementImpl::attach):
      	Fix a leak in the display() == NONE case by ref'ing and deref'ing the style.
              * khtml/html/html_objectimpl.cpp: (HTMLObjectElementImpl::attach): Fix a leak by using
      	the style in the local variable rather than calling styleForElement again.
              * khtml/rendering/bidi.cpp:
              (BidiIterator::detach): Added debugging code to detect if someone does a delete directly,
      	which will not deallocate the object because it won't run the correct arena code.
              (BidiIterator::operator delete): Ditto.
              (appendRunsForObject): Fix a leak by detaching bidi iterators when they are removed from
      	the list. The list can't delete them because it doesn't have the arena pointer.
              (deleteMidpoints): Fix a leak by not removing the items from the list until done iterating.
      	The old code would fail to delete half the items.
              * khtml/rendering/render_container.cpp:
              (RenderContainer::detach): Detach the continuation here. Before we removed it but did not
      	detach it, which led to a leak.
              (RenderContainer::removeChild): Do not remove the continuation here. If we do, then we can't
      	detach successfully. No one depends on this removing the continuation.
              (RenderContainer::removeLeftoverAnonymousBoxes): Detach the child, don't just delete it.
      	This fixes a leak.
              * khtml/rendering/render_flow.cpp: (RenderFlow::removeChild): Detach the child, don't just
      	delete it. This fixes a leak.
              * khtml/rendering/render_object.h: Added arenaDelete.
              * khtml/rendering/render_object.cpp:
              (RenderObject::operator delete): Added debugging code to detect if someone does a delete directly,
      	which will not deallocate the object because it won't run the correct arena code.
              (RenderObject::detach): Ditto.
              (RenderObject::arenaDelete): Put the low-level delete here, so that subclasses (RenderWidget)
      	can call it.
              * khtml/rendering/render_replaced.h: Add arenaDeref and make deref private so derived classes
      	won't use it by accident.
              * khtml/rendering/render_replaced.cpp:
              (RenderWidget::detach): Use the new arenaDeref instead of deref, since we need to pass the
      	arena pointer in to delete.
              (RenderWidget::resizeWidget): Ditto. Store the arena before calling back, since we can't get it
      	once it's detached from its parent.
              (RenderWidget::eventFilter): Ditto.
              (RenderWidget::arenaDeref): Added. Calls RenderObject's arenaDelete.
      	- other changes
              * khtml/rendering/render_arena.cpp:
              (RenderArena::allocate): Added debugging code that stores a signature, arena pointer, and size,
      	and uses malloc rather than the arena.
              (RenderArena::free): Check the signature, arena pointer, and size, and use free.
              * khtml/rendering/render_layer.cpp:
              (RenderLayer::operator delete): Added debugging code to detect if someone does a delete directly,
      	which will not deallocate the object because it won't run the correct arena code.
              (RenderLayer::detach): Ditto.
              (RenderLayer::RenderLayerElement::operator delete): Ditto.
              (RenderLayer::RenderLayerElement::detach): Ditto.
              (RenderLayer::RenderZTreeNode::operator delete): Ditto.
              (RenderLayer::RenderZTreeNode::detach): Ditto.
              * khtml/rendering/render_text.cpp:
              (TextSlave::detach): Added debugging code to detect if someone does a delete directly,
      	which will not deallocate the object because it won't run the correct arena code.
              (TextSlave::operator delete): Ditto.
              * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::createContextualFragment):
      	Save one new/delete by using a stack-based HTMLTokenizer and add FIXMEs about
      	some possible leaks I spotted here.
              * khtml/rendering/render_list.cpp: (RenderListItem::setStyle): Took out APPLE_CHANGES from around
      	a generally useful bug fix.
              * WebCore.pbproj/project.pbxproj: Let Electron be Electron.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  11. 19 Dec, 2002 1 commit
    • hyatt's avatar
      Fix for 3129393, crasher on sundancecatalog.com. There · 7f3f4ea2
      hyatt authored
      	are two elements to this fix.  The basic problem was that
      	sundancecatalog was saying:
      	<table style="display: inline">
      	In WinIE, this turns into an inline-table and not an inline.
      	In Gecko this does not happen.  Like Gecko, we treated this
      	as an inline, so we triggered a problem in my inline splitting
      	The first fix was to bulletproof my inline splitting code to
      	ensure all new render objects are fully connected before children
      	are added, so that you can get to renderArenas at all times.
      	The second fix implements the WinIE quirk and turns the table
      	into an inline-table so that you avoid a complete garbage
      	render tree.
              Reviewed by trey
              * khtml/css/html4.css:
              * khtml/rendering/render_flow.cpp:
              * khtml/rendering/render_flow.h:
              * khtml/rendering/render_list.cpp:
              * khtml/rendering/render_list.h:
              * khtml/rendering/render_object.cpp:
              * khtml/rendering/render_table.cpp:
              * khtml/rendering/render_table.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3143 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  12. 18 Dec, 2002 3 commits
    • 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:
      	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
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • 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
    • 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:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  13. 17 Dec, 2002 3 commits
    • 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:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3109 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • 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.
              * Scripts/check-copyright: Added.
              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.
              Reviewed by Don and Maciej.
              * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
              * WebFoundation.pbproj/project.pbxproj: Set MACOSX_DEPLOYMENT_TARGET to 10.2.
              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.
              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
              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
    • 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
  14. 16 Dec, 2002 5 commits
  15. 15 Dec, 2002 2 commits
    • 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:
              * khtml/rendering/render_style.cpp:
              * khtml/rendering/render_style.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3064 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • 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.
              Reviewed by Maciej.
              * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
              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
              * 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.
              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
  16. 14 Dec, 2002 1 commit
    • hyatt's avatar
      Fix for 3016385, menus on webreference.com don't show up. · 953820ad
      hyatt authored
      	Fixes to make webreference.com menus show up.  This involved
      	fixing layers to not clip positioned objects when overflow:hidden
      	is set, fixing the stupid clip/sync layout hack for livepage
      	so that it doesn't break webreference, and implementing
      	navigator.productSub (right now the date is set to
      	Christmas 2002).
              Reviewed by gramps/maciej.
              * khtml/ecma/kjs_navigator.cpp:
              * khtml/ecma/kjs_navigator.h:
              * khtml/ecma/kjs_navigator.lut.h:
              * khtml/rendering/render_box.cpp:
              * khtml/rendering/render_box.h:
              * khtml/rendering/render_flow.cpp:
              * khtml/rendering/render_layer.cpp:
              * khtml/rendering/render_layer.h:
              * khtml/rendering/render_object.cpp:
              * khtml/rendering/render_object.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3054 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  17. 13 Dec, 2002 4 commits
    • rjw's avatar
      Fixed 3127310 and 3127920. · 3f425be4
      rjw authored
              Implemented findWordBoundary.  We now correctly detect word boundaries.
              This function makes use of carbon unicode utilities.
              With help from hyatt, made selection correctly account for render
              continuations.  This fixes many of the 'unable to select' issues.
              Reviewed by trey and hyatt.
              * khtml/khtml_events.cpp:
              * khtml/khtml_part.cpp:
              * khtml/rendering/render_object.cpp:
              * khtml/rendering/render_object.h:
              * khtml/rendering/render_text.cpp:
              * khtml/rendering/render_text.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3050 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • hyatt's avatar
      Fix for 314799, image at wired.com doesn't show up. Block · e2cdae93
      hyatt authored
      	level replaced floating elements were being treated as though
      	they didn't float.
              Reviewed by gramps
              * khtml/rendering/render_flow.cpp:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • hyatt's avatar
      Fix for 3098045. · 4bbddd4f
      hyatt authored
      	Do not treat XHTML-style tags e.g., <br/> or <table/> as
      	self-closing.  This is absolutely wrong, and it does not
      	match the behavior of other browsers.  According to the HTML4
      	spec for parsing, / is an erroneous character and should simply
      	be dropped, so <table/> should be treated like <table>.
      	Fixes for crashes on glazman's blog and on tantek's blog.  Both
      	still mis-render, but at least they don't crash.
              Reviewed by gramps (and darin too)
              * khtml/html/htmltokenizer.cpp:
      	* khtml/rendering/render_container.cpp:
      	* khtml/rendering/render_style.cpp:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • hyatt's avatar
      Two fixes. Bugs are 3121024, which had to do with handling · 89377f1a
      hyatt authored
      	escaped characters in the CSS content property, and
      	bug 3127375 (44854 in bugs.kde.org), which had to do with
      	making sure table cells relayout properly when images load
              Reviewed by darin and john
              * khtml/css/cssparser.cpp:
              * khtml/css/cssparser.h:
              * khtml/rendering/bidi.cpp:
              * khtml/rendering/render_flow.cpp:
              * khtml/rendering/render_flow.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3039 268f45cc-cd09-0410-ab3c-d52691b4dbfc