Reviewed by John
[WebKit-https.git] / WebCore / ChangeLog-2005-08-23
index 1ad8077..6bc843b 100644 (file)
+2004-12-06  Ken Kocienda  <kocienda@apple.com>
+        Reviewed by John
+        
+        * khtml/dom/dom_string.cpp:
+        (DOM::DOMString::substring): Expose method already on DOMStrimgImpl.
+        * khtml/dom/dom_string.h: Ditto.
+        * khtml/editing/htmlediting.cpp:
+        (khtml::CompositeEditCommand::rebalanceWhitespace): New helper to create and execute a
+        RebalanceWhitespaceCommand instance.
+        (khtml::DeleteSelectionCommand::doApply): Call rebalanceWhitespace() after running command.
+        (khtml::InsertLineBreakCommand::doApply): Ditto.
+        (khtml::InsertParagraphSeparatorCommand::doApply): Ditto.
+        (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Ditto.
+        (khtml::InsertTextCommand::input): Ditto.
+        (khtml::RebalanceWhitespaceCommand::RebalanceWhitespaceCommand): New command.
+        (khtml::RebalanceWhitespaceCommand::~RebalanceWhitespaceCommand): Ditto.
+        (khtml::RebalanceWhitespaceCommand::doApply): Ditto.
+        (khtml::RebalanceWhitespaceCommand::doUnapply): Ditto.
+        (khtml::RebalanceWhitespaceCommand::preservesTypingStyle): Ditto.
+        (khtml::ReplaceSelectionCommand::completeHTMLReplacement): Ditto.
+        * khtml/editing/htmlediting.h: Ditto.
+        (khtml::RebalanceWhitespaceCommand::): Ditto.
+
+2004-12-05  Darin Adler  <darin@apple.com>
+
+        - fixed small problem in my check-in from yesterday
+
+        * kwq/KWQEvent.mm:
+        (positionForEvent): Get location from event without raising exception if it's the wrong type.
+        (clickCountForEvent): Same, for clickCount.
+        (QMouseEvent::QMouseEvent): Use the new helper functions so this can be constructed even with
+        the wrong type of NSEvent. Required for cases where a keyboard event causes a "click" and we need
+        to synthesize a QMouseEvent for KHTML internal use, using the key down NSEvent.
+
+2004-12-04  Darin Adler  <darin@apple.com>
+
+        Reviewed by John.
+
+        - fixed <rdar://problem/3878329> REGRESSION (169-170): colors are wrong for my.yahoo.com due to CSS background parsing changes
+
+        * khtml/css/cssparser.cpp: (CSSParser::parseBackgroundShorthand): Changed function so it doesn't rely on the position
+        attribute being at the end of the array and then moved position attribute before color attribute so it takes precedence.
+        Since "0" can be both the X coordinate of a position and a legal color (meaning black), we need to do position first.
+
+        - fixed <rdar://problem/3760869> click events for input type=button or type=checkbox don't have flags like shiftKey set
+
+        * khtml/rendering/render_form.h: Remove unused RenderFormElement fields.
+        * khtml/rendering/render_form.cpp:
+        (RenderFormElement::RenderFormElement): Take out code to set a bunch of unused fields.
+        (RenderFormElement::slotClicked): Change to create the QMouseEvent from the actual mouse event rather than
+        creating it with all the flags set to 0, using the new QMouseEvent constructor that does so.
+
+        * kwq/KWQEvent.h: Added constructor that takes no parameters which uses the current event from AppKit.
+        Made the click count getter const and added an isDoubleClick that matches the logic used elsewhere.
+        Added a fixState helper method so the constructors can save code.
+        * kwq/KWQEvent.mm:
+        (QMouseEvent::QMouseEvent): Factored out the state-fixing code that was in the two existing constructors
+        and added a third constructor that uses the "current event" from AppKit (used above).
+        (QMouseEvent::fixState): Compute state and click count based on event type.
+
+        - fixed first symptom of <rdar://problem/3830936> REGRESSION (125-165): crash due to null font family, hang at changeforamerica.com
+
+        * kwq/KWQFontFamily.mm: (KWQFontFamily::getNSFamily): Handle empty strings specially so we don't run into trouble when
+        the family name is a null string. This prevents the crash, but there are still other problems that may have the same
+        underlying cause in CSS.
+
+        - fixed <rdar://problem/3829808> Safari crashes when adding a DOM node that was removed from an XMLHTTP request result
+
+        * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::insertedIntoDocument):
+        Added nil check before calling scheduleRelayout. This is new code so the nil-dereference is a recent regression.
+
+2004-12-03  Chris Blumenberg  <cblu@apple.com>
+
+       New fixes for:
+       <rdar://problem/3685766> WebDataSource is missing subresources when they use cached WebCore data
+       <rdar://problem/3722434> REGRESSION?: Assertion failure trying to drag image in iframe (itapema.sc.gov.br)
+       <rdar://problem/3903173> REGRESSION (172-TOT): assertion failure and crash in slotAllData logging into hotmail account
+       <rdar://problem/3902749> REGRESSION (Tiger): missing image symbol does not appear
+
+        Reviewed by darin, rjw, kocienda.
+
+        * khtml/misc/loader.cpp:
+        (CachedObject::~CachedObject):
+        (CachedCSSStyleSheet::checkNotify):
+        (Loader::servePendingRequests):
+        (Loader::slotFinished):
+        (Loader::slotReceivedResponse):
+        (Cache::requestImage):
+        (Cache::requestScript):
+        * khtml/misc/loader.h:
+        (khtml::CachedObject::CachedObject):
+        (khtml::CachedObject::response):
+        (khtml::CachedObject::allData):
+        * kwq/KWQKJobClasses.h:
+        * kwq/KWQKJobClasses.mm:
+        (KIO::TransferJobPrivate::TransferJobPrivate):
+        (KIO::TransferJobPrivate::~TransferJobPrivate):
+        (KIO::TransferJob::TransferJob):
+        (KIO::TransferJob::assembleResponseHeaders):
+        (KIO::TransferJob::retrieveCharset):
+        (KIO::TransferJob::emitResult):
+        (KIO::TransferJob::emitReceivedResponse):
+        * kwq/KWQLoader.h:
+        * kwq/KWQLoader.mm:
+        (KWQHeaderStringFromDictionary):
+        (KWQCheckCacheObjectStatus):
+        (KWQIsResponseURLEqualToURL):
+        (KWQResponseURL):
+        (KWQResponseMIMEType):
+        (KWQCacheObjectExpiresTime):
+        (khtml::CachedObject::setResponse):
+        (khtml::CachedObject::setAllData):
+        * kwq/KWQPixmap.h:
+        * kwq/KWQPixmap.mm:
+        (QPixmap::QPixmap):
+        * kwq/KWQResourceLoader.mm:
+        (-[KWQResourceLoader finishJobAndHandle:]):
+        (-[KWQResourceLoader cancel]):
+        (-[KWQResourceLoader reportError]):
+        (-[KWQResourceLoader finishWithData:]):
+        * kwq/KWQSignal.h:
+        * kwq/KWQSignal.mm:
+        (KWQSignal::call):
+        * kwq/KWQSlot.h:
+        * kwq/KWQSlot.mm:
+        (KWQSlot::KWQSlot):
+        (KWQSlot::call):
+        * kwq/WebCoreBridge.h:
+        * kwq/WebCoreResourceLoader.h:
+
+2004-12-04  Darin Adler  <darin@apple.com>
+
+        Reviewed by John.
+
+        - fixed <rdar://problem/3876093> REGRESSION (166-167): Setting slider control's value from JavaScript has no effect (breaks RSS)
+
+        * khtml/rendering/render_form.cpp:
+        (RenderSlider::updateFromElement): Call setValue to update the value of the DOM element rather than
+        modifying the m_value data member directly. We don't use m_value at all for sliders now, and in fact
+        the code relies on the fact that m_value is null. Setting m_value to a non-null value was causing the bug.
+        (RenderSlider::slotSliderValueChanged): Ditto.
+
+2004-12-03  John Sullivan  <sullivan@apple.com>
+
+        Reviewed by Ken.
+        
+        - fixed <rdar://problem/3889411> REGRESSION (125-172): repro crash in 
+        khtml::BackgroundLayer::cullEmptyLayers
+
+        * khtml/rendering/render_style.cpp:
+        (BackgroundLayer::cullEmptyLayers):
+        added missing nil check
+
+=== Safari-173 ===
+
+2004-12-03  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by me
+
+        Roll out some recent changes by Chris that caused a performance regression.
+        Fix is in hand, but it is a little risky this close to a submission. So,
+        we have decided to roll back the change with the regression and roll in
+        the new code after we submit.
+
+        * khtml/css/cssproperties.c:
+        (hash_prop):
+        (findProp):
+        * khtml/css/cssvalues.c:
+        (hash_val):
+        (findValue):
+        * khtml/misc/htmlattrs.c:
+        (hash_attr):
+        (findAttr):
+        * khtml/misc/htmltags.c:
+        (hash_tag):
+        (findTag):
+        * khtml/misc/loader.cpp:
+        (CachedObject::~CachedObject):
+        (CachedObject::setResponse):
+        (CachedCSSStyleSheet::checkNotify):
+        (Loader::servePendingRequests):
+        (Loader::slotFinished):
+        (Loader::slotReceivedResponse):
+        (Cache::requestImage):
+        (Cache::requestScript):
+        * khtml/misc/loader.h:
+        (khtml::CachedObject::CachedObject):
+        (khtml::CachedObject::response):
+        * kwq/KWQKJobClasses.h:
+        * kwq/KWQKJobClasses.mm:
+        (KIO::TransferJobPrivate::TransferJobPrivate):
+        (KIO::TransferJobPrivate::~TransferJobPrivate):
+        (KIO::TransferJob::TransferJob):
+        (KIO::TransferJob::assembleResponseHeaders):
+        (KIO::TransferJob::retrieveCharset):
+        (KIO::TransferJob::emitResult):
+        (KIO::TransferJob::emitReceivedResponse):
+        * kwq/KWQLoader.h:
+        * kwq/KWQLoader.mm:
+        (KWQHeaderStringFromDictionary):
+        (KWQCheckCacheObjectStatus):
+        (KWQRetainResponse):
+        (KWQReleaseResponse):
+        (KWQIsResponseURLEqualToURL):
+        (KWQResponseURL):
+        (KWQResponseMIMEType):
+        (KWQResponseTextEncodingName):
+        (KWQResponseHeaderString):
+        (KWQCacheObjectExpiresTime):
+        (KWQLoader::KWQLoader):
+        * kwq/KWQPixmap.h:
+        * kwq/KWQPixmap.mm:
+        (QPixmap::QPixmap):
+        * kwq/KWQResourceLoader.mm:
+        (-[KWQResourceLoader finishJobAndHandle]):
+        (-[KWQResourceLoader cancel]):
+        (-[KWQResourceLoader reportError]):
+        (-[KWQResourceLoader finish]):
+        * kwq/KWQSignal.h:
+        * kwq/KWQSignal.mm:
+        (KWQSignal::call):
+        * kwq/KWQSlot.h:
+        * kwq/KWQSlot.mm:
+        (KWQSlot::KWQSlot):
+        (KWQSlot::call):
+        * kwq/WebCoreBridge.h:
+        * kwq/WebCoreResourceLoader.h:
+
+2004-12-03  John Sullivan  <sullivan@apple.com>
+
+        Reviewed by Chris.
+        
+        - fixed <rdar://problem/3903990> can't tab to all items on www.google.com any more (other pages too?)
+
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::nextKeyViewInFrameHierarchy):
+        when checking whether we moved the focus to another view, make sure we didn't "move" it to
+        our documentView, because that's no move at all.
+
+2004-12-03  Darin Adler  <darin@apple.com>
+
+        Reviewed by Vicki.
+
+        - fixed <rdar://problem/3901109> REGRESSION (171-172): repro crash in DOM::NodeImpl::setChanged at chick-fil-a.com
+
+        * khtml/css/css_valueimpl.cpp: (DOM::CSSMutableStyleDeclarationImpl::CSSMutableStyleDeclarationImpl):
+        Added missing initialization for base class and node pointer.
+
+        - fixed a few places that could leave dangling node pointers
+
+        * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::~HTMLBodyElementImpl):
+        Clear out the node pointer when the node is destroyed.
+        * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::~HTMLElementImpl): Ditto.
+
+2004-12-03  Chris Blumenberg  <cblu@apple.com>
+
+       Fix for performance regression. My original patch added a signal for passing the data of a resource to its WebCore cache object. This patch passes the data with the preexisting "finished" symbol so we make less calls. 
+       Fixed: <rdar://problem/3903173> REGRESSION (172-TOT): assertion failure and crash in slotAllData logging into hotmail account
+
+        Reviewed by rjw.
+
+        * khtml/misc/loader.cpp:
+        (Loader::servePendingRequests): pass data param to slotFinished, removed allData signal
+        (Loader::slotFinished): take data param
+        * khtml/misc/loader.h:
+        * kwq/KWQKJobClasses.h:
+        * kwq/KWQKJobClasses.mm:
+        (KIO::TransferJob::TransferJob): have m_result take a data param, removed m_allData
+        (KIO::TransferJob::emitResult): take data param and pass it
+        * kwq/KWQResourceLoader.mm:
+        (-[KWQResourceLoader finishJobAndHandle:]): take data param and pass it
+        (-[KWQResourceLoader cancel]): pass nil for data
+        (-[KWQResourceLoader reportError]): ditto
+        (-[KWQResourceLoader finishWithData:]): pass data
+        * kwq/KWQSlot.mm:
+        (KWQSlot::KWQSlot): pass data param to slotFinished
+        (KWQSlot::call): added support for slotFinished_Loader, removed slotAllData
+
+2004-12-03  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by John
+
+        Did some clean up in the Position class as a result of trying to write some new layout
+        tests and discovering a bug along the way.
+
+        I removed these three functions from the Position class:
+        
+        1. bool isFirstRenderedPositionOnLine() const;
+        2. bool isLastRenderedPositionOnLine() const;
+        3. static bool renderersOnDifferentLine(RenderObject *r1, long o1, RenderObject *r2, long o2);
+        4. bool inFirstEditableInRootEditableElement() const;
+
+        The first two have replacements in the VisiblePosition class, and some code has been
+        moved to use these new variants. The third function was a helper used only by these
+        first two function, and can be removed as well. The fourth function was not used by anyone.
+
+        * khtml/editing/htmlediting.cpp:
+        (khtml::InsertTextCommand::input): Change over to use VisiblePosition isFirstVisiblePositionOnLine().
+        * khtml/editing/visible_position.cpp:
+        (khtml::visiblePositionsOnDifferentLines): Added an additional check for blocks to this function.
+        Incorrect results were being returned when asking about positions at the starts of blocks.
+        * khtml/xml/dom_position.cpp:
+        (DOM::Position::previousCharacterPosition): Change over to use VisiblePosition isFirstVisiblePositionOnLine().
+        (DOM::Position::nextCharacterPosition): Change over to use VisiblePosition isLastVisiblePositionOnLine().
+        (DOM::Position::rendersInDifferentPosition): Removed use of #3 helper in a log message. We can live without it.
+        * khtml/xml/dom_position.h: Update header for deletions.
+
+2004-12-03  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by John
+
+        Terminology change in execCommand command identifiers. Specifically, the name of 
+        "InsertNewline" command has been changed to "InsertLineBreak". This matches the 
+        terminology used by AppKit. It is also more accurate, since the insertion of a
+        "br" element is what the command does. The inspiration for this change is so the 
+        -insertNewline AppKit method can be mapped to insert a new "div" element in 
+        a document and avoid ambiguity with what the javascript editing command does.
+        
+        * khtml/editing/jsediting.cpp
+        * layout-tests/editing/deleting/delete-tab-004.html
+        * layout-tests/editing/editing.js
+        * layout-tests/editing/inserting/insert-3654864-fix.html
+        * layout-tests/editing/inserting/insert-3659587-fix.html
+        * layout-tests/editing/inserting/insert-3775316-fix.html
+        * layout-tests/editing/inserting/insert-3800346-fix.html
+        * layout-tests/editing/inserting/insert-br-001.html
+        * layout-tests/editing/inserting/insert-br-002.html
+        * layout-tests/editing/inserting/insert-br-003.html
+        * layout-tests/editing/inserting/insert-br-004.html
+        * layout-tests/editing/inserting/insert-br-005.html
+        * layout-tests/editing/inserting/insert-br-006.html
+        * layout-tests/editing/inserting/insert-br-007.html
+        * layout-tests/editing/inserting/insert-br-008.html
+        * layout-tests/editing/inserting/insert-tab-004.html
+        * layout-tests/editing/inserting/insert-text-with-newlines.html
+        * layout-tests/editing/pasteboard/paste-text-010.html
+
+2004-12-02  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by John
+
+        Fix for this bug:
+        
+        <rdar://problem/3786362> REGRESSION (Mail): pasted text loses one newline
+
+        * khtml/editing/htmlediting.cpp:
+        (khtml::InsertLineBreakCommand::doApply): Added check for strict mode before adding an extra br element
+        at the end of a block. This is only necessary in quirks mode. Also, lower-case "br" used to make element.
+        (khtml::ReplaceSelectionCommand::doApply): If the replacement adds a br element as the last element
+        in a block and the document is in quirks mode, add an additional br to make the one in the 
+        replacement content show up. This turns out to be much the same logic as is done in InsertLineBreakCommand.
+        * layout-tests/editing/inserting/insert-3786362-fix-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-3786362-fix.html: Added.
+
+2004-12-02  Richard Williamson   <rjw@apple.com>
+
+       Fixed <rdar://problem/3841332> REGRESSION (125.9-167u): repro crash in -[KWQPageState invalidate] involving .Mac images
+
+       Ensure that the document is cleared when leaving a non-HTML page.  This ensures that
+       the b/f cache won't incorrectly trash the previous state when restoring.
+
+        Reviewed by John.
+
+        * kwq/WebCoreBridge.h:
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge openURL:reload:contentType:refresh:lastModified:pageCache:]):
+        (-[WebCoreBridge canCachePage]):
+        (-[WebCoreBridge clear]):
+
+2004-12-02  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by Richard
+
+        Fix for this bug:
+        
+        <rdar://problem/3857775> 8A293: Mail.app crashes converting copy-pasted text into plain text
+
+        * khtml/xml/dom2_rangeimpl.cpp:
+        (DOM::RangeImpl::commonAncestorContainer): Return the document element if no common ancestor container
+        was found. This can happen in cases where the DOM was built from malformed markup (as in the case
+        of this bug where there is content after the body tag). Did a little code clean up as well.
+        (DOM::RangeImpl::compareBoundaryPoints): Made code more robust by adding some null checks.
+
+2004-12-02  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by Chris
+
+        Fix for this bug:
+        
+        <rdar://problem/3668157> REGRESSION (Mail): shift-click deselects when selection was created right-to-left
+
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::handleMousePressEventSingleClick): Use RangeImpl::compareBoundaryPoints
+        to figure out which end of the selection to extend.
+
+2004-12-02  David Harrison  <harrison@apple.com>
+
+        Reviewed by Ken Kocienda.
+
+               <rdar://problem/3834917> REGRESSION (Mail): double-clicking blank line selects end of previous line
+               Fixed originally reported bug plus the case of double-clicking whitespace at the beginning of a line, which has a similar result.
+
+        * khtml/editing/visible_text.cpp:
+        (khtml::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
+        (khtml::SimplifiedBackwardsTextIterator::handleTextNode):
+        (khtml::SimplifiedBackwardsTextIterator::handleReplacedElement):
+        (khtml::SimplifiedBackwardsTextIterator::handleNonTextNode):
+        (khtml::SimplifiedBackwardsTextIterator::emitCharacter):
+        Distinguish BR from whitespace.
+        * khtml/editing/visible_text.h:
+        Distinguish BR from whitespace.
+        * khtml/editing/visible_units.cpp:
+        (khtml::previousWordBoundary):
+        Use UPSTREAM visible position now that SimplifiedBackwardsTextIterator distinguishes BR from whitespace.  Otherwise, double-clicking at end of line would result in caret selection at start of next line. 
+
+2004-12-02  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by John
+
+        Fix for this bug:
+        
+        <rdar://problem/3900996> Crash dragging past end of contentEditable DIV, at DOM::RangeImpl::pastEndNode() const + 24
+
+        * khtml/xml/dom_position.cpp:
+        (DOM::Position::equivalentRangeCompliantPosition): Fixed this function so that it constrains the offset
+        of the position to be >= 0 and <= number of kids of its node. Not doing this constraining led to a DOM
+        exception trying to use a Position returned from this function to set the boundary point of a Range (which
+        eventually led to the crash). Since this crash happened, it seems like this function was failing in its
+        contract to return a range-compliant position, hence the need for this fix.
+
+2004-12-01  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by me
+
+        Moving code only.
+
+        * khtml/editing/htmlediting.cpp: Move ReplaceSelectionCommand into alphabetical order with
+        regard to other editing commands. The class had a name change ages ago, and it was never
+        moved.
+        * khtml/editing/htmlediting.h: Ditto.
+
+2004-12-01  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by Hyatt
+        
+        Some improvements for paste, including some new code to annotate
+        whitespace when writing to the pasteboard to ensure that the meaning
+        of the markup on the pasteboard is unambiguous.
+        
+        There is also new code for reading this annotated markup from the pasteboard,
+        removing the nodes that were added only to prevent ambiguity.
+
+        * WebCore.pbproj/project.pbxproj: Added html_interchange.h and html_interchange.cpp files.
+        The header should have been added earlier, but I did not do so.
+        * khtml/editing/html_interchange.cpp: Added.
+        (convertHTMLTextToInterchangeFormat):
+        * khtml/editing/html_interchange.h: Added some new constants for use with whitespace annotations.
+        * khtml/editing/htmlediting.cpp:
+        (khtml::ReplacementFragment::ReplacementFragment): Now looks for and removes annotations added for whitespace.
+        Also fixed a bug in the code that counts blocks in a fragment.
+        (khtml::ReplacementFragment::isInterchangeConvertedSpaceSpan): New helper. Recognizes annotation spans.
+        (khtml::ReplacementFragment::insertNodeBefore): New helper.
+        (khtml::ReplaceSelectionCommand::doApply): Fixed a bug in the code that sets the start position
+        for the replacement after deleting. This was causing a bug when pasting at the end of a block.
+        * khtml/editing/htmlediting.h: Add some new declarations.
+        * khtml/xml/dom2_rangeimpl.cpp:
+        (DOM::RangeImpl::toHTML): Calls to startMarkup now pass true for the new annotate flag.
+        * khtml/xml/dom_nodeimpl.cpp:
+        (NodeImpl::stringValueForRange): New helper.
+        (NodeImpl::renderedText): New helper to return only the rendered text in a node.
+        (NodeImpl::startMarkup): Now takes an additional flag to control whether interchange annotations
+        should be added. Called by the paste code.
+        * khtml/xml/dom_nodeimpl.h: Added and modified function declarations.
+
+        New test to check the khtml::ReplaceSelectionCommand::doApply fix.
+        * layout-tests/editing/pasteboard/paste-text-010-expected.txt: Added.
+        * layout-tests/editing/pasteboard/paste-text-010.html: Added.
+
+2004-11-30  Chris Blumenberg  <cblu@apple.com>
+
+        * ChangeLog: removed conflict marker
+
+2004-11-30  Chris Blumenberg  <cblu@apple.com>
+
+       Fixed:
+       <rdar://problem/3685766> WebDataSource is missing subresources when they use cached WebCore data
+       <rdar://problem/3722434> REGRESSION?: Assertion failure trying to drag image in iframe (itapema.sc.gov.br)
+
+        Reviewed by darin.
+
+        * khtml/misc/loader.cpp:
+        (CachedObject::~CachedObject): release m_allData
+        (CachedObject::setAllData): new
+        (Loader::servePendingRequests): connect slotAllData
+        (Loader::slotAllData): new
+        (Cache::requestImage): tweak
+        * khtml/misc/loader.h:
+        (khtml::CachedObject::CachedObject): set allData to 0
+        (khtml::CachedObject::allData): new
+        * kwq/KWQKJobClasses.h:
+        * kwq/KWQKJobClasses.mm:
+        (KIO::TransferJob::TransferJob): set m_allData
+        (KIO::TransferJob::emitAllData): new
+        * kwq/KWQLoader.mm:
+        (KWQCheckCacheObjectStatus): pass WebKit the data instead of the length of the resource
+        * kwq/KWQResourceLoader.mm:
+        (-[KWQResourceLoader finishWithData:]): renamed to pass all data for the resource
+        * kwq/KWQSlot.mm:
+        (KWQSlot::KWQSlot): support for slotAllData
+        (KWQSlot::call):
+        * kwq/WebCoreBridge.h:
+        * kwq/WebCoreResourceLoader.h:
+
+2004-11-30  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by John.
+
+2004-11-30  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by John.
+
+       <rdar://problem/3805311> REGRESSION (159-163): onload in dynamically written document not called (causes blank search page at Japanese EPP site, many others)
+
+        * khtml/khtml_part.cpp:
+       (KHTMLPart::begin): call setParsing on document here after opening
+       - from now on we'll only set parsing to true for a document open
+       caused by page loading, not a programmatic one.
+       * khtml/xml/dom_docimpl.cpp:
+        (DocumentImpl::open): don't setParsing to true here any more.
+
+2004-11-30  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by John.
+
+       - fix recent regression from collection perf fixes.
+       
+        * khtml/html/html_miscimpl.cpp:
+        (HTMLFormCollectionImpl::updateNameCache): Look up the name
+       attribute in the name cache, not the id cache (d'oh!)
+
+2004-11-30  Darin Adler  <darin@apple.com>
+
+        Reviewed by Ken.
+
+        - rolled in a KDE fix for a problem that may underlie a number of crashes
+
+        * khtml/xml/dom2_rangeimpl.cpp: (RangeImpl::compareBoundaryPoints): Rolled in a change from
+        the KDE guys to fix a subtle problem. Code said "n = n =".
+
+        - rolled in a KDE fix for a containingBlock crash
+
+        * khtml/rendering/render_object.cpp: Roll in a change from KDE that adds frameset to the list of
+        elements that can not be a containingBlock. They said this fixes a crash, although I did not look
+        into that further.
+
+        - fixed <rdar://problem/3884660> 8A305: Repro crash in QScrollBar::setValue (affects Safari RSS)
+
+        * kwq/KWQButton.mm:
+        (-[KWQButton initWithQButton:]): Set up target and action here instead of in caller.
+        (-[KWQButton detachQButton]): Added.
+        (-[KWQButton sendConsumedMouseUpIfNeeded]): Check button for nil instead of checking target.
+        (-[KWQButton mouseDown:]): Add calls to QWidget::beforeMouseDown/afterMouseDown.
+        (-[KWQButton widget]): Added.
+        (-[KWQButton becomeFirstResponder]): Added check to handle when button is 0.
+        (-[KWQButton resignFirstResponder]): Ditto.
+        (-[KWQButton canBecomeKeyView]): Ditto.
+        (QButton::QButton): Remove target and action setup; handled in KWQButton now.
+        (QButton::~QButton): Call detachQButton instead of setTarget:nil.
+
+        * kwq/KWQComboBox.mm:
+        (QComboBox::~QComboBox): Call detachQComboBox.
+        (-[KWQPopUpButtonCell detachQComboBox]): Added.
+        (-[KWQPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:]): Handle case where box is 0.
+        (-[KWQPopUpButtonCell setHighlighted:]): Ditto.
+        (-[KWQPopUpButton action:]): Ditto.
+        (-[KWQPopUpButton widget]): Tweaked.
+        (-[KWQPopUpButton mouseDown:]): Added. Calls QWidget::beforeMouseDown/afterMouseDown.
+        (-[KWQPopUpButton becomeFirstResponder]): Handle case where widget is 0.
+        (-[KWQPopUpButton resignFirstResponder]): Ditto.
+        (-[KWQPopUpButton canBecomeKeyView]): Ditto.
+
+        * kwq/KWQLineEdit.mm: (QLineEdit::~QLineEdit): Updated to use new detachQLineEdit name.
+
+        * kwq/KWQListBox.mm:
+        (-[KWQTableView mouseDown:]): Added. Calls QWidget::beforeMouseDown/afterMouseDown.
+
+        * kwq/KWQScrollBar.h: Removed m_scroller field.
+        * kwq/KWQScrollBar.mm:
+        (-[KWQScrollBar initWithQScrollBar:]): Rearranged a little bit.
+        (-[KWQScrollBar detachQScrollBar]): Added.
+        (-[KWQScrollBar widget]): Added.
+        (-[KWQScrollBar mouseDown:]): Added.  Calls QWidget::beforeMouseDown and afterMouseDown.
+        (QScrollBar::QScrollBar): Changed to no longer set m_scroller.
+        (QScrollBar::~QScrollBar): Changed to call detachQScrollBar. No longer calls removeFromSuperview.
+        (QScrollBar::setValue): Chagned to use getView instad of m_scrollBar.
+        (QScrollBar::setKnobProportion): Ditto.
+        (QScrollBar::scrollbarHit): Ditto.
+
+        * kwq/KWQScrollView.mm:
+        (QScrollView::addChild): Changed to call QWidget to add to superview to accomodate the
+        hack where we don't remove right away when doing mouse tracking.
+        (QScrollView::removeChild): Changed to call QWidget to remove from superview to accomodate
+        the hack where we don't add right away when doing mouse tracking.
+
+        * kwq/KWQSlider.h: Added destructor.
+        * kwq/KWQSlider.mm:
+        (-[KWQSlider initWithQSlider:]): Tweaked a little.
+        (-[KWQSlider detachQSlider]): Added.
+        (-[KWQSlider mouseDown:]): Added call to QWidget::beforeMouseDown/afterMouseDown.
+        (-[KWQSlider widget]): Added.
+        (QSlider::~QSlider): Added. Calls detachQSlider.
+
+        * kwq/KWQTextArea.h: Added detachQTextEdit method.
+        * kwq/KWQTextArea.mm:
+        (-[KWQTextArea detachQTextEdit]): Added.
+        (-[KWQTextArea textDidChange:]): Added check for widget of 0.
+        (-[KWQTextArea becomeFirstResponder]): Ditto.
+        (-[KWQTextArea nextKeyView]): Ditto.
+        (-[KWQTextArea previousKeyView]): Ditto.
+        (-[KWQTextArea drawRect:]): Ditto.
+        (-[KWQTextAreaTextView insertTab:]): Ditto.
+        (-[KWQTextAreaTextView insertBacktab:]): Ditto.
+        (-[KWQTextAreaTextView shouldDrawInsertionPoint]): Ditto.
+        (-[KWQTextAreaTextView selectedTextAttributes]): Ditto.
+        (-[KWQTextAreaTextView mouseDown:]): Ditto.
+        (-[KWQTextAreaTextView keyDown:]): Ditto.
+        (-[KWQTextAreaTextView keyUp:]): Ditto.
+
+        * kwq/KWQTextEdit.h: Added ~QTextEdit.
+        * kwq/KWQTextEdit.mm: (QTextEdit::~QTextEdit): Added. Calls detachQTextEdit.
+
+        * kwq/KWQTextField.h: Changed invalidate to detachQLineEdit.
+        * kwq/KWQTextField.mm: (-[KWQTextFieldController detachQLineEdit]): Changed.
+
+        * kwq/KWQWidget.h: Added addToSuperview/removeFromSuperview for use from QScrollView.
+        Added beforeMouseDown and afterMouseDown for use in widget implementations.
+        Removed unused hasMouseTracking function.
+        * kwq/KWQWidget.mm:
+        (QWidget::QWidget): Initialize two new fields.
+        (QWidget::~QWidget): Added code to remove view when widget is destroyed.
+        (QWidget::getOuterView): Remove unneeded exception blocking since we're just caling superview.
+        (QWidget::addToSuperview): Added.
+        (QWidget::removeFromSuperview): Added.
+        (QWidget::beforeMouseDown): Added.
+        (QWidget::afterMouseDown): Added.
+
+        * khtml/rendering/render_layer.cpp:
+        (RenderLayer::setHasHorizontalScrollbar): Remove parent parameter; let addChild call addSubview:.
+        (RenderLayer::setHasVerticalScrollbar): Ditto.
+
+2004-11-30  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by John
+
+        Fix for this bug:
+        
+        <rdar://problem/3863031> REGRESSION (Mail): caret continues flashing while mouse is down
+
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::timerEvent): Add a check for whether the mouse is down. Keep the caret drawn
+        with no blink if it is.
+
+2004-11-30  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by John
+
+        Fix for this bug:
+        
+        <rdar://problem/3861602> cursor gets lost trying to backspace to delete a form control
+
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::setFocusNodeIfNeeded): This function would clear the selection if a <button>
+        or <input type=image> was checked for focus since these elements are keyboard-focusable,
+        but not mouse focusable. Also, this function did not work hard enough to set the focused
+        node, and was content to clear it if the first element checked failed the test, rather
+        than looking more at parents. This would have the effect of clearing, then resetting the
+        focus on a DIV containing a button or image with content on either side of it in the
+        process of arrowing over such content.
+
+2004-11-30  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by John
+
+        * khtml/editing/htmlediting.cpp:
+        (khtml::ReplaceSelectionCommand::doApply): Fix smart replace, which I (knowingly) broke with yesterday's checkin.
+        Also, call updateLayout() in one more place to prevent stale information being returned from caretMaxOffset().
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::isCharacterSmartReplaceExempt): Make this virtual and always return true. This gets rid of an
+        ugly APPLE_CHANGES block and use of KWQ(part) in ReplaceSelectionCommand.
+        * khtml/khtml_part.h: To help out with the isCharacterSmartReplaceExempt cleanup, add declaration.
+        * kwq/KWQKHTMLPart.h: To help out with the isCharacterSmartReplaceExempt cleanup, make 
+        isCharacterSmartReplaceExempt virtual.
+
+2004-11-30  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by me
+
+        * khtml/editing/htmlediting.cpp:
+        (khtml::ReplacementFragment::mergeEndNode): Fixed one-line coding mistake that created an endless loop.
+        Seemed simple enough to land without review.
+
+2004-11-29  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by Chris
+    
+        Rewrite of paste code (specifically the ReplaceSelectionCommand class). Many more cases
+        are handled correctly now, including selections that span multiple blocks, and cases
+        where content on the pasteboard ends in newlines (or what appear to be newlines to a
+        user, really block ends or BRs). I also made one small, but important change in the 
+        copy code to annotate the markup written to the pasteboard to support these selections 
+        ending in newlines.
+
+        New header that defines a couple of constants used in copying and pasting.
+
+        * ForwardingHeaders/editing/html_interchange.h: Added.
+        * khtml/editing/html_interchange.h: Added.
+        
+        Rewrite of the ReplaceSelectionCommand. There are several new helper functions, as well
+        as a new helper class, ReplacementFragment, which encapsulates information and functions
+        pertaining to a document fragment that is being inserted into a document.
+        
+        * khtml/editing/htmlediting.cpp:
+        (khtml::ReplacementFragment::ReplacementFragment):
+        (khtml::ReplacementFragment::~ReplacementFragment):
+        (khtml::ReplacementFragment::firstChild): Simple accessor.
+        (khtml::ReplacementFragment::lastChild): Ditto.
+        (khtml::ReplacementFragment::mergeStartNode): Looks at the nodes in a fragment and determines
+        the starting node to use for merging into the block containing the start of the selection.
+        (khtml::ReplacementFragment::mergeEndNode): Same as above, but for the end of the selection.
+        (khtml::ReplacementFragment::pruneEmptyNodes): Simple helper.
+        (khtml::ReplacementFragment::isInterchangeNewlineComment): Determines if a node is the
+        special annotation comment added in by the copy code.
+        (khtml::ReplacementFragment::removeNode): Simple helper.
+        (khtml::isComment): Simple helper.
+        (khtml::isProbablyBlock): Determines if a node is of a type that is usually rendered as a block.
+        I would like to do better than this some day, but this check will hold us until I can do better.
+        (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand):
+        (khtml::ReplaceSelectionCommand::~ReplaceSelectionCommand):
+        (khtml::ReplaceSelectionCommand::doApply):
+        (khtml::ReplaceSelectionCommand::completeHTMLReplacement): Figures out the right ending selection.
+        * khtml/editing/htmlediting.h: Declarations for the new ReplacementFragment class.
+        (khtml::ReplacementFragment::root):
+        (khtml::ReplacementFragment::type):
+        (khtml::ReplacementFragment::isEmpty):
+        (khtml::ReplacementFragment::isSingleTextNode):
+        (khtml::ReplacementFragment::isTreeFragment):
+        (khtml::ReplacementFragment::hasMoreThanOneBlock):
+        (khtml::ReplacementFragment::hasLogicalNewlineAtEnd):
+        
+        This smaller set of changes markup generation to add the newline annotation described in the
+        comment at the start of this entry.
+        
+        * khtml/xml/dom2_rangeimpl.cpp:
+        (DOM::RangeImpl::addCommentToHTMLMarkup): Simple helper.
+        (DOM::RangeImpl::toHTML): Added new EAnnotateForInterchange default argument to control whether
+        comment annotations are added to the markup generated.
+        * khtml/xml/dom2_rangeimpl.h: Add some new declarations.
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge markupStringFromRange:nodes:]): Request that markup resulting from call to 
+        DOM::RangeImpl::toHTML uses annotations when generating.
+        
+        New tests.        
+
+        * layout-tests/editing/pasteboard/paste-text-001-expected.txt: Added.
+        * layout-tests/editing/pasteboard/paste-text-001.html: Added.
+        * layout-tests/editing/pasteboard/paste-text-002-expected.txt: Added.
+        * layout-tests/editing/pasteboard/paste-text-002.html: Added.
+        * layout-tests/editing/pasteboard/paste-text-003-expected.txt: Added.
+        * layout-tests/editing/pasteboard/paste-text-003.html: Added.
+        * layout-tests/editing/pasteboard/paste-text-004-expected.txt: Added.
+        * layout-tests/editing/pasteboard/paste-text-004.html: Added.
+        * layout-tests/editing/pasteboard/paste-text-005-expected.txt: Added.
+        * layout-tests/editing/pasteboard/paste-text-005.html: Added.
+        * layout-tests/editing/pasteboard/paste-text-006-expected.txt: Added.
+        * layout-tests/editing/pasteboard/paste-text-006.html: Added.
+        * layout-tests/editing/pasteboard/paste-text-007-expected.txt: Added.
+        * layout-tests/editing/pasteboard/paste-text-007.html: Added.
+        * layout-tests/editing/pasteboard/paste-text-008-expected.txt: Added.
+        * layout-tests/editing/pasteboard/paste-text-008.html: Added.
+        * layout-tests/editing/pasteboard/paste-text-009-expected.txt: Added.
+        * layout-tests/editing/pasteboard/paste-text-009.html: Added.
+
+2004-11-29  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by Harrison
+
+        Made two small changes that make it possible for comments to have DOM nodes made for them
+        when pasting. This relies on some earlier work I did some days ago.
+
+        * khtml/xml/dom_nodeimpl.cpp:
+        (NodeImpl::startMarkup): Get the string from the comment.
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge documentFragmentWithMarkupString:baseURLString:]): Did some very minor
+        rearranging. Now passes a flag when creating a contextual fragment, requesting that comments
+        be included in the DOM.
+
+2004-11-29  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by Harrison
+
+        Added some new helpers to the VisiblePosition class. I will begin to use these when I check in
+        my improved paste code.
+
+        * khtml/editing/visible_position.cpp:
+        (khtml::blockRelationship)
+        (khtml::visiblePositionsInDifferentBlocks)
+        (khtml::isFirstVisiblePositionInBlock)
+        (khtml::isFirstVisiblePositionInNode)
+        (khtml::isLastVisiblePositionInBlock)
+        * khtml/editing/visible_position.h
+
+2004-11-29  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by Harrison
+
+        * khtml/xml/dom_position.cpp:
+        (DOM::Position::downstream): Fix a bug in downstream that prevented a call with DoNotStayInBlock
+        specified from obeying that directive. The old code would stop at an outer block boundary in
+        the case where that block had a block as its first child. The correct behavior is to drill into
+        that inner block (and continue on drilling down, if possible), to find the correct position.
+
+2004-11-29  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by Harrison
+
+        Small improvements to the node-display debugging helpers.
+
+        * khtml/xml/dom_nodeimpl.cpp:
+        (NodeImpl::displayTree): Make the rootNode be this if there is no rootEditableElement.
+        * khtml/xml/dom_nodeimpl.h: Make displayNode take a default argument of "" for its string.
+
+2004-11-29  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by Harrison
+
+        * khtml/editing/htmlediting.cpp:
+        (khtml::DeleteSelectionCommand::handleGeneralDelete): The downstream position in this function 
+        may need to be adjusted when deleting text off the front part of a text node. This fixes a problem 
+        I discovered while improving the paste command, where the insertion poitn wound up in the wrong
+        place after the delete. 
+
+2004-11-29  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by Harrison
+
+        Add a new helper function to insert a paragraph separator. Will be used in my
+        upcoming paste improvments.
+
+        * khtml/editing/htmlediting.cpp: Added function
+        (khtml::CompositeEditCommand::insertParagraphSeparator)
+        * khtml/editing/htmlediting.h: Ditto.
+
+2004-11-23  David Harrison  <harrison@apple.com>
+
+        Added various comments.
+
+        * khtml/editing/htmlediting.cpp:
+        (khtml::StyleChange::init):
+        (khtml::ApplyStyleCommand::doApply):
+        (khtml::ApplyStyleCommand::applyBlockStyle):
+        (khtml::ApplyStyleCommand::applyInlineStyle):
+
+2004-11-23  David Hyatt  <hyatt@apple.com>
+
+       Hit testing in table cells with top/bottom space from vertical alignment didn't work.  I forgot about the
+       super-secret yPos() lie that table cells do.  Use m_y instead of yPos().
+
+        * khtml/rendering/render_block.cpp:
+        (khtml::RenderBlock::nodeAtPoint):
+
+2004-11-22  David Hyatt  <hyatt@apple.com>
+
+       Make sure you can use document.createElement to make a <canvas> element.
+
+        * khtml/xml/dom_docimpl.cpp:
+        (DocumentImpl::createHTMLElement):
+
+2004-11-22  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Dave.
+
+       <rdar://problem/3492044> performing JavaScript operations on form elements is slower than WinIE (HTMLFormCollection)
+       <rdar://problem/3489679> selecting an item on the Apache bugzilla query page is very slow (HTMLFormCollection)
+       <rdar://problem/3477810> checking 80 check boxes with JavaScript is 10x slower than in IE (HTMLFormCollection)
+       <rdar://problem/3760962> JavaScript that toggles checkboxes is slow (HTMLCollection,HTMLFormCollection)
+        
+       * khtml/ecma/kjs_html.cpp:
+        (KJS::HTMLDocument::tryGet):
+        * khtml/html/html_formimpl.cpp:
+        (DOM::HTMLFormElementImpl::HTMLFormElementImpl):
+        (DOM::HTMLFormElementImpl::~HTMLFormElementImpl):
+        * khtml/html/html_formimpl.h:
+        * khtml/html/html_miscimpl.cpp:
+        (HTMLCollectionImpl::HTMLCollectionImpl):
+        (HTMLCollectionImpl::~HTMLCollectionImpl):
+        (HTMLCollectionImpl::CollectionInfo::CollectionInfo):
+        (HTMLCollectionImpl::CollectionInfo::reset):
+        (HTMLCollectionImpl::resetCollectionInfo):
+        (HTMLCollectionImpl::checkForNameMatch):
+        (appendToVector):
+        (HTMLCollectionImpl::updateNameCache):
+        (HTMLCollectionImpl::namedItems):
+        (HTMLFormCollectionImpl::HTMLFormCollectionImpl):
+        (HTMLFormCollectionImpl::~HTMLFormCollectionImpl):
+        (HTMLFormCollectionImpl::item):
+        (HTMLFormCollectionImpl::updateNameCache):
+        * khtml/html/html_miscimpl.h:
+
+2004-11-22  David Hyatt  <hyatt@apple.com>
+
+       Improve the WebCore cache so that the maximum cacheable object size is scaled based off the total cache
+       size.
+       
+        Reviewed by mjs
+
+        * khtml/misc/loader.cpp:
+        (CachedObject::finish):
+        (Cache::flush):
+        (Cache::setSize):
+        * khtml/misc/loader.h:
+        (khtml::Cache::maxCacheableObjectSize):
+
+2004-11-22  David Hyatt  <hyatt@apple.com>
+
+       Fix for 3673381, huge directory listing so slow it seems like a hang.  Rework painting and hit testing so that
+       it crawls the line box tree instead of the render tree.  This allows more precise intersection/containment testing
+       that lets us short circuit earlier when painting and hit testing.
+       
+        Reviewed by mjs
+
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::isPointInsideSelection):
+        * khtml/rendering/render_block.cpp:
+        (khtml::RenderBlock::paint):
+        (khtml::RenderBlock::paintChildren):
+        (khtml::RenderBlock::paintObject):
+        (khtml::RenderBlock::paintFloats):
+        (khtml::RenderBlock::nodeAtPoint):
+        * khtml/rendering/render_block.h:
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::nodeAtPoint):
+        * khtml/rendering/render_box.h:
+        * khtml/rendering/render_br.h:
+        * khtml/rendering/render_canvas.cpp:
+        (RenderCanvas::paint):
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::paintLines):
+        (RenderFlow::hitTestLines):
+        (RenderFlow::caretRect):
+        (RenderFlow::addFocusRingRects):
+        (RenderFlow::paintFocusRing):
+        (RenderFlow::paintOutlines):
+        (RenderFlow::paintOutlineForLine):
+        * khtml/rendering/render_flow.h:
+        * khtml/rendering/render_frames.cpp:
+        (RenderFrameSet::nodeAtPoint):
+        * khtml/rendering/render_frames.h:
+        * khtml/rendering/render_image.cpp:
+        (RenderImage::nodeAtPoint):
+        * khtml/rendering/render_image.h:
+        * khtml/rendering/render_inline.cpp:
+        (RenderInline::paint):
+        (RenderInline::nodeAtPoint):
+        * khtml/rendering/render_inline.h:
+        * khtml/rendering/render_layer.cpp:
+        (RenderLayer::paintLayer):
+        (RenderLayer::hitTest):
+        (RenderLayer::hitTestLayer):
+        * khtml/rendering/render_layer.h:
+        * khtml/rendering/render_line.cpp:
+        (khtml::InlineBox::paint):
+        (khtml::InlineBox::nodeAtPoint):
+        (khtml::InlineFlowBox::flowObject):
+        (khtml::InlineFlowBox::nodeAtPoint):
+        (khtml::InlineFlowBox::paint):
+        (khtml::InlineFlowBox::paintBackgrounds):
+        (khtml::InlineFlowBox::paintBackground):
+        (khtml::InlineFlowBox::paintBackgroundAndBorder):
+        (khtml::InlineFlowBox::paintDecorations):
+        (khtml::EllipsisBox::paint):
+        (khtml::EllipsisBox::nodeAtPoint):
+        (khtml::RootInlineBox::paintEllipsisBox):
+        (khtml::RootInlineBox::paint):
+        (khtml::RootInlineBox::nodeAtPoint):
+        * khtml/rendering/render_line.h:
+        (khtml::InlineRunBox::paintBackgroundAndBorder):
+        * khtml/rendering/render_object.cpp:
+        (RenderObject::hitTest):
+        (RenderObject::setInnerNode):
+        (RenderObject::nodeAtPoint):
+        * khtml/rendering/render_object.h:
+        (khtml::RenderObject::PaintInfo::PaintInfo):
+        (khtml::RenderObject::PaintInfo::~PaintInfo):
+        (khtml::RenderObject::paintingRootForChildren):
+        (khtml::RenderObject::shouldPaintWithinRoot):
+        * khtml/rendering/render_table.cpp:
+        (RenderTable::layout):
+        (RenderTable::paint):
+        * khtml/rendering/render_text.cpp:
+        (simpleDifferenceBetweenColors):
+        (correctedTextColor):
+        (InlineTextBox::nodeAtPoint):
+        (InlineTextBox::paint):
+        (InlineTextBox::selectionStartEnd):
+        (InlineTextBox::paintSelection):
+        (InlineTextBox::paintMarkedTextBackground):
+        (InlineTextBox::paintDecoration):
+        (RenderText::posOfChar):
+        * khtml/rendering/render_text.h:
+        (khtml::RenderText::paint):
+        (khtml::RenderText::layout):
+        (khtml::RenderText::nodeAtPoint):
+        * khtml/xml/dom2_eventsimpl.cpp:
+        (MouseEventImpl::computeLayerPos):
+        * khtml/xml/dom_docimpl.cpp:
+        (DocumentImpl::prepareMouseEvent):
+        * kwq/KWQAccObject.mm:
+        (-[KWQAccObject accessibilityHitTest:]):
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::scrollOverflowWithScrollWheelEvent):
+        (KWQKHTMLPart::eventMayStartDrag):
+        (KWQKHTMLPart::khtmlMouseMoveEvent):
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge elementAtPoint:]):
+        (-[WebCoreBridge _positionForPoint:]):
+
+2004-11-22  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Dave.
+
+       <rdar://problem/3890961> selecting an item on the Apache bugzilla query page can be sped up 10% (HTMLFormCollection)
+       <rdar://problem/3890958> JavaScript that toggles checkboxes can be improved 73% (HTMLCollection,HTMLFormCollection)
+
+       This avoids the O(N^2) penalty for named item traversal for form collections.
+
+       It also combines the item traversal logic for all non-form
+       collection operations into a single traverseNextItem
+       function. This avoids having 5 copies of the big switch statement
+       for this.
+
+       Also fixed a bug that prevented the last form element from being removed properly.
+        
+        * khtml/html/html_formimpl.cpp:
+        (DOM::removeFromVector):
+       * khtml/dom/html_misc.cpp:
+        (HTMLCollection::namedItems):
+        * khtml/dom/html_misc.h:
+        * khtml/ecma/kjs_html.cpp:
+        (KJS::HTMLCollection::getNamedItems):
+        * khtml/html/html_miscimpl.cpp:
+        (HTMLCollectionImpl::traverseNextItem):
+        (HTMLCollectionImpl::calcLength):
+        (HTMLCollectionImpl::length):
+        (HTMLCollectionImpl::item):
+        (HTMLCollectionImpl::nextItem):
+        (HTMLCollectionImpl::checkForNameMatch):
+        (HTMLCollectionImpl::namedItem):
+        (HTMLCollectionImpl::namedItems):
+        (HTMLCollectionImpl::nextNamedItem):
+        (HTMLFormCollectionImpl::calcLength):
+        (HTMLFormCollectionImpl::namedItem):
+        (HTMLFormCollectionImpl::nextNamedItem):
+        (HTMLFormCollectionImpl::namedItems):
+        * khtml/html/html_miscimpl.h:
+
+2004-11-22  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by Harrison
+
+        Change around the way we block the Javascript "Paste" command identifier from
+        being available. Formerly, this was done with an ifdef we never compiled in.
+        Now, this is done with a couple of cheap runtime checks. The advantage is that
+        we can now compile this command into development builds, and still yet switch
+        on the command in deployment builds through the use of WebCore SPI so we can
+        write and run layout tests with all of our builds.
+
+        * khtml/editing/jsediting.cpp:
+        (DOM::JSEditor::queryCommandSupported): Checks state of paste command in case
+        command being queried is the paste command. 
+        (DOM::JSEditor::setSupportsPasteCommand): New SPI to turn on paste command.
+        * khtml/editing/jsediting.h: Ditto.
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::pasteFromPasteboard): Added.
+        (KHTMLPart::canPaste): Added.
+        * kwq/KWQKHTMLPart.mm:
+        (KHTMLPart::canPaste): Added.
+        * kwq/KWQRenderTreeDebug.cpp:
+        (externalRepresentation): Turn on paste command.
+        * kwq/WebCoreBridge.h: Add canPaste call so WebKit can fill in the answer.
+
+2004-11-21  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Richard.
+
+       <rdar://problem/3889655> HTMLCollectionImpl should use traverseNextNode to improve speed and save recursion
+        
+       * khtml/html/html_miscimpl.cpp:
+        (HTMLCollectionImpl::calcLength):
+        (HTMLCollectionImpl::getItem):
+        (HTMLCollectionImpl::item):
+        (HTMLCollectionImpl::nextItem):
+        (HTMLCollectionImpl::getNamedItem):
+        (HTMLCollectionImpl::namedItem):
+        (HTMLCollectionImpl::nextNamedItemInternal):
+        (HTMLFormCollectionImpl::nextNamedItemInternal):
+
+2004-11-19  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Darin.
+
+       <rdar://problem/3482935> JavaScript so slow it seems like a hang (hrweb.apple.com) (HTMLCollection?)
+       <rdar://problem/3759149> PeopleSoft page in Safari twice as slow as Mozilla engine (HTMLFormCollection)
+       <rdar://problem/3888368> selecting an item on the Apache bugzilla query page can be improved 95% (HTMLFormCollection)
+
+       Many optimizations to HTMLFormCollection. Iterating it should not
+       be N^2 any more, though finding items by name could still be.
+       
+        * khtml/html/html_formimpl.cpp:
+        (DOM::HTMLFormElementImpl::~HTMLFormElementImpl):
+        (DOM::HTMLFormElementImpl::length):
+        (DOM::HTMLFormElementImpl::submitClick):
+        (DOM::HTMLFormElementImpl::formData):
+        (DOM::HTMLFormElementImpl::submit):
+        (DOM::HTMLFormElementImpl::reset):
+        (DOM::HTMLFormElementImpl::radioClicked):
+        (DOM::appendToVector):
+        (DOM::removeFromVector):
+        (DOM::HTMLFormElementImpl::registerFormElement):
+        (DOM::HTMLFormElementImpl::removeFormElement):
+        (DOM::HTMLFormElementImpl::makeFormElementDormant):
+        (DOM::HTMLFormElementImpl::registerImgElement):
+        (DOM::HTMLFormElementImpl::removeImgElement):
+        * khtml/html/html_formimpl.h:
+        * khtml/html/html_miscimpl.cpp:
+        (HTMLFormCollectionImpl::FormCollectionInfo::FormCollectionInfo):
+        (void::HTMLFormCollectionImpl::FormCollectionInfo::reset):
+        (HTMLFormCollectionImpl::resetCollectionInfo):
+        (HTMLFormCollectionImpl::calcLength):
+        (HTMLFormCollectionImpl::item):
+        (HTMLFormCollectionImpl::getNamedItem):
+        (HTMLFormCollectionImpl::getNamedFormItem):
+        (HTMLFormCollectionImpl::firstItem):
+        (HTMLFormCollectionImpl::nextItem):
+        * khtml/html/html_miscimpl.h:
+        (DOM::HTMLFormCollectionImpl::~HTMLFormCollectionImpl):
+        * khtml/xml/dom_elementimpl.cpp:
+        (ElementImpl::setAttribute):
+        (ElementImpl::setAttributeMap):
+        * kwq/KWQPtrVector.h:
+        (QPtrVector::findRef):
+        * kwq/KWQVectorImpl.h:
+        * kwq/KWQVectorImpl.mm:
+        (KWQVectorImpl::findRef):
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge elementWithName:inForm:]):
+        (-[WebCoreBridge controlsInForm:]):
+
+2004-11-19  David Harrison  <harrison@apple.com>
+
+        Reviewed by Ken and Darin.
+
+        <rdar://problem/3856215> Cannot remove bold from the beginning of a message
+
+        Problem is that KHTMLPart::computeAndSetTypingStyle always looked upstream
+        for the existing style, but in this case (hitting cmd-B with caret at top of
+        file) there is nothing upstream.  Changed this to use the VisiblePosition
+        deepEquivalent instead.
+        
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::computeAndSetTypingStyle):
+
+=== Safari-172 ===
+
+2004-11-19  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Darin.
+
+       <rdar://problem/3864151> REGRESSION (125-167): Chrysler.com never stops loading
+       
+        * khtml/xml/dom_docimpl.cpp:
+        (DocumentImpl::close): Don't fire the onload handler if there is a
+       redirect pending. This is a very long-standing bug that was masked
+       by our previously incorrect redirect logic. It used to be that an
+       older redirect would always win. Recently we changed things so
+       that a newer redirect would win, but a script that causes a
+       redirect would stop parsing once complete (so if there are two
+       redirects in the same script, the latter wins). However, we should
+       have also prevented onload in this case. Testing with other
+       browsers shows that onload handlers do not run at all when there
+       is a pending redirect.
+
+2004-11-19  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by Harrison
+
+        Fix some object lifetime issues in these two commands. This fixes some crashes
+        I am seeing in some new code I am working on, but have not yet reproduced otherwise.
+
+        * khtml/editing/htmlediting.cpp:
+        (khtml::InsertParagraphSeparatorCommand::~InsertParagraphSeparatorCommand): No longer deref nodes
+        in the ancestor list. They are not ref'ed when put on list. D'uh.
+        (khtml::InsertParagraphSeparatorCommand::doApply): Ref all cloned nodes that are created by the command
+        before putting them on the cloned nodes list. This are still deref'ed in the destructor.
+        (khtml::InsertParagraphSeparatorInQuotedContentCommand::~InsertParagraphSeparatorInQuotedContentCommand): Ditto
+        destructor comment.
+        (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Ditto doApply comment.
+
+2004-11-19  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by Harrison
+
+        Fix for this bug:
+        
+        <rdar://problem/3655241> setTypingStyle: does not set the real typing style, and typingStyle does not return it
+
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::computeAndSetTypingStyle): New helper that does the work of reducing a passed-in style
+        declaration given the current selection, and then sets the minimum necessary style as the typing
+        style on the part.
+        (KHTMLPart::applyStyle): Call new computeAndSetTypingStyle. The guts of computeAndSetTypingStyle used
+        to be here in the selection-as-caret case. But now [WebCoreBridge setTypingStyle:] needs this code
+        as well.
+        * khtml/khtml_part.h: Declare new computeAndSetTypingStyle() function.
+        * kwq/WebCoreBridge.h: Declare new typingStyle and setTypingStyle: methods.
+        * kwq/WebCoreBridge.mm: 
+        (-[WebCoreBridge typingStyle]): Calls through to the part to retrieve the typing style.
+        (-[WebCoreBridge setTypingStyle:]): Calls through to the part to set the typing style.
+
+2004-11-18  David Harrison  <harrison@apple.com>
+
+        Reviewed by Darin.
+        
+        Back out part of Darin's fix for <rdar://problem/3885729>, because the new exception gets triggered
+        by Mail.app. Filed <rdar://problem/3886832> against Mail.app.
+
+        * kwq/DOM-CSS.mm:
+        (-[DOMCSSStyleDeclaration setProperty:::]):
+
+2004-11-18  Chris Blumenberg  <cblu@apple.com>
+
+       Fixed: <rdar://problem/3587481> Bug Reporter Login Page: Password AutoFill does not work reliably
+
+        Reviewed by john.
+
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::currentForm): just return the current form, don't scan the entire document looking for a form if there is no current form
+
+2004-11-18  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Chris.
+
+       - fix recursive item traversal, use traverseNextNode() instead of
+       the buggy hand-rolled traversal.
+
+        * khtml/xml/dom_nodeimpl.cpp:
+        (NodeListImpl::recursiveItem):
+
+2004-11-17  Darin Adler  <darin@apple.com>
+
+        Reviewed by Ken.
+
+        - fixed <rdar://problem/3885744> crash with XMLHttpRequest test page (reported by KDE folks)
+
+        * khtml/ecma/xmlhttprequest.cpp: (KJS::XMLHttpRequest::slotFinished):
+        Rolled in fix from KDE; make sure to set job to 0 before calling changeState.
+
+        - fixed <rdar://problem/3885729> attempting to modify a computed style does nothing, but should raise a DOM exception
+        - fixed <rdar://problem/3885731> style declarations use too many malloc blocks; switch to QValueList
+        - fixed <rdar://problem/3885739> DOM::NodeImpl accessor in DOM::Node class is hot; should be inlined
+        - changed NodeImpl calls like replaceChild to always ref/deref the parameter; this is a better way to fix
+          an entire category of leaks we have been fixing one by one recently
+        - changed computed styles so they hold a reference to the DOM node; the old code could end up with a
+          stale RenderObject pointer, although I never saw it do that in practice
+        - implemented the length and item methods for computed styles
+        - implemented querying additional properties in computed styles (29 more)
+
+        * khtml/khtml_part.h: Update forward declaration of CSSMutableStyleDeclarationImpl since it's
+        now a separate class rather than a typedef. Changed the parameter type of setTypingStyle to
+        take a mutable style.
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::setTypingStyle): Change parameter to take a mutable style.
+        (KHTMLPart::applyStyle): Add code to make a mutable style in case we are passed
+        a computed style; also change some types to mutable style.
+        (updateState): Update iteration of CSSProperty objects in a style declaration to use
+        the new valuesIterator interface.
+        (KHTMLPart::selectionHasStyle): Add a call to makeMutable.
+        (KHTMLPart::selectionStartHasStyle): Add call to makeMutable and update iteration.
+        (editingStyle): Change type to mutable style, and simplify the style-creation calls,
+        including accomodating the exception code that setCssText has now.
+        (KHTMLPart::applyEditingStyleToElement): Change types to mutable style.
+        (KHTMLPart::removeEditingStyleFromElement): Change code to call setChanged only if removing
+        the style attributes really was a change, although it's not an important optimization it's
+        good to do it right.
+
+        * khtml/css/css_base.h: Remove unneeded setParsedValue method.
+        * khtml/css/css_base.cpp: Remove unneeded setParsedValue method. All the places that were
+        calling it were already removing the old property explicitly, so the code in here to remove
+        the property again was redundant.
+
+        * khtml/css/css_computedstyle.h: Updated virtual functions for changes to parameters in base class.
+        Moved all the "set"-type functions so they are private. Store a node pointer instead of a renderer.
+        * khtml/css/css_computedstyle.cpp:
+        (DOM::CSSComputedStyleDeclarationImpl::CSSComputedStyleDeclarationImpl): Hold a reference to
+        the node we compute style for, so we don't end up with a pointer to a deallocated RenderObject.
+        Before we had no guarantee the object would outlast us.
+        (DOM::CSSComputedStyleDeclarationImpl::setCssText): Add exception parameter, and set the
+        exception to NO_MODIFICATION_ALLOWED_ERR.
+        (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Update to use node pointer rather
+        than renderer pointer. Added implementation for box-align, box-direction, box-flex, box-flex-group,
+        box-lines, box-ordinal-group, box-orient, box-pack, caption-side, clear, cursor, direction,
+        list-style-image, list-style-position, list-style-type, marquee-direction, marquee-repetition,
+        marquee-style, user-modify, opacity, orphans, outline-style, page-break-after, page-break-before,
+        page-break-inside, position, unicode-bidi, widows, z-index.
+        (DOM::CSSComputedStyleDeclarationImpl::removeProperty): Add exception parameter, and set the
+        exception to NO_MODIFICATION_ALLOWED_ERR.
+        (DOM::CSSComputedStyleDeclarationImpl::setProperty): Ditto.
+        (DOM::CSSComputedStyleDeclarationImpl::length): Implemented.
+        (DOM::CSSComputedStyleDeclarationImpl::item): Implemented, calls getPropertyValue.
+        (DOM::CSSComputedStyleDeclarationImpl::copyInheritableProperties): Changed return type to
+        CSSMutableStyleDeclarationImpl.
+        (DOM::CSSComputedStyleDeclarationImpl::copy): Added.
+        (DOM::CSSComputedStyleDeclarationImpl::makeMutable): Added.
+
+        * khtml/css/css_ruleimpl.h: Update forward declaration of CSSMutableStyleDeclarationImpl since it's
+        now a separate class rather than a typedef.
+        * khtml/css/cssparser.h: Ditto.
+
+        * khtml/css/css_valueimpl.h: Refactor CSSStyleDeclarationImpl into two classes. New derived class
+        CSSMutableStyleDeclarationImpl has the guts, and the base class has only some virtual functions.
+        Removed a bunch of redundant stuff from other classes in this file too.
+        (DOM::DashboardRegionImpl::setNext): Ref new before deref'ing old to handle the set-to-same case.
+        (DOM::CSSProperty::CSSProperty): Added new overload so you can create a CSSProperty with initial values.
+        (DOM::CSSProperty::operator=): Added.
+        (DOM::CSSProperty::setValue): Use ref-before-deref pattern to simplify slightly.
+
+        * khtml/css/css_valueimpl.cpp:
+        (DOM::CSSStyleDeclarationImpl::CSSStyleDeclarationImpl): Remove uneeded things.
+        (DOM::CSSStyleDeclarationImpl::isStyleDeclaration): Put here now that it's no longer inline.
+        (DOM::CSSMutableStyleDeclarationImpl::CSSMutableStyleDeclarationImpl): Added.
+        (DOM::CSSMutableStyleDeclarationImpl::operator=): Added.
+        (DOM::CSSMutableStyleDeclarationImpl::~CSSMutableStyleDeclarationImpl): Updated.
+        (DOM::CSSMutableStyleDeclarationImpl::getPropertyValue): Removed now-uneeded check.
+        (DOM::CSSMutableStyleDeclarationImpl::get4Values): Moved here from base class.
+        (DOM::CSSMutableStyleDeclarationImpl::getShortHandValue): Ditto.
+        (DOM::CSSMutableStyleDeclarationImpl::getPropertyCSSValue): Update to use QValueList instead of QPtrList.
+        (DOM::CSSMutableStyleDeclarationImpl::removeProperty): Added exception parameter, updated for QValueList.
+        (DOM::CSSMutableStyleDeclarationImpl::setChanged): Moved here from base class.
+        (DOM::CSSMutableStyleDeclarationImpl::getPropertyPriority): Update to use QValueList.
+        (DOM::CSSMutableStyleDeclarationImpl::setProperty): Added more overloads to match new parameters.
+        (DOM::CSSMutableStyleDeclarationImpl::setStringProperty): Update to use QValueList.
+        (DOM::CSSMutableStyleDeclarationImpl::setImageProperty): Ditto.
+        (DOM::CSSMutableStyleDeclarationImpl::parseProperty): Remove unneeded initialization code due to QValueList.
+        (DOM::CSSMutableStyleDeclarationImpl::addParsedProperties): Added.
+        (DOM::CSSMutableStyleDeclarationImpl::setLengthProperty): Moved here from base class.
+        (DOM::CSSMutableStyleDeclarationImpl::length): Update to use QValueList.
+        (DOM::CSSMutableStyleDeclarationImpl::item): Moved here from base class.
+        (DOM::CSSMutableStyleDeclarationImpl::cssText): Return empty string rather than null string when there are
+        no styles in the list. Update to use QValueList.
+        (DOM::CSSMutableStyleDeclarationImpl::setCssText): Update to use QValueList and to take an exceptionCode
+        parameter and set it.
+        (DOM::CSSMutableStyleDeclarationImpl::merge): Update to use QValueList.
+        (DOM::CSSStyleDeclarationImpl::diff): Update to use QValueList.
+        (DOM::CSSMutableStyleDeclarationImpl::copyBlockProperties): Moved here from base class. Change return type.
+        (DOM::CSSStyleDeclarationImpl::copyPropertiesInSet): Update to use QValueList and use stack, not new/delete.
+        (DOM::CSSMutableStyleDeclarationImpl::makeMutable): Added.
+        (DOM::CSSMutableStyleDeclarationImpl::copy): Added.
+
+        * khtml/css/cssparser.cpp:
+        (CSSParser::parseValue): Changed to use addParsedProperties.
+        (CSSParser::parseDeclaration): Ditto.
+        (CSSParser::createStyleDeclaration): Use new constructor to create declaration in a more efficient manner.
+
+        * khtml/css/cssproperties.in: Removed unused font-size-adjust and -khtml-flow-mode.
+        * khtml/css/cssproperties.c: Regenerated.
+        * khtml/css/cssproperties.h: Regenerated.
+
+        * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::applyDeclarations):
+        Updated to use QValueList interface to CSSMutableStyleDeclarationImpl.
+
+        * khtml/dom/css_value.cpp:
+        (DOM::CSSStyleDeclaration::cssText): Removed unneeded cast.
+        (DOM::CSSStyleDeclaration::setCssText): Added exception code handling.
+        (DOM::CSSStyleDeclaration::getPropertyValue): Changed to call getPropertyValue directly instead of
+        first doing getPropertyCSSValue and then doing cssText.
+        (DOM::CSSStyleDeclaration::getPropertyCSSValue): Removed unneeded cast.
+        (DOM::CSSStyleDeclaration::removeProperty): Added exception code handling. 
+        (DOM::CSSStyleDeclaration::setProperty): Added exception code handling.
+        (DOM::CSSStyleDeclaration::length): Removed unneeded cast.
+        (DOM::CSSStyleDeclaration::item): Removed unneeded cast.
+        (DOM::CSSStyleDeclaration::parentRule): Removed unneeded cast.
+        (DOM::CSSValue::setCssText): Removed strange non-implementation (still not implemented).
+
+        * khtml/dom/dom_node.h: Made isNull and handle functions inline.
+        * khtml/dom/dom_node.cpp: Ditto.
+
+        * khtml/editing/htmlediting.h: Change some types to mutable style.
+        * khtml/editing/htmlediting.cpp:
+        (khtml::EditCommandPtr::typingStyle): Change return type to mutable style.
+        (khtml::EditCommandPtr::setTypingStyle): Change parameter to mutable style.
+        (khtml::StyleChange::init): Convert parameter to mutable style. Update to use QValueList.
+        (khtml::EditCommand::assignTypingStyle): Change parameter to mutable type.
+        (khtml::EditCommand::setTypingStyle): Ditto.
+        (khtml::ApplyStyleCommand::ApplyStyleCommand): Convert parameter to mutable style.
+        (khtml::ApplyStyleCommand::doApply): Change local variables to mutable style.
+        (khtml::ApplyStyleCommand::applyBlockStyle): Change parameter to mutable style.
+        (khtml::ApplyStyleCommand::applyInlineStyle): Ditto.
+        (khtml::ApplyStyleCommand::isHTMLStyleNode): Ditto.
+        (khtml::ApplyStyleCommand::removeCSSStyle): Ditto. Also update to use QValueList.
+        (khtml::ApplyStyleCommand::removeBlockStyle): Change parameter to mutable style.
+        (khtml::ApplyStyleCommand::removeInlineStyle): Ditto.
+        (khtml::ApplyStyleCommand::addBlockStyleIfNeeded): Ditto.
+        (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): Ditto.
+        (khtml::InsertLineBreakCommand::doApply): Convert locals to mutable style.
+        (khtml::InsertTextCommand::prepareForTextInsertion): Ditto.
+        (khtml::RemoveCSSPropertyCommand::RemoveCSSPropertyCommand): Convert parameter to mutable style.
+
+        * khtml/editing/jsediting.cpp: Convert types to mutable styles where we create styles.
+        * khtml/html/html_baseimpl.h: Change type to mutable style.
+        * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::createLinkDecl): Ditto.
+
+        * khtml/html/html_elementimpl.h: Make CSSMappedAttributeDeclarationImpl use the mutable style
+        class as a base class, and change types to mutable style as needed.
+        * khtml/html/html_elementimpl.cpp:
+        (HTMLElementImpl::createInlineStyleDecl): Change type to mutable style.
+        (HTMLElementImpl::parseHTMLAttribute): Call parseProperty method.
+        (HTMLElementImpl::getInlineStyleDecl): Change type to mutable style.
+        (HTMLElementImpl::additionalAttributeStyleDecl): Ditto.
+        (HTMLElementImpl::createContextualFragment): Add ref/deref to fix potential node leak.
+        (HTMLElementImpl::setInnerHTML): Remove ref/deref pair because this leak is now fixed by changes
+        to appendChild.
+        (HTMLElementImpl::setOuterHTML): Remove ref/deref pair because this leak is now fixed by changes
+        to replaceChild.
+
+        * khtml/html/html_tableimpl.h: Change types to mutable style.
+        * khtml/html/html_tableimpl.cpp:
+        (HTMLTableElementImpl::additionalAttributeStyleDecl): Change type to mutable style.
+        (HTMLTableElementImpl::getSharedCellDecl): Change type to mutable style.
+        (HTMLTableCellElementImpl::additionalAttributeStyleDecl): Change type to mutable style.
+
+        * khtml/html/htmlparser.cpp:
+        (KHTMLParser::parseToken): Use a local variable to protect the node by ref'ing it. This is better
+        than using an explicit delete to make the node go away, and is required for compatibility with the
+        changes to the NodeImpl functions.
+        (KHTMLParser::insertNode): Ditto.
+        (KHTMLParser::createHead): Get rid of explicit delete, no longer needed because of changes to
+        the NodeImpl functions.
+
+        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::createCSSStyleDeclaration): Call simpler constructor
+        now that there's no need to make the property list explictly.
+
+        * kwq/DOM-CSS.mm:
+        (-[DOMCSSStyleDeclaration setCssText:]): Raise exception when appropriate.
+        (-[DOMCSSStyleDeclaration removeProperty:]): Ditto.
+        (-[DOMCSSStyleDeclaration setProperty:::]): Dito.
+
+        * khtml/xml/dom_nodeimpl.cpp:
+        (NodeImpl::insertBefore): Always do a ref/deref, so callers don't have to worry about whether the
+        function succeeded or not for ownership purposes.
+        (NodeImpl::replaceChild): Ditto.
+        (NodeImpl::appendChild): Ditto.
+        (NodeBaseImpl::insertBefore): Ditto.
+        (NodeBaseImpl::replaceChild): Ditto.
+        (NodeBaseImpl::appendChild): Ditto.
+        (NodeBaseImpl::addChild): Ditto.
+
+        * WebCore-tests.exp: Removed CSSStyleDeclaration::length; not sure why it was in here.
+        * WebCore-combined.exp: Regenerated.
+
+2004-11-18  Maciej Stachowiak  <mjs@apple.com>
+
+        still even more build fixing
+
+        * khtml/html/html_miscimpl.cpp:
+        (HTMLCollectionImpl::resetCollectionInfo):
+
+2004-11-18  Maciej Stachowiak  <mjs@apple.com>
+
+        more build fixing
+
+        * khtml/html/html_miscimpl.cpp:
+        (HTMLCollectionImpl::resetCollectionInfo):
+
+2004-11-18  Maciej Stachowiak  <mjs@apple.com>
+
+        Fixed build problem.
+
+        * khtml/html/html_miscimpl.h:
+        (DOM::HTMLCollectionImpl::CollectionInfo::CollectionInfo): it's haslength, not hasLenght.
+
+2004-11-18  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Ken.
+
+       - merged and cleaned up HTMLCollection and HTMLFormCollection speedups from konqueror
+
+       <rdar://problem/3822992> VIP: Program listings pages at directv.com take a really long time to load [HTMLCollection]
+       <rdar://problem/3701991> Safari unresponsive loading (www.maxim-ic.com) (HTMLCollection)
+
+       This is also a start on fixing 5 other bugs, but those need additional work to make
+       HTMLFormCollection fast.
+
+        * khtml/html/html_documentimpl.h:
+        (DOM::HTMLDocumentImpl::collectionInfo):
+        * khtml/html/html_formimpl.cpp:
+        (DOM::HTMLFormElementImpl::~HTMLFormElementImpl):
+        (DOM::HTMLFormElementImpl::isURLAttribute):
+        (DOM::HTMLFormElementImpl::registerImgElement):
+        (DOM::HTMLFormElementImpl::removeImgElement):
+        * khtml/html/html_formimpl.h:
+        * khtml/html/html_imageimpl.cpp:
+        (HTMLImageElementImpl::HTMLImageElementImpl):
+        (HTMLImageElementImpl::~HTMLImageElementImpl):
+        * khtml/html/html_imageimpl.h:
+        * khtml/html/html_miscimpl.cpp:
+        (HTMLCollectionImpl::HTMLCollectionImpl):
+        (HTMLCollectionImpl::~HTMLCollectionImpl):
+        (HTMLCollectionImpl::updateCollectionInfo):
+        (HTMLCollectionImpl::length):
+        (HTMLCollectionImpl::item):
+        (HTMLCollectionImpl::firstItem):
+        (HTMLCollectionImpl::nextItem):
+        (HTMLCollectionImpl::namedItem):
+        (HTMLCollectionImpl::nextNamedItemInternal):
+        (HTMLFormCollectionImpl::getNamedFormItem):
+        * khtml/html/html_miscimpl.h:
+        (DOM::HTMLCollectionImpl::):
+        (DOM::HTMLCollectionImpl::CollectionInfo::CollectionInfo):
+        * khtml/html/htmlparser.cpp:
+        (KHTMLParser::getElement):
+        * khtml/xml/dom_docimpl.cpp:
+        (DocumentImpl::DocumentImpl):
+        * khtml/xml/dom_docimpl.h:
+        (DOM::DocumentImpl::incDOMTreeVersion):
+        (DOM::DocumentImpl::domTreeVersion):
+        * khtml/xml/dom_nodeimpl.cpp:
+        (NodeImpl::attach):
+        (NodeImpl::detach):
+
+2004-11-18  Kevin Decker  <kdecker@apple.com>
+
+        Reviewed by Chris.
+
+       fixed: <rdar://problem/3841842> getPropertyID expensive
+
+        * kwq/DOM-CSS.mm:
+        (getPropertyID): avoid unnecessary memory allocations by using a fixed-sized stack based buffer.
+
+2004-11-17  David Hyatt  <hyatt@apple.com>
+
+       Improve responsiveness by being willing to break out of the tokenizer.  (This patch was landed already
+       and subsequently backed out).
+       
+        Reviewed by kocienda
+
+        * khtml/html/html_baseimpl.cpp:
+        (HTMLBodyElementImpl::insertedIntoDocument):
+        * khtml/html/htmltokenizer.cpp:
+        (khtml::HTMLTokenizer::reset):
+        (khtml::HTMLTokenizer::scriptHandler):
+        (khtml::HTMLTokenizer::scriptExecution):
+        (khtml::HTMLTokenizer::write):
+        (khtml::HTMLTokenizer::continueProcessing):
+        (khtml::HTMLTokenizer::timerEvent):
+        (khtml::HTMLTokenizer::notifyFinished):
+        * khtml/html/htmltokenizer.h:
+        * khtml/khtmlview.cpp:
+        (KHTMLViewPrivate::KHTMLViewPrivate):
+        (KHTMLViewPrivate::reset):
+        (KHTMLView::clear):
+        (KHTMLView::layout):
+        (KHTMLView::timerEvent):
+        (KHTMLView::scheduleRelayout):
+        (KHTMLView::layoutPending):
+        (KHTMLView::haveDelayedLayoutScheduled):
+        (KHTMLView::unscheduleRelayout):
+        * khtml/khtmlview.h:
+        * khtml/xml/dom_docimpl.cpp:
+        (DocumentImpl::DocumentImpl):
+        (DocumentImpl::close):
+        (DocumentImpl::setParsing):
+        (DocumentImpl::shouldScheduleLayout):
+        (DocumentImpl::minimumLayoutDelay):
+        (DocumentImpl::write):
+        (DocumentImpl::finishParsing):
+        (DocumentImpl::stylesheetLoaded):
+        (DocumentImpl::updateStyleSelector):
+        * khtml/xml/dom_docimpl.h:
+        (DOM::DocumentImpl::parsing):
+        * kwq/KWQDateTime.mm:
+        (KWQUIEventTime::uiEventPending):
+
+2004-11-17  David Harrison  <harrison@apple.com>
+
+        Reviewed by Ken Kocienda.
+        
+        Make sure previousLineStart is non-null before calling compareBoundaryPoints.
+        Treat null case as meaning no post-move merge is needed.
+
+        * khtml/editing/htmlediting.cpp:
+        (khtml::DeleteSelectionCommand::initializePositionData):
+
+2004-11-17  David Harrison  <harrison@apple.com>
+        
+        Added displayNode and displayTree methods for debugging.  Fixed comment typo in dispatchChildRemovalEvents.
+        * khtml/xml/dom_nodeimpl.cpp:
+        (NodeImpl::displayNode):
+        (NodeImpl::displayTree):
+        (NodeBaseImpl::dispatchChildRemovalEvents):
+        * khtml/xml/dom_nodeimpl.h:
+
+2004-11-16  John Sullivan  <sullivan@apple.com>
+
+        Reviewed by Richard.
+        
+        - fixed <rdar://problem/3881929> 32 byte leak in editingStyle() in KHTMLPart (one-time only)
+
+        * khtml/khtml_part.cpp:
+        (editingStyle):
+        delete the list we created when we're done with it
+
+2004-11-16  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by John
+        
+        It is unwise to use the QPtrList autodelete feature on shared objects like DOM nodes.
+        Instead, I replaced this with a helper function that derefs DOM nodes stored in a 
+        QPtrList when the list goes out of scope.
+
+        * khtml/editing/htmlediting.cpp:
+        (khtml::derefNodesInList): New helper to deref DOM nodes stored in a QPtrList.
+        (khtml::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): No longer set lists to autodelete.
+        (khtml::InsertParagraphSeparatorCommand::~InsertParagraphSeparatorCommand): Call new derefNodesInList helper.
+        (khtml::InsertParagraphSeparatorInQuotedContentCommand::InsertParagraphSeparatorInQuotedContentCommand):  
+        No longer set lists to autodelete.
+        (khtml::InsertParagraphSeparatorInQuotedContentCommand::~InsertParagraphSeparatorInQuotedContentCommand):
+         Call new derefNodesInList helper.
+        * khtml/editing/htmlediting.h: Add virtual destructor for InsertParagraphSeparatorCommand. It had no need
+        of one before, but now it does.
+
+2004-11-15  David Harrison  <harrison@apple.com>
+
+        Reviewed by Chris and Darin.
+        
+        <rdar://problem/3880304> Non-linear performance hit for style changes
+
+        * khtml/xml/dom_nodeimpl.cpp:
+        (NodeImpl::traverseNextNode):
+        (NodeImpl::traverseNextSibling):
+        (NodeImpl::traversePreviousNodePostOrder):
+        Return 0 rather than traversing beyond stayWithin when this == stayWithin.
+        Add asserts that stayWithin is an ancestor of the returned node.
+
+2004-11-15  Darin Adler  <darin@apple.com>
+
+        Reviewed by Ken.
+
+        - fixed <rdar://problem/3880036> Many leaks from CSSComputedStyleDeclarationImpl::getPropertyCSSValue, seen in Mail and Blot
+
+        * khtml/css/css_computedstyle.cpp:
+        (DOM::CSSComputedStyleDeclarationImpl::getPropertyValue): Ref and deref the value returned from getPropertyCSSValue,
+        since there's no guarantee it's already ref'd.
+        * khtml/css/css_valueimpl.cpp:
+        (CSSStyleDeclarationImpl::getPropertyValue): Wrap result in a CSSValue to ref/deref.
+        (CSSStyleDeclarationImpl::get4Values): Ref/deref explicitly.
+        (CSSStyleDeclarationImpl::getShortHandValue): Ditto.
+        (CSSStyleDeclarationImpl::merge): Ditto.
+        (CSSStyleDeclarationImpl::diff): Ditto.
+        * khtml/editing/htmlediting.cpp:
+        (khtml::StyleChange::currentlyHasStyle): Ditto.
+        (khtml::ApplyStyleCommand::removeCSSStyle): Ditto.
+        * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::parseHTMLAttribute): Ditto.
+        * khtml/html/html_tableimpl.cpp: (HTMLTableElementImpl::parseHTMLAttribute): Ditto.
+
+2004-11-15  Darin Adler  <darin@apple.com>
+
+        Reviewed by Ken.
+
+        Use separate mutable style and computed style types as appropriate.
+        For now this should have no effect, but it prepares us for refactoring later.
+        Also remove some unnecessary "DOM::" prefixes and in one case factor out
+        some shared code.
+
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::typingStyle):
+        (KHTMLPart::setTypingStyle):
+        (updateState):
+        (KHTMLPart::selectionHasStyle):
+        (KHTMLPart::selectionStartHasStyle):
+        (KHTMLPart::selectionComputedStyle):
+        * khtml/khtml_part.h:
+        * khtml/khtmlpart_p.h:
+
+        * khtml/css/css_base.h:
+        * khtml/css/css_ruleimpl.cpp:
+        (CSSStyleRuleImpl::setDeclaration):
+        * khtml/css/css_ruleimpl.h:
+        (DOM::CSSFontFaceRuleImpl::style):
+        (DOM::CSSPageRuleImpl::style):
+        (DOM::CSSStyleRuleImpl::style):
+        (DOM::CSSStyleRuleImpl::declaration):
+        * khtml/css/css_valueimpl.h:
+        (DOM::CSSPrimitiveValueImpl::):
+        * khtml/css/cssparser.cpp:
+        (CSSParser::parseValue):
+        (CSSParser::parseColor):
+        (CSSParser::parseDeclaration):
+        (CSSParser::createStyleDeclaration):
+        * khtml/css/cssparser.h:
+        * khtml/css/cssstyleselector.cpp:
+        (khtml::CSSStyleSelector::addMatchedDeclaration):
+        (khtml::CSSStyleSelector::matchRulesForList):
+        (khtml::CSSStyleSelector::styleForElement):
+        (khtml::CSSStyleSelector::applyDeclarations):
+        * khtml/css/cssstyleselector.h:
+        * khtml/css/parser.cpp:
+        * khtml/css/parser.y:
+        * khtml/dom/css_rule.h:
+        * khtml/dom/css_stylesheet.h:
+        * khtml/dom/css_value.h:
+        * khtml/dom/dom2_views.cpp:
+        * khtml/xml/dom2_viewsimpl.cpp:
+        (DOM::AbstractViewImpl::getComputedStyle):
+        * khtml/xml/dom_docimpl.cpp:
+        (DocumentImpl::importNode):
+        (DocumentImpl::setStyleSheet):
+        * khtml/xml/dom_docimpl.h:
+        * khtml/xml/dom_xmlimpl.cpp:
+        (DOM::ProcessingInstructionImpl::setStyleSheet):
+        * khtml/xml/dom_xmlimpl.h:
+
+        * khtml/dom/css_value.cpp:
+        (DOM::throwException): Added.
+        (DOM::CSSStyleDeclaration::setCssText): Call throwException, but always on 0 for now.
+        The real thing is coming with the next change to refactor.
+        (DOM::CSSPrimitiveValue::setFloatValue): Call throwException.
+        (DOM::CSSPrimitiveValue::setStringValue): Ditto.
+
+2004-11-15  Darin Adler  <darin@apple.com>
+
+        Reviewed by Ken.
+
+        - fixed <rdar://problem/3878489> REGRESSION: modifying attribute of <textarea> blows away edited text (breaks simplemachines.org forum)
+
+        * khtml/xml/dom_nodeimpl.h: Added boolean "children changed" parameter to
+        dispatchSubtreeModifiedEvent, so it can be called in cases where only the
+        node's attributes changed without sending a misleading childrenChanged call,
+        but the childrenChanged call can happen at the exact right moment.
+        * khtml/xml/dom_nodeimpl.cpp: Removed some uneeded "DOM::".
+        (NodeImpl::dispatchSubtreeModifiedEvent): Only call "children changed" if
+        the boolean true is passed in.
+
+        * khtml/xml/dom_elementimpl.cpp:
+        (NamedAttrMapImpl::addAttribute): Pass false for "children changed".
+        (NamedAttrMapImpl::removeAttribute): Ditto.
+
+2004-11-15  John Sullivan  <sullivan@apple.com>
+
+        Reviewed by Ken.
+        
+        - fixed <rdar://problem/3880075> leak in CSSStyleDeclarationImpl::copyPropertiesInSet, 
+        seen often in Mail and Blot
+
+        * khtml/css/css_valueimpl.cpp:
+        (CSSStyleDeclarationImpl::copyPropertiesInSet):
+        delete temporary list after we're done using it
+
+2004-11-15  Richard Williamson   <rjw@apple.com>
+
+       Fixed leak (3879883) that John found.  Early return leaked
+       allocated instance.
+
+        Reviewed by John.
+
+        * khtml/css/css_computedstyle.cpp:
+        (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
+
+2004-11-15  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by John
+
+        Fix for this bug:
+        
+        <rdar://problem/3879569> Many leaks in EditCommand mechanism, seen in Mail
+
+        Fixed a couple of object lifetime issues. The EditCommand class used to hold an
+        EditCommandPtr to its parent, but this caused a a reference cycle in composite 
+        commands as the children held a ref to their parent. Now, the parent variable
+        is a non-retained reference to an EditCommand *. It would be nice to have a 
+        weak reference to the parent or even override deref in composite commands (but I
+        can't since deref() is not virtual). However, this should be OK since any
+        dangling parent pointer is a sign of a bigger object lifetime problem that
+        would need to be addressed anyway.
+
+        * khtml/css/css_valueimpl.cpp:
+        (CSSStyleDeclarationImpl::CSSStyleDeclarationImpl): Fix bug in constructor that takes a 
+        QPtrList<CSSProperty> *. List values must be copied into newly-allocated list, rather than
+        just assigning the list variable passed in to the local list variable, or the list will be 
+        double-deleted.
+        * khtml/editing/htmlediting.cpp:
+        (khtml::EditCommand::setStartingSelection): No longer call get(). m_parent is no longer a smart pointer.
+        (khtml::EditCommand::setEndingSelection): Ditto.
+        (khtml::EditCommand::assignTypingStyle): Short-circuit if passed in style is identical to current style.
+        Unrelated to the change, but saves some ref's and deref's.
+        (khtml::EditCommand::setTypingStyle): No longer call get(). m_parent is no longer a smart pointer.
+        * khtml/editing/htmlediting.h: Change m_parent to a EditCommand *. Was an EditCommandPtr. Using an
+        EditCommandPtr caused a reference cycle in composite commands as the children held a ref to their parent.
+        (khtml::EditCommand::parent): No longer call get(). m_parent is no longer a smart pointer.
+
+2004-11-15  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Kevin.
+
+       <rdar://problem/3807080> Safari so slow it seems like a hang accessing a page on an IBM website
+       
+        * khtml/xml/dom_nodeimpl.cpp:
+        (NodeListImpl::NodeListImpl): Initialize isItemCacheValid, renamed isCacheValid to
+       isLengthCacheValid.
+        (NodeListImpl::recursiveLength): Adjusted for rename.
+        (NodeListImpl::recursiveItem): Cache the last item accessed and its offset.
+       If the same offset is looked up again, just return it, otherwise, if looking up
+       a later offset, start at the last item and proceed from there.
+        (NodeListImpl::itemById): Apply the special document optimization to all
+       nodes that are either a document or in a document - just walk up to make
+       sure the node found by ID has the root node as an ancestor.
+        (NodeListImpl::rootNodeSubtreeModified): Adjust both cache bits.
+        * khtml/xml/dom_nodeimpl.h: Prototype new stuff.
+
+2004-11-15  John Sullivan  <sullivan@apple.com>
+
+        Reviewed by Ken.
+        
+        - fixed <rdar://problem/3879539> leak of NSString after pasting into editable HTML (e.g. Mail)
+
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::documentFragmentWithText):
+        release mutable copy of string after we're done using it
+
+2004-11-14  Kevin Decker  <kdecker@apple.com>
+
+        Reviewed by mjs.
+
+       fixed: <rdar://problem/3823038> LEAK: huge leak in DOM::HTMLElementImpl::createContextualFragment(DOM::DOMString const&, bool)
+
+        * khtml/html/html_elementimpl.cpp:
+        (HTMLElementImpl::setInnerHTML): uses the ref counting system to deallocate fragments instead of explicitly invoking a destructor.
+        (HTMLElementImpl::setOuterHTML): function is responsible for derefing the fragment prior to returning. Now it does.
+
+2004-11-13  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Kevin.
+
+       <rdar://problem/3878766> VIP: Program listings pages at directv.com takes 75% of time traversing NodeLists
+
+        * khtml/dom/dom_node.cpp:
+        (NodeList::itemById): New method, just forward to impl.
+        * khtml/dom/dom_node.h: Prototype it.
+        * khtml/ecma/kjs_dom.cpp:
+        (DOMNodeList::tryGet): Instead of looping over the whole list to do by-id access,
+       let the NodeList do it. The NodeList might be able to do it more efficiently.
+        * khtml/xml/dom_nodeimpl.cpp:
+       (NodeListImpl::itemById): Optimize for the case where the NodeList
+       covers the whole document. In this case, just use getElementById,
+       then check that the element satisfies the list criteria.
+        (ChildNodeListImpl::nodeMatches): Return true only if the node is our child.
+        (TagNodeListImpl::TagNodeListImpl): Irrelevant change to reformat initializers.
+        * khtml/xml/dom_nodeimpl.h:
+
+2004-11-12  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Gramps.
+
+       - fixed another bug in the last checkin, isCacheValid was unitialized, resulting in
+       sometimes using a huge bogus length value.
+       
+        * khtml/xml/dom_nodeimpl.cpp:
+        (NodeListImpl::NodeListImpl): Initialize isCacheValid.
+
+2004-11-12  Darin Adler  <darin@apple.com>
+
+        Reviewed by Maciej.
+
+        - fixed an infinite loop in that last check-in
+
+        * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::notifyLocalNodeListsSubtreeModified):
+        Added a ++i to the loop so it won't get stuck on the first element in the list.
+
+2004-11-12  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Kevin.
+
+       - fixed <rdar://problem/3878183> Safari is 77% slower than it should be on a page on an IBM website due to NodeListImpl length
+        
+       I fixed this by changing NodeLists to cache their length, but
+       invalidate it whenever there is a change in the DOM subtree at
+       which they are rooted. This makes NodeListImpl::recursiveLength()
+       drop completely off the profile, since we were repeatedly getting
+       a length for the same NodeList over and over.
+       
+        * khtml/xml/dom_nodeimpl.cpp:
+        (NodeImpl::NodeImpl):
+        (NodeImpl::~NodeImpl):
+        (NodeImpl::registerNodeList):
+        (NodeImpl::unregisterNodeList):
+        (NodeImpl::notifyLocalNodeListsSubtreeModified):
+        (NodeImpl::notifyNodeListsSubtreeModified):
+        (NodeImpl::dispatchSubtreeModifiedEvent):
+        (NodeListImpl::NodeListImpl):
+        (NodeListImpl::~NodeListImpl):
+        (NodeListImpl::recursiveLength):
+        (NodeListImpl::recursiveItem):
+        (NodeListImpl::rootNodeSubtreeModified):
+        (ChildNodeListImpl::ChildNodeListImpl):
+        (ChildNodeListImpl::length):
+        (ChildNodeListImpl::item):
+        (TagNodeListImpl::TagNodeListImpl):
+        (TagNodeListImpl::length):
+        (TagNodeListImpl::item):
+        (NameNodeListImpl::NameNodeListImpl):
+        (NameNodeListImpl::length):
+        (NameNodeListImpl::item):
+        * khtml/xml/dom_nodeimpl.h:
+
+2004-11-12  Darin Adler  <darin@apple.com>
+
+        Reviewed by Maciej.
+
+        - various small cleanups
+
+        * khtml/xml/dom_docimpl.h: Added policyBaseURL and setPolicyBaseURL.
+        * khtml/html/html_documentimpl.h: Removed policyBaseURL and setPolicyBaseURL.
+
+        * khtml/xml/xml_tokenizer.h: Marked isWaitingForScripts const.
+        * khtml/xml/xml_tokenizer.cpp: (khtml::XMLTokenizer::isWaitingForScripts): Marked const.
+        * khtml/html/htmltokenizer.h: Marked isWaitingForScripts const.
+        * khtml/html/htmltokenizer.cpp:
+        (khtml::HTMLTokenizer::isWaitingForScripts): Marked const.
+        (khtml::HTMLTokenizer::setOnHold): Took out extraneous line of code.
+
+        * khtml/khtml_part.h: Removed docImpl function.
+        * khtml/khtml_part.cpp: Ditto.
+
+        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::close): Simplified code that implements
+        the "redirect during onload" optimization. Now uses isScheduledLocationChangePending.
+
+        * kwq/KWQKHTMLPart.h: Removed now-unused _firstResponderAtMouseDownTime.
+        * kwq/KWQKHTMLPart.mm: Removed _firstResponderAtMouseDownTime (forgot to land this
+        part of the change last time, which is why the build broke).
+        (KWQKHTMLPart::updatePolicyBaseURL): Use xmlDocImpl instead of docImpl.
+        (KWQKHTMLPart::setPolicyBaseURL): Ditto.
+        (KWQKHTMLPart::keyEvent): Ditto.
+        (KWQKHTMLPart::dispatchCPPEvent): Ditto.
+        (KWQKHTMLPart::bodyBackgroundColor): Ditto.
+
+2004-11-12  Chris Blumenberg  <cblu@apple.com>
+
+       <rdar://problem/3843312> REGRESSION: Tabbing into content area puts insertion point at start, should go to where it last was
+
+        Reviewed by rjw.
+
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::nextKeyViewInFrameHierarchy): only blow away selection when another view is focused
+
+=== Safari-171 ===
+
+2004-11-12  Darin Adler  <darin@apple.com>
+
+        Reviewed by Kevin.
+
+        - fixed a couple places that would not work for XML documents
+
+        * khtml/ecma/kjs_window.cpp:
+        (Window::isSafeScript): Use xmlDocImpl instead of docImpl, since the function we're using
+        is present on the base class.
+        (WindowFunc::tryCall): More of the same.
+
+2004-11-12  Darin Adler  <darin@apple.com>
+
+        - land versions of these files generated by the newer gperf
+
+        People building on Panther will continue to see these files modified.
+        A workaround would be to install the newer gperf on our Tiger build machines.
+
+        * khtml/css/cssproperties.c: Regenerated.
+        * khtml/css/cssvalues.c: Regenerated.
+        * khtml/html/doctypes.cpp: Regenerated.
+        * khtml/html/kentities.c: Regenerated.
+        * khtml/misc/htmlattrs.c: Regenerated.
+        * khtml/misc/htmltags.c: Regenerated.
+        * kwq/KWQColorData.c: Regenerated.
+
+2004-11-11  Richard Williamson   <rjw@apple.com>
+       
+        Fix build horkage from previous checkin.
+               
+        * kwq/KWQKHTMLPart.h:
+
+2004-11-11  Darin Adler  <darin@apple.com>
+
+        Reviewed by John.
+
+        - fixed <rdar://problem/3846152> REGRESSION (125-166): can't drag text out of <input type=text> fields
+
+        * kwq/WebCoreBridge.h: Added wasFirstResponderAtMouseDownTime: method.
+
+        * kwq/KWQKHTMLPart.h: Removed _firstResponderAtMouseDownTime.
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Use the new wasFirstResponderAtMouseDownTime:
+        method on the bridge instead of _firstResponderAtMouseDownTime. This will return YES for the case where
+        we started with the NSTextField as first responder, and then took focus away and gave it back, which
+        makes dragging text work again.
+        (KWQKHTMLPart::mouseDown): Removed code to set _firstResponderAtMouseDownTime.
+
+2004-11-11  David Hyatt  <hyatt@apple.com>
+
+       Disable the tokenizer deferral, since it hurts the PLT by 3% or so.
+       
+        Reviewed by vicki
+
+        * khtml/html/htmltokenizer.cpp:
+        (khtml::HTMLTokenizer::continueProcessing):
+
 2004-11-11  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by Maciej
 2004-11-11  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by Maciej
 
         * khtml/rendering/bidi.cpp:
         (khtml::RenderBlock::findNextLineBreak): I did not get my fix for 3848343 and 3848224
 
         * khtml/rendering/bidi.cpp:
         (khtml::RenderBlock::findNextLineBreak): I did not get my fix for 3848343 and 3848224
-           yesterday quite right: words that should have been placed on the next line were instead
+        yesterday quite right: words that should have been placed on the next line were instead
         appearing on the line before, beyond the right margin. This was a one-word only error
         based on moving the line break object when it should have stayed put. Here is the rule:
         The line break object only moves to after the whitespace on the end of a line if that 
         appearing on the line before, beyond the right margin. This was a one-word only error
         based on moving the line break object when it should have stayed put. Here is the rule:
         The line break object only moves to after the whitespace on the end of a line if that