Reviewed by Ken
[WebKit-https.git] / WebCore / ChangeLog-2005-08-23
1 2004-10-14  Adele Amchan  <adele@apple.com>
2
3         Reviewed by Ken
4         
5         This change makes these three functions virtual so that the work is being done in KWQHTMLPart 
6         instead of khtml_part, eliminating the need for the "#if APPLE_CHANGES" statements in the khtml code.
7
8         * khtml/khtml_part.cpp:
9         (KHTMLPart::shouldBeginEditing):
10         (KHTMLPart::shouldEndEditing):
11         (KHTMLPart::isContentEditable):
12         * khtml/khtml_part.h:
13         * kwq/KWQKHTMLPart.h:
14
15 2004-10-14  Ken Kocienda  <kocienda@apple.com>
16
17         Reviewed by John
18
19         Final fix for these bugs:
20         
21         <rdar://problem/3806306> HTML editing puts spaces at start of line
22         <rdar://problem/3814252> HTML editing groups space with word causing wrapping
23
24         This change sets some new CSS properties that have been added to WebCore to 
25         enable whitespace-handling and line-breaking features that make WebView work
26         more like a text editor.
27
28         * khtml/css/cssstyleselector.cpp:
29         (khtml::CSSStyleSelector::applyProperty): Add and remove special editing CSS properties 
30         based on property value.
31         * khtml/html/html_elementimpl.cpp:
32         (HTMLElementImpl::setContentEditable): Add and remove special editing CSS properties 
33         based on attribute value.
34         * khtml/khtml_part.cpp:
35         (KHTMLPart::applyEditingStyleToBodyElement): New helper. Calls applyEditingStyleToElement on
36         body element.
37         (KHTMLPart::removeEditingStyleFromBodyElement): New helper. Calls removeEditingStyleFromElement on
38         body element.
39         (KHTMLPart::applyEditingStyleToElement): Adds special editing CSS properties to passed in element.
40         (KHTMLPart::removeEditingStyleFromElement): Removes special editing CSS properties from passed in element.
41         * khtml/khtml_part.h: Add new declarations.
42         * kwq/WebCoreBridge.h: Ditto.
43         * kwq/WebCoreBridge.mm:
44         (-[WebCoreBridge applyEditingStyleToBodyElement]): Call through to similarly-named function on KHTMLPart.
45         (-[WebCoreBridge removeEditingStyleFromBodyElement]): Ditto.
46         (-[WebCoreBridge applyEditingStyleToElement:]): Ditto.
47         (-[WebCoreBridge removeEditingStyleFromElement:]): Ditto.
48
49 2004-10-14  John Sullivan  <sullivan@apple.com>
50
51         Reviewed by Ken.
52         
53         - fixed <rdar://problem/3840052> Crash in removeBlockPlaceholderIfNeeded attaching file to empty document
54
55         * khtml/editing/htmlediting.cpp:
56         (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded):
57         needed a nil check to handle empty document case
58
59 2004-10-13  Maciej Stachowiak  <mjs@apple.com>
60
61         Reviewed by Ken.
62
63         <rdar://problem/3824626> Change to do colormatching for DeviceRGB colorspace causes ~11% Safari slowdown
64         
65         - I fixed this by turning off all colormatching for WebKit
66         content. We might turn it back on later. For now, it's possible to
67         turn it on temporarily by defining COLORMATCH_EVERYTHING.
68         
69         * WebCorePrefix.h:
70         * khtml/ecma/kjs_html.cpp:
71         (KJS::Context2DFunction::tryCall):
72         (Context2D::colorRefFromValue):
73         (Gradient::getShading):
74         * khtml/rendering/render_canvasimage.cpp:
75         (RenderCanvasImage::createDrawingContext):
76         * kwq/KWQColor.mm:
77         (QColor::getNSColor):
78         * kwq/KWQPainter.h:
79         * kwq/KWQPainter.mm:
80         (CGColorFromNSColor):
81         (QPainter::selectedTextBackgroundColor):
82         (QPainter::rgbColorSpace):
83         (QPainter::grayColorSpace):
84         (QPainter::cmykColorSpace):
85         * kwq/WebCoreGraphicsBridge.h:
86         * kwq/WebCoreGraphicsBridge.m:
87         (-[WebCoreGraphicsBridge createRGBColorSpace]):
88         (-[WebCoreGraphicsBridge createGrayColorSpace]):
89         (-[WebCoreGraphicsBridge createCMYKColorSpace]):
90
91 2004-10-13  Ken Kocienda  <kocienda@apple.com>
92
93         Reviewed by Hyatt
94
95         * khtml/css/css_valueimpl.cpp:
96         (CSSStyleDeclarationImpl::merge): A little cleanup. Also, make sure m_lstValues
97         is non-null before appending.
98
99 2004-10-13  Ken Kocienda  <kocienda@apple.com>
100
101         Reviewed by me
102
103         Update expected results for improved behavior as a result of fix to 3816768.
104     
105         * layout-tests/editing/deleting/delete-3775172-fix-expected.txt
106         * layout-tests/editing/deleting/delete-3800834-fix-expected.txt
107         * layout-tests/editing/deleting/delete-block-merge-contents-002-expected.txt
108
109 2004-10-13  Ken Kocienda  <kocienda@apple.com>
110
111         Reviewed by Richard
112
113         * khtml/css/css_computedstyle.cpp:
114         (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Add support to computed style
115         for getting -khtml-line-break and -khml-nbsp-mode.
116
117 2004-10-13  Ken Kocienda  <kocienda@apple.com>
118
119         Reviewed by John
120
121         Fix for this bug:
122         
123         <rdar://problem/3816768> REGRESSION (Mail): Deleting last character in block incorrectly 
124         moves caret out of block.
125
126         The issue here is that an empty block with no explicit height set by style collapses
127         to zero height, and does so immediately after the last bit of content is removed from
128         it (as a result of deleting text with the delete key for instance). Since zero-height
129         blocks are not eligible caret positions, the caret jumped to the closest eligible spot.
130         
131         The fix is to detect when a block has not been removed itself, but has had all its 
132         contents removed. In this case, a BR element is placed in the block, one that is
133         specially marked as a placeholder. Later, if the block ever receives content, this
134         placeholder is removed.
135
136         * khtml/editing/htmlediting.cpp:
137         (khtml::blockPlaceholerClassString): String which acts as a placeholder marker class.
138         (khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Adds a placeholder BR if needed.
139         (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Removes a placeholder BR if needed.
140         (khtml::DeleteSelectionCommand::moveNodesAfterNode): Call removeBlockPlaceholderIfNeeded.
141         Also, do some cleanup on some old, crufty code in the move logic that is just so clearly wrong 
142         (it's very clear that we needs to be able to move more than just text nodes). This may expose
143         bugs, but these bugs needs to be filed and fixed, not ducked. Besides, undoing this silliness
144         made the test case in the bug work.
145         (khtml::DeleteSelectionCommand::doApply): Call insertBlockPlaceholderIfNeeded and
146         removeBlockPlaceholderIfNeeded.
147         (khtml::InputTextCommand::input): Call removeBlockPlaceholderIfNeeded.
148         (khtml::ReplaceSelectionCommand::doApply): Call removeBlockPlaceholderIfNeeded.
149         * khtml/editing/htmlediting.h: Declare new functions.
150
151 2004-10-13  Richard Williamson   <rjw@apple.com>
152
153         Added support for -apple-dashboard-region:none.  And fixed
154         a few computed style problems.
155
156         Fixed <rdar://problem/3833532> -apple-dashboard-region: none; is needed
157         Reviewed by Hyatt.
158
159         * khtml/css/css_computedstyle.cpp:
160         (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
161         * khtml/css/css_valueimpl.cpp:
162         (CSSPrimitiveValueImpl::cssText):
163         * khtml/css/cssparser.cpp:
164         (CSSParser::parseValue):
165         (CSSParser::parseDashboardRegions):
166         * khtml/css/cssstyleselector.cpp:
167         (khtml::CSSStyleSelector::applyProperty):
168         * khtml/rendering/render_style.cpp:
169         (RenderStyle::noneDashboardRegions):
170         * khtml/rendering/render_style.h:
171         * kwq/KWQKHTMLPart.mm:
172         (KWQKHTMLPart::dashboardRegionsDictionary):
173
174 2004-10-13  David Hyatt  <hyatt@apple.com>
175
176         Rework block layout to clean it up and simplify it (r=kocienda).  
177
178         Also fixing the style sharing bug (r=mjs).
179         
180         * khtml/rendering/render_block.cpp:
181         (khtml::RenderBlock::MarginInfo::MarginInfo):
182         (khtml::RenderBlock::layoutBlock):
183         (khtml::RenderBlock::adjustPositionedBlock):
184         (khtml::RenderBlock::adjustFloatingBlock):
185         (khtml::RenderBlock::handleSpecialChild):
186         (khtml::RenderBlock::handleFloatingOrPositionedChild):
187         (khtml::RenderBlock::handleCompactChild):
188         (khtml::RenderBlock::insertCompactIfNeeded):
189         (khtml::RenderBlock::handleRunInChild):
190         (khtml::RenderBlock::collapseMargins):
191         (khtml::RenderBlock::clearFloatsIfNeeded):
192         (khtml::RenderBlock::estimateVerticalPosition):
193         (khtml::RenderBlock::determineHorizontalPosition):
194         (khtml::RenderBlock::setCollapsedBottomMargin):
195         (khtml::RenderBlock::adjustChildIfOverhangingFloatsExist):
196         (khtml::RenderBlock::handleBottomOfBlock):
197         (khtml::RenderBlock::layoutBlockChildren):
198         (khtml::RenderBlock::getAbsoluteRepaintRectIncludingFloats):
199         (khtml::RenderBlock::addOverHangingFloats):
200         * khtml/rendering/render_block.h:
201         (khtml::RenderBlock::maxTopMargin):
202         (khtml::RenderBlock::maxBottomMargin):
203         (khtml::RenderBlock::CompactInfo::compact):
204         (khtml::RenderBlock::CompactInfo::block):
205         (khtml::RenderBlock::CompactInfo::matches):
206         (khtml::RenderBlock::CompactInfo::clear):
207         (khtml::RenderBlock::CompactInfo::set):
208         (khtml::RenderBlock::CompactInfo::CompactInfo):
209         (khtml::RenderBlock::MarginInfo::setAtTopOfBlock):
210         (khtml::RenderBlock::MarginInfo::setAtBottomOfBlock):
211         (khtml::RenderBlock::MarginInfo::clearMargin):
212         (khtml::RenderBlock::MarginInfo::setSelfCollapsingBlockClearedFloat):
213         (khtml::RenderBlock::MarginInfo::setTopQuirk):
214         (khtml::RenderBlock::MarginInfo::setBottomQuirk):
215         (khtml::RenderBlock::MarginInfo::setDeterminedTopQuirk):
216         (khtml::RenderBlock::MarginInfo::setPosMargin):
217         (khtml::RenderBlock::MarginInfo::setNegMargin):
218         (khtml::RenderBlock::MarginInfo::setPosMarginIfLarger):
219         (khtml::RenderBlock::MarginInfo::setNegMarginIfLarger):
220         (khtml::RenderBlock::MarginInfo::setMargin):
221         (khtml::RenderBlock::MarginInfo::atTopOfBlock):
222         (khtml::RenderBlock::MarginInfo::canCollapseWithTop):
223         (khtml::RenderBlock::MarginInfo::canCollapseWithBottom):
224         (khtml::RenderBlock::MarginInfo::canCollapseTopWithChildren):
225         (khtml::RenderBlock::MarginInfo::canCollapseBottomWithChildren):
226         (khtml::RenderBlock::MarginInfo::selfCollapsingBlockClearedFloat):
227         (khtml::RenderBlock::MarginInfo::quirkContainer):
228         (khtml::RenderBlock::MarginInfo::determinedTopQuirk):
229         (khtml::RenderBlock::MarginInfo::topQuirk):
230         (khtml::RenderBlock::MarginInfo::bottomQuirk):
231         (khtml::RenderBlock::MarginInfo::posMargin):
232         (khtml::RenderBlock::MarginInfo::negMargin):
233         (khtml::RenderBlock::MarginInfo::margin):
234         * khtml/rendering/render_box.cpp:
235         (RenderBox::calcAbsoluteVertical):
236         * khtml/rendering/render_box.h:
237         (khtml::RenderBox::marginTop):
238         (khtml::RenderBox::marginBottom):
239         (khtml::RenderBox::marginLeft):
240         (khtml::RenderBox::marginRight):
241         * khtml/rendering/render_image.cpp:
242         (RenderImage::setImage):
243         * khtml/rendering/render_object.cpp:
244         (RenderObject::sizesToMaxWidth):
245         * khtml/rendering/render_object.h:
246         (khtml::RenderObject::collapsedMarginTop):
247         (khtml::RenderObject::collapsedMarginBottom):
248         (khtml::RenderObject::maxTopMargin):
249         (khtml::RenderObject::maxBottomMargin):
250         (khtml::RenderObject::marginTop):
251         (khtml::RenderObject::marginBottom):
252         (khtml::RenderObject::marginLeft):
253         (khtml::RenderObject::marginRight):
254         * khtml/rendering/render_text.h:
255         (khtml::RenderText::marginLeft):
256         (khtml::RenderText::marginRight):
257         * khtml/xml/dom_elementimpl.cpp:
258         (ElementImpl::recalcStyle):
259
260 2004-10-12  Ken Kocienda  <kocienda@apple.com>
261
262         Reviewed by John
263
264         Fix for this bug:
265         
266         <rdar://problem/3836158> REGRESSION (Mail): command-right-arrow moves to beginning of next line
267
268         * khtml/editing/selection.cpp:
269         (khtml::endOfLastRunAt): Do not let the end of the last run on a line be a BR.
270         This will make it seem like the run ends on the next line.
271
272 2004-10-12  Ken Kocienda  <kocienda@apple.com>
273
274         Reviewed by Hyatt
275
276         Fix for this bug:
277         
278         <rdar://problem/3836986> Delete code removes elements of table structure; can result in very broken-looking web pages
279
280         * khtml/editing/htmlediting.cpp:
281         (khtml::isTableStructureNode): New helper. Determines whether a node is a table cell,
282         row, section, or column.
283         (khtml::CompositeEditCommand::removeFullySelectedNode): New helper that recurses into elements
284         of table structure when doing deletes, rather than deleting the structure elements themselves.
285         (khtml::DeleteSelectionCommand::moveNodesAfterNode): Do not move content between elements
286         of table structure. We may want to revisit this some day, but this seems like the best behavior
287         to me now.
288         (khtml::DeleteSelectionCommand::doApply): Call removeFullySelectedNode instead of removeNode
289         where needed.
290         * khtml/editing/htmlediting.h: Add declarations for new functions.
291
292 2004-10-12  Richard Williamson   <rjw@apple.com>
293
294         Fixed access to DOM object via WebScriptObject API.
295         The execution context for DOM objects wasn't being found.       
296         <rdar://problem/3831372> The valueForKey method for @"offsetLeft" on a paragraph element causes a crash.
297         Reviewed by Chris
298
299         Fixed <rdar://problem/3831063> regions use left offset instead of top offset
300         Reviewed by John
301
302         * khtml/khtml_part.h:
303         * khtml/rendering/render_object.cpp:
304         (RenderObject::addDashboardRegions):
305         * kwq/DOM.mm:
306         (-[DOMNode isContentEditable]):
307         (-[DOMNode KJS::Bindings::]):
308         * kwq/KWQKHTMLPart.h:
309         * kwq/KWQKHTMLPart.mm:
310         (KWQKHTMLPart::executionContextForDOM):
311
312 2004-10-12  Ken Kocienda  <kocienda@apple.com>
313
314         Reviewed by Hyatt
315
316         Fix for this bug:
317
318         <rdar://problem/3834779> Mail crashes when editing HTML message - khtml::Selection::layout()
319     
320         * kwq/KWQKHTMLPart.mm:
321         (KWQKHTMLPart::styleForSelectionStart): Table code seems to be more robust when the call to
322         insert our style-checking node is done with an appendChild rather than an insertBefore. Note 
323         that this table-related problem was exposed by fixing Selection::layout(), which I did
324         yesterday. This change simply improves things even more so that we do not crash in the
325         scenario described in the bug.
326
327 2004-10-11  Ken Kocienda  <kocienda@apple.com>
328
329         Reviewed by John
330
331         This is a partial fix to this bug:
332         
333         <rdar://problem/3832886> increase quote level on new mail document leads to immediate 
334         crash in caret painting code
335         
336         To eliminate the bad behavior for good, I have done some investigations in Mail code,
337         and I have sent a suggested code change on to Grant. Basically, Mail can't add empty
338         blocks (like blockquote elements used for quoting) to documents without giving those 
339         blocks some content (so they have a height).
340
341         I added some other crash protections below.
342
343         * khtml/editing/selection.cpp:
344         (khtml::Selection::layout): Check for non-null position after calls to VisiblePosition, since
345         the VisiblePosition constructors may fail to find a visible spot in the document. Also, add
346         a couple position-has-renderer assertion checks.
347         * kwq/KWQKHTMLPart.mm:
348         (KWQKHTMLPart::styleForSelectionStart): Take out pos.isNotNull() assertion since VisiblePosition
349         may not yield a position. This assertion is a holdover from before we had VisiblePosition.
350         (KWQKHTMLPart::fontForSelection): Rearrange the code a little to deal with possible null results from
351         calls to helpers.
352
353 2004-10-11  Darin Adler  <darin@apple.com>
354
355         Reviewed by John.
356
357         - fixed <rdar://problem/3834230> empty table can result in division by 0
358
359         * khtml/rendering/render_table.cpp: (RenderTableSection::layoutRows):
360         Added 0 check; rolled in from KDE.
361
362 2004-10-11  Darin Adler  <darin@apple.com>
363
364         Reviewed by John.
365
366         - fixed <rdar://problem/3818712> form checkbox value property is read only
367
368         The underlying problem was that we were storing two separate values for all
369         form elements; one for the value property (JavaScript) and the other for the
370         value attribute (DOM). This is a good idea for text input, but not for other types.
371
372         * khtml/html/html_formimpl.h: Changed setValue to take a const DOMString reference.
373         Added private storesValueSeparateFromAttribute function.
374         * khtml/html/html_formimpl.cpp:
375         (DOM::HTMLInputElementImpl::setType): Handle type changes, including detaching and re-attaching
376         if type changed, and moving value from m_value to ATTR_VALUE and vice versa.
377         (DOM::HTMLInputElementImpl::type): Added a case for ISINDEX and moved the default out of the
378         switch so that we will get a warning if a type is left out.
379         (DOM::HTMLInputElementImpl::parseHTMLAttribute): Tweaked comment format.
380         (DOM::HTMLInputElementImpl::reset): Changed to only nuke the value if the value property is stored
381         separately from the attribute. Otherwise, we just want to lave it alone
382         (DOM::HTMLInputElementImpl::value): Changed to always use m_value if it's not null, then fall back
383         on the attribute, and finally fall back to the "on" for the checkbox only if both are null.
384         (DOM::HTMLInputElementImpl::setValue): Changed to set the attribute unless the value property is
385         supposed to be stored separate from the attribute.
386         (DOM::HTMLInputElementImpl::storesValueSeparateFromAttribute): Added. Returns true for text-type
387         input elements, and false for the others.
388
389 2004-10-11  Darin Adler  <darin@apple.com>
390
391         Reviewed by John.
392
393         - fixed <rdar://problem/3296652> checkbox input type does not respond to onchange
394
395         * khtml/rendering/render_form.cpp:
396         (RenderFormElement::updateFromElement): Some new code, commented out, for form element colors.
397         (RenderCheckBox::slotStateChanged): Added call to onChange.
398
399 2004-10-11  Ken Kocienda  <kocienda@apple.com>
400
401         Reviewed by Darin
402
403         Finish selection affinity implementation. This includes code to set the
404         affinity correctly when clicking with the mouse, and clearing the
405         affinity when altering the selection using any of the Selection object
406         mutation functions.
407
408         Each instance of the positionForCoordinates, inlineBox and caretRect 
409         functions have been changed to include an EAffinity argument to give results
410         which take this bit into account.
411
412         * khtml/editing/selection.cpp:
413         (khtml::Selection::init): Default affinity is now UPSTREAM, to match AppKit.
414         (khtml::Selection::modifyAffinity): New function to compute affinity based on
415         modification constants.
416         (khtml::Selection::moveTo): Reset affinity to UPSTREAM.
417         (khtml::Selection::modifyExtendingRightForward): Ditto.
418         (khtml::Selection::modifyMovingRightForward): Ditto.
419         (khtml::Selection::modifyExtendingLeftBackward): Ditto.
420         (khtml::Selection::modifyMovingLeftBackward): Ditto.
421         (khtml::Selection::modify): Support saving, restoring, and then calculating new
422         affinity value as needed. 
423         (khtml::Selection::xPosForVerticalArrowNavigation):
424         (khtml::Selection::clear): Reset affinity to UPSTREAM.
425         (khtml::Selection::setBase): Ditto.
426         (khtml::Selection::setExtent): Ditto.
427         (khtml::Selection::setBaseAndExtent): Ditto.
428         (khtml::Selection::layout): Pass affinity to caretRect().
429         (khtml::Selection::validate): Pass along affinity parameter to new functions that
430         require it.
431         (khtml::startOfFirstRunAt): Changed the way that the y-coordinate search is done, to
432         keep this code working with changes made in selectionForLine().
433         (khtml::endOfLastRunAt): Ditto.
434         (khtml::selectionForLine): Make this function work for all renderers, not just text
435         renderers.
436         * khtml/editing/selection.h:
437         (khtml::operator==): Consider affinity in equality check.
438         * khtml/editing/visible_units.cpp:
439         (khtml::previousLinePosition): Pass affinity argument to function so it can take this 
440         information into account while processing.
441         (khtml::nextLinePosition): Ditto.
442         (khtml::previousParagraphPosition): Ditto.
443         (khtml::nextParagraphPosition): Ditto.
444         * khtml/editing/visible_units.h: Ditto, for each of the functions listed.
445         * khtml/khtml_events.cpp:
446         (khtml::MouseEvent::offset): Rework code to remove dependence on NodeImpl::positionForCoordinates,
447         as this function is being removed.
448         * khtml/khtml_part.cpp:
449         (KHTMLPart::isPointInsideSelection): Ditto.
450         (KHTMLPart::selectClosestWordFromMouseEvent): Ditto.
451         (KHTMLPart::handleMousePressEventTripleClick): Ditto.
452         (KHTMLPart::handleMousePressEventSingleClick): Ditto. Plus, pass affinity argument in
453         call to positionForCoordinates, and set resulting affinity on the selection.
454         (KHTMLPart::handleMouseMoveEventSelection): Rework code to remove dependence on 
455         NodeImpl::positionForCoordinates, as this function is being removed.
456         (KHTMLPart::khtmlMouseReleaseEvent): Ditto.
457         * khtml/rendering/render_block.cpp:
458         (khtml::RenderBlock::positionForCoordinates): Now takes an affinity argument.
459         * khtml/rendering/render_block.h:
460         * khtml/rendering/render_box.cpp:
461         (RenderBox::caretRect): Ditto.
462         * khtml/rendering/render_box.h:
463         * khtml/rendering/render_br.cpp:
464         (RenderBR::positionForCoordinates): Ditto.
465         (RenderBR::caretRect): Ditto.
466         (RenderBR::inlineBox): Ditto.
467         * khtml/rendering/render_br.h:
468         * khtml/rendering/render_container.cpp:
469         (RenderContainer::positionForCoordinates): Ditto.
470         * khtml/rendering/render_container.h:
471         * khtml/rendering/render_flow.cpp:
472         (RenderFlow::caretRect): Ditto.
473         * khtml/rendering/render_flow.h:
474         * khtml/rendering/render_inline.cpp:
475         (RenderInline::positionForCoordinates): Ditto.
476         * khtml/rendering/render_inline.h:
477         * khtml/rendering/render_object.cpp:
478         (RenderObject::caretRect): Ditto.
479         (RenderObject::positionForCoordinates): Ditto.
480         (RenderObject::inlineBox): Ditto.
481         * khtml/rendering/render_object.h:
482         * khtml/rendering/render_replaced.cpp:
483         (RenderReplaced::positionForCoordinates): Ditto.
484         * khtml/rendering/render_replaced.h:
485         * khtml/rendering/render_text.cpp:
486         (RenderText::positionForCoordinates): Ditto.
487         (firstRendererOnNextLine): New helper used by caretRect().
488         (RenderText::caretRect): Now takes an affinity argument.
489         (RenderText::inlineBox): Ditto.
490         * khtml/rendering/render_text.h:
491         * khtml/xml/dom_nodeimpl.cpp: Remove positionForCoordinates helper.
492         * khtml/xml/dom_nodeimpl.h: Ditto.
493         * khtml/xml/dom_position.cpp:
494         (DOM::Position::previousLinePosition): Now takes an affinity argument.
495         (DOM::Position::nextLinePosition): Ditto.
496         * khtml/xml/dom_position.h:
497         * kwq/WebCoreBridge.h:
498         * kwq/WebCoreBridge.mm:
499         (-[WebCoreBridge caretRectAtNode:offset:affinity:]): Ditto.
500         (-[WebCoreBridge setSelectedDOMRange:affinity:]): Ditto.
501         (-[WebCoreBridge _positionForPoint:]): Rework code to remove dependence on 
502         NodeImpl::positionForCoordinates, as this function is being removed.
503
504 2004-10-11  Darin Adler  <darin@apple.com>
505
506         Reviewed by Ken.
507
508         - fixed <rdar://problem/3670280> scroll position on overflowed textareas resets when leaving the tab
509
510         * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView becomeFirstResponder]):
511         Scroll to reveal the text area, don't scroll to reveal the text view itself.
512         Scrolling the text view ended up putting it at the top left, regardless of
513         where the insertion point is.
514
515 2004-10-11  Darin Adler  <darin@apple.com>
516
517         Reviewed by Ken.
518
519         - fixed <rdar://problem/3831546> More text is copied than is visually selected
520
521         The bug here is that upstream was moving a position too far.
522
523         * khtml/xml/dom_position.cpp:
524         (DOM::Position::upstream): Use the "deep equivalent" node rather than the original node passed
525         in for various checks. Also use local variables a bit more for slightly more efficiency.
526         (DOM::Position::downstream): Ditto.
527
528 2004-10-11  Darin Adler  <darin@apple.com>
529
530         Reviewed by Ken.
531
532         - fixed <rdar://problem/3833841> adding an event listener for keypress events does not work
533
534         * khtml/xml/dom2_eventsimpl.h: Added numEventIds and made typeToId take a const DOMString &.
535         * khtml/xml/dom2_eventsimpl.cpp:
536         (EventImpl::typeToId): Changed to use table. Added "keypress", otherwise, the same as before.
537         (EventImpl::idToType): Changed to use table.
538
539 2004-10-10  John Sullivan  <sullivan@apple.com>
540
541         - fixed <rdar://problem/3664375> repro crash in -[KWQAccObject accessibilityAttributeNames]
542
543         (-[KWQAccObject accessibilityActionNames]):
544         check for nil m_renderer
545
546 2004-10-09  Darin Adler  <darin@apple.com>
547
548         Reviewed by Kevin.
549
550         - fixed <rdar://problem/3828147> REGRESSION: textareas with wrap="off" show their contents in a thin vertical line of text
551
552         * kwq/KWQTextArea.h: Added setTextColor and setBackgroundColor methods. This is really for another fix
553         I'm landing later, but it does no harm to add these now.
554         * kwq/KWQTextArea.mm:
555         (-[KWQTextArea _configureTextViewForWordWrapMode]): Set the container size after changing the flag that
556         determines if the width tracks the text view. Otherwise, we won't successfully set the width in the case
557         where we don't want it to track the text view. This caused the bug. 
558         (-[KWQTextArea _createTextView]): Remove unneeded call to setMaxSize. The above method already does that.
559         (-[KWQTextArea setTextColor:]): Added.
560         (-[KWQTextArea setBackgroundColor:]): Added.
561
562 2004-10-09  Darin Adler  <darin@apple.com>
563
564         Reviewed by Adele.
565
566         - fixed <rdar://problem/3829452> REGRESSION (156-157): onload handler doesn't run on page with meta refresh of 0 duration (new Apple start page)
567
568         The fix for <rdar://problem/3773150> made it so <meta> redirects prevent tokenizing the rest of the page.
569         This is incorrect; the reason the JavaScript-triggered loads prevent tokenizing is that they take place
570         "right away" in other browsers, but that is not true of <meta> redirect. We fixed this by using a separate
571         call for <meta> redirect and not preventing tokenizing when that's in effect.
572
573         * khtml/khtml_part.h: Removed userGesture parameter from scheduleRedirection. Renamed
574         isImmediateRedirectPending to isScheduledLocationChangePending. Added scheduleLocationChange.
575         * khtml/khtml_part.cpp:
576         (KHTMLPart::openURL): Updated for new constant name.
577         (KHTMLPart::scheduleRedirection): Removed now-unneeded userGesture parameter, and removed code that
578         does the special case for redirection during load; a <meta> refresh can never be one of those special
579         redirects during a load because it redirects the frame itself, not another frame. Also tightened up
580         the logic by always stopping the redirect timer even if we aren't restarting it.
581         (KHTMLPart::scheduleLocationChange): Added. Like scheduleRedirection, but with a different constant
582         so we can tell it apart and always a delay of 0. The "redirection during load" case was moved in here
583         and renamed to locationChangeScheduledDuringLoad.
584         (KHTMLPart::isScheduledLocationChangePending): Renamed from isImmediateRedirectPending. This now
585         returns true only for location changes and history navigation, not <meta> redirects.
586         (KHTMLPart::scheduleHistoryNavigation): Tightened up logic to do the stop() outside the if as above,
587         and got rid of a silly timer delay computation that always resulted in 0.
588
589         * khtml/khtmlpart_p.h: Added a new value to the RedirectionScheduled enum for scheduleLocationChange
590         and also renamed one of the existing values.
591
592         * khtml/html/htmltokenizer.cpp: (HTMLTokenizer::write): Changed to use isScheduledLocationChangePending instead
593         of isImmediateRedirectPending, because we do want to continue tokenizing if it's actually a redirect.
594
595         * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::putValue): Changed to call the new scheduleLocationChange
596         instead of calling scheduleRedirection with delay of 0.
597         * khtml/ecma/kjs_window.cpp:
598         (Window::put): Ditto.
599         (WindowFunc::tryCall): Ditto.
600         (Location::put): Ditto.
601         (LocationFunc::tryCall): Ditto.
602
603 2004-10-09  Darin Adler  <darin@apple.com>
604
605         Reviewed by Kevin.
606
607         - fixed <rdar://problem/3658277> REGRESSION (1.1-1.2): form submission should either not simulate a click at all or use (0,0) the way Mozilla does
608
609         * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::click): Use 0,0 for the coordinates.
610
611 2004-10-09  Darin Adler  <darin@apple.com>
612
613         Reviewed by Kevin.
614
615         - fixed <rdar://problem/3804665> REGRESSION: WebCore framework now has many init routines
616
617         * khtml/xml/dom_nodeimpl.h: Changed anyQName declaration to not use the inline function
618         makeId. Surprisingly, the inline function was not "constant-folded" and we ended up with
619         a copy of the function in each file as an init routine for the framework.
620
621         * khtml/ecma/kjs_html.cpp: (Gradient::colorStops): Get rid of initialized ColorStop
622         globals; their constructors were showing up as init routines for the framework.
623
624         * khtml/rendering/render_style.h: Got rid of inline initialDashboardRegions function.
625         * khtml/rendering/render_style.cpp: (RenderStyle::initialDashboardRegions): Made this
626         a normal function. When it was an inline function, the constructors for the per-file
627         copies of the globals were showing up as init routines for the framework.
628
629 2004-10-09  Chris Blumenberg  <cblu@apple.com>
630
631         Fixed: 
632         <rdar://problem/3625352> up and down arrow and page up/down keys don't work to scroll overflow:auto/scroll/overlay areas
633         <rdar://problem/3397658> scroll wheel does not work to scroll overflow:auto/scroll/overlay areas (RSS)
634         <rdar://problem/3822027> REGRESSION (Mail): When selection moves out of visible area, should center as NSText does
635
636         Reviewed by hyatt, kocienda.
637
638         * khtml/rendering/render_layer.cpp:
639         (RenderLayer::scroll): new
640         * khtml/rendering/render_layer.h:
641         * khtml/rendering/render_object.cpp:
642         (RenderObject::scroll): new
643         * khtml/rendering/render_object.h:
644         * kwq/KWQKHTMLPart.h:
645         * kwq/KWQKHTMLPart.mm:
646         (KWQKHTMLPart::scrollOverflow): new
647         (KWQKHTMLPart::scrollOverflowWithScrollWheelEvent): new
648         (KWQKHTMLPart::khtmlMousePressEvent): store pressed node so we know where the focus is
649         * kwq/KWQScrollBar.h:
650         * kwq/KWQScrollBar.mm:
651         (QScrollBar::setValue): return a bool
652         (QScrollBar::scrollbarHit): ditto
653         (QScrollBar::scroll): new
654         * kwq/WebCoreBridge.h:
655         * kwq/WebCoreBridge.mm:
656         (-[WebCoreBridge scrollOverflowInDirection:granularity:]): new
657         (-[WebCoreBridge scrollOverflowWithScrollWheelEvent:]): new
658         (-[WebCoreBridge ensureSelectionVisible]): visually center the extent of the selection
659
660 2004-10-06  David Hyatt  <hyatt@apple.com>
661
662         Back out style sharing perf fix.
663         
664         * khtml/css/cssstyleselector.cpp:
665         (khtml::CSSStyleSelector::locateCousinList):
666         (khtml::CSSStyleSelector::canShareStyleWithElement):
667         (khtml::CSSStyleSelector::locateSharedStyle):
668         * khtml/css/cssstyleselector.h:
669         * khtml/html/html_elementimpl.h:
670         (DOM::HTMLElementImpl::inlineStyleDecl):
671         * khtml/xml/dom_elementimpl.cpp:
672         (ElementImpl::recalcStyle):
673         * khtml/xml/dom_elementimpl.h:
674
675 === Safari-166 ===
676
677 2004-10-05  David Hyatt  <hyatt@apple.com>
678
679         Fix a bug in the iteration of locateCousinList and clean up the style sharing stats code.
680
681         * khtml/css/cssstyleselector.cpp:
682         (khtml::CSSStyleSelector::locateCousinList):
683         (khtml::CSSStyleSelector::elementsCanShareStyle):
684         (khtml::CSSStyleSelector::locateSharedStyle):
685         (khtml::CSSStyleSelector::styleForElement):
686
687 2004-10-05  Ken Kocienda  <kocienda@apple.com>
688
689         Reviewed by Hyatt
690
691         * khtml/rendering/bidi.cpp:
692         (khtml::RenderBlock::computeHorizontalPositionsForLine): Fix coding mistake that
693         broke layout tests involving compacts.
694
695 2004-10-05  Ken Kocienda  <kocienda@apple.com>
696
697         Reviewed by Darin
698
699         Finish selection affinity implementation. This includes code to set the
700         affinity correctly when clicking with the mouse, and clearing the
701         affinity when altering the selection using any of the Selection object
702         mutation functions.
703
704         Each instance of the positionForCoordinates function in the render tree
705         has been changed to include an EAffinity argument. It is now the job of this
706         function to set the selection affinity.
707
708         * khtml/editing/selection.cpp:
709         (khtml::Selection::moveTo): Set affinity to DOWNSTREAM.
710         (khtml::Selection::modify): Ditto.
711         (khtml::Selection::clear): Ditto.
712         (khtml::Selection::setBase): Ditto.
713         (khtml::Selection::setExtent): Ditto.
714         (khtml::Selection::setBaseAndExtent): Ditto.
715         * khtml/editing/selection.h:
716         (khtml::operator==): Consider affinity in equality check.
717         * khtml/khtml_events.cpp:
718         (khtml::MouseEvent::offset): Rework code to remove dependence on NodeImpl::positionForCoordinates,
719         as this function is being removed.
720         * khtml/khtml_part.cpp: 
721         (KHTMLPart::isPointInsideSelection): Ditto.
722         (KHTMLPart::selectClosestWordFromMouseEvent): Ditto.
723         (KHTMLPart::handleMousePressEventTripleClick): Ditto.
724         (KHTMLPart::handleMousePressEventSingleClick): Ditto. Plus, pass affinity argument in
725         call to positionForCoordinates, and set resulting affinity on the selection.
726         (KHTMLPart::handleMouseMoveEventSelection): Rework code to remove dependence on 
727         NodeImpl::positionForCoordinates, as this function is being removed.
728         (KHTMLPart::khtmlMouseReleaseEvent):
729         * khtml/rendering/render_block.cpp:
730         (khtml::RenderBlock::positionForCoordinates): Changed, as described above.
731         * khtml/rendering/render_block.h:
732         * khtml/rendering/render_br.cpp:
733         (RenderBR::positionForCoordinates): Ditto.
734         * khtml/rendering/render_br.h:
735         * khtml/rendering/render_container.cpp:
736         (RenderContainer::positionForCoordinates): Ditto.
737         * khtml/rendering/render_container.h:
738         * khtml/rendering/render_inline.cpp:
739         (RenderInline::positionForCoordinates): Ditto.
740         * khtml/rendering/render_inline.h:
741         * khtml/rendering/render_object.cpp:
742         (RenderObject::positionForCoordinates): Ditto.
743         * khtml/rendering/render_object.h:
744         * khtml/rendering/render_replaced.cpp:
745         (RenderReplaced::positionForCoordinates): Ditto.
746         * khtml/rendering/render_replaced.h:
747         * khtml/rendering/render_text.cpp:
748         (RenderText::positionForCoordinates): Ditto.
749         * khtml/rendering/render_text.h:
750         * khtml/xml/dom_nodeimpl.cpp: Removed positionForCoordinates convenience.
751         * khtml/xml/dom_nodeimpl.h: Ditto.
752         * kwq/WebCoreBridge.mm:
753         (-[WebCoreBridge _positionForPoint:]): Rework code to remove dependence on 
754         NodeImpl::positionForCoordinates, as this function is being removed.
755
756 2004-10-05  David Hyatt  <hyatt@apple.com>
757
758         Fix style sharing optimization to be fast again.  Go back to using pointer comparisons when looking for
759         cousins to share.
760         
761         Reviewed by darin
762
763         * khtml/css/cssstyleselector.cpp:
764         (khtml::CSSStyleSelector::locateCousinList):
765         * khtml/rendering/render_object.cpp:
766         (RenderObject::setStyleInternal):
767         * khtml/rendering/render_object.h:
768         * khtml/xml/dom_elementimpl.cpp:
769         (ElementImpl::recalcStyle):
770
771 2004-10-05  David Hyatt  <hyatt@apple.com>
772
773         Fix lists so that they properly participate in line layout as though they are text (when text bullets are
774         used) and as images (when image bullets are used).
775         
776         Reviewed by kocienda
777
778         * khtml/rendering/render_list.cpp:
779         (RenderListMarker::createInlineBox):
780         * khtml/rendering/render_list.h:
781         (khtml::ListMarkerBox:::InlineBox):
782         (khtml::ListMarkerBox::isText):
783
784 2004-10-05  Ken Kocienda  <kocienda@apple.com>
785
786         Reviewed by Darin
787
788         Recent checkin adding upstreamDeepEquivalent had it backwards. The helper
789         we want is downstreamDeepEquivalent, as the deepEquivalent function returns
790         an upstream position.
791
792         * khtml/editing/selection.cpp:
793         (khtml::Selection::layout): DOWNSTREAM case now uses downstreamDeepEquivalent.
794         UPSTREAM uses deepEquivalent.
795         * khtml/editing/visible_position.cpp:
796         (khtml::VisiblePosition::downstreamDeepEquivalent): New helper, replacing 
797         upstreamDeepEquivalent.
798         * khtml/editing/visible_position.h
799
800 2004-10-05  David Hyatt  <hyatt@apple.com>
801
802         New selection gap-filling architecture.  Makes the gap-filling much more like NSTextView and puts the responsibility
803         for gap-filling in the block.  Fixes numerous bugs with selection drawing including bidi issues, incorrect old
804         horizontal gap filling, and selection performance issues.
805         
806         Reviewed by kocienda
807
808         * khtml/html/html_imageimpl.cpp:
809         (HTMLImageLoader::notifyFinished):
810         * khtml/misc/khtmllayout.h:
811         (khtml::GapRects::left):
812         (khtml::GapRects::center):
813         (khtml::GapRects::right):
814         (khtml::GapRects::uniteLeft):
815         (khtml::GapRects::uniteCenter):
816         (khtml::GapRects::uniteRight):
817         (khtml::GapRects::unite):
818         (khtml::GapRects::operator QRect):
819         (khtml::GapRects::operator==):
820         (khtml::GapRects::operator!=):
821         * khtml/rendering/font.cpp:
822         (Font::drawHighlightForText):
823         * khtml/rendering/font.h:
824         * khtml/rendering/render_block.cpp:
825         (khtml:::RenderFlow):
826         (khtml::RenderBlock::removeChild):
827         (khtml::RenderBlock::paintObject):
828         (khtml::RenderBlock::paintEllipsisBoxes):
829         (khtml::RenderBlock::setSelectionState):
830         (khtml::RenderBlock::shouldPaintSelectionGaps):
831         (khtml::RenderBlock::isSelectionRoot):
832         (khtml::RenderBlock::selectionGapRects):
833         (khtml::RenderBlock::paintSelection):
834         (khtml::RenderBlock::fillSelectionGaps):
835         (khtml::RenderBlock::fillInlineSelectionGaps):
836         (khtml::RenderBlock::fillBlockSelectionGaps):
837         (khtml::RenderBlock::fillHorizontalSelectionGap):
838         (khtml::RenderBlock::fillVerticalSelectionGap):
839         (khtml::RenderBlock::fillLeftSelectionGap):
840         (khtml::RenderBlock::fillRightSelectionGap):
841         (khtml::RenderBlock::getHorizontalSelectionGapInfo):
842         (khtml::RenderBlock::leftSelectionOffset):
843         (khtml::RenderBlock::rightSelectionOffset):
844         * khtml/rendering/render_block.h:
845         (khtml::RenderBlock::hasSelectedChildren):
846         (khtml::RenderBlock::selectionState):
847         (khtml::RenderBlock::BlockSelectionInfo::BlockSelectionInfo):
848         (khtml::RenderBlock::BlockSelectionInfo::rects):
849         (khtml::RenderBlock::BlockSelectionInfo::state):
850         (khtml::RenderBlock::BlockSelectionInfo::block):
851         (khtml::RenderBlock::selectionRect):
852         * khtml/rendering/render_box.cpp:
853         (RenderBox::position):
854         * khtml/rendering/render_br.cpp:
855         (RenderBR::inlineBox):
856         * khtml/rendering/render_br.h:
857         (khtml::RenderBR::selectionRect):
858         (khtml::RenderBR::paint):
859         * khtml/rendering/render_canvas.cpp:
860         (RenderCanvas::selectionRect):
861         (RenderCanvas::setSelection):
862         * khtml/rendering/render_canvasimage.cpp:
863         (RenderCanvasImage::paint):
864         * khtml/rendering/render_image.cpp:
865         (RenderImage::paint):
866         * khtml/rendering/render_image.h:
867         * khtml/rendering/render_line.cpp:
868         (khtml::InlineBox::nextLeafChild):
869         (khtml::InlineBox::prevLeafChild):
870         (khtml::InlineBox::selectionState):
871         (khtml::InlineFlowBox::addToLine):
872         (khtml::InlineFlowBox::firstLeafChild):
873         (khtml::InlineFlowBox::lastLeafChild):
874         (khtml::InlineFlowBox::firstLeafChildAfterBox):
875         (khtml::InlineFlowBox::lastLeafChildBeforeBox):
876         (khtml::InlineFlowBox::selectionState):
877         (khtml::RootInlineBox::fillLineSelectionGap):
878         (khtml::RootInlineBox::setHasSelectedChildren):
879         (khtml::RootInlineBox::selectionState):
880         (khtml::RootInlineBox::firstSelectedBox):
881         (khtml::RootInlineBox::lastSelectedBox):
882         (khtml::RootInlineBox::selectionTop):
883         (khtml::RootInlineBox::block):
884         * khtml/rendering/render_line.h:
885         (khtml::RootInlineBox::RootInlineBox):
886         (khtml::RootInlineBox::hasSelectedChildren):
887         (khtml::RootInlineBox::selectionHeight):
888         * khtml/rendering/render_object.cpp:
889         (RenderObject::selectionColor):
890         * khtml/rendering/render_object.h:
891         (khtml::RenderObject::):
892         (khtml::RenderObject::selectionState):
893         (khtml::RenderObject::setSelectionState):
894         (khtml::RenderObject::selectionRect):
895         (khtml::RenderObject::canBeSelectionLeaf):
896         (khtml::RenderObject::hasSelectedChildren):
897         (khtml::RenderObject::hasDirtySelectionState):
898         (khtml::RenderObject::setHasDirtySelectionState):
899         (khtml::RenderObject::shouldPaintSelectionGaps):
900         (khtml::RenderObject::SelectionInfo::SelectionInfo):
901         * khtml/rendering/render_replaced.cpp:
902         (RenderReplaced::RenderReplaced):
903         (RenderReplaced::shouldPaint):
904         (RenderReplaced::selectionRect):
905         (RenderReplaced::setSelectionState):
906         (RenderReplaced::selectionColor):
907         (RenderWidget::paint):
908         (RenderWidget::setSelectionState):
909         * khtml/rendering/render_replaced.h:
910         (khtml::RenderReplaced::canBeSelectionLeaf):
911         (khtml::RenderReplaced::selectionState):
912         * khtml/rendering/render_text.cpp:
913         (InlineTextBox::checkVerticalPoint):
914         (InlineTextBox::isSelected):
915         (InlineTextBox::selectionState):
916         (InlineTextBox::selectionRect):
917         (InlineTextBox::paintSelection):
918         (InlineTextBox::paintMarkedTextBackground):
919         (RenderText::paint):
920         (RenderText::setSelectionState):
921         (RenderText::selectionRect):
922         * khtml/rendering/render_text.h:
923         (khtml::RenderText::canBeSelectionLeaf):
924         * kwq/KWQPainter.h:
925         * kwq/KWQPainter.mm:
926         (QPainter::drawHighlightForText):
927         * kwq/KWQPtrDict.h:
928         (QPtrDictIterator::toFirst):
929         * kwq/KWQRect.mm:
930         (QRect::unite):
931         * kwq/WebCoreTextRenderer.h:
932         * kwq/WebCoreTextRendererFactory.mm:
933         (WebCoreInitializeEmptyTextGeometry):
934
935 2004-10-05  Ken Kocienda  <kocienda@apple.com>
936
937         Reviewed by Darin
938         
939         Use the new CSS properties I added with my previous check-in. Also makes
940         some changes to caret positioning and drawing to make the proper editing
941         end-of-line behavior work correctly.
942
943         * khtml/editing/selection.cpp:
944         (khtml::Selection::layout): Caret drawing now takes affinity into account
945         when deciding where to paint the caret (finally!).
946         * khtml/editing/visible_position.cpp:
947         (khtml::VisiblePosition::previousVisiblePosition): Move off Position::rendersInDifferentPosition
948         to determine the result. Use a simpler test involving comparisons between
949         downstream positions while iterating. This is cheaper to do and easier to understand.
950         (khtml::VisiblePosition::nextVisiblePosition): Ditto.
951         * khtml/rendering/bidi.cpp:
952         (khtml::BidiIterator::current): Do not return non-breaking spaces for empty
953         text renderers and for non-text renderers. Return a null Qchar instead. Returning
954         non-breaking spaces was causing errors when the new -khtml-nbsp-mode was set to "space".
955         (khtml::RenderBlock::computeHorizontalPositionsForLine): Shrink line boxes that 
956         contain with more spaces than can fit on the end of a line.
957         (khtml::RenderBlock::skipWhitespace): Factor this out from findNextLineBreak.
958         (khtml::RenderBlock::findNextLineBreak): Use new skipWhitespace function. Add
959         in code to check and use new CSS properties.
960         * khtml/rendering/break_lines.cpp:
961         (khtml::isBreakable): Consider a non-breaking space a breakable character based
962         on setting of new -khtml-nbsp-mode property.
963         * khtml/rendering/break_lines.h: Ditto.
964         * khtml/rendering/render_block.h: Declare skipWhitespace function.
965         * khtml/rendering/render_text.cpp: 
966         (RenderText::caretRect): Do not draw the caret beyond the right edge of the
967         window when in white-space normal mode.
968
969 2004-10-05  Ken Kocienda  <kocienda@apple.com>
970
971         Reviewed by Darin
972
973         Fix for these bugs:
974         
975         In this patch, I add two new CSS properties and their associated behavior.
976         This is to support end-of-line and word-wrapping features that match the 
977         conventions of text editors.
978
979         There are also some other small changes here which begin to lay the groundwork
980         for using these new properties to bring about the desired editing behavior.
981
982         * khtml/css/cssparser.cpp:
983         (CSSParser::parseValue): Add support for new CSS properties.
984         * khtml/css/cssproperties.c: Generated file.
985         * khtml/css/cssproperties.h: Ditto.
986         * khtml/css/cssproperties.in: Add new properties.
987         * khtml/css/cssstyleselector.cpp:
988         (khtml::CSSStyleSelector::applyProperty): Add support for new CSS properties.
989         * khtml/css/cssvalues.c: Generated file.
990         * khtml/css/cssvalues.h: Ditto.
991         * khtml/css/cssvalues.in:  Add support for new CSS properties.
992         * khtml/editing/visible_position.cpp:
993         (khtml::VisiblePosition::upstreamDeepEquivalent): Added new helper.
994         * khtml/editing/visible_position.h:
995         * khtml/rendering/render_box.cpp:
996         (RenderBox::deleteLineBoxWrapper): Zero out inlineBoxWrapper.
997         * khtml/rendering/render_replaced.cpp:
998         (RenderWidget::detach): Zero out inlineBoxWrapper.
999         * khtml/rendering/render_style.cpp:
1000         (StyleCSS3InheritedData):
1001         (StyleCSS3InheritedData::operator==): Add support for new CSS properties.
1002         (RenderStyle::diff): Ditto.
1003         * khtml/rendering/render_style.h:
1004         (khtml::RenderStyle::nbspMode): Ditto.
1005         (khtml::RenderStyle::khtmlLineBreak): Ditto.
1006         (khtml::RenderStyle::setNBSPMode): Ditto.
1007         (khtml::RenderStyle::setKHTMLLineBreak): Ditto.
1008         (khtml::RenderStyle::initialNBSPMode): Ditto.
1009         (khtml::RenderStyle::initialKHTMLLineBreak): Ditto.
1010
1011 2004-10-05  Darin Adler  <darin@apple.com>
1012
1013         Reviewed by John.
1014
1015         - fixed <rdar://problem/3673150> Pasting string from clipboard that is longer than input box will accept fails rather than truncating
1016
1017         * kwq/KWQTextField.mm:
1018         (-[KWQTextFieldFormatter isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription:]):
1019         Wrote a new version of this method that truncates incoming strings rather than rejecting them
1020         out of hand.
1021
1022 2004-10-04  Darin Adler  <darin@apple.com>
1023
1024         Reviewed by Maciej.
1025
1026         - fixed <rdar://problem/3826343> crash in KHTMLParser::setCurrent parsing document fragment (happens in Calendar widget)
1027
1028         * khtml/html/htmlparser.cpp:
1029         (KHTMLParser::KHTMLParser): Initialized currentIsReferenced to false (fixes bug).
1030         (KHTMLParser::reset): Use doc() to make code easier to read.
1031         (KHTMLParser::setCurrent): Ditto.
1032         (KHTMLParser::parseToken): Ditto.
1033         (KHTMLParser::insertNode): Ditto.
1034         (KHTMLParser::getElement): Ditto.
1035         (KHTMLParser::popOneBlock): Ditto.
1036
1037         - fixed <rdar://problem/3814237> REGRESSION (Mail): Copy/paste style does not set color in Mail compose window
1038
1039         * kwq/KWQKHTMLPart.h: Added fontAttributesForSelectionStart.
1040         * kwq/KWQKHTMLPart.mm:
1041         (KWQKHTMLPart::styleForSelectionStart): Factored out most of fontForSelection.
1042         (KWQKHTMLPart::fontAttributesForSelectionStart): Added.
1043         (KWQKHTMLPart::fontAttributesForSelectionStart): Added.
1044         (KWQKHTMLPart::registerCommandForUndo): Updated for name change (see below).
1045         (KWQKHTMLPart::registerCommandForRedo): Ditto.
1046
1047         * kwq/WebCoreBridge.h: Added fontAttributesForSelectionStart.
1048         * kwq/WebCoreBridge.mm:
1049         (-[WebCoreBridge undoEditing:]): Updated for name change (see below).
1050         (-[WebCoreBridge redoEditing:]): Ditto.
1051         (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:smartReplace:]): Got rid of named temporary
1052         EditCommandPtr variable to make things slightly more terse.
1053         (-[WebCoreBridge moveSelectionToDragCaret:smartMove:]): Ditto.
1054         (-[WebCoreBridge deleteSelectionWithSmartDelete:]): Ditto.
1055         (-[WebCoreBridge fontAttributesForSelectionStart]): Added.
1056
1057         - fix compile on Panther and other cleanup
1058
1059         * khtml/khtml_part.cpp: Removed unneeded include.
1060         * kwq/KWQEditCommand.h: Got rid of use of "impl" when referring to EditCommand pointers.
1061         * kwq/KWQEditCommand.mm: Added include so we compile on Panther.
1062         (-[KWQEditCommand initWithEditCommand:]): Changed name.
1063         (-[KWQEditCommand dealloc]): Updated for m_impl change to m_command.
1064         (-[KWQEditCommand finalize]): Ditto.
1065         (+[KWQEditCommand commandWithEditCommand:]): Changed name.
1066         (-[KWQEditCommand command]): Changed name.
1067
1068 2004-10-04  Darin Adler  <darin@apple.com>
1069
1070         Reviewed by John.
1071
1072         - did a more-robust version of the fix I just landed
1073
1074         * khtml/html/htmlparser.h: Added currentIsReferenced boolean.
1075         * khtml/html/htmlparser.cpp:
1076         (KHTMLParser::KHTMLParser): Initializes currentIsReferenced.
1077         (KHTMLParser::setCurrent): Changed to respect and set currentIsReferenced.
1078
1079 2004-10-04  Darin Adler  <darin@apple.com>
1080
1081         Reviewed by John.
1082
1083         - fixed <rdar://problem/3824393> REGRESSION (165-TOT): Crash in KHTMLParser::popOneBlock closing window (bose.com)
1084
1085         * khtml/html/htmlparser.cpp:
1086         (KHTMLParser::~KHTMLParser): Move call to setCurrent(0) after the call to freeBlock, since freeBlock doesn't
1087         work well when current is 0, and there's no reason we need to reset the current block first.
1088         (KHTMLParser::setCurrent): Don't ever hold a reference to the document. This prevents a situation where there
1089         would be a reference cycle. In the test case from the bug above, this cycle actually happened and resulted
1090         in a double-delete of the document, tokenizer, and parser.
1091
1092 2004-10-04  Darin Adler  <darin@apple.com>
1093
1094         Reviewed by Maciej.
1095
1096         - fixed <rdar://problem/3825429> onclick handler called when mouse down on another element (affects Dashboard Movies widget, test case enclosed)
1097
1098         * khtml/khtmlview.cpp:
1099         (KHTMLViewPrivate::KHTMLViewPrivate): Initialize the click node to 0.
1100         (KHTMLViewPrivate::~KHTMLViewPrivate): Deref the click node.
1101         (KHTMLViewPrivate::reset): Clear the click node.
1102         (KHTMLView::viewportMousePressEvent): Call invalidateClick when we pass the event to a subframe to
1103         reduce the chance that we'll hold on to an old click node for a long time. Set the click node to
1104         the node we we are clicking on.
1105         (KHTMLView::viewportMouseDoubleClickEvent): Only send a click even if the node is the same one from
1106         the original click. Call invalidateClick when done to reduce the chance that we'll hold on to an
1107         old click node for a long time.
1108         (KHTMLView::invalidateClick): Clear the click node.
1109         (KHTMLView::viewportMouseReleaseEvent): Only send a click even if the node is the same one from
1110         the original click. Call invalidateClick when done to reduce the chance that we'll hold on to an
1111         old click node for a long time.
1112         (KHTMLView::keyPressEvent): Remove code that sets the originalNode field, which is never used.
1113
1114 2004-10-04  Ken Kocienda  <kocienda@apple.com>
1115
1116         Reviewed by Hyatt
1117
1118         Fix for this bug:
1119         
1120         <rdar://problem/3825289> REGRESSION (Mail): Crash in fontForSelection in empty window
1121
1122         * khtml/editing/visible_position.cpp:
1123         (khtml::VisiblePosition::previousPosition): Switch to node iteration instead "leaf"
1124         iteration. I have been wanting to make this change for a long time, but couldn't
1125         since other code relied on the leaf behavior. That is no longer true. Plus, the
1126         bug fix requires the new behavior.
1127         (khtml::VisiblePosition::nextPosition): Ditto.
1128         (khtml::VisiblePosition::isCandidate): Empty blocks needed a height to be a candidate,
1129         but we make a special case for the body element. This fixes the bug.
1130
1131 2004-10-04  Darin Adler  <darin@apple.com>
1132
1133         Reviewed by Ken.
1134
1135         - fixed <rdar://problem/3800667> REGRESSION (Mail): double-clicking multiple spaces only selects two spaces
1136
1137         * kwq/KWQTextUtilities.mm: (KWQFindWordBoundary): Moved here from the .cpp file. Changed to use the
1138         doubleClickAtIndex: method from NSAttributedString rather than using Unicode Utilities.
1139         * kwq/KWQTextUtilities.cpp: Removed.
1140         * WebCore.pbproj/project.pbxproj: Removed KWQTextUtilities.cpp.
1141
1142         - fixed a problem that would show up using HTML editing under garbage collection
1143
1144         * kwq/KWQEditCommand.mm: (-[KWQEditCommand finalize]): Fixed a [super dealloc] that should have been a
1145         [super finalize].
1146
1147         - another small change
1148
1149         * khtml/editing/visible_units.cpp: (khtml::nextWordBoundary): Tweaked a comment.
1150
1151 2004-10-01  Darin Adler  <darin@apple.com>
1152
1153         Reviewed by Ken (or arguably done by Ken, reviewed by Darin).
1154
1155         - fixed <rdar://problem/3823828> REGRESSION (Mail): Clicking past end of any line puts insertion point at beginning of next line
1156
1157         * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::VisiblePosition):
1158         Check for an offset of 0 and a <br> and use UPSTREAM affinity in that case.
1159         This is a short term fix for something that needs a better longer-term fix.
1160
1161         - fixed <rdar://problem/3823816> REGRESSION (Mail): double-clicking first word on line also selects previous empty line
1162
1163         * khtml/editing/visible_units.cpp: (khtml::previousWordBoundary): Added a special
1164         case for <br>. While I'm not sure why this regressed, I'm sure this fix is good.
1165
1166 2004-10-01  Darin Adler  <darin@apple.com>
1167
1168         Reviewed by John.
1169
1170         - fixed <rdar://problem/3782117> CrashTracer: ..722 crashes at com.apple.WebCore: DOM::HTMLBodyElementImpl::insertedIntoDocument + 0x2c (AOL website)
1171
1172         * khtml/html/html_baseimpl.cpp:
1173         (HTMLBodyElementImpl::insertedIntoDocument): Check for nil document case.
1174         (HTMLFrameElementImpl::isURLAllowed): Ditto.
1175         (HTMLFrameElementImpl::openURL): Ditto.
1176
1177 2004-10-01  Darin Adler  <darin@apple.com>
1178
1179         Reviewed by Maciej.
1180
1181         - fixed <rdar://problem/3822218> REGRESSION (164-165): images don't update on rollover on directv.com page
1182
1183         I introduced a major regression where various JavaScript window properties would not be found when I
1184         fixed bug 3809600.
1185
1186         * khtml/ecma/kjs_window.h: Added hasProperty.
1187         * khtml/ecma/kjs_window.cpp: (Window::hasProperty): Return true in all the cases where get returns something.
1188
1189 2004-09-30  Darin Adler  <darin@apple.com>
1190
1191         Reviewed by Maciej.
1192
1193         - fixed <rdar://problem/3461499> JavaScript function document.open() is buggy with 2nd argument "replace"
1194
1195         Experiments with Firefox indicate that document.open() should not be treated as window.open() unless there
1196         are more than two parameters. Also, Firefox does not implement the "replace" behavior, so we don't have
1197         to worry about it either.
1198
1199         * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocFunction::tryCall): Only forward to window if there are more than
1200         two parameters, rather than if there are more than one.
1201
1202         - fixed <rdar://problem/3672933> oninput is firing at page load time for <input type=range>
1203
1204         * kwq/KWQSlider.mm: (QSlider::setValue): Don't emit a signal here. This follows the usual pattern, where
1205         a signal is only emitted for changes that are not explicitly requested by the caller.
1206
1207         - fixed <rdar://problem/3821167> leaks of something allocated by recalcStyle after loading altavista page from cvs-base
1208
1209         * khtml/xml/dom_docimpl.cpp: (DocumentImpl::recalcStyle): Ref and deref the style we allocate so it's
1210         not left floating if setStyle decides not to ref it.
1211
1212         - fixed <rdar://problem/3821172> leak of HTML attribute string after loading the ESPN page from cvs-base
1213
1214         * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseHTMLAttribute): Use the DOMString version of
1215         the lower() operation so we don't end up leaving a DOMStringImpl * floating if AtomicString decides not
1216         to ref it.
1217
1218 2004-09-30  Richard Williamson   <rjw@apple.com>
1219
1220         Fixed <rdar://problem/3822330> REGRESSION: crash on launch when homepage is set to about:blank
1221         
1222         Added nil check.
1223         
1224         * kwq/KWQKHTMLPart.mm:
1225         (KWQKHTMLPart::setDisplaysWithFocusAttributes):
1226
1227 2004-09-30  Chris Blumenberg  <cblu@apple.com>
1228         
1229         Fixed: <rdar://problem/3792822> Safari is calling the Cocoa QuickTime plugin twice for the OBJECT and EMBED tags
1230
1231         Reviewed by hyatt.
1232
1233         * khtml/html/html_objectimpl.cpp:
1234         (HTMLObjectElementImpl::attach): call dispatchHTMLEvent after updateWidget instead of every time this method is called
1235         (HTMLObjectElementImpl::recalcStyle): ditto
1236
1237 2004-09-30  Darin Adler  <darin@apple.com>
1238
1239         - rolled out bad image change that caused performance regression
1240
1241         * khtml/rendering/render_image.cpp: (RenderImage::setPixmap):
1242         Don't reference the new image before doing the assignment.
1243         This forced an unwanted.
1244
1245 2004-09-30  Ken Kocienda  <kocienda@apple.com>
1246
1247         Reviewed by me, coded by Darin
1248
1249         - fixed <rdar://problem/3818305> REGRESSION (Mail): Shift + page up has no effect; should modify selection
1250
1251         * khtml/editing/selection.cpp: (khtml::Selection::modify): Fix problem where vertical distance
1252         was used as a distance threshold, but was a negative number. Now make it positive at the start
1253         of the function (and make a couple related changes).
1254
1255 2004-09-29  Richard Williamson   <rjw@apple.com>
1256
1257         Fixed <rdar://problem/3779998> bringing window to front or sending to back does not send focus/blur events to JavaScript window object
1258
1259         The fix has two parts, 1) make onblur and onfocus work for windows, 
1260         and 2), allow the dashboard to override WebKit's special key/non-key
1261         behaviors.
1262
1263         Reviewed by Chris.
1264
1265         * kwq/KWQKHTMLPart.mm:
1266         (KWQKHTMLPart::setDisplaysWithFocusAttributes):
1267
1268 2004-09-29  Ken Kocienda  <kocienda@apple.com>
1269
1270         Reviewed by Hyatt
1271         
1272         Fix for this bug:
1273         
1274         <rdar://problem/3705894> REGRESSION (Mail): if a single word is wider than the window, 
1275         it doesn't break and just runs off the right side
1276
1277         * khtml/css/css_computedstyle.cpp:
1278         (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Add support for CSS_PROP_WORD_WRAP.
1279         * khtml/css/cssparser.cpp:
1280         (CSSParser::parseValue): Ditto.
1281         * khtml/css/cssproperties.c: Generated file.
1282         * khtml/css/cssproperties.h: Ditto.
1283         * khtml/css/cssproperties.in: Add word-wrap property.
1284         * khtml/css/cssstyleselector.cpp:
1285         (khtml::CSSStyleSelector::applyProperty): Add support for CSS_PROP_WORD_WRAP.
1286         * khtml/css/cssvalues.c: Generated file.
1287         * khtml/css/cssvalues.h: Ditto.
1288         * khtml/css/cssvalues.in: Add break-word value.
1289         * khtml/rendering/bidi.cpp:
1290         (khtml::RenderBlock::findNextLineBreak): Add code to implement new word wrapping feature.
1291         * khtml/rendering/render_style.cpp:
1292         (StyleCSS3InheritedData): Add support for new wordWrap property.
1293         (StyleCSS3InheritedData::operator==): Ditto.
1294         (RenderStyle::diff): Ditto.
1295         * khtml/rendering/render_style.h:
1296         (khtml::RenderStyle::wordWrap): Ditto.
1297         (khtml::RenderStyle::setWordWrap): Ditto.
1298         (khtml::RenderStyle::initialWordWrap): Ditto.
1299
1300 2004-09-29  Maciej Stachowiak  <mjs@apple.com>
1301
1302         Reviewed by John.
1303
1304         - consolidated OS version checks into prefix header
1305
1306         * WebCorePrefix.h:
1307         * khtml/rendering/render_canvasimage.cpp:
1308         * kwq/KWQAccObject.mm:
1309         (-[KWQAccObject roleDescription]):
1310         (-[KWQAccObject accessibilityActionDescription:]):
1311         * kwq/KWQComboBox.mm:
1312         (QComboBox::QComboBox):
1313         * kwq/KWQFoundationExtras.h:
1314
1315 2004-09-29  David Hyatt  <hyatt@apple.com>
1316
1317         Make sure <br>s always get line boxes.  Also prevent the creation of RenderTexts for whitespace normal/nowrap nodes
1318         that follow <br>s.
1319         
1320         Reviewed by kocienda
1321
1322         * khtml/editing/visible_position.cpp:
1323         (khtml::VisiblePosition::isCandidate):
1324         * khtml/rendering/render_br.cpp:
1325         (RenderBR::RenderBR):
1326         (RenderBR::createInlineBox):
1327         (RenderBR::baselinePosition):
1328         (RenderBR::lineHeight):
1329         * khtml/rendering/render_br.h:
1330         * khtml/rendering/render_line.cpp:
1331         (khtml::InlineFlowBox::placeBoxesVertically):
1332         * khtml/rendering/render_line.h:
1333         (khtml::InlineBox::isText):
1334         (khtml::InlineFlowBox::addToLine):
1335         * khtml/rendering/render_text.cpp:
1336         (RenderText::detach):
1337         * khtml/rendering/render_text.h:
1338         (khtml::InlineTextBox:::InlineRunBox):
1339         (khtml::InlineTextBox::isInlineTextBox):
1340         (khtml::InlineTextBox::isText):
1341         (khtml::InlineTextBox::setIsText):
1342         * khtml/xml/dom_textimpl.cpp:
1343         (TextImpl::rendererIsNeeded):
1344         * kwq/KWQRenderTreeDebug.cpp:
1345         (operator<<):
1346
1347 2004-09-29  Ken Kocienda  <kocienda@apple.com>
1348
1349         Reviewed by John
1350
1351         Fix for this bug:
1352         
1353         <rdar://problem/3815895> exception inside fontForSelection causes Mail to abort when selection hits bottom
1354
1355         * khtml/editing/selection.cpp:
1356         (khtml::Selection::toRange): Use RangeImpl calls to detect exceptions when creating a Range
1357         from a Selection. Return an empty Range when there is an exception.
1358
1359         Fix for this bug:
1360         
1361         <rdar://problem/3817268> REGRESSION (Mail): Window does not scroll when selecting out of 
1362         visible area of view with arrow keys
1363
1364         * khtml/editing/selection.cpp: Did some name changing. m_needsCaretLayout -> m_needsLayout.
1365         Added m_expectedVisibleRect which supplies the right rectangle to update when scrolling.
1366         (khtml::Selection::Selection): m_needsCaretLayout -> m_needsLayout name change.
1367         (khtml::Selection::init): Handle m_expectedVisibleRect in initialization.
1368         (khtml::Selection::operator=): Handle m_expectedVisibleRect in assignment.
1369         (khtml::Selection::setNeedsLayout): m_needsCaretLayout -> m_needsLayout name change.
1370         (khtml::Selection::layout): Changed name from layoutCaret, since m_expectedVisibleRect
1371         is also calculated here.
1372         (khtml::Selection::caretRect): m_needsCaretLayout -> m_needsLayout name change.
1373         (khtml::Selection::expectedVisibleRect): New. Returns m_expectedVisibleRect, doing a 
1374         layout if needed.
1375         (khtml::Selection::needsCaretRepaint): m_needsCaretLayout -> m_needsLayout name change.
1376         (khtml::Selection::paintCaret): Ditto.
1377         (khtml::Selection::validate): Ditto.
1378         * khtml/editing/selection.h: Add m_expectedVisibleRect member variable and 
1379         expectedVisibleRect accessor.
1380         * kwq/WebCoreBridge.h: Change name of ensureCaretVisible to ensureSelectionVisible, since
1381         this is not only about making the caret visible anymore. Now it can reveal the varying
1382         end of the selection when scrolling with arrow keys.
1383         * kwq/WebCoreBridge.mm:
1384         (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): ensureCaretVisible to 
1385         ensureSelectionVisible name change.
1386         (-[WebCoreBridge alterCurrentSelection:verticalDistance:]): Ditto
1387         (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:smartReplace:]): Ditto
1388         (-[WebCoreBridge insertNewline]): Ditto
1389         (-[WebCoreBridge insertText:selectInsertedText:]): Ditto
1390         (-[WebCoreBridge deleteKeyPressed]): Ditto
1391         (-[WebCoreBridge ensureSelectionVisible]): Ditto
1392
1393 2004-09-29  Ken Kocienda  <kocienda@apple.com>
1394
1395         Reviewed by Hyatt
1396         
1397         Fix for this bug:
1398         
1399         <rdar://problem/3818296> REGRESSION (Mail): centerSelectionInVisibleArea does not work correctly
1400         
1401         * kwq/KWQKHTMLPart.h:
1402         * kwq/KWQKHTMLPart.mm:
1403         (KWQKHTMLPart::centerSelectionInVisibleArea): New function. Handles both caret
1404         and range selections correctly.
1405         * kwq/KWQNSViewExtras.h: Add forceCentering boolean to some methods in this file.
1406         * kwq/KWQNSViewExtras.m: Ditto. This addition has been done since the AppKit 
1407         method we use to do the centering, -[NSView scrollRectToVisible:],  does not alter 
1408         the view if the rectangle passed to it is already in view. When forceCentering is
1409         true, extra math is done to make scrollRectToVisible center the rectangle we want.
1410         (-[NSView _KWQ_scrollFrameToVisible]): Pass NO for forceCentering in call through to 
1411         _KWQ_scrollRectToVisible:forceCentering:
1412         (-[NSView _KWQ_scrollRectToVisible:forceCentering:]): Add forceCentering argument.
1413         (-[NSView _KWQ_scrollRectToVisible:inView:forceCentering:]): Ditto.
1414         (-[NSClipView _KWQ_scrollRectToVisible:inView:forceCentering:]): Ditto. Do extra
1415         math to implement the forceCentering effect.
1416         * kwq/KWQScrollView.h: Add forceCentering default argument to ensureRectVisibleCentered.
1417         * kwq/KWQScrollView.mm:
1418         (QScrollView::ensureRectVisibleCentered): Ditto.
1419         * kwq/WebCoreBridge.h:
1420         * kwq/WebCoreBridge.mm:
1421         (-[WebCoreBridge centerSelectionInVisibleArea]): New function. Call through to KWQKHTMLPart. 
1422
1423 2004-09-28  Chris Blumenberg  <cblu@apple.com>
1424
1425         Fixed: WebArchives begin with "<#document/>"
1426
1427         Reviewed by hyatt.
1428
1429         * khtml/xml/dom_nodeimpl.cpp:
1430         (NodeImpl::startMarkup): don't return markup if this is a document node, forgot this when factoring this method out from toHTML
1431
1432 2004-09-28  Chris Blumenberg  <cblu@apple.com>
1433
1434         Removed range parameter from recursive_toHTML and friends since that code path is no longer used.
1435         
1436         Reviewed by mjs.
1437
1438         * khtml/xml/dom2_rangeimpl.cpp:
1439         (DOM::RangeImpl::toHTML):
1440         * khtml/xml/dom_nodeimpl.cpp:
1441         (NodeImpl::recursive_toString):
1442         (NodeImpl::recursive_toHTML):
1443         * khtml/xml/dom_nodeimpl.h:
1444         * kwq/WebCoreBridge.mm:
1445         (-[WebCoreBridge markupStringFromNode:nodes:]):
1446
1447 2004-09-28  Darin Adler  <darin@apple.com>
1448
1449         Reviewed by Ken.
1450
1451         - improve spell checking so it doesn't unmark and remark as you move the cursor with the arrow
1452
1453         * khtml/editing/htmlediting.h: Remove obsolete markMisspellingsInSelection private function.
1454         * khtml/editing/htmlediting.cpp:
1455         (khtml::EditCommand::EditCommand): Blow away the selection when starting an edit command.
1456         (khtml::EditCommand::apply): Remove code to mark misspellings because that's now done as part
1457         of blowing away the selection.
1458         (khtml::EditCommand::unapply): Blow away the selection instead of marking mispellings.
1459         (khtml::EditCommand::reapply): Ditto.
1460         (khtml::ReplaceSelectionCommand::doApply): Removed incorrect code that does spell checking
1461         on inserted text; this doesn't match NSText behavior.
1462         (khtml::TypingCommand::markMisspellingsAfterTyping): Use markMisspellingsInAdjacentWords
1463         function for greater clarity on what this actually does.
1464
1465         * khtml/khtml_part.h: Replaced setSelection's "unmarkOldSelection" boolean parameter with a
1466         "keepTypingStyle" boolean parameter. Removed notifySelectionChanged.
1467         * khtml/khtml_part.cpp:
1468         (KHTMLPart::setSelection): Replaced the "unmarkOldSelection" boolean with a new "keepTypingStyle"
1469         boolean. This is a step on the way to simplifying how this works. Moved the code from the
1470         notifySelectionChanged function here, since there was no clear line between the two functions.
1471         (KHTMLPart::clearSelection): Call setSelection rather that having special case code here for
1472         the case of an empty selection.
1473         (KHTMLPart::appliedEditing): Remove the explicit "false" for "unmarkOldSelection".
1474         (KHTMLPart::unappliedEditing): Ditto.
1475         (KHTMLPart::reappliedEditing): Ditto.
1476
1477         * kwq/KWQKHTMLPart.h: Replaced markMisspellingsInSelection and updateSpellChecking with
1478         markMisspellings and markMisspellingsInAdjacentWords. Added parameters to respondToChangedSelection.
1479         * kwq/KWQKHTMLPart.mm:
1480         (KWQKHTMLPart::markMisspellingsInAdjacentWords): Added.
1481         (KWQKHTMLPart::markMisspellings): New name for markMisspellingsInSelection. Simplified logic a
1482         bit and made it the caller's responsibility to expand the selection passed in to word boundaries.
1483         (KWQKHTMLPart::respondToChangedSelection): Added parameter that identifies the old selection,
1484         and changed logic so it won't mark mispellings in a word if the selection still starts in that word.
1485
1486         - implemented empty-cells property in computed style
1487
1488         * khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
1489         Added code for CSS_PROP_EMPTY_CELLS. I think the HTML converter in AppKit uses this.
1490
1491 2004-09-28  Chris Blumenberg  <cblu@apple.com>
1492
1493         Fixed n-squared issues with appending to KWQValueListImpl. This fixes the hang in 3794799.
1494
1495         Fixed by Darin, reviewed by me.
1496
1497         * khtml/xml/dom2_rangeimpl.cpp:
1498         (DOM::RangeImpl::toHTML): tweaks
1499         * kwq/KWQValueListImpl.mm:
1500         (KWQValueListImpl::KWQValueListPrivate::KWQValueListPrivate):
1501         (KWQValueListImpl::KWQValueListPrivate::copyList):
1502         (KWQValueListImpl::clear):
1503         (KWQValueListImpl::appendNode):
1504         (KWQValueListImpl::prependNode):
1505         (KWQValueListImpl::removeEqualNodes):
1506         (KWQValueListImpl::containsEqualNodes):
1507         (KWQValueListImpl::removeIterator):
1508         (KWQValueListImpl::lastNode):
1509         * kwq/WebCoreBridge.mm:
1510         (-[WebCoreBridge nodesFromList:]): use iterator, not at()
1511
1512 2004-09-28  Richard Williamson   <rjw@apple.com>
1513
1514         More dashboard region changes for John.
1515
1516         <rdar://problem/3817421> add getter for dashboard regions (debugging)
1517         
1518         <rdar://problem/3817417> NSScrollView need autoregions for dashboard
1519         
1520         <rdar://problem/3817388> should have short form form control regions
1521         
1522         <rdar://problem/3817477> visibility does not work with dashboard control regions
1523
1524         Reviewed by Hyatt.
1525
1526         * WebCore-combined.exp:
1527         * WebCore.exp:
1528         * khtml/css/cssparser.cpp:
1529         (skipCommaInDashboardRegion):
1530         (CSSParser::parseDashboardRegions):
1531         * khtml/khtmlview.cpp:
1532         (KHTMLView::updateDashboardRegions):
1533         * khtml/rendering/render_object.cpp:
1534         (RenderObject::setStyle):
1535         (RenderObject::addDashboardRegions):
1536         * khtml/xml/dom_docimpl.cpp:
1537         (DocumentImpl::DocumentImpl):
1538         (DocumentImpl::setDashboardRegions):
1539         * khtml/xml/dom_docimpl.h:
1540         (DOM::DocumentImpl::setDashboardRegionsDirty):
1541         (DOM::DocumentImpl::dashboardRegionsDirty):
1542         * kwq/KWQKHTMLPart.h:
1543         * kwq/KWQKHTMLPart.mm:
1544         (KWQKHTMLPart::paint):
1545         (KWQKHTMLPart::dashboardRegionsDictionary):
1546         (KWQKHTMLPart::dashboardRegionsChanged):
1547         * kwq/WebCoreBridge.h:
1548         * kwq/WebCoreBridge.mm:
1549         (-[WebCoreBridge dashboardRegions]):
1550         * kwq/WebDashboardRegion.h:
1551         * kwq/WebDashboardRegion.m:
1552         (-[WebDashboardRegion description]):
1553
1554 2004-09-28  John Sullivan  <sullivan@apple.com>
1555
1556         Reviewed by Chris.
1557
1558         - fixed <rdar://problem/3818558> REGRESSION: "Installed Plug-ins" is blank 
1559         because of <script type="application/x-javascript">
1560
1561         * khtml/html/htmltokenizer.cpp:
1562         (khtml::HTMLTokenizer::parseTag):
1563         add "application/x-javascript" to the list of legal scripting types. Mozilla
1564         accepts this, but WinIE doesn't.
1565         
1566         * layout-tests/fast/tokenizer/004.html:
1567         updated layout test to test some application/xxxx types
1568
1569 2004-09-27  David Hyatt  <hyatt@apple.com>
1570
1571         Reworked lists to work well with RTL text.  Specifically the following bugs have been fixed:
1572
1573         (1) All bullets use the same offset constant now (a padding of 7 pixels).  Before, images used 5 and others used 7.
1574         (2) Line height now works properly, so that list items with no content aren't squished (and missing the line descent).
1575         (3) Punctuation now works correctly with inside and outside style ordered lists in RTL.
1576         (4) RTL lists now properly apply padding and margin to the right side rather than the left.  This was done by adding
1577         -khtml-margin-start and -khtml-padding-start properties that are just mapped to left/right based off the direction.
1578         
1579         Reviewed by darin
1580
1581         * khtml/css/cssparser.cpp:
1582         (CSSParser::parseValue):
1583         * khtml/css/cssproperties.c:
1584         (hash_prop):
1585         (findProp):
1586         * khtml/css/cssproperties.h:
1587         * khtml/css/cssproperties.in:
1588         * khtml/css/cssstyleselector.cpp:
1589         (khtml::CSSStyleSelector::applyDeclarations):
1590         (khtml::CSSStyleSelector::applyProperty):
1591         * khtml/css/html4.css:
1592         * khtml/rendering/bidi.cpp:
1593         (khtml::BidiIterator::direction):
1594         * khtml/rendering/render_list.cpp:
1595         (RenderListItem::getAbsoluteRepaintRect):
1596         (RenderListMarker::paint):
1597         (RenderListMarker::calcMinMaxWidth):
1598         (RenderListMarker::lineHeight):
1599         (RenderListMarker::baselinePosition):
1600
1601 2004-09-28  Ken Kocienda  <kocienda@apple.com>
1602
1603         Reviewed by Darin
1604         
1605         Mark the VisiblePosition taking (Position &, EAffinity=DOWNSTREAM) explicit. Recently, when I added
1606         the EAffinity argument, I left this constructor implicit. Darin pointed out to me that this is
1607         undesirable since implicit use of the the constructor involved making the affinity choice, something
1608         which should be done explicitly.
1609
1610         * khtml/editing/selection.cpp:
1611         (khtml::Selection::modifyExtendingRightForward): Make explicit use of constructor mentioned above.
1612         (khtml::Selection::modifyMovingRightForward): Ditto.
1613         (khtml::Selection::modifyExtendingLeftBackward): Ditto.
1614         (khtml::Selection::modifyMovingLeftBackward): Ditto.
1615         (khtml::Selection::modify): Ditto.
1616         (khtml::Selection::validate): Ditto.
1617         * khtml/editing/visible_position.h: Make constructor taking (Position &, EAffinity) explicit.
1618         * khtml/editing/visible_units.cpp: Ditto.
1619         (khtml::previousWordBoundary): Make explicit use of constructor mentioned above.
1620         (khtml::nextWordBoundary): Ditto.
1621         (khtml::previousLinePosition): Ditto.
1622         (khtml::nextLinePosition): Ditto.
1623         * kwq/KWQKHTMLPart.mm: Ditto.
1624         (KWQKHTMLPart::findString): Ditto.
1625         (KWQKHTMLPart::advanceToNextMisspelling): Ditto.
1626         (KWQKHTMLPart::markMisspellingsInSelection): Ditto.
1627         (KWQKHTMLPart::updateSpellChecking): Ditto.
1628
1629 2004-09-28  Darin Adler  <darin@apple.com>
1630
1631         Reviewed by John.
1632
1633         - fixed a storage leak discovered by code inspection
1634
1635         * khtml/html/htmlparser.cpp: (KHTMLParser::~KHTMLParser): Call setCurrent(0) to deref
1636         the parser's current node in the rare case where it still has one.
1637
1638 2004-09-27  David Hyatt  <hyatt@apple.com>
1639
1640         Don't allow nested headers when only inlines are in between them.  Fixes a hang related to pathological nesting
1641         on magicmethodsonline.com.
1642         
1643         Reviewed by darin
1644
1645         * khtml/html/htmlparser.cpp:
1646         (KHTMLParser::parseToken):
1647         (KHTMLParser::processCloseTag):
1648         (KHTMLParser::isHeaderTag):
1649         (KHTMLParser::popNestedHeaderTag):
1650         * khtml/html/htmlparser.h:
1651
1652 2004-09-27  Kevin Decker  <kdecker@apple.com>
1653
1654         Reviewed by John.
1655
1656         * khtml/css/css_base.cpp:
1657         (CSSSelector::selectorText): changed another ATTR_CLASS case to properly return class selector names. 
1658
1659 2004-09-27  David Hyatt  <hyatt@apple.com>
1660
1661         Fix style sharing so that it doesn't share when it shouldn't.  Partially fixes 3671516, table cells don't update
1662         their color on macosx.apple.com.
1663
1664         Fix 3521639, iframe mispositioned on bidi page.  Make sure that when the width of a line exceeds the available line
1665         width that the spillage out of the block is determined by the direction of the block and not by the text-align value.
1666
1667         Partial fix for 3762962, make sure the image cells with specified widths but percentage heights don't just get a minwidth
1668         of 0.
1669
1670         Fix for 3533878, framesets that use percentages that add up to a value > 100% should normalize those percentages.
1671         
1672         Reviewed by john
1673
1674         * khtml/css/cssstyleselector.cpp:
1675         (khtml::CSSStyleSelector::locateCousinList):
1676         (khtml::CSSStyleSelector::elementsCanShareStyle):
1677         (khtml::CSSStyleSelector::locateSharedStyle):
1678         * khtml/css/cssstyleselector.h:
1679         * khtml/html/html_elementimpl.h:
1680         (DOM::HTMLNamedAttrMapImpl::hasMappedAttributes):
1681         (DOM::HTMLElementImpl::inlineStyleDecl):
1682         * khtml/rendering/bidi.cpp:
1683         (khtml::RenderBlock::computeHorizontalPositionsForLine):
1684         * khtml/rendering/render_frames.cpp:
1685         (RenderFrameSet::layout):
1686         * khtml/rendering/render_replaced.cpp:
1687         (RenderReplaced::calcMinMaxWidth):
1688         * khtml/xml/dom_elementimpl.h:
1689         (DOM::ElementImpl::inlineStyleDecl):
1690         (DOM::ElementImpl::hasMappedAttributes):
1691
1692 2004-09-27  Ken Kocienda  <kocienda@apple.com>
1693
1694         Reviewed by John
1695
1696         Removed closestRenderedPosition function from Position class and gave this work
1697         to VisiblePosition instead. However, in order to make the transfer possible,
1698         VisiblePosition needed upstream and downstream affinities added to its
1699         constructors. Also moved the EAffinity enum into its own file. Also moved it
1700         to the khtml namespace.
1701
1702         Updated several functions which used closestRenderedPosition to use VisiblePosition
1703         instead.
1704         
1705         Also deleted Position::equivalentShallowPosition. This was unused.
1706
1707         * ForwardingHeaders/editing/text_affinity.h: Added.
1708         * ForwardingHeaders/editing/visible_position.h: Added.
1709         * WebCore.pbproj/project.pbxproj: Added new files.
1710         * khtml/editing/selection.cpp:
1711         (khtml::Selection::validate): Use VisiblePosition instead of closestRenderedPosition.
1712         * khtml/editing/selection.h:
1713         * khtml/editing/text_affinity.h: Added.
1714         * khtml/editing/visible_position.cpp:
1715         (khtml::VisiblePosition::VisiblePosition):
1716         (khtml::VisiblePosition::initUpstream): New helper for finding upstream visible position.
1717         (khtml::VisiblePosition::initDownstream): Was old init function that unconditionally did
1718         downstream checks for visible position. Renamed to describe this more clearly.
1719         * khtml/editing/visible_position.h:
1720         * khtml/editing/visible_units.cpp:
1721         (khtml::previousWordBoundary): Use VisiblePosition instead of closestRenderedPosition.
1722         (khtml::nextWordBoundary): Use VisiblePosition instead of closestRenderedPosition.
1723         * khtml/xml/dom_docimpl.cpp:
1724         (DocumentImpl::updateSelection): Use VisiblePosition instead of closestRenderedPosition.
1725         * khtml/xml/dom_position.cpp:
1726         (DOM::Position::closestRenderedPosition): Removed.
1727         * khtml/xml/dom_position.h: Removed two functions mentioned above.
1728         * kwq/KWQKHTMLPart.mm:
1729         (KWQKHTMLPart::fontForSelection) Use VisiblePosition instead of closestRenderedPosition.:
1730         * kwq/WebCoreBridge.mm:
1731         (-[WebCoreBridge setSelectedDOMRange:affinity:]): Use VisiblePosition instead of closestRenderedPosition.
1732         * layout-tests/editing/deleting/delete-block-merge-contents-012-expected.txt: Updated expected results.
1733         * layout-tests/editing/deleting/delete-block-merge-contents-017-expected.txt: Ditto.
1734         * layout-tests/editing/deleting/delete-contiguous-ws-001-expected.txt: Ditto.
1735         * layout-tests/editing/selection/move-by-character-004-expected.txt: Ditto.
1736
1737 2004-09-27  Ken Kocienda  <kocienda@apple.com>
1738
1739         Reviewed by Darin and Maciej
1740
1741         Removed EditCommand smart pointer wrappers from htmlediting.cpp/.h, save for the one
1742         at the root of the hierarchy, and this one has been renamed EditCommandPtr. Renamed
1743         each of the XXXCommandImpl classes, removing the Impl suffix from each, and rolled
1744         these into the htmlediting.cpp/.h files. The htmlediting_impl.cpp/.h files have
1745         been emptied and are being removed.
1746
1747         For the remainder of files, perform the mechanical changes necessary to make everything
1748         compile and run as before.
1749
1750         * WebCore.pbproj/project.pbxproj
1751         * khtml/editing/htmlediting.cpp
1752         * khtml/editing/htmlediting.h
1753         * khtml/editing/htmlediting_impl.cpp: Removed.
1754         * khtml/editing/htmlediting_impl.h: Removed.
1755         * khtml/editing/jsediting.cpp
1756         * khtml/khtml_part.cpp
1757         (KHTMLPart::openURL)
1758         (KHTMLPart::lastEditCommand)
1759         (KHTMLPart::appliedEditing)
1760         (KHTMLPart::unappliedEditing)
1761         (KHTMLPart::reappliedEditing)
1762         (KHTMLPart::applyStyle):
1763         * khtml/khtml_part.h
1764         * khtml/khtmlpart_p.h
1765         * kwq/KWQEditCommand.h
1766         * kwq/KWQEditCommand.mm
1767         (-[KWQEditCommand initWithEditCommandImpl:])
1768         (+[KWQEditCommand commandWithEditCommandImpl:])
1769         (-[KWQEditCommand impl])
1770         * kwq/KWQKHTMLPart.h
1771         * kwq/KWQKHTMLPart.mm
1772         (KWQKHTMLPart::registerCommandForUndo)
1773         (KWQKHTMLPart::registerCommandForRedo)
1774         * kwq/WebCoreBridge.mm
1775         (-[WebCoreBridge undoEditing:])
1776         (-[WebCoreBridge redoEditing:])
1777         (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:smartReplace:])
1778         (-[WebCoreBridge moveSelectionToDragCaret:smartMove:])
1779         (-[WebCoreBridge deleteSelectionWithSmartDelete:])
1780
1781 2004-09-26  Darin Adler  <darin@apple.com>
1782
1783         Reviewed by Maciej.
1784
1785         - fixed <rdar://problem/3816170> image.width/height not available from Image objects (works in Firefox)
1786
1787         * khtml/ecma/kjs_html.h: Added width and height.
1788         * khtml/ecma/kjs_html.cpp: (Image::getValueProperty): Added width and height.
1789         * khtml/ecma/kjs_html.lut.h: Regenerated.
1790
1791         - unrelated change; changed ordering of use count manipulation just in case we decide some day to do
1792           something when the use count hits 0
1793
1794         * khtml/rendering/render_image.cpp: (RenderImage::setPixmap): Increment use count on new object before
1795         decrementing use count on old object.
1796
1797 2004-09-26  Darin Adler  <darin@apple.com>
1798
1799         Reviewed by Kevin.
1800
1801         - fixed <rdar://problem/3812771> document.implementation.hasFeature returns false for a lot of features we implement
1802
1803         * khtml/xml/dom_docimpl.cpp: (DOMImplementationImpl::hasFeature): Added all the DOM features that we implemented
1804         as part of the HTML editing work.
1805
1806         * khtml/dom/dom_node.cpp: (Node::isSupported): Changed this to call DOMImplementationImpl::hasFeature to share
1807         code. Later this might need to be different per-node, but at the moment that does not seem to be so.
1808
1809         * khtml/ecma/kjs_dom.cpp:
1810         (DOMNodeProtoFunc::tryCall): Pass a null string if the parameter is omitted, undefined, or null. This is better than
1811         having a special case for the string "null" in the DOM implementation.
1812         (DOMDOMImplementationProtoFunc::tryCall): Ditto.
1813
1814         - fixed <rdar://problem/3814605> REGRESSION: fast/table/039 layout test is failing due to extra trailing whitespace in innerText        
1815
1816         * khtml/editing/visible_text.cpp: (khtml::TextIterator::advance): Check for the case where we are at the end of
1817         iteration, and don't call exitNode in that case. This prevents us from getting some unwanted trailing \n characters.
1818
1819         - fixed <rdar://problem/3813253> method cloneNode() does not clone dynamically-set style attributes correctly
1820
1821         * khtml/html/html_elementimpl.h: Added cloneNode override.
1822         * khtml/html/html_elementimpl.cpp:
1823         (HTMLElementImpl::cloneNode): Added. Copies m_inlineStyleDecl.
1824         (HTMLElementImpl::parseHTMLAttribute): Changed to use getInlineStyleDecl().
1825         (HTMLElementImpl::innerText): Changed to do the same thing with fewer lines of code.
1826         (HTMLElementImpl::outerText): Tweaked comment.
1827
1828         - other cleanup
1829
1830         * khtml/xml/dom_elementimpl.cpp:
1831         (ElementImpl::cloneNode): Removed an uneeded type cast.
1832         (XMLElementImpl::cloneNode): Ditto.
1833
1834 2004-09-24  Kevin Decker  <kdecker@apple.com>
1835
1836         Reviewed by Maciej.
1837
1838         <rdar://problem/3799334> DIG: Safari does not properly return style names [DigCSS.htm]
1839
1840         * khtml/css/css_base.cpp:
1841         (CSSSelector::selectorText): Properly returns Class Selector names.  
1842         Before we would get *[CLASS"foo"] instead of .foo
1843
1844 2004-09-24  Ken Kocienda  <kocienda@apple.com>
1845
1846         Reviewed by John
1847
1848         Fix for this bug:
1849         
1850         <rdar://problem/3814660> REGRESSION (8A200-8A259): Select All has no effect on livepage.apple.com
1851
1852         * khtml/xml/dom_docimpl.cpp:
1853         (DocumentImpl::updateSelection): Move the selection start and end to rendered positions
1854         before passing off to the RenderCanvas for drawing.
1855         * layout-tests/editing/selection/select-all-004-expected.txt: Added.
1856         * layout-tests/editing/selection/select-all-004.html: Added.
1857
1858 2004-09-24  John Sullivan  <sullivan@apple.com>
1859
1860         Reviewed by Maciej.
1861         
1862         - fixed <rdar://problem/3528339> Turn on full keyboard access shows 
1863         invisible <input> elements
1864
1865         * khtml/html/html_formimpl.cpp:
1866         (DOM::HTMLGenericFormElementImpl::isFocusable):
1867         reject elements that have zero width or height, even if they aren't hidden
1868
1869 2004-09-24  Maciej Stachowiak  <mjs@apple.com>
1870
1871         - fixed deployment build
1872
1873         Reviewed by Ken.
1874
1875         * khtml/dom/dom_string.cpp: put implementation of ascii() in #ifdef !NDEBUG
1876         to match prototype.
1877
1878 2004-09-24  David Hyatt  <hyatt@apple.com>
1879
1880         Fix for 3800316, test 37 for tables is failing on the layout tests.  Make sure we don't incorrectly match
1881         non-HTML elements with HTML tag selectors in CSS.
1882         
1883         Reviewed by rjw
1884
1885         * khtml/css/cssstyleselector.cpp:
1886         (khtml::CSSStyleSelector::checkOneSelector):
1887
1888 2004-09-23  David Hyatt  <hyatt@apple.com>
1889
1890         Fix for 3601920, CSS "tabs" not switching properly on zen garden design.  Improve the repainting to account
1891         for layer changes of z-index that necessitate an invalidation.
1892         
1893         Reviewed by kocienda
1894
1895         * khtml/rendering/render_object.cpp:
1896         (RenderObject::setStyle):
1897         * khtml/rendering/render_style.cpp:
1898         (RenderStyle::diff):
1899         * khtml/rendering/render_style.h:
1900         (khtml::RenderStyle::):
1901
1902 2004-09-24  Chris Blumenberg  <cblu@apple.com>
1903
1904         Made markup copying 5 times faster. Unfortunately, this still doesn't fix:
1905         <rdar://problem/3794799> Tiger8A252: copying a bunch o' text is so slow it seems like a hang
1906
1907         Reviewed by rjw.
1908
1909         * khtml/dom/dom_string.h:
1910         * khtml/xml/dom2_rangeimpl.cpp:
1911         (DOM::RangeImpl::toHTML): serialize the range by iterating through the range
1912         * khtml/xml/dom_nodeimpl.cpp:
1913         (NodeImpl::startMarkup): new, factored out from recursive_toString
1914         (NodeImpl::endMarkup): ditto
1915         (NodeImpl::recursive_toString): call factored out methods
1916         * khtml/xml/dom_nodeimpl.h:
1917
1918 === Safari-165 ===
1919
1920 2004-09-24  Ken Kocienda  <kocienda@apple.com>
1921
1922         Hyatt made an improvement in the render tree which caused the results
1923         to get a little thinner.
1924
1925         * layout-tests/editing/deleting/delete-block-merge-contents-001-expected.txt
1926         * layout-tests/editing/deleting/delete-block-merge-contents-008-expected.txt
1927
1928 2004-09-24  Ken Kocienda  <kocienda@apple.com>
1929
1930         Reviewed by Hyatt
1931         
1932         Fix for this bug:
1933         
1934         <rdar://problem/3812939> REGRESSION: move-between-blocks-no-001 editing layout test fails in DeleteSelectionCommandImpl
1935
1936         * khtml/rendering/render_block.cpp:
1937         (khtml::RenderBlock::removeChild): Hyatt said this regression was caused by a bad merge. 
1938         Found by code inspection.
1939
1940 2004-09-23  John Sullivan  <sullivan@apple.com>
1941
1942         Reviewed by Maciej.
1943         
1944         - fixed <rdar://problem/3551850> hang caused by interpreting bad javascript 
1945         guarded by a deliberately bogus "language" attribute (www.riibe.com)
1946
1947         * khtml/html/htmltokenizer.cpp:
1948         (khtml::HTMLTokenizer::parseTag):
1949         Check for language attribute of <script> tag in a way that matches WinIE.
1950         Previously we were far too permissive.
1951
1952 2004-09-23  David Hyatt  <hyatt@apple.com>
1953
1954         Fix for 3685234 and 3548444, the x-offset for frame borders was off by 1 pixel, causing mojibake to occur when
1955         repainting happened.
1956
1957         * khtml/rendering/render_canvas.cpp:
1958         (RenderCanvas::repaintViewRectangle):
1959
1960 2004-09-23  Richard Williamson   <rjw@apple.com>
1961
1962         Fixed <rdar://problem/3813271> dashboard-region-circle and dashboard-region-rectangle should be collapsed into dashboard-region
1963         Fixed <rdar://problem/3813289> dashboard regions need to correctly account for overflow/scrolling
1964
1965         Reviewed by Chris.
1966
1967         * khtml/css/css_valueimpl.cpp:
1968         (CSSPrimitiveValueImpl::cssText):
1969         * khtml/css/css_valueimpl.h:
1970         * khtml/css/cssparser.cpp:
1971         (CSSParser::parseValue):
1972         (skipCommaInDashboardRegion):
1973         (CSSParser::parseDashboardRegions):
1974         * khtml/khtmlview.cpp:
1975         (KHTMLView::layout):
1976         (KHTMLView::updateDashboardRegions):
1977         * khtml/khtmlview.h:
1978         * khtml/rendering/render_layer.cpp:
1979         (RenderLayer::scrollToOffset):
1980         * khtml/rendering/render_object.cpp:
1981         (RenderObject::addDashboardRegions):
1982         * kwq/KWQKHTMLPart.mm:
1983         (KWQKHTMLPart::dashboardRegionsChanged):
1984         * kwq/WebDashboardRegion.h:
1985         * kwq/WebDashboardRegion.m:
1986         (-[WebDashboardRegion initWithRect:clip:type:]):
1987         (-[WebDashboardRegion dashboardRegionClip]):
1988         (-[WebDashboardRegion description]):
1989
1990 2004-09-23  Ken Kocienda  <kocienda@apple.com>
1991
1992         Reviewed by Richard
1993
1994         * khtml/xml/dom_position.cpp:
1995         (DOM::Position::inRenderedContent): Make the "empty block" check the same as the one
1996         use in visible position. This fixes a recent regression which broke up and down
1997         arrowing between blocks with an empty block in between.
1998
1999 2004-09-23  Maciej Stachowiak  <mjs@apple.com>
2000
2001         Reviewed by Darin.
2002
2003         <rdar://problem/3685235> REGRESSION (Mail): links are not properly editable
2004         
2005         * khtml/html/html_inlineimpl.cpp:
2006         (HTMLAnchorElementImpl::isFocusable): If this element is editable, then follow
2007         the normal focus rules so the link does not swallow focus when you arrow key
2008         or drag-select into it.
2009
2010 2004-09-23  Darin Adler  <darin@apple.com>
2011
2012         - added test for the DOM::Range bug fixed recently
2013
2014         * layout-tests/fast/dom/clone-contents-0-end-offset-expected.txt: Added.
2015         * layout-tests/fast/dom/clone-contents-0-end-offset.html: Added.
2016
2017 2004-09-23  David Hyatt  <hyatt@apple.com>
2018
2019         Fix for hitlist bug, crash when deleting.  
2020
2021         Also fix repaint bug when inlines are inside overflow:auto/scroll regions.
2022         
2023         Reviewed by kocienda
2024
2025         * khtml/editing/htmlediting_impl.cpp:
2026         (khtml::DeleteSelectionCommandImpl::DeleteSelectionCommandImpl):
2027         (khtml::DeleteSelectionCommandImpl::doApply):
2028         * khtml/rendering/render_block.cpp:
2029         (khtml::RenderBlock::removeChild):
2030         * khtml/rendering/render_flow.cpp:
2031         (RenderFlow::getAbsoluteRepaintRect):
2032
2033 2004-09-23  John Sullivan  <sullivan@apple.com>
2034
2035         Reviewed by Ken.
2036
2037         - fixed <rdar://problem/3527840> reproducible crash at johnbrown.v32.qikker.com 
2038         (nil-deref in NodeImpl::dispatchEvent)
2039
2040         * khtml/xml/dom_nodeimpl.cpp:
2041         (NodeImpl::dispatchEvent):
2042         guard against document or document->document() being nil
2043
2044 2004-09-23  Darin Adler  <darin@apple.com>
2045
2046         Reviewed by Ken.
2047
2048         - added new VisibleRange class; not used yet
2049
2050         * WebCore.pbproj/project.pbxproj: Added visible_range.h and visible_range.cpp.
2051         * khtml/editing/visible_range.cpp: Added.
2052         * khtml/editing/visible_range.h: Added.
2053
2054         - tweaks
2055
2056         * kwq/WebCoreBridge.mm: (-[WebCoreBridge alterCurrentSelection:direction:granularity:]):
2057         Use switch statement instead of if statement so we get a warning if we ever add a new
2058         granularity.
2059
2060         * khtml/editing/selection.h: khtml, not DOM, namespace
2061         * khtml/editing/visible_position.h: Ditto.
2062
2063 2004-09-23  Darin Adler  <darin@apple.com>
2064
2065         Reviewed by Ken.
2066
2067         - fixed <rdar://problem/3812758> 8S266: attaching mutation events to an editable div crashes Safari
2068
2069         * khtml/xml/dom_nodeimpl.cpp:
2070         (NodeImpl::dispatchEvent): Added ref/deref so this works if passed a "floating" event object.
2071         (NodeImpl::dispatchGenericEvent): Ditto.
2072         (NodeImpl::dispatchHTMLEvent): Removed unneeded ref/deref now that dispatchEvent takes care of it.
2073         (NodeImpl::dispatchMouseEvent): Ditto.
2074         (NodeImpl::dispatchUIEvent): Ditto.
2075
2076 2004-09-23  Darin Adler  <darin@apple.com>
2077
2078         Reviewed by Ken.
2079
2080         - fixed some minor mistakes discovered by code inspection
2081
2082         * khtml/khtml_part.cpp:
2083         (KHTMLPart::setSelection): Changed to not grab focus if clearing the selection.
2084         Grabbing focus when we get the selection is also probably something that should be
2085         conditional, since you can use a WebView in a mode where it can have selection even
2086         when not first responder, ala NSTextView.
2087         (KHTMLPart::setCaretVisible): Changed to not grab focus if making the caret invisible.
2088         Not sure if it's ever important to grab focus when making the caret visible, but by
2089         code inspection it seemed that was unlikely to do harm.
2090
2091 2004-09-23  Darin Adler  <darin@apple.com>
2092
2093         Reviewed by Ken.
2094
2095         - fixed <rdar://problem/3790595> "ERROR: unimplemented propertyID: 97" logged to console when copying selection (table-layout)
2096
2097         * khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
2098         Added CSS_PROP_TABLE_LAYOUT case.
2099
2100 2004-09-23  Darin Adler  <darin@apple.com>
2101
2102         Reviewed by Ken.
2103
2104         - fixed <rdar://problem/3809600> REGRESSION: text in search field doesn't disappear when clicked at developer.apple.com
2105
2106         Reversing the order of scope caused us to get and set too many properties in the window
2107         object; in the case of this bug setting value ended up setting a window.value property
2108         instead of the value of the <input> element.
2109
2110         * khtml/ecma/kjs_window.h: Removed bogus hasProperty function that always returns true.
2111         Testing shows that MacIE and Gecko match our behavior when we remove this, despite the
2112         "need this to match IE behavior" comment in the file, which I believe is incorrect.
2113         * khtml/ecma/kjs_window.cpp: Ditto.
2114
2115 2004-09-23  Darin Adler  <darin@apple.com>
2116
2117         Reviewed by Ken.
2118
2119         - fixed <rdar://problem/3812471> -[DOMRange cloneContents] clones too much in some cases where endOffset is 0
2120
2121         * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::processContents): Added some nil
2122         checks to prevent this function from crashing if offsets are greater than the
2123         number of child nodes. Added a special case for offset 0 in one case that has a loop
2124         that won't work correctly for that case.
2125
2126 2004-09-23  Darin Adler  <darin@apple.com>
2127
2128         Reviewed by Ken.
2129
2130         - fixed <rdar://problem/3811890> when selecting and moving the caret, some words aren't spell-checked (test case included)
2131
2132         This was mostly fixed by changes I made recently, but using the test case in the bug
2133         I discovered one regression I introduced and another problem that wasn't fixed yet.
2134         This change fixes both.
2135
2136         * kwq/KWQKHTMLPart.mm:
2137         (KWQKHTMLPart::markMisspellingsInSelection): Removed unneeded inRenderedContent() check. It was returning false
2138         in cases involving a <br> at the end of line, and the check isn't all that helpful now that we use VisiblePosition,
2139         which takes care of that sort of thing for you. Changed code to determine the range to check to use the two
2140         different flavors of word boundary to expand to words we touch in both directions.
2141         (KWQKHTMLPart::updateSpellChecking): Changed to use the same logic about word boundaries. By being consistent,
2142         the anomalies reported in the bug report go away.
2143
2144 2004-09-23  Darin Adler  <darin@apple.com>
2145
2146         Reviewed by Ken.
2147
2148         - fixed <rdar://problem/3811584> REGRESSION (85-125): iframe.document undefined in function called from button onclick; works from img onclick
2149
2150         Since we are doing a bit less "defers callbacks" work, when testing I ran into this code path.
2151
2152         * khtml/xml/dom2_eventsimpl.cpp: (MouseEventImpl::computeLayerPos): Check for document without renderer.
2153
2154 2004-09-23  Darin Adler  <darin@apple.com>
2155
2156         - checked in a new file I forgot
2157
2158         * khtml/editing/text_granularity.h: Added.
2159
2160 2004-09-22  Darin Adler  <darin@apple.com>
2161
2162         - renamed
2163
2164             DOM::CaretPosition -> khtml::VisibleRange
2165             DOM::Selection     -> khtml::Selection
2166
2167         - moved all the functions in visible_units.h from DOM to khtml namespace
2168         - moved the one thing from Selection that KHTMLPart uses into its own header
2169
2170         * WebCore.pbproj/project.pbxproj: Added text_granularity.h.
2171
2172         * ForwardingHeaders/editing/selection.h: Added.
2173         * WebCore-combined.exp: Regenerated.
2174         * WebCore-tests.exp: Updated symbol for DOM::Selection debugging.
2175
2176         * khtml/ecma/kjs_window.cpp: Update names and namespaces.
2177         * khtml/editing/htmlediting.cpp: Ditto.
2178         * khtml/editing/htmlediting.h: Ditto.
2179         * khtml/editing/htmlediting_impl.cpp: Ditto.
2180         * khtml/editing/htmlediting_impl.h: Ditto.
2181         * khtml/editing/jsediting.cpp: Ditto.
2182         * khtml/editing/selection.cpp: Ditto.
2183         * khtml/editing/selection.h: Ditto.
2184         * khtml/editing/visible_position.cpp: Ditto.
2185         * khtml/editing/visible_position.h: Ditto.
2186         * khtml/editing/visible_text.h: Ditto.
2187         * khtml/editing/visible_units.cpp: Ditto.
2188         * khtml/editing/visible_units.h: Ditto.
2189         * khtml/khtml_part.cpp: Ditto.
2190         * khtml/khtml_part.h: Ditto.
2191         * khtml/khtmlpart_p.h: Ditto.
2192         * khtml/rendering/render_block.cpp: Ditto.
2193         * khtml/xml/dom_docimpl.h: Ditto.
2194         * khtml/xml/dom_nodeimpl.cpp: Ditto.
2195         * kwq/KWQKHTMLPart.h: Ditto.
2196         * kwq/KWQKHTMLPart.mm: Ditto.
2197         * kwq/KWQRenderTreeDebug.cpp: Ditto.
2198         * kwq/WebCoreBridge.mm: Ditto.
2199
2200 2004-09-22  Darin Adler  <darin@apple.com>
2201
2202         * ForwardingHeaders/*: Use import instead of include.
2203
2204 2004-09-22  Darin Adler  <darin@apple.com>
2205
2206         - renamed these files:
2207
2208             misc/khtml_text_operations.h   -> editing/visible_text.h
2209             misc/khtml_text_operations.cpp -> editing/visible_text.cpp
2210             xml/dom_caretposition.cpp      -> editing/visible_position.cpp
2211             xml/dom_caretposition.h        -> editing/visible_position.h
2212             xml/dom_selection.cpp          -> editing/selection.cpp
2213             xml/dom_selection.h            -> editing/selection.h
2214
2215         - broke out the word/line/paragraph part of visible_position.h into visible_units.h
2216         - removed some unnecessary includes from some header files to reduce the number of
2217           files that trigger "building the world"
2218
2219         * WebCore.pbproj/project.pbxproj: Added the files under new names, removed the old ones.
2220
2221         * ForwardingHeaders/editing/jsediting.h: Added.
2222         * ForwardingHeaders/editing/visible_text.h: Added.
2223         * ForwardingHeaders/misc/khtml_text_operations.h: Removed.
2224         * ForwardingHeaders/xml/dom_caretposition.h: Removed.
2225         * ForwardingHeaders/xml/dom_selection.h: Removed.
2226
2227         * khtml/ecma/kjs_window.cpp: Updated or removed #include lines.
2228         * khtml/editing/htmlediting.cpp: Ditto.
2229         * khtml/editing/htmlediting.h: Ditto.
2230         * khtml/editing/htmlediting_impl.cpp: Ditto.
2231         * khtml/editing/htmlediting_impl.h: Ditto.
2232         * khtml/editing/jsediting.cpp: Ditto.
2233         * khtml/editing/selection.cpp: Ditto.
2234         * khtml/editing/selection.h: Ditto.
2235         * khtml/editing/visible_position.cpp: Ditto.
2236         * khtml/editing/visible_position.h: Ditto.
2237         * khtml/editing/visible_text.cpp: Ditto.
2238         * khtml/editing/visible_text.h: Ditto.
2239         * khtml/editing/visible_units.cpp: Added.
2240         * khtml/editing/visible_units.h: Added.
2241         * khtml/html/html_elementimpl.cpp: Updated or removed #include lines.
2242         * khtml/khtml_part.cpp: Ditto.
2243         * khtml/khtml_part.h: Ditto.
2244         * khtml/khtmlpart_p.h: Ditto.
2245         * khtml/khtmlview.cpp: Ditto.
2246         * khtml/misc/khtml_text_operations.cpp: Removed.
2247         * khtml/misc/khtml_text_operations.h: Removed.
2248         * khtml/rendering/render_block.cpp: Updated or removed #include lines.
2249         * khtml/xml/dom2_rangeimpl.cpp: Ditto.
2250         * khtml/xml/dom_caretposition.cpp: Removed.
2251         * khtml/xml/dom_caretposition.h: Removed.
2252         * khtml/xml/dom_docimpl.cpp: Updated or removed #include lines.
2253         * khtml/xml/dom_docimpl.h: Ditto.
2254         * khtml/xml/dom_elementimpl.cpp: Ditto.
2255         * khtml/xml/dom_nodeimpl.cpp: Ditto.
2256         * khtml/xml/dom_position.cpp: Ditto.
2257         * khtml/xml/dom_selection.cpp: Removed.
2258         * khtml/xml/dom_selection.h: Removed.
2259         * kwq/KWQKHTMLPart.mm: Updated or removed #include lines.
2260         * kwq/KWQKHTMLPart.h: Ditto.
2261         * kwq/KWQRenderTreeDebug.cpp: Ditto.
2262         * kwq/WebCoreBridge.mm: Ditto.
2263
2264 2004-09-22  Richard Williamson   <rjw@apple.com>
2265         
2266         Pass dashboard regions up to WebKit.
2267         
2268         Don't collect regions from RenderTexts.
2269
2270         Made more args and return types references to avoid
2271         copying value lists.
2272
2273         Reviewed by Hyatt.
2274
2275         * WebCore.pbproj/project.pbxproj:
2276         * khtml/khtmlview.cpp:
2277         (KHTMLView::layout):
2278         * khtml/rendering/render_object.cpp:
2279         (RenderObject::collectDashboardRegions):
2280         * khtml/xml/dom_docimpl.cpp:
2281         (DocumentImpl::dashboardRegions):
2282         (DocumentImpl::setDashboardRegions):
2283         * khtml/xml/dom_docimpl.h:
2284         * kwq/KWQKHTMLPart.h:
2285         * kwq/KWQKHTMLPart.mm:
2286         (KWQKHTMLPart::didFirstLayout):
2287         (KWQKHTMLPart::dashboardRegionsChanged):
2288         * kwq/WebCoreBridge.h:
2289         * kwq/WebDashboardRegion.h: Added.
2290         * kwq/WebDashboardRegion.m: Added.
2291         (-[WebDashboardRegion initWithRect:type:]):
2292         (-[WebDashboardRegion copyWithZone:]):
2293         (-[WebDashboardRegion dashboardRegionRect]):
2294         (-[WebDashboardRegion dashboardRegionType]):
2295         (-[WebDashboardRegion description]):
2296
2297 2004-09-22  Ken Kocienda  <kocienda@apple.com>
2298
2299         Reviewed by Hyatt
2300
2301         Fix for this hitlist bug:
2302         
2303         <rdar://problem/3805486> REGRESSION (Mail): Empty block elements can cause the caret to get "stuck" in one spot
2304
2305         * khtml/xml/dom_caretposition.cpp:
2306         (DOM::CaretPosition::isCandidate): You can no longer caret into empty blocks with no height.
2307         Also did a little clean up in this function.
2308         * layout-tests/editing/deleting/delete-3800834-fix-expected.txt: Regenerated expected results. 
2309         This test was actually failing and had bogus results checked in!
2310         * layout-tests/editing/selection/select-all-003-expected.txt: Regenerated expected results.
2311
2312 2004-09-22  Chris Blumenberg  <cblu@apple.com>
2313
2314         Fixed: <rdar://problem/3812091> REGRESSION (Mail): double-clicked word is not smart inserted on drag
2315
2316         Reviewed by john.
2317
2318         * khtml/editing/htmlediting.cpp:
2319         (khtml::MoveSelectionCommand::MoveSelectionCommand): take smartMove arg
2320         * khtml/editing/htmlediting.h:
2321         * khtml/editing/htmlediting_impl.cpp:
2322         (khtml::CompositeEditCommandImpl::deleteSelection): take smartDelete arg
2323         (khtml::MoveSelectionCommandImpl::MoveSelectionCommandImpl): take smartMove arg
2324         (khtml::MoveSelectionCommandImpl::doApply): pass smartMove for smartDelete and smartReplace
2325         * khtml/editing/htmlediting_impl.h:
2326         * kwq/WebCoreBridge.h:
2327         * kwq/WebCoreBridge.mm:
2328         (-[WebCoreBridge moveSelectionToDragCaret:smartMove:]): take smartMove arg
2329
2330 2004-09-22  Ken Kocienda  <kocienda@apple.com>
2331
2332         Reviewed by Hyatt
2333
2334         * khtml/css/css_computedstyle.cpp:
2335         (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): New overloaded 
2336         version of this function, one that takes a flag to determine whether to
2337         perform a document updateLayout() call before querying the style system.
2338         * khtml/css/css_computedstyle.h:
2339         (DOM::EUpdateLayout): Give a symbolic constant to true/false for the 
2340         purpose of the new call to getPropertyCSSValue.
2341         * khtml/editing/htmlediting_impl.cpp:
2342         (khtml::StyleChange::currentlyHasStyle): Pass DoNotUpdateLayout to call to
2343         getPropertyCSSValue.
2344         (khtml::CompositeEditCommandImpl::applyTypingStyle): Add in top-level calls
2345         to updateLayout before doing style changes that now do not update styles
2346         themselves.
2347         (khtml::ApplyStyleCommandImpl::doApply): Ditto.
2348         (khtml::ApplyStyleCommandImpl::removeCSSStyle): Pass DoNotUpdateLayout to call to
2349         getPropertyCSSValue.
2350         (khtml::DeleteSelectionCommandImpl::computeTypingStyle): Remove this dead code.
2351         * khtml/editing/htmlediting_impl.h: Ditto.
2352
2353 2004-09-22  Ken Kocienda  <kocienda@apple.com>
2354
2355         Reviewed by Darin
2356
2357         * WebCore.pbproj/project.pbxproj: New files added.
2358         * khtml/khtml_part.cpp:
2359         (KHTMLPart::clearSelection): No longer calls setFocusIfNeeded.
2360         (KHTMLPart::slotClearSelection): Merged old implementation from this function to
2361         clearSelection. Now just calls clearSelection. Also put in !APPLE_CHANGES since
2362         we do not call it.
2363         * khtml/xml/dom_docimpl.cpp:
2364         (DocumentImpl::setFocusNode): Add some code to determine when setting the focus should
2365         clear the selection.
2366         * kwq/KWQWidget.mm:
2367         (QWidget::hasFocus): Call _webcore_effectiveFirstResponder to get view to check for focus.
2368         (QWidget::setFocus): Ditto.
2369         * kwq/WebCoreBridge.mm: 
2370         (-[WebCoreBridge deselectText]): Called slotClearSelection and should have been. Now calls
2371         clearSelection.
2372         * kwq/WebCoreView.h: Added.
2373         * kwq/WebCoreView.m: Added.
2374         (-[NSView _webcore_effectiveFirstResponder]): New method to yield the correct responder
2375         to check for firstResponder-ness before calling makeFirstResonder. This helps to prevent 
2376         unwanted firstResponder switching.
2377         (-[NSClipView _webcore_effectiveFirstResponder]): Ditto.
2378         (-[NSScrollView _webcore_effectiveFirstResponder]): Ditto.
2379
2380 2004-09-21  Maciej Stachowiak  <mjs@apple.com>
2381
2382         Reviewed by Darin.
2383
2384         <rdar://problem/3805137> REGRESSION: Cannot search on pricetool.com
2385
2386         The problem here is that residual style handling can cause an
2387         element associated with a misnested form to lose the association,
2388         because it can become detached and then reattached in this
2389         case. So we need to maintain the association.
2390         
2391         * khtml/html/html_formimpl.h: Added list of dormant elements to form,
2392         and dormant bit to generic form element.
2393         * khtml/html/html_formimpl.cpp:
2394         (DOM::HTMLFormElementImpl::~HTMLFormElementImpl): Clear m_form field for
2395         dormant elements too.
2396         (DOM::HTMLFormElementImpl::registerFormElement): Remove from dormant list
2397         in addition to adding to main list.
2398         (DOM::HTMLFormElementImpl::removeFormElement): Remove from both lists.
2399         (DOM::HTMLFormElementImpl::makeFormElementDormant): New method, remove from
2400         main list, add to dormant list.
2401         (DOM::HTMLGenericFormElementImpl::HTMLGenericFormElementImpl): Initialize
2402         dormant bit to false.
2403         (DOM::HTMLGenericFormElementImpl::insertedIntoDocument): If the element is
2404         dormant and has a form, re-register it and clear the dormant bit.
2405         (DOM::HTMLGenericFormElementImpl::removedFromDocument): If the document has
2406         a form, tell the form it is dormant and set the dormant bit.
2407
2408 2004-09-22  Chris Blumenberg  <cblu@apple.com>
2409
2410         Fixed: <rdar://problem/3811187> REGRESSION (Mail): Control-click past end of document does not spell check last word
2411
2412         Reviewed by kocienda.
2413
2414         * khtml/xml/dom_selection.cpp:
2415         (DOM::Selection::validate): if at the end of the document, expand to the left.
2416
2417 2004-09-22  Maciej Stachowiak  <mjs@apple.com>
2418
2419         Reviewed by Ken and John.
2420
2421         <rdar://problem/3759228> REGRESSION (Mail): stray characters when entering text via input method right after newline
2422         
2423         * khtml/editing/htmlediting_impl.cpp:
2424         (khtml::CompositeEditCommandImpl::inputText): Add an optional 
2425         selectInsertedText parameter.
2426         (khtml::ReplaceSelectionCommandImpl::doApply): Let the inputText operation
2427         select the text when inserting plain text, because it already knows all the right
2428         information to do so, and this function doesn't (sometimes text is inserted
2429         before the start of the old selection, not after!)
2430         * khtml/editing/htmlediting_impl.h:
2431
2432 2004-09-22  Richard Williamson   <rjw@apple.com>
2433
2434         More tweaks to dashboard regions.
2435
2436         Move dashboard regions list into css3NonInheritedData so it will be shared
2437         by all styles that don't modify the empty region list.
2438
2439         Make the initial value for dashboard region list a static to minimize allocations
2440         of empty lists.
2441
2442         Make marquee and flex style accessor functions const.
2443
2444         Reviewed by Hyatt.
2445
2446         * khtml/rendering/render_style.cpp:
2447         (RenderStyle::diff):
2448         * khtml/rendering/render_style.h:
2449         (khtml::RenderStyle::opacity):
2450         (khtml::RenderStyle::boxAlign):
2451         (khtml::RenderStyle::boxDirection):
2452         (khtml::RenderStyle::boxFlexGroup):
2453         (khtml::RenderStyle::boxOrdinalGroup):
2454         (khtml::RenderStyle::boxOrient):
2455         (khtml::RenderStyle::boxPack):
2456         (khtml::RenderStyle::marqueeIncrement):
2457         (khtml::RenderStyle::marqueeSpeed):
2458         (khtml::RenderStyle::marqueeLoopCount):
2459         (khtml::RenderStyle::marqueeBehavior):
2460         (khtml::RenderStyle::marqueeDirection):
2461         (khtml::RenderStyle::dashboardRegions):
2462         (khtml::RenderStyle::setDashboardRegions):
2463         (khtml::RenderStyle::setDashboardRegion):
2464         (khtml::RenderStyle::initialDashboardRegions):
2465
2466 2004-09-22  David Hyatt  <hyatt@apple.com>
2467
2468         Fix for 3802766, entire view redrawn in Blot while typing.  Don't needlessly create text nodes just to find
2469         out the font for the caret position.
2470         
2471         Reviewed by darin
2472
2473         * kwq/KWQKHTMLPart.mm:
2474         (KWQKHTMLPart::fontForSelection):
2475
2476 2004-09-21  Chris Blumenberg  <cblu@apple.com>
2477
2478         Fixed:
2479         <rdar://problem/3735071> REGRESSION (Mail): WebCore Editing must do smart paste
2480         <rdar://problem/3799163> REGRESSION (Mail): Deleting a word doesn't delete whitespace
2481
2482         Reviewed by darin.
2483
2484         * khtml/editing/htmlediting.cpp:
2485         (khtml::DeleteSelectionCommand::DeleteSelectionCommand): take smartDelete parameter
2486         (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): take smartReplace parameter
2487         * khtml/editing/htmlediting.h:
2488         * khtml/editing/htmlediting_impl.cpp:
2489         (khtml::DeleteSelectionCommandImpl::DeleteSelectionCommandImpl): take smartDelete parameter
2490         (khtml::DeleteSelectionCommandImpl::doApply): delete whitespace before and after selection if necessary
2491         (khtml::ReplaceSelectionCommandImpl::ReplaceSelectionCommandImpl): take smartReplace parameter
2492         (khtml::ReplaceSelectionCommandImpl::doApply): add whitespace before and after the replacement if necessary
2493         * khtml/editing/htmlediting_impl.h:
2494         * kwq/WebCoreBridge.h:
2495         * kwq/WebCoreBridge.mm:
2496         (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:smartReplace:]): take smartReplace parameter
2497         (-[WebCoreBridge replaceSelectionWithNode:selectReplacement:smartReplace:]): ditto
2498         (-[WebCoreBridge replaceSelectionWithMarkupString:baseURLString:selectReplacement:smartReplace:]): ditto
2499         (-[WebCoreBridge replaceSelectionWithText:selectReplacement:smartReplace:]): ditto
2500         (-[WebCoreBridge deleteSelectionWithSmartDelete:]): take smartDelete parameter
2501
2502 2004-09-21  Richard Williamson   <rjw@apple.com>
2503
2504         More dashboard region work.
2505
2506         Added support for computed style and cssText for new region property.
2507         Added restriction on length types allowed in region functions.
2508         Added initial and inheritance support for -apple-dashboard-region.
2509
2510         Reviewed by Hyatt.
2511
2512         * khtml/css/css_computedstyle.cpp:
2513         (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
2514         * khtml/css/css_valueimpl.cpp:
2515         (CSSPrimitiveValueImpl::cssText):
2516         * khtml/css/cssparser.cpp:
2517         (CSSParser::parseDashboardRegions):
2518         * khtml/css/cssstyleselector.cpp:
2519         (khtml::CSSStyleSelector::applyProperty):
2520         * khtml/rendering/render_object.cpp:
2521         (RenderObject::addDashboardRegions):
2522         * khtml/rendering/render_style.cpp:
2523         (RenderStyle::diff):
2524         * khtml/rendering/render_style.h:
2525         (khtml::StyleDashboardRegion::operator==):
2526         (khtml::RenderStyle::dashboardRegions):
2527         (khtml::RenderStyle::setDashboardRegions):
2528         (khtml::RenderStyle::initialDashboardRegions):
2529
2530 2004-09-21  Darin Adler  <darin@apple.com>
2531
2532         Reviewed by Ken.
2533
2534         - fixed problem where our updateLayout call ignores pending stylesheets all the time
2535
2536         * khtml/xml/dom_docimpl.h: Added updateLayoutIgnorePendingStylesheets.
2537         * khtml/xml/dom_docimpl.cpp:
2538         (DocumentImpl::updateLayout): Took out the "ignore pending stylesheets" business here.
2539         (DocumentImpl::updateLayoutIgnorePendingStylesheets): Put it in here.
2540
2541         * khtml/ecma/kjs_dom.cpp: (DOMNode::getValueProperty): Call the new
2542         updateLayoutIgnorePendingStylesheets function.
2543         * khtml/ecma/kjs_html.cpp:
2544         (KJS::HTMLElement::getValueProperty): Ditto.
2545         (KJS::HTMLElement::putValue): Ditto.
2546         * khtml/ecma/kjs_views.cpp: (DOMAbstractViewFunc::tryCall): Ditto.
2547         * khtml/ecma/kjs_window.cpp:
2548         (Window::updateLayout): Ditto.
2549         (Selection::get): Ditto.
2550         (SelectionFunc::tryCall): Ditto.
2551
2552         * khtml/html/html_imageimpl.h: Add ignorePendingStylesheets boolean parameter.
2553         * khtml/html/html_imageimpl.cpp:
2554         (HTMLImageElementImpl::width): Respect new parameter.
2555         (HTMLImageElementImpl::height): Ditto.
2556
2557         - tweaks
2558
2559         * kwq/WebCoreBridge.mm:
2560         (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): Removed unneeded
2561         explicit "true" parameter to setSelection.
2562         (-[WebCoreBridge alterCurrentSelection:verticalDistance:]): Ditto.
2563
2564 2004-09-21  Darin Adler  <darin@apple.com>
2565
2566         Reviewed by Ken.
2567
2568         - fix crash when pasting text at the end of the document and then doing an undo
2569
2570         * khtml/editing/htmlediting_impl.cpp:
2571         (khtml::EditCommandImpl::apply): Call markMisspellingsInSelection before doing
2572         the editing operation, and we'll tell setSelection not to unmark the old selection.
2573         Also call updateLayout before calling appliedEditing so DOM operations in the
2574         code responding to the selection change will work.
2575         (khtml::EditCommandImpl::unapply): Ditto.
2576         (khtml::EditCommandImpl::reapply): Ditto.
2577
2578         * khtml/khtml_part.h: Added a third parameter to setSelection to tell it whether
2579         to unmark the old selection. We must pass false when editing, because the old
2580         selection might have now-invalid offsets inside it.
2581         * khtml/khtml_part.cpp:
2582         (KHTMLPart::setSelection): Add unmarkOldSelection parameter, and respect it.
2583         (KHTMLPart::appliedEditing): Pass false for unmarkOldSelection.
2584         (KHTMLPart::unappliedEditing): Ditto.
2585         (KHTMLPart::reappliedEditing): Ditto.
2586
2587 2004-09-21  Richard Williamson   <rjw@apple.com>
2588
2589         Part 2 of the feature requested in
2590         <rdar://problem/3752791> Dashboard: Need a better solution for control regions
2591         
2592         This patch actually collections the regions and converts to absolute coordinates.
2593         Only remaining piece is to pass over the bridge and up the alley to WebKit
2594         UI delegate.
2595  
2596         Reviewed by Ken.
2597
2598         * khtml/css/css_valueimpl.h:
2599         (DOM::CSSPrimitiveValueImpl::getDashboardRegionValue):
2600         * khtml/css/cssparser.cpp:
2601         (CSSParser::parseValue):
2602         (CSSParser::parseDashboardRegions):
2603         * khtml/css/cssproperties.c:
2604         * khtml/css/cssproperties.h:
2605         * khtml/css/cssproperties.in:
2606         * khtml/css/cssstyleselector.cpp:
2607         (khtml::CSSStyleSelector::applyProperty):
2608         * khtml/khtmlview.cpp:
2609         (KHTMLView::layout):
2610         * khtml/rendering/render_object.cpp:
2611         (RenderObject::computeDashboardRegions):
2612         (RenderObject::addDashboardRegions):
2613         (RenderObject::collectDashboardRegions):
2614         * khtml/rendering/render_object.h:
2615         (khtml::DashboardRegionValue::operator==):
2616         * khtml/rendering/render_style.cpp:
2617         * khtml/rendering/render_style.h:
2618         (khtml::StyleDashboardRegion::):
2619         (khtml::RenderStyle::dashboardRegions):
2620         (khtml::RenderStyle::setDashboardRegion):
2621         * khtml/xml/dom_docimpl.cpp:
2622         (DocumentImpl::DocumentImpl):
2623         (DocumentImpl::updateLayout):
2624         (DocumentImpl::acceptsEditingFocus):
2625         (DocumentImpl::dashboardRegions):
2626         (DocumentImpl::setDashboardRegions):
2627         * khtml/xml/dom_docimpl.h:
2628         (DOM::DocumentImpl::hasDashboardRegions):
2629         (DOM::DocumentImpl::setHasDashboardRegions):
2630
2631 2004-09-21  John Sullivan  <sullivan@apple.com>
2632
2633         Reviewed by Darin.
2634         
2635         - WebCore part of fix for <rdar://problem/3618274> REGRESSION (125-135): 
2636         Option-tab doesn't always work as expected
2637
2638         * kwq/KWQKHTMLPart.mm:
2639         (KWQKHTMLPart::tabsToAllControls):
2640         reworked logic to match what we promise in the UI; this worked correctly
2641         before for regular tabbing, but not for option-tabbing.
2642
2643         * kwq/KWQButton.mm:
2644         (QButton::focusPolicy):
2645         check tabsToAllControls() rather than just WebCoreKeyboardAccessFull
2646         
2647         * kwq/KWQComboBox.mm:
2648         (QComboBox::focusPolicy):
2649         ditto
2650         
2651         * kwq/KWQFileButton.mm:
2652         (KWQFileButton::focusPolicy):
2653         ditto
2654         
2655         * kwq/KWQListBox.mm:
2656         (QListBox::focusPolicy):
2657         ditto
2658
2659 2004-09-21  John Sullivan  <sullivan@apple.com>
2660
2661         * khtml/xml/dom_selection.cpp:
2662         (DOM::Selection::modify):
2663         initialize xPos to make compiler happy in deployment builds
2664
2665 2004-09-21  Darin Adler  <darin@apple.com>
2666
2667         Reviewed by Ken.
2668
2669         - some small mechanical improvements to the position and selection classes
2670
2671         * khtml/xml/dom_position.h: Added clear(), startPosition(), and endPosition().
2672         * khtml/xml/dom_position.cpp:
2673         (DOM::Position::clear): Added.
2674         (DOM::startPosition): Added.
2675         (DOM::endPosition): Added.
2676
2677         * khtml/xml/dom_caretposition.h: Changed m_position to m_deepPosition. Added clear(),
2678         removed node() and offset().
2679         * khtml/xml/dom_caretposition.cpp:
2680         (DOM::CaretPosition::init): Updated for name change of m_position to m_deepPosition.
2681         (DOM::CaretPosition::isLastInBlock): Ditto.
2682         (DOM::CaretPosition::next): Ditto.
2683         (DOM::CaretPosition::previous): Ditto.
2684         (DOM::CaretPosition::debugPosition): Ditto.
2685         (DOM::CaretPosition::formatForDebugger): Ditto.
2686
2687         * khtml/xml/dom_selection.h: Remove setStart, setEnd, setStartAndEnd, rangeStart, rangeEnd,
2688         and all the assignXXX functions.
2689         * khtml/xml/dom_selection.cpp:
2690         (DOM::Selection::Selection): Wean from assign functions, get and set data members directly.
2691         (DOM::Selection::init): Don't clear base, extent, start, and end, since they have constructors.
2692         (DOM::Selection::operator=): Wean from assign functions, get and set data members directly.
2693         (DOM::Selection::moveTo): Ditto.
2694         (DOM::Selection::setModifyBias): Ditto.
2695         (DOM::Selection::modifyExtendingRightForward): Ditto.
2696         (DOM::Selection::modifyMovingRightForward): Ditto.
2697         (DOM::Selection::modifyExtendingLeftBackward): Ditto.
2698         (DOM::Selection::modifyMovingLeftBackward): Ditto.
2699         (DOM::Selection::modify): Ditto.
2700         (DOM::Selection::xPosForVerticalArrowNavigation): Ditto.
2701         (DOM::Selection::clear): Ditto.
2702         (DOM::Selection::setBase): Ditto.
2703         (DOM::Selection::setExtent): Ditto.
2704         (DOM::Selection::setBaseAndExtent): Ditto.
2705         (DOM::Selection::toRange): Ditto.
2706         (DOM::Selection::layoutCaret): Ditto.
2707         (DOM::Selection::needsCaretRepaint): Ditto.
2708         (DOM::Selection::validate): Ditto.
2709         (DOM::Selection::debugRenderer): Ditto.
2710         (DOM::Selection::debugPosition): Ditto.
2711         (DOM::Selection::end):
2712
2713         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::advanceToNextMisspelling): Tweaked whitespace.
2714
2715 2004-09-21  Chris Blumenberg  <cblu@apple.com>
2716
2717         Fixed: <rdar://problem/3647229> Safari does not play inline Windows Media Content on some sites (miggy.net and ministryofsound.com)
2718
2719         Reviewed by john.
2720
2721         * khtml/rendering/render_frames.cpp:
2722         (RenderPartObject::updateWidget): when no MIME type is specified map from the WMP CLASSID to the WMP MIME type, look for the URL of the content in the URL PARAM tag
2723
2724 2004-09-20  Darin Adler  <darin@apple.com>
2725
2726         Reviewed by Maciej.
2727
2728         - fixed regression from my recent check-in where misspelled words do not get unmarked when moving the caret
2729         - changed CaretPosition to hold a Position instead of a node and offset
2730         - renamed isEmpty to isNull, etc.
2731
2732         * kwq/KWQKHTMLPart.mm:
2733         (KWQKHTMLPart::jumpToSelection): Updated for name changes.
2734         (KWQKHTMLPart::advanceToNextMisspelling): Ditto.
2735         (KWQKHTMLPart::fontForSelection): Ditto.
2736         (KWQKHTMLPart::setDisplaysWithFocusAttributes): Ditto.
2737         (KWQKHTMLPart::markMisspellingsInSelection): Ditto.
2738         (KWQKHTMLPart::updateSpellChecking): Fixed bug by using LeftWordIfOnBoundary.
2739
2740         * khtml/xml/dom_position.h: Updated for name changes.
2741         * khtml/xml/dom_position.cpp:
2742         (DOM::Position::element): Change to not use a separate null check.
2743         (DOM::Position::computedStyle): Updated for name changes.
2744         (DOM::Position::previousCharacterPosition): Ditto.
2745         (DOM::Position::nextCharacterPosition): Ditto.
2746         (DOM::Position::equivalentRangeCompliantPosition): Ditto.
2747         (DOM::Position::equivalentShallowPosition): Ditto.
2748         (DOM::Position::equivalentDeepPosition): Ditto.
2749         (DOM::Position::closestRenderedPosition): Ditto.
2750         (DOM::Position::inRenderedContent): Ditto.
2751         (DOM::Position::inRenderedText): Ditto.
2752         (DOM::Position::isRenderedCharacter): Ditto.
2753         (DOM::Position::rendersInDifferentPosition): Ditto.
2754         (DOM::Position::isFirstRenderedPositionOnLine): Ditto.
2755         (DOM::Position::isLastRenderedPositionOnLine): Ditto.
2756         (DOM::Position::inFirstEditableInRootEditableElement): Ditto.
2757         (DOM::Position::leadingWhitespacePosition): Ditto.
2758         (DOM::Position::trailingWhitespacePosition): Ditto.
2759         (DOM::Position::debugPosition): Ditto.
2760         (DOM::Position::formatForDebugger): Ditto.
2761
2762         * khtml/xml/dom_caretposition.h: Change to use m_position, and change names.
2763         * khtml/xml/dom_caretposition.cpp:
2764         (DOM::CaretPosition::CaretPosition): Remove code to set up m_node.
2765         (DOM::CaretPosition::init): Set m_position directly.
2766         (DOM::CaretPosition::isLastInBlock): Updated for name changes.
2767         (DOM::CaretPosition::next): Set m_position directly.
2768         (DOM::CaretPosition::previous): Set m_position directly.
2769         (DOM::CaretPosition::previousCaretPosition): Updated for name changes.
2770         (DOM::CaretPosition::nextCaretPosition): Ditto.
2771         (DOM::CaretPosition::previousPosition): Ditto.
2772         (DOM::CaretPosition::nextPosition): Ditto.
2773         (DOM::CaretPosition::atStart): Ditto.
2774         (DOM::CaretPosition::atEnd): Ditto.
2775         (DOM::CaretPosition::isCandidate): Ditto.
2776         (DOM::CaretPosition::debugPosition): Ditto.
2777         (DOM::CaretPosition::formatForDebugger): Ditto.
2778         (DOM::startOfWord): Ditto.
2779         (DOM::endOfWord): Ditto.
2780         (DOM::previousParagraphPosition): Ditto.
2781         (DOM::nextParagraphPosition): Ditto.
2782
2783         * khtml/xml/dom_selection.h: Updated names. Added isCaret and isRange.
2784         * khtml/xml/dom_selection.cpp:
2785         (DOM::Selection::modifyMovingRightForward): Updated for name changes.
2786         (DOM::Selection::modifyMovingLeftBackward): Ditto.
2787         (DOM::Selection::modify): Ditto.
2788         (DOM::Selection::expandUsingGranularity): Ditto.
2789         (DOM::Selection::xPosForVerticalArrowNavigation): Ditto.
2790         (DOM::Selection::toRange): Ditto.
2791         (DOM::Selection::layoutCaret): Ditto.
2792         (DOM::Selection::needsCaretRepaint): Ditto.
2793         (DOM::Selection::validate): Ditto.
2794         (DOM::startOfFirstRunAt): Ditto.
2795         (DOM::endOfLastRunAt): Ditto.
2796         (DOM::selectionForLine): Ditto.
2797         (DOM::Selection::formatForDebugger): Ditto.
2798
2799         * khtml/ecma/kjs_window.cpp:
2800         (Selection::get): Updated for name changes.
2801         (Selection::toString): Ditto.
2802         * khtml/editing/htmlediting_impl.cpp:
2803         (khtml::debugPosition): Ditto.
2804         (khtml::StyleChange::init): Ditto.
2805         (khtml::StyleChange::currentlyHasStyle): Ditto.
2806         (khtml::CompositeEditCommandImpl::deleteSelection): Ditto.
2807         (khtml::CompositeEditCommandImpl::deleteUnrenderedText): Ditto.
2808         (khtml::ApplyStyleCommandImpl::doApply): Ditto.
2809         (khtml::DeleteSelectionCommandImpl::doApply): Ditto.
2810         (khtml::InputNewlineCommandImpl::doApply): Ditto.
2811         (khtml::InputTextCommandImpl::prepareForTextInsertion): Ditto.
2812         (khtml::InputTextCommandImpl::input): Ditto.
2813         (khtml::ReplaceSelectionCommandImpl::doApply): Ditto.
2814         (khtml::MoveSelectionCommandImpl::doApply): Ditto.
2815         (khtml::TypingCommandImpl::doApply): Ditto.
2816         (khtml::TypingCommandImpl::markMisspellingsAfterTyping): Ditto.
2817         (khtml::TypingCommandImpl::issueCommandForDeleteKey): Ditto.
2818         * khtml/editing/jsediting.cpp:
2819         (enabledAnySelection): Ditto.
2820         (enabledRangeSelection): Ditto.
2821         * khtml/khtml_part.cpp:
2822         (KHTMLPart::hasSelection): Ditto.
2823         (KHTMLPart::setFocusNodeIfNeeded): Ditto.
2824         (KHTMLPart::selectionLayoutChanged): Ditto.
2825         (KHTMLPart::timerEvent): Ditto.
2826         (KHTMLPart::isPointInsideSelection): Ditto.
2827         (KHTMLPart::selectClosestWordFromMouseEvent): Ditto.
2828         (KHTMLPart::handleMousePressEventTripleClick): Ditto.
2829         (KHTMLPart::handleMousePressEventSingleClick): Ditto.
2830         (KHTMLPart::handleMouseMoveEventSelection): Ditto.
2831         (KHTMLPart::khtmlMouseReleaseEvent): Ditto.
2832         (KHTMLPart::selectionHasStyle): Ditto.
2833         (KHTMLPart::selectionComputedStyle): Ditto.
2834         * khtml/xml/dom_docimpl.cpp: (DocumentImpl::updateSelection): Ditto.
2835         * khtml/xml/dom_positioniterator.cpp:
2836         (DOM::PositionIterator::peekPrevious): Ditto.
2837         (DOM::PositionIterator::peekNext): Ditto.
2838         (DOM::PositionIterator::atStart): Ditto.
2839         (DOM::PositionIterator::atEnd): Ditto.
2840         * khtml/xml/dom_positioniterator.h:
2841         (DOM::PositionIterator::isEmpty): Ditto.
2842         * kwq/KWQRenderTreeDebug.cpp:
2843         (writeSelection): Ditto.
2844         * kwq/WebCoreBridge.mm:
2845         (-[WebCoreBridge editableDOMRangeForPoint:]): Ditto.
2846         (-[WebCoreBridge deleteSelection]): Ditto.
2847         (-[WebCoreBridge ensureCaretVisible]): Ditto.
2848         (-[WebCoreBridge rangeOfCharactersAroundCaret]): Ditto.
2849
2850 2004-09-20  Darin Adler  <darin@apple.com>
2851
2852         Reviewed by Maciej.
2853
2854         - fixed <rdar://problem/3808073> find is broken
2855
2856         * khtml/misc/khtml_text_operations.h: Add m_pastEndNode and change name of m_endNode to
2857         m_endContainer to more accurately reflect its purpose.
2858         * khtml/misc/khtml_text_operations.cpp:
2859         (khtml::TextIterator::TextIterator): Use pastEnd() for end of iteration, and change to
2860         handle bad ranges better: just return an empty iterator instead of raising an exception.
2861         (khtml::TextIterator::advance): Change to use m_pastEndNode to detect the end of iteration.
2862         (khtml::TextIterator::handleTextNode): Update for name change.
2863         (khtml::TextIterator::handleTextBox): Ditto.
2864         (khtml::TextIterator::range): Handle case where m_endContainer is nil.
2865
2866         * khtml/xml/dom2_rangeimpl.cpp:
2867         (DOM::RangeImpl::surroundContents): Use offsetInCharacters.
2868         (DOM::RangeImpl::startNode): Added check for nil start container and use offsetInCharacters.
2869         (DOM::RangeImpl::pastEndNode): Ditto.
2870
2871 2004-09-20  Chris Blumenberg  <cblu@apple.com>
2872
2873         Fixed: <rdar://problem/3781290> REGRESSION (Mail): Crash in ReplaceSelectionCommandImpl attaching file to new message
2874
2875         Reviewed by kocienda.
2876
2877         * khtml/khtml_part.cpp:
2878         (KHTMLPart::setSelection): setFocusNodeIfNeeded now works on the current selection so call setFocusNodeIfNeeded after setting the selection
2879         (KHTMLPart::clearSelection): don't call setFocusNodeIfNeeded with the current selection
2880         (KHTMLPart::setCaretVisible): ditto
2881         (KHTMLPart::setFocusNodeIfNeeded): do nothing if the part isn't focused, work with the current selection
2882         * khtml/khtml_part.h:
2883         * khtml/khtmlpart_p.h:
2884         (KHTMLPartPrivate::KHTMLPartPrivate): added m_isFocused
2885         * kwq/KWQKHTMLPart.h:
2886         * kwq/KWQKHTMLPart.mm:
2887         (KWQKHTMLPart::KWQKHTMLPart): removed _displaysWithFocusAttributes this is replaced by m_isFocused
2888         (KWQKHTMLPart::setSelectionFromNone): new, code factored out from setDisplaysWithFocusAttributes
2889         (KWQKHTMLPart::setDisplaysWithFocusAttributes): call setSelectionFromNone
2890         (KWQKHTMLPart::displaysWithFocusAttributes): now returns m_isFocused
2891         * kwq/WebCoreBridge.h:
2892         * kwq/WebCoreBridge.mm:
2893         (-[WebCoreBridge setSelectionFromNone]): new
2894
2895 2004-09-20  Darin Adler  <darin@apple.com>
2896
2897         Reviewed by Dave.
2898
2899         - fixed nil-deref happening often in Mail when I delete
2900
2901         * khtml/rendering/render_br.cpp: (RenderBR::selectionRect): Check for nil lastLeafChild.
2902         Dave may want to figure out why it's nil and do a different fix later.
2903
2904 2004-09-20  Maciej Stachowiak  <mjs@apple.com>
2905
2906         Reviewed by Richard.
2907
2908         <rdar://problem/3672101> HANG: typing into login field at dws-direkt.deutsche-bank.de (infinite recursion)
2909         
2910         * khtml/xml/dom_docimpl.cpp:
2911         (DocumentImpl::defaultEventHandler): Copy the list of handlers
2912         before firing any of them, in case a handler affects the list of
2913         event handlers.
2914
2915 2004-09-20  Chris Blumenberg  <cblu@apple.com>
2916
2917         Fixed:
2918         <rdar://problem/3429921> obey PARAM tags inside of OBJECT tags when necessary
2919         <rdar://problem/3515685> Object tag in Java 1.4.1 / Safari doesn't recognize params
2920
2921         Reviewed by darin.
2922
2923         * khtml/khtml_part.cpp:
2924         (KHTMLPart::requestFrame): take 2 parameter arrays rather than 1 which will have to be parsed
2925         (KHTMLPart::requestObject): ditto
2926         * khtml/khtml_part.h:
2927         * khtml/khtmlpart_p.h:
2928         * khtml/rendering/render_frames.cpp:
2929         (RenderPartObject::updateWidget): use PARAM tags when there is no EMBED specified
2930         * kwq/KWQKHTMLPart.h:
2931         * kwq/KWQKHTMLPart.mm:
2932         (KWQKHTMLPart::createPart): call renamed bridge method
2933         * kwq/KWQKJavaAppletWidget.mm:
2934         (KJavaAppletWidget::KJavaAppletWidget): ditto
2935         * kwq/KWQStringList.h:
2936         * kwq/KWQStringList.mm:
2937         (QStringList::getNSArray): return a const array
2938         * kwq/WebCoreBridge.h:
2939         * kwq/WebCoreBridge.mm:
2940         (-[WebCoreBridge URLWithAttributeString:]): renamed to match API
2941
2942 2004-09-20  Darin Adler  <darin@apple.com>
2943
2944         Reviewed by Ken.
2945
2946         - fixed <rdar://problem/3655360> REGRESSION (Mail): Ctrl-V emacs key binding, -pageDown: method, unimplemented (and pageUp, and selection-modifying versions)
2947         - fixed <rdar://problem/3735055> REGRESSION (Mail): WebCore double click rules treat style change as a boundary
2948         - fixed <rdar://problem/3789939> REGRESSION (Mail): double-clicking on border whitespace selects space plus word before/after
2949         - fixed <rdar://problem/3792138> REGRESSION (Mail): Spell checker doesn't check current selected word
2950         - fixed <rdar://problem/3806604> REGRESSION (164): Triple-click sometimes selects extra characters
2951         - fixed <rdar://problem/3806996> REGRESSION (125-162): Triple-click in <pre> tagged text behaves oddly (leuf.net)
2952
2953         * khtml/xml/dom_caretposition.h: Added a lot of new functions. Removed implicit conversion operator
2954         that converts from CaretPosition to Position.
2955         * khtml/xml/dom_caretposition.cpp:
2956         (DOM::CaretPosition::CaretPosition): Change to call deepEquivalent so it works without the implicit
2957         Position conversion operator.
2958         (DOM::CaretPosition::operator=): Ditto.
2959         (DOM::CaretPosition::next): Ditto.
2960         (DOM::CaretPosition::previous): Ditto.
2961         (DOM::CaretPosition::setPosition): Added an assertion.
2962         (DOM::start): Added.
2963         (DOM::end): Added.
2964         (DOM::setStart): Added.
2965         (DOM::setEnd): Added.
2966         (DOM::previousWordBoundary): Added.
2967         (DOM::nextWordBoundary): Added.
2968         (DOM::startWordBoundary): Added.
2969         (DOM::startOfWord): Added.
2970         (DOM::endWordBoundary): Added.
2971         (DOM::endOfWord): Added.
2972         (DOM::previousWordPositionBoundary): Added.
2973         (DOM::previousWordPosition): Added.
2974         (DOM::nextWordPositionBoundary): Added.
2975         (DOM::nextWordPosition): Added.
2976         (DOM::previousLinePosition): Added.
2977         (DOM::nextLinePosition): Added.
2978         (DOM::startOfParagraph): Changed function name.
2979         (DOM::endOfParagraph): Changed function name. Fixed code in includeLineBreak to work around
2980         the CaretPosition constructor issue for <br>, pass the right parameter for the block flow case,
2981         and handle <pre> properly.
2982         (DOM::inSameParagraph): Added.
2983         (DOM::previousParagraphPosition): Added.
2984         (DOM::nextParagraphPosition): Added.
2985
2986         * khtml/xml/dom_position.h: Removed a number of functions no longer used; also made some private.
2987         * khtml/xml/dom_position.cpp: Removed a number of functions no longer used.
2988
2989         * khtml/xml/dom_selection.h: Replaced DOCUMENT with DOCUMENT_BOUNDARY. Added overloads of lots
2990         of functions that take CaretPosition directly. Added overload of modify that takes a parameter
2991         for vertical distance to help implement pageDown: and friends. Replaced getRepaintRect with
2992         two new functions named caretRect and caretRepaintRect. Removed nodeIsBeforeNode.
2993         * khtml/xml/dom_selection.cpp:
2994         (DOM::Selection::Selection): Added constructor that takes two CaretPosition objects.
2995         (DOM::Selection::setModifyBias): Added. Helper function.
2996         (DOM::Selection::modifyExtendingRightForward): Don't set modify bias, since that's now the caller's
2997         responsibility. Reimplement WORD and LINE in terms of new CaretPosition functions. Implement PARAGRAPH
2998         and change PARAGRAPH_BOUNDARY to use CaretPosition function by its new name.
2999         (DOM::Selection::modifyMovingRightForward): Ditto.
3000         (DOM::Selection::modifyExtendingLeftBackward): Ditto.
3001         (DOM::Selection::modifyMovingLeftBackward): Ditto.
3002         (DOM::Selection::modify): Call setModifyBias, and use a switch statement instead of if.
3003         (DOM::caretY): Added. Helper for the new modify function that implements moving a pixel distance,
3004         used by pageDown: and friends.
3005         (DOM::Selection::modify): Added.
3006         (DOM::Selection::toRange): Use RangeImpl::compareBoundaryPoints instead of nodeIsBeforeNode.
3007         (DOM::Selection::caretRect): Added. Replaces getRepaintRect, but does not add slop.
3008         (DOM::Selection::caretRepaintRect): Added. Replaces getRepaintRect; still adds slop.
3009         (DOM::Selection::needsCaretRepaint): Call caretRepaintRect.
3010         (DOM::Selection::validate): Use RangeImpl::compareBoundaryPoints instead of nodeIsBeforeNode.
3011         Reimplement WORD to use new CaretPosition functions; this fixes the double-clicking problems.
3012         Change paragraph calls to use new names.
3013
3014         * ForwardingHeaders/dom/dom_position.h: Removed. This was in the wrong location.
3015         * khtml/editing/htmlediting.cpp: Fixed include that said "dom/dom_position.h".
3016         * khtml/editing/htmlediting_impl.cpp: Fixed include that said "dom/dom_position.h".
3017         (khtml::TypingCommandImpl::markMisspellingsAfterTyping): Rewrote this to use the new CaretPosition
3018         functions instead of the old Position functions.
3019
3020         * khtml/misc/helper.h: Added const to character pointer parameter. Also put invertedColor inside
3021         an !APPLE_CHANGES since it doesn't do us any good.
3022         * khtml/misc/helper.cpp:
3023         (khtml::findWordBoundary): Added const to character pointer parameter.
3024         (khtml::nextWordFromIndex): Ditto.
3025
3026         * kwq/KWQTextUtilities.h: Change parameters to const.
3027         * kwq/KWQTextUtilities.cpp: (KWQFindWordBoundary): Change parameter to const.
3028         * kwq/KWQTextUtilities.mm: (KWQFindNextWordFromIndex): Change parameter to const.
3029
3030         * khtml/css/cssstyleselector.cpp: Disable code that uses invertedColor when APPLE_CHANGES, since it
3031         won't work for us.
3032
3033         * khtml/rendering/render_canvas.cpp: (RenderCanvas::setSelection): Added checks for selection end
3034         so we can set the selection end to nodes that are not leaf nodes and it will still work. Also took
3035         out bogus firstChild/lastChild loops for the same reason.
3036
3037         * kwq/KWQKHTMLPart.h: Add "start before selection" flag to advanceToNextMisspelling.
3038         Needed to fix bug with spell checking.
3039         * kwq/KWQKHTMLPart.mm:
3040         (KWQKHTMLPart::findString): Changed to use CaretPosition.
3041         (KWQKHTMLPart::advanceToNextMisspelling): Added code to handle "start before selection" flag
3042         and changed to use CaretPosition and new helper functions.
3043         (KWQKHTMLPart::markMisspellingsInSelection): More changes to use CaretPosition.
3044         (KWQKHTMLPart::updateSpellChecking): Ditto.
3045
3046         * kwq/WebCoreBridge.h: Replaced WebSelectByDocument with WebSelectToDocumentBoundary.
3047         Added advanceToNextMisspellingStartingJustBeforeSelection,
3048         rangeByAlteringCurrentSelection:verticalDistance:, and
3049         alterCurrentSelection:verticalDistance:.
3050
3051         * kwq/WebCoreBridge.mm:
3052         (-[WebCoreBridge advanceToNextMisspellingStartingJustBeforeSelection]): Added.
3053         (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): Added case for selecting by
3054         paragraph to save X position.
3055         (-[WebCoreBridge rangeByAlteringCurrentSelection:verticalDistance:]): Added.
3056         (-[WebCoreBridge alterCurrentSelection:verticalDistance:]): Added.
3057         (-[WebCoreBridge ensureCaretVisible]): Call caretRect instead of getRepaintRect.
3058
3059 2004-09-20  Darin Adler  <darin@apple.com>
3060
3061         Reviewed by Ken.
3062
3063         - cleaned up DOM::RangeImpl a little so compareBoundaryPoints can be used outside the class
3064
3065         * khtml/xml/dom2_rangeimpl.h: Added const to many of the member functions and made the
3066         compareBoundaryPoints that works on parameters be a const member function.
3067         * khtml/xml/dom2_rangeimpl.cpp:
3068         (DOM::RangeImpl::commonAncestorContainer): Added const.
3069         (DOM::RangeImpl::compareBoundaryPoints): Added const.
3070         (DOM::RangeImpl::boundaryPointsValid): Added const, and wrote cleaner version.
3071         (DOM::RangeImpl::insertNode): Simplified by calling containedByReadOnly.
3072         (DOM::RangeImpl::toString): Added const.
3073         (DOM::RangeImpl::toHTML): Added const.
3074         (DOM::RangeImpl::createContextualFragment): Added const.
3075         (DOM::RangeImpl::cloneRange): Added const.
3076         (DOM::RangeImpl::surroundContents): Simplified by calling containedByReadOnly.
3077
3078 2004-09-20  Darin Adler  <darin@apple.com>
3079
3080         Reviewed by Ken.
3081
3082         - fixed <rdar://problem/3806990> REGRESSION (125-162): Crash on Select All at http://leuf.net/cgi/wikidn?PerlConvertEolScript
3083
3084         * khtml/rendering/render_replaced.cpp: (RenderWidget::setSelectionState): Added nil check for the
3085         widget.
3086
3087 2004-09-20  Darin Adler  <darin@apple.com>
3088
3089         Reviewed by Ken.
3090
3091         - fixed <rdar://problem/3773740> calling addEventListener on a frame that hasn't loaded yet crashes
3092
3093         * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Add nil checks for the document.
3094         The nil check prevents the crash but there's still a bug here; I filed 3807059 about that.
3095
3096 2004-09-20  Darin Adler  <darin@apple.com>
3097
3098         Reviewed by Ken.
3099
3100         - fixed problem where up and down arrow keys are not preserving X position
3101
3102         * khtml/khtml_part.cpp:
3103         (KHTMLPart::selectionLayoutChanged): Moved code to clear m_xPosForVerticalArrowNavigation out of here.
3104         (KHTMLPart::notifySelectionChanged): Moved it into here.
3105
3106 2004-09-18  Darin Adler  <darin@apple.com>
3107
3108         Reviewed by Maciej.
3109
3110         - fixed <rdar://problem/3805627> -[DOMRange _text] sometimes includes all text to the end of the document for certain ranges
3111
3112         * khtml/misc/khtml_text_operations.cpp: (khtml::TextIterator::advance):
3113         Correctly handle the case when we are already on m_endNode. The concept here is that
3114         m_endNode is a node you must never "leave" when iterating.
3115
3116 === Safari-164 ===
3117
3118 2004-09-17  Ken Kocienda  <kocienda@apple.com>
3119
3120         * layout-tests/editing/selection/unrendered-004-expected.txt: Updated expected results.
3121
3122 2004-09-17  Ken Kocienda  <kocienda@apple.com>
3123
3124         Reviewed by Darin
3125
3126         Fix for this bug:
3127         
3128         <rdar://problem/3780245> REGRESSION (Mail): some lines are skipped when doing arrow navigation
3129
3130         * khtml/xml/dom_position.cpp:
3131         (DOM::Position::previousLinePosition): One-line fix. Make sure that BRs at the end of blocks
3132         are not skipped.
3133
3134 2004-09-17  Ken Kocienda  <kocienda@apple.com>
3135
3136         Reviewed by Darin
3137
3138         Fix for this bug:
3139         
3140         <rdar://problem/3805594> REGRESSION (Mail): Second return key stroke does not work when first was in blockquote
3141
3142         * khtml/xml/dom_selection.cpp:
3143         (DOM::Selection::toRange): Code to convert caret positions moved the position upstream
3144         before making a range-compliant position, but erroneously would allow the position
3145         to cross blocks. Now it will no longer do so.
3146
3147 2004-09-16  Richard Williamson   <rjw@apple.com>
3148
3149         Part 1 of the feature requested in
3150         <rdar://problem/3752791> Dashboard: Need a better solution for control regions
3151
3152         This patch implements the CSS parsing necessary for dashboard regions.  
3153         Here's an example of the syntax we support:
3154
3155         <style>
3156         #aDiv {
3157             -apple-dashboard-region:
3158                 dashboard-region-circle(control 0 0 80 0)
3159                 dashboard-region-rectangle(control,20,0,20,0)
3160                 dashboard-region-circle(control 80 0 0 0); 
3161         }
3162         </style>
3163
3164
3165         Part 2 will determine the appropriate regions.
3166
3167         Reviewed by Chris.
3168
3169         * khtml/css/css_valueimpl.cpp:
3170         (CSSPrimitiveValueImpl::CSSPrimitiveValueImpl):
3171         * khtml/css/css_valueimpl.h:
3172         (DOM::CSSPrimitiveValueImpl::):
3173         (DOM::DashboardRegionImpl::DashboardRegionImpl):
3174         (DOM::DashboardRegionImpl::~DashboardRegionImpl):
3175         (DOM::DashboardRegionImpl::setNext):
3176         (DOM::DashboardRegionImpl::setLabel):
3177         * khtml/css/cssparser.cpp:
3178         (CSSParser::parseValue):
3179         (CSSParser::parseContent):
3180         (skipCommaInDashboardRegion):
3181         (CSSParser::parseDashboardRegions):
3182         * khtml/css/cssparser.h:
3183         * khtml/css/cssproperties.c:
3184         (hash_prop):
3185         (findProp):
3186         * khtml/css/cssproperties.h:
3187         * khtml/css/cssproperties.in:
3188         * khtml/dom/css_value.h:
3189         (DOM::CSSPrimitiveValue::):
3190
3191 2004-09-16  Darin Adler  <darin@apple.com>
3192
3193         - fixed caret-drawing regression from my last patch
3194
3195         * khtml/xml/dom_selection.cpp:
3196         (DOM::Selection::xPosForVerticalArrowNavigation): Pass false, meaning "vertical line caret"
3197         rather than true meaning "big box for overtyping".
3198         (DOM::Selection::layoutCaret): Ditto.
3199
3200 2004-09-16  Darin Adler  <darin@apple.com>
3201
3202         Reviewed by Ken.
3203
3204         - fixed <rdar://problem/3803280> crash in selectAll on page with no contents
3205
3206         * khtml/khtml_part.cpp: (KHTMLPart::selectAll): Handle case of 0 for documentElement().
3207         * khtml/xml/dom_position.cpp:
3208         (DOM::Position::previousWordPosition): Ditto.
3209         (DOM::Position::nextWordPosition): Ditto.
3210
3211         - cleaned up caret code
3212         - changed DOM::Selection to use CaretPosition more
3213
3214         * khtml/rendering/render_box.cpp: (RenderBox::caretRect): Change to use empty rectangles
3215         instead of an X value of -1 to mean no rectangle.
3216         * khtml/rendering/render_image.cpp: (RenderImage::selectionRect): Take advantage of the
3217         fixed QRect constructor.
3218         * khtml/rendering/render_object.cpp: (RenderObject::caretRect): Change to use empty
3219         rectangle instead of an X value of -1 to mean no rectangle.
3220         * khtml/rendering/render_text.cpp: (RenderText::caretRect): Cleaned up, and changed to use
3221         an empty rectangle instead of an X value of -1 to mean no rectangle.
3222
3223         * khtml/xml/dom_caretposition.h: Made conversion from Position to CaretPosition something you
3224         can do implicitly, since it's an unambiguous conversion. Conversion in the other direction
3225         needs to be done explicitly. Moved EIncludeLineBreak here, and added startParagraphBoundary
3226         and endParagraphBoundary functions.
3227         * khtml/xml/dom_caretposition.cpp:
3228         (DOM::startParagraphBoundary): Added. Replaces, and made from, member function of DOM::Position.
3229         (DOM::endParagraphBoundary): Ditto.
3230
3231         * khtml/xml/dom_position.h: Removed EIncludeLineBreak and startParagraphBoundary and
3232         endParagraphBoundary.
3233         * khtml/xml/dom_position.cpp: Removed startParagraphBoundary and endParagraphBoundary.
3234
3235         * khtml/xml/dom_selection.h: Use CaretPosition instead of Position in a few places.
3236         Use a QRect for the caret rect. Change nodeIsBeforeNode to be a static member function.
3237         * khtml/xml/dom_selection.cpp:
3238         (DOM::Selection::Selection): Change caret to store QRect instead of 3 separate fields.
3239         (DOM::Selection::init): Ditto.
3240         (DOM::Selection::operator=): Ditto.
3241         (DOM::Selection::modifyExtendingRightForward): Change to use CaretPosition instead of Position.
3242         Check for 0.
3243         (DOM::Selection::modifyMovingRightForward): Ditto. Check for 0.
3244         (DOM::Selection::modifyExtendingLeftBackward): Ditto.
3245         (DOM::Selection::modifyMovingLeftBackward): Ditto.
3246         (DOM::Selection::modify): Ditto.
3247         (DOM::Selection::layoutCaret): Change to use a QRect for the caret rect, and use an empty
3248         one to mean no rectangle.
3249         (DOM::Selection::getRepaintRect): Ditto.
3250         (DOM::Selection::paintCaret): Ditto.
3251         (DOM::Selection::validate): Change to use CaretPosition instead of Position. Also fixed
3252         PARAGRAPH_BOUNDARY, which was broken and doing the same thing as PARAGRAPH before, but
3253         it's not really used so that didn't matter. Check for 0.
3254         (DOM::Selection::nodeIsBeforeNode): Tightened up a bit and added some FIXMEs. This function
3255         has a number of problems and should probably be discarded in favor of the DOMStringImpl
3256         method that does the same thing.
3257
3258 2004-09-16  Ken Kocienda  <kocienda@apple.com>
3259
3260         Reviewed by Hyatt
3261         
3262         Fix for this bug:
3263         
3264         <rdar://problem/3787168> REGRESSION (Mail): Deleting text from the beginning of a quoted range removes the quoting from the rest
3265
3266         * khtml/editing/htmlediting_impl.cpp:
3267         (khtml::DeleteSelectionCommandImpl::moveNodesAfterNode): Only move the text nodes (and their siblings) when
3268         doing this move between blocks. This serves to mimic NSText behavior very well.
3269
3270 2004-09-15  Darin Adler  <darin@apple.com>
3271
3272         - fixed Panther build
3273
3274         * kwq/KWQAccObject.mm: (-[KWQAccObject accessibilityActionDescription:]): Fixed backwards
3275         check in #if that was compiling the code on Panther only rather than Tiger only.
3276
3277 2004-09-15  Darin Adler  <darin@apple.com>
3278
3279         Reviewed by John.
3280
3281         - fixed lockFocus exception I observed; perhaps not a real issue in the field due to exception blocking
3282
3283         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::imageFromRect): Put most of the function inside a
3284         big if statement to avoid the exception we get from lockFocus otherwise.
3285
3286 2004-09-15  Darin Adler  <darin@apple.com>
3287
3288         Reviewed by Dave.
3289
3290         - fixed <rdar://problem/3786467> REGRESSION (Mail): Reproducible crash replying to an HTML message when your preference is for plain text composing.
3291
3292         * khtml/rendering/render_block.h: Remove removeChildrenFromLineBoxes.
3293         * khtml/rendering/render_block.cpp: (khtml::RenderBlock::removeChild): Remove calls
3294         to removeChildrenFromLineBoxes which was the old way of working around this.
3295         * khtml/rendering/render_flow.cpp: (RenderFlow::detach): Add comments and code to handle
3296         removing children from line boxes we are about to delete.
3297
3298 2004-09-15  Richard Williamson   <rjw@apple.com>
3299
3300         Fixed <rdar://problem/3781561> REGRESSION (Mail): typing in Mail became suddenly really sluggish (substitute font code)
3301
3302         A DocumentMarker may begin before the InLineBox that includes
3303         it.  Ensure that we correctly handle that case.  The paintMarker()
3304         method and code that calls it could do with some cleanup to
3305         make it clearer how all the cases are handled, i.e. marker
3306         within box, or intersecting beginning or end of box.
3307
3308         Reviewed by Darin.
3309
3310         * khtml/rendering/render_text.cpp:
3311         (InlineTextBox::paintMarker):  Minimal change to ensure that we
3312         handle the case of marker starting before box.
3313
3314 2004-09-15  Darin Adler  <darin@apple.com>
3315
3316         Reviewed by John.
3317
3318         - get rid of some of the localizable strings in here; we still have to figure out
3319           how we're going to localize the last few role descriptions
3320
3321         * kwq/KWQAccObject.mm:
3322         (-[KWQAccObject roleDescription]): Use NSAccessibilityRoleDescription for most
3323         descriptions instead of a hard-coded string (inside the UI_STRING placeholder).
3324         (-[KWQAccObject accessibilityActionDescription:]): Same thing, with NSAccessibilityActionDescription.
3325
3326 2004-09-15  Darin Adler  <darin@apple.com>
3327
3328         Reviewed by John.
3329
3330         - did some QRect-related changes to facilitate later bug fixing
3331
3332         * kwq/KWQPainter.h: Added fillRect overload that takes QRect to match the real Qt one.
3333         * kwq/KWQPainter.mm: (QPainter::fillRect):&n