1 2005-04-12 Maciej Stachowiak <mjs@apple.com>
5 - use custom single-threaded malloc for all non-GC JavaScriptCore
6 allocations, for a 9.1% speedup on JavaScript iBench
8 * khtml/ecma/kjs_binding.cpp:
10 * khtml/ecma/kjs_proxy.cpp:
11 (KJSProxyImpl::evaluate):
13 2005-04-15 David Hyatt <hyatt@apple.com>
15 Fix the six pixel gap between rows nine and ten of the Acid2 test. Make sure that percentage heights that
16 resolve to auto are properly treated as though they have auto height by the self-collapsing block check (as per
17 section 8.3.1, paragraph 7 of the CSS2.1 spec).
19 * khtml/rendering/render_block.cpp:
20 (khtml::RenderBlock::isSelfCollapsingBlock):
22 2005-04-15 David Hyatt <hyatt@apple.com>
24 The Acid2 test and the reference rendering both make use of overflow:hidden on the <html> element. Turns out
25 the CSS2.1 wording for this behavior has been revised (based off WinIE/Mozilla behavior). Change our behavior
26 to match and make <html> overflow apply to the viewport.
28 * khtml/khtmlview.cpp:
29 (KHTMLView::applyOverflowToViewport):
32 * khtml/rendering/render_box.cpp:
33 (RenderBox::setStyle):
35 2005-04-14 David Hyatt <hyatt@apple.com>
37 3258403 and 3258402 can now be fixed. min/max-width/height support is now complete. This patch makes them
38 work for positioned elements and enables us to pass row one of the Acid2 test.
40 * khtml/rendering/render_box.cpp:
41 (RenderBox::calcAbsoluteHorizontal):
42 (RenderBox::calcAbsoluteHorizontalValues):
43 (RenderBox::calcAbsoluteVertical):
44 (RenderBox::calcAbsoluteVerticalValues):
45 * khtml/rendering/render_box.h:
47 2005-04-12 David Hyatt <hyatt@apple.com>
49 Working on the Acid2 test, Row 1.
51 Improve checkChild for the DTD so that it knows what mode a document is in. This allows it to adhere more
52 strictly to the actual DTD in strict mode and almost strict mode.
54 Change the <table>-inside-<p> check so that <table> is disallowed inside <p> in
55 strict mode and almost strict mode. This matches Firefox behavior, which allows <table>
56 inside <p> only in quirks mode.
61 * khtml/html/htmlparser.cpp:
62 (KHTMLParser::insertNode):
63 * khtml/html/htmltokenizer.cpp:
64 (khtml::HTMLTokenizer::parseTag):
65 * khtml/xml/dom_elementimpl.cpp:
66 (ElementImpl::childAllowed):
68 2005-04-12 Vicki Murley <vicki@apple.com>
72 - fixed <rdar://problem/3760895> Request for including an implementation of the elementFromPoint function
74 * khtml/dom/dom_doc.cpp:
75 (DOM::Document::elementFromPoint):
76 * khtml/dom/dom_doc.h:
77 * khtml/ecma/kjs_dom.cpp:
78 (DOMDocumentProtoFunc::tryCall):
79 * khtml/ecma/kjs_dom.h:
81 * khtml/ecma/kjs_dom.lut.h:
83 * khtml/xml/dom_docimpl.cpp:
84 (DocumentImpl::elementFromPoint):
85 * khtml/xml/dom_docimpl.h:
87 2005-04-12 David Hyatt <hyatt@apple.com>
89 Beginning of work to support the Acid2 CSS test put forward by the Web Standards Project. Fix
90 our handling of the rel attribute on <link> elements to do a proper tokenization so that stylesheets
91 can be recognized even when other keywords are present in the rel attribute.
93 * khtml/html/html_headimpl.cpp:
94 (HTMLLinkElementImpl::HTMLLinkElementImpl):
95 (HTMLLinkElementImpl::parseHTMLAttribute):
96 (HTMLLinkElementImpl::tokenizeRelAttribute):
97 (HTMLLinkElementImpl::process):
98 * khtml/html/html_headimpl.h:
100 2005-04-12 John Sullivan <sullivan@apple.com>
102 - fixed these two bugs (I also fixed these on the experimental-ui-branch)
103 <rdar://problem/3154293> Find Next should not scroll page if the next target is already visible
104 <rdar://problem/3121828> scrollToVisible on find cuts off the left part of the view due to needless horiz. scroll
108 * kwq/KWQKHTMLPart.mm:
109 (KWQKHTMLPart::jumpToSelection):
110 Trey had written code to address these issues, but left it commented out due to other
111 problems. The other problems no longer occur, so I uncommented Trey's code, and then
112 discovered that I could make it behave more like TextEdit with many fewer lines of
115 2005-04-08 David Harrison <harrison@apple.com>
117 Reviewed by Dave Hyatt.
119 <rdar://problem/4084106> Remove NSAccessibilityForegroundColorTextAttributeWrapper
121 * kwq/KWQAccObject.mm:
122 (AXAttributeStringSetStyle):
123 Use NSAccessibilityForegroundColorTextAttribute directly.
125 2005-04-05 David Hyatt <hyatt@apple.com>
127 Fix for 4077106, make sure that mouse wheeling in overflow sections uses 40 rather than 10 as the base line
132 * khtml/rendering/render_layer.cpp:
133 (RenderLayer::positionScrollbars):
134 * kwq/KWQScrollBar.mm:
135 (QScrollBar::scroll):
137 2005-04-04 Vicki Murley <vicki@apple.com>
141 - fixed <rdar://problem/3871669> no focus or blur methods on HTML button elements
143 * khtml/dom/html_form.cpp:
144 (HTMLButtonElement::focus):
145 (HTMLButtonElement::blur):
146 * khtml/dom/html_form.h:
147 * khtml/ecma/kjs_html.cpp:
148 (KJS::HTMLElementFunction::tryCall):
149 * khtml/ecma/kjs_html.h:
150 (KJS::HTMLElement::):
151 * khtml/ecma/kjs_html.lut.h:
153 * khtml/html/html_formimpl.cpp:
154 (DOM::HTMLButtonElementImpl::blur):
155 (DOM::HTMLButtonElementImpl::focus):
156 * khtml/html/html_formimpl.h:
160 2005-03-28 David Harrison <harrison@apple.com>
164 <rdar://problem/4069161> REGRESSION (8A416-8A419): Safari crash bringing up context menu for non-HTML content in a frame
166 * kwq/KWQAccObject.mm:
167 (-[KWQAccObject rendererForView:]):
168 Nil-check node variable instead of rechecking document variable.
172 2005-03-27 Darin Adler <darin@apple.com>
174 Reviewed by me, fix by Kida-san.
176 - fixed <rdar://problem/4067474> 8A424: Safari immediately quit by Cmd+Ctrll+'D'
178 * kwq/WebCoreBridge.mm: (-[WebCoreBridge convertToNSRange:DOM::]):
183 2005-03-24 Richard Williamson <rjw@apple.com>
185 Fixed <rdar://problem/4052683> After adding/removing stocks from Stocks Widget, stock areas went blank
187 The request was being collected before firing it's load handler.
188 We now gc protect the request while it's loading.
192 * khtml/ecma/xmlhttprequest.cpp:
193 (KJS::XMLHttpRequest::send):
194 (KJS::XMLHttpRequest::abort):
195 (KJS::XMLHttpRequest::slotFinished):
196 (KJS::XMLHttpRequestProtoFunc::tryCall):
200 2005-03-23 Darin Adler <darin@apple.com>
202 Further fix for 4053515.
204 Covered cases where text position doesn't lie inside a
209 * khtml/editing/visible_text.cpp:
210 (khtml::TextIterator::setRangeFromLocationAndLength):
212 2005-03-23 Richard Williamson <rjw@apple.com>
214 Fixed <rdar://problem/4053515> REGRESSION (Mail): Kotoeri input method reconversion does not work in WebViews
216 We now use actual document NSRanges to represent both marked text
217 ranges and selection ranges.
221 * khtml/editing/visible_text.cpp:
222 (khtml::TextIterator::rangeLength):
223 (khtml::TextIterator::setRangeFromLocationAndLength):
224 * khtml/editing/visible_text.h:
225 * kwq/WebCoreBridge.h:
226 * kwq/WebCoreBridge.mm:
227 (-[WebCoreBridge convertToNSRange:DOM::]):
228 (-[WebCoreBridge DOM::convertToDOMRange:]):
229 (-[WebCoreBridge selectNSRange:]):
230 (-[WebCoreBridge markedTextDOMRange]):
231 (-[WebCoreBridge markedTextNSRange]):
233 2005-03-22 Kevin Decker <kdecker@apple.com>
237 Fixed <rdar://problem/4062336> REGRESSION (406-407): HTML submenus not working at hrweb.apple.com after going back
239 Rolled out the fix for <rdar://problem/4041374> REGRESSION (185-186): unload handlers (at least those added with addEventListener) are broken
241 We clearly need a better solution to 4041374. We can't indiscriminately remove event listeners in closeURL() after-all. Since event listeners are registered in a <script> tag, which is evaluated and executed at page load time, this becomes a problem since we don't reevaluate a page's <script> that is in the back/forward cache. Thus once you leave the page, the listeners are gone for good. This is the problem.
243 * khtml/khtml_part.cpp:
244 (KHTMLPart::closeURL):
245 * khtml/xml/dom_docimpl.cpp:
246 (DocumentImpl::detach):
250 2005-03-22 Vicki Murley <vicki@apple.com>
252 - roll the fix for <rdar://problem/4060266> back in, since its
255 * khtml/editing/visible_text.cpp:
256 (khtml::TextIterator::handleTextBox):
258 2005-03-22 Vicki Murley <vicki@apple.com>
260 - roll out the fix for <rdar://problem/4060266> since it was denied by CCC
262 * khtml/editing/visible_text.cpp:
263 (khtml::TextIterator::handleTextBox):
265 2005-03-22 David Harrison <harrison@apple.com>
269 <rdar://problem/4060266> Double-clicking in Dictionary.app doesn't work for some words (coming just after style change)
271 * khtml/editing/visible_text.cpp:
272 (khtml::TextIterator::handleTextBox):
273 Complete the check of whether to emit space for collapsed space.
275 2005-03-22 David Harrison <harrison@apple.com>
279 <rdar://problem/4061443> REGRESSION (8A420-8A421): Pasting in the Stickies widget is broken again
281 * khtml/editing/htmlediting.cpp:
282 (khtml::positionBeforeContainingSpecialElement):
283 (khtml::positionAfterContainingSpecialElement):
284 Return unchanged Position rather than a null or non-editable one.
288 2005-03-20 Ken Kocienda <kocienda@apple.com>
292 I made an error in this test earlier. It was not testing what I intended. Fixed.
294 * layout-tests/editing/unsupported-content/list-delete-001-expected.txt
295 * layout-tests/editing/unsupported-content/list-delete-001.html
299 * layout-tests/editing/unsupported-content/table-delete-001-expected.txt: Added.
300 * layout-tests/editing/unsupported-content/table-delete-001.html: Added.
301 * layout-tests/editing/unsupported-content/table-delete-002-expected.txt: Added.
302 * layout-tests/editing/unsupported-content/table-delete-002.html: Added.
303 * layout-tests/editing/unsupported-content/table-delete-003-expected.txt: Added.
304 * layout-tests/editing/unsupported-content/table-delete-003.html: Added.
305 * layout-tests/editing/unsupported-content/table-type-after-expected.txt: Added.
306 * layout-tests/editing/unsupported-content/table-type-after.html: Added.
307 * layout-tests/editing/unsupported-content/table-type-before-expected.txt: Added.
308 * layout-tests/editing/unsupported-content/table-type-before.html: Added.
310 2005-03-20 Darin Adler <darin@apple.com>
314 - fixed <rdar://problem/3923903> REGRESSION (164-165): Repro Safari crash in khtml::RenderLayer::scrollToOffset
316 * khtml/rendering/render_layer.cpp: (RenderLayer::scrollToOffset): Check canvas for nil.
318 2005-03-20 David Harrison <harrison@apple.com>
322 <rdar://problem/4055127> Dictionary pop-up panel misplaced at beginning of text blocks (breaks double-clicking in Dictionary.app)
324 SimplifiedBackwardsTextIterator::advance() needed to not limit to textnodes
325 when checking whether moving back across block boundaries
327 VisibleUnits previousBoundary() needed to INIT_DOWN when creating result VisiblePosition
329 All editing tests pass.
331 * khtml/editing/visible_text.cpp:
332 (khtml::SimplifiedBackwardsTextIterator::advance):
333 * khtml/editing/visible_units.cpp:
334 (khtml::previousBoundary):
336 2005-03-20 Darin Adler <darin@apple.com>
338 Reviewed by Harrison.
340 - fixed <rdar://problem/4059914> when you select all of a frame's content, need to select the frame in the parent document so it can be easily deleted
342 * khtml/khtml_part.h: Added selectFrameElementInParentIfFullySelected.
343 * khtml/khtml_part.cpp:
345 (KHTMLPart::setFocusNodeIfNeeded): Changed to not set focus to a frame; was not what this function was
346 intended to do, and caused trouble when trying to select a frame element.
347 (KHTMLPart::khtmlMouseReleaseEvent): Call selectFrameElementInParentIfFullySelected.
348 (KHTMLPart::selectAll): Call selectFrameElementInParentIfFullySelected.
349 (KHTMLPart::selectFrameElementInParentIfFullySelected): Added. Selects the frame element in the parent
350 if a frame is entirely selected, which makes it easier to delete or replace the frame and is consistent
351 with the changes Maciej made recently for other elements.
353 * kwq/WebCoreBridge.mm:
354 (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): Call selectFrameElementInParentIfFullySelected.
355 (-[WebCoreBridge alterCurrentSelection:verticalDistance:]): Call selectFrameElementInParentIfFullySelected.
357 2005-03-20 Darin Adler <darin@apple.com>
359 Reviewed by me, code change by Ken.
361 - fixed <rdar://problem/4059852> Deleting from first element of list makes content jump to wrong place
363 * khtml/editing/htmlediting.cpp:
364 (khtml::isListStructureNode): Added.
365 (khtml::DeleteSelectionCommand::moveNodesAfterNode): Check for list nodes as well as table nodes.
367 2005-03-20 Ken Kocienda <kocienda@apple.com>
371 Added tests to cover new "unsupported content" editing code.
373 * layout-tests/editing/unsupported-content/list-delete-001-expected.txt: Added.
374 * layout-tests/editing/unsupported-content/list-delete-001.html: Added.
375 * layout-tests/editing/unsupported-content/list-delete-002-expected.txt: Added.
376 * layout-tests/editing/unsupported-content/list-delete-002.html: Added.
377 * layout-tests/editing/unsupported-content/list-delete-003-expected.txt: Added.
378 * layout-tests/editing/unsupported-content/list-delete-003.html: Added.
379 * layout-tests/editing/unsupported-content/list-type-after-expected.txt: Added.
380 * layout-tests/editing/unsupported-content/list-type-after.html: Added.
381 * layout-tests/editing/unsupported-content/list-type-before-expected.txt: Added.
382 * layout-tests/editing/unsupported-content/list-type-before.html: Added.
384 2005-03-20 Ken Kocienda <kocienda@apple.com>
390 <rdar://problem/4059578> Entire list deleted, and caret disappears, when delete key hit at end of list
392 The problem is that a new case in the delete code did not consider when the
393 downstream end node of the selection might be an ancestor of the upstream start
394 node. That is the case in this bug. The downstream end is the body element, and
395 this line of code would delete all the children of the downstream end:
396 removeChildrenInRangePreservingPosition(m_downstreamEnd.node(), 0,
397 m_downstreamEnd.offset(), m_upstreamStart);
399 The fix is to check for this "is ancestor" case, and do some tree logic to find
400 the right offset of the downstream end node for the call to
401 removeChildrenInRangePreservingPosition().
403 * khtml/editing/htmlediting.cpp:
404 (khtml::DeleteSelectionCommand::handleGeneralDelete): Fixed as described.
406 2005-03-19 Ken Kocienda <kocienda@apple.com>
412 <rdar://problem/4059384> Cannot place insertion point correctly in editable text that avoids floating elements
414 Note: I strongly suspect this bug blocks a complete solution to this other Tiger/P2:
415 <rdar://problem/4055748> AX: Dictionary pop-up panel shows at wrong place on specific parts of particular pages
417 * khtml/rendering/render_text.cpp:
418 (RenderText::caretRect): Change the y-coordinate used to calculate the available width for a line. Height is wrong.
419 Top of the box containing the text where the click is done is correct. Also, add in the x-offset for the start
420 of the text box when calculating the available width. If this text box is avoiding a float at the y-coordinate
421 for the relevant box, failure to add in the amount of float-avoidance will make the text at the coordinates
422 greater than end-of-line minus float-avoidance ineligible for caret placement.
424 2005-03-19 Darin Adler <darin@apple.com>
428 - fixed <rdar://problem/4057594> REGRESSION (125-406): Unrepro crash in HTMLTokenizer::allDataProcessed after hitting Back button
430 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::allDataProcessed):
431 To get the part safely after calling end, save a guarded pointer to the view.
432 The old way could end trying to call a virtual function a part that was destroyed.
434 2005-03-19 Maciej Stachowiak <mjs@apple.com>
438 <rdar://problem/4053506> Pasting Tables and Cells in Mail does not allow editing before or after
439 <rdar://problem/4005954> REGRESSION (Mail): After copy/paste of content containing list element cannot go back to entering text at left side of page
441 * khtml/editing/htmlediting.cpp:
442 (khtml::maxDeepOffset):
443 (khtml::CompositeEditCommand::removeFullySelectedNodePreservingPosition):
444 (khtml::CompositeEditCommand::removeChildrenInRangePreservingPosition):
445 (khtml::CompositeEditCommand::removeNodePreservingPosition):
446 (khtml::CompositeEditCommand::insertBlockPlaceholder):
447 (khtml::CompositeEditCommand::appendBlockPlaceholder):
448 (khtml::CompositeEditCommand::forceBlockPlaceholder):
449 (khtml::CompositeEditCommand::addBlockPlaceholderIfNeeded):
450 (khtml::isSpecialElement):
451 (khtml::isFirstVisiblePositionInSpecialElementInFragment):
452 (khtml::positionBeforePossibleContainingSpecialElement):
453 (khtml::positionAfterPossibleContainingSpecialElement):
454 (khtml::ApplyStyleCommand::applyInlineStyle):
455 (khtml::DeleteSelectionCommand::initializePositionData):
456 (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent):
457 (khtml::DeleteSelectionCommand::handleGeneralDelete):
458 (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
459 (khtml::DeleteSelectionCommand::doApply):
460 (khtml::InsertParagraphSeparatorCommand::doApply):
461 (khtml::ReplacementFragment::ReplacementFragment):
462 (khtml::ReplaceSelectionCommand::doApply):
463 * khtml/editing/htmlediting.h:
464 * khtml/editing/visible_position.cpp:
465 (khtml::isRenderedBR):
466 (khtml::VisiblePosition::initDownstream):
467 (khtml::isLastVisiblePositionInBlock):
468 * khtml/rendering/render_line.cpp:
469 (khtml::RootInlineBox::closestLeafChildForXPos):
470 * khtml/xml/dom_nodeimpl.cpp:
471 (NodeImpl::isBlockFlowOrTable):
472 (NodeImpl::isEditableBlock):
473 (NodeImpl::enclosingBlockFlowOrTableElement):
474 * khtml/xml/dom_nodeimpl.h:
475 * khtml/xml/dom_position.cpp:
476 (DOM::Position::upstream):
477 (DOM::Position::downstream):
478 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-003-expected.txt:
479 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-004-expected.txt:
480 * layout-tests/editing/deleting/delete-select-all-001-expected.txt:
481 * layout-tests/editing/deleting/delete-select-all-003-expected.txt:
482 * layout-tests/editing/inserting/insert-3786362-fix-expected.txt:
484 2005-03-19 John Sullivan <sullivan@apple.com>
488 - fixed <rdar://problem/4058740> Crash (nil-deref) editing Mail reply
489 message in KWQKHTMLPart::fontForSelection (MailViewer-723)
491 * kwq/KWQKHTMLPart.mm:
492 (KWQKHTMLPart::fontForSelection):
493 Add nil check to loop. It shouldn't be necessary, but this crash trace seems to be
494 running into it. We're not completely certain, but the check is harmless at worst.
498 2005-03-18 David Harrison <harrison@apple.com>
502 <rdar://problem/3584942> AX: Safari Accessibility parent-child mismatch
506 * kwq/KWQAccObject.mm:
507 (-[KWQAccObject rendererForView:]):
508 New to cover both the WebCore and WebKit NSViews.
510 (-[KWQAccObject _accessibilityParentForSubview:]):
513 * kwq/WebCoreFrameView.h:
514 Add WebCoreBridgeHolder protocol to get access to WebKit NSViews.
516 2005-03-18 David Harrison <harrison@apple.com>
518 Reviewed by Darin, Ken.
520 <rdar://problem/3735625> AX: add AXPress action if an element has an onclick handler
522 * khtml/dom/html_form.cpp:
523 (HTMLInputElement::click):
524 * khtml/html/html_elementimpl.cpp:
525 (HTMLElementImpl::click):
526 (HTMLElementImpl::accessKeyAction):
527 * khtml/html/html_elementimpl.h:
528 * khtml/html/html_formimpl.cpp:
529 (DOM::HTMLFormElementImpl::submitClick):
530 (DOM::HTMLButtonElementImpl::click):
531 (DOM::HTMLButtonElementImpl::accessKeyAction):
532 (DOM::HTMLInputElementImpl::click):
533 (DOM::HTMLInputElementImpl::accessKeyAction):
534 (DOM::HTMLInputElementImpl::defaultEventHandler):
535 (DOM::HTMLLabelElementImpl::accessKeyAction):
536 (DOM::HTMLSelectElementImpl::accessKeyAction):
537 (DOM::HTMLTextAreaElementImpl::accessKeyAction):
538 * khtml/html/html_formimpl.h:
539 * khtml/html/html_inlineimpl.cpp:
540 (HTMLAnchorElementImpl::defaultEventHandler):
541 (HTMLAnchorElementImpl::accessKeyAction):
542 * khtml/html/html_inlineimpl.h:
543 * khtml/rendering/render_form.cpp:
544 (RenderFileButton::click):
545 * khtml/rendering/render_form.h:
546 * khtml/xml/dom_docimpl.cpp:
547 (DocumentImpl::defaultEventHandler):
548 * khtml/xml/dom_elementimpl.h:
549 (DOM::ElementImpl::accessKeyAction):
551 (-[DOMHTMLInputElement click]):
555 * kwq/KWQFileButton.h:
556 * kwq/KWQFileButton.mm:
557 (KWQFileButton::click):
559 Add accessKeyAction parameter about whether to limit to HTMLElementImpl subclasses that JavaScript wants, or to apply to others as well.
561 Add click() parameter about whether to send the mousedown and mouseup events in addition to the click event.
563 * kwq/KWQAccObject.mm:
564 (-[KWQAccObject mouseButtonListener]):
565 Locate a mousedown, mouseup, or click handler in the current element and its ancestors.
567 (-[KWQAccObject actionElement]):
568 (-[KWQAccObject accessibilityIsIgnored]):
569 (-[KWQAccObject accessibilityPerformAction:]):
570 Consider mouseButtonListener.
572 2005-03-18 John Sullivan <sullivan@apple.com>
576 - fixed <rdar://problem/4002164> maps that include start and end
577 location don't print right from maps.google.com
579 I thought I checked this in yesterday but a ChangeLog conflict aborted my checkin
582 * khtml/rendering/render_style.cpp:
584 flag name changed from _should_correct_text_color to _force_backgrounds_to_white
586 * khtml/rendering/render_style.h:
587 (khtml::RenderStyle::InheritedFlags::operator==):
588 flag name changed from _should_correct_text_color to _force_backgrounds_to_white
589 (khtml::RenderStyle::setBitDefaults):
591 (khtml::RenderStyle::forceBackgroundsToWhite):
592 ditto, and method name changed too
593 (khtml::RenderStyle::setForceBackgroundsToWhite):
596 * khtml/rendering/render_text.cpp:
597 (InlineTextBox::paint):
598 updated for name change; also, compare text against white instead of current bg color
599 because we no longer actually modify the bg color (previously we would always set
600 the bg color to white, so the result is the same)
602 * khtml/xml/dom_docimpl.cpp:
603 (DocumentImpl::recalcStyle):
604 updated for name change
606 * kwq/WebCoreBridge.mm:
607 (-[WebCoreBridge styleSheetForPrinting]):
609 (-[WebCoreBridge reapplyStylesForDeviceType:]):
610 removed the code that called styleSheetForPrinting; we no longer use a stylesheet
613 * khtml/rendering/render_box.cpp:
614 (RenderBox::paintBackgroundExtended):
615 If forceBackgroundsToWhite flag is set, convert background images and
616 background colors to white background color with no background image.
618 2005-03-18 Ken Kocienda <kocienda@apple.com>
624 <rdar://problem/4056718> Pasting quotes the entire message
626 * khtml/editing/htmlediting.cpp:
627 (khtml::ReplaceSelectionCommand::doApply): After pasting, nodes are moved to the block containing
628 the end of the pasted content in certain cases. This move logic used to stop once it moved all the
629 siblings of the node following the last node of the pasted-in content. This means that block elements
630 could get moved, and if the pasted-in content included a mail blockquote, this could result in
631 one quote level getting added. The fix is to stop the move of nodes once a <br>, block element, or
632 <table> is seen. This only affected one of the many test cases we have for such scenarios, and
633 the change to that result makes sense given the code change.
634 * layout-tests/editing/pasteboard/paste-text-003-expected.txt: This test result changed in a way that
635 adequately tests the behavior change, so I did not add a new test.
637 2005-03-17 Ken Kocienda <kocienda@apple.com>
643 <rdar://problem/4051809> 8A413: Cursor-up in a mail message sometimes gets stuck (with specific reproducible case)
645 * khtml/rendering/render_text.cpp:
646 (RenderText::positionForCoordinates): Consider two lines: line-above and line-below. If the caret position in line-below
647 was at an x coordinate between half way through the x coordinate of the last character on the line-above and the
648 end of that same character, this bug would happen since the positioning code would assume that it could create a
649 VisiblePosition with a DOWNSTREAM affinity. Now, I check to see if the character position on the line-above is the
650 last character on that line, and if it is, I use UPSTREAM as the affinity.
654 2005-03-17 David Harrison <harrison@apple.com>
656 Reviewed by Darin, Ken.
658 * khtml/editing/htmlediting.cpp:
659 (khtml::EditCommandPtr::setEndingSelection):
660 Fixed typo so that it calls setEndingSelection rather than setStartingSelection.
661 Commented out this unused method, tho, since this is late in Tiger. Proved unused by successful build after temporarily removing method declaration or implemenation.
663 2005-03-16 Kevin Decker <kdecker@apple.com>
667 Fixed <rdar://problem/4046665> REGRESSION (403-405): mypage.apple.com login does not work (hits assertion in Development build)
669 * kwq/WebCoreBridge.mm:
670 (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): Check always came back false when callers would send a nil NSURL to this method. Now we allow the empty url cases, eg., <frame src="">
672 2005-03-16 Darin Adler <darin@apple.com>
676 - fixed <rdar://problem/4045203> REGRESSION (125-188): Redundant JS imports crash Safari
678 * khtml/html/htmltokenizer.h: Take inWRite bool out of NDEBUG ifdef.
679 * khtml/html/htmltokenizer.cpp:
680 (khtml::HTMLTokenizer::HTMLTokenizer): Take inWrite bool management code out of NDEBUG ifdef.
681 (khtml::HTMLTokenizer::write): Ditto. Don't call end if inWrite is true, since it will be called
682 when you return to the body of the outer write() call.
683 (khtml::HTMLTokenizer::allDataProcessed): Don't call end() if inWrite is true for the same reason.
684 (khtml::HTMLTokenizer::finish): Ditto.
686 * kwq/KWQWidget.mm: (QWidget::getOuterView): Removed bogus assertion that has been vexing us of late.
688 2005-03-16 David Harrison <harrison@apple.com>
690 Reviewed by me (written by Patti Yeh).
692 * kwq/KWQAccObject.mm:
693 (-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]):
694 Use LeftWordIfOnBoundary instead of RightWordIfOnBoundary.
696 (-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]):
697 Use RightWordIfOnBoundary instead of LeftWordIfOnBoundary.
699 2005-03-16 David Harrison <harrison@apple.com>
703 <rdar://problem/4054590> AX: Dictionary panel does not work when page is scrolled on Safari
705 * kwq/KWQAccObject.mm:
706 (-[KWQAccObject doAXTextMarkerForPosition:]):
707 Add in the view's contentsX and contentsY to the point.
709 2005-03-16 David Harrison <harrison@apple.com>
713 <rdar://problem/4048506> Deleting from beginning of editable div deletes other document elements
717 * khtml/editing/visible_units.h:
718 * khtml/editing/visible_units.cpp:
719 (khtml::startOfEditableContent):
720 (khtml::endOfEditableContent):
721 (khtml::inSameEditableContent):
722 (khtml::isStartOfEditableContent):
723 (khtml::isEndOfEditableContent):
726 * kwq/WebCoreBridge.h:
727 * kwq/WebCoreBridge.mm:
728 (-[WebCoreBridge canDeleteRange:]):
731 2005-03-16 Ken Kocienda <kocienda@apple.com>
737 <rdar://problem/4042935> undo doesn't work properly during inline input
739 * kwq/WebCoreBridge.h: Declare new method below.
740 * kwq/WebCoreBridge.mm:
741 (-[WebCoreBridge replaceMarkedTextWithText:]): New method. Wraps calls to TypingCommand::deleteKeyPressed and
742 TypingCommand::insertText to map the way that international text input works onto the typing undo system.
744 2005-03-16 David Harrison <harrison@apple.com>
748 <rdar://problem/4044336> REGRESSION (8A398-8A409): Option-Delete also deletes space to left of deleted word
750 * khtml/editing/htmlediting.cpp:
751 (khtml::DeleteSelectionCommand::initializePositionData):
752 - skip smart delete if the selection to delete already starts or ends with whitespace
754 * khtml/khtml_part.cpp:
755 (KHTMLPart::handleMousePressEventDoubleClick):
756 - preserve selection on double-click when range is already selected
758 * khtml/xml/dom_position.cpp:
759 (DOM::Position::leadingWhitespacePosition):
760 (DOM::Position::trailingWhitespacePosition):
761 - fix considerNonCollapsibleWhitespace action (logic was reversed)
762 - add non-breaking space to the non-collapsable ones
764 * kwq/WebCoreBridge.mm:
765 (-[WebCoreBridge rangeByExpandingSelectionWithGranularity:]):
766 (-[WebCoreBridge rangeByAlteringCurrentSelection:direction:granularity:]):
767 - these methods do not set the selection, so remove calls to setSelectionGranularity
769 (-[WebCoreBridge alterCurrentSelection:direction:granularity:]):
770 (-[WebCoreBridge alterCurrentSelection:verticalDistance:]):
771 - set the granularity back to character
772 - the one exception is that we need to keep word granularity
773 to preserve smart delete behavior when extending by word
775 2005-03-15 Maciej Stachowiak <mjs@apple.com>
779 <rdar://problem/4053266> Pressing return a few times right after a link makes the new blank lines part of the link
781 * khtml/editing/htmlediting.cpp:
782 (khtml::InsertLineBreakCommand::doApply): Use
783 positionOutsideContainingSpecialElement in the right two places.
784 (khtml::InsertParagraphSeparatorCommand::doApply): Ditto.
786 - move all these helper functions higher in the file
788 * khtml/editing/htmlediting.cpp:
789 (khtml::isSpecialElement):
790 (khtml::isFirstVisiblePositionInSpecialElement):
791 (khtml::positionBeforeNode):
792 (khtml::positionBeforeContainingSpecialElement):
793 (khtml::maxRangeOffset):
794 (khtml::isLastVisiblePositionInSpecialElement):
795 (khtml::positionAfterNode):
796 (khtml::positionAfterContainingSpecialElement):
797 (khtml::positionOutsideContainingSpecialElement):
799 2005-03-14 Maciej Stachowiak <mjs@apple.com>
803 <rdar://problem/4049925> Pasting right after a link makes pasted content part of the link (without visible style change)
805 * khtml/editing/htmlediting.cpp:
806 (khtml::positionOutsideContainingSpecialElement): made a helper
807 function that computes a position outside the outermost containing
808 special element if the passed in position is right at the start or
810 (khtml::InsertTextCommand::prepareForTextInsertion): use new helper here
811 (khtml::ReplaceSelectionCommand::doApply): use it here too: this is the fix
812 (khtml::positionBeforeNode): made static
813 (khtml::positionBeforeContainingSpecialElement): made static
814 (khtml::positionAfterNode): made static
815 (khtml::positionAfterContainingSpecialElement): made static
817 2005-03-15 Richard Williamson <rjw@apple.com>
819 Fixed <rdar://problem/4053658> Crash getting direction at maps.google.com
821 Add non nil style() check.
823 Reviewed by Dave Harrison.
825 * khtml/rendering/render_table.cpp:
826 (RenderTableCell::collapsedRightBorder):
828 2005-03-15 Kevin Decker <kdecker@apple.com>
832 Fixed: <rdar://problem/4041374> REGRESSION (185-186): unload handlers (at least those added with addEventListener) are broken
834 The reason why UNLOAD_EVENT wouldn't dispatch was because the code would delete all event listeners at the detach() phase which is prior to closeURL().
836 This fixes a recent regression from:
838 <rdar://problem/3977973> pages on ebay leak referenced JavaScript objects -- over time browsing becomes super-slow
840 * khtml/khtml_part.cpp:
841 (KHTMLPart::closeURL): After dispatching event handlers, go ahead and remove them from the DOM.
842 * khtml/xml/dom_docimpl.cpp:
843 (DocumentImpl::detach): Took out the call to removeAllEventListenersFromAllNodes(). If we remove all event listeners here then when KHTMLPart::closeURL() checks for even listeners, it will never have any because they'll already be gone.
845 2005-03-15 Ken Kocienda <kocienda@apple.com>
851 <rdar://problem/4052642> Each delete keystroke is in its own undo group; not included in undo group with other typing
853 Calling -[WebCore setSelectedDOMRange:range affinity:] had the result of "closing" any active set of typing
854 keystrokes grouped together in a single undo operation. A change on 27 Jan in WebKit to change the way delete
855 keystrokes are handled made this feature regress. Previous to that change, the backwards delete
856 key went through separate code that is no longer in the tree that did not set the selection in the way
859 The solution is to add an extra argument to the set-selection call. The WebCoreBridge now offers this method:
860 -[WebCore setSelectedDOMRange:range affinity:closeTyping:]. Now, callers must indicate whether setting the
861 selection will act to close typing or not.
863 * kwq/WebCoreBridge.h: Changed header accordingly to change method shown below.
864 * kwq/WebCoreBridge.mm:
865 (-[WebCoreBridge setSelectedDOMRange:affinity:closeTyping:]): Added closeTyping argument to this method.
867 2005-03-15 John Sullivan <sullivan@apple.com>
871 - fixed <rdar://problem/4052246> crash in KWQKHTMLPart::createPart() trying to display local file in frame
873 * kwq/KWQKHTMLPart.mm:
874 (KWQKHTMLPart::createPart):
875 Check part for nil before trying to ref. This was probably a longstanding code flaw revealed by
876 the recent security fix.
878 2005-03-15 Kevin Decker <kdecker@apple.com>
880 Reviewed by Ken and Maciej.
882 New fix for <rdar://problem/3667701> crash in KHTMLPart::jScriptEnabled()
884 The tokenizer has buffers which mean parsing can continue even after loading is supposed to be stopped. If the loading process was aborted, the tokenizer should abort, too.
886 * khtml/html/htmltokenizer.cpp:
887 (khtml::HTMLTokenizer::HTMLTokenizer): Initialize loadStopped to false.
888 (khtml::HTMLTokenizer::write): Go ahead and bail out if loadStopped is true.
889 (khtml::HTMLTokenizer::processToken):
890 * khtml/html/htmltokenizer.h: Added loadStopped flag. Changed the view pointer from a standard pointer to a QGuardedPtr. This fixes the crash. Now the tokenizer's handle to the view will now automatically nil-out and never dangle.
891 * khtml/khtml_part.cpp:
892 (KHTMLPart::closeURL): Notify the tokenizer to stop parsing.
893 * khtml/xml/xml_tokenizer.cpp:
894 (khtml::XMLTokenizer::XMLTokenizer): Initialize loadStopped to false.
895 * khtml/xml/xml_tokenizer.h:
896 (khtml::Tokenizer::stopParsing): Added.
898 2005-03-14 David Harrison <harrison@apple.com>
900 Reviewed by Darin, Maciej.
902 <rdar://problem/4046103> REGRESSION (Mail): clicking after style change sets insertion point incorrectly
904 Also fixes crash by adding nil check.
906 * khtml/editing/htmlediting.cpp:
907 (khtml::MoveSelectionCommand::doApply):
908 Check the node for nil.
910 * khtml/khtml_part.cpp:
911 (KHTMLPart::khtmlMouseReleaseEvent):
912 Use the node from the event rather than from the selection.
914 2005-03-14 Darin Adler <darin@apple.com>
916 Reviewed by Harrison.
918 - fixed <rdar://problem/4049776> Seed: Mail: Disable spellcheck leaves red artifacts
920 * khtml/xml/dom_docimpl.cpp:
921 (DocumentImpl::DocumentImpl): Set markers list to be "auto-delete" so they don't all leak.
922 (DocumentImpl::removeMarker): Remove markers list for a node when the last marker is removed
923 for that node. Otherwise, we can have empty marker lists for each node forever until the
925 (DocumentImpl::removeAllMarkers): Added code to dirty the markers.
926 (DocumentImpl::shiftMarkers): Remove unneeded empty check.
928 * kwq/WebCoreBridge.h: Added unmarkAllMisspellings for WebKit.
929 * kwq/WebCoreBridge.mm: (-[WebCoreBridge unmarkAllMisspellings]): Added. Calls removeAllMarkers.
931 2005-03-14 Richard Williamson <rjw@apple.com>
933 Fixed <rdar://problem/4027928> Tiger_8A394:Acrobat crashes while tried to remove the subscription errors by clicking on "Would you like to remove the subscription" from Tracker details view pane
935 A document may be deleted as a consequence of handling an event,
936 as was the case with Acrobat.app. Ensure that the document is still valid
937 before passing the event on for further handling.
939 * khtml/xml/dom_nodeimpl.cpp:
940 (NodeImpl::dispatchUIEvent):
942 2005-03-14 Ken Kocienda <kocienda@apple.com>
946 Added a couple of comments about setChanged() to this code based on my experiences with 4047028.
948 * khtml/css/css_valueimpl.cpp:
949 (DOM::CSSMutableStyleDeclarationImpl::addParsedProperties)
950 (DOM::CSSMutableStyleDeclarationImpl::merge)
952 2005-03-14 Ken Kocienda <kocienda@apple.com>
958 <rdar://problem/4047028> Changing quote levels on stylized text causes it to be sent as colored (Blue). Tiger8A410
960 * khtml/css/css_valueimpl.cpp:
961 (DOM::CSSMutableStyleDeclarationImpl::removePropertiesInSet): This function now calls setChanged() at the
962 end of its loop if any properties were removed. This makes the style system update correctly in response
963 to changes made by this function. The code to paste removes style from the pasted content in a
964 preliminary step, and the fact that the style system did not update properly left unwanted color
965 declarations in the document.
967 2005-03-14 Vicki Murley <vicki@apple.com>
969 - roll out this change for now, since it was denied by CCC
971 2005-03-11 David Harrison <harrison@apple.com>
975 <rdar://problem/4046602> WebCore invokes undefined behavior when the spell checker isn't running
977 * kwq/KWQKHTMLPart.mm:
978 (KWQKHTMLPart::advanceToNextMisspelling):
979 (KWQKHTMLPart::markMisspellings):
982 2005-03-14 Ken Kocienda <kocienda@apple.com>
988 <rdar://problem/4050403> Mail crashes after pasting and deleting the content of one Excel cell
990 * khtml/editing/htmlediting.cpp:
991 (khtml::DeleteSelectionCommand::handleGeneralDelete): Add some null checks to the code. This fixes the crash, although
992 following the steps described in the bug by John Sullivan on 3/14/05 at 10:49 AM will leave us with a "blank line" in
993 the document that cannot be removed (this is actually an empty table). This is undesirable, however, work Maciej is
994 doing to fix the general-case problem of trying to edit constructs we do not handle well in editing should fix this
995 particular case, making the deletion of this "blank line" possible. Maciej is doing this work as part of this bug:
996 <rdar://problem/4036051> Hard to select (and thus delete) an IFRAME in an editable WebView
998 2005-03-14 Ken Kocienda <kocienda@apple.com>
1004 <rdar://problem/4029632> Mail crashes in DOM::NodeImpl::isBlockFlow() after pasting text with alignment style and BR element from Safari
1006 The problem is that removeInlineStyle() can remove nodes, and if either the start or end node of the
1007 selection at the time of the call to removeInlineStyle() was in a node that got removed, bad things
1008 would happen. The fix is described below.
1010 * khtml/editing/htmlediting.cpp:
1011 (khtml::maxRangeOffset): Moved this static function to a different place in the file so the code below can use it.
1012 (khtml::ApplyStyleCommand::applyInlineStyle): Calling removeInlineStyle() now has the side effect of
1013 setting the command's ending selection. Now resets start and end using the ending selection after the call to
1014 removeInlineStyle() as it is done elsewhere in this function.
1015 (khtml::ApplyStyleCommand::removeInlineStyle): Track the removal of the start or end node based on
1016 the positions passed in. If either the start or the end node is removed as part of style removal,
1017 set an appropriate replacement start or end that is still in the document.
1021 2005-03-14 Ken Kocienda <kocienda@apple.com>
1025 I need to roll out Kevin's change to fix 3667701. It breaks contextual fragments, and hence breaks
1026 paste in editing (among other things).
1028 * khtml/html/htmltokenizer.cpp: Roll out recent change.
1029 (khtml::HTMLTokenizer::write)
1030 * khtml/html/htmltokenizer.h: Ditto.
1032 2005-03-13 Darin Adler <darin@apple.com>
1034 Reviewed by Ken and Maciej.
1036 - fixed <rdar://problem/4049040> REGRESSION (403-405): security check prevents user stylesheet from loading (Dictionary.app doesn't work at all!)
1038 * kwq/WebCoreBridge.mm: (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): Changed to give "applewebdata:"
1039 documents the same privileges to open local files that "file:" documents have.
1041 2005-03-13 Kevin Decker <kdecker@apple.com>
1045 Fixed: <rdar://problem/3667701> crash in KHTMLPart::jScriptEnabled()
1047 The problem here was that the tokenizer would continue to receive chunks of data from the loader already
1048 after the view and part had been destroyed. Situations like this could arise when clicking on another link
1049 while still loading the current view, or during self test where we rapidly open, load, and close browser
1052 * khtml/html/htmltokenizer.cpp:
1053 (khtml::HTMLTokenizer::write): Simple nil check against the view.
1054 * khtml/html/htmltokenizer.h: Changed the view pointer from a standard pointer to a QGuardedPtr. The tokenizer's
1055 handle to the view will now automatically nil-out and never dangle.
1057 2005-03-13 Darin Adler <darin@apple.com>
1059 Reviewed by John and Ken.
1061 - fixed <rdar://problem/4044347> REGRESSION (Mail): Control-K in particular message moves insertion point to previous line
1063 Tweaked the deleting code, and added three new deleting layout tests to confirm the new code works.
1065 * khtml/editing/htmlediting.cpp:
1066 (khtml::DeleteSelectionCommand::handleSpecialCaseBRDelete): Removed special case with comment that said it was
1067 for the case where a "selection contains only a BR right after a block ended". This code was being triggered in
1068 more cases than just that one, and in all the cases I tested, the general delete code works fine.
1069 (khtml::DeleteSelectionCommand::handleGeneralDelete): Changed the code that decides whether to delete an entire
1070 block to understand the case where the end block is outside the start block, but contains the start block.
1071 In that case, we want to delete the entire block. Not deleting the block was causing us to delete just the <br>,
1072 and not the enclosing <div> in the case in the bug.
1074 * layout-tests/editing/deleting/delete-line-015-expected.txt: Added.
1075 * layout-tests/editing/deleting/delete-line-015.html: Added.
1076 * layout-tests/editing/deleting/delete-line-016-expected.txt: Added.
1077 * layout-tests/editing/deleting/delete-line-016.html: Added.
1078 * layout-tests/editing/deleting/delete-line-017-expected.txt: Added.
1079 * layout-tests/editing/deleting/delete-line-017.html: Added.
1080 * layout-tests/editing/style/smoosh-styles-002-expected.txt: Updated to improved results. With the code change, the deletion
1081 now deletes more than it used to. The old results had an empty text node and <h1> element that were both 0-sized, and now
1082 we delete both of those.
1084 2005-03-13 Darin Adler <darin@apple.com>
1086 - fixed <rdar://problem/4049172> REGRESSION (403-405): Gmail: text box in "Invite a friend" section overlaps other sections
1088 Rolled out fix for <rdar://problem/3952698> Function buttons do not display properly with Telia Webmail
1090 * khtml/rendering/render_replaced.cpp: (RenderReplaced::calcMinMaxWidth): Back to previous version of this file.
1092 2005-03-12 Maciej Stachowiak <mjs@apple.com>
1096 <rdar://problem/4046144> RSS pages leave a hole in local file security policy (need to revert feed: exemption)
1098 * kwq/WebCoreBridge.mm:
1099 (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): Revert
1100 emergency workaround for Safari RSS, now that a new Syndication
1103 2005-03-11 Maciej Stachowiak <mjs@apple.com>
1107 <rdar://problem/4026787> text typed after a link (pasted or Mail Link to this Page) is part of the link, underlined and colored blue
1109 The concept of this change is every time you type at the very
1110 start or very end of a link (even if nested in further inner
1111 elements), the typed text goes outside the link instead of inside.
1113 * khtml/editing/htmlediting.cpp:
1114 (khtml::InsertTextCommand::prepareForTextInsertion): Check whether
1115 we are at the first visible position or last visible position of a
1116 special element. For now this only includes HTML A elements that
1117 are links (i.e. they have an href).
1118 (khtml::isSpecialElement): Helper function that identifies special
1119 elements (for now only links).
1120 (khtml::isFirstVisiblePositionInSpecialElement): Checks if a given DOM
1121 position is equivalent to the first visible position in some containing
1122 editable special element.
1123 (khtml::positionBeforeNode): Returns the DOM position immediately
1125 (khtml::positionBeforeContainingSpecialElement): Gives a DOM
1126 position immediately before the outermost editable containing
1127 special element where the passed-in position is equivalent to the
1128 first visible position.
1129 (khtml::maxRangeOffset): Helper to get the maximum allowed
1130 range/position offset for a node, does the right thing based on
1131 whether the node would use a character offset or child offset.
1132 (khtml::isLastVisiblePositionInSpecialElement): Similar to above,
1133 but for end of node instead of start.
1134 (khtml::positionAfterNode): Ditto.
1135 (khtml::positionAfterContainingSpecialElement): Ditto.
1137 Some layout tests changed - I looked over all the diffs and found
1138 that the only changes were "junk nodes" like empty spans and text
1139 nodes moving from one spot in the tree to another. These changes
1140 are all harmless and do not affect layout or future editing.
1142 * layout-tests/editing/inserting/typing-003-expected.txt:
1143 * layout-tests/editing/style/remove-underline-across-paragraph-expected.txt:
1144 * layout-tests/editing/style/remove-underline-across-paragraph-in-bold-expected.txt:
1145 * layout-tests/editing/style/remove-underline-after-paragraph-expected.txt:
1146 * layout-tests/editing/style/remove-underline-after-paragraph-in-bold-expected.txt:
1147 * layout-tests/editing/style/remove-underline-expected.txt:
1148 * layout-tests/editing/style/remove-underline-from-stylesheet-expected.txt:
1149 * layout-tests/editing/style/remove-underline-in-bold-expected.txt:
1150 * layout-tests/editing/style/typing-style-003-expected.txt:
1151 * layout-tests/editing/style/unbold-in-bold-expected.txt:
1152 * layout-tests/editing/style/underline-expected.txt:
1154 2005-03-11 Adele Amchan <adele@apple.com>
1156 backing out fix for <rdar://problem/4021711> REGRESSION (125-188): blank pages when browsing forum at cooperativeresearch.org - cached external script problem
1158 This caused the following regressions (that we know of):
1159 <rdar://problem/4047445> REGRESSION (Safari-400-403?): Some or all page contents sometimes don't appear (macworld.com)
1160 <rdar://problem/4046153> 8a409: Problem loading Citibank page in Safari 2 (403)
1161 <rdar://problem/4047801> REGRESSION (402-403): .Mac homepage links don't work
1163 * khtml/html/htmltokenizer.cpp:
1164 (khtml::HTMLTokenizer::scriptHandler):
1166 2005-03-11 David Harrison <harrison@apple.com>
1170 <rdar://problem/4046602> WebCore invokes undefined behavior when the spell checker isn't running
1172 * kwq/KWQKHTMLPart.mm:
1173 (KWQKHTMLPart::advanceToNextMisspelling):
1174 (KWQKHTMLPart::markMisspellings):
1177 2005-03-11 Ken Kocienda <kocienda@apple.com>
1181 * ForwardingHeaders/editing/visible_units.h: Added.
1183 2005-03-11 Ken Kocienda <kocienda@apple.com>
1189 <rdar://problem/4045521> Hitting return key with full line selected does not add blank line as it should
1191 * khtml/editing/htmlediting.cpp:
1192 (khtml::InsertParagraphSeparatorCommand::doApply): Removed some "special-case" code from this
1193 function that would look for a selection that started and ended in a different block, and would
1194 then bail right after the deletion of the selection without inserting a paragraph separator.
1195 This was just wrong. So, the code change is removal only. When the general-case code runs instead
1196 of the erroneous special-case code, the bug goes away.
1200 * layout-tests/editing/inserting/return-key-with-selection-001-expected.txt: Added.
1201 * layout-tests/editing/inserting/return-key-with-selection-001.html: Added.
1202 * layout-tests/editing/inserting/return-key-with-selection-002-expected.txt: Added.
1203 * layout-tests/editing/inserting/return-key-with-selection-002.html: Added.
1204 * layout-tests/editing/inserting/return-key-with-selection-003-expected.txt: Added.
1205 * layout-tests/editing/inserting/return-key-with-selection-003.html: Added.
1207 2005-03-11 David Harrison <harrison@apple.com>
1211 <rdar://problem/4009446> AX: kAXTextMarkerForPositionParameterizedAttribute not working correctly (required for Dictionary pop-up)
1213 * kwq/KWQAccObject.mm:
1214 (-[KWQAccObject accessibilityAttributeValue:]):
1217 (-[KWQAccObject doAXTextMarkerForPosition:]):
1220 (-[KWQAccObject doAXBoundsForTextMarkerRange:]):
1221 Use the selection's document instead of the top document, to accommodate frames, etc.
1223 (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
1224 Fixed parameter processing to look for NSValue instead of AXValue.
1226 2005-03-11 Ken Kocienda <kocienda@apple.com>
1228 Reviewed by Harrison
1232 <rdar://problem/3972665> 8A360: HTML message partially truncated on left hand side, text-indent from Script Editor
1234 This was fixed, then regressed with Harrison's fix for this bug:
1236 <rdar://problem/3948453> Can't type accented chars as first character in Stickies widget
1238 * khtml/editing/htmlediting.cpp:
1239 (khtml::ReplaceSelectionCommand::doApply): My now addresses both problems in a way that they no longer
1242 2005-03-10 Ken Kocienda <kocienda@apple.com>
1248 <rdar://problem/4045511> Copying and pasting end-of-paragraph selection puts insertion point in wrong place
1249 <rdar://problem/4045513> Copying and pasting selection starting at end of paragraph can incorrectly remove line break
1251 The copy/paste code before this patch had no notion of a "logical newline" at the start of the selection. We have
1252 had a similar notion for "logical newline" at the end of the selection for quite some time. To fix these bugs, we
1253 need to introduce the same idea for selection starts.
1255 * khtml/editing/htmlediting.cpp:
1256 (khtml::ReplacementFragment::ReplacementFragment): Process the "logical newline" at start as we write it out
1257 in markup. Set the bit we added to this object to signify we have such a newline.
1258 (khtml::ReplaceSelectionCommand::doApply): Many, many changes to introduce the new "logical newline" at start concept.
1259 I also tried to simply the code that sets the start position for inserting content to be pasted. I also improved a
1260 weakness in the smart-paste code. Now, we check before and after the paste for whether we need to add a leading or
1261 trailing space. The code previous to this patch only did a "before" check, with the result that we sometimes added
1262 a second space. In other words, the code did not realize that DOM changes done by pasting could cause formerly
1263 unrendered whitespace to become rendered. Also moved line placeholder clean up code to its own function.
1264 (khtml::ReplaceSelectionCommand::removeLinePlaceholderIfNeeded): New helper that further refines the notion
1265 of when we can remove a line placeholder. The definition is now, "If a line placeholder is at the visible start
1266 and visible end of its line, keep it; otherwise remove it".
1267 * khtml/editing/htmlediting.h: Declare new functions. Rework inlines in ReplacementFragment class to account for
1268 addition of new "logical newline" at start concept.
1269 (khtml::ReplacementFragment::hasInterchangeNewlineAtStart): New accessor.
1270 (khtml::ReplacementFragment::hasInterchangeNewlineAtEnd): Renamed from hasInterchangeNewline(), since before we
1271 only had a bit for the end, hence we did not need to distinguish it from the start.
1272 * khtml/editing/markup.cpp:
1273 (khtml::createMarkup): Added code to detect and write out markup for cases where we have a "logical newline" at start.
1274 * khtml/xml/dom2_rangeimpl.cpp:
1275 (DOM::RangeImpl::startPosition): New helper.
1276 (DOM::RangeImpl::endPosition): Ditto.
1277 * khtml/xml/dom2_rangeimpl.h: Declare new helpers.
1280 * layout-tests/editing/pasteboard/paste-line-endings-001-expected.txt: Added.
1281 * layout-tests/editing/pasteboard/paste-line-endings-001.html: Added.
1282 * layout-tests/editing/pasteboard/paste-line-endings-002-expected.txt: Added.
1283 * layout-tests/editing/pasteboard/paste-line-endings-002.html: Added.
1284 * layout-tests/editing/pasteboard/paste-line-endings-003-expected.txt: Added.
1285 * layout-tests/editing/pasteboard/paste-line-endings-003.html: Added.
1286 * layout-tests/editing/pasteboard/paste-line-endings-004-expected.txt: Added.
1287 * layout-tests/editing/pasteboard/paste-line-endings-004.html: Added.
1288 * layout-tests/editing/pasteboard/paste-line-endings-005-expected.txt: Added.
1289 * layout-tests/editing/pasteboard/paste-line-endings-005.html: Added.
1290 * layout-tests/editing/pasteboard/paste-line-endings-006-expected.txt: Added.
1291 * layout-tests/editing/pasteboard/paste-line-endings-006.html: Added.
1292 * layout-tests/editing/pasteboard/paste-line-endings-007-expected.txt: Added.
1293 * layout-tests/editing/pasteboard/paste-line-endings-007.html: Added.
1294 * layout-tests/editing/pasteboard/paste-line-endings-008-expected.txt: Added.
1295 * layout-tests/editing/pasteboard/paste-line-endings-008.html: Added.
1296 * layout-tests/editing/pasteboard/paste-line-endings-009-expected.txt: Added.
1297 * layout-tests/editing/pasteboard/paste-line-endings-009.html: Added.
1298 * layout-tests/editing/pasteboard/paste-line-endings-010-expected.txt: Added.
1299 * layout-tests/editing/pasteboard/paste-line-endings-010.html: Added.
1303 2005-03-10 Darin Adler <darin@apple.com>
1305 Reviewed by Richard.
1307 - fixed <rdar://problem/4037700> Every character typed causes stat call for /usr/share/icu/icudt32b_char.brk
1309 * khtml/rendering/render_text.cpp: (getCharacterBreakIterator): Set boolean "got iterator" to true.
1311 2005-03-10 Darin Adler <darin@apple.com>
1315 - fixed <rdar://problem/4042867> "Bigger" changes the font size of too much text when the selection is on a style-change boundary
1317 * khtml/editing/htmlediting.cpp: (khtml::ApplyStyleCommand::applyRelativeFontStyleChange):
1318 Advance out of the starting text node if we're at the end of it.
1320 2005-03-10 Darin Adler <darin@apple.com>
1322 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::write): Fixed assertion for nested calls to write.
1324 2005-03-10 David Harrison <harrison@apple.com>
1328 <rdar://problem/4032346> REGRESSION (Mail): changing 1st line of a URL that wraps to two lines doesn't always update 2nd line
1330 * khtml/rendering/bidi.cpp:
1331 (khtml::RenderBlock::matchedEndLine):
1332 Look at first clean line in case line wrap implicitly dirtied it.
1334 2005-03-10 Maciej Stachowiak <mjs@apple.com>
1338 <rdar://problem/4046018> REGRESSION (TOT): RSS pages don't display anything
1340 * kwq/WebCoreBridge.mm:
1341 (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): Exempt
1342 feed: and feeds: pages from the local file security check.
1344 2005-03-10 Darin Adler <darin@apple.com>
1346 Change written by Steve Peters, reviewed by me.
1348 - fixed <rdar://problem/4045924> improve compareBoundaryPoints to make style changes faster
1350 * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::compareBoundaryPoints):
1351 Do early outs in a couple of the loops to make things faster.
1353 2005-03-10 Jens Alfke <jens@apple.com>
1357 Fixes <rdar://problem/4040848> "REGR: Sun security-check demo applet does not load". My earlier fix for 3603191 deferred loading the applet until the </applet> tag is reached, so all <param>s will be available. Unfortunately that meant that if the </applet> tag was missing, the applet would never load at all. So instead, the loading needs to happen when the ID_APPLET tag is popped from the parser stack for any reason.
1359 I've restored the old NodeImpl::closeRenderer() method. Except it's now virtual, with a no-op base implementation, and is overridden by HTMLAppletElementImpl, replacing its setAllParamsAvailable method that I added a few weeks ago when fixing 3603191.
1361 This ensures that the applet will get loaded even if there is no explicit </applet> tag.
1363 The changes to htmlparser.cpp back out my earlier change and restore the lines that were deleted on 8/3/04 when the old closeRenderer was removed.
1365 * khtml/html/html_objectimpl.cpp:
1366 (HTMLAppletElementImpl::closeRenderer):
1367 * khtml/html/html_objectimpl.h:
1368 * khtml/html/htmlparser.cpp:
1369 (KHTMLParser::insertNode):
1370 (KHTMLParser::processCloseTag):
1371 (KHTMLParser::popOneBlock):
1372 * khtml/xml/dom_nodeimpl.h:
1373 (DOM::NodeImpl::closeRenderer):
1375 2005-03-10 Ken Kocienda <kocienda@apple.com>
1381 <rdar://problem/4024929> REGRESSION (Mail): Pasting text with multiple reply levels removes one level instead of all
1383 The code to figure out which node to use to merge into an existing line did not drill into the first inline element
1384 as needed to make the feature work as user expect. Instead, it looked at the first node, and if it was a block, it
1385 skipped that node. This worked for some cases (including the important "paste-as-quotation" case) but obviously
1386 doesn't work for content quoted more than once.
1388 Now, mergeStartNode() will look for the first node in pasted content that is not a block. It will now also look
1389 for nodes specially marked by Mail as a node added to make "Paste As Quotation" work. It won't skip those.
1391 NOTE: This change will break Mail's "Paste As Quotation" feature for TOT WebKit users, but this is only a temporary
1392 problem that will exist until we sync up with Mail's pending change to mark nodes as needed in its pasteAsQuotation:
1395 * khtml/editing/html_interchange.h: Add ApplePasteAsQuotation constant used to check for "marked" blockquotes.
1396 * khtml/editing/htmlediting.cpp:
1397 (khtml::ReplacementFragment::mergeStartNode): Look for first node that is either not a block or is marked as
1398 an ApplePasteAsQuotation node.
1399 (khtml::isMailPasteAsQuotationNode): New helper that looks for nodes marked with ApplePasteAsQuotation.
1400 * khtml/editing/htmlediting.h: Updated header for new function.
1402 This test result changed is an acceptable way.
1404 * layout-tests/editing/pasteboard/paste-text-013-expected.txt
1405 * layout-tests/editing/pasteboard/paste-text-013.html
1407 NOTE: This change causes a regression in this layout test:
1409 * layout-tests/editing/pasteboard/paste-text-013.html
1411 This problem will need to be fixed separately, and this bug has been filed to track this problem:
1412 <rdar://problem/4045513> Copying and pasting selection starting at end of paragraph can incorrectly remove line break
1414 2005-03-09 Maciej Stachowiak <mjs@apple.com>
1416 Reviewed by Richard.
1418 <rdar://problem/4040776> Dashboard (Weather widget) is a memory hog
1420 Change things around so the event listeners for XMLHttpRequest
1421 mark their JS listener objects instead of holding a hard
1422 reference, to avoid an unbreakable reference cycle.
1424 * khtml/ecma/kjs_events.cpp:
1425 (JSAbstractEventListener::JSAbstractEventListener):
1426 (JSAbstractEventListener::~JSAbstractEventListener):
1427 (JSAbstractEventListener::handleEvent):
1428 (JSAbstractEventListener::eventListenerType):
1429 (JSUnprotectedEventListener::JSUnprotectedEventListener):
1430 (JSUnprotectedEventListener::~JSUnprotectedEventListener):
1431 (JSUnprotectedEventListener::listenerObj):
1432 (JSUnprotectedEventListener::windowObj):
1433 (JSUnprotectedEventListener::mark):
1434 (JSEventListener::JSEventListener):
1435 (JSEventListener::~JSEventListener):
1436 (JSEventListener::listenerObj):
1437 (JSEventListener::windowObj):
1438 (JSLazyEventListener::JSLazyEventListener):
1439 * khtml/ecma/kjs_events.h:
1440 * khtml/ecma/kjs_html.h:
1441 * khtml/ecma/kjs_window.cpp:
1442 (Window::getJSEventListener):
1443 (Window::getJSUnprotectedEventListener):
1444 * khtml/ecma/kjs_window.h:
1445 * khtml/ecma/xmlhttprequest.cpp:
1446 (KJS::XMLHttpRequest::putValue):
1447 (KJS::XMLHttpRequest::mark):
1448 * khtml/ecma/xmlhttprequest.h:
1449 * khtml/khtml_part.h:
1451 2005-03-06 Maciej Stachowiak <mjs@apple.com>
1455 <rdar://problem/4005575> Arbitrary file disclosure vulnerability due to ability to load local html from remote content
1457 * khtml/ecma/kjs_html.cpp:
1458 (KJS::HTMLDocument::putValue):
1459 * khtml/ecma/kjs_window.cpp:
1461 (WindowFunc::tryCall):
1463 (LocationFunc::tryCall):
1464 * khtml/khtml_part.cpp:
1466 (KHTMLPart::scheduleLocationChange):
1467 (KHTMLPart::slotRedirect):
1468 (KHTMLPart::processObjectRequest):
1469 * khtml/khtml_part.h:
1470 * khtml/khtmlpart_p.h:
1471 * kwq/KWQKHTMLPart.mm:
1472 (KWQKHTMLPart::openURLRequest):
1473 (KWQKHTMLPart::urlSelected):
1474 (KWQKHTMLPart::createPart):
1475 * kwq/KWQKHTMLPartBrowserExtension.mm:
1476 (KHTMLPartBrowserExtension::createNewWindow):
1477 * kwq/WebCoreBridge.h:
1478 * kwq/WebCoreBridge.mm:
1479 (hasCaseInsensitivePrefix):
1480 (-[WebCoreBridge didNotOpenURL:pageCache:]):
1481 (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]):
1483 2005-03-09 Richard Williamson <rjw@apple.com>
1485 Fixed <rdar://problem/4032938> Safari: text layout for MS P Gothic font is corrupted
1487 Remove our hacked special case now we have our own cache of
1488 which fonts are fixed pitch.
1493 (QFont::isFixedPitch):
1495 2005-03-09 David Harrison <harrison@apple.com>
1499 <rdar://problem/4037141> REGRESSION (Mail): Pasting deletes preceding blank lines with certain steps
1501 * khtml/editing/htmlediting.cpp:
1502 (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent):
1503 Add check for anonymous text after blocks.
1505 2005-03-08 Ken Kocienda <kocienda@apple.com>
1511 <rdar://problem/4039661> crash in ApplyStyleCommand::applyBlockStyle pasting contents of webpage into Mail or Blot
1512 <rdar://problem/4039672> hang in moveParagraphContentsToNewBlockIfNecessary after pasting contents of webpage into Blot
1514 * khtml/editing/htmlediting.cpp:
1515 (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Fix for 4039672. Iteration needs to do
1516 a traverseNextSibling(), not a traverseNextNode(). The latter might iterate into a child that already got moved, and
1517 the code can infinite loop as a result.
1518 (khtml::ApplyStyleCommand::applyBlockStyle): Fix for 4039661. This function iterates over a set of nodes to apply
1519 block styles. Before, the iteration would go from the start to the end of the selection, and apply block styles
1520 as it went. However, the act of applying style could confuse the iteration. Now I iterate and store the relevant
1521 nodes in QPtrList before doing any style manipulation, and then iterate that set of nodes.
1523 2005-03-08 Darin Adler <darin@apple.com>
1525 Change written by Hyatt, reviewed by me.
1527 - fixed <rdar://problem/3952698> Function buttons do not display properly with Telia Webmail
1529 * khtml/rendering/render_replaced.cpp: (RenderReplaced::calcMinMaxWidth):
1530 Only use a minWidth of 0 for images with a percentage value. Other replaced elements aren't scalable
1531 so their minWidth should be their calculated width. This has been wrong all along, but it's a relatively
1532 safe change because it only affects replaced elements' min-width.
1534 2005-03-08 David Harrison <harrison@apple.com>
1538 <rdar://problem/4039006> REGRESSION (Mail): Command-left-arrow goes to the start of the wrong line in particular message
1540 * khtml/editing/visible_units.cpp:
1541 (khtml::startOfLine):
1542 Use firstLeafChild() instead of firstChild().
1544 2005-03-08 Richard Williamson <rjw@apple.com>
1546 Fixed by Tom Madden.
1548 Fixed <rdar://problem/4038586> 8A402: Osaka-Mono text overlaps when typing with input method
1550 We weren't clearing the "all ascii" flag when setting text on
1553 Reviewed by Richard Williamson.
1555 * khtml/rendering/render_text.cpp:
1556 (RenderText::setText):
1558 2005-03-08 Darin Adler <darin@apple.com>
1560 Reviewed by Ken and Maciej.
1562 - fixed <rdar://problem/3988809> REGRESSION (Mail): wide space characters are turned into plain old spaces when typed or pasted
1564 Changed the few places where it matters to use a "collapsible whitespace" concept instead of
1565 the general whitespace concept. This means treating only ' ' and '\n' specially instead of
1566 including other space characters, which matches what the space-collapsing logic does in RenderText,
1567 although it really needs to behave differently based on whitespace mode.
1569 * khtml/editing/visible_text.h: (khtml::isCollapsibleWhitespace): Added. This returns true only for
1570 ' ' and '\n' since they are the only characters collapsed once text is in the DOM. But really it
1571 can't do the job ignoring white-space mode, so some day it must go.
1573 * khtml/editing/html_interchange.cpp: (convertHTMLTextToInterchangeFormat): Changed to use
1574 isCollapsibleWhitespace and removed unnecessary calls to latin1().
1576 * khtml/editing/htmlediting.cpp:
1577 (khtml::isNBSP): Removed unnecessary creation/destruction of QChar each time this is called.
1578 (khtml::nextCharacterIsCollapsibleWhitespace): Renamed from isWS and changed to use isCollapsibleWhitespace.
1579 (khtml::DeleteSelectionCommand::fixupWhitespace): Use isCollapsibleWhitespace instead of isWS,
1580 since we only want to do our NBSP tricks for collapsible whitespace.
1581 (khtml::InsertTextCommand::input): Changed use of isTab to instead say == "\t" since that does the
1582 same thing and is arguably just as clear. Changed use of isWS to == " " since the input text can't
1583 include any "\n" characters, and really a plain old space is the only collapsible thing that can
1584 be passed in. Use isCollapsibleWhitespace instead of isWS since we want to do NBSP tricks only for
1585 collapsible whitespace, not all whitespace.
1586 (khtml::InsertTextCommand::insertSpace): Use isCollapsibleWhitespace instead of isWS since we want
1587 to do NBSP tricks only for collapsible whitespace, not all whitespace.
1588 (khtml::RebalanceWhitespaceCommand::doApply): Ditto.
1590 * khtml/xml/dom_position.h: Changed treatNBSPAsWhiteSpace parameters to considerNonCollapsibleWhitespace
1591 parameters. The most common callers are only interested in collapsible whitespace, and the smart copy
1592 and paste callers want to include all whitespace, including non-breaking spaces and all the Unicode spaces.
1593 * khtml/xml/dom_position.cpp:
1594 (DOM::Position::leadingWhitespacePosition): Rename the parameter, and use either QChar::isSpace or
1595 isCollapsibleWhitespace depending on the boolean passed in.
1596 (DOM::Position::trailingWhitespacePosition): Ditto.
1598 2005-03-07 John Sullivan <sullivan@apple.com>
1602 - <rdar://problem/4040868> REGRESSION (Mail, 403-403+): Drag and drop deletes text,
1603 many other bad editing problems
1605 * khtml/rendering/render_text.cpp:
1606 (RenderText::caretMaxOffset):
1607 A "-" should have been a "+" in this method that was tweaked an hour ago. Editing
1608 was completely horked.
1610 2005-03-07 Richard Williamson <rjw@apple.com>
1612 Additional nil check from fix for 4040749.
1614 * khtml/rendering/render_box.cpp:
1615 (RenderBox::setStyle):
1617 2005-03-07 Richard Williamson <rjw@apple.com>
1619 Additional nil check from fix for 4040749.
1621 * khtml/rendering/render_layer.cpp:
1622 (RenderLayer::updateLayerPosition):
1624 2005-03-07 David Harrison <harrison@apple.com>
1628 <rdar://problem/4033202> REGRESSION (Mail): Can't arrow up at a particular spot in a particular Mail message
1630 Doublecheck that new position is really on a different line, because the VisiblePosition constructor does not.
1631 Filed <rdar://problem/4040763> for that problem.
1633 * khtml/editing/visible_units.cpp:
1634 (khtml::previousLinePosition):
1636 2005-03-07 Richard Williamson <rjw@apple.com>
1638 Fixed <rdar://problem/4040749> REGRESSION (125-178): opacity style not working, breaks fading images on okcupid.com
1640 When layers are dynamically created/removed as a result of changing opacity they weren't being correctly
1641 sized and positioned. This happens whenever opacity goes from < 1 to 1.
1645 * khtml/rendering/render_box.cpp:
1646 (RenderBox::setStyle):
1647 * khtml/rendering/render_layer.cpp:
1648 (RenderLayer::updateLayerPosition):
1650 2005-03-07 Christy Warren <kali@apple.com>
1654 * khtml/rendering/render_text.cpp:
1655 (RenderText::caretMinOffset): modified to handle BIDI case by checking all text boxes for min offset
1656 (RenderText::caretMaxOffset): modified to handle BIDI case by checking all text boxes for max offset
1658 2005-03-07 David Harrison <harrison@apple.com>
1662 <rdar://problem/4029225> REGRESSION (Mail): Crash if hit return after dragging in attachment - DeleteSelectionCommand::initializePositionData
1664 Work around the fact that the height() of a BR is 0 if there are no text elements on the line, even if there are replaced elements.
1665 Filed <rdar://problem/4040358> RenderBR height() is not accurate.
1667 * khtml/editing/htmlediting.cpp:
1668 (khtml::ReplaceSelectionCommand::doApply):
1669 When height is 0, double check that the placeholder is the first position on the line.
1673 2005-03-07 Ken Kocienda <kocienda@apple.com>
1679 <rdar://problem/4040136> Expose SPI for WebCore's functions to create document fragments from plain text and markup strings
1681 * kwq/DOMHTML.mm: Add two new SPI functions.
1682 (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:])
1683 (-[DOMHTMLDocument _createDocumentFragmentWithText:])
1684 * kwq/DOMPrivate.h: Declare the new SPI here, a privately-exported header, so Mail can make use of it.
1686 2005-03-07 Ken Kocienda <kocienda@apple.com>
1692 <rdar://problem/4039676> REGRESSION (Mail): in reply, <cr> on pasted text (without trailing newline) is eaten when pasted above date
1694 * khtml/editing/htmlediting.cpp:
1695 (khtml::ReplaceSelectionCommand::doApply): Code to "eat" a <br> element, that was creating an otherwise empty line, was running
1696 when it should not. If the content being pasted in does not end in a "logical" newline itself, then the <br> already
1697 in the content needs to be preserved. A simple one-line change now sees to this.
1699 * layout-tests/editing/pasteboard/paste-text-010-expected.txt: This test now has an extra, but harmless,
1700 <br> at the end of a paragraph. This makes sense given the code change.
1703 * layout-tests/editing/pasteboard/paste-text-018-expected.txt: Added.
1704 * layout-tests/editing/pasteboard/paste-text-018.html: Added.
1706 2005-03-07 Ken Kocienda <kocienda@apple.com>
1712 <rdar://problem/4035648> REGRESSION (Mail): line feed in source HTML file causes bad copy/paste behavior
1714 The createMarkup() function in markup.cpp iterates over the nodes in a range,
1715 and does some bookkeeping to figure out when to add close tags to the markup.
1716 Some code added at the start of the loop to prevent markup from being written
1717 for unrendered nodes short-circuited the rest of the loop, and so prevented
1718 the close-tag-writing code from running when it should.
1720 This is why the "plain" text wound up inside of the bold tag in the example
1721 above. The addition of the unrendered return character caused an incorrect
1722 delay in the close tag for the bold element from being written out, with the
1723 result being that it wound up including additional content.
1725 The fix is to add checks for node renderers throughout the loop at the points
1726 where markup is written out for each node. This allows the additional close
1727 tag logic to run as needed.
1729 All layout tests pass with this change.
1731 * khtml/editing/markup.cpp:
1732 (khtml::createMarkup)
1736 * layout-tests/editing/pasteboard/paste-4035648-fix-expected.txt: Added.
1737 * layout-tests/editing/pasteboard/paste-4035648-fix.html: Added.
1739 2005-03-06 Christy Warren <kali@appple.com>
1743 * khtml/rendering/render_text.cpp:
1744 (lastRendererOnPrevLine): helper for RenderText::caretRect
1745 (RenderText::caretRect): added code to properly handle bidi ordered text boxes
1747 2005-03-06 Christy Warren <kali@apple.com>
1751 * khtml/editing/visible_position.cpp: Eliminated code that cuts off searching through the text boxes based on an assumption that breaks under bidi
1752 (khtml::VisiblePosition::isCandidate):
1753 * kwq/KWQFontMetrics.mm:
1754 (QFontMetrics::checkSelectionPoint): Made the initialization of the WebCoreStyle honor the reversed flag
1756 2005-03-05 John Sullivan <sullivan@apple.com>
1760 - fixed <rdar://problem/4038417> Mail crashed in StyleChange::checkForLegacyHTMLStyleChange
1761 when composing a reply
1763 * khtml/editing/htmlediting.cpp:
1764 (khtml::StyleChange::checkForLegacyHTMLStyleChange):
1765 Added missing nil check.
1767 2005-03-05 Darin Adler <darin@apple.com>
1771 - fixed <rdar://problem/4038478> Crash in renderer viewing RSS feed at feed://wvs.topleftpixel.com/index.rdf
1773 * khtml/xml/dom_docimpl.cpp: (widgetForNode): Check for nil before going from node to renderer.
1775 2005-03-05 Darin Adler <darin@apple.com>
1777 Reviewed by Richard.
1779 - fixed <rdar://problem/4037700> Every character typed causes stat call for /usr/share/icu/icudt32b_char.brk
1781 * khtml/rendering/render_text.cpp:
1782 (getCharacterBreakIterator): Added. Helper that sets up an iterator for the passed-in text.
1783 Shares a single global iterator (fast, albeit not thread-safe).
1784 (RenderText::previousOffset): Changed to call getCharacterBreakIterator.
1785 (RenderText::nextOffset): Ditto.
1787 2005-03-05 Ken Kocienda <kocienda@apple.com>
1793 <rdar://problem/4038267> REGRESSION (Mail): Crash copying and pasting end of paragraph
1795 Code to handle content that has a "logical" newline at the end of the pasted content, and the code
1796 to adjust the selection at the end of the paste operation made an assumption that at least one
1797 node had been inserted by the paste command. This is not necessarily true in the case where the sole content
1798 in the pasted content is one of these "logical" newlines. Adjust some code around so that we don't deref
1799 null, but still adjust the selection correctly for this case. In each of the two functions below, some
1800 null checks have been added, and some code has been rearranged a little bit to continue on through
1801 the end of completeHTMLReplacement, even if no nodes have been inserted. The patch looks bigger and more
1802 complicated than the conceptual change.
1804 * khtml/editing/htmlediting.cpp:
1805 (khtml::ReplaceSelectionCommand::doApply)
1806 (khtml::ReplaceSelectionCommand::completeHTMLReplacement)
1808 * layout-tests/editing/pasteboard/paste-4038267-fix-expected.txt: Added.
1809 * layout-tests/editing/pasteboard/paste-4038267-fix.html: Added.
1811 2005-03-05 Darin Adler <darin@apple.com>
1815 - fixed <rdar://problem/4025918> images copied from Safari with relative src URLs aren't pasted into Mail messages (KURL resolves base URLs incorrectly)
1817 * kwq/KWQKURL.mm: (KURL::KURL): Add a slash at the start of the path if a relative part is adding
1818 a path onto a URL that has "pre-path" bits like host name, but no path yet. This doesn't come up
1819 for http because in that case we add a trailing "/" as part of canonicalization.
1821 2005-03-04 John Sullivan <sullivan@apple.com>
1825 - fixed <rdar://problem/4033705> REGRESSION (Mail): Copy/Paste from Excel
1826 crashes Mail in KWQKHTMLPart::fontForSelection(bool*) const + 232
1828 * kwq/KWQKHTMLPart.mm:
1829 (KWQKHTMLPart::fontForSelection):
1830 Check for nil startNode, not just nil renderer.
1832 2005-03-04 David Harrison <harrison@apple.com>
1834 Reviewed by Ken, Richard.
1836 <rdar://problem/3996383> REGRESSION (Mail): Deleting all of first line also deletes line ending
1838 Problem was the placeholder check was based on 0 height block, but the block in this
1839 case is the BODY, which has other content even though the paragraph is gone.
1841 * khtml/editing/htmlediting.cpp:
1842 (khtml::CompositeEditCommand::insertBlockPlaceholder):
1843 Now does insert instead of append!
1845 (khtml::CompositeEditCommand::appendBlockPlaceholder):
1846 New. Actually does append.
1848 (khtml::CompositeEditCommand::addBlockPlaceholderIfNeeded):
1849 Renamed from insertBlockPlaceholderIfNeeded because it can insert or append. Also accepts "force insert" flag.
1851 (khtml::CompositeEditCommand::removeBlockPlaceholder):
1852 Renamed for succinctness from removeBlockPlaceholderIfNeeded.
1854 (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent):
1855 (khtml::DeleteSelectionCommand::moveNodesAfterNode):
1856 Use renamed methods.
1858 (khtml::DeleteSelectionCommand::doApply):
1859 Use addBlockPlaceholderIfNeeded "force insert" flag if deleting whole paragraphs did not leave an empty one.
1861 (khtml::InsertParagraphSeparatorCommand::doApply):
1862 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply):
1863 (khtml::InsertTextCommand::input):
1864 Use renamed methods.
1866 * khtml/editing/htmlediting.h:
1867 Renamed and new methods per above.
1870 2005-03-04 Chris Blumenberg <cblu@apple.com>
1872 Fixed: <rdar://problem/4032840> REGRESSION (Mail): crash in RemoveNodeCommand after pasting attachment at end of message
1876 * khtml/editing/visible_units.cpp:
1877 (khtml::endOfParagraph): don't consider text nodes that have no rendered characters
1879 2005-03-04 Richard Williamson <rjw@apple.com>
1881 Fixed <rdar://problem/4034764> REGRESSION(125-188)Viewing text/plain page and going back/forward corrupts HTML pages (google.com)
1883 The parse mode wasn't be restored to the document when going
1888 * kwq/KWQKHTMLPart.mm:
1889 (KWQKHTMLPart::openURLFromPageCache):
1890 * kwq/KWQPageState.h:
1891 * kwq/KWQPageState.mm:
1892 (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:interpreterBuiltins:]):
1894 2005-03-04 Ken Kocienda <kocienda@apple.com>
1898 * layout-tests/editing/style/create-block-for-style-012-expected.txt: Shame on me!
1899 I landed my last fix without running layout tests. This one changes in a subtle, but
1902 2005-03-04 Ken Kocienda <kocienda@apple.com>
1904 Reviewed by Harrison
1908 <rdar://problem/4032543> REGRESSION (Mail): Mail hangs when quoted text is pasted twice
1910 This code change fixes the bug in a non-obvious way. The root cause of the problem was
1911 that a VisiblePosition created using an affinity originating in Mail code caused
1912 two VisiblePosition objects that should have been equal to differ only in their
1913 affinities, which in turn caused us to run a code path that should not have run.
1915 * khtml/editing/visible_position.cpp:
1916 (khtml::VisiblePosition::VisiblePosition): Added copy constructor.
1917 (khtml::VisiblePosition::next): Factored out inline code that used to be here into new
1918 setAffinityUsingLinePosition() function.
1919 (khtml::isEqualIgnoringAffinity): New helper to handle cases when affinity in equality check does
1920 not matter. However, we want to know about such cases where a VisiblePosition differs only by affinity,
1921 and the code will assert in development when this happens.
1922 (khtml::isNotEqualIgnoringAffinity): Ditto, but not. :)
1923 (khtml::setAffinityUsingLinePosition): New helper function mentioned above. This will "correct"
1924 upstream affinity to downstream if the affinity does not make a difference for the position.
1925 * khtml/editing/visible_position.h:
1926 * khtml/editing/visible_range.h: Wacky bug. The operator== for this class took VisiblePosition classes!
1927 * khtml/editing/visible_units.cpp:
1928 (khtml::isStartOfParagraph): Now performs equality check without regard to affinity.
1929 (khtml::isEndOfParagraph): Ditto.
1930 (khtml::isStartOfBlock): Ditto.
1931 (khtml::isEndOfBlock): Ditto.
1932 * kwq/WebCoreBridge.mm:
1933 (-[WebCoreBridge setSelectedDOMRange:affinity:]): Adjusts the affinity using setAffinityUsingLinePosition()
1936 2005-03-04 Darin Adler <darin@apple.com>
1940 - fixed <rdar://problem/4036817> REGRESSION: ctrl-y broken when a line + carriage return cut
1942 * khtml/editing/htmlediting.h: Added insertTextRunWithoutNewlines.
1943 * khtml/editing/htmlediting.cpp:
1944 (khtml::InsertTextCommand::input): Added assertion to make sure strings with newlines don't get
1946 (khtml::TypingCommand::insertText): Added. Takes the name of the old function, but is a new
1947 level that breaks runs into lines and inserts each one separately.
1948 (khtml::TypingCommand::insertTextRunWithoutNewlines): Renamed old insertText to this.
1950 * khtml/dom/dom_string.h: Made substring be a const member function.
1951 * khtml/dom/dom_string.cpp: (DOM::DOMString::substring): Made this const.
1953 2005-03-04 Darin Adler <darin@apple.com>
1957 - fixed <rdar://problem/4020413> REGRESSION (Mail): can't use fonts with names that start with "#" in Mail (Korean fonts)
1959 * khtml/css/css_valueimpl.cpp:
1960 (DOM::isLegalIdentifier): Added. Commented out and not used.
1961 (DOM::quoteStringIfNeeded): Quotes the string if needed. For now only if it starts with "#".
1962 (DOM::CSSPrimitiveValueImpl::cssText): Call quoteStringIfNeeded when asked for cssText for an arbitrary string, since we
1963 need text you can re-parse.
1964 (DOM::FontFamilyValueImpl::cssText): Ditto.
1966 * khtml/editing/markup.cpp:
1967 (khtml::startMarkup): Added comments about lack of quoting for attributes.
1968 (khtml::createMarkup): Ditto.
1970 2005-03-04 Adele Amchan <adele@apple.com>
1974 Fix for <rdar://problem/4021711> REGRESSION(125-188) blank pages when browsing forum at cooperativeresearch.org - cached external script problem
1976 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::scriptHandler): set flag needToRefCachedScript so we can make sure
1977 notifyFinished is called after pendingSrc is set up with the right data from the cached script
1979 2005-03-04 Ken Kocienda <kocienda@apple.com>
1985 <rdar://problem/4029632> Tiger 8A398:- Mail crashes in DOM::NodeImpl::isBlockFlow() after pasting text with alignment style and BR element from Safari
1987 * khtml/editing/htmlediting.cpp:
1988 (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): VisiblePosition constructor
1989 was failing to yield a position for a node just pasted into the document since a layout was needed
1990 for the calculation to come out right. Layout added. Crash gone.
1994 2005-03-03 Chris Blumenberg <cblu@apple.com>
1996 Fixed: <rdar://problem/3992803> Cannot navigate through list items with the keyboard, you're stuck in the same <li> block unless you click out
1998 Reviewed by harrison.
2000 * khtml/rendering/render_line.cpp:
2001 (khtml::RootInlineBox::closestLeafChildForXPos): avoid returning list markers when possible. Also improved heuristic for returning the best InlineBox given the passed X position.
2004 2005-03-03 Ken Kocienda <kocienda@apple.com>
2010 <rdar://problem/4035198> Pasting text with different styles does not get reproducible results
2012 I had a good idea yesterday to improve the way we "fixup" styles after
2013 pasting, but i chose a poor data structure to do it, a map of
2014 nodes-to-styles. In the fixup step, I iterated over the map elements and
2015 did the fixup. However, since the order in which the items would come
2016 out of the map is indeterminate, we got unpredictable results.
2018 So, the concept was good, but the implementation was flawed. I have
2019 fixed this mapping to be a list instead, so the order that nodes are
2020 evaluated in the fixup step is document order. This works nicely.
2022 * khtml/editing/htmlediting.cpp:
2023 (khtml::ReplacementFragment::~ReplacementFragment): No longer need to explicity deref nodes and
2024 styles saved away for later fixup. This is now handled by the new NodeDesiredStyle class.
2025 (khtml::ReplacementFragment::computeStylesUsingTestRendering): Now calls computeAndStoreNodeDesiredStyle,
2026 function renamed from mapDesiredStyleForNode.
2027 Now accepts a QValueList<NodeDesiredStyle> in place of the old map.
2028 (khtml::NodeDesiredStyle::NodeDesiredStyle): New class that represents a node-to-style mapping.
2029 (khtml::NodeDesiredStyle::~NodeDesiredStyle): Ditto.
2030 (khtml::NodeDesiredStyle::operator=): Ditto.
2031 (khtml::ReplaceSelectionCommand::doApply): Now calls computeAndStoreNodeDesiredStyle,
2032 function renamed from mapDesiredStyleForNode.
2033 (khtml::ReplaceSelectionCommand::fixupNodeStyles): Now operates on a QValueList<NodeDesiredStyle> in
2034 place of the old map.
2035 (khtml::computeAndStoreNodeDesiredStyle): Renamed from mapDesiredStyleForNode. Now operates on a
2036 QValueList<NodeDesiredStyle> in place of the old map.
2037 * khtml/editing/htmlediting.h:
2038 (khtml::NodeDesiredStyle): New class that represents a node-to-style mapping.
2039 (khtml::ReplacementFragment::desiredStyles): Now returns a QValueList<NodeDesiredStyle> in place of the old map.
2041 * layout-tests/editing/style/typing-style-003-expected.txt: Results changed in an acceptable way.
2043 2005-03-02 Darin Adler <darin@apple.com>
2047 - fixed <rdar://problem/4029741> REGRESSION (188-189): <input type=text> are cleared when you hide/show them
2049 * khtml/html/html_formimpl.h: Added detach functions for both input and text area elements, since
2050 both have m_valueMatchesRenderer flags.
2051 * khtml/html/html_formimpl.cpp:
2052 (DOM::HTMLInputElementImpl::detach): Set m_valueMatchesRenderer to false, since the renderer is going away.
2053 (DOM::HTMLTextAreaElementImpl::detach): Ditto.
2055 2005-03-02 Ken Kocienda <kocienda@apple.com>
2061 <rdar://problem/4006151> in reply, caret moves to next line after toggling bold style then typing
2063 * khtml/editing/htmlediting.cpp:
2064 (khtml::ApplyStyleCommand::applyInlineStyle): Defer cleaning up empty style until the end of the
2065 function. In some situations, the render tree can get confused when we do this removal up front.
2066 I wish I understood the reasons more deeply, but this bit of code shuffling seems harmless, and
2069 2005-03-02 Darin Adler <darin@apple.com>
2073 - fixed <rdar://problem/4024966> crash happened twice in [KWQTextField setHasFocus:] + 0xe8
2075 Added more nil checks to the widget implementations. Anywhere a widget pointer is used, do a nil check,
2076 rather than relying on high level assumptions about which calls can and can't destroy the HTML element
2077 (and hence the widget). The case in the bug seems to be a case where scrolling destroyed the element.
2078 We can't be sure this fixes the bug, but we can be relatively sure we didn't introduce any new problems,
2079 because this just avoids nil-dereferencing.
2082 (-[KWQButton becomeFirstResponder]):
2083 (-[KWQButton nextKeyView]):
2084 (-[KWQButton previousKeyView]):
2085 * kwq/KWQListBox.mm:
2086 (-[KWQTableView mouseDown:]):
2087 (-[KWQTableView becomeFirstResponder]):
2088 (-[KWQTableView numberOfRowsInTableView:]):
2089 (-[KWQTableView tableViewSelectionDidChange:]):
2090 (-[KWQTableView tableView:shouldSelectRow:]):
2091 (-[KWQTableView selectionShouldChangeInTableView:]):
2092 * kwq/KWQScrollBar.mm:
2093 (-[KWQScrollBar scroll:]):
2095 (-[KWQSlider mouseDown:]):
2096 (-[KWQSlider slide:]):
2097 (-[KWQSlider becomeFirstResponder]):
2098 (-[KWQSlider nextKeyView]):
2099 (-[KWQSlider previousKeyView]):
2100 * kwq/KWQTextArea.mm:
2101 (-[KWQTextAreaTextView becomeFirstResponder]):
2102 (-[KWQTextAreaTextView resignFirstResponder]):
2103 (-[KWQTextAreaTextView mouseDown:]):
2104 * kwq/KWQTextField.mm:
2105 (-[KWQTextFieldController action:]):
2106 (-[KWQTextFieldController controlTextDidEndEditing:]):
2107 (-[KWQTextFieldController controlTextDidChange:]):
2108 (-[KWQTextFieldController textView:didHandleEvent:]):
2109 (-[KWQTextFieldController setHasFocus:]):
2111 2005-03-02 Richard Williamson <rjw@apple.com>
2113 Fixed <rdar://problem/4031483> Leak (RenderObject::createInlineBox) reproducible with Stock widget
2115 We were leaking inline block line boxes. Argh!
2119 * khtml/rendering/render_flow.cpp:
2120 (RenderFlow::dirtyLineBoxes):
2121 * khtml/rendering/render_line.cpp:
2122 (khtml::InlineBox::deleteLine):
2124 2005-03-02 Chris Blumenberg <cblu@apple.com>
2126 Fixed: <rdar://problem/3976872> REGRESSION (Mail): Pasted plain text doesn't get the proper style if pasted into newlines
2128 Reviewed by kocienda.
2130 * khtml/editing/htmlediting.cpp:
2131 (khtml::EditCommand::styleAtPosition): new, factored out from calculateStyleBeforeInsertion
2132 (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): call styleAtPosition
2133 (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): clear new m_insertionStyle ivar
2134 (khtml::ReplaceSelectionCommand::~ReplaceSelectionCommand): deref new m_insertionStyle ivar
2135 (khtml::ReplaceSelectionCommand::doApply): store the style so it later be applied when matching style
2136 (khtml::ReplaceSelectionCommand::completeHTMLReplacement): apply style from m_insertionStyle when matching style
2137 * khtml/editing/htmlediting.h:
2139 2005-03-02 Maciej Stachowiak <mjs@apple.com>
2143 <rdar://problem/4031718> REGRESSION (401-401+): Safari reproducible crash setting up scope in JSLazyEventListener::parseCode authenticating to bugweb
2145 * khtml/ecma/kjs_events.cpp:
2146 (JSLazyEventListener::parseCode): If originalNode is NULL, don't
2147 mess with the scope chain.
2149 * khtml/html/html_baseimpl.cpp:
2150 (HTMLBodyElementImpl::parseHTMLAttribute): For handlers that are
2151 delcared on body but set on the document, pass NULL to avoid
2152 swizzling the scope chain. It turns out that this is what browsers
2153 do, and it finesses the crash.
2155 2005-03-02 David Harrison <harrison@apple.com>
2159 <rdar://problem/3948453> Can't type accented chars as first character in Stickies widget
2161 * khtml/editing/htmlediting.cpp:
2162 (khtml::ReplaceSelectionCommand::doApply):
2164 2005-03-02 Ken Kocienda <kocienda@apple.com>
2169 <rdar://problem/4020574> REGRESSION (Mail): copy/paste first part of reply-quoted text alters downstream style
2171 The problem was that the operation to move nodes following the newly-pasted nodes did not preserve the
2172 style of these moved nodes. I have generalized some of the functions that compute and preserve styles
2173 for nodes and then apply these styles after a DOM operation.
2175 * khtml/editing/htmlediting.cpp:
2176 (khtml::ReplacementFragment::~ReplacementFragment): Call new derefNodesAndStylesInMap() helper function
2177 in place of old code that had this deref'ing inline.
2178 (khtml::ReplacementFragment::computeStylesUsingTestRendering): Now calls new mapDesiredStyleForNode() helper
2179 function place of old code that had this style computation inline.
2180 (khtml::ReplacementFragment::removeStyleNodes): Updated comment for new helper name.
2181 (khtml::ReplaceSelectionCommand::doApply): Now calls new helpers in place of helpers whose names were changed,
2182 or in place of pre-refactored inline code.
2183 (khtml::ReplaceSelectionCommand::fixupNodeStyles): Renamed from applyStyleToInsertedNodes(). Now generalized
2184 to take the map of nodes to use for the fixup. This makes it possible to call this code with different maps,
2185 and that is needed to fix the bug.
2186 (khtml::mapDesiredStyleForNode): New helper function to compute the inheritable styles for a given node
2187 and map this style to the given node in the given map. This function now also includes the code that was
2188 in the removeBlockquoteColorsIfNeeded(). This latter helper has now been removed.
2189 (khtml::derefNodesAndStylesInMap): Simple helper to deref map members.
2190 * khtml/editing/htmlediting.h:
2191 (khtml::ReplacementFragment::desiredStyles): New helper to return map of nodes-to-desiredStyles.
2193 2005-03-01 Ken Kocienda <kocienda@apple.com>
2199 <rdar://problem/4011358> REGRESSION(Mail): after dragging text to mail message and deleting, typing or dragging new text doesn't work
2201 * khtml/editing/visible_position.cpp:
2202 (khtml::VisiblePosition::isCandidate): Insertion point disappearing was due to a failed
2203 check here after deleting all the content in the body element. The special "empty block"
2204 needs to add check for DOM children. A block may have straggling anonymous render children in
2205 some cases, and so the check needs to be (!DOM-kids || !render-kids).
2207 Also, I botched the last checkin trying to split these two patches in my tree. Wrong layout tests
2208 got checked in, I checked in a conflict marker in the Changelog, etc. I fixed everything with this checkin.
2210 2005-03-01 Ken Kocienda <kocienda@apple.com>
2214 Improved fix for this bug:
2216 <rdar://problem/3996605> Insert paragraph command puts new block in wrong place, creating difficult-to-handle HTML
2218 Maciej and I discussed this situation at length, and we came up with a better fix than I did earlier.
2220 * khtml/editing/htmlediting.cpp:
2221 (khtml::InsertParagraphSeparatorCommand::doApply): Simplify one special case so that it only handles the
2222 "last in block" situation. Remove special case for "downstream node is in different block" and handle
2223 this case with a little bit of special code in the general insertion case.
2225 Results studied to make sure there were no problems.
2227 * layout-tests/editing/deleting/delete-3959464-fix-expected.txt
2228 * layout-tests/editing/inserting/insert-div-001-expected.txt
2229 * layout-tests/editing/inserting/insert-div-002-expected.txt
2230 * layout-tests/editing/inserting/insert-div-004-expected.txt
2231 * layout-tests/editing/inserting/insert-div-005-expected.txt
2232 * layout-tests/editing/inserting/insert-div-009-expected.txt
2233 * layout-tests/editing/inserting/insert-div-014-expected.txt
2234 * layout-tests/editing/inserting/insert-div-018-expected.txt
2235 * layout-tests/editing/inserting/insert-div-024-expected.txt
2236 * layout-tests/editing/pasteboard/paste-text-011-expected.txt
2237 * layout-tests/editing/pasteboard/paste-text-013-expected.txt
2238 * layout-tests/editing/pasteboard/paste-text-015-expected.txt
2239 * layout-tests/editing/style/block-style-004-expected.txt
2240 * layout-tests/editing/style/block-style-005-expected.txt
2241 * layout-tests/editing/style/block-style-006-expected.txt
2245 * layout-tests/editing/inserting/insert-div-027.html
2246 * layout-tests/editing/inserting/insert-div-027-expected.txt
2248 2005-03-01 David Hyatt <hyatt@apple.com>
2250 Fix for 4030890, regression with <sup> on Google. Fix some bogus != comparison checks in verticalPositionHint.
2254 (RenderObject::getVerticalPosition):
2256 2005-03-01 Chris Blumenberg <cblu@apple.com>
2258 Fixed: <rdar://problem/4030669> smart delete does not delete spaces from pasted content
2262 * khtml/editing/htmlediting.cpp:
2263 (khtml::DeleteSelectionCommand::initializePositionData): pass true for treatNBSPAsWhiteSpace to leadingWhitespacePosition and trailingWhitespacePosition when testing whether or not we have to delete those characters as well.
2264 * khtml/editing/jsediting.cpp: pass true for smartDelete when the selection granularity is WORD. This allows us to write smart delete layout tests.
2265 * layout-tests/editing/deleting/smart-delete-001-expected.txt: Added.
2266 * layout-tests/editing/deleting/smart-delete-001.html: Added.
2267 * layout-tests/editing/deleting/smart-delete-002-expected.txt: Added.
2268 * layout-tests/editing/deleting/smart-delete-002.html: Added.
2270 2005-03-01 Richard Williamson <rjw@apple.com>
2272 Fixed <rdar://problem/4029772> Weather widgets use a lot of memory (more that other widgets)
2274 The string objects created by KWQHeaderStringFromDictionary() leaked.
2276 Reviewed by John Louch.
2279 (KWQHeaderStringFromDictionary):
2281 2005-03-01 Jens Alfke <jens@apple.com>
2285 <rdar://problem/4004531> Simple Sun Signed Applet throws exceptions; doesn't run
2286 Two fixes for the way we extract the parameter-y goodness from <object> tags.
2288 * khtml/rendering/render_frames.cpp:
2289 (RenderPartObject::updateWidget):
2291 2005-03-01 Richard Williamson <rjw@apple.com>
2293 Fixed <rdar://problem/3990258> REGRESSION (125.12-181): top of picture that spans two pages is cut off on print from Safari
2295 The problem was due to incorrect "object truncation" in RenderFlow::paintLines.
2296 We attempt to push objects down if they don't fit on a page at
2297 paint time. If the attempt to push object down failed we just
2298 didn't paint at all.
2302 * khtml/rendering/render_flow.cpp:
2303 (RenderFlow::paintLines):
2305 2005-03-01 Chris Blumenberg <cblu@apple.com>
2307 Fixed: <rdar://problem/4030669> smart delete does not delete spaces from pasted content
2311 * khtml/editing/htmlediting.cpp:
2312 (khtml::DeleteSelectionCommand::initializePositionData): pass true for treatNBSPAsWhiteSpace to leadingWhitespacePosition and trailingWhitespacePosition when testing whether or not we have to delete those characters as well.
2313 * khtml/editing/jsediting.cpp: pass true for smartDelete when the selection granularity is WORD. This allows us to write smart delete layout tests.
2314 * layout-tests/editing/deleting/smart-delete-001-expected.txt: Added.
2315 * layout-tests/editing/deleting/smart-delete-001.html: Added.
2316 * layout-tests/editing/deleting/smart-delete-002-expected.txt: Added.
2317 * layout-tests/editing/deleting/smart-delete-002.html: Added.
2319 2005-03-01 Ken Kocienda <kocienda@apple.com>
2325 <rdar://problem/4030068> Trailing <return> gets eaten when pasted at the end of a document
2327 * khtml/editing/htmlediting.cpp:
2328 (khtml::ReplaceSelectionCommand::doApply): Add code to handle formerly-unhandled end-of-document case.
2330 2005-03-01 Maciej Stachowiak <mjs@apple.com>
2334 <rdar://problem/4003774> REGRESSION(125-181): JavaScript problems @ Yankee/Dixie quiz
2336 Reworked how scopes are set up for event handlers to match other
2337 browser. This includes the following changes:
2339 - Special scope entries are set up at the time the event handler
2340 is created, not at the time it fires.
2342 - Special scope is only set up for event handlers set in the html
2343 source through an html attribute, not for handlers set using
2344 addEventHandler or setting JS properties like onclick through
2347 - Special scope is based on the DOM node on which the handler is
2348 an attribute, not the event target.
2350 This fixes the regression while allowing the fix to
2351 <rdar://problem/3798453> (DIG: getting variable with same name as
2352 DOM element attribute gets attribute value instead) to keep
2355 * khtml/ecma/kjs_events.cpp:
2356 (JSEventListener::handleEvent):
2357 (JSLazyEventListener::JSLazyEventListener):
2358 (JSLazyEventListener::parseCode):
2359 * khtml/ecma/kjs_events.h:
2360 * khtml/ecma/kjs_proxy.cpp:
2361 (KJSProxyImpl::createHTMLEventHandler):
2362 * khtml/ecma/kjs_proxy.h:
2363 * khtml/ecma/kjs_window.cpp:
2364 (Window::getJSLazyEventListener):
2365 * khtml/ecma/kjs_window.h:
2366 * khtml/html/html_baseimpl.cpp:
2367 (HTMLBodyElementImpl::parseHTMLAttribute):
2368 (HTMLFrameElementImpl::parseHTMLAttribute):
2369 (HTMLFrameSetElementImpl::parseHTMLAttribute):
2370 * khtml/html/html_elementimpl.cpp:
2371 (HTMLElementImpl::parseHTMLAttribute):
2372 * khtml/html/html_formimpl.cpp:
2373 (DOM::HTMLFormElementImpl::parseHTMLAttribute):
2374 (DOM::HTMLButtonElementImpl::parseHTMLAttribute):
2375 (DOM::HTMLInputElementImpl::parseHTMLAttribute):
2376 (DOM::HTMLLabelElementImpl::parseHTMLAttribute):
2377 (DOM::HTMLSelectElementImpl::parseHTMLAttribute):
2378 (DOM::HTMLTextAreaElementImpl::parseHTMLAttribute):
2379 * khtml/html/html_imageimpl.cpp:
2380 (HTMLImageElementImpl::parseHTMLAttribute):
2381 * khtml/html/html_objectimpl.cpp:
2382 (HTMLObjectElementImpl::parseHTMLAttribute):
2383 * khtml/khtml_part.cpp:
2384 (KHTMLPart::createHTMLEventListener):
2385 * khtml/khtml_part.h:
2386 * khtml/xml/dom_docimpl.cpp:
2387 (DocumentImpl::createHTMLEventListener):
2388 * khtml/xml/dom_docimpl.h:
2392 2005-03-01 Chris Blumenberg <cblu@apple.com>
2394 Backed out my patch since the tree was closed.
2396 * khtml/editing/htmlediting.cpp:
2397 (khtml::DeleteSelectionCommand::initializePositionData):
2398 * khtml/editing/jsediting.cpp:
2400 2005-03-01 Chris Blumenberg <cblu@apple.com>
2402 Fixed: <rdar://problem/4030669> smart delete does not delete spaces from pasted content
2406 * khtml/editing/htmlediting.cpp:
2407 (khtml::DeleteSelectionCommand::initializePositionData): pass true for treatNBSPAsWhiteSpace to leadingWhitespacePosition and trailingWhitespacePosition when testing whether or not we have to delete those characters as well.
2408 * khtml/editing/jsediting.cpp: pass true for smartDelete when the selection granularity is WORD. This allows us to write smart delete layout tests.
2409 * layout-tests/editing/deleting/smart-delete-001-expected.txt: Added.
2410 * layout-tests/editing/deleting/smart-delete-001.html: Added.
2411 * layout-tests/editing/deleting/smart-delete-002-expected.txt: Added.
2412 * layout-tests/editing/deleting/smart-delete-002.html: Added.
2414 2005-03-01 Ken Kocienda <kocienda@apple.com>
2420 <rdar://problem/4030068> Trailing <return> gets eaten when pasted at the end of a document
2422 * khtml/editing/htmlediting.cpp:
2423 (khtml::ReplaceSelectionCommand::doApply): Add code to handle formerly-unhandled end-of-document case.
2425 2005-03-01 David Harrison <harrison@apple.com>
2429 <rdar://problem/3915560> Mail would like an SPI to enable "smart" text paste/drop
2431 * kwq/WebCoreBridge.h:
2432 * kwq/WebCoreBridge.mm:
2433 (-[WebCoreBridge smartDeleteRangeForProposedRange:]):
2434 (-[WebCoreBridge smartInsertForString:replacingRange:beforeString:afterString:]):
2437 2005-03-01 Chris Blumenberg <cblu@apple.com>
2439 Fixed: <rdar://problem/4030404> selection granularity should be set when extending selection via JS
2441 Reviewed by kocienda.
2443 * khtml/ecma/kjs_window.cpp:
2444 (SelectionFunc::tryCall): set the granularity on the part. This will allow us to write smart paste layout tests.
2445 * layout-tests/editing/pasteboard/smart-paste-001-expected.txt: Added.
2446 * layout-tests/editing/pasteboard/smart-paste-001.html: Added.
2447 * layout-tests/editing/pasteboard/smart-paste-002-expected.txt: Added.
2448 * layout-tests/editing/pasteboard/smart-paste-002.html: Added.
2449 * layout-tests/editing/pasteboard/smart-paste-003-expected.txt: Added.
2450 * layout-tests/editing/pasteboard/smart-paste-003.html: Added.
2451 * layout-tests/editing/pasteboard/smart-paste-004-expected.txt: Added.
2452 * layout-tests/editing/pasteboard/smart-paste-004.html: Added.
2453 * layout-tests/editing/pasteboard/smart-paste-005-expected.txt: Added.
2454 * layout-tests/editing/pasteboard/smart-paste-005.html: Added.
2455 * layout-tests/editing/pasteboard/smart-paste-006-expected.txt: Added.
2456 * layout-tests/editing/pasteboard/smart-paste-006.html: Added.
2457 * layout-tests/editing/pasteboard/smart-paste-007-expected.txt: Added.
2458 * layout-tests/editing/pasteboard/smart-paste-007.html: Added.
2460 2005-03-01 Chris Blumenberg <cblu@apple.com>
2462 Fixed: <rdar://problem/4029934> smart paste with plain text can add too many spaces
2464 Reviewed by kocienda.
2466 * khtml/editing/htmlediting.cpp:
2467 (khtml::ReplaceSelectionCommand::doApply): pass true for treatNBSPAsWhitespace to leadingWhitespacePosition and trailingWhitespacePosition
2468 * khtml/xml/dom_position.cpp:
2469 (DOM::isWS): take treatNBSPAsWhitespace param
2470 (DOM::Position::leadingWhitespacePosition): ditto
2471 (DOM::Position::trailingWhitespacePosition): ditto
2472 * khtml/xml/dom_position.h:
2474 2005-03-01 Ken Kocienda <kocienda@apple.com>
2480 <rdar://problem/3996605> Insert paragraph command puts new block in wrong place, creating difficult-to-handle HTML
2482 * khtml/editing/htmlediting.cpp:
2483 (khtml::InsertParagraphSeparatorCommand::doApply): Look for the upstream-most block to insert after
2484 when at the visible end of a block. This helps to avoid some undesirable sequences of markup which
2485 Dave says will be vary hard to render. Changing the command in this way avoids the "limitations"
2486 of the render tree by not asking it to render markup we do not want to make anyway.
2488 All these tests change, but either in insignificant ways, or for the better.
2490 * layout-tests/editing/deleting/delete-3959464-fix-expected.txt:
2491 * layout-tests/editing/inserting/insert-div-001-expected.txt:
2492 * layout-tests/editing/inserting/insert-div-002-expected.txt:
2493 * layout-tests/editing/inserting/insert-div-004-expected.txt:
2494 * layout-tests/editing/inserting/insert-div-005-expected.txt:
2495 * layout-tests/editing/inserting/insert-div-009-expected.txt:
2496 * layout-tests/editing/inserting/insert-div-024-expected.txt:
2497 * layout-tests/editing/pasteboard/paste-text-011-expected.txt:
2498 * layout-tests/editing/pasteboard/paste-text-013-expected.txt:
2499 * layout-tests/editing/pasteboard/paste-text-015-expected.txt:
2500 * layout-tests/editing/style/block-style-004-expected.txt:
2501 * layout-tests/editing/style/block-style-005-expected.txt:
2502 * layout-tests/editing/style/block-style-006-expected.txt:
2503 * layout-tests/editing/style/remove-underline-across-paragraph-expected.txt:
2504 * layout-tests/editing/style/remove-underline-across-paragraph-in-bold-expected.txt:
2505 * layout-tests/editing/style/remove-underline-after-paragraph-expected.txt:
2506 * layout-tests/editing/style/remove-underline-after-paragraph-in-bold-expected.txt:
2508 New test to check specific problem mentioned in the bug.
2510 * layout-tests/editing/inserting/insert-div-026-expected.txt: Added.
2511 * layout-tests/editing/inserting/insert-div-026.html: Added.
2513 2005-02-28 Maciej Stachowiak <mjs@apple.com>
2517 <rdar://problem/4002864> REGRESSION(125-146) getElementById in onload fails in a test case involving external resources
2519 Moved management of elementById hashtable from attach/detach to
2520 insertedIntoDocument/removedFromDocument, to avoid being thrown
2521 off by temporary detaches due to style recalcs.
2523 * khtml/xml/dom_elementimpl.cpp:
2524 (ElementImpl::insertedIntoDocument):
2525 (ElementImpl::removedFromDocument):
2526 (ElementImpl::attach):
2527 (ElementImpl::updateId):
2528 * khtml/xml/dom_elementimpl.h:
2530 Make sure that insertedIntoDocument is called before firing any
2533 * khtml/xml/dom_nodeimpl.cpp:
2534 (NodeBaseImpl::dispatchChildInsertedEvents):
2536 2005-02-28 David Hyatt <hyatt@apple.com>
2538 Fix for 4028999, safari crashes when resetting if mallocsribble is on. Clip rects were being cleared using dead
2539 render objects. Change the ordering.
2543 * khtml/rendering/render_box.cpp:
2544 (RenderBox::detach):
2545 * khtml/rendering/render_layer.cpp:
2546 (RenderLayer::~RenderLayer):
2548 2005-02-28 Chris Blumenberg <cblu@apple.com>
2550 Fixed: <rdar://problem/4024786> REGRESSION (Mail): "Smart paste" plain-text word into Blot leaves insertion point misplaced
2552 Reviewed by kocienda.
2554 * khtml/editing/htmlediting.cpp:
2555 (khtml::ReplaceSelectionCommand::completeHTMLReplacement): Call updateLayout so caretMinOffset and caretMaxOffset return correct values.
2557 2005-02-28 John Sullivan <sullivan@apple.com>
2561 - WebCore part of fix for <rdar://problem/4023490> REGRESSION (125-185): Tabbing through links
2562 on frameset page gets stuck at end (tivofaq.com)
2564 * kwq/WebCoreBridge.h:
2565 add nextValidKeyViewOutsideWebFrameViews (code is in WebKit)
2567 2005-02-28 Ken Kocienda <kocienda@apple.com>
2573 <rdar://problem/3972665> 8A360: HTML message partially truncated on left hand side, text-indent from Script Editor
2575 * khtml/css/css_computedstyle.cpp: inheritableProperties array now defined in css_valueimpl.cpp.
2576 * khtml/css/css_valueimpl.cpp: Define inheritableProperties array here.
2577 (DOM::CSSMutableStyleDeclarationImpl::copyBlockProperties): Use new name for blockProperties, and use the new
2578 constant for the number of items in the array.
2579 (DOM::CSSMutableStyleDeclarationImpl::removeBlockProperties): Ditto.
2580 (DOM::CSSMutableStyleDeclarationImpl::removeInheritableProperties): New function.
2581 * khtml/css/css_valueimpl.h: Declare inheritableProperties array and numInheritableProperties extern so they
2582 can be defined in css_valueimpl.cpp and used in css_computedstyle.cpp.
2583 * khtml/editing/htmlediting.cpp:
2584 (khtml::ReplacementFragment::removeStyleNodes): This code was misguided, and removed too much style from HTML
2585 elements. Now, it removes from HTML elements only the styles that we replace later with a call to applyStyle().
2586 Also, add ID_B to list of inline "style" nodes we are willing to remove. Leaving it off was an oversight.
2588 * layout-tests/editing/pasteboard/paste-text-011-expected.txt: ID_B fix made this result change, without any
2589 visible change in the test.
2593 * layout-tests/editing/style/smoosh-styles-003.html
2594 * layout-tests/editing/style/smoosh-styles-003-expected.txt
2596 2005-02-28 Richard Williamson <rjw@apple.com>
2598 Fixed <rdar://problem/4026985> CrashTracer: ...14 crashes at com.apple.WebCore: -[KWQPageState invalidate] + 32
2600 Added more nil checking and ASSERTS.
2601 Without a reproducible case this is hard to definitively resolve.
2603 Reviewed by John Sullivan.
2605 * kwq/KWQPageState.mm:
2606 (-[KWQPageState invalidate]):
2608 2005-02-28 Richard Williamson <rjw@apple.com>
2610 Fixed <rdar://problem/4027702> 3.5% performance regression btwn Safari-188 and Safari-400
2612 I inadvertently checked in some debugging code that disabled
2613 style sharing. Backed out that change.
2615 * khtml/css/cssstyleselector.cpp:
2616 (khtml::CSSStyleSelector::styleForElement):
2618 2005-02-28 Chris Blumenberg <cblu@apple.com>
2620 Fixed: <rdar://problem/4026639> www.bmw.ca configurator does not work with Safari
2624 * khtml/ecma/kjs_html.cpp:
2625 (KJS::HTMLElement::tryGet): when frameset.<name of frame child> is called, return the window object of the frame child
2627 2005-02-28 Ken Kocienda <kocienda@apple.com>
2633 <rdar://problem/4026906> Paste of HTML table content can break table structure
2635 * khtml/editing/htmlediting.cpp:
2636 (khtml::ReplacementFragment::pruneEmptyNodes): Call new isProbablyTableStructureNode() function to prevent
2637 removal of empty table structure nodes.
2638 (khtml::ReplacementFragment::removeUnrenderedNodesUsingTestRendering): Ditto.
2639 (khtml::isProbablyTableStructureNode): New helper function.
2640 * khtml/editing/htmlediting.h: Declare new helper.
2642 2005-02-28 Chris Blumenberg <cblu@apple.com>
2644 Fixed: <rdar://problem/4023566> Stickies: Crash in ReplacementFragment::insertFragmentForTestRendering on paste
2646 Reviewed by kocienda.
2648 * khtml/editing/htmlediting.cpp:
2649 (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): ref and deref the element while it is "floating"
2650 (khtml::ReplacementFragment::insertFragmentForTestRendering): ditto
2651 (khtml::floatRefdElement): new, keeps an element alive while its ref count is 0
2652 (khtml::createDefaultParagraphElement): removed commented out code
2653 (khtml::createBlockPlaceholderElement): ref the element and return it as "floating"
2654 (khtml::createFontElement): ditto
2655 (khtml::createStyleSpanElement): ditto
2656 * khtml/editing/htmlediting.h:
2658 2005-02-27 Maciej Stachowiak <mjs@apple.com>
2662 <rdar://problem/3993557> REGRESSION (125-180-ish): getElementsByTagName no longer works with namespace designations
2664 * khtml/xml/dom_nodeimpl.cpp:
2665 (NodeBaseImpl::getElementsByTagNameNS): When no namespace is specified, find elements
2666 of the specified name in any namespace to match Mozilla and earlier Safari behavior.
2668 2005-02-25 Darin Adler <darin@apple.com>
2672 - fixed <rdar://problem/4025618> Crash while searching at hollywoodvideo.com
2674 * khtml/html/html_formimpl.h: Added valueWithDefault.
2675 * khtml/html/html_formimpl.cpp:
2676 (DOM::HTMLInputElementImpl::appendFormData): Call valueWithDefault instead of going at the render object
2677 to try to get the default value; there may be no render object if this is display:none.
2678 (DOM::HTMLInputElementImpl::valueWithDefault): Added. Knows about the defaults for "submit" and "reset"
2679 buttons; otherwise just returns the value as-is.
2681 * khtml/rendering/render_form.h: Removed the defaultLabel member functions.
2682 * khtml/rendering/render_form.cpp:
2683 (RenderSubmitButton::rawText): Call valueWithDefault instead of using defaultLabel function here on
2684 the render side. The DOM needs to know how to deal with the default anyway for form submission.
2685 (RenderSubmitButton::defaultLabel): Removed.
2686 (RenderResetButton::defaultLabel): Removed.
2687 (RenderPushButton::defaultLabel): Removed.
2689 2005-02-25 Darin Adler <darin@apple.com>
2693 - fixed <rdar://problem/4025088> window onblur and onfocus don't fire when text field has focus
2695 * kwq/KWQKHTMLPart.h: Added setWindowHasFocus function and m_windowHasFocus data member.
2696 * kwq/KWQKHTMLPart.mm:
2697 (KWQKHTMLPart::setDisplaysWithFocusAttributes): Took out the code that sends the focus and blur events.
2698 (KWQKHTMLPart::setWindowHasFocus): Put that code here instead.
2700 * kwq/WebCoreBridge.h: Added setWindowHasFocus: method to the bridge.
2701 * kwq/WebCoreBridge.mm: (-[WebCoreBridge setWindowHasFocus:]): Added. Calls method on the part.
2703 2005-02-25 Darin Adler <darin@apple.com>
2707 - re-fixed <rdar://problem/3665430> horizontal scroll bar of text area does not show, even when text is wide in "no wrap" mode
2709 * kwq/KWQTextArea.mm: (-[KWQTextArea _updateTextViewWidth]): Don't change the text view width
2710 to match the text area's width in the "wrap" case.
2712 2005-02-25 Ken Kocienda <kocienda@apple.com>
2718 <rdar://problem/4021518> 8A394 Mail crashes during paste: khtml::RootInlineBox::closestLeafChildForXPos
2720 * khtml/editing/visible_units.cpp:
2721 (khtml::previousLinePosition): Adding an updateLayout call at the start of the function fixes the crash, since
2722 we caught line boxes in a not-completely-updated state.
2723 (khtml::nextLinePosition): Ditto.
2725 2005-02-25 David Hyatt <hyatt@apple.com>
2727 Fix for 4010774, make sure to avoid an O(N^2) algorithm in nextRenderer() that is triggered when large
2728 DOM subtrees are inserted into documents via one insert/append call.
2730 Reviewed by kocienda
2732 * khtml/xml/dom_nodeimpl.cpp:
2733 (NodeImpl::nextRenderer):
2735 2005-02-25 Richard Williamson <rjw@apple.com>
2737 Fixed <rdar://problem/3382926> Bidi neutrals at RTL/LTR boundaries not handled correctly.
2739 Second pass at fixing 3382926 w/o causing layout regressions. Same concept:
2740 if directionality of text's element is RTL and first character has neutral directionality
2741 then set the initial directionality to RTL.
2745 * khtml/rendering/bidi.cpp:
2746 (khtml::RenderBlock::bidiReorderLine):
2747 (khtml::RenderBlock::determineStartPosition):
2751 2005-02-25 Ken Kocienda <kocienda@apple.com>
2755 Roll out Chris' change to fix this bug:
2757 <rdar://problem/4023566> Stickies: Crash in ReplacementFragment::insertFragmentForTestRendering on paste
2759 That code change is responsible for all these new crashers:
2761 <rdar://problem/4025177> crash copying safari.apple.com into Blot document
2762 <rdar://problem/4025184> crash in DOM::NodeImpl::parentNode copying "New!" from google.com to Blot
2763 <rdar://problem/4025214> crash in DOM::NodeImpl::getRect loading paste-match-style-001.html
2765 Since we wish to close the tree for a build right now, I am rolling out rather than investigating.
2767 * khtml/editing/htmlediting.cpp:
2768 (khtml::ApplyStyleCommand::addInlineStyleIfNeeded)
2769 (khtml::ReplacementFragment::insertFragmentForTestRendering)
2770 (khtml::createDefaultParagraphElement)
2771 (khtml::createBlockPlaceholderElement)
2772 (khtml::createFontElement)
2773 (khtml::createStyleSpanElement)
2774 * khtml/editing/htmlediting.h
2776 2005-02-25 Ken Kocienda <kocienda@apple.com>
2782 <rdar://problem/4020108> Pasting text into message makes Mail crash reproducibly
2784 Note that, even with this fix, development build will crash until this bug is fixed:
2785 <rdar://problem/4024996> Applying block styles can cause assertion failure in inline style removal
2787 This will not crash deployment builds, so I am going to land.
2789 * khtml/editing/htmlediting.cpp:
2790 (khtml::ApplyStyleCommand::applyBlockStyle): Applying block styles can make the loop to reach beyondEnd
2791 fail since the structure of the document can change. Cache the next node first before operating on it,
2794 2005-02-25 Vicki Murley <vicki@apple.com>
2796 - recommit this change, since rolling it out did NOT fix the performance regression!
2798 2005-02-23 Darin Adler <darin@apple.com>
2802 - fixed <rdar://problem/4011405> REGRESSION (180-181): Unconfirmed text disappears when text focus moves
2804 The key was to change things around so that we don't push text from the DOM to the widget
2805 unless the DOM has actually been changed. This prevents the code path that wipes out inline input
2806 during the blur process.
2808 * khtml/html/html_formimpl.cpp:
2809 (DOM::HTMLInputElementImpl::HTMLInputElementImpl): Start m_valueMatchesRenderer as false.
2810 (DOM::HTMLInputElementImpl::parseHTMLAttribute): Set m_valueMatchesRenderer to false when a
2811 new value is set here.
2812 (DOM::HTMLInputElementImpl::setValue): Set m_valueMatchesRenderer to false when a new value
2814 (DOM::HTMLInputElementImpl::setValueFromRenderer): Added. Sets m_value, sets m_valueMatchesRenderer
2815 to true, and also sends out the input event. It's better to have this here than in the renderer code.
2816 (DOM::HTMLTextAreaElementImpl::HTMLTextAreaElementImpl): Start m_valueIsValid as false (replaces
2817 m_dirtyvalue) and m_valueMatchesRenderer as false.
2818 (DOM::HTMLTextAreaElementImpl::updateValue): Added. Factored this out from the value function. Uses
2819 the new booleans and keeps them up to date, specifically setting m_valueMatchesRenderer based on
2820 where the value came from.
2821 (DOM::HTMLTextAreaElementImpl::value): Updated to call updateValue to do most of the work.
2822 (DOM::HTMLTextAreaElementImpl::setValue): Set both m_valueIsValid and m_valueMatchesRenderer.
2823 (DOM::HTMLTextAreaElementImpl::setDefaultValue): Take parameter by reference.
2825 * khtml/html/html_formimpl.h: Added setValueFromRenderer, valueMatchesRenderer, setValueMatchesRenderer,
2826 and m_valueMatchesRenderer to input element. For textarea element, made some parameters pass DOMString
2827 by reference, and added invalidateValue, updateValue, valueMatchesRenderer, and setValueMatchesRenderer.
2829 * khtml/rendering/render_form.cpp:
2830 (RenderLineEdit::updateFromElement): Don't re-get the value from the DOM if valueMatchesRenderer
2832 (RenderLineEdit::slotTextChanged): Call setValueFromRenderer instead of manipulating the DOM
2834 (RenderTextArea::detach): Call updateValue instead of calling value for its side effect.
2835 (RenderTextArea::handleFocusOut): Ditto.
2836 (RenderTextArea::updateFromElement): Call updateValue and then not re-get the value from the
2837 DOM if valueMatchesRenderer is true.
2838 (RenderTextArea::slotTextChanged): Call invalidateValue instead of directly setting m_dirtyvalue to true.
2840 2005-02-25 Chris Blumenberg <cblu@apple.com>
2842 Fixed: <rdar://problem/4023566> Stickies: Crash in ReplacementFragment::insertFragmentForTestRendering on paste
2846 * khtml/editing/htmlediting.cpp:
2847 (khtml::ApplyStyleCommand::addInlineStyleIfNeeded):
2848 (khtml::ReplacementFragment::insertFragmentForTestRendering):
2849 (khtml::floatRefdElement):
2850 (khtml::createDefaultParagraphElement):
2851 (khtml::createBlockPlaceholderElement):
2852 (khtml::createFontElement):
2853 (khtml::createStyleSpanElement):
2854 * khtml/editing/htmlediting.h:
2856 2005-02-25 Darin Adler <darin@apple.com>
2858 * kwq/character-sets.txt: Checked in updated file. This new file has no effect, because none of the
2859 changes affect character sets that we support, but it's good to have the latest file in here, and
2860 completely safe because I checked that the generated files have not changed.
2862 2005-02-25 Vicki Murley <vicki@apple.com>
2866 - back out this change, since it causes a 3.5% performance regression
2868 2005-02-23 Darin Adler <darin@apple.com>
2872 - fixed <rdar://problem/4011405> REGRESSION (180-181): Unconfirmed text disappears when text focus moves
2874 The key was to change things around so that we don't push text from the DOM to the widget
2875 unless the DOM has actually been changed. This prevents the code path that wipes out inline input
2876 during the blur process.
2878 * khtml/html/html_formimpl.cpp:
2879 (DOM::HTMLInputElementImpl::HTMLInputElementImpl): Start m_valueMatchesRenderer as false.
2880 (DOM::HTMLInputElementImpl::parseHTMLAttribute): Set m_valueMatchesRenderer to false when a
2881 new value is set here.
2882 (DOM::HTMLInputElementImpl::setValue): Set m_valueMatchesRenderer to false when a new value
2884 (DOM::HTMLInputElementImpl::setValueFromRenderer): Added. Sets m_value, sets m_valueMatchesRenderer
2885 to true, and also sends out the input event. It's better to have this here than in the renderer code.
2886 (DOM::HTMLTextAreaElementImpl::HTMLTextAreaElementImpl): Start m_valueIsValid as false (replaces
2887 m_dirtyvalue) and m_valueMatchesRenderer as false.
2888 (DOM::HTMLTextAreaElementImpl::updateValue): Added. Factored this out from the value function. Uses
2889 the new booleans and keeps them up to date, specifically setting m_valueMatchesRenderer based on
2890 where the value came from.
2891 (DOM::HTMLTextAreaElementImpl::value): Updated to call updateValue to do most of the work.
2892 (DOM::HTMLTextAreaElementImpl::setValue): Set both m_valueIsValid and m_valueMatchesRenderer.
2893 (DOM::HTMLTextAreaElementImpl::setDefaultValue): Take parameter by reference.
2895 * khtml/html/html_formimpl.h: Added setValueFromRenderer, valueMatchesRenderer, setValueMatchesRenderer,
2896 and m_valueMatchesRenderer to input element. For textarea element, made some parameters pass DOMString
2897 by reference, and added invalidateValue, updateValue, valueMatchesRenderer, and setValueMatchesRenderer.
2899 * khtml/rendering/render_form.cpp:
2900 (RenderLineEdit::updateFromElement): Don't re-get the value from the DOM if valueMatchesRenderer
2902 (RenderLineEdit::slotTextChanged): Call setValueFromRenderer instead of manipulating the DOM
2904 (RenderTextArea::detach): Call updateValue instead of calling value for its side effect.
2905 (RenderTextArea::handleFocusOut): Ditto.
2906 (RenderTextArea::updateFromElement): Call updateValue and then not re-get the value from the
2907 DOM if valueMatchesRenderer is true.
2908 (RenderTextArea::slotTextChanged): Call invalidateValue instead of directly setting m_dirtyvalue to true.
2910 2005-02-25 Darin Adler <darin@apple.com>
2914 - fixed <rdar://problem/4024786> REGRESSION (Mail): "Smart paste" plain-text word into Blot leaves insertion point misplaced
2916 * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply):
2917 Use the insertNodeAfterAndUpdateNodesInserted and insertNodeBeforeAndUpdateNodesInserted
2918 functions to add the leading and trailing spaces for smart paste.
2920 2005-02-25 David Hyatt <hyatt@apple.com>
2922 Back out fix for 3382926, since it breaks LTR text inside RTL contexts.
2926 * khtml/rendering/bidi.cpp:
2927 (khtml::BidiIterator::direction):
2929 2005-02-25 David Hyatt <hyatt@apple.com>
2931 Fix for 3975039, scrolling is slow in huge RSS views. Optimize the calculation of clip rects for overflow:hidden
2932 layers. Also optimize layer movement when scrolling overflow sections.
2936 * khtml/rendering/render_layer.cpp:
2938 (ClipRects::operator delete):
2939 (ClipRects::detach):
2940 (RenderLayer::RenderLayer):
2941 (RenderLayer::~RenderLayer):
2942 (RenderLayer::updateLayerPosition):
2943 (RenderLayer::removeOnlyThisLayer):
2944 (RenderLayer::insertOnlyThisLayer):
2945 (RenderLayer::scrollToOffset):
2946 (RenderLayer::hitTest):
2947 (RenderLayer::calculateClipRects):
2948 (RenderLayer::calculateRects):
2949 (RenderLayer::containsPoint):
2950 (RenderLayer::clearClipRects):
2951 (RenderLayer::clearClipRect):
2952 * khtml/rendering/render_layer.h:
2953 (khtml::ClipRects::m_refCnt):
2954 (khtml::ClipRects::overflowClipRect):
2955 (khtml::ClipRects::fixedClipRect):
2956 (khtml::ClipRects::posClipRect):
2957 (khtml::ClipRects::ref):
2958 (khtml::ClipRects::deref):
2959 (khtml::RenderLayer::clipRects):
2960 * khtml/rendering/render_object.cpp:
2961 (RenderObject::setStyle):
2963 2005-02-24 Maciej Stachowiak <mjs@apple.com>
2965 Reviewed by Darin and Dave a while ago.
2967 <rdar://problem/3996685> REGRESSION: Crash in KWQVectorImpl::at loading http://maps.google.com/mapfiles/homepanel.xsl
2969 * kwq/WebCoreBridge.mm:
2970 (formElementFromDOMElement): Check for isHTMLElement() as well as
2971 id() == ID_FORM. This seems like an impossible situation, but
2972 papering over it seems more expedient for the time being.
2974 2005-02-24 Richard Williamson <rjw@apple.com>
2976 Fixed <rdar://problem/3382926> Bidi neutrals at RTL/LTR boundaries not handled correctly.
2978 Use mirror characters correctly when rendering with RTL directionality.
2982 * khtml/rendering/bidi.cpp:
2983 (khtml::BidiIterator::direction):
2985 2005-02-24 Richard Williamson <rjw@apple.com>
2987 Fixed <rdar://problem/3985889> REGRESSION (125-180): setting <img> src to GIF that already animated does not animate; just shows final frame
2991 * WebCore.pbproj/project.pbxproj:
2992 * khtml/html/html_imageimpl.cpp:
2993 (HTMLImageLoader::updateFromElement):
2994 * khtml/rendering/render_image.cpp:
2995 (RenderImage::resetAnimation):
2996 * khtml/rendering/render_image.h:
2997 * khtml/rendering/render_list.cpp:
2998 (RenderListMarker::setStyle):
2999 (RenderListMarker::paint):
3000 * khtml/rendering/render_list.h:
3004 (QPixmap::resetAnimation):
3005 * kwq/WebCoreImageRenderer.h:
3007 2005-02-24 Chris Blumenberg <cblu@apple.com>
3009 Fixed: <rdar://problem/4020110> Safari crashes in setAllData while taking a www.zoomerang.com survey
3013 * kwq/KWQResourceLoader.mm:
3014 (-[KWQResourceLoader finishJobAndHandle:]): clear the job after we've deleted to avoid reentrancy
3016 2005-02-24 Darin Adler <darin@apple.com>
3020 - fixed <rdar://problem/4023360> REGRESSION (186-187): image file upload is broken at pep.apple.com
3022 * khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::appendFormData): Return true after
3023 setting up the form data for an uploaded file. The old code would fall through to the ISINDEX
3024 case and send double form data (the filename instead of the file contents the second time).
3026 2005-02-24 David Harrison <harrison@apple.com>
3030 <rdar://problem/3990849> AX: textMarkerRange for an AXUIElement within an AXWebArea
3032 * kwq/KWQAccObject.mm:
3033 (-[KWQAccObject textMarkerRange]):
3034 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
3035 (-[KWQAccObject doAXTextMarkerRangeForUIElement:]):
3036 (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
3037 Added AXTextMarkerRangeForUIElement, or you can send textMarkerRange to the UIElement itself.
3039 2005-02-24 David Harrison <harrison@apple.com>
3043 <rdar://problem/4004279> 3 AXSelectedTextChanged notifications are firing each time I type a character
3045 * khtml/xml/dom_docimpl.cpp:
3046 (DocumentImpl::updateSelection):
3047 Send notification only if the selection is not null. This safely ignores transitory selections set during editing.
3049 2005-02-24 Darin Adler <darin@apple.com>
3053 - fixed <rdar://problem/3987619> in some cases, text doesn't resize with Format->Style->Bigger/Smaller
3055 * khtml/editing/htmlediting.cpp:
3056 (khtml::ApplyStyleCommand::applyRelativeFontStyleChange): Only call nodeFullySelected for non-text nodes.
3057 Text nodes are already split so they're either in the range and full selected or out of the range.
3058 And nodeFullySelected doesn't work for text nodes.
3059 (khtml::ApplyStyleCommand::nodeFullySelected): Add an assertion, since this function only works for elements,
3061 (khtml::ApplyStyleCommand::nodeFullyUnselected): Ditto.
3063 - make big improvement in <rdar://problem/3953636> Mail hung for ~10sec changing font of 84328 characters: khtml::ApplyStyleCommand::nodeFullySelected
3065 * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::compareBoundaryPoints): Improve algorithm based on suggestion
3068 - fixed <rdar://problem/4020305> REGRESSION (185-186): loading image in new window using document.write fails
3070 * khtml/xml/dom_docimpl.cpp: (DocumentImpl::open): If there is no parent document, don't blow away the base URL.
3072 - fixed <rdar://problem/4021701> REGRESSION (188-188+): form not submitted after pressing <return> at http://hrweb.apple.com
3074 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::dispatchMouseEvent): Send activate event in the case where the event
3075 sent is a KHTML_CLICK_EVENT, not CLICK_EVENT.
3077 2005-02-23 Kevin Decker <kdecker@apple.com>
3081 Fixed <rdar://problem/4020747> REGRESSION: stray </applet> tags crash Safari
3083 * khtml/html/htmlparser.cpp:
3084 (KHTMLParser::processCloseTag): Made a typesafe check that prevents crashes
3085 whenever there is a closing applet tag without an actual <applet> in the first place.
3086 Now verifies the current token is ID_APPLET before casting it to an HTMLAppletElementImpl.
3089 2005-02-23 Ken Kocienda <kocienda@apple.com>
3095 <rdar://problem/3977962> font loses bold style after pasting next to existing text and pressing return
3097 * khtml/editing/htmlediting.cpp:
3098 (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): Problem here was
3099 that we were doing work in cases where we should not, and content whose style would have
3100 been correct if we had done nothing was getting clobbered. It turns out that extra work
3101 to apply style to the new paragraph added in this command only needs to be done if we're
3102 at the boundaries of a paragraph. Otherwise, content that is moved as part of the work
3103 of the command will lend their styles to the new paragraph without any extra work needed.
3104 So, make this position check and return unless at a paragraph boundary.
3108 * layout-tests/editing/style/block-styles-007-expected.txt
3109 * layout-tests/editing/style/block-styles-007.html
3111 2005-02-23 Ken Kocienda <kocienda@apple.com>
3117 <rdar://problem/4017641> REGRESSION (Mail): you can only bold/unbold a selection starting from end of line once
3119 Problem is with the way we figure out whether to add or remove a style based on
3120 the current selection. In this case, the code is looking at the end of the
3121 previous line, which is not bold, and deduces incorrectly that the operation is
3122 a "make bold". Then the style code runs to make bold, but there is nothing on
3123 the end of the previous line to embolden, so we get into a cycle where the same
3124 thing happens each time cmd-b is hit.
3126 * khtml/khtml_part.cpp:
3127 (KHTMLPart::selectionComputedStyle): Call editingStartPosition() to get the right position for the font determination.
3128 * khtml/xml/dom2_rangeimpl.cpp:
3129 (DOM::RangeImpl::editingStartPosition): New helper function that "does the right thing" based on whether the
3130 selection is a caret or a range, moving upstream for the former, and downstream for the latter.
3131 * khtml/xml/dom2_rangeimpl.h:
3132 * kwq/KWQKHTMLPart.mm:
3133 (KWQKHTMLPart::fontForSelection): Call editingStartPosition() to get the right position for the font determination.
3137 * layout-tests/editing/style/style-boundary-001-expected.txt
3138 * layout-tests/editing/style/style-boundary-001.html
3139 * layout-tests/editing/style/style-boundary-002-expected.txt
3140 * layout-tests/editing/style/style-boundary-002.html
3141 * layout-tests/editing/style/style-boundary-003-expected.txt
3142 * layout-tests/editing/style/style-boundary-003.html
3143 * layout-tests/editing/style/style-boundary-004-expected.txt
3144 * layout-tests/editing/style/style-boundary-004.html
3146 2005-02-23 Richard Williamson <rjw@apple.com>
3148 Fixed <rdar://problem/3985579> 8A367: Dashboard: Stock widget not visible when click remove to remove single char ticker symbol
3150 Explicitly remove scroll bar views when removing them from
3153 Don't paint synchronously when the scroll position changes,
3154 this caused funky clip problems.
3158 * khtml/rendering/render_layer.cpp:
3159 (RenderLayer::scrollToOffset):
3160 (RenderLayer::setHasHorizontalScrollbar):
3161 (RenderLayer::setHasVerticalScrollbar):
3162 (RenderLayer::updateScrollInfoAfterLayout):
3164 2005-02-23 Ken Kocienda <kocienda@apple.com>
3170 <rdar://problem/3959996> REGRESSION (Mail): cursor moves to beginning of document when click is past end
3172 * khtml/rendering/render_block.cpp:
3173 (khtml::RenderBlock::positionForCoordinates): Skip blocks that are invisible or have no height when
3174 looking for a child to pass off to. And save away the last visible block with a height to pass off
3175 to if there is no child at the right y-coordinate.
3177 2005-02-23 David Harrison <harrison@apple.com>
3181 <rdar://problem/4010059> BoundsForTextMarkerRange does not update with scrolled web area
3183 * kwq/KWQAccObject.mm:
3184 (-[KWQAccObject doAXBoundsForTextMarkerRange:]):
3185 Adjust for scrolling.
3187 2005-02-22 Maciej Stachowiak <mjs@apple.com>
3191 <rdar://problem/3949790> hitting return after pasted styled line results in extra content getting the style
3193 * khtml/editing/htmlediting.cpp:
3194 (khtml::InsertParagraphSeparatorCommand::doApply): In the case
3195 where the start block is the root, insert the newly created DIV at
3196 the end of the root block instead of after the last sibling in the
3197 start node, since the start node could be inside other
3198 style-affecting nodes and we don't want to reparent its cousins
3201 2005-02-23 David Harrison <harrison@apple.com>
3205 <rdar://problem/4014691> switch to correctly spelled NSAccessibilityForegroundColorTextAttribute constant
3207 Also removed two older, now unneeded, wrappers.
3209 * kwq/KWQAccObject.mm:
3210 (-[KWQAccObject visiblePositionForStartOfTextMarkerRange:]):
3211 (-[KWQAccObject visiblePositionForEndOfTextMarkerRange:]):
3212 Removed these older, now unneeded, wrappers.
3214 (NSAccessibilityForegroundColorTextAttributeWrapper):
3215 New wrapper for NSAccessibilityForegroundColorTextAttribute.
3217 (AXAttributeStringSetStyle):
3218 Use NSAccessibilityForegroundColorTextAttributeWrapper.
3220 (-[KWQAccObject doAXTextMarkerRangeForUnorderedTextMarkers:]):
3221 Remove uses of visiblePositionForStartOfTextMarkerRange and visiblePositionForEndOfTextMarkerRange.
3223 2005-02-23 David Harrison <harrison@apple.com>
3227 <rdar://problem/3524784> AX hit test doesn't return info when done in empty space of content area
3229 * kwq/KWQAccObject.mm:
3230 (-[KWQAccObject accessibilityHitTest:]):
3231 Return unignored object.
3233 2005-02-23 Darin Adler <darin@apple.com>
3237 - fixed <rdar://problem/4006509> REGRESSION (171-172): Setting CSS -khtml-user-modify property triggers crash
3239 * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::applyProperty):
3240 Removed the code that changes the style of the element. This was never needed, and caused the
3241 style to be modified while we were iterating it.
3243 2005-02-23 Ken Kocienda <kocienda@apple.com>
3249 <rdar://problem/3980209> Mail crashed when I pressed Cmd-Shift-[ (nil-deref in ApplyStyleCommand::addBlockStyleIfNeeded)
3251 * khtml/editing/htmlediting.cpp:
3252 (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Reordered the new block
3253 insertion so that it come before the move. The logic stays exactly the same, however, with the old
3254 ordering, the new block could want to become a child of itself come insertion time. I considered
3255 making a more complicated code change to fix this problem, but the simple reordering works just
3256 as well, and seems less risky.
3258 These all changed in an insignificant way. It seems that with the new code, some empty text nodes
3259 got reordered in the document. This has no effect on anything visible to the user.
3261 * layout-tests/editing/style/create-block-for-style-003-expected.txt
3262 * layout-tests/editing/style/create-block-for-style-004-expected.txt
3263 * layout-tests/editing/style/create-block-for-style-009-expected.txt
3264 * layout-tests/editing/style/create-block-for-style-011-expected.txt
3265 * layout-tests/editing/style/create-block-for-style-013-expected.txt
3267 2005-02-23 Darin Adler <darin@apple.com>
3271 - fixed <rdar://problem/4013986> REGRESSION (173-174): onclick event not sent when mouse click on checkbox is double-click
3273 We need to send an onclick event *and* an ondblclick event when we process a double click.
3275 * khtml/khtmlview.cpp: (KHTMLView::dispatchMouseEvent): In the case where we're sending a CLICK_EVENT,
3276 follow it by a KHTML_CLICK_EVENT, a KHTML_DBLCLICK_EVENT when handling a double click, and a DOMACTIVATE_EVENT.
3277 We no longer do the DOMACTIVATE_EVENT in dispatchGenericEvent.
3278 * khtml/rendering/render_form.cpp: (RenderFormElement::slotClicked): send only CLICK_EVENT here, and
3279 lets dispatchMouseEvent deal with the other subsequent events.
3280 * khtml/xml/dom_nodeimpl.cpp:
3281 (NodeImpl::dispatchGenericEvent): Remove the code that sends a DOMACTIVATE_EVENT, since there's no longer
3282 a good way to figure out if this is the last event that should be sent before it is.
3283 (NodeImpl::dispatchMouseEvent): Set the meta key modifier here (as it already is set elsewhere), and
3284 follow up a CLICK_EVENT with KHTML_CLICK_EVENT, a KHTML_DBLCLICK_EVENT, and DOMACTIVATE_EVENT as above.
3286 2005-02-23 Darin Adler <darin@apple.com>
3290 - fixed <rdar://problem/4011405> REGRESSION (180-181): Unconfirmed text disappears when text focus moves
3292 The key was to change things around so that we don't push text from the DOM to the widget
3293 unless the DOM has actually been changed. This prevents the code path that wipes out inline input
3294 during the blur process.
3296 * khtml/html/html_formimpl.cpp:
3297 (DOM::HTMLInputElementImpl::HTMLInputElementImpl): Start m_valueMatchesRenderer as false.
3298 (DOM::HTMLInputElementImpl::parseHTMLAttribute): Set m_valueMatchesRenderer to false when a
3299 new value is set here.
3300 (DOM::HTMLInputElementImpl::setValue): Set m_valueMatchesRenderer to false when a new value
3302 (DOM::HTMLInputElementImpl::setValueFromRenderer): Added. Sets m_value, sets m_valueMatchesRenderer
3303 to true, and also sends out the input event. It's better to have this here than in the renderer code.
3304 (DOM::HTMLTextAreaElementImpl::HTMLTextAreaElementImpl): Start m_valueIsValid as false (replaces
3305 m_dirtyvalue) and m_valueMatchesRenderer as false.
3306 (DOM::HTMLTextAreaElementImpl::updateValue): Added. Factored this out from the value function. Uses
3307 the new booleans and keeps them up to date, specifically setting m_valueMatchesRenderer based on
3308 where the value came from.
3309 (DOM::HTMLTextAreaElementImpl::value): Updated to call updateValue to do most of the work.
3310 (DOM::HTMLTextAreaElementImpl::setValue): Set both m_valueIsValid and m_valueMatchesRenderer.
3311 (DOM::HTMLTextAreaElementImpl::setDefaultValue): Take parameter by reference.
3313 * khtml/html/html_formimpl.h: Added setValueFromRenderer, valueMatchesRenderer, setValueMatchesRenderer,
3314 and m_valueMatchesRenderer to input element. For textarea element, made some parameters pass DOMString
3315 by reference, and added invalidateValue, updateValue, valueMatchesRenderer, and setValueMatchesRenderer.
3317 * khtml/rendering/render_form.cpp:
3318 (RenderLineEdit::updateFromElement): Don't re-get the value from the DOM if valueMatchesRenderer
3320 (RenderLineEdit::slotTextChanged): Call setValueFromRenderer instead of manipulating the DOM
3322 (RenderTextArea::detach): Call updateValue instead of calling value for its side effect.
3323 (RenderTextArea::handleFocusOut): Ditto.
3324 (RenderTextArea::updateFromElement): Call updateValue and then not re-get the value from the