3 2005-01-27 David Harrison <harrison@apple.com>
7 <rdar://problem/3962214> AX: AXLeftLineTextMarkerRangeForTextMarker returns incorrect range
10 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
11 Allowed for selection to end of line including the linebreak.
13 2005-01-27 David Harrison <harrison@apple.com>
15 Reviewed by Darin, Ken.
17 <rdar://problem/3964470> AX: Include attachments in AXAttributedStringForTextMarkerRange
19 * kwq/KWQAccObject.mm:
20 (-[KWQAccObject isAttachment]):
21 (-[KWQAccObject attachmentView]):
22 (-[KWQAccObject role]):
23 (-[KWQAccObject subrole]):
24 (-[KWQAccObject roleDescription]):
25 (-[KWQAccObject value]):
26 (-[KWQAccObject title]):
27 (-[KWQAccObject accessibilityDescription]):
28 (-[KWQAccObject accessibilityIsIgnored]):
29 (-[KWQAccObject accessibilityAttributeNames]):
30 (-[KWQAccObject accessibilityAttributeValue:]):
31 Make attachments accessible.
33 (CreateCGColorIfDifferent):
34 (AXAttributeStringSetColor):
35 (AXAttributeStringSetNumber):
36 (AXAttributeStringSetFont):
37 (AXAttributeStringSetStyle):
38 (AXAttributeStringSetElement):
39 (AXLinkElementForNode):
40 (AXAttributedStringAppendText):
41 (AXAttributedStringAppendReplaced):
42 (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
43 Add attachments and more text attributes to AXAttributedStringForTextMarkerRange.
45 2005-01-27 Darin Adler <darin@apple.com>
49 - fixed <rdar://problem/3807935> DOM CSS computed style line-height is wrong in two ways
51 * khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
52 Use specified size rather than computed size when dealing with a percentage for line height.
54 2005-01-27 Darin Adler <darin@apple.com>
58 - fixed <rdar://problem/3971372> SWB: template function DOM_cast() won't compile with gcc 4.0
59 - fixed other gcc 4.0 compiling problems Patrick Beard pointed out on the phone
61 * kwq/DOMInternal.h: (DOM_cast): Change the "failToCompile()" trick to use a dependent name.
62 Nowadays, if a name is not dependent, it is checked at template definition time. But we want
63 a failure only at template instantiation time.
65 * ForwardingHeaders/editing/text_granularity.h: Added. Needed but a bug in the 3.3 compiler made
66 it compile anyway without this.
70 * khtml/html/html_miscimpl.h: For clarity, mark these functions virtual too. They are automatically
71 virtual because the base class ones are virtual, but it's ugly to leave it this way.
73 2005-01-26 Ken Kocienda <kocienda@apple.com>
79 <rdar://problem/3971609> REGRESSION (Mail): up/down arrow navigation broken after rewrapping text by resizing window
80 <rdar://problem/3975661> REGRESSION (Mail): left/right arrow navigation can place insertion point after last character on line
82 * khtml/editing/selection.cpp:
83 (khtml::Selection::modifyAffinity): PARAGRAPH and LINE movements should not alter affinity. This was
84 just a mistake before when it reset to upstream in some cases.
85 * khtml/rendering/render_line.cpp:
86 (khtml::RootInlineBox::closestLeafChildForXPos): Move this function down from InlineBox, and
87 rework the implementation. This fixes 3971609.
88 * khtml/rendering/render_line.h:
89 * khtml/rendering/render_text.cpp:
90 (RenderText::caretRect): Rework the algorithm to fix 3975661. This regressed when we began placing
91 the spaces on the end of lines in text boxes when lines wrap.
93 2005-01-26 Richard Williamson <rjw@apple.com>
95 Fixed <rdar://problem/3972522> (179-180) 40% slowdown on iBench JavaScript test
97 I added a member variable to ObjectImp. This changed it's size and consequently
98 hampered the optimizations built into the garbage collector. Objects no longer
99 fit within the allocators cell size, and thus allocation fell back to a slower
102 As a result of this fix I also dramatically cleaned up how runtime objects are
103 accessed. The path mostly *removes* code.
107 * khtml/ecma/kjs_dom.cpp:
108 (DOMDocumentProtoFunc::tryCall):
109 (DOMElementProtoFunc::tryCall):
110 (KJS::getRuntimeObject):
111 * khtml/ecma/kjs_dom.h:
112 * khtml/ecma/kjs_html.cpp:
113 (KJS::HTMLDocument::tryGet):
114 (KJS::HTMLElement::tryGet):
115 (KJS::HTMLElement::implementsCall):
116 (KJS::HTMLElement::call):
117 (KJS::HTMLElement::tryPut):
118 (KJS::HTMLCollection::tryGet):
119 (KJS::HTMLCollection::getNamedItems):
120 * khtml/ecma/kjs_html.h:
121 * khtml/ecma/kjs_window.cpp:
124 2005-01-26 Richard Williamson <rjw@apple.com>
126 Fixed <rdar://problem/3757712> REGRESSION (Mail): WebCore does not allow Devanagari ligature input
128 For now we are using ICU UBreakIterator to determine grapheme boundaries for
129 cursor and deletion. This does not match what Cocoa does exactly, but does match
130 what Carbon does. The areas are difference are obscure, but, according to
131 Deborah Goldsmith, using the UBreakIterator is the reasonable approach.
135 * khtml/rendering/render_text.cpp:
136 (RenderText::previousOffset):
137 (RenderText::nextOffset):
139 2005-01-25 David Harrison <harrison@apple.com>
141 Reviewed by Maciej and Richard.
143 <rdar://problem/3963731> AX VO: Changing window sizes causes a crash using with Voice Over - KWQPtrDictImpl::clear
145 * khtml/html/html_miscimpl.cpp:
146 (HTMLCollectionImpl::HTMLCollectionImpl):
147 Ensure that isHTMLDocument before calling HTMLDocument-only method.
149 2005-01-25 Richard Williamson <rjw@apple.com>
151 Part one of fix for <rdar://problem/3757712> REGRESSION (Mail): WebCore does not allow Devanagari ligature input
153 This patch changes the semantics of next() and previous() on
154 VisiblePosition to move a grapheme (character cluster) at a
155 time. This means that cursor navigation with correctly move
156 over an entire cluster.
158 However, the expected behavior for deleting a grapheme is to
159 delete individual code points, thus decomposing the grapheme
160 into it constituent parts. That will be addressed in the next
165 * khtml/editing/visible_position.cpp:
166 (khtml::VisiblePosition::previousPosition):
167 (khtml::VisiblePosition::nextPosition):
168 * khtml/editing/visible_position.h:
169 * khtml/rendering/render_object.cpp:
170 (RenderObject::previousOffset):
171 (RenderObject::nextOffset):
172 * khtml/rendering/render_object.h:
173 * khtml/rendering/render_text.cpp:
174 (RenderText::previousOffset):
175 (RenderText::nextOffset):
176 (RenderText::findNextInlineTextBox):
177 * khtml/rendering/render_text.h:
178 * khtml/xml/dom_nodeimpl.cpp:
179 (NodeImpl::previousOffset):
180 (NodeImpl::nextOffset):
181 * khtml/xml/dom_nodeimpl.h:
183 2005-01-25 David Harrison <harrison@apple.com>
187 <rdar://problem/3973067> AXWebArea for http://apple.netscape.com/ has an empty AXLinkUIElements
189 * kwq/KWQAccObject.mm:
190 (-[KWQAccObject accessibilityAttributeValue:]):
191 Omit ignored AXLinks from AXLinkUIElements result
193 2005-01-25 Ken Kocienda <kocienda@apple.com>
199 <rdar://problem/3972851> REGRESSION (179-180+): Repro crash in ApplyStyleCommand::cleanUpEmptyStyleSpans
201 * khtml/editing/htmlediting.cpp:
202 (khtml::ApplyStyleCommand::cleanUpEmptyStyleSpans): Added two null checks.
204 2005-01-25 Ken Kocienda <kocienda@apple.com>
210 <rdar://problem/3954710> Mail crashed while editing signatures - NodeImpl::isBlockFlow
212 The fix is more general than for this one bug, and may work to fix many crashers. The problem
213 is that the ReplaceSelectionCommand never checked whether its starting selection is empty. If
214 it is, then we need to bail before doing the work of the command, which we need to deref the
215 start and end points of the selection in order to do its work. I think you can see the crash
218 * khtml/editing/htmlediting.cpp:
219 (khtml::ReplaceSelectionCommand::doApply): Assert selection is not empty.
220 * kwq/WebCoreBridge.mm:
221 (partHasSelection): New helper function to test that bridge has a part with a selection.
223 Use new helper function to test part and selection; return from these function if this test fails.
225 (-[WebCoreBridge rangeByExpandingSelectionWithGranularity:])
226 (-[WebCoreBridge rangeByAlteringCurrentSelection:direction:granularity:])
227 (-[WebCoreBridge alterCurrentSelection:direction:granularity:])
228 (-[WebCoreBridge rangeByAlteringCurrentSelection:verticalDistance:])
229 (-[WebCoreBridge alterCurrentSelection:verticalDistance:])
230 (-[WebCoreBridge documentFragmentWithText:])
231 (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:smartReplace:])
232 (-[WebCoreBridge insertLineBreak])
233 (-[WebCoreBridge insertParagraphSeparator])
234 (-[WebCoreBridge insertParagraphSeparatorInQuotedContent])
235 (-[WebCoreBridge insertText:selectInsertedText:])
236 (-[WebCoreBridge deleteSelectionWithSmartDelete:])
237 (-[WebCoreBridge ensureSelectionVisible])
239 2005-01-24 Kevin Decker <kdecker@apple.com>
243 Fixed <rdar://problem/3932374> REGRESSION: 'ReferenceError - Can't find variable' JavaScript error at webxpress.fidelity.com
245 * khtml/html/html_miscimpl.h: Missing virtual identifiers for namedItem() and nextNamedItem() exposed a flaw that prevented finding variables in form [HTMLFormCollectionImpl] scopes.
248 2005-01-24 Vicki Murley <vicki@apple.com>
250 Reviewed by kocienda.
252 - fix <rdar://problem/3810661> computed style not handled for Apple extensions
254 * khtml/css/css_computedstyle.cpp: (DOM::):
255 (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): add -apple-line-clamp and -apple-text-size-adjust
257 2005-01-24 Darin Adler <darin@apple.com>
261 - fixed <rdar://problem/3969884> REGRESSION (179-180): Typing password not echoed as "bullets" at paypal.com when field is first focused
263 * kwq/KWQTextField.mm: (-[KWQTextFieldController initWithTextField:QLineEdit:]):
264 Sizing up the form editor, which fixes things for normal fields and search fields,
265 screws things up for password fields. Eventually, I'll need to figure out why this is
266 and file a bug so that the AppKit team fixes it. In the mean time, just check for the
267 case of the secure text field, and don't size up in that case.
269 2005-01-24 Ken Kocienda <kocienda@apple.com>
275 <rdar://problem/3963560> 8A354: Inserting Japanese text to the line head causes line break
277 * khtml/editing/htmlediting.cpp:
278 (khtml::ReplaceSelectionCommand::doApply): Add one more case where we merge content into the
279 existing line. This covers the situation see using the steps to reproduce this bug.
281 2005-01-21 Maciej Stachowiak <mjs@apple.com>
285 <rdar://problem/3967572> Editing should split elements before removing style
287 * khtml/editing/htmlediting.cpp:
288 (khtml::CompositeEditCommand::splitElement):
289 (khtml::CompositeEditCommand::mergeIdenticalElements):
290 (khtml::CompositeEditCommand::wrapContentsInDummySpan):
291 (khtml::CompositeEditCommand::splitTextNodeContainingElement):
292 (khtml::ApplyStyleCommand::applyInlineStyle):
293 (khtml::ApplyStyleCommand::splitTextAtStartIfNeeded):
294 (khtml::ApplyStyleCommand::splitTextAtEndIfNeeded):
295 (khtml::ApplyStyleCommand::splitTextElementAtStartIfNeeded):
296 (khtml::ApplyStyleCommand::splitTextElementAtEndIfNeeded):
297 (khtml::areIdenticalElements):
298 (khtml::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
299 (khtml::ApplyStyleCommand::mergeEndWithNextIfIdentical):
300 (khtml::ApplyStyleCommand::cleanUpEmptyStyleSpans):
301 (khtml::ApplyStyleCommand::addInlineStyleIfNeeded):
302 (khtml::InsertParagraphSeparatorCommand::doApply):
303 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply):
304 (khtml::InsertTextCommand::prepareForTextInsertion):
305 (khtml::SplitTextNodeCommand::doUnapply):
306 (khtml::SplitElementCommand::SplitElementCommand):
307 (khtml::SplitElementCommand::~SplitElementCommand):
308 (khtml::SplitElementCommand::doApply):
309 (khtml::SplitElementCommand::doUnapply):
310 (khtml::MergeIdenticalElementsCommand::MergeIdenticalElementsCommand):
311 (khtml::MergeIdenticalElementsCommand::~MergeIdenticalElementsCommand):
312 (khtml::MergeIdenticalElementsCommand::doApply):
313 (khtml::MergeIdenticalElementsCommand::doUnapply):
314 (khtml::WrapContentsInDummySpanCommand::WrapContentsInDummySpanCommand):
315 (khtml::WrapContentsInDummySpanCommand::~WrapContentsInDummySpanCommand):
316 (khtml::WrapContentsInDummySpanCommand::doApply):
317 (khtml::WrapContentsInDummySpanCommand::doUnapply):
318 (khtml::SplitTextNodeContainingElementCommand::SplitTextNodeContainingElementCommand):
319 (khtml::SplitTextNodeContainingElementCommand::~SplitTextNodeContainingElementCommand):
320 (khtml::SplitTextNodeContainingElementCommand::doApply):
321 * khtml/editing/htmlediting.h:
323 New layout test that shows the side benefit of this.
325 * layout-tests/editing/style/unbold-in-bold-expected.txt: Added.
326 * layout-tests/editing/style/unbold-in-bold.html: Added.
328 2005-01-24 Darin Adler <darin@apple.com>
332 - fixed <rdar://problem/3933435> -[DOMRange cloneContents] sometimes alters the original DOMRange
334 * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::processContents): Fixed code that was collapsing
335 the range after processing the contents. That's right for extract and delete, but not clone.
337 - fixed <rdar://problem/3714184> inline input works incorrectly when I type Korean slowly in textfield in form on www.google.co.kr
338 - fixed <rdar://problem/3193848> Can't enter SSN to sign up for Chase visa online account (changing focus inside key press handler)
339 - fixed <rdar://problem/3874683> REGRESSION (161-162): Crash after typing command-Z to undo after pasting text with newline in it into a text field <input type=text>
341 * kwq/KWQLineEdit.mm:
342 (QLineEdit::text): Changed to call a new string method on the controller instead of calling
343 stringValue, since stringValue has a bad side effect of ending inline input.
344 (QLineEdit::selectAll): Changed to only call selectText: when the field is already selected.
345 When you are giving the field focus, it automatically gets all selected, and this change
346 is required in the case where we defer the focus change.
348 * kwq/KWQTextField.h: Added a new string method to the controller.
349 * kwq/KWQTextField.mm:
350 (-[KWQTextFieldController setMaximumLength:]): Call the new string method instead of using stringValue.
351 (-[KWQTextFieldController controlTextDidChange:]): Removed the code to truncate at the first CR or LF.
352 That's now handled in the shouldChangeTextInRange method instead.
353 (-[KWQTextFieldController textView:shouldHandleEvent:]): Add new logic to defer responder changes until
354 after the event is handled. This makes sure the key gets into the field that's already handling it at
355 rather than ending up in the newly-focused field if the key press handler focuses a different element.
356 (-[KWQTextFieldController textView:didHandleEvent:]): Turn off deferral here, now that the key press
358 (-[KWQTextFieldController string]): Added. Calls stringValue only if there's no editor. If there is
359 an editor, calls string on that instead.
360 (-[KWQTextFieldController textView:shouldChangeTextInRange:replacementString:]): Added. Called by
361 the three field subclasses. Truncates incoming strings at the first CR or LF character. This works
362 properly with Undo, and the old technique did not.
363 (-[KWQTextFieldController preprocessString:]): Added. Helper used for all the setStringValue methods
364 so they all truncate at the first CR or LF as well as truncating to the appropriate length.
365 (-[KWQTextField setStringValue:]): Changed to call the controller.
366 (-[KWQTextField textView:shouldChangeTextInRange:replacementString:]): Added. Calls the controller.
367 (-[KWQSecureTextField setStringValue:]): More of the same.
368 (-[KWQSecureTextField textView:shouldChangeTextInRange:replacementString:]): Ditto.
369 (-[KWQSearchField setStringValue:]): Ditto.
370 (-[KWQSearchField textView:shouldChangeTextInRange:replacementString:]): Ditto.
372 * kwq/KWQWidget.h: Added the new setDeferFirstResponderChanges function.
374 (QWidget::~QWidget): Clear out the deferredFirstResponder global just in case we are destroyed
375 while we "have the ball".
376 (QWidget::hasFocus): If we are in the deferred mode, use the global to decide who to say is focused.
377 (QWidget::setFocus): If we are in the deferred mode, set the global instead of making something be
379 (QWidget::setDeferFirstResponderChanges): Set the boolean. If the boolean is being cleared, then
380 get the deferred first responder and call setFocus on it again, which will do the work we didn't
383 2005-01-24 Ken Kocienda <kocienda@apple.com>
389 <rdar://problem/3964350> Deleting all content and typing in a message gets one letter, then beeps
391 This is a problem with the way we turn key events, when a user starts typing, into editing commands.
392 Right now, that initial delete key in an empty window is turned into an editing command, and much
393 editing code runs that need not run. What's more, this is confusing the selection machinery. The
394 solution is to detect the "delete in an empty window" case and don't turn this into an editing
397 * khtml/editing/htmlediting.cpp:
398 (khtml::TypingCommand::deleteKeyPressed)
400 2005-01-23 Adele Amchan <adele@apple.com>
402 Fixed <rdar://problem/3964286> REGRESSION (178-179): menus and "go to old site" link at Ameritrade's new site don't work
404 Removed check for document from checkCompleted. In this case, WebCore never knew that a WebImageView was complete because
405 it fell into this document check case in checkCompleted.
406 Added check for document to tokenizerProcessedData (see <rdar://problem/3807144>)
410 * khtml/khtml_part.cpp:
412 (KHTMLPart::checkCompleted):
413 * khtml/khtml_part.h:
414 * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::tokenizerProcessedData):
416 2005-01-21 Richard Williamson <rjw@apple.com>
418 Fixed <rdar://problem/3759399> Javascript / Liveconnect problems ((event handler):Undefined value)
420 Java applets specified with <object> or <embed> weren't scriptable. Now they are.
424 * khtml/html/html_objectimpl.cpp:
425 (HTMLEmbedElementImpl::getEmbedInstance):
426 (HTMLObjectElementImpl::getObjectInstance):
428 2005-01-21 Ken Kocienda <kocienda@apple.com>
434 <rdar://problem/3959464> REGRESSION (Mail): Insertion point goes back to beginning of document after deleting
436 * khtml/editing/htmlediting.cpp:
437 (khtml::DeleteSelectionCommand::handleGeneralDelete): Add special case to handle retaining a fully-selected block.
439 * layout-tests/editing/deleting/delete-3959464-fix-expected.txt: Added.
440 * layout-tests/editing/deleting/delete-3959464-fix.html: Added.
442 2005-01-21 Richard Williamson <rjw@apple.com>
444 Fixed <rdar://problem/3966998> REGRESSION(179-TOT) clicking on gmail message brings me to blank screen
446 getElementById() sometimes returns Undefined() instead of Null().
450 * khtml/ecma/kjs_dom.cpp:
451 (DOMDocumentProtoFunc::tryCall):
453 2005-01-21 David Hyatt <hyatt@apple.com>
455 Fix for 3773809, make sure that overflow regions never end up at an invalid scroll offset because of a layout change.
459 * khtml/rendering/render_layer.cpp:
460 (RenderLayer::updateScrollInfoAfterLayout):
462 2005-01-21 David Hyatt <hyatt@apple.com>
464 Fix for 3966349, hang loading page. Make sure that loops using popOneBlock properly check for a null
465 blockStack to avoid an infinite loop.
469 * khtml/html/htmlparser.cpp:
470 (KHTMLParser::parseToken):
471 (KHTMLParser::insertNode):
472 (KHTMLParser::popInlineBlocks):
474 2005-01-21 Ken Kocienda <kocienda@apple.com>
480 <rdar://problem/3957204> Mail crashed when sending a message in ~InsertParagraphSeparatorInQuotedContentCommand
482 * khtml/editing/htmlediting.cpp:
483 (khtml::InsertParagraphSeparatorInQuotedContentCommand::InsertParagraphSeparatorInQuotedContentCommand):
484 InsertParagraphSeparatorInQuotedContentCommand has this member variable: DOM::ElementImpl *m_breakNode;
485 I failed to initialize this variable to null in the constructor, and there is an uncommonly-traveled
486 code path which does not set this variable to something good. In the destructor, we check for null,
487 and deref if non-null. Obvious "BOOM" potential. Fixed.
489 2005-01-21 Ken Kocienda <kocienda@apple.com>
495 <rdar://problem/3966311> REGRESSION (Mail): Hitting return makes space character disappear
497 * khtml/editing/htmlediting.cpp:
498 (khtml::InsertParagraphSeparatorCommand::doApply): When writing the code to insert a block
499 in response to the return key, I did not write code to cover the case described in the bug.
501 * layout-tests/editing/inserting/insert-div-025-expected.txt: Added.
502 * layout-tests/editing/inserting/insert-div-025.html: Added.
504 2005-01-20 Maciej Stachowiak <mjs@apple.com>
508 <rdar://problem/3965196> security fix for javascript: exploit missed one case (already fixed in updates)
510 * khtml/ecma/kjs_window.cpp:
511 (WindowFunc::tryCall): correct mistake in earlier fix for the following bug, caught by Adele:
513 <rdar://problem/3790449> REGRESSION (Mail): underline behavior is flaky because of how CSS handles text-decoration
515 2005-01-20 Maciej Stachowiak <mjs@apple.com>
519 <rdar://problem/3965466> editing needs to insert text before applying typing style
521 * khtml/editing/htmlediting.cpp:
522 (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): Remove a FIXME comment.
523 (khtml::InsertLineBreakCommand::doApply): Apply style to the BR
524 node after inserting it.
525 (khtml::InsertTextCommand::prepareForTextInsertion): Don't try to
526 apply style to any new nodes created before inserting.
527 (khtml::InsertTextCommand::input): Apply style to the inserted range
528 after doing the text insert.
529 * khtml/editing/htmlediting.h:
531 This change leads to improved results on one of the layout tests:
533 * layout-tests/editing/inserting/insert-div-024-expected.txt:
537 2005-01-20 Ken Kocienda <kocienda@apple.com>
543 <rdar://problem/3964646> REGRESSION (179-180): Typing space at end of line makes following paragraph disappear
545 * khtml/editing/htmlediting.cpp:
546 (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Recent change to block placeholder removal code
547 caused this regression. The code became too aggressive in removing block placeholders, and would remove them
548 from blocks other than the block containing the selection.
549 * layout-tests/editing/inserting/insert-div-023-expected.txt: This file had a spurious BR element in it that
550 I did not notice earlier.
551 * layout-tests/editing/inserting/insert-div-024-expected.txt: Ditto.
553 2005-01-20 David Hyatt <hyatt@apple.com>
555 Fix for oddness on albertsons.com. Make sure not to crash when setting/removing style properties on a node
556 with no document. The bug # is 3813900.
560 2005-01-20 David Harrison <harrison@apple.com>
564 PARTIAL fix for following bug. Create attributed string with fonts and links. Still need to add attachments.
565 <rdar://problem/3942606> AX: Support kAXAttributedStringForTextMarkerRangeParameterizedAttribute
567 * kwq/KWQAccObject.mm:
568 (-[KWQAccObject textUnderElement]):
569 Touched up previous checkin to match code review comments.
571 (-[KWQAccObject value]):
572 Use plainText for this one instead of obsolete attributedString.
574 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
575 Advertise AXAttributedStringForTextMarkerRange.
577 (AXAttributeStringAddFont):
578 (AXAttributeStringAddElement):
579 (-[KWQAccObject linkUIElementForNode:]):
580 (-[KWQAccObject _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
581 (-[KWQAccObject accessibilityAttributedStringForRange:]):
582 New routines to support AXAttributedStringForTextMarkerRange.
584 (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
585 Use new routines instead of obsolete attributedString.
587 2005-01-20 David Harrison <harrison@apple.com>
591 <rdar://problem/3960196> AX Crash in DOM::Range::setStartBefore
593 * khtml/xml/dom_docimpl.cpp:
594 (DocumentImpl::getAccObjectCache):
595 Adjust when detecting cache in non-top level WebArea.
596 * kwq/KWQAccObject.mm:
597 (-[KWQAccObject textUnderElement]):
598 (-[KWQAccObject accessibilityAttributeValue:]):
599 Make sure the elements document is the current one for the part.
601 2005-01-20 Darin Adler <darin@apple.com>
605 - fixed <rdar://problem/3922980> Mail not crashing, just quitting itself suddenly in -[WebHTMLView(MailExtras) findString:options:]
607 * khtml/dom/dom2_range.cpp: (DOM::operator==): Handle null and detached ranges without raising exceptions.
608 The uncaught exception would make the entire program terminate.
610 - fixed <rdar://problem/3885729> attempting to modify a computed style does nothing, but should raise a DOM exception
612 * kwq/DOM-CSS.mm: (-[DOMCSSStyleDeclaration setProperty:::]): Uncommented this code which I had to disable
613 back in November because Mail was stumbling over it.
615 - fixed <rdar://problem/3943049> focus() called during onload handler results in square text field on <input type=search>
617 * kwq/KWQLineEdit.mm: (QLineEdit::baselinePosition): Change computation so it will work even for fields
618 that position their text in a way that depends on vertical size. In the case of a search field, the text
619 is centered, so the old logic was broken.
620 * kwq/KWQTextField.mm: (-[KWQTextFieldController initWithTextField:QLineEdit:]): Set the frame size to
621 something large enough to accomodate the field editor. If we start the frame at size 0,0 we run into
622 AppKit trouble when it insets the frame to figure out the frame for the field editor. In the case of this
623 bug this happens because we become first responder before being sized and positioned by the HTML layout code.
625 - improved debugging output when using "po" from gdb with Objective-C DOM
628 (-[DOMNode description]): Added. Includes node name ("<tr>") and node value (e.g., string for text node).
629 (-[DOMRange description]): Tweaked format.
631 2005-01-19 Richard Williamson <rjw@apple.com>
633 After further discussion with Real we have decided to NOT include the
634 additional CLSID for the real plugin. See 3958601.
638 * khtml/rendering/render_frames.cpp:
639 (RenderPartObject::updateWidget):
641 2005-01-19 David Harrison <harrison@apple.com>
645 <rdar://problem/3949429> AX: word marker routines returns incorrect data for empty line
647 Previous checkin for this bug was missing some of the patch. Editing snafu with multiple changes in tree.
649 * kwq/KWQAccObject.mm:
650 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
651 (-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]):
652 (-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]):
653 (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
654 (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
655 (-[KWQAccObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
656 (-[KWQAccObject doAXPreviousParagraphStartTextMarkerForTextMarker:]):
658 2005-01-19 Ken Kocienda <kocienda@apple.com>
662 * khtml/editing/htmlediting.cpp:
663 (khtml::InsertParagraphSeparatorCommand::applyStyleAfterInsertion): Small, cosmetic change John and I decided
664 to do on my last checkin, but I forgot to do before landing.
666 2005-01-19 Ken Kocienda <kocienda@apple.com>
672 <rdar://problem/3959727> REGRESSION (Mail): Style not preserved on blank lines
674 * khtml/editing/htmlediting.cpp:
675 (khtml::CompositeEditCommand::applyStyle):
676 (khtml::CompositeEditCommand::insertBlockPlaceholder): New function that unconditionally adds a block placeholder.
677 (khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Now returns bool based on whether
678 placeholder was added or not.
679 (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Now searches all the descendents of a block
680 looking for a placeholder. The old code, which just looked at the last child of a node, started missing
681 once block placeholders became styled (which started happening with this patch).
682 (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Now handles applying typing style
683 to a block placeholder at call time, rather than setting the typing style as a latent style that
684 might be applied later. This is an important part of the bug fix.
685 (khtml::DeleteSelectionCommand::doApply): Now uses bool return value from insertBlockPlaceholderIfNeeded()
686 and passes it along to calculateStyleBeforeInsertion, so the case where a block placeholder needs to
687 be styled can be detected.
688 (khtml::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): Changed the way this class
689 managed style. Before it would calculate and set typing style for the block added. This is not
690 sufficient. Added blocks need to styled immediately. Some name changes to instance variables in
691 this class due to the change to accommodate this change.
692 (khtml::InsertParagraphSeparatorCommand::~InsertParagraphSeparatorCommand): Name changes, as above.
693 (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): Ditto.
694 (khtml::InsertParagraphSeparatorCommand::applyStyleAfterInsertion): Ditto.
695 (khtml::InsertParagraphSeparatorCommand::doApply): Ditto.
696 (khtml::ReplaceSelectionCommand::doApply): Improve check for testing when a placeholder
697 block can be removed in its entirety after the insertion.
698 * khtml/editing/htmlediting.h: Update header accordingly.
699 * khtml/khtml_part.cpp:
700 (KHTMLPart::selectionComputedStyle): Move position for computed style check downstream before
701 doing check when the position is in an empty block (this makes sure any style on any block
702 placeholder is accounted for).
704 New layout tests to check bug fix.
706 * layout-tests/editing/style/block-style-004-expected.txt: Added.
707 * layout-tests/editing/style/block-style-004.html: Added.
708 * layout-tests/editing/style/block-style-005-expected.txt: Added.
709 * layout-tests/editing/style/block-style-005.html: Added.
710 * layout-tests/editing/style/block-style-006-expected.txt: Added.
711 * layout-tests/editing/style/block-style-006.html: Added.
713 Results updated to reflect new block placeholder code.
715 * layout-tests/editing/inserting/insert-div-004-expected.txt
716 * layout-tests/editing/inserting/insert-div-005-expected.txt
717 * layout-tests/editing/inserting/insert-div-006-expected.txt
718 * layout-tests/editing/inserting/insert-div-008-expected.txt
719 * layout-tests/editing/inserting/insert-div-011-expected.txt
720 * layout-tests/editing/inserting/insert-div-012-expected.txt
721 * layout-tests/editing/inserting/insert-div-013-expected.txt
722 * layout-tests/editing/inserting/insert-div-014-expected.txt
723 * layout-tests/editing/inserting/insert-div-015-expected.txt
724 * layout-tests/editing/inserting/insert-div-016-expected.txt
725 * layout-tests/editing/inserting/insert-div-017-expected.txt
726 * layout-tests/editing/inserting/insert-div-018-expected.txt
727 * layout-tests/editing/inserting/insert-div-019-expected.txt
728 * layout-tests/editing/inserting/insert-div-021-expected.txt
729 * layout-tests/editing/inserting/insert-div-022-expected.txt
730 * layout-tests/editing/inserting/insert-div-023-expected.txt
731 * layout-tests/editing/inserting/insert-div-024-expected.txt
733 2005-01-19 David Hyatt <hyatt@apple.com>
735 Dont null-check the renderer before submitting, since a script can set it to display:none and still expect the
736 submission to occur. Fixes bug #3477282.
740 (DOM::HTMLInputElementImpl::defaultEventHandler):
742 2005-01-18 Richard Williamson <rjw@apple.com>
744 Fixed several issues all arising from analysis of plugin detection code at ifilm.com:
746 Fixed <rdar://problem/3958592> can't script plug-ins if plug-in is invoked with <object> element instead of <embed>
747 Fixed <rdar://problem/3958597> <object> elements with IDs do not show up as named properties of the document
748 Fixed <rdar://problem/3960973> DOM objects for plugin elements are not accessible
749 Fixed <rdar://problem/3958601> need an additional class ID in WebCore for the Real plug-in
751 We now support accessing scriptable plugin objects that are specified with <applet>, <embed>, or <object>
752 tags. Also, if any of these elements are named they can be accessed from the document or window objects.
753 Finally, DOM methods are properties will be forwarded appropriately for the plugin's root scriptable object.
757 * khtml/dom/html_document.cpp:
758 (HTMLDocument::objects):
759 * khtml/dom/html_document.h:
760 * khtml/ecma/kjs_dom.cpp:
761 (DOMDocumentProtoFunc::tryCall):
762 (DOMElementProtoFunc::tryCall):
763 (KJS::getRuntimeObject):
764 * khtml/ecma/kjs_dom.h:
765 * khtml/ecma/kjs_html.cpp:
766 (KJS::HTMLDocument::tryGet):
767 (KJS::HTMLElement::tryGet):
768 (KJS::HTMLCollection::tryGet):
769 (KJS::HTMLCollection::getNamedItems):
770 * khtml/ecma/kjs_window.cpp:
772 * khtml/html/html_miscimpl.cpp:
773 (HTMLCollectionImpl::traverseNextItem):
774 * khtml/html/html_miscimpl.h:
775 (DOM::HTMLCollectionImpl::):
776 * khtml/html/html_objectimpl.cpp:
777 (HTMLAppletElementImpl::getAppletInstance):
778 (HTMLObjectElementImpl::HTMLObjectElementImpl):
779 (HTMLObjectElementImpl::getObjectInstance):
780 * khtml/html/html_objectimpl.h:
781 * khtml/rendering/render_frames.cpp:
782 (RenderPartObject::updateWidget):
783 * kwq/KWQKHTMLPart.h:
784 * kwq/KWQKHTMLPart.mm:
785 (KWQKHTMLPart::getObjectInstanceForView):
787 2005-01-18 David Hyatt <hyatt@apple.com>
789 Fix for 3948123, rolling over link erases nearby text. The repaint rect check for lines was wrong whenever
790 two lines overlapped.
794 * khtml/rendering/render_flow.cpp:
795 (RenderFlow::paintLines):
797 2005-01-18 Ken Kocienda <kocienda@apple.com>
803 <rdar://problem/3960116> Focus rings paint incorrectly for contenteditable blocks in web pages
805 * khtml/rendering/render_flow.cpp:
806 (RenderFlow::addFocusRingRects): Fix painting of focus rings so that ring only paints around
807 outermost contenteditable elements.
809 2005-01-18 David Harrison <harrison@apple.com>
813 <rdar://problem/3959668> accessibilityFocusedUIElement sometimes returns an ignored element; it must not
815 * kwq/KWQAccObject.mm:
816 (-[KWQAccObject accessibilityFocusedUIElement]):
817 Return parentObjectUnignored if focused object is ignored.
819 2005-01-18 Ken Kocienda <kocienda@apple.com>
825 <rdar://problem/3952877> REGRESSION (Mail): Command-left/right-arrows don't work with file attachment
827 * khtml/editing/selection.cpp:
828 (khtml::nodeForInlineBox): New helper function used in reimplementation of function below.
829 (khtml::selectionForLine): Reimplemented using line box smarts. I originally wrote this code when
830 I had a less than full understanding of line layout. I can do better now, and my new version no
831 longer fails to notice attachments when doing the kind of navigation mentioned in the bug.
833 2005-01-17 David Harrison <harrison@apple.com>
835 Reviewed by John Sullivan.
837 <rdar://problem/3949429> AX: word marker routines returns incorrect data for empty line
838 <rdar://problem/3949848> AX: paragraph marker routines do not work when given a paragraph end marker
840 Also fixed sentence support in the same way.
842 * kwq/KWQAccObject.mm:
843 (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
844 (-[KWQAccObject doAXNextSentenceEndTextMarkerForTextMarker:]):
845 (-[KWQAccObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
846 (-[KWQAccObject doAXNextParagraphEndTextMarkerForTextMarker:]):
847 (-[KWQAccObject doAXPreviousParagraphStartTextMarkerForTextMarker:]):
848 Move one position in desired direction before calling visible_units.cpp code.
850 2005-01-17 David Harrison <harrison@apple.com>
852 Updated expected test results.
854 <rdar://problem/3945880> line-ending space seems not to be present
856 * layout-tests/editing/deleting/delete-ws-fixup-001-expected.txt:
857 * layout-tests/editing/deleting/delete-ws-fixup-002-expected.txt:
858 * layout-tests/editing/inserting/insert-div-020-expected.txt:
859 * layout-tests/editing/inserting/insert-div-021-expected.txt:
860 * layout-tests/editing/inserting/insert-div-022-expected.txt:
861 * layout-tests/editing/inserting/insert-div-023-expected.txt:
862 * layout-tests/editing/inserting/insert-div-024-expected.txt:
864 2005-01-17 David Harrison <harrison@apple.com>
866 Reviewed by Dave Hyatt (bidi.cpp) and Darin Adler (selection.cpp).
868 <rdar://problem/3945880> line-ending space seems not to be present
870 * khtml/editing/selection.cpp:
871 (khtml::Selection::validate):
872 Extend AFTER_WHITE_SPACE code to support white spac in the middle of paragraphs, not just the end.
873 * khtml/rendering/bidi.cpp:
874 (khtml::RenderBlock::findNextLineBreak):
875 Pick left/rightness of word selection based on being at the end of paragraph (i.e. after a hard line break).
877 2005-01-17 Darin Adler <darin@apple.com>
879 Reviewed by John Louch.
881 - fixed <rdar://problem/3958503> need screenX and screenY to use WebKit windowFrame delegate
883 * khtml/ecma/kjs_window.cpp: (Window::get): Change screenX and screenY to use frameGeometry instead
884 of using mapToGlobal and screen in a complicated way.
885 * kwq/KWQKHTMLView.mm: Removed unused mapToGlobal function.
886 * kwq/KWQWindowWidget.h: Ditto.
887 * kwq/KWQWindowWidget.mm: Ditto.
889 2005-01-17 David Hyatt <hyatt@apple.com>
891 Fix a screwup in rightmost/lowets position computation. 3955207. Make sure floats with layers are still checked.
895 * khtml/rendering/render_block.cpp
897 2005-01-17 Ken Kocienda <kocienda@apple.com>
901 <rdar://problem/3953366> Problems with typing attributes in HTML compose
903 * khtml/editing/htmlediting.cpp:
904 (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Remove misguided "optimization"
905 that tried to sense when typing style could be cleared without actually doing a style diff between
906 before-delete and after-delete positions. Removing this extra check and running the
907 general-purpose code fixes the bug.
909 2005-01-17 Richard Williamson <rjw@apple.com>
911 Fixed <rdar://problem/3753030> Need to ensure same origin for plugin binding invocations (origin security rules)
913 Keep track of originating execution context and target execution
914 context for native JS object wrappers, and perform appropriate
917 Reviewed by David Harrison.
919 * khtml/ecma/kjs_binding.cpp:
920 (ScriptInterpreter::isGlobalObject):
921 (ScriptInterpreter::isSafeScript):
922 (ScriptInterpreter::interpreterForGlobalObject):
923 * khtml/ecma/kjs_binding.h:
924 * khtml/ecma/kjs_window.cpp:
925 (Window::interpreter):
926 (Window::isSafeScript):
927 * khtml/ecma/kjs_window.h:
928 * kwq/DOMInternal.mm:
929 (-[WebScriptObject _initializeScriptDOMNodeImp]):
930 * kwq/KWQKHTMLPart.mm:
931 (KWQKHTMLPart::windowScriptObject):
932 (KWQKHTMLPart::windowScriptNPObject):
933 * kwq/WebCoreBridge.mm:
935 (-[WebCoreBridge init]):
937 2005-01-17 Ken Kocienda <kocienda@apple.com>
943 <rdar://problem/3786659> REGRESSION (Mail): editable WebViews don't work with
944 "size up" and "size down" NSFontManager changes
946 * khtml/css/cssparser.cpp:
947 (CSSParser::parseValue): Add support for parsing new font size delta property.
948 * khtml/css/cssproperties.c: Generated file.
949 * khtml/css/cssproperties.h: Ditto.
950 * khtml/css/cssproperties.in: Add support for parsing new font size delta property.
951 * khtml/editing/htmlediting.cpp:
952 (khtml::isEmptyStyleSpan): New helper function. Code existed before, but now factored out for convenient use.
953 (khtml::CompositeEditCommand::removeNodeAttribute): Does check on value to see it exists before creating
954 and running command to do the removal.
955 (khtml::ApplyStyleCommand::doApply): Now calls new applyRelativeFontStyleChange() function as part of its work.
956 (khtml::ApplyStyleCommand::applyRelativeFontStyleChange): New function that does the "heavy lifting" to handle
957 relative font size changes.
958 (khtml::ApplyStyleCommand::applyInlineStyle): Range check the start and end positions to make sure the start is
959 before or equal to the end. Swap them if not true. I ran into this problem in some similar code in
960 applyRelativeFontStyleChange(). Moving that goodness here too.
961 (khtml::ApplyStyleCommand::splitTextAtEndIfNeeded): Uses a local variable to save a value used often.
962 Code is the same, but reads better now. Function now returns bool as well, just like splitTextAtStartIfNeeded.
963 I use the bool return value now (I obviously did not need it before).
964 (khtml::ApplyStyleCommand::computedFontSize): New helper function.
965 (khtml::ApplyStyleCommand::joinChildTextNodes): Ditto.
966 (khtml::createStyleSpanElement): Ditto.
967 * khtml/editing/htmlediting.h: Update header accordingly.
968 * khtml/editing/jsediting.cpp: Add new command string to enable relative font size changes.
970 (-[DOMCSSStyleDeclaration _fontSizeDelta]): New convenience.
971 (-[DOMCSSStyleDeclaration _setFontSizeDelta:]): Ditto.
972 * kwq/DOMPrivate.h: Declare new conveniences.
973 * layout-tests/editing/editing.js: Add new JS to enable relative font size changes, as well as explicit font size setting.
974 * layout-tests/editing/style/relative-font-size-change-001-expected.txt: Added.
975 * layout-tests/editing/style/relative-font-size-change-001.html: Added.
976 * layout-tests/editing/style/relative-font-size-change-002-expected.txt: Added.
977 * layout-tests/editing/style/relative-font-size-change-002.html: Added.
978 * layout-tests/editing/style/relative-font-size-change-003-expected.txt: Added.
979 * layout-tests/editing/style/relative-font-size-change-003.html: Added.
980 * layout-tests/editing/style/relative-font-size-change-004-expected.txt: Added.
981 * layout-tests/editing/style/relative-font-size-change-004.html: Added.
983 2005-01-14 Darin Adler <darin@apple.com>
985 * khtml/css/cssproperties.c: Regenerated with gperf 3.0.1.
986 * khtml/css/cssvalues.c: Regenerated with gperf 3.0.1.
987 * khtml/misc/htmlattrs.c: Regenerated with gperf 3.0.1.
988 * khtml/misc/htmltags.c: Regenerated with gperf 3.0.1.
990 2005-01-14 Chris Blumenberg <cblu@apple.com>
992 Fixed: <rdar://problem/3886415> arrow keys don't work when the user hits Back to return to RSS page
996 (KWQKHTMLPart::openURLFromPageCache): restore mousePressNode
997 (KWQKHTMLPart::mousePressNode): new
998 * kwq/KWQPageState.h:
999 * kwq/KWQPageState.mm:
1000 (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:interpreterBuiltins:]): save the mousePressNode
1001 (-[KWQPageState clear]): clear the mousePressNode
1002 (-[KWQPageState dealloc]): deref the mousePressNode
1003 (-[KWQPageState mousePressNode]): new
1007 2005-01-13 Vicki Murley <vicki@apple.com>
1011 - fix <rdar://problem/3946836> Safari about box lists 2004 instead of 2005
1013 * WebCore.pbproj/project.pbxproj: bump "2004" to "2005"
1015 2005-01-13 David Harrison <harrison@apple.com>
1017 Reviewed by Ken Kocienda.
1019 Better fix for 3905066.
1021 * khtml/editing/htmlediting.cpp:
1022 (khtml::InsertParagraphSeparatorCommand::doApply):
1024 2005-01-10 Maciej Stachowiak <mjs@apple.com>
1028 <rdar://problem/3758033> REGRESSION (Mail): Support attributes in marked text (International input)
1030 * khtml/rendering/render_text.cpp:
1031 (InlineTextBox::paint): Support painting custom underline markers for
1032 marked text in place of generic yellow.
1033 (InlineTextBox::paintMarkedTextUnderline): New method that handles this.
1034 * khtml/rendering/render_text.h:
1035 * kwq/KWQKHTMLPart.h: Declare new methods and structs.
1036 * kwq/KWQKHTMLPart.mm:
1037 (KWQKHTMLPart::clear): Clear marked test underlines.
1038 (KWQKHTMLPart::setMarkedTextRange): Takes attributes and ranges now.
1039 (convertAttributesToUnderlines): Converts NSAttributedString attributes
1040 to simplified and C++-friendly form.
1041 (KWQKHTMLPart::markedTextUsesUnderlines): New method.
1042 (KWQKHTMLPart::markedTextUnderlines): New method.
1043 * kwq/KWQPainter.mm:
1044 (QPainter::drawLineForText): Handle pen width.
1045 * kwq/WebCoreBridge.h:
1046 * kwq/WebCoreBridge.mm:
1047 (-[WebCoreBridge setMarkedTextDOMRange:customAttributes:ranges:]): Take attributes
1049 * kwq/WebCoreTextRenderer.h:
1051 2005-01-12 David Harrison <harrison@apple.com>
1053 Reviewed by Dave Hyatt.
1055 <rdar://problem/3888973> AX: Parent AXWebArea of nested AXWebAreas is messed up
1057 * kwq/KWQAccObject.mm:
1058 (-[KWQAccObject addChildrenToArray:]):
1059 Use the widget's outer view.
1061 2005-01-12 David Harrison <harrison@apple.com>
1063 Reviewed by Darin Adler.
1065 <rdar://problem/3949908> Crash when asking for the kAXLengthForTextMarkerRangeParameterizedAttribute
1067 * khtml/xml/dom_nodeimpl.cpp:
1068 (NodeImpl::displayNode):
1069 Add quotes around text node content.
1070 (NodeBaseImpl::childNode):
1071 Add nil check to return nil rather than crash when child node not found.
1072 * kwq/KWQAccObject.mm:
1073 (-[KWQAccObject doAXStringForTextMarkerRange:]):
1074 Pass range compliant positions to TextIterator.
1076 2005-01-12 David Hyatt <hyatt@apple.com>
1078 Fix for 3951203, CSS border style incorrectly clipped on inline elements. Make sure the repaint rect set during
1079 line layout is smarter about including the overflow for both old states and new states.
1083 * khtml/rendering/bidi.cpp:
1084 (khtml::RenderBlock::layoutInlineChildren):
1086 2005-01-12 David Hyatt <hyatt@apple.com>
1088 Fix for bug 3937608, versiontracker.com flashes and displays the right column below content. Make sure to move
1089 tables/overflows that dont fit within a block only in strict mode.
1091 Fix for bug 3931049, characters dont show up when typing. Make sure to dirty the right lines when this specific
1092 case in editing is hit.
1094 Reviewed by darin (first one), kocienda (second one)
1096 * khtml/rendering/render_block.cpp:
1097 (khtml::RenderBlock::getClearDelta):
1098 * khtml/rendering/render_flow.cpp:
1099 (RenderFlow::dirtyLinesFromChangedChild):
1100 * khtml/rendering/render_line.cpp:
1101 (khtml::InlineFlowBox::verticallyAlignBoxes):
1103 2005-01-12 Ken Kocienda <kocienda@apple.com>
1109 <rdar://problem/3926142> REGRESSION (Mail): Deleting text decreases quote level
1111 * khtml/editing/htmlediting.cpp:
1112 (khtml::DeleteSelectionCommand::initializePositionData): Change test that will prevent block
1113 merging. End-of-line test was just wrong. Call new start-of and end-of paragraph functions
1114 added to visible_position files.
1115 (khtml::DeleteSelectionCommand::moveNodesAfterNode): Add tests for BR elements, which makes
1116 tests to determine when to stop moving nodes more complete and correct. Also improved comments.
1117 * khtml/editing/visible_position.cpp:
1118 (khtml::isFirstVisiblePositionInParagraph): New function.
1119 (khtml::isLastVisiblePositionInParagraph): New function.
1120 * khtml/editing/visible_position.h: Update header accordingly.
1121 * layout-tests/editing/deleting/delete-block-merge-contents-002-expected.txt: New results, slightly different from former
1122 results but still correct.
1123 * layout-tests/editing/deleting/delete-block-merge-contents-007-expected.txt: Ditto.
1124 * layout-tests/editing/deleting/delete-block-merge-contents-018-expected.txt: Added.
1125 * layout-tests/editing/deleting/delete-block-merge-contents-018.html: Added.
1126 * layout-tests/editing/deleting/delete-block-merge-contents-019-expected.txt: Added.
1127 * layout-tests/editing/deleting/delete-block-merge-contents-019.html: Added.
1128 * layout-tests/editing/deleting/delete-block-merge-contents-020-expected.txt: Added.
1129 * layout-tests/editing/deleting/delete-block-merge-contents-020.html: Added.
1130 * layout-tests/editing/deleting/delete-block-merge-contents-021-expected.txt: Added.
1131 * layout-tests/editing/deleting/delete-block-merge-contents-021.html: Added.
1132 * layout-tests/editing/deleting/delete-line-014-expected.txt: These new results are actually better, and fix a bug.
1134 2005-01-11 Richard Williamson <rjw@apple.com>
1136 Fixed 3922875. Fall back to DOM object is EMBED element
1137 has no associated runtime object.
1141 * khtml/ecma/kjs_dom.cpp:
1142 (KJS::getRuntimeObject):
1143 * khtml/ecma/kjs_html.cpp:
1144 (KJS::HTMLDocument::tryGet):
1145 (KJS::HTMLElement::tryGet):
1146 (KJS::HTMLCollection::tryGet):
1147 (KJS::HTMLCollection::getNamedItems):
1149 2005-01-11 David Hyatt <hyatt@apple.com>
1151 Fix for 3882299, missing content on gibson.com. Change our handling of " and ' in certain states of the parser to match
1156 * khtml/html/htmltokenizer.cpp:
1157 (khtml::HTMLTokenizer::parseTag):
1159 2005-01-11 Chris Blumenberg <cblu@apple.com>
1161 Fixed: <rdar://problem/3930733> Mail prints second page of email blank
1165 * khtml/rendering/render_canvas.cpp:
1166 (RenderCanvas::paint): cache the print rect since the dirty rect can get changed during printing
1167 * khtml/rendering/render_flow.cpp:
1168 (RenderFlow::paintLines): removed null check since the print rect should never be null
1169 * khtml/rendering/render_list.cpp:
1170 (RenderListMarker::paint): ditto
1171 * kwq/KWQKHTMLPart.mm:
1172 (KWQKHTMLPart::adjustPageHeight): don't set the print rect here since this method is not called for the last page
1174 2005-01-10 Ken Kocienda <kocienda@apple.com>
1180 <rdar://problem/3943648> extra line is inserted after pressing return within quoted text of reply
1182 * khtml/editing/htmlediting.cpp:
1183 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): This bug was the result of a
1184 simple coding mistake. A local variable was erroneously redefined in a deeper scope, and so the
1185 result calculated in that deeper scope was not available when tested.
1187 2005-01-10 Ken Kocienda <kocienda@apple.com>
1193 <rdar://problem/3946852> Option-e goes to next line
1195 * khtml/editing/htmlediting.cpp:
1196 (khtml::ReplaceSelectionCommand::doApply): Tweak case used to determine when merging content
1197 into the start line is done. We plan to change pretty substantially soon to better handle
1198 the problem described in <rdar://problem/3937352> Quote level not maintained when copied
1199 and pasted within a Mail message. In the meantime, this change does no harm, and fixes the bug.
1201 2005-01-10 Ken Kocienda <kocienda@apple.com>
1207 <rdar://problem/3907005> Applying block styles to a line of text can unexpectedly affect other lines
1209 * khtml/editing/htmlediting.cpp:
1210 (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): New function which moves "paragraphs"
1211 to their own blocks if needed so that a block style can be applied.
1212 (khtml::CompositeEditCommand::isMailBlockquote): Moved this function to base class so it can be used more generally.
1213 (khtml::ApplyStyleCommand::applyBlockStyle): Pass a node instead of a block to addBlockStyleIfNeeded().
1214 (khtml::ApplyStyleCommand::addBlockStyleIfNeeded): Now accepts a node instead of a block for styling.
1215 This function also now calls moveParagraphContentsToNewBlockIfNecessary() to make sure that only the current
1216 paragraph is styled.
1217 (khtml::SetNodeAttributeCommand::doUnapply): Should not assert on undo if old value of attribute was null.
1218 Should remove attributue instead.
1219 * khtml/editing/htmlediting.h: Touch function declarations accordingly.
1220 * layout-tests/editing/style/create-block-for-style-001-expected.txt: Added.
1221 * layout-tests/editing/style/create-block-for-style-001.html: Added.
1222 * layout-tests/editing/style/create-block-for-style-002-expected.txt: Added.
1223 * layout-tests/editing/style/create-block-for-style-002.html: Added.
1224 * layout-tests/editing/style/create-block-for-style-003-expected.txt: Added.
1225 * layout-tests/editing/style/create-block-for-style-003.html: Added.
1226 * layout-tests/editing/style/create-block-for-style-004-expected.txt: Added.
1227 * layout-tests/editing/style/create-block-for-style-004.html: Added.
1228 * layout-tests/editing/style/create-block-for-style-005-expected.txt: Added.
1229 * layout-tests/editing/style/create-block-for-style-005.html: Added.
1230 * layout-tests/editing/style/create-block-for-style-006-expected.txt: Added.
1231 * layout-tests/editing/style/create-block-for-style-006.html: Added.
1232 * layout-tests/editing/style/create-block-for-style-007-expected.txt: Added.
1233 * layout-tests/editing/style/create-block-for-style-007.html: Added.
1234 * layout-tests/editing/style/create-block-for-style-008-expected.txt: Added.
1235 * layout-tests/editing/style/create-block-for-style-008.html: Added.
1236 * layout-tests/editing/style/create-block-for-style-009-expected.txt: Added.
1237 * layout-tests/editing/style/create-block-for-style-009.html: Added.
1238 * layout-tests/editing/style/create-block-for-style-010-expected.txt: Added.
1239 * layout-tests/editing/style/create-block-for-style-010.html: Added.
1240 * layout-tests/editing/style/create-block-for-style-011-expected.txt: Added.
1241 * layout-tests/editing/style/create-block-for-style-011.html: Added.
1242 * layout-tests/editing/style/create-block-for-style-012-expected.txt: Added.
1243 * layout-tests/editing/style/create-block-for-style-012.html: Added.
1244 * layout-tests/editing/style/create-block-for-style-013-expected.txt: Added.
1245 * layout-tests/editing/style/create-block-for-style-013.html: Added.
1247 Unrelated updates to these expected results.
1248 * layout-tests/editing/inserting/insert-div-007-expected.txt
1249 * layout-tests/editing/pasteboard/paste-text-013-expected.txt
1251 2005-01-10 Chris Blumenberg <cblu@apple.com>
1253 Fixed: <rdar://problem/3936844> Mail: Messages with rich text do not print
1257 * khtml/rendering/render_flow.cpp:
1258 (RenderFlow::paintLines): don't do pagination work if printRect is not set
1259 * khtml/rendering/render_list.cpp:
1260 (RenderListMarker::paint): ditto
1262 2005-01-10 David Harrison <harrison@apple.com>
1266 * kwq/KWQTextUtilities.mm:
1267 (currentTextBreakLocaleID):
1268 Return empty string (AKA root locale) if locale pref can not be canonicalized.
1270 2005-01-10 John Sullivan <sullivan@apple.com>
1272 Fixed broken Panther build.
1274 * kwq/KWQTextUtilities.mm:
1275 (currentTextBreakLocaleID):
1276 This recently-added function was using code copy/pasted from CarbonCore UnicodeUtilities.
1277 That code used a Tiger-only function, CFLocaleCreateCanonicalLanguageIdentifierFromString.
1278 To fix the build, I added a BUILDING_ON_PANTHER #ifdef that avoids the call to the Tiger
1279 function. However, the Tiger-only code was wrong; the string generated using
1280 CFLocaleCreateCanonicalLanguageIdentifierFromString was not used at all, so I fixed that
1283 2005-01-09 David Harrison <harrison@apple.com>
1285 Reviewed by Ken Kocienda.
1287 <rdar://problem/3786362> REGRESSION (Mail): pasted text loses one newline
1289 * khtml/editing/htmlediting.cpp:
1290 (khtml::ReplaceSelectionCommand::doApply):
1291 Tune check for need for insertParagraphSeparator when hasInterchangeNewline.
1293 2005-01-09 Darin Adler <darin@apple.com>
1295 Reviewed by Harrison.
1297 - fixed <rdar://problem/3939176> select() method does not work on <input type=search>
1299 * khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::select): Changed if statement
1300 to a switch statement. Added SEARCH to the set of types that treat the renderer as a
1303 2005-01-09 David Harrison <harrison@apple.com>
1305 Reviewed by Ken Kocienda.
1307 <rdar://problem/3905066> REGRESSION (Mail): Hitting return key with caret in front of space causes space to become lost (resize fixes)
1309 Problem was that InsertParagraphSeparatorCommand::doApply() was not collapsing
1310 whitespace to a single non-breaking space when splitting a text node.
1312 * khtml/editing/htmlediting.cpp:
1313 (khtml::InsertParagraphSeparatorCommand::doApply):
1315 2005-01-08 Kevin Decker <kdecker@apple.com>
1319 Fixed: <rdar://problem/3924219> Calling setOuterHTML: on a DOMHTMLHtmlElement can crash a program
1321 * khtml/html/html_elementimpl.cpp:
1322 (HTMLElementImpl::setOuterHTML): Added a nil check for fragments who don't have parents.
1324 2005-01-07 Maciej Stachowiak <mjs@apple.com>
1328 <rdar://problem/3807144> REGRESSION (125-TOT): my bank's website doesn't work (Societe Generale, socgen.com)
1330 * Khtml/khtml_part.cpp:
1331 (KHTMLPart::checkCompleted): If the document is NULL, assume this frame has
1332 not started loading yet so it could not possibly be finishing here...
1333 (KHTMLPart::stop): ...unless the part is explicitly stopped and there is still
1334 no document, in this case we must have hit an error or been loading a non-HTML
1336 * khtml/khtml_part.h:
1338 2005-01-08 David Harrison <harrison@apple.com>
1342 <rdar://problem/3943415> REGRESSION (Mail): double-clicking past word selects previous word instead of only blank space
1344 * khtml/editing/selection.cpp:
1345 (khtml::Selection::validate):
1346 Tune word selections left/right choice to use right if on empty last line.
1348 2005-01-07 David Harrison <harrison@apple.com>
1352 <rdar://problem/3942619> AX: Support sentence ax attributes
1354 Needed to use the unicode utilities properly. Twas lame before.
1356 * khtml/editing/visible_units.cpp:
1357 (khtml::previousBoundary):
1358 (khtml::nextBoundary):
1359 (khtml::startOfWord):
1361 (khtml::previousWordPosition):
1362 (khtml::nextWordPosition):
1363 (khtml::startOfSentence):
1364 (khtml::endOfSentence):
1365 (khtml::previousSentencePosition):
1366 (khtml::nextSentencePosition):
1367 * kwq/KWQAccObject.mm:
1368 (-[KWQAccObject accessibilityAttributeNames]):
1369 (-[KWQAccObject accessibilityAttributeValue:]):
1370 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
1371 (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
1372 * kwq/KWQTextUtilities.mm:
1373 (currentTextBreakLocaleID):
1374 (KWQFindSentenceBoundary):
1375 (KWQFindNextSentenceFromIndex):
1377 2005-01-07 Ken Kocienda <kocienda@apple.com>
1383 <rdar://problem/3939523> in some cases, text does not retain style info after pressing return twice
1384 <rdar://problem/3944492> after pressing return twice, text is bold when it shouldn't be
1386 * khtml/editing/htmlediting.cpp:
1387 (khtml::InsertParagraphSeparatorCommand::setFullTypingStyleBeforeInsertion):
1388 Merge the typing style with the computed style for the current position. Fixes both bugs.
1389 * khtml/editing/htmlediting.h:
1390 * layout-tests/editing/inserting/insert-div-023-expected.txt: Added.
1391 * layout-tests/editing/inserting/insert-div-023.html: Added.
1392 * layout-tests/editing/inserting/insert-div-024-expected.txt: Added.
1393 * layout-tests/editing/inserting/insert-div-024.html: Added.
1395 2005-01-07 David Hyatt <hyatt@apple.com>
1397 Fix for 3941364, make sure tables reset overflowWidth/Height when they lay out again. Fixes the odd scrolling
1398 behavior on worldofwarcraft.com.
1402 * khtml/rendering/render_table.cpp:
1403 (RenderTable::layout):
1405 2005-01-06 David Hyatt <hyatt@apple.com>
1407 Fix for 3932418 and 3920998, assertion failures caused by stray inline content inside tables. Bulletproof the hit testing to
1408 ignore inline flows in this case.
1412 * khtml/rendering/render_block.cpp:
1413 (khtml::RenderBlock::nodeAtPoint):
1415 2005-01-07 Ken Kocienda <kocienda@apple.com>
1421 <rdar://problem/3848412> for forwarded message, tabbing to message view scrolls to bottom of view
1423 * kwq/KWQKHTMLPart.mm:
1424 (KWQKHTMLPart::nextKeyViewInFrame): Don't scroll the focus node to visible if it is not
1425 in the document, or if it is not a descendent of the document element. In the case of the bug,
1426 since the selection has not yet been set up, the focus node passed here is the HTML element, and
1427 that does not yield a rect that is useful to us here. So now, in the case the bug mentions, we do nothing.
1429 2005-01-06 Kevin Decker <kdecker@apple.com>
1433 Fixed: <rdar://problem/3932215> REGRESSION (125-177): iFrame example at developer.apple.com fails in Safari
1435 * khtml/khtml_part.cpp:
1436 (KHTMLPart::processObjectRequest): m_bComplete was never true for frames generated by Javascript due to our synchronous loading and as a result, scheduled redirects wouldn't fire in KHTMLPart::scheduleLocationChange(). By virtue of being an empty document, a document is complete. In this special case it's safe at this point to call checkCompleted() which sets m_bComplete true.
1440 2005-01-06 David Harrison <harrison@apple.com>
1444 (addendum to previous checkin for this bug)
1445 <rdar://problem/3776056> AX: Editable HTML should not be viewed as AXStaticText
1447 Fix line navigation. Add AXUIElementForTextMarker.
1449 * kwq/KWQAccObject.mm:
1450 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
1451 (-[KWQAccObject doAXUIElementForTextMarker:]):
1452 (-[KWQAccObject doAXLineForTextMarker:]):
1453 (-[KWQAccObject doAXTextMarkerRangeForLine:]):
1454 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
1455 (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
1456 (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
1457 (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
1459 2005-01-06 Darin Adler <darin@apple.com>
1463 - re-fixed <rdar://problem/3760910> Request to include support for custom tag names in HTML (they already work in XML)
1465 (turns out the PLT regression was a false alarm)
1467 * khtml/html/htmlparser.h: Change forbidden tag array to be allocated in the object rather than on
1468 the heap. Also use ID_LAST_TAG for the array size; the old code used ID_CLOSE_TAG which is now a
1470 * khtml/html/htmlparser.cpp:
1471 (KHTMLParser::KHTMLParser): Remove code that creates the forbidden tag array on the heap; makes more
1472 sense to just have the array be a member so we don't have to use new and delete on it. Also needed
1473 to eliminate code that used ID_CLOSE_TAG for an array size.
1474 (KHTMLParser::~KHTMLParser): Remove code that deletes the forbidden tag array. Also changed the code
1475 that manages isindex to use deref instead of delete.
1476 (KHTMLParser::reset): Use safer sizeof for clearing the forbidden tag array. Old code had the
1477 mistake of using ID_CLOSE_TAG for the array size too.
1478 (KHTMLParser::parseToken): Removed code that checks for bogus tags; it's not clear why it was ever
1479 there and it would prevent custom tags from working. Added range check before using the forbidden
1480 tag array with the token ID since custom tags will use index values past the end of the array.
1481 (KHTMLParser::getElement): Removed most of the code that makes an element by ID; now the work is done
1482 inside the DocumentImpl createHTMLElement. Any code that needs to be different than a dynamic
1483 createElement call is still here. Last time I left out a few form element types from this switch;
1485 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Call the tagId function in the
1486 document if getTagID fails; this creates a unique per-document ID.
1488 * khtml/misc/htmltags.c: Regenerated.
1489 * khtml/misc/htmltags.h: Regenerated.
1491 * khtml/misc/maketags: Changed the generated constants to use "const unsigned short" instead of "#define".
1492 Changed ID_CLOSE_TAG to be a fixed value of 32000 rather than being just past the IDs of the HTML tags.
1493 Also rewrote getTagName to work with the new scheme.
1495 2005-01-06 David Harrison <harrison@apple.com>
1497 Fixed Panther build. Also, do not advertize sentence support since it is incomplete.
1499 * kwq/KWQAccObject.mm:
1500 (-[KWQAccObject visiblePositionForEndOfTextMarkerRange:]):
1501 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
1502 (-[KWQAccObject accessibilityIsAttributeSettable:]):
1504 2005-01-06 David Harrison <harrison@apple.com>
1506 Reviewed by Dave Hyatt.
1508 <rdar://problem/3776056> AX: Editable HTML should not be viewed as AXStaticText
1509 <rdar://problem/3588548> AX: tabbing does not work correctly with the screen reader and a focused link; need AXFocusedUIElement to work
1511 Many more AX attributes supported. Numerous fixes to previous AX work.
1513 * khtml/editing/visible_units.cpp:
1514 (khtml::startSentenceBoundary):
1515 (khtml::startOfSentence):
1516 (khtml::endSentenceBoundary):
1517 (khtml::endOfSentence):
1518 (khtml::previousSentencePositionBoundary):
1519 (khtml::previousSentencePosition):
1520 (khtml::nextSentencePositionBoundary):
1521 (khtml::nextSentencePosition):
1522 * khtml/editing/visible_units.h:
1523 * khtml/khtmlview.cpp:
1524 (KHTMLView::layout):
1525 * khtml/misc/helper.cpp:
1526 (khtml::findSentenceBoundary):
1527 (khtml::nextSentenceFromIndex):
1528 * khtml/misc/helper.h:
1529 * khtml/misc/htmltags.c:
1532 * khtml/rendering/render_container.cpp:
1533 (RenderContainer::removeChildNode):
1534 (RenderContainer::appendChildNode):
1535 (RenderContainer::insertChildNode):
1536 * khtml/rendering/render_object.cpp:
1537 (RenderObject::remove):
1538 * khtml/xml/dom_docimpl.cpp:
1539 (DocumentImpl::getAccObjectCache):
1540 (DocumentImpl::updateSelection):
1541 (DocumentImpl::close):
1542 (DocumentImpl::setFocusNode):
1543 (DocumentImpl::parentDocument):
1544 (DocumentImpl::topDocument):
1545 * khtml/xml/dom_docimpl.h:
1546 * kwq/KWQAccObject.mm:
1547 (-[KWQAccObject accessibilityShouldUseUniqueId]):
1548 (-[KWQAccObject detach]):
1549 (-[KWQAccObject anchorElement]):
1550 (-[KWQAccObject firstChild]):
1551 (-[KWQAccObject lastChild]):
1552 (-[KWQAccObject previousSibling]):
1553 (-[KWQAccObject nextSibling]):
1554 (-[KWQAccObject parentObject]):
1555 (-[KWQAccObject value]):
1556 (-[KWQAccObject accessibilityAttributeNames]):
1557 (-[KWQAccObject accessibilityPerformAction:]):
1558 (-[KWQAccObject textMarkerForVisiblePosition:]):
1559 (-[KWQAccObject visiblePositionForTextMarker:]):
1560 (-[KWQAccObject textMarkerRangeFromVisiblePositions:andEndPos:]):
1561 (-[KWQAccObject topDocument]):
1562 (-[KWQAccObject topRenderer]):
1563 (-[KWQAccObject topView]):
1564 (-[KWQAccObject accessibilityAttributeValue:]):
1565 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
1566 (-[KWQAccObject doAXLineForTextMarker:]):
1567 (-[KWQAccObject doAXTextMarkerRangeForLine:]):
1568 (-[KWQAccObject doAXStringForTextMarkerRange:]):
1569 (-[KWQAccObject doAXTextMarkerForPosition:]):
1570 (-[KWQAccObject doAXBoundsForTextMarkerRange:]):
1571 (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
1572 (-[KWQAccObject doAXTextMarkerRangeForUnorderedTextMarkers:]):
1573 (-[KWQAccObject doAXNextTextMarkerForTextMarker:]):
1574 (-[KWQAccObject doAXPreviousTextMarkerForTextMarker:]):
1575 (-[KWQAccObject doAXLeftWordTextMarkerRangeForTextMarker:]):
1576 (-[KWQAccObject doAXRightWordTextMarkerRangeForTextMarker:]):
1577 (-[KWQAccObject doAXLeftLineTextMarkerRangeForTextMarker:]):
1578 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
1579 (-[KWQAccObject doAXSentenceTextMarkerRangeForTextMarker:]):
1580 (-[KWQAccObject doAXParagraphTextMarkerRangeForTextMarker:]):
1581 (-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]):
1582 (-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]):
1583 (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
1584 (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
1585 (-[KWQAccObject doAXNextSentenceEndTextMarkerForTextMarker:]):
1586 (-[KWQAccObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
1587 (-[KWQAccObject doAXNextParagraphEndTextMarkerForTextMarker:]):
1588 (-[KWQAccObject doAXPreviousParagraphStartTextMarkerForTextMarker:]):
1589 (-[KWQAccObject doAXLengthForTextMarkerRange:]):
1590 (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
1591 (-[KWQAccObject accessibilityHitTest:]):
1592 (-[KWQAccObject accessibilityFocusedUIElement]):
1593 (-[KWQAccObject accessibilityIsAttributeSettable:]):
1594 (-[KWQAccObject doSetAXSelectedTextMarkerRange:]):
1595 (-[KWQAccObject setAccObjectID:]):
1596 (-[KWQAccObject removeAccObjectID]):
1597 * kwq/KWQAccObjectCache.h:
1598 * kwq/KWQAccObjectCache.mm:
1599 (KWQAccObjectCache::setAccObject):
1600 (KWQAccObjectCache::removeAccObject):
1601 (KWQAccObjectCache::visiblePositionForTextMarker):
1602 (KWQAccObjectCache::postNotificationToTopWebArea):
1603 (KWQAccObjectCache::postNotification):
1604 (KWQAccObjectCache::handleFocusedUIElementChanged):
1605 * kwq/KWQKHTMLPart.mm:
1606 (KWQKHTMLPart::respondToChangedContents):
1607 * kwq/KWQTextUtilities.h:
1608 * kwq/KWQTextUtilities.mm:
1609 (KWQFindNextWordFromIndex):
1610 (KWQFindSentenceBoundary):
1611 (KWQFindNextSentenceFromIndex):
1612 * kwq/WebCoreBridge.mm:
1613 (-[WebCoreBridge accessibilityTree]):
1615 2005-01-05 Darin Adler <darin@apple.com>
1619 - re-landing a subset of my custom tag change that does not fix the bug, but also does
1620 not introduce a performance regression
1622 * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Changed
1623 some code that used ID_LAST_TAG in a slightly wrong, but harmless, way.
1625 * khtml/editing/htmlediting.cpp:
1626 (khtml::debugPosition): Use nodeName rather than getTagName, since the latter works for
1627 per-document tags and is just better all around for things like the document.
1628 (khtml::debugNode): Ditto.
1629 * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Ditto.
1630 * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
1631 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Ditto.
1632 * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.
1634 * khtml/html/dtd.cpp: (DOM::checkChild): Use ID_LAST_TAG rather than 1000 for the check that allows
1635 non-HTML elements to be nested as desired.
1637 * khtml/misc/htmlhashes.h: Changed return types to unsigned short.
1638 * khtml/misc/htmlhashes.cpp:
1639 (khtml::getTagID): Changed return type to unsigned short.
1640 (khtml::getAttrID): Ditto.
1642 * khtml/xml/dom_docimpl.h: Added overload of createHTMLElement, made it non-virtual since it's not overriden.
1643 * khtml/xml/dom_docimpl.cpp:
1644 (DocumentImpl::createHTMLElement): Refactored into two separate functions, one that takes the tag ID.
1645 Also updated for a few tags that the parser handled but this did not.
1647 * kwq/KWQRenderTreeDebug.cpp:
1648 (getTagName): Added. Works for custom nodes, because it calls nodeName rather than using getTagName on
1649 the tag ID directly, which only works for standard nodes.
1650 (operator<<): Update to call getTagName.
1651 (nodePositionRelativeToRoot): Ditto.
1652 (writeSelection): Ditto.
1654 2005-01-05 Ken Kocienda <kocienda@apple.com>
1660 <rdar://problem/3941203> REGRESSION (Mail): Paste inserts content in wrong place
1662 * khtml/editing/htmlediting.cpp:
1663 (khtml::ReplaceSelectionCommand::doApply): Some cleanup and refinement of the concepts used to make
1664 this operation work correctly, particularly in the logic to figure out whether to merge content, and
1665 also performing merges.
1666 * khtml/editing/visible_position.cpp:
1667 (khtml::isFirstVisiblePositionInBlock): Simplification of test used to make this determination.
1668 * khtml/editing/visible_units.cpp:
1669 (khtml::isStartOfParagraph): New helper, used in khtml::ReplaceSelectionCommand::doApply().
1670 (khtml::isEndOfParagraph): Ditto.
1671 * khtml/editing/visible_units.h: Declare new functions.
1673 2005-01-04 Ken Kocienda <kocienda@apple.com>
1679 <rdar://problem/3926522> Pressing return in a quoted block inserts too many newlines
1681 * khtml/editing/htmlediting.cpp:
1682 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Call to insertBlockPlaceholderIfNeeded()
1683 for the block we are adding was being done at the wrong time, which led to the placeholder remaining
1684 in the document when it was not needed. This resulted in the extra space reported in the bug.
1686 2005-01-04 Kevin Decker <kdecker@apple.com>
1690 Fixed: <rdar://problem/3936879> nil-deref, crash in InlineFlowBox::nodeAtPoint closing DHTML menus at hrweb.apple.com
1692 * khtml/rendering/render_block.cpp:
1693 (khtml::RenderBlock::fillInlineSelectionGaps): Added a nil check. If there is no selection, don't try to get the selection's containing block. If we do, we'll crash.
1695 2005-01-04 David Hyatt <hyatt@apple.com>
1697 Fix for 3937203, force an update of the dashboard regions when scrollbars are added/removed.
1701 * khtml/rendering/render_layer.cpp:
1702 (RenderLayer::updateScrollInfoAfterLayout):
1704 2005-01-04 Ken Kocienda <kocienda@apple.com>
1708 Fix for these two bugs:
1710 <rdar://problem/3938935> REGRESSION (Mail): Pasting into an empty document mangles content
1711 <rdar://problem/3939148> REGRESSION (Mail): Pasting mistakenly reverses lines
1713 * khtml/editing/htmlediting.cpp:
1714 (khtml::ReplaceSelectionCommand::doApply): For 3938935, add one more case to handle an empty document; merge
1715 neither start nor end. For 3939148, improve the code which adjusts the insertion point during
1716 the process of pasting. It formerly handled only one of the possible cases.
1717 * layout-tests/editing/pasteboard/paste-text-015-expected.txt: Added.
1718 * layout-tests/editing/pasteboard/paste-text-015.html: Added.
1720 2005-01-04 David Hyatt <hyatt@apple.com>
1722 Fix for 3936571, placeholder attribute should work for normal inputs for Dashboard.
1726 * khtml/rendering/render_form.cpp:
1727 (RenderLineEdit::updateFromElement):
1728 * kwq/KWQLineEdit.mm:
1729 (QLineEdit::setPlaceholderString):
1731 2005-01-04 David Hyatt <hyatt@apple.com>
1733 Fix for 3830936, hang on changeforamerica.com. Make sure to ignore the style not yet available option when
1734 returning pseudo-styles.
1738 * khtml/css/cssstyleselector.cpp:
1739 (khtml::CSSStyleSelector::matchRulesForList):
1740 (khtml::CSSStyleSelector::pseudoStyleForElement):
1741 * khtml/rendering/render_style.cpp:
1742 (RenderStyle::addPseudoStyle):
1744 2005-01-04 Darin Adler <darin@apple.com>
1746 - rolled out my custom tag name change again -- it caused a 1 ms PLT regression
1748 * khtml/css/cssstyleselector.cpp:
1749 * khtml/editing/htmlediting.cpp:
1750 * khtml/editing/selection.cpp:
1751 * khtml/editing/visible_position.cpp:
1752 * khtml/html/dtd.cpp:
1753 * khtml/html/htmlparser.cpp:
1754 * khtml/html/htmlparser.h:
1755 * khtml/html/htmltokenizer.cpp:
1756 * khtml/misc/htmlhashes.cpp:
1757 * khtml/misc/htmlhashes.h:
1758 * khtml/misc/htmltags.c:
1759 * khtml/misc/htmltags.h:
1760 * khtml/misc/maketags:
1761 * khtml/xml/dom_docimpl.cpp:
1762 * khtml/xml/dom_docimpl.h:
1763 * khtml/xml/dom_nodeimpl.cpp:
1764 * khtml/xml/dom_position.cpp:
1765 * kwq/KWQRenderTreeDebug.cpp:
1767 2005-01-04 Ken Kocienda <kocienda@apple.com>
1773 <rdar://problem/3927554> Style info applied to remainder of document after a newline is entered
1775 * khtml/editing/htmlediting.cpp:
1776 (khtml::InsertParagraphSeparatorCommand::doApply): Clean up and simplification in code that inserts
1777 a paragraph separator. The bug was all about applying styles to the new paragraph that did not need
1778 to be applied. Now the code will detect when at the end of a style run and will not move and apply
1779 that ending style to the new paragraph, though it will place that style into the typing style. This
1780 seems to match NSText behavior.
1781 * layout-tests/editing/inserting/insert-div-021-expected.txt: This test result exhibited the bug fixed
1782 here. The only reason it was not noticed is that the erroneously copied inline was a span, and so did
1783 not have any visible effect on the document.
1784 * layout-tests/editing/inserting/insert-div-022-expected.txt: Added.
1785 * layout-tests/editing/inserting/insert-div-022.html: Added.
1787 2005-01-04 David Hyatt <hyatt@apple.com>
1789 Fix for 3904562, make sure to clear the outline dictionary when drawing so that random focus rings dont get drawn
1794 * khtml/rendering/render_flow.cpp:
1795 (RenderFlow::paintLines):
1797 2005-01-03 David Hyatt <hyatt@apple.com>
1799 Fix for float painting regressions 3932524, 3931664, and 3933068. Make the noPaint flag setting more
1800 robust and make it work regardless of which objects get a layout or not.
1804 * khtml/rendering/render_block.cpp:
1805 (khtml::RenderBlock::insertFloatingObject):
1806 (khtml::RenderBlock::addOverhangingFloats):
1807 (khtml::RenderBlock::addIntrudingFloats):
1808 * khtml/rendering/render_block.h:
1809 (khtml::RenderBlock::FloatingObject::FloatingObject):
1811 2005-01-03 Maciej Stachowiak <mjs@apple.com>
1815 <rdar://problem/3935390> Tiger 8A341: nil deref crash in DOM::NodeImpl::traverseNextNode
1817 * khtml/html/html_miscimpl.cpp:
1818 (HTMLCollectionImpl::traverseNextItem): Assert that the starting point is not nil,
1819 it should not ever be (now).
1820 (HTMLCollectionImpl::item): When traversing items stop when we hit
1821 nil, meaning the end to avoid triggering above assert (formerly crash).
1823 2005-01-03 Maciej Stachowiak <mjs@apple.com>
1825 Reviewed by John and Kevin.
1827 <rdar://problem/3870317> REGRESSION(125.9-125.11) broken behavior at test.profoundlearning.com - used to
1829 * khtml/ecma/kjs_window.cpp:
1830 (Window::get): Look up frame names before buitin window properties
1831 to match other browsers. This regressed because we added a builtin
1832 "toolbar" property but this site had a frame with that name.
1834 2004-12-21 Maciej Stachowiak <mjs@apple.com>
1838 <rdar://problem/3888931> frame naming allows malicious site to bring up a window when you click on a link in another
1840 Added opener bridge method to help WebKit implement security check
1841 for named frame visibility.
1843 * khtml/khtml_part.h:
1844 * kwq/WebCoreBridge.h:
1845 * kwq/WebCoreBridge.mm:
1846 (-[WebCoreBridge opener]):
1848 2005-01-03 Ken Kocienda <kocienda@apple.com>
1854 <rdar://problem/3933926> Tiger8A341: Mail crashes while forwarding embedded HTML message in -[WebCoreBridge ensureSelectionVisible]
1856 * kwq/WebCoreBridge.mm:
1857 (-[WebCoreBridge ensureSelectionVisible]): Put in some null checks to prevent crash experienced in bug.
1859 2005-01-03 David Hyatt <hyatt@apple.com>
1861 Fix for 3936881, make sure positioned objects prooperly update y-position.
1865 * khtml/rendering/render_block.cpp:
1866 (khtml::RenderBlock::layoutPositionedObjects):
1868 2005-01-03 Ken Kocienda <kocienda@apple.com>
1870 Reviewed by Harrison
1874 <rdar://problem/3928250> REGRESSION (Mail): Typing style lost after hitting return key
1876 * khtml/editing/htmlediting.cpp:
1877 (khtml::InsertLineBreakCommand::preservesTypingStyle): Now implemented, returning yes for this command.
1878 (khtml::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): Initialize new typing style member variable.
1879 (khtml::InsertParagraphSeparatorCommand::~InsertParagraphSeparatorCommand): Deref new typing style member variable.
1880 (khtml::InsertParagraphSeparatorCommand::preservesTypingStyle): Now implemented, returning yes for this command.
1881 (khtml::InsertParagraphSeparatorCommand::setFullTypingStyleBeforeInsertion): New function to set the typing style
1882 (khtml::InsertParagraphSeparatorCommand::calculateAndSetTypingStyleAfterInsertion): Function called after the <p>
1883 insertion is done. This function diffs the style created in setFullTypingStyleBeforeInsertion() with the style
1884 of the new <p> and only sets those styles needed to preserve the style in effect before the insertion.
1885 (khtml::InsertParagraphSeparatorCommand::doApply): Call new functions.
1886 (khtml::TypingCommand::preservesTypingStyle): Now yes for inserting line breaks and paragraphs.
1887 * khtml/editing/htmlediting.h: Declare new functions.
1889 2004-12-25 Kevin Decker <kdecker@apple.com>
1893 Fixed: <rdar://problem/3505072> hang in KHTMLParser::parseToken (consulting.soroos.net)
1895 * khtml/html/dtd.cpp: <label> needed a much higher priority such that it will close block elements. Malformed HTML (ugh) is the only reason why we need to do this.
1897 2004-12-23 Darin Adler <darin@apple.com>
1901 - re-fixed <rdar://problem/3760910> Request to include support for custom tag names in HTML (they already work in XML)
1903 * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Changed
1904 some code that used ID_LAST_TAG in a slightly wrong, but harmless, way.
1906 * khtml/editing/htmlediting.cpp:
1907 (khtml::debugPosition): Use nodeName rather than getTagName, since the latter works for
1908 per-document tags and is just better all around for things like the document.
1909 (khtml::debugNode): Ditto.
1910 * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Ditto.
1911 * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
1912 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Ditto.
1913 * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.
1915 * khtml/html/dtd.cpp: (DOM::checkChild): Use ID_LAST_TAG rather than 1000 for the check that allows
1916 non-HTML elements to be nested as desired.
1918 * khtml/html/htmlparser.h: Change forbidden tag array to be allocated in the object rather than on
1919 the heap. Also use ID_LAST_TAG for the array size; the old code used ID_CLOSE_TAG which is now a
1921 * khtml/html/htmlparser.cpp:
1922 (KHTMLParser::KHTMLParser): Remove code that creates the forbidden tag array on the heap; makes more
1923 sense to just have the array be a member so we don't have to use new and delete on it. Also needed
1924 to eliminate code that used ID_CLOSE_TAG for an array size.
1925 (KHTMLParser::~KHTMLParser): Remove code that deletes the forbidden tag array. Also changed the code
1926 that manages isindex to use deref instead of delete.
1927 (KHTMLParser::reset): Use safer sizeof for clearing the forbidden tag array. Old code had the
1928 mistake of using ID_CLOSE_TAG for the array size too.
1929 (KHTMLParser::parseToken): Removed code that checks for bogus tags; it's not clear why it was ever
1930 there and it would prevent custom tags from working. Added range check before using the forbidden
1931 tag array with the token ID since custom tags will use index values past the end of the array.
1932 (KHTMLParser::getElement): Removed most of the code that makes an element by ID; now the work is done
1933 inside the DocumentImpl createHTMLElement. Any code that needs to be different than a dynamic
1934 createElement call is still here. Last time I left out a few form element types from this switch;
1936 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Call the tagId function in the
1937 document if getTagID fails; this creates a unique per-document ID.
1939 * khtml/misc/htmlhashes.h: Changed return types to unsigned short.
1940 * khtml/misc/htmlhashes.cpp:
1941 (khtml::getTagID): Changed return type to unsigned short.
1942 (khtml::getAttrID): Ditto.
1944 * khtml/misc/htmltags.c: Regenerated.
1945 * khtml/misc/htmltags.h: Regenerated.
1947 * khtml/misc/maketags: Changed the generated constants to use "const unsigned short" instead of "#define".
1948 Changed ID_CLOSE_TAG to be a fixed value of 32000 rather than being just past the IDs of the HTML tags.
1949 Also rewrote getTagName to work with the new scheme.
1951 * khtml/xml/dom_docimpl.h: Added overload of createHTMLElement, made it non-virtual since it's not overriden.
1952 * khtml/xml/dom_docimpl.cpp:
1953 (DocumentImpl::createHTMLElement): Refactored into two separate functions, one that takes the tag ID.
1954 Also updated for a few tags that the parser handled but this did not.
1956 * kwq/KWQRenderTreeDebug.cpp:
1957 (getTagName): Added. Works for custom nodes, because it calls nodeName rather than using getTagName on
1958 the tag ID directly, which only works for standard nodes.
1959 (operator<<): Update to call getTagName.
1960 (nodePositionRelativeToRoot): Ditto.
1961 (writeSelection): Ditto.
1965 2004-12-22 Darin Adler <darin@apple.com>
1967 - rolled out my custom tag name change -- it broke amazon.com
1969 * khtml/css/cssstyleselector.cpp:
1970 * khtml/editing/htmlediting.cpp:
1971 * khtml/editing/selection.cpp:
1972 * khtml/editing/visible_position.cpp:
1973 * khtml/html/dtd.cpp:
1974 * khtml/html/htmlparser.cpp:
1975 * khtml/html/htmlparser.h:
1976 * khtml/html/htmltokenizer.cpp:
1977 * khtml/misc/htmlhashes.cpp:
1978 * khtml/misc/htmlhashes.h:
1979 * khtml/misc/htmltags.c:
1980 * khtml/misc/htmltags.h:
1981 * khtml/misc/maketags:
1982 * khtml/xml/dom_docimpl.cpp:
1983 * khtml/xml/dom_docimpl.h:
1984 * khtml/xml/dom_nodeimpl.cpp:
1985 * khtml/xml/dom_position.cpp:
1986 * kwq/KWQRenderTreeDebug.cpp:
1988 2004-12-22 David Harrison <harrison@apple.com>
1990 Reviewed by Darin Adler.
1992 * khtml/editing/selection.cpp:
1993 (khtml::Selection::validate):
1994 The selecting/deselecting bad behavior is because the Selection code that expands by words
1995 had an inaccurate test for being at the end of the document (where double-clicking needs
1996 to select the last word). Fixed that check.
1998 2004-12-22 Adele Amchan <adele@apple.com>
2002 Fix for <rdar://problem/3911650> tabs at safeway.com stop working after a while
2004 * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::scrollToAnchor): removed call to cancelRedirection
2005 so that we match Firefox and WinIE behavior.
2007 2004-12-22 Darin Adler <darin@apple.com>
2011 - fixed <rdar://problem/3760910> Request to include support for custom tag names in HTML (they already work in XML)
2013 * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Changed
2014 some code that used ID_LAST_TAG in a slightly wrong, but harmless, way.
2016 * khtml/editing/htmlediting.cpp:
2017 (khtml::debugPosition): Use nodeName rather than getTagName, since the latter works for
2018 per-document tags and is just better all around for things like the document.
2019 (khtml::debugNode): Ditto.
2020 * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Ditto.
2021 * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
2022 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Ditto.
2023 * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.
2025 * khtml/html/dtd.cpp: (DOM::checkChild): Use ID_LAST_TAG rather than 1000 for the check that allows
2026 non-HTML elements to be nested as desired.
2028 * khtml/html/htmlparser.h: Change forbidden tag array to be allocated in the object rather than on
2029 the heap. Also use ID_LAST_TAG for the array size; the old code used ID_CLOSE_TAG which is now a
2031 * khtml/html/htmlparser.cpp:
2032 (KHTMLParser::KHTMLParser): Remove code that creates the forbidden tag array on the heap; makes more
2033 sense to just have the array be a member so we don't have to use new and delete on it. Also needed
2034 to eliminate code that used ID_CLOSE_TAG for an array size.
2035 (KHTMLParser::~KHTMLParser): Remove code that deletes the forbidden tag array. Also changed the code
2036 that manages isindex to use deref instead of delete.
2037 (KHTMLParser::reset): Use safer sizeof for clearing the forbidden tag array. Old code had the
2038 mistake of using ID_CLOSE_TAG for the array size too.
2039 (KHTMLParser::parseToken): Removed code that checks for bogus tags; it's not clear why it was ever
2040 there and it would prevent custom tags from working. Added range check before using the forbidden
2041 tag array with the token ID since custom tags will use index values past the end of the array.
2042 (KHTMLParser::getElement): Removed most of the code that makes an element by ID; now the work is done
2043 inside the DocumentImpl createHTMLElement. Any code that needs to be different than a dynamic
2044 createElement call is still here.
2045 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Call the tagId function in the
2046 document if getTagID fails; this creates a unique per-document ID.
2048 * khtml/misc/htmlhashes.h: Changed return types to unsigned short.
2049 * khtml/misc/htmlhashes.cpp:
2050 (khtml::getTagID): Changed return type to unsigned short.
2051 (khtml::getAttrID): Ditto.
2053 * khtml/misc/htmltags.c: Regenerated.
2054 * khtml/misc/htmltags.h: Regenerated.
2056 * khtml/misc/maketags: Changed the generated constants to use "const unsigned short" instead of "#define".
2057 Changed ID_CLOSE_TAG to be a fixed value of 32000 rather than being just past the IDs of the HTML tags.
2058 Also rewrote getTagName to work with the new scheme.
2060 * khtml/xml/dom_docimpl.h: Added overload of createHTMLElement, made it non-virtual since it's not overriden.
2061 * khtml/xml/dom_docimpl.cpp:
2062 (DocumentImpl::createHTMLElement): Refactored into two separate functions, one that takes the tag ID.
2063 Also updated for a few tags that the parser handled but this did not.
2065 * kwq/KWQRenderTreeDebug.cpp:
2066 (getTagName): Added. Works for custom nodes, because it calls nodeName rather than using getTagName on
2067 the tag ID directly, which only works for standard nodes.
2068 (operator<<): Update to call getTagName.
2069 (nodePositionRelativeToRoot): Ditto.
2070 (writeSelection): Ditto.
2072 2004-12-21 David Harrison <harrison@apple.com>
2074 Reviewed by Ken Kocienda.
2076 <rdar://problem/3924934> REGRESSION: double click at end of line selects start of next line
2078 Problem was the TextIterator was not handling exitNode() from a P block properly.
2080 * khtml/editing/visible_text.cpp:
2081 (khtml::TextIterator::TextIterator):
2082 Add new param that specifies whether the iterator is for content or for searching.
2083 Search iterators do not prevent newlines at the beginning.
2084 (khtml::TextIterator::advance):
2085 Added some comments.
2086 (khtml::TextIterator::handleTextNode):
2087 Added some comments.
2088 (khtml::TextIterator::exitNode):
2089 Emit newline for P (and other) blocks with position following the block, instead of the m_lastTextNode.
2090 (khtml::TextIterator::emitCharacter):
2091 Added some comments.
2092 (khtml::TextIterator::range):
2093 Added some comments.
2094 (khtml::CharacterIterator::CharacterIterator):
2095 Specify search type TextIterator.
2096 (khtml::CharacterIterator::advance):
2097 * khtml/editing/visible_text.h:
2099 Add new TextIterator::TextIterator param that specifies whether the iterator is for content or for searching.
2100 * khtml/editing/visible_units.cpp:
2101 (khtml::nextWordBoundary):
2102 Specify search type TextIterator.
2104 2004-12-21 David Harrison <harrison@apple.com>
2106 Reviewed by Ken Kocienda.
2108 <rdar://problem/3924695> REGRESSION (Mail): double-clicking past end of line shows no selection, should select to EOL
2110 Problem was that RenderText::setSelectionState did not handle the SelectionStart case where start and end are the end of the line.
2111 Fixed by pretending the start == end-1 in that situation, as long as end > 0.
2113 * khtml/rendering/render_text.cpp:
2114 (RenderText::setSelectionState)
2116 2004-12-21 Maciej Stachowiak <mjs@apple.com>
2120 <rdar://problem/3929187> WebKit needs to restrict access to certain window operations by domain
2122 * khtml/ecma/kjs_window.cpp:
2123 (Window::get): Change most window functions to be restricted by
2126 2004-12-21 Ken Kocienda <kocienda@apple.com>
2132 <rdar://problem/3928305> selecting an entire line and typing over causes new inserted text at top of document
2134 * khtml/editing/htmlediting.cpp:
2135 (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent): New function to detect case
2136 formerly undetected and unhandled. This is the crux of the bug fix.
2137 (khtml::DeleteSelectionCommand::doApply): Call insertPlaceholderForAncestorBlockContent() during
2138 execution of command.
2139 * khtml/editing/htmlediting.h: Declare new function.
2140 * layout-tests/editing/deleting/delete-3928305-fix-expected.txt: Added.
2141 * layout-tests/editing/deleting/delete-3928305-fix.html: Added.
2143 2004-12-21 Ken Kocienda <kocienda@apple.com>
2147 * khtml/editing/htmlediting.cpp:
2148 (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Note to self: Must compile code before
2149 checking in (aka must return false from function returning bool).
2151 2004-12-21 Ken Kocienda <kocienda@apple.com>
2157 <rdar://problem/3927752> Crash in khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded(DOM::NodeImpl*)
2159 * khtml/editing/htmlediting.cpp:
2160 (khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Added some null checks.
2161 (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Ditto.
2163 2004-12-21 Ken Kocienda <kocienda@apple.com>
2167 * khtml/editing/htmlediting.cpp:
2168 (khtml::ReplacementFragment::mergeStartNode): Refine concept of how this node is found based on
2169 further experiements.
2170 (khtml::ReplaceSelectionCommand::doApply): Add a special case for determining merges that need to
2171 be done if the insertion point is in an empty block.
2172 * layout-tests/editing/pasteboard/paste-text-012-expected.txt: Added.
2173 * layout-tests/editing/pasteboard/paste-text-012.html: Added.
2174 * layout-tests/editing/pasteboard/paste-text-013-expected.txt: Added.
2175 * layout-tests/editing/pasteboard/paste-text-013.html: Added.
2176 * layout-tests/editing/pasteboard/paste-text-014-expected.txt: Added.
2177 * layout-tests/editing/pasteboard/paste-text-014.html: Added.
2179 2004-12-21 Darin Adler <darin@apple.com>
2183 - fixed <rdar://problem/3899133> text search in a Safari window takes a very long time on Tiger updates page (and some other pages)
2185 * khtml/editing/visible_text.h: Add an "offset base node" parameter to emitCharacter, and also
2186 add a field to track it. Must make a few things mutable so we can update them in the range accessor.
2187 * khtml/editing/visible_text.cpp:
2188 (khtml::TextIterator::advance): Pass in base node and offsets rather than computing actual offsets
2189 using the node's index. We only compute the node index if actually asked for the range.
2190 (khtml::TextIterator::handleTextNode): Pass 0 for base node and set base node to 0 when setting
2192 (khtml::TextIterator::handleTextBox): Ditto.
2193 (khtml::TextIterator::handleReplacedElement): Pass base node and set base node instead of calling
2195 (khtml::TextIterator::handleNonTextNode): Pass 0 for offset.
2196 (khtml::TextIterator::exitNode): More of the same.
2197 (khtml::TextIterator::emitCharacter): Ditto.
2198 (khtml::TextIterator::range): If an offset base node is stored, then get its node index, and then
2199 add that in to the offsets. Doing the work here guarantees it's done only once when doing a text search.
2203 * khtml/khtml_part.cpp: Removed SPEED_DEBUG define. Not sure why it was on.
2207 2004-12-20 Ken Kocienda <kocienda@apple.com>
2211 * khtml/editing/htmlediting.cpp:
2212 (khtml::DeleteSelectionCommand::moveNodesAfterNode): My one-liner for this bug introduced layout test
2213 regressions: <rdar://problem/3926142> REGRESSION (Mail): Deleting text decreases quote level
2214 Rolling out until I can develop a real fix.
2216 2004-12-20 David Harrison <harrison@apple.com>
2218 Reviewed by Dave Hyatt.
2220 Initial checkin of AXTextMarkerRef support.
2222 * khtml/xml/dom_docimpl.cpp:
2223 (DocumentImpl::updateSelection):
2224 (DocumentImpl::setFocusNode):
2225 * kwq/KWQAccObject.h:
2226 * kwq/KWQAccObject.mm:
2227 (-[KWQAccObject detach]):
2228 (-[KWQAccObject anchorElement]):
2229 (-[KWQAccObject addChildrenToArray:]):
2230 (-[KWQAccObject accessibilityAttributeNames]):
2231 (-[KWQAccObject accessibilityActionDescription:]):
2232 (-[KWQAccObject accessibilityPerformAction:]):
2233 (-[KWQAccObject textMarkerRangeFromMarkers:andEndMarker:]):
2234 (-[KWQAccObject textMarkerForVisiblePosition:]):
2235 (-[KWQAccObject visiblePositionForTextMarker:]):
2236 (-[KWQAccObject AXTextMarkerRangeCopyStartMarkerWrapper:]):
2237 (-[KWQAccObject AXTextMarkerRangeCopyEndMarkerWrapper:]):
2238 (-[KWQAccObject visiblePositionForStartOfTextMarkerRange:]):
2239 (-[KWQAccObject visiblePositionForEndOfTextMarkerRange:]):
2240 (-[KWQAccObject accessibilityAttributeValue:]):
2241 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
2242 (-[KWQAccObject textMarkerRangeFromVisiblePositions:andEndPos:]):
2243 (-[KWQAccObject getSelectedTextMarkerRange]):
2244 (-[KWQAccObject doAXLineForTextMarker:]):
2245 (-[KWQAccObject doAXTextMarkerRangeForLine:]):
2246 (-[KWQAccObject doAXStringForTextMarkerRange:]):
2247 (-[KWQAccObject doAXNextTextMarkerForTextMarker:]):
2248 (-[KWQAccObject doAXPreviousTextMarkerForTextMarker:]):
2249 (-[KWQAccObject doAXLeftWordTextMarkerRangeForTextMarker:]):
2250 (-[KWQAccObject doAXRightWordTextMarkerRangeForTextMarker:]):
2251 (-[KWQAccObject doAXLeftLineTextMarkerRangeForTextMarker:]):
2252 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
2253 (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
2254 (-[KWQAccObject accessibilityFocusedUIElement]):
2255 (-[KWQAccObject clearChildren]):
2256 (-[KWQAccObject accObjectID]):
2257 (-[KWQAccObject setAccObjectID:]):
2258 (-[KWQAccObject removeAccObjectID]):
2259 * kwq/KWQAccObjectCache.h:
2260 * kwq/KWQAccObjectCache.mm:
2261 (KWQAccObjectCache::KWQAccObjectCache):
2262 (KWQAccObjectCache::~KWQAccObjectCache):
2263 (KWQAccObjectCache::getAccObjectID):
2264 (KWQAccObjectCache::removeAccObjectID):
2265 (KWQAccObjectCache::textMarkerForVisiblePosition):
2266 (KWQAccObjectCache::visiblePositionForTextMarker):
2268 2004-12-19 Darin Adler <darin@apple.com>
2270 * kwq/KWQFoundationExtras.h: (KWQCFAutorelease): Added nil check.
2272 2004-12-19 Darin Adler <darin@apple.com>
2276 - a garbage collection fix
2278 * kwq/KWQFoundationExtras.h: (KWQCFAutorelease): Added a more-extensive comment and fixed the BUILDING_ON_PANTHER
2279 #ifndef to use #if (in practice, either is OK).
2280 * kwq/KWQKURL.mm: (KURL::getNSURL): Use KWQCFAutorelease instead of autorelease.
2282 2004-12-17 David Hyatt <hyatt@apple.com>
2284 Fix for 3923255, specified percentage heights of divs with overflow auto inside tables not honored.
2286 Reviewed by kocienda
2288 * khtml/rendering/render_box.cpp:
2289 (RenderBox::calcPercentageHeight):
2290 * khtml/rendering/render_table.cpp:
2291 (RenderTableSection::layoutRows):
2293 2004-12-17 David Harrison <harrison@apple.com>
2295 Reviewed by Ken Kocienda.
2297 <rdar://problem/3924930> REGRESSION: triple click does not select to end of line
2299 * khtml/editing/visible_units.cpp:
2300 (khtml::endOfParagraph):
2301 When includeLineBreak is true, allow traversal to next node after enclosingBlockFlowElement.
2303 2004-12-17 Ken Kocienda <kocienda@apple.com>
2307 * khtml/editing/htmlediting.cpp:
2308 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Missed deleting some now-obsolete expcetion
2309 codes when I added the createBreakElement() function.
2311 2004-12-17 Richard Williamson <rjw@apple.com>
2313 Set the floor of max cacheable object size to 40K. This restores
2314 the long standing floor. Lower floor deleteriously impacts the PLT.
2317 * khtml/khtml_part.cpp:
2318 (KHTMLPart::checkCompleted):
2319 * khtml/misc/loader.cpp:
2322 2004-12-17 Ken Kocienda <kocienda@apple.com>
2328 <rdar://problem/3926142> REGRESSION (Mail): Deleting text decreases quote level
2330 * khtml/editing/htmlediting.cpp:
2331 (khtml::DeleteSelectionCommand::moveNodesAfterNode): Stop merging nodes when a <br> is hit.
2332 Formerly checked only for block boundary.
2334 2004-12-17 David Harrison <harrison@apple.com>
2338 Add KWQCFAutorelease for autoreleasing CF objects.
2339 * kwq/KWQFoundationExtras.h:
2343 2004-12-17 David Harrison <harrison@apple.com>
2347 Fix GC compatibility in getNSString.
2350 (QString::getNSString):
2351 Use NSString allocator instead of CFString, so that autorelease works under GC.
2353 2004-12-17 Ken Kocienda <kocienda@apple.com>
2359 <rdar://problem/3890973> REGRESSION (Mail): Deleting reorders remaining text
2361 * khtml/editing/htmlediting.cpp:
2362 (khtml::DeleteSelectionCommand::moveNodesAfterNode): Added check to ensure that moving content will not
2363 move it after the <body> element.
2365 2004-12-17 Ken Kocienda <kocienda@apple.com>
2369 Added new layout tests covering cases from recent bug fixes.
2371 * layout-tests/editing/inserting/insert-div-018-expected.txt: Added.
2372 * layout-tests/editing/inserting/insert-div-018.html: Added.
2373 * layout-tests/editing/inserting/insert-div-019-expected.txt: Added.
2374 * layout-tests/editing/inserting/insert-div-019.html: Added.
2375 * layout-tests/editing/inserting/insert-div-020-expected.txt: Added.
2376 * layout-tests/editing/inserting/insert-div-020.html: Added.
2377 * layout-tests/editing/inserting/insert-div-021-expected.txt: Added.
2378 * layout-tests/editing/inserting/insert-div-021.html: Added.
2380 2004-12-17 Ken Kocienda <kocienda@apple.com>
2384 Changes in layout resulting from giving <p> elements no margin rather than 0.1em margin.
2386 * layout-tests/editing/inserting/insert-div-013-expected.txt
2387 * layout-tests/editing/inserting/insert-div-014-expected.txt
2389 2004-12-17 Ken Kocienda <kocienda@apple.com>
2395 <rdar://problem/3925317> Increase quote in email and with cursor below the quote the new line appears above the quote
2397 * khtml/editing/htmlediting.cpp:
2398 (khtml::InsertParagraphSeparatorCommand::doApply):
2399 * khtml/editing/visible_position.cpp: Refine rules for whether to use the starting node or the starting
2400 block as the reference node for the insertion of the new block.
2401 (khtml::isLastVisiblePositionInBlock): Tweak rules again. Descendants of following blocks should answer true.
2402 I worked this all out on the whiteboard this time. This should be the last tweak.
2404 2004-12-17 Kevin Decker <kdecker@apple.com>
2408 Fixed <rdar://problem/3824438> Need a clean way for Dashboard to detect when an XML parsing error occurs
2410 * khtml/xml/xml_tokenizer.cpp:
2411 (khtml::XMLTokenizer::insertErrorMessageBlock): In the xml error report, instead of a generic <div>, use <parsererror> to match Mozilla.
2413 2004-12-16 Ken Kocienda <kocienda@apple.com>
2419 <rdar://problem/3924888> REGRESSION (Mail): Hitting return key at end of line does not insert visible newline
2421 * khtml/editing/htmlediting.cpp:
2422 (khtml::InsertParagraphSeparatorCommand::doApply): Tweaked code I added just before to fix 3924486, so that
2423 it checks the downstream node for the starting position.
2425 2004-12-16 Ken Kocienda <kocienda@apple.com>
2429 Added new createBreakElement() function that makes creating a <br> element a one-liner.
2430 Converted all the code that used to call the DocumentImpl, and dealt with the exceptionCode,
2431 over to this new helper.
2433 * khtml/editing/htmlediting.cpp:
2434 (khtml::DeleteSelectionCommand::moveNodesAfterNode): Now uses new helper function.
2435 (khtml::InsertLineBreakCommand::doApply): Ditto.
2436 (khtml::InsertParagraphSeparatorCommand::doApply): Ditto.
2437 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Ditto.
2438 (khtml::ReplaceSelectionCommand::doApply): Ditto.
2439 (khtml::createBreakElement): New helper.
2440 * khtml/editing/htmlediting.h: Ditto.
2442 2004-12-16 David Hyatt <hyatt@apple.com>
2444 Fix a bug where vertical-align values that depended on their parent's value went crazy if the parent was
2445 vertical-align top or bottom. The bug is 3771007, bankofamerica's ebills page.
2447 Reviewed by kocienda
2449 * khtml/rendering/render_object.cpp:
2450 (RenderObject::getVerticalPosition):
2452 2004-12-16 Ken Kocienda <kocienda@apple.com>
2458 <rdar://problem/3924486> REGRESSION (Mail): Hitting return key does not insert visible newline
2459 <rdar://problem/3924579> REGRESSION (Mail): After deleting, hitting return key does not insert visible newline
2461 * khtml/editing/htmlediting.cpp:
2462 (khtml::InsertParagraphSeparatorCommand::doApply): For the first bug, detect when inserting a <p> will
2463 make a visible <br> collapse. For the second bug, move the code that inserts the new <p> after
2464 a check which may move the node used as the reference node for the insertion. Also change this code to
2465 insert the <p> after the last sibling of the starting position, to move it past the nodes we're going
2466 to want to shift into the new <p>.
2468 2004-12-16 Darin Adler <darin@apple.com>
2472 - use <p> elements rather than <br> when pasting plain text; also use margin of 0 rather than 0.1 em
2473 after talking this over with Dave and Ken
2475 * khtml/editing/htmlediting.h: Added createDefaultParagraphElement and createBlockPlaceholderElement.
2476 * khtml/editing/htmlediting.cpp:
2477 (khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Use new createBlockPlaceholderElement
2478 helper so this can share code with the plain-text conversion code.
2479 (khtml::InsertParagraphSeparatorCommand::createParagraphElement): Use new createDefaultParagraphElement
2480 helper so this can share code with the plain-text conversion code.
2481 (khtml::createDefaultParagraphElement): Added.
2482 (khtml::createBlockPlaceholderElement): Added.
2484 * khtml/editing/markup.cpp: (khtml::createFragmentFromText): Use paragraphs rather than
2485 <br> elements for pasting plain text.
2487 - regenerated these files with the newer gperf
2489 * khtml/css/cssproperties.c: Regenerated.
2490 * khtml/css/cssvalues.c: Regenerated.
2491 * khtml/misc/htmlattrs.c: Regenerated.
2492 * khtml/misc/htmltags.c: Regenerated.
2494 2004-12-16 Ken Kocienda <kocienda@apple.com>
2500 <rdar://problem/3924291> REGRESSION (Mail): Crash deleting content following a <p> element
2502 * khtml/xml/dom_nodeimpl.cpp:
2503 (NodeImpl::enclosingInlineElement): Fixed problem in this function where recursive search for
2504 parent that is not an inline would skip past previous siblings of nodes which were blocks. Now
2505 it stops looking in this situation. This problem eventually caused the delete code to try to
2506 merge a node under a descendent.
2508 2004-12-16 Adele Amchan <adele@apple.com>
2510 Change by Richard, reviewed by me.
2512 Fix for: <rdar://problem/3923983> background image decoding prevents page with 0Kb image from finishing to load
2514 * khtml/misc/loader.cpp: (CachedImage::data): Added call to notifyFinished so the 0Kb image case finishes loading.
2516 2004-12-16 Adele Amchan <adele@apple.com>
2520 Fix for: <rdar://problem/3534824> VIP: some navigation links on safeway.com don't work due to a JavaScript quirk
2522 Added a call to ObjectImp::get before Window::get just returns Undefined.
2523 This was preventing us from getting the toString function from a Window object.
2525 * khtml/ecma/kjs_window.cpp: (Window::get):
2527 2004-12-16 Ken Kocienda <kocienda@apple.com>
2533 <rdar://problem/3918351> REGRESSION (Mail, 173-175+): Return before first char of line leaves insertion point in wrong place
2535 * khtml/editing/htmlediting.cpp:
2536 (khtml::InsertParagraphSeparatorCommand::doApply): Basically, did a rewrite of this function
2537 to do a better job than it was doing before. Added several test cases to prove I am on a
2539 * khtml/editing/visible_position.cpp:
2540 (khtml::isFirstVisiblePositionInBlock): Tweaked the rules a bit to fix an issue very similar to the
2541 leaving-the-bar-node case problem I just fixed in a recent checkin (relevant markup: <p>foo</p>bar).
2542 This function was returning true for the first position in "bar". Wrong. Also tightened up other
2543 rule: Should not report true when relationship between blocks cannot be determined.
2544 (khtml::isLastVisiblePositionInBlock): Tightened up rule as above: Should not report true
2545 when relationship between blocks cannot be determined.
2546 * layout-tests/editing/inserting/insert-div-010-expected.txt: Added.
2547 * layout-tests/editing/inserting/insert-div-010.html: Added.
2548 * layout-tests/editing/inserting/insert-div-011-expected.txt: Added.
2549 * layout-tests/editing/inserting/insert-div-011.html: Added.
2550 * layout-tests/editing/inserting/insert-div-012-expected.txt: Added.
2551 * layout-tests/editing/inserting/insert-div-012.html: Added.
2552 * layout-tests/editing/inserting/insert-div-013-expected.txt: Added.
2553 * layout-tests/editing/inserting/insert-div-013.html: Added.
2554 * layout-tests/editing/inserting/insert-div-014-expected.txt: Added.
2555 * layout-tests/editing/inserting/insert-div-014.html: Added.
2556 * layout-tests/editing/inserting/insert-div-015-expected.txt: Added.
2557 * layout-tests/editing/inserting/insert-div-015.html: Added.
2558 * layout-tests/editing/inserting/insert-div-016-expected.txt: Added.
2559 * layout-tests/editing/inserting/insert-div-016.html: Added.
2560 * layout-tests/editing/inserting/insert-div-017-expected.txt: Added.
2561 * layout-tests/editing/inserting/insert-div-017.html: Added.
2563 2004-12-16 Ken Kocienda <kocienda@apple.com>
2567 Added a layout test based on my last checkin.
2569 * layout-tests/editing/selection/move-by-word-001-expected.txt: Added.
2570 * layout-tests/editing/selection/move-by-word-001.html: Added.
2572 2004-12-16 Ken Kocienda <kocienda@apple.com>
2578 <rdar://problem/3917929> REGRESSION (Mail): Command-left-arrow leaves insertion point too high after specific steps
2580 * khtml/editing/visible_text.cpp:
2581 (khtml::SimplifiedBackwardsTextIterator::advance): Add new check for leaving a text node and iterating
2582 backwards into a different block that is an descendent of the block containing the text node (as in leaving
2583 the "bar" node in this example: <p>foo</p>bar).
2584 (khtml::SimplifiedBackwardsTextIterator::handleNonTextNode): Call new emitNewlineForBROrText helper.
2585 (khtml::SimplifiedBackwardsTextIterator::emitNewlineForBROrText): Factor out code from handleNonTextNode, since
2586 it is called from there, and now also from advance().
2588 2004-12-15 Darin Adler <darin@apple.com>
2592 - fixed problem where plain-text would put a blank line between each <p> even when they have no margins
2594 * khtml/editing/visible_text.cpp: (khtml::TextIterator::exitNode): Add more checks and only set the
2595 "add one more newline" flag if the margin is sufficient. A more complete fix would ignore the node
2596 type altogether and use the render tree instead.
2598 2004-12-14 John Sullivan <sullivan@apple.com>
2602 - rest of WebCore fix for <rdar://problem/3790011> undoable operations all say "Undo"
2603 in the menu, no specific action names
2605 * khtml/editing/edit_actions.h: new header, contains EditAction enum
2606 (renamed from HTMLEditAction, formerly in htmlediting.h)
2608 * ForwardingHeaders/editing/edit_actions.h: new forwarding header
2610 * khtml/editing/htmlediting.h:
2611 removed HTMLEditAction enum in favor of including edit_actions.h; added khtml::
2612 namespace to EditAction usages; added m_editingAction ivar to ApplyStyleCommand
2614 * khtml/editing/htmlediting.cpp:
2615 (khtml::EditCommandPtr::editingAction):
2616 update for enum name change
2617 (khtml::EditCommand::editingAction):
2619 (khtml::ApplyStyleCommand::ApplyStyleCommand):
2620 added editingAction parameter to this constructor
2621 (khtml::ApplyStyleCommand::editingAction):
2623 (khtml::DeleteSelectionCommand::editingAction):
2624 update for enum name change
2625 (khtml::MoveSelectionCommand::editingAction):
2627 (khtml::TypingCommand::editingAction):
2629 (khtml::ReplaceSelectionCommand::editingAction):
2632 * khtml/khtml_part.h:
2633 added EditAction parameter to applyStyle and computeAndSetTypingStyle
2634 * khtml/khtml_part.cpp:
2635 (KHTMLPart::computeAndSetTypingStyle):
2636 added EditAction parameter
2637 (KHTMLPart::applyStyle):
2640 * kwq/KWQKHTMLPart.mm:
2641 (KWQKHTMLPart::registerCommandForUndoOrRedo):
2642 do the cast from EditAction to WebUndoAction a different way to match other code
2644 * kwq/WebCoreBridge.h:
2645 * kwq/WebCoreBridge.mm:
2646 (-[WebCoreBridge setTypingStyle:withUndoAction:]):
2647 added WebUndoAction parameter, passed into ApplyStyleCommand constructor
2648 (-[WebCoreBridge applyStyle:withUndoAction:]):
2651 * WebCore.pbproj/project.pbxproj:
2652 updated for new files
2654 2004-12-14 David Hyatt <hyatt@apple.com>
2656 Fix for 3562458, rowspan and colspan converted to ints so that large values will work for them. Remove
2657 the ridiculous 1024 limit on the span values.
2659 * khtml/html/html_tableimpl.cpp:
2660 (HTMLTableCellElementImpl::parseHTMLAttribute):
2661 * khtml/rendering/render_table.cpp:
2662 (RenderTableCell::collapsedBottomBorder):
2663 * khtml/rendering/render_table.h:
2664 (khtml::RenderTableCell::colSpan):
2665 (khtml::RenderTableCell::setColSpan):
2666 (khtml::RenderTableCell::rowSpan):
2667 (khtml::RenderTableCell::setRowSpan):
2668 (khtml::RenderTableCol::span):
2669 (khtml::RenderTableCol::setSpan):
2671 2004-12-14 David Hyatt <hyatt@apple.com>
2673 Make sure <col> and <colgroup> can have spans updated dynamically as well.
2677 * khtml/html/html_tableimpl.cpp:
2678 (HTMLTableColElementImpl::parseHTMLAttribute):
2679 * khtml/rendering/render_table.cpp:
2680 (RenderTableCell::updateFromElement):
2681 (RenderTableCol::updateFromElement):
2683 2004-12-14 David Hyatt <hyatt@apple.com>
2685 Fix for 3833123, setting a cell's colspan does not update rendering like it should.
2689 * khtml/html/html_tableimpl.cpp:
2690 (HTMLTableCellElementImpl::parseHTMLAttribute):
2691 * khtml/rendering/render_table.cpp:
2692 (RenderTableCell::RenderTableCell):
2693 (RenderTableCell::updateFromElement):
2695 2004-12-14 Chris Blumenberg <cblu@apple.com>
2697 Fixed: <rdar://problem/3864536> crash copying text from other apps and pasting in a sticky in dashboard
2701 * khtml/editing/markup.cpp:
2702 (khtml::createFragmentFromText): ref and deref the fragment since calling appendChild can completely deref it
2704 2004-12-14 David Hyatt <hyatt@apple.com>
2706 Fix for 3785211. Make sure to do a layout with the old position before doing a layout after changing to the new position.
2707 This is actually a regression from my positioned object DHTML optimization.
2709 Reviewed by kocienda
2711 * khtml/rendering/render_object.cpp:
2712 (RenderObject::setStyle):
2714 2004-12-14 David Hyatt <hyatt@apple.com>
2716 Make sure the class attribute works when newlines are present in the attribute.
2718 Reviewed by kocienda
2720 * khtml/html/html_elementimpl.cpp:
2721 (HTMLNamedAttrMapImpl::parseClassAttribute):
2723 2004-12-14 David Hyatt <hyatt@apple.com>
2725 Fix for 3724938, float element is duplicated and paints twice. The logic for when to paint floats was
2726 actually fairly screwed up. This patch simplifies the logic and makes addOverhangingFloats easier to
2727 read by splitting it into two separate functions.
2729 Reviewed by kocienda
2731 * khtml/rendering/render_block.cpp:
2732 (khtml::RenderBlock::layoutBlockChildren):
2733 (khtml::RenderBlock::clearFloats):
2734 (khtml::RenderBlock::addOverhangingFloats):
2735 (khtml::RenderBlock::addIntrudingFloats):
2736 * khtml/rendering/render_block.h:
2738 2004-12-14 John Sullivan <sullivan@apple.com>
2742 - added Undo action names for Cut, Paste, and Drag
2744 * khtml/editing/htmlediting.h:
2745 * khtml/editing/htmlediting.cpp:
2746 (khtml::DeleteSelectionCommand::editingAction):
2747 overridden to return HTMLEditActionCut
2748 (khtml::MoveSelectionCommand::editingAction):
2749 overridden to return HTMLEditActionDrag
2750 (khtml::ReplaceSelectionCommand::editingAction):
2751 overridden to return HTMLEditActionPaste
2753 2004-12-14 John Sullivan <sullivan@apple.com>
2757 - architecture for WebCore part of fix for <rdar://problem/3790011> undoable operations all say "Undo" in the menu,
2758 no specific action names
2760 The remaining step is to make each EditCommand subclass override editingAction() to return an
2761 appropriate value. (Unfortunately the mapping between subclass and user-distinguishable action
2762 is not completely straightforward, so this next step isn't trivial.)
2764 * khtml/editing/htmlediting.h:
2765 new enum for HTMLEditAction
2767 * khtml/editing/htmlediting.cpp:
2768 (khtml::EditCommandPtr::editingAction):
2769 new method, calls through to EditCommand
2770 (khtml::EditCommand::editingAction):
2771 new method for subclasses to override, returns HTMLEditActionUnspecified at this level
2772 (khtml::TypingCommand::editingAction):
2773 proof of concept override, returns HTMLEditActionTyping
2775 * kwq/KWQKHTMLPart.h:
2776 declare new private bottleneck method registerCommandForUndoOrRedo
2777 * kwq/KWQKHTMLPart.mm:
2778 (KWQKHTMLPart::registerCommandForUndoOrRedo):
2779 new bottleneck method to reduce code duplication; now calls over the bridge
2780 to get the localized string to use for the Undo action name
2781 (KWQKHTMLPart::registerCommandForUndo):
2782 now calls new bottleneck method
2783 (KWQKHTMLPart::registerCommandForRedo):
2784 now calls new bottleneck method
2786 * kwq/WebCoreBridge.h:
2787 new enum for WebUndoAction, maps directly to HTMLEditAction.
2788 Declaration of nameForUndoAction:
2790 2004-12-14 Darin Adler <darin@apple.com>
2794 - added a bunch of missing nil checks; our old version of inherits used to work for nil (by accident)
2796 * khtml/rendering/render_frames.cpp:
2797 (RenderPart::~RenderPart): Check widget for nil.
2798 (RenderPart::setWidget): Ditto.
2799 (RenderFrame::slotViewCleared): Ditto.
2800 (RenderPartObject::slotViewCleared): Ditto.
2802 2004-12-13 Darin Adler <darin@apple.com>
2806 - moved markup-related functions into new sources files in the editing directory
2807 - removed all of the uses of dynamic_cast, preparing to turn off RTTI to make our code smaller and slightly faster
2809 * ForwardingHeaders/editing/markup.h: Added.
2810 * khtml/editing/markup.h: Added.
2811 * khtml/editing/markup.cpp: Added.
2813 * WebCore.pbproj/project.pbxproj: Added markup.h/cpp.
2815 * khtml/dom/dom_node.cpp: (Node::toHTML): Call createMarkup since there's no toHTML in NodeImpl any more.
2816 * khtml/html/html_elementimpl.cpp:
2817 (HTMLElementImpl::innerHTML): Changed to call createMarkup.
2818 (HTMLElementImpl::outerHTML): Ditto.
2820 * khtml/ecma/kjs_window.cpp:
2821 (Window::retrieveWindow): Comment out assert that uses dynamic_cast.
2822 (Window::retrieveActive): Ditto.
2824 * khtml/editing/htmlediting.h: Added forward class declaration needed now that I removed one elsewhere.
2825 * khtml/xml/dom_docimpl.h: Ditto.
2827 * khtml/khtml_part.cpp:
2828 (KHTMLPart::slotDebugDOMTree): Use createMarkup instead of toHTML.
2829 (KHTMLPart::processObjectRequest): Use inherits instead of dynamic_cast.
2831 * khtml/rendering/render_image.cpp: (RenderImage::paint): Add an explicit QChar conversion so this code
2832 still works even with the additional replace overloads added to QString.
2833 * kwq/KWQTextCodec.mm: (QTextCodec::fromUnicode): Ditto.
2835 * khtml/rendering/render_object.h: Removed the version of arenaDelete that does not take an object
2836 base pointer, because it used dynamic_cast in its implementation. Made the other version public.
2837 * khtml/rendering/render_object.cpp: Ditto.
2838 * khtml/rendering/render_replaced.cpp: (RenderWidget::deref): Pass object base pointer to arenaDelete.
2840 * khtml/xml/dom2_rangeimpl.h: Removed extra parameters from toHTML, and unneeded includes and declarations.
2841 * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::toHTML): Changed to call createMarkup, and moved all
2842 the support code into markup.cpp.
2844 * khtml/xml/dom_nodeimpl.h: Moved toHTML and related functions into markup.cpp.
2845 * khtml/xml/dom_nodeimpl.cpp: Ditto.
2847 * khtml/xml/dom_position.cpp:
2848 (DOM::startPosition): Implemented the version of this that takes a RangeImpl. Also added null checks
2849 so these return null positions rather than raising exceptions.
2850 (DOM::endPosition): Ditto.
2852 * khtml/khtmlview.h: Added an APPLE_CHANGES function so inherits can detect this class without dynamic_cast.
2853 * kwq/KWQFrame.h: Ditto.
2854 * kwq/KWQFrame.mm: (QFrame::isQFrame): Ditto.
2855 * kwq/KWQKPartsPart.h: Ditto.
2856 * kwq/KWQKPartsPart.mm: (KParts::ReadOnlyPart::isKPartsReadOnlyPart): Ditto.
2857 * kwq/KWQScrollView.h: Ditto.
2858 * kwq/KWQScrollView.mm: (QScrollView::isQScrollView): Ditto.
2859 * kwq/KWQKHTMLPart.h: Ditto.
2860 * kwq/KWQKHTMLPart.mm:
2861 (KHTMLView::isKHTMLView): Ditto.
2862 (KWQKHTMLPart::setTitle): Added an explicit QChar conversion so this code still works even with the additional
2863 replace overloads added to QString.
2864 (KWQKHTMLPart::setStatusBarText): Ditto.
2865 (KWQKHTMLPart::runJavaScriptAlert): Ditto.
2866 (KWQKHTMLPart::runJavaScriptConfirm): Ditto.
2867 (KWQKHTMLPart::runJavaScriptPrompt): Ditto.
2868 (KWQKHTMLPart::attributedString): Ditto.
2869 (KWQKHTMLPart::isCharacterSmartReplaceExempt): Ditto.
2870 (KWQKHTMLPart::isKHTMLPart): That dynamic_cast thing (see above).
2872 * kwq/KWQObject.h: Added virtual methods for the few cases where we need dynamic_cast-like behavior.
2874 (QObject::inherits): Changed to not use dynamic cast.
2875 (QObject::isKHTMLPart): Added. Returns false.
2876 (QObject::isKHTMLView): Ditto.
2877 (QObject::isKPartsReadOnlyPart): Ditto.
2878 (QObject::isQFrame): Ditto.
2879 (QObject::isQScrollView): Ditto.
2881 * kwq/KWQRenderTreeDebug.cpp:
2882 (write): Changed to use inherits rather than dynamic_cast.
2883 (writeSelection): Ditto.
2885 * kwq/KWQSlot.mm: (KWQSlot::call): Call through to the version with just a job pointer parameter rather
2886 than going straight on to the "no parameters at all" version.
2889 * kwq/KWQString.mm: (QString::replace): Added overloads.
2890 * kwq/WebCoreBridge.mm:
2891 (-[WebCoreBridge markupStringFromNode:nodes:]): Changed to call functions in markup.h.
2892 (-[WebCoreBridge markupStringFromRange:nodes:]): Ditto.
2893 (-[WebCoreBridge selectedString]): Added an explicit QChar conversion so this code still works even with
2894 the additional replace overloads added to QString.
2895 (-[WebCoreBridge stringForRange:]): Ditto.
2896 (-[WebCoreBridge copyDOMNode:copier:]): Changed to call functions in markup.h.
2897 (-[WebCoreBridge elementAtPoint:]): QChar conversion.
2898 (-[WebCoreBridge documentFragmentWithMarkupString:baseURLString:]): Changed to call functions in markup.h.
2899 (-[WebCoreBridge documentFragmentWithText:]): Changed to call functions in markup.h.
2901 2004-12-13 Ken Kocienda <kocienda@apple.com>
2907 <rdar://problem/3917956> REGRESSION (Mail): pasting can leave insertion point inside pasted text
2909 * khtml/editing/htmlediting.cpp:
2910 (khtml::ReplaceSelectionCommand::doApply): Fix coding mistake. Calculations of bool flag based on
2911 leading and trailing whitespace positions was reversed! I must have introduced this error recently
2912 when changing around this code.
2914 2004-12-13 David Hyatt <hyatt@apple.com>
2916 Fix for 3915787, macobserver doesn't paint. floatRect() needed to be const in the base class. Also hit-testing
2917 and painting was using the wrong rect when setting up the x/y of the rect.
2921 * khtml/rendering/render_block.cpp:
2922 (khtml::RenderBlock::paint):
2923 (khtml::RenderBlock::nodeAtPoint):
2924 * khtml/rendering/render_object.h:
2925 (khtml::RenderObject::floatRect):
2927 2004-12-13 Ken Kocienda <kocienda@apple.com>
2933 <rdar://problem/3917863> REGRESSION (Mail): pasting two lines of plain text copied from an RTF document results in two styles
2935 Code to figuire out the end node to merge was missing the font tag in the second paragraph
2936 written out by AppKit convert-to-HTML function. I refined the algorithm to be smarter.
2938 * khtml/editing/htmlediting.cpp:
2939 (khtml::ReplacementFragment::mergeEndNode): Refine algorithm used to walk through the fragment being pasted
2940 looking for the node that is the last inline in the last block of the fragment. The old algorithm was
2941 insufficiently powerful.
2942 (khtml::ReplacementFragment::enclosingBlock): New helper function.
2943 * khtml/editing/htmlediting.h: Add declaration for new helper function.
2944 * layout-tests/editing/pasteboard/paste-text-011-expected.txt: Added.
2945 * layout-tests/editing/pasteboard/paste-text-011.html: Added.
2947 2004-12-13 Ken Kocienda <kocienda@apple.com>
2951 WebCore side of fix for this bug:
2953 <rdar://problem/3768372> REGRESSION (Mail): paste of text ending in whitespace loses whitespace
2955 Note that we are coordinating with Doug Davidson on the AppKit team to make a complete fix for this
2956 bug. This change involves our half of the needed changes.
2958 Note that a lot of this change has to do with changing code to use a <br> element instead of
2959 a comment node as the mechanism to annotate HTML with information used to fix the bug. In some
2960 other places, code to handle comments in markup can be removed since we do not use comments for
2961 such annotations after this change.
2963 * khtml/editing/htmlediting.cpp: Remove isComment() helper; no longer needed.
2964 (khtml::ReplacementFragment::ReplacementFragment): Change m_hasInterchangeNewlineComment name to m_hasInterchangeNewline.
2965 (khtml::ReplacementFragment::isInterchangeNewlineNode): Name changed from isInterchangeNewlineComment.
2966 (khtml::ReplacementFragment::isInterchangeConvertedSpaceSpan): Local variable name convertedSpaceSpanClass changed to
2967 convertedSpaceSpanClassString to match other uses of the idiom used here.
2968 (khtml::ReplaceSelectionCommand::doApply): Change hasInterchangeNewlineComment() name to hasInterchangeNewline().
2969 * khtml/editing/htmlediting.h: Change names as noted in .cpp file. Remove isComment() helper; no longer needed.
2970 (khtml::ReplacementFragment::hasInterchangeNewline): Change hasInterchangeNewlineComment() name to hasInterchangeNewline().
2971 * khtml/html/html_elementimpl.cpp:
2972 (HTMLElementImpl::createContextualFragment): No longer has includeCommentsInDOM flag; no longer needed as we do not
2973 annotate fragments with comments any longer.
2974 * khtml/html/html_elementimpl.h: Ditto.
2975 * khtml/xml/dom2_rangeimpl.cpp: Remove addCommentToHTMLMarkup() helper. No longer needed.
2976 (DOM::interchangeNewlineMarkupString): New helper to return <br> element markup we use to annotate content for interchange.
2977 (DOM::RangeImpl::toHTML): No longer uses addCommentToHTMLMarkup; now calls interchangeNewlineMarkupString(). Remove
2978 spurious semi-colon.
2979 * khtml/xml/dom2_rangeimpl.h: Remove obsolete addCommentToHTMLMarkup() function and EAddToMarkup enum.
2980 * kwq/WebCoreBridge.mm:
2981 (-[WebCoreBridge documentFragmentWithMarkupString:baseURLString:]): No longer pass bool to ask for including comments
2982 in DOM when calling createContextualFragment().
2984 2004-12-10 John Sullivan <sullivan@apple.com>
2986 fixed deployment build bustage that John Louch ran into
2988 * kwq/KWQTextEdit.mm:
2989 (QTextEdit::setScrollBarModes):
2990 move bool declaration inside exception-handling block to avoid obscure
2993 2004-12-10 Maciej Stachowiak <mjs@apple.com>
2995 Reviewed by Richard.
2997 <rdar://problem/3907484> REGRESSION (125-173): crash when KWQTextField is dealloc'ed while setting focus (profoundlearning.com)
3000 (QWidget::setFocus): Handle the case where setting focus removed
3001 us from the superview - this can happen due to style changes on
3004 2004-12-10 Ken Kocienda <kocienda@apple.com>
3010 <rdar://problem/3915008> REGRESSION (Mail): Too much white space between lines separated by carriage returns
3012 There are a number of interesting things we could do to fix this bug, including SPI and involving
3013 the WebKit delegate, etc., however it seems reasonable to start with a hard-coded default that
3014 will fix the bug in the general case until such time as we can come up with more specific
3017 So, I added a helper method to create <p> elements with an inline style that sets top and bottom margins
3020 * khtml/editing/htmlediting.cpp:
3021 (khtml::InsertParagraphSeparatorCommand::createParagraphElement): New factory method to create
3022 paragraph elements to insert. Also adds style information to keep the <p> from having "too-big" margins.
3023 (khtml::InsertParagraphSeparatorCommand::doApply): Call new factory method.
3024 * khtml/editing/htmlediting.h: Add createParagraphElement() declaration.
3026 2004-12-10 Darin Adler <darin@apple.com>
3030 - fixed <rdar://problem/3910419> setting style={overflow:hidden} for <textarea> does not prevent appearance of scrollbars
3032 * khtml/rendering/render_form.h: Remove now-unneeded wrap parameter.
3033 * khtml/rendering/render_form.cpp:
3034 (RenderSubmitButton::rawText): Convert to QChar explicitly.
3035 (RenderLineEdit::updateFromElement): Ditto.
3036 (RenderLineEdit::slotTextChanged): Ditto.
3037 (RenderSelect::updateFromElement): Ditto.
3038 (TextAreaWidget::TextAreaWidget): Moved out most of the initialization since it's not something
3039 that requires a derived class. Now we don't use this class at all for WebCore, but they still
3041 (TextAreaWidget::event): Moved out the ifdefs.
3042 (RenderTextArea::RenderTextArea): Moved setting code from TextAreaWidget here. Put a bunch that
3043 we don't need at all inside !APPLE_CHANGES, and removed the setting for scroll bars, since that's
3044 now done in setStyle.
3045 (RenderTextArea::handleFocusOut): Use type QTextEdit instead of TextAreaWidget since that's all
3046 that's needed and WebCore no longer has TextAreaWidget.
3047 (RenderTextArea::calcMinMaxWidth): Ditto.
3048 (RenderTextArea::setStyle): Add code to set scroll bar modes based on wrap setting combined with
3050 (RenderTextArea::updateFromElement): Use type QTextEdit.
3051 (RenderTextArea::text): Ditto.
3052 (RenderTextArea::select): Ditto.
3054 * kwq/KWQTextArea.mm:
3055 (-[KWQTextArea _configureTextViewForWordWrapMode]): Don't set horizontal scroller visibility here,
3056 since it's now handled by QTextEdit.
3057 (-[KWQTextArea initWithFrame:]): Don't set vertical scroller visibility or scroller auto-hiding.
3059 * kwq/KWQTextEdit.h: Add setScrollBarModes function to be used instead of separate setter for
3060 the horizontal and vertical mode; needed because AppKit switches "autohide" for both at once.
3061 * kwq/KWQTextEdit.mm: (QTextEdit::setScrollBarModes): Added.
3063 2004-12-10 Ken Kocienda <kocienda@apple.com>
3069 <rdar://problem/3915047> HItting return in empty document inserts <p> but
3070 insertion point does not move
3072 * khtml/editing/htmlediting.cpp:
3073 (khtml::InsertParagraphSeparatorCommand::doApply): The issue is that the
3074 code to insert the <p> element for the return is not detecting the fact
3075 that the document is empty. Inserting a <p> into an empty body will not
3076 "add a new line" as the user expects. With this change, we'll add a second
3077 <p> when the root editable element has no rendered kids.
3079 2004-12-10 Maciej Stachowiak <mjs@apple.com>
3083 <rdar://problem/3912979> REGRESSION (125-173): repro crash in HTMLCollectionImpl code (www.clubtravel.ie)
3085 * khtml/html/html_miscimpl.cpp:
3086 (HTMLCollectionImpl::traverseNextItem): Pass base when traversing
3087 the initial one step, otherwise we might inadvertantly step
3088 outside the collection base, thereby causing assertion failures or
3089 other badness later.
3091 2004-12-10 Ken Kocienda <kocienda@apple.com>
3095 * khtml/editing/htmlediting.cpp:
3096 (khtml::InsertParagraphSeparatorCommand::doApply): There is a starting block which is supposed to
3097 act as the root node for this operation. However, a loop was incorrectly coded, and a parent node
3098 search could escape this node. Also, one other piece to code to move nodes to the new <p> element
3099 should do nothing if the starting point for the selection is itself the starting block.
3100 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Similar changes, in spirit, to the above
3101 function, though the names and concepts are slightly different.
3103 2004-12-10 Maciej Stachowiak <mjs@apple.com>
3107 <rdar://problem/3907705> REGRESSION (172-173): DHTML menus are broken at hrweb.apple.com
3109 * khtml/dom/html_document.cpp:
3110 (HTMLDocument::nameableItems): New method, wrapper for HTMLCollection creation.
3111 * khtml/dom/html_document.h:
3112 * khtml/ecma/kjs_html.cpp:
3113 (KJS::HTMLDocument::tryGet): use doc.nameableItems(), not doc.all()!
3114 * khtml/html/html_miscimpl.cpp:
3115 (HTMLCollectionImpl::traverseNextItem): Added new DOC_NAMEABLE_ITEMS type, this represents
3116 the items that can be accessed directly as a document propery, in particular forms, images,
3117 objects, applets and embeds.
3118 (HTMLCollectionImpl::updateNameCache): Fix some nameCache/idCache confusion.
3119 (HTMLFormCollectionImpl::updateNameCache): Ditto.
3120 * khtml/html/html_miscimpl.h:
3121 (DOM::HTMLCollectionImpl::): Added new type.
3123 2004-12-10 Ken Kocienda <kocienda@apple.com>
3129 <rdar://problem/3914779> REGRESSION (Mail): Cannot arrow navigate to position before last character on text-wrapped line
3131 * khtml/rendering/render_text.cpp:
3132 (RenderText::caretRect): Code was not detecting space at the end of a line correctly. Now it does.
3134 2004-12-10 Ken Kocienda <kocienda@apple.com>
3140 <rdar://problem/3914755> REGRESSION (Mail): Insertion point disappears after pasting paragraph
3142 * khtml/editing/htmlediting.cpp:
3143 (khtml::ReplaceSelectionCommand::doApply): Selection could end up in a "placeholder" node
3144 that was removed from the document when pasting. This caused the disappearance. Now this
3145 is detected, and the selection is shifted to a node that is in the document.
3147 2004-12-09 Richard Williamson <rjw@apple.com>
3149 Check to disable threaded decoding during
3150 layout tests wasn't invoking function, just checking address of
3151 function, which would always return true.
3153 * kwq/WebCoreImageRendererFactory.m:
3154 (+[WebCoreImageRendererFactory shouldUseThreadedDecoding]):
3156 2004-12-09 David Hyatt <hyatt@apple.com>
3158 Fix for 3892686, left/top overflow was not being propagated properly up to containing blocks because of a math
3161 Also fix a bug I noticed on the same page where relative position offsets were not being added in properly for
3162 all inlines when repainting.
3166 * khtml/rendering/render_block.cpp:
3167 (khtml::RenderBlock::layoutBlockChildren):
3168 * khtml/rendering/render_flow.cpp:
3169 (RenderFlow::getAbsoluteRepaintRect):
3171 2004-12-09 David Hyatt <hyatt@apple.com>
3173 Fix for 3867545, finance.yahoo.com lays out incorrectly. Add a quirk that will prevent tables from moving
3174 down below floats when there is insufficient space. Instead we will match Gecko and just spill out of the
3175 containing block to the right. This appears to be the more common desired behavior, despite being wrong.
3176 WinIE sometimes wraps and sometimes doesn't, but it's really hard for us to match its inconsistency.
3180 * khtml/rendering/render_block.cpp:
3181 (khtml::RenderBlock::getClearDelta):
3182 * layout-tests/apple-only/base/www.cnn.com/index-expected.txt:
3183 * layout-tests/apple-only/base/www.ebay.com/index-expected.txt:
3184 * layout-tests/apple-only/base/www.excite.com/index-expected.txt:
3185 * layout-tests/fast/block/margin-collapse/102-expected.txt:
3186 * layout-tests/fast/block/margin-collapse/102.html:
3188 2004-12-09 Richard Williamson <rjw@apple.com>
3190 Fixed <rdar://problem/3914078> worldclock crashing gc related
3192 Use ProtectedValue for Context2D instance members.
3196 * khtml/ecma/kjs_html.h:
3198 2004-12-09 John Sullivan <sullivan@apple.com>
3202 - fixed <rdar://problem/3731099> Move AXTitle string for image elements to AXDescription
3204 * kwq/KWQAccObject.mm:
3205 (-[KWQAccObject title]): moved image alt tag code out of here
3206 (-[KWQAccObject accessibilityDescription]): moved image alt tag code into this new method
3207 (-[KWQAccObject accessibilityAttributeNames]): include AXDescription in the set of attributes
3208 that ordinary elements return; this means that ordinary elements that aren't images will return
3209 a nil description, which isn't ideal, but is in keeping with the way the rest of these attributes
3211 (-[KWQAccObject accessibilityAttributeValue:]):
3212 call accessibilityDescription when asked for AXDescription
3214 2004-12-09 Ken Kocienda <kocienda@apple.com>
3216 Reviewed by Harrison
3220 <rdar://problem/3910425> REGRESSION (Mail): Crash in ReplaceSelectionCommand; selection is empty, leading to null deref
3222 * khtml/editing/htmlediting.cpp:
3223 (khtml::MoveSelectionCommand::doApply): The node representing the destination for the move may have
3224 been deleted. If this is the case, set the destination to the node the delete command provides in
3225 its ending selection.
3229 2004-12-09 Ken Kocienda <kocienda@apple.com>
3235 <rdar://problem/3912841> REGRESSION (173-TOT): Some images report 0x0 dimensions on layout tests, causes spurious test failures
3237 The new threaded image decoding capability can throw off layout tests. The issue is that the decoding
3238 callback may not be delivered before the program asks for the dimensions of an image in order to
3239 wrote the layout dimensions. More generally, I think we need to ensure that there are no races in
3240 layout tests, so I have added a flag to the render tree debug code that we can set when debugging.
3242 * kwq/KWQRenderTreeDebug.cpp:
3243 (debuggingRenderTree): New function. Returns flag which tells whether the program is debugging the render tree.
3244 (externalRepresentation): Sets debuggingRenderTree flag to true;
3245 * kwq/KWQRenderTreeDebug.h:
3246 * kwq/WebCoreImageRendererFactory.m:
3247 (+[WebCoreImageRendererFactory shouldUseThreadedDecoding]): Checks debuggingRenderTree flag and will not
3248 do threaded decoding in any case if the flag is set.
3250 2004-12-09 Chris Blumenberg <cblu@apple.com>
3252 Fix for busting XMLHTTPRequest.
3254 Reviewed by kocienda.
3256 * khtml/misc/loader.cpp:
3257 (Loader::servePendingRequests): pass true for deliverAllData
3259 (KIO::get): take deliverAllData param
3260 (KIO::http_post): ditto
3261 * kwq/KWQKJobClasses.h:
3262 * kwq/KWQKJobClasses.mm:
3263 (KIO::TransferJob::TransferJob): if deliverAllData, create signal with data param
3264 (KIO::TransferJob::emitResult): if deliverAllData, call signal with data param
3266 2004-12-09 Ken Kocienda <kocienda@apple.com>
3270 <rdar://problem/3911011> REGRESSION (Mail): Spaces at end of line causing word wrap lost when copied/pasted
3272 * khtml/xml/dom_nodeimpl.cpp:
3273 (NodeImpl::renderedText): Fixed the code so that spaces at the end of lines are not skipped.
3275 2004-12-07 Richard Williamson <rjw@apple.com>
3277 Support threaded image decoding on machines w/ > 2 CPUs.
3279 Reviewed by Maciej and Chris.
3281 * khtml/misc/loader.cpp:
3282 (CachedImageCallback::notifyUpdate):
3283 (CachedImageCallback::notifyFinished):
3284 (CachedImageCallback::notifyDecodingError):
3285 (CachedImageCallback::handleError):
3286 (CachedImageCallback::clear):
3287 (CachedImage::CachedImage):
3288 (CachedImage::clear):
3289 (CachedImage::data):
3290 (CachedImage::checkNotify):
3291 (Loader::servePendingRequests):
3292 (Loader::slotFinished):
3293 (Loader::numRequests):
3294 (Loader::cancelRequests):
3295 (Loader::removeBackgroundDecodingRequest):
3296 * khtml/misc/loader.h:
3297 (khtml::CachedImageCallback::CachedImageCallback):
3298 (khtml::CachedImageCallback::ref):
3299 (khtml::CachedImageCallback::deref):
3300 (khtml::CachedImage::decoderCallback):
3301 * khtml/rendering/render_object.cpp:
3302 (RenderObject::setPixmap):
3305 (-[WebImageCallback initWithCallback:khtml::]):
3306 (-[WebImageCallback _commonTermination]):
3307 (-[WebImageCallback dealloc]):
3308 (-[WebImageCallback finalize]):
3309 (-[WebImageCallback notify]):
3310 (-[WebImageCallback setImageSourceStatus:]):
3311 (-[WebImageCallback status]):
3312 (QPixmap::shouldUseThreadedDecoding):
3313 (QPixmap::receivedData):
3314 * kwq/WebCoreImageRenderer.h:
3315 * kwq/WebCoreImageRendererFactory.h:
3316 * kwq/WebCoreImageRendererFactory.m:
3317 (+[WebCoreImageRendererFactory shouldUseThreadedDecoding]):
3318 (+[WebCoreImageRendererFactory setShouldUseThreadedDecoding:]):
3320 2004-12-07 Ken Kocienda <kocienda@apple.com>
3324 * khtml/editing/htmlediting.cpp:
3325 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Fix a problem with my
3326 change in thei code yesterday. Call to insertBlockPlaceholderIfNeeded() must be done
3327 after new block has been inserted, otherwise a crash can result. Shuffle down call
3328 to insertBlockPlaceholderIfNeeded() a couple of lines (where the node is inserted),