Fix for 3992440, text not wrapping correctly on half moon bay web site. Refine...
[WebKit-https.git] / WebCore / ChangeLog-2005-08-23
index 7bb08c7..ba4400c 100644 (file)
@@ -1,3 +1,306 @@
+2005-02-10  David Hyatt  <hyatt@apple.com>
+
+       Fix  for 3992440, text not wrapping correctly on half moon bay web site.  Refine an incorrect optimization I
+       added to be less restrictive.
+       
+        Reviewed by mjs
+
+        * khtml/rendering/render_block.cpp:
+        (khtml::RenderBlock::layoutBlockChildren):
+
+2005-02-08  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Darin.
+
+       <rdar://problem/3977973> pages on ebay leak referenced JavaScript objects -- over time browsing becomes super-slow
+
+       I fixed this by removing all event listeners for a document, it's
+       children, and any disconnected nodes that used to be in the
+       document at document detach time. Mozilla temporarily disables
+       event listeners on such nodes, but re-enables them if you
+       re-parant a node into a new document. However, in WebCore, you
+       can't re-parent a node into another document, so there is no
+       observable change in behavior.
+
+       We have to do this to break the possible reference cycles between
+       event listeners and the dom nodes they are attached to (e.g. via
+       scope chain, as in this case).
+
+        * khtml/xml/dom_docimpl.cpp:
+        (DocumentImpl::detach):
+        (DocumentImpl::removeAllEventListenersFromAllNodesx):
+        (DocumentImpl::registerDisconnectedNodeWithEventListeners):
+        (DocumentImpl::unregisterDisconnectedNodeWithEventListeners):
+        (DocumentImpl::removeAllDisconnectedNodeEventListeners):
+        * khtml/xml/dom_docimpl.h:
+        * khtml/xml/dom_nodeimpl.cpp:
+        (NodeImpl::~NodeImpl):
+        (NodeImpl::addEventListener):
+        (NodeImpl::removeEventListener):
+        (NodeImpl::removeAllEventListeners):
+        (NodeImpl::removeHTMLEventListener):
+        (NodeImpl::insertedIntoDocument):
+        (NodeImpl::removedFromDocument):
+        * khtml/xml/dom_nodeimpl.h:
+
+2005-02-09  Chris Blumenberg  <cblu@apple.com>
+
+       Fixed: <rdar://problem/3999213> Sometimes 2 Windows Media Player plugin instances are loaded
+
+        Reviewed by hyatt.
+
+        * khtml/html/html_objectimpl.cpp:
+        (HTMLObjectElementImpl::attach): Set needWidgetUpdate to false before calling updateWidget because updateWidget may cause this method or another method (which also calls updateWidget) to be called.
+        (HTMLObjectElementImpl::recalcStyle): ditto
+
+2005-02-09  David Harrison  <harrison@apple.com>
+
+        Reviewed by Darin.
+        
+        <rdar://problem/3937447> Mail-689: Arrow key navigation in new message body stops working when a line ends with a bold word
+        
+        Added affinity to VisiblePosition.  Changed Selection code to use affinity more.
+        
+        (Partial) <rdar://problem/3982096> editing/pasteboard/paste-text-007 is failing
+        
+        Changed ReplaceSelectionCommand to also pay attention to the top children of the incoming fragment, not just the very last node inserted, when deciding whether to insert a paragraph for the Apple interchange newline.
+
+        * khtml/ecma/kjs_window.cpp:
+        (SelectionFunc::tryCall):
+        * khtml/editing/htmlediting.cpp:
+        (khtml::EditCommandPtr::setStartingSelection):
+        (khtml::EditCommandPtr::setEndingSelection):
+        (khtml::EditCommand::setStartingSelection):
+        (khtml::EditCommand::setEndingSelection):
+        (khtml::CompositeEditCommand::deleteInsignificantTextDownstream):
+        (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
+        (khtml::ApplyStyleCommand::splitTextAtStartIfNeeded):
+        (khtml::ApplyStyleCommand::splitTextAtEndIfNeeded):
+        (khtml::ApplyStyleCommand::splitTextElementAtStartIfNeeded):
+        (khtml::ApplyStyleCommand::splitTextElementAtEndIfNeeded):
+        (khtml::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
+        (khtml::ApplyStyleCommand::mergeEndWithNextIfIdentical):
+        (khtml::ApplyStyleCommand::joinChildTextNodes):
+        (khtml::DeleteSelectionCommand::initializePositionData):
+        (khtml::DeleteSelectionCommand::handleGeneralDelete):
+        (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
+        (khtml::DeleteSelectionCommand::doApply):
+        (khtml::InsertLineBreakCommand::doApply):
+        (khtml::InsertParagraphSeparatorCommand::doApply):
+        (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply):
+        (khtml::InsertTextCommand::input):
+        (khtml::MoveSelectionCommand::doApply):
+        (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand):
+        (khtml::ReplaceSelectionCommand::~ReplaceSelectionCommand):
+        (khtml::ReplaceSelectionCommand::doApply):
+        (khtml::ReplaceSelectionCommand::completeHTMLReplacement):
+        (khtml::ReplaceSelectionCommand::updateNodesInserted):
+        (khtml::TypingCommand::deleteKeyPressed):
+        (khtml::TypingCommand::forwardDeleteKeyPressed):
+        (khtml::TypingCommand::markMisspellingsAfterTyping):
+        * khtml/editing/htmlediting.h:
+        * khtml/editing/selection.cpp:
+        (khtml::Selection::Selection):
+        (khtml::Selection::init):
+        (khtml::Selection::moveTo):
+        (khtml::Selection::modifyExtendingRightForward):
+        (khtml::Selection::modifyMovingRightForward):
+        (khtml::Selection::modifyExtendingLeftBackward):
+        (khtml::Selection::modifyMovingLeftBackward):
+        (khtml::Selection::modify):
+        (khtml::Selection::xPosForVerticalArrowNavigation):
+        (khtml::Selection::clear):
+        (khtml::Selection::setBase):
+        (khtml::Selection::setExtent):
+        (khtml::Selection::setBaseAndExtent):
+        (khtml::Selection::layout):
+        (khtml::Selection::validate):
+        * khtml/editing/selection.h:
+        (khtml::Selection::startAffinity):
+        (khtml::Selection::endAffinity):
+        (khtml::Selection::baseAffinity):
+        (khtml::Selection::extentAffinity):
+        (khtml::operator==):
+        * khtml/editing/text_affinity.h:
+        (khtml::):
+        * khtml/editing/visible_position.cpp:
+        (khtml::VisiblePosition::VisiblePosition):
+        (khtml::VisiblePosition::init):
+        (khtml::VisiblePosition::initUpstream):
+        (khtml::VisiblePosition::initDownstream):
+        (khtml::VisiblePosition::next):
+        (khtml::VisiblePosition::previous):
+        (khtml::startVisiblePosition):
+        (khtml::endVisiblePosition):
+        * khtml/editing/visible_position.h:
+        (khtml::VisiblePosition::):
+        (khtml::VisiblePosition::VisiblePosition):
+        (khtml::VisiblePosition::affinity):
+        (khtml::VisiblePosition::setAffinity):
+        (khtml::operator==):
+        * khtml/editing/visible_units.cpp:
+        (khtml::previousBoundary):
+        (khtml::nextBoundary):
+        (khtml::startOfLine):
+        (khtml::endOfLine):
+        (khtml::previousLinePosition):
+        (khtml::nextLinePosition):
+        (khtml::startOfParagraph):
+        (khtml::endOfParagraph):
+        (khtml::previousParagraphPosition):
+        (khtml::nextParagraphPosition):
+        (khtml::startOfBlock):
+        (khtml::endOfBlock):
+        (khtml::startOfDocument):
+        (khtml::endOfDocument):
+        * khtml/editing/visible_units.h:
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::findTextNext):
+        (KHTMLPart::selectClosestWordFromMouseEvent):
+        (KHTMLPart::handleMousePressEventTripleClick):
+        (KHTMLPart::handleMousePressEventSingleClick):
+        (KHTMLPart::handleMouseMoveEventSelection):
+        (KHTMLPart::khtmlMouseReleaseEvent):
+        (KHTMLPart::selectAll):
+        (KHTMLPart::computeAndSetTypingStyle):
+        (KHTMLPart::selectionComputedStyle):
+        * khtml/rendering/render_br.cpp:
+        (RenderBR::positionForCoordinates):
+        * khtml/xml/dom_docimpl.cpp:
+        (DocumentImpl::updateSelection):
+        * khtml/xml/dom_nodeimpl.cpp:
+        (NodeBaseImpl::setFocus):
+        * khtml/xml/dom_position.cpp:
+        (DOM::Position::previousCharacterPosition):
+        (DOM::Position::nextCharacterPosition):
+        * khtml/xml/dom_position.h:
+        * kwq/KWQAccObject.mm:
+        (-[KWQAccObject value]):
+        (-[KWQAccObject visiblePositionForStartOfTextMarkerRange:]):
+        (-[KWQAccObject visiblePositionForEndOfTextMarkerRange:]):
+        (-[KWQAccObject accessibilityAttributeValue:]):
+        (-[KWQAccObject doAXLineForTextMarker:]):
+        (-[KWQAccObject doAXTextMarkerRangeForLine:]):
+        (-[KWQAccObject doAXTextMarkerForPosition:]):
+        (-[KWQAccObject doAXLeftLineTextMarkerRangeForTextMarker:]):
+        (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
+        (-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]):
+        (-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]):
+        (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
+        (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
+        (-[KWQAccObject doSetAXSelectedTextMarkerRange:]):
+        * kwq/KWQAccObjectCache.mm:
+        (KWQAccObjectCache::textMarkerForVisiblePosition):
+        (KWQAccObjectCache::visiblePositionForTextMarker):
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::findString):
+        (KWQKHTMLPart::advanceToNextMisspelling):
+        (KWQKHTMLPart::styleForSelectionStart):
+        (KWQKHTMLPart::baseWritingDirectionForSelectionStart):
+        (KWQKHTMLPart::setSelectionFromNone):
+        (KWQKHTMLPart::respondToChangedSelection):
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge setSelectedDOMRange:affinity:]):
+        (-[WebCoreBridge selectionAffinity]):
+        (-[WebCoreBridge setMarkDOMRange:]):
+        (-[WebCoreBridge _visiblePositionForPoint:]):
+        (-[WebCoreBridge moveDragCaretToPoint:]):
+        (-[WebCoreBridge editableDOMRangeForPoint:]):
+        (-[WebCoreBridge ensureSelectionVisible]):
+        (-[WebCoreBridge rangeOfCharactersAroundCaret]):
+
+2005-02-09  Chris Blumenberg  <cblu@apple.com>
+
+       Fixed: <rdar://problem/3985211> Seed: Mail: Drag-and-drop destination indicator / insertion point disappears
+
+        Reviewed by kocienda.
+
+        * khtml/rendering/render_block.cpp:
+        (khtml::RenderBlock::paintCaret): new
+        (khtml::RenderBlock::paintObject): call paintCaret for the cursor caret and the drag caret
+        * khtml/rendering/render_block.h:
+
+=== Safari-185 ===
+
+2005-02-08  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by John
+
+        Fix for this bug:
+        
+        <rdar://problem/3996344> Entire document content is deleted when only the first paragraph was supposed to be
+
+        Problem stems from my attempt to fix this bug: <rdar://problem/3986155> Insertion point goes 
+        to beginning of doc after deleting.
+        
+        I added an "optimization" that proved to do more harm than good. So, basically, the fix is to remove code.
+
+        * khtml/editing/htmlediting.cpp:
+        (khtml::DeleteSelectionCommand::handleGeneralDelete)
+
+2005-02-07  Darin Adler  <darin@apple.com>
+
+        Reviewed by Kevin.
+
+        - fixed <rdar://problem/3890352> REGRESSION (125-170, Panther-only): pasted textarea contents disappear (exception in NSText)
+
+        * kwq/KWQTextArea.mm: (-[KWQTextArea tile]): Don't resize the text view immediately here.
+        Use performWithDelay to defer it to avoid the re-entrancy that bothers the Panther version
+        of NSTextView. On Tiger, leave the code alone.
+
+2005-02-07  Adele Amchan  <adele@apple.com>
+
+        Reviewed by Darin.
+
+        Fix for <rdar://problem/3993628> REGRESSION (180-181): Logitelnet bank's website doesn't work
+
+        This fixes an oversight in the fix for <rdar://problem/3964286>.  
+        We're now making sure there is a document before calling checkCompleted in slotLoaderRequestDone.
+               That function is called even when other parts finish loads of their subresources, so we could end
+       up calling checkCompleted before we had a document. We also looked over all the other calls to
+       checkCompleted to convince ourselves no other call sites had a similar issue.
+
+        * khtml/khtml_part.cpp: (KHTMLPart::slotLoaderRequestDone): Check if doc is nil before calling
+       checkCompleted.
+
+2005-02-07  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by Darin
+
+        Fix for this bug:
+        
+        <rdar://problem/3953302> Replacing quoted text ends up with blue-colored text that is not quoted
+
+        * khtml/editing/htmlediting.cpp:
+        (khtml::DeleteSelectionCommand::doApply): Removed special case delete code for select all. It was
+        causing as many bugs as it fixed. What's more, the design concept is a bit shaky. By removing
+        this special case, the bug goes away.
+        * khtml/editing/htmlediting.h: Remove declaration.
+        
+        Test results using selectAll() updated to reflect changed behavior.
+        
+        * layout-tests/editing/deleting/delete-3775172-fix-expected.txt:
+        * layout-tests/editing/deleting/delete-select-all-001-expected.txt:
+        * layout-tests/editing/deleting/delete-select-all-003-expected.txt:
+        * layout-tests/editing/inserting/insert-3654864-fix-expected.txt:
+        * layout-tests/editing/inserting/insert-3775316-fix-expected.txt:
+        * layout-tests/editing/inserting/insert-3851164-fix-expected.txt:
+        * layout-tests/editing/inserting/insert-3907422-fix-expected.txt:
+        * layout-tests/editing/pasteboard/paste-text-015-expected.txt:
+
+2005-02-06  Darin Adler  <darin@apple.com>
+
+        Reviewed by Ken.
+
+        - fixed <rdar://problem/3994164> setting a new style attribute with setAttribute("style") doesn't blow away the old style
+
+        * khtml/css/css_valueimpl.h: Renamed parseProperty to parseDeclaration, since it's used to parse
+        an entire style declaration, not a single property.
+        * khtml/css/css_valueimpl.cpp: (DOM::CSSMutableStyleDeclarationImpl::parseDeclaration): Renamed,
+        and added code to clear m_values.
+        * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseHTMLAttribute): Call function by its
+        new name, and remove some unnecessary comments.
+
 2005-02-06  Darin Adler  <darin@apple.com>
 
         Reviewed by Maciej.