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