1. 29 Dec, 2002 2 commits
    • darin's avatar
      Reviewed by Maciej. · 45f34810
      darin authored
      	- fixed 3136391 -- PianoNanny.com screens turn to garbage when resized
      
      	Turns out browsers pass open calls to the window object if they show up at the document
      	with parameters. We now emulate that too.
      
              * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocFunction::tryCall): If we get an open call with
      	parameters, pass it on to the window.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      45f34810
    • darin's avatar
      Reviewed by Ken. · 65e464a5
      darin authored
      	- fixed 3134560 -- Lord of the Rings desktops don't load
      
              * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Removed the APPLE_CHANGES here.
      	The comment claims that we don't need the code because "JavaScript will do the work
      	below on demand", but that's not true for setting the base URL. Also, the comment
      	claims that this "adds an extra entry to the back/forward list", but testing does not
      	bear that out.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3200 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      65e464a5
  2. 28 Dec, 2002 3 commits
    • kocienda's avatar
      Safari-46 build · fccdb286
      kocienda authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3197 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fccdb286
    • kocienda's avatar
      WebCore: · 11bb1581
      kocienda authored
              Reviewed by Gramps and Richard.
      
      	Fix for this bug:
      
      	Radar 3112233 (400 response when attaching files at mail.yahoo.com)
      
      	KHTML multipart form code called into KMimeType class to determine
      	the mime type for file attachments, however, our implementation of
      	KMimeType has only stubs which call ERROR.
      
      	I added some code into KWQKHTMLPart and WebCoreBridge so that the
      	code in html_formimpl can call through to the WebFoundation mime
      	file map we maintain.
      
              * khtml/html/html_formimpl.cpp:
              (HTMLFormElementImpl::formData)
              * kwq/KWQKHTMLPart.h:
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::mimeTypeForFileName)
              * kwq/WebCoreBridge.h:
      
      WebKit:
      
               Reviewed by Gramps and Richard
      
               Fix for this bug:
      
               Radar 3112233 (400 response when attaching files at mail.yahoo.com)
      
               I added the MIMETypeForPath method which accesses the WebFoundation mime
               file map we maintain. KHTML can now access this map by using the bridge.
      
               * WebCoreSupport.subproj/WebBridge.m:
               (-[WebBridge MIMETypeForPath:])
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3195 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      11bb1581
    • 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
      ee114f40
  3. 26 Dec, 2002 1 commit
    • darin's avatar
      WebFoundation: · 3aa0d5f3
      darin authored
              Reviewed by Don.
      
              * Misc.subproj/WebAssertions.h: Fixed CRASH macro to use 0xbbadbeef instead of 0xbadbeef
      	to reduce the chance that the address will be valid once we have allocated a lot of memory.
      
      WebCore:
      
              Reviewed by Don.
      
              * kwq/KWQAssertions.h: Fixed CRASH macro to use 0xbbadbeef instead of 0xbadbeef
      	to reduce the chance that the address will be valid once we have allocated a lot of memory.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3189 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3aa0d5f3
  4. 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:
              (RenderText::computeWidths):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3186 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8f03ce2d
  5. 24 Dec, 2002 2 commits
    • darin's avatar
      Reviewed by Don. · 523f0cbf
      darin authored
      	- fixed 3135010 -- nil-dereference in KHTMLPart::xmlDocImpl() at channels.netscape.com
      
              * khtml/html/html_baseimpl.cpp: (HTMLFrameElementImpl::contentDocument):
              Add missing nil check. Also added lots of FIXME comments about problems I observed here.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3185 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      523f0cbf
    • darin's avatar
      Reviewed by Richard and Don. · a02ae6d8
      darin authored
      	- fixed 3133207 -- crash in HTMLFrameElementImpl updateForNewURL at home.real.com
      
      	My previous attempt to fix this dealt with the case where a RenderFrame object was
      	not yet created, but not with the case where a RenderFrame object was created without
      	a corresponding part. Somehow I overlooked this last time when I was doing testing.
      	Testing this time confirms this takes care of the remaining problem at movies.real.com.
      
              * khtml/html/html_baseimpl.cpp: (HTMLFrameElementImpl::updateForNewURL):
      	Use the same kind of requestFrame call here as in attach when there's a RenderFrame,
      	but no corresponding part. Maybe we can fix this an even more elegant way later.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3183 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a02ae6d8
  6. 23 Dec, 2002 3 commits
    • kocienda's avatar
      Building Alex-45 · a193bff1
      kocienda authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a193bff1
    • darin's avatar
      Reviewed by John. · a5de1758
      darin authored
      	- fixed 3134558 -- REGRESSION: Lord of the Rings site problems
      
      	This regression was caused when we fixed the abcnews.com problem (3124933).
      
              * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::createEmptyDocument):
      	Despite its name, this function was never intended to overwrite an existing document with
      	an empty document. When we changed it do do the creation in a better way, we lost the
      	check that prevents it from doing anything at all if we already have a document.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3175 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a5de1758
    • darin's avatar
      Reviewed by NOBODY (OOPS!). · 34039077
      darin authored
      	- fixed 3134558 -- REGRESSION: Lord of the Rings site problems
      
      	This regression was caused when we fixed the abcnews.com problem (3124933).
      
              * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::createEmptyDocument):
      	Despite its name, this function was never intended to overwrite an existing document with
      	an empty document. When we changed it do do the creation in a better way, we lost the
      	check that prevents it from doing anything at all if we already have a document.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      34039077
  7. 22 Dec, 2002 2 commits
  8. 20 Dec, 2002 19 commits
    • sheridan's avatar
      alex-44 · 650f7017
      sheridan authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      650f7017
    • darin's avatar
      Reviewed by Trey and Don. · 5de7095d
      darin authored
      	- fixed 3132160 -- meta refresh does not work if there's a space after the refresh interval value
      
              * khtml/xml/dom_docimpl.cpp: (DocumentImpl::processHttpEquiv):
      	Added a call to stripWhiteSpace here. The other places that processes delays for
      	meta refresh already had the stripWhiteSpace call, but this was missing it.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5de7095d
    • hyatt's avatar
      Fix for 3134163, a regression from the reduction of · dc56b2e8
      hyatt authored
      	styleForElement calls.  Make sure image buttons
      	get the width attribute and add it to style info
      	before styleForElement gets called.
      
              Reviewed by rjw
      
              * khtml/html/html_formimpl.cpp:
              (HTMLInputElementImpl::attach):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dc56b2e8
    • 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:
              (RenderText::trimmedMinMaxWidth):
              (RenderText::calcMinMaxWidth):
              * khtml/rendering/render_text.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3166 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a18024a4
    • darin's avatar
      Reviewed by Trey. · 38a9e98d
      darin authored
      	- fixed 3133801 -- REGRESSION: Japanese page comes up hash
      
              * khtml/khtml_part.cpp: (KHTMLPart::write): Roll back to original KHTML code here,
      	removing the "all ASCII" optimization.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3165 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      38a9e98d
    • 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:
              (RenderFlow::setStyle):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3164 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      385c7722
    • darin's avatar
      Remove stray change marker. · 76dbe9c5
      darin authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3162 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      76dbe9c5
    • rjw's avatar
      i Fix for 3133601. Play the same trick we do in · 1674abf2
      rjw authored
              KHTMLPartBrowserExtension::openURLRequest to create an empty
              document if necessary.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3161 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1674abf2
    • 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:
              (KHTMLView::KHTMLView):
              (KHTMLView::timerEvent):
              (KHTMLView::scheduleRelayout):
              * khtml/khtmlview.h:
              * khtml/rendering/render_object.cpp:
              (RenderObject::setLayouted):
              (RenderObject::scheduleRelayout):
              * khtml/rendering/render_object.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3160 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f3f98f68
    • darin's avatar
      Reviewed by John. · 46c72fa8
      darin authored
      	- fixed 3129387 -- Stopped responding to controls while filling out form (exception in KWQTextArea)
      
              * kwq/KWQTextArea.mm:
              (-[KWQTextArea getCursorPositionAsIndex:inParagraph:]): Fix code that was returning the wrong
      	paragraph number along with the index within the paragraph. Also made it return a paragraph one
      	past the end with an index of 0 for cases where you are at the end of the text.
              (-[KWQTextArea setCursorPositionToIndex:inParagraph:]): Range check the passed-in index. This
      	would also have prevented the exception.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3159 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      46c72fa8
    • sheridan's avatar
      alexander-43 · b0b73243
      sheridan authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3156 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b0b73243
    • darin's avatar
      Reviewed by John. · 7ca1166d
      darin authored
      	- fixed 3132382 -- crash in khtml::CachedImage
      
      	The source of this bug was my long-ago fix to bug 3079499.
      	I changed the code to copy the clients list. But this doesn't work if
      	one of the clients is removed while iterating because it's deleted.
      	So I made a new class, CachedObjectClientWalker, that does the iterating safely.
      	Now both this new bug and the original are fixed.
      
              * khtml/misc/loader.cpp:
              (CachedCSSStyleSheet::checkNotify): Use CachedObjectClientWalker to walk the list.
              (CachedScript::checkNotify): Ditto.
              (CachedImage::do_notify): Ditto.
              (CachedImage::movieStatus): Ditto.
              (CachedImage::checkNotify): Ditto.
              (CachedObjectClientWalker::next): Walk the list using a list iterator, which is
      	safe against the current item being removed. But go that safety one better by making
      	sure you don't miss the item after one that's removed.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3155 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7ca1166d
    • kocienda's avatar
      Reviewed by Darin · 51317c14
      kocienda authored
      	Fix for this bug:
      
      	Radar 3132171 (trying to login at mypage.apple.com gives "Already Connected" message)
      
      	The issue is that we submit the login form more than once when the user hits
      	the return key to submit rather than clicking the submit button. We are also
      	susceptible to double form submissions from buggy scripts that ask to submit
      	more than one form.
      
      	The fix is to prevent the KWQKHTMLPart from submitting more than one form by
      	setting and checking a flag.
      
              * kwq/KWQKHTMLPart.h: Add a form submit flag.
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::submitForm): Check form submit flag. Return if a form
      	has already been submitted.
              (KWQKHTMLPart::setView): Reset form flag. This is done since the part
      	may have been retrieved for reuse from the bac/forward cache.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3153 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      51317c14
    • 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:
              (RenderText::RenderText):
              (RenderText::setStyle):
              (RenderText::~RenderText):
              (RenderText::computeWidths):
              (RenderText::widthFromBuffer):
              (RenderText::trimmedMinMaxWidth):
              (RenderText::calcMinMaxWidth):
              (RenderText::setText):
              (RenderText::width):
              * khtml/rendering/render_text.h:
      
      WebKit:
              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
      9409ba5b
    • trey's avatar
      JavaScriptCore: · 2bacd046
      trey authored
      	We now build with symbols the B&I.  Deployment builds are without symbols,
      	so it is easy to generate a non-huge app as a one-off.
      
              Reviewed by Darin
      
              * JavaScriptCore.pbproj/project.pbxproj:
      
      WebFoundation:
      
      	We now build with symbols the B&I.  Deployment builds are without symbols,
      	so it is easy to generate a non-huge app as a one-off.
      
              Reviewed by Darin
      
              * WebFoundation.pbproj/project.pbxproj:
      
      WebCore:
      
      	We now build with symbols the B&I.  Deployment builds are without symbols,
      	so it is easy to generate a non-huge app as a one-off.
      
              Reviewed by Darin
      
              * WebCore.pbproj/project.pbxproj:
      
      WebKit:
      
      	We now build with symbols the B&I.  Deployment builds are without symbols,
      	so it is easy to generate a non-huge app as a one-off.
      
              Reviewed by Darin
      
              * WebKit.pbproj/project.pbxproj:
      
      WebBrowser:
      
      	We now build with symbols the B&I.  Deployment builds are without symbols,
      	so it is easy to generate a non-huge app as a one-off.
      
              Reviewed by Darin
      
              * WebBrowser.pbproj/project.pbxproj:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3151 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2bacd046
    • darin's avatar
      Reviewed by John. · 6acf1805
      darin authored
      	- fixed 3129824 -- crash in QWidget::getView in KWQKHTMLPart::passSubframeEventToSubframe
      
              * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::passWidgetMouseDownEventToWidget):
      	Check for a nil QWidget in a RenderWidget, and ERROR and return true in that case.
      	We don't want to return false because otherwise the KHTML code will try to draw a frame splitter.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3150 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6acf1805
    • darin's avatar
      Reviewed by John. · bb3ba768
      darin authored
      	- fixed 3131449 -- crash in DOMNamedNodesCollection::tryGet opening a new window from JavaScript
      
              * khtml/ecma/kjs_dom.cpp: (DOMNamedNodesCollection::tryGet):
      	Add range checking. If the index is out of range fall back to the parent tryGet,
      	which will eventually just return Undefined().
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3149 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bb3ba768
    • 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
      2b5e6e2c
    • 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
      35355e5d
  9. 19 Dec, 2002 4 commits
    • sheridan's avatar
      alexander-42 · 3810ad1a
      sheridan authored
      it's the meaning of life
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3810ad1a
    • 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
      	code.
      
      	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:
              (RenderFlow::layout):
              (RenderFlow::splitFlow):
              (RenderFlow::addChildToFlow):
              * khtml/rendering/render_flow.h:
              * khtml/rendering/render_list.cpp:
              (RenderListMarker::lineHeight):
              * khtml/rendering/render_list.h:
              * khtml/rendering/render_object.cpp:
              (RenderObject::createObject):
              * khtml/rendering/render_table.cpp:
              (RenderTable::lineHeight):
              (RenderTable::baselinePosition):
              (RenderTable::setStyle):
              * khtml/rendering/render_table.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3143 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7f3f4ea2
    • darin's avatar
      Reviewed by John. · 8ed959e6
      darin authored
      	A number of non-reproducible bugs look like they may be due to bad
      	event objects. I was assuming that callers retained the events until
      	the functions handling them returned, but that assumption may be wrong.
      	So I'm retaining/releasing the current event. This is correct in any case.
      	I'm also adding a new assertion, but since assertions are in Development
      	builds only that is very low risk.
      
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::keyEvent): Add retain/release and a new assertion.
              (KWQKHTMLPart::mouseDown): Ditto.
              (KWQKHTMLPart::mouseDragged): Ditto.
              (KWQKHTMLPart::mouseUp): Ditto.
              (KWQKHTMLPart::mouseMoved): Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3142 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8ed959e6
    • sheridan's avatar
      Alexander-41 going to B&I · 7cbdbb90
      sheridan authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3137 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7cbdbb90
  10. 18 Dec, 2002 3 commits