2d49ade8cfcb86d5ff0b9e6d00489c5478809f17
[WebKit-https.git] / WebCore / ChangeLog-2005-12-19
1 2005-11-03  David Hyatt  <hyatt@apple.com>
2
3         Cleanup of bidi.cpp.  This is bug 5532.  I merged it nearly as is, although I
4         did one additional rename of my own (BidiIterator's "par" -> "block") and
5         I did not merge the * changes, since that particular style guideline is 
6         "in dispute." :)
7         
8         Reviewed by darin
9
10         * khtml/rendering/bidi.cpp:
11         (khtml::BidiIterator::BidiIterator):
12         (khtml::BidiIterator::pos):
13         (khtml::BidiState::BidiState):
14         (khtml::getBPMWidth):
15         (khtml::BidiContext::BidiContext):
16         (khtml::BidiContext::~BidiContext):
17         (khtml::BidiContext::deref):
18         (khtml::operator==):
19         (khtml::operator!=):
20         (khtml::bidiNext):
21         (khtml::bidiFirst):
22         (khtml::BidiIterator::increment):
23         (khtml::BidiIterator::atEnd):
24         (khtml::BidiIterator::current):
25         (khtml::chopMidpointsAt):
26         (khtml::checkMidpoints):
27         (khtml::appendRunsForObject):
28         (khtml::appendRun):
29         (khtml::embed):
30         (khtml::RenderBlock::constructLine):
31         (khtml::RenderBlock::tabWidth):
32         (khtml::RenderBlock::computeHorizontalPositionsForLine):
33         (khtml::RenderBlock::bidiReorderLine):
34         (khtml::buildCompactRuns):
35         (khtml::RenderBlock::layoutInlineChildren):
36         (khtml::RenderBlock::determineStartPosition):
37         (khtml::RenderBlock::skipWhitespace):
38         (khtml::RenderBlock::findNextLineBreak):
39
40 2005-11-03  David Hyatt  <hyatt@apple.com>
41
42         Make pre-wrap collapse away spaces at the start of a line.  There are
43         still several bugs, namely with overflow and with selection.  This is bugzilla
44         bug 5593.
45         
46         Reviewed by adele
47
48         fast/text/whitespace/pre-wrap.html
49
50         * khtml/rendering/bidi.cpp:
51         (khtml::skipNonBreakingSpace):
52         (khtml::shouldCollapseWhiteSpace):
53         (khtml::RenderBlock::skipWhitespace):
54         * khtml/rendering/render_block.h:
55
56 2005-11-03  Adele Peterson  <adele@apple.com>
57
58         Reviewed by Darin.
59
60         * khtml/rendering/render_layer.cpp:
61         (khtml::): Made global ScrollAlignment members const
62         (khtml::RenderLayer::scrollRectToVisible): Changed ScrollAlignment parameters to const ScrollAlignment&
63         (khtml::RenderLayer::getRectToExpose): ditto.
64         * khtml/rendering/render_layer.h:
65         (khtml::RenderLayer::): removed typedefs
66         (khtml::RenderLayer::getVisibleBehavior): Made this static.
67         (khtml::RenderLayer::getPartialBehavior): ditto.
68         (khtml::RenderLayer::getHiddenBehavior): ditto.
69
70 2005-11-03  Adele Peterson  <adele@apple.com>
71
72         Reviewed by Hyatt.
73
74         Clean up of layer scrolling code.  Now we can clearly define what to do if a rectangle is fully visible, partially visible, or hidden.
75         This also fixes a bug with the previous implementation where nested layers/frames would get passed a rect that was too large.
76
77         Added fast/overflow/scrollRevealButton.html
78
79         * khtml/rendering/render_layer.h: (khtml::RenderLayer::): 
80         Added ScrollBehavior enum, ScrollAlignment struct, and ScrollAlignment static members
81         to describe specific scrolling behaviors depending on how visible the rectangle is.
82         In the future, we can add other statics to easily describe desired behaviors.
83         * khtml/rendering/render_layer.cpp:
84         (khtml::): initialize ScrollAlignment static members: 
85         alignCenterIfNeeded, alignToEdgeIfNeeded, alignCenterAlways, alignTopAlways, alignBottomAlways
86         (khtml::RenderLayer::scrollRectToVisible):
87         alignCenterIfNeeded is the default behavior for both directions.
88         Pass the original rect (adjusted if scrolling has occurred) when recursively calling this function.
89         (khtml::RenderLayer::getRectToExpose): Adjusted for new ScrollAlignment parameters.
90         * khtml/khtml_part.cpp:
91         (KHTMLPart::gotoAnchor): Use the node's rect to determine where to scroll.  
92         We used to just use the origin, but this helps us match other browsers better.
93         (KHTMLPart::setActiveNode): Removed scrolling code, since this is now also done in setFocusNode
94         * khtml/xml/dom_elementimpl.cpp: (ElementImpl::scrollIntoView): Use new ScrollAlignment values to describe scrolling behavior.
95         * kwq/KWQKHTMLPart.mm:
96         (KWQKHTMLPart::nextKeyViewInFrame): Removed scrolling code, since this is now also done in setFocusNode
97         (KWQKHTMLPart::centerSelectionInVisibleArea): Use new ScrollAlignment values to describe scrolling behavior.
98         * kwq/WebCoreBridge.mm: (-[WebCoreBridge ensureSelectionVisible]): ditto.
99         * kwq/KWQScrollView.h: Removed ensureRectVisible, since we no longer use this.
100         * kwq/KWQScrollView.mm: ditto.
101         * khtml/khtmlview.cpp:
102         (KHTMLView::doAutoScroll): Removed unnecessary nil checks for enclosingLayer
103         (KHTMLView::focusNextPrevNode): ditto.
104
105 2005-11-02  David Harrison  <harrison@apple.com>
106
107         Reviewed by Justin.
108
109         Tests added in editing/inserting.
110         
111         <rdar://problem/4017861> in reply, extra line is inserted after pressing return on blank quoted line
112         Also, did some minor cleanup.
113
114         * khtml/editing/break_blockquote_command.cpp:
115         (khtml::BreakBlockquoteCommand::BreakBlockquoteCommand):
116         (khtml::BreakBlockquoteCommand::doApply):
117         Make sure not to clone parent of skipped BR unless there are siblings to move over.
118         * khtml/editing/break_blockquote_command.h:
119         * khtml/editing/jsediting.cpp:
120
121 2005-11-02  Vicki Murley  <vicki@apple.com>
122
123         Reviewed by Darin.
124  
125         - fix <rdar://problem/4303587> REGRESSION (TOT): Scrollwheel doesn't work on frameset pages (5450)
126
127         * kwq/KWQKHTMLPart.h:
128         * kwq/KWQKHTMLPart.mm:
129         (KWQKHTMLPart::wheelEvent): set _currentEvent to the wheel event
130         (KWQKHTMLPart::passWheelEventToChildWidget): New.  Pass the event to the child widget, if we
131         haven't already handled the event
132         * khtml/khtmlview.cpp:
133         (KHTMLView::viewportWheelEvent): add passWheelEventToChildWidget check, and accept the event if
134         we're passing to the child widget
135
136 2005-11-02  David Hyatt  <hyatt@apple.com>
137
138         Fix for 5587, implement pre-wrap and pre-line white-space values.
139         
140         Reviewed by mjs
141
142         Tests Added in fast/text/whitespace
143         
144         * khtml/css/css_computedstyle.cpp:
145         (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
146         * khtml/css/cssparser.cpp:
147         (CSSParser::parseValue):
148         * khtml/css/cssstyleselector.cpp:
149         (khtml::CSSStyleSelector::applyProperty):
150         * khtml/css/cssvalues.in:
151         * khtml/css/html4.css:
152         * khtml/ecma/kjs_html.cpp:
153         (KJS::HTMLElement::preGetter):
154         (KJS::HTMLElement::preSetter):
155         * khtml/ecma/kjs_html.h:
156         (KJS::HTMLElement::):
157         * khtml/editing/visible_text.cpp:
158         (khtml::TextIterator::handleTextNode):
159         * khtml/editing/visible_units.cpp:
160         (khtml::startOfParagraph):
161         (khtml::endOfParagraph):
162         * khtml/html/html_blockimpl.cpp:
163         (HTMLPreElementImpl::mapToEntry):
164         (HTMLPreElementImpl::parseMappedAttribute):
165         (HTMLPreElementImpl::wrap):
166         (HTMLPreElementImpl::setWrap):
167         * khtml/html/html_blockimpl.h:
168         * khtml/rendering/bidi.cpp:
169         (khtml::checkMidpoints):
170         (khtml::RenderBlock::computeHorizontalPositionsForLine):
171         (khtml::RenderBlock::layoutInlineChildren):
172         (khtml::RenderBlock::skipNonBreakingSpace):
173         (khtml::RenderBlock::skipWhitespace):
174         (khtml::RenderBlock::findNextLineBreak):
175         * khtml/rendering/render_block.cpp:
176         (khtml:::RenderFlow):
177         (khtml::RenderBlock::setStyle):
178         (khtml::RenderBlock::calcMinMaxWidth):
179         (khtml::stripTrailingSpace):
180         (khtml::RenderBlock::calcInlineMinMaxWidth):
181         (khtml::RenderBlock::dump):
182         * khtml/rendering/render_block.h:
183         * khtml/rendering/render_layer.h:
184         (khtml::):
185         * khtml/rendering/render_line.cpp:
186         (khtml::shouldDrawDecoration):
187         * khtml/rendering/render_object.cpp:
188         (RenderObject::tabWidth):
189         * khtml/rendering/render_style.h:
190         (khtml::):
191         (khtml::RenderStyle::autoWrap):
192         (khtml::RenderStyle::preserveNewline):
193         (khtml::RenderStyle::collapseWhiteSpace):
194         (khtml::RenderStyle::isCollapsibleWhiteSpace):
195         (khtml::RenderStyle::breakOnlyAfterWhiteSpace):
196         * khtml/rendering/render_table.cpp:
197         (RenderTableCell::calcMinMaxWidth):
198         * khtml/rendering/render_text.cpp:
199         (RenderText::caretRect):
200         (RenderText::trimmedMinMaxWidth):
201         (RenderText::calcMinMaxWidth):
202         (RenderText::width):
203         * khtml/xml/dom_elementimpl.h:
204         (DOM::):
205         * khtml/xml/dom_textimpl.cpp:
206         (TextImpl::rendererIsNeeded):
207         * kwq/KWQKHTMLPart.mm:
208         (KWQKHTMLPart::attributedString):
209
210 2005-11-01  David Hyatt  <hyatt@apple.com>
211
212         Fix for bug 5580, slashdot regression with percentage height
213         blocks.
214         
215         Reviewed by darin
216
217         Added fast/block/basic/021.html
218         
219         * khtml/rendering/render_box.cpp:
220         (RenderBox::calcPercentageHeight):
221
222 2005-11-01  Justin Garcia  <justin.garcia@apple.com>
223
224         Reviewed by harrison
225         
226         Tweaked my previous fix for caret movement while scrolling.
227
228         * khtml/editing/SelectionController.cpp:
229         (khtml::SelectionController::SelectionController): Forgot to copy m_caretPositionOnLayout.
230         (khtml::SelectionController::operator=): Ditto.
231         (khtml::SelectionController::layout): Initialize m_caretPositionOnLayout to a dummy value when the selection isNone.
232         * khtml/editing/SelectionController.h: Tweaked my comment.
233
234 2005-11-01  Justin Garcia  <justin.garcia@apple.com>
235
236         Reviewed by darin
237         
238         Fixes <rdar://problem/4074536> Seed: Mail crash adjusting quote level - KHTMLPart::computeAndSetTypingStyle
239         
240         No test cases added, requires Mail
241
242         * kwq/WebCoreBridge.mm:
243         (-[WebCoreBridge typingStyle]):
244         Crashes were happening after a style was merged with itself.  Mail was doing a setTypingStyle
245         with a pointer to our internal typing style.  Fix is to only hand out copies of our typingStyle.
246
247 2005-11-01  Justin Garcia  <justin.garcia@apple.com>
248
249         Reviewed by harrison
250         
251         Fixed <rdar://problem/3690705> caret does not move when scrolling overflow: auto editable area
252
253         * manual-tests/caretScrolling.html: Added.
254
255         * khtml/editing/SelectionController.cpp:
256         (khtml::SelectionController::SelectionController): Removed the unused expectedVisibleRect
257         (khtml::SelectionController::operator=): Ditto.
258         (khtml::SelectionController::layout): Save the caret's absolute position on layout.
259         (khtml::SelectionController::caretRect): Adjust the returned caret rect for offset due to scrolling since the last layout.
260         (khtml::SelectionController::paintCaret):
261         * khtml/editing/SelectionController.h:
262         * kwq/KWQKHTMLPart.mm:
263         (KWQKHTMLPart::nextKeyViewInFrame): Small tweak to a previous change.
264         * kwq/KWQRect.h:
265         (QRect::moveTopLeft): Added.
266
267 2005-11-01  Mitz Pettel  <opendarwin.org@mitzpettel.com>
268
269         Reviewed by Dave Hyatt.
270         Commited by Tim Hatcher.
271
272         Fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=5256
273         Relayout during load causes duplicate plugin part.
274
275         This was a problem with <OBJECT>s that contain an <EMBED>, if 
276         layout happened in the middle of the OBJECT but before the EMBED.
277
278         No test case added, requires manual testing. 
279
280         * khtml/html/html_objectimpl.cpp:
281         (DOM::HTMLObjectElementImpl::HTMLObjectElementImpl):
282         (DOM::HTMLObjectElementImpl::closeRenderer):
283         (DOM::HTMLObjectElementImpl::setComplete):
284         * khtml/html/html_objectimpl.h:
285         (DOM::HTMLObjectElementImpl::isComplete):
286         * khtml/html/htmlfactory.cpp:
287         (DOM::objectConstructor):
288         * khtml/rendering/render_frames.cpp:
289         (RenderPartObject::updateWidget):
290
291 2005-11-01  Alexey Proskuryakov  <ap@nypop.com>
292
293         Reviewed by Dave Hyatt.
294         Commited by Tim Hatcher.
295
296         Fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=5541
297
298         HTMLNames constants are not yet initialized at Safari startup,
299         when bookmarks are imported, which caused a crash in Decoder::decode().
300
301         * kwq/WebCoreEncodings.mm:
302         (+[WebCoreEncodings decodeData:]):
303
304 2005-11-01  John Sullivan  <sullivan@apple.com>
305
306         Change by Alexey Proskuryakov, reviewed by Darin Adler.
307
308         * kwq/KWQKURL.mm:
309         (encodeRelativeString):
310         switched to use fastStrdup(), we can't use strdup because we
311         need to use fastFree(), not regular free()
312
313 2005-11-01  Anders Carlsson  <andersca@mac.com>
314
315         Reviewed by Darin.
316
317         * khtml/ecma/kjs_dom.cpp:
318         (KJS::DOMNode::getValueProperty):
319         (KJS::DOMNode::putValueProperty):
320         * khtml/ecma/kjs_dom.h:
321         (KJS::DOMNode::):
322         Add setter and setter for textContent.
323         
324         * khtml/xml/dom_nodeimpl.cpp:
325         (DOM::NodeImpl::textContent):
326         (DOM::NodeImpl::setTextContent):
327         * khtml/xml/dom_nodeimpl.h:
328         Implement textContent and setTextContent.
329         
330         * kwq/DOM.mm:
331         (-[DOMNode textContent]):
332         (-[DOMNode setTextContent:]):
333         Add Objective C wrappers.
334
335 2005-10-31  Eric Seidel  <eseidel@apple.com>
336
337         Reviewed by hyatt.
338
339         Now ignores XSLT PIs in documents resulting from transforms.
340         http://bugzilla.opendarwin.org/show_bug.cgi?id=5529
341
342         * khtml/xml/dom_docimpl.cpp:
343         (DocumentImpl::recalcStyleSelector):
344         * khtml/xml/xml_tokenizer.cpp:
345         (khtml::XMLTokenizer::processingInstruction):
346
347 2005-10-31  David Harrison  <harrison@apple.com>
348
349         Remove conditionalized away code added as part of tab character support.
350         
351         * khtml/editing/insert_text_command.cpp:
352         (khtml::InsertTextCommand::prepareForTextInsertion):
353         (khtml::InsertTextCommand::insertTab):
354         * khtml/editing/markup.cpp:
355         (khtml::createParagraphContentsFromString):
356
357 2005-10-29  David Hyatt  <hyatt@apple.com>
358         Fix the performance regression caused by doing too much copying of background/border values.  This patch attempts to rectify things by doing the following:
359
360         (1) Don't initialize the border/background cached values on every single style resolution.
361         (2) Only cache the border/background values just after user agent styles have been resolved if the user agent set an appearance.
362         (3) Only check for appearance disabling if you had a UA appearance originally (and then continue to have an appearance after author/user styles have been resolved too)
363         (4) Make sure to patch the pseudoStyleForElement method too.  With the removal of the initialization code for the values running over and over again, I needed to make sure to patch this function to match styleForElement.
364         
365         Reviewed by sullivan
366
367         * khtml/css/cssstyleselector.cpp:
368         (khtml::CSSStyleSelector::initForStyleResolve):
369         (khtml::CSSStyleSelector::styleForElement):
370         (khtml::CSSStyleSelector::pseudoStyleForElement):
371         (khtml::CSSStyleSelector::adjustRenderStyle):
372         * khtml/css/cssstyleselector.h:
373
374 2005-10-28  Beth Dakin  <bdakin@apple.com>
375
376         Reviewed by John
377
378         Fix for <rdar://problem/4098083> REGRESSION (125-312): crash 
379         in [KWQTableView resignFirstResponder] selecting from JS menu 
380         (car4you.at, etc.)
381
382         Since it is possible that a render widget's eventFilterObject
383         has been destroyed even though the render widget is still ref-ed,
384         we need to nil-check the eventFilterObject before we use it to get
385         the eventFilter.
386
387         * kwq/KWQComboBox.mm:
388         (-[KWQPopUpButton becomeFirstResponder]): Added nil check.
389         (-[KWQPopUpButton resignFirstResponder]): Added nil check.
390         * kwq/KWQListBox.mm:
391         (-[KWQTableView becomeFirstResponder]): Added nil check.
392         (-[KWQTableView resignFirstResponder]): Added nil check.
393         * kwq/KWQTextArea.mm:
394         (-[KWQTextAreaTextView becomeFirstResponder]): Added nil check.
395         (-[KWQTextAreaTextView resignFirstResponder]): Added nil check.
396         * kwq/KWQTextField.mm:
397         (-[KWQTextFieldController setHasFocus:]): Added nil check.
398         * kwq/WebCoreBridge.mm:
399         (-[WebCoreBridge elementForView:]): Added nil check.
400
401 2005-10-28  Adele Peterson  <adele@apple.com>
402
403         Reviewed by Beth.
404
405         - fixed <rdar://problem/4319232> finding text in overflow area doesn't always scroll to the right place
406
407         * khtml/rendering/render_text.cpp:
408         (RenderText::selectionRect): Subtracts scroll offset of containing block layer.
409
410 2005-10-28  David Hyatt  <hyatt@apple.com>
411
412         Make sure positioned content works with width:intrinsic.  Fixes positioned buttons.  The bug
413         is bugzilla #5520.
414         
415         Reviewed by mjs
416
417         fast/forms/positioned-button.html
418
419         * khtml/rendering/render_box.cpp:
420         (RenderBox::calcAbsoluteHorizontalValues):
421
422 2005-10-28  Adele Peterson  <adele@apple.com>
423
424         Reviewed by Hyatt.
425
426         -fixed <rdar://problem/4081091> focus() does not work properly on anchors
427         <rdar://problem/4317689> new form elements don't get revealed when focus() is called on them
428
429         * khtml/xml/dom_docimpl.cpp:
430         (DocumentImpl::setFocusNode): call scrollRectToVisible.
431
432 2005-10-27  David Hyatt  <hyatt@apple.com>
433
434         Fix for bug 5519, buttons need to honor background/border: none and turn off styles.
435         This patch changes the default style rules so that buttons have both a border and
436         a background color.
437
438         If the author changes the border/background so that it no longer matches these chosen
439         defaults, we assume that the button has now been styled and we turn off the Aqua
440         appearance.
441
442         We also play more games with border and padding and juggle the values around so that
443         things look right with Aqua turned on and off.
444         
445         Reviewed by mjs
446
447         * khtml/css/cssstyleselector.cpp:
448         (khtml::CSSStyleSelector::matchRules):
449         (khtml::CSSStyleSelector::initForStyleResolve):
450         (khtml::CSSStyleSelector::styleForElement):
451         (khtml::CSSStyleSelector::adjustRenderStyle):
452         (khtml::CSSStyleSelector::applyDeclarations):
453         * khtml/css/cssstyleselector.h:
454         * khtml/css/html4.css:
455         * khtml/rendering/render_style.h:
456         (khtml::BorderValue::BorderValue):
457         (khtml::BorderData::operator!=):
458         (khtml::RenderStyle::border):
459         * khtml/rendering/render_theme.cpp:
460         (khtml::RenderTheme::paint):
461         (khtml::RenderTheme::isControlStyled):
462         * khtml/rendering/render_theme.h:
463         * khtml/rendering/render_theme_mac.h:
464         * khtml/rendering/render_theme_mac.mm:
465         (khtml::RenderThemeMac::adjustButtonStyle):
466         (khtml::RenderThemeMac::setButtonCellState):
467         (khtml::RenderThemeMac::paintButton):
468
469 2005-10-26  Vicki Murley  <vicki@apple.com>
470
471         Reviewed by Hyatt.
472  
473         Fix problems with link jumping.  In the cases below, we were calculating the wrong position to scroll to.
474
475         <rdar://problem/4247537> link jumping should scroll to tallest object on line, not first object on line
476         <rdar://problem/3489554> when calculating position for link jumping, skip siblings that are unrendered whitespace
477         <rdar://problem/4244382> Safari - erratic behavior of empty anchor tags followed by whitespace
478         <rdar://problem/4256060> Link scrolling to last object on the page doesn't work if the link being scrolled to contains an empty inline
479         <rdar://problem/4276623> erratic link jumping when tables are involved
480
481         * khtml/xml/dom_nodeimpl.cpp:
482         (DOM::ContainerNodeImpl::getUpperLeftCorner):
483
484 2005-10-27  Eric Seidel  <eseidel@apple.com>
485
486         Build fix, forgot to commit project file.
487         Also need to make XSLT #ifdef's work for portability.
488         http://bugzilla.opendarwin.org/show_bug.cgi?id=3275
489
490         * WebCore.xcodeproj/project.pbxproj:
491         * khtml/ecma/XSLTProcessor.cpp:
492         * khtml/ecma/XSLTProcessor.h:
493         * khtml/ecma/kjs_window.cpp:
494         (KJS::Window::getValueProperty):
495
496 2005-10-27  Eric Seidel  <eseidel@apple.com>
497
498         No review needed, svg build fix only.
499
500         * kdom/xpointer/XPointerExpressionImpl.cpp: "Shared.h" to "kdom/Shared.h"
501
502 2005-10-27  David Harrison  <harrison@apple.com>
503
504         Reviewed by Justin Garcia and Dave Hyatt.
505
506         <rdar://problem/4134884> crash trying to forward msg - khtml::RenderBlock::addChildToFlow
507
508         Problem was that onunload events were being fired while in the middle of trying to detach, which resulted in updateDocumentsRendering re-attaching the previously detached nodes.  Similar problem with load events while attaching.
509         
510         Solved by eliminating load and unload for object nodes, pre-sending unload before detach, and sending dom mutation and load events after attaching.
511         
512         Also, added asserts to catch this problem more easily in the future.
513         
514         Added test:
515         * fast/events/event-targets.html
516         Make sure that load and unload events do not fire on certain objects.
517         
518         * khtml/ecma/kjs_html.cpp:
519         (KJS::Image::notifyFinished):
520         Use constant string for "load" event name.
521         * khtml/ecma/xmlhttprequest.cpp:
522         (KJS::XMLHttpRequest::changeState):
523         Use constant strings for "load" and "readystatechange" event names.
524         * khtml/html/html_baseimpl.cpp:
525         (HTMLFrameElementImpl::close):
526         (HTMLFrameElementImpl::willRemove):
527         (HTMLFrameElementImpl::detach):
528         Add willRemove() function.
529         * khtml/html/html_baseimpl.h:
530         Add willRemove() function.
531         * khtml/html/html_objectimpl.cpp:
532         (DOM::HTMLObjectElementImpl::attach):
533         (DOM::HTMLObjectElementImpl::detach):
534         Stop needlessly sending load and unload events for OBJECT elements.
535         * khtml/xml/dom2_traversalimpl.cpp:
536         (DOM::NodeIteratorImpl::notifyBeforeNodeRemoval):
537         Rename local variable from willRemove to removedNode for clarity.
538         * khtml/xml/dom_docimpl.cpp:
539         (DocumentImpl::DocumentImpl):
540         (DocumentImpl::forbidEventDispatch):
541         (DocumentImpl::allowEventDispatch):
542         (DocumentImpl::eventDispatchForbidden):
543         (DocumentImpl::createEvent):
544         Add mechanism to prevent event dispatch.
545         * khtml/xml/dom_docimpl.h:
546         * khtml/xml/dom_nodeimpl.cpp:
547         (DOM::NodeImpl::dispatchEvent):
548         (DOM::NodeImpl::dispatchGenericEvent):
549         (DOM::NodeImpl::dispatchHTMLEvent):
550         (DOM::NodeImpl::dispatchWindowEvent):
551         (DOM::NodeImpl::dispatchMouseEvent):
552         (DOM::NodeImpl::dispatchSimulatedMouseEvent):
553         (DOM::NodeImpl::dispatchUIEvent):
554         (DOM::NodeImpl::dispatchSubtreeModifiedEvent):
555         (DOM::NodeImpl::dispatchKeyEvent):
556         (DOM::NodeImpl::dispatchWheelEvent):
557         (DOM::NodeImpl::willRemove):
558         (DOM::ContainerNodeImpl::insertBefore):
559         (DOM::ContainerNodeImpl::replaceChild):
560         (DOM::ContainerNodeImpl::willRemove):
561         (DOM::ContainerNodeImpl::willRemoveChild):
562         (DOM::ContainerNodeImpl::removeChild):
563         (DOM::ContainerNodeImpl::removeChildren):
564         (DOM::ContainerNodeImpl::appendChild):
565         (DOM::ContainerNodeImpl::addChild):
566         (DOM::ContainerNodeImpl::dispatchChildInsertedEvents):
567         (DOM::ContainerNodeImpl::dispatchChildRemovalEvents):
568         Prevent event dispatch during DOM node removals and additions.
569         * khtml/xml/dom_nodeimpl.h:
570
571 2005-10-27  David Harrison  <harrison@apple.com>
572
573         Reviewed by Tim Omerick.
574
575         <rdar://problem/4251172> AX: Safari crashes on www.mozilla.org with Voice Over - khtml::RenderImage::imageMap
576
577         Test cases added: None.  Manual testing is way to awkward, and automated testing
578         is not possible.  See following bug...
579         <rdar://problem/4256882> Need automated testing support for accessibility APIs
580
581         * ChangeLog:
582         * khtml/rendering/render_image.cpp:
583         (RenderImage::RenderImage):
584         (RenderImage::imageMap):
585         (RenderImage::updateAltText):
586
587 2005-10-27  Eric Seidel  <eseidel@apple.com>
588
589         Reviewed by hyatt.
590
591         Add XSLTProcessor support to WebCore's JavaScript bindings.
592         <rdar://problem/3642402> add XSLTProcessor to WebCore's JavaScript support
593         http://bugzilla.opendarwin.org/show_bug.cgi?id=3275
594
595         * WebCore.xcodeproj/project.pbxproj:
596         * khtml/ecma/XSLTProcessor.cpp: Added.
597         (KJS::):
598         (KJS::XSLTProcessor::XSLTProcessor):
599         (KJS::XSLTProcessor::~XSLTProcessor):
600         (KJS::XSLTProcessorProtoFunc::callAsFunction):
601         * khtml/ecma/XSLTProcessor.h: Added.
602         (KJS::XSLTProcessor::classInfo):
603         (KJS::XSLTProcessor::):
604         (KJS::XSLTProcessor::impl):
605         (KJS::XSLTProcessorConstructorImp::XSLTProcessorConstructorImp):
606         (KJS::XSLTProcessorConstructorImp::implementsConstruct):
607         (KJS::XSLTProcessorConstructorImp::construct):
608         * khtml/ecma/kjs_window.cpp:
609         (KJS::Window::getValueProperty):
610         * khtml/ecma/kjs_window.h:
611         (KJS::Window::):
612         * khtml/khtml_part.cpp:
613         (KHTMLPart::replaceDocImpl):
614         * khtml/xml/dom_docimpl.cpp:
615         (DocumentImpl::DocumentImpl):
616         (DocumentImpl::~DocumentImpl):
617         (DocumentImpl::applyXSLTransform):
618         * khtml/xml/dom_docimpl.h:
619         (DOM::DocumentImpl::transformSourceDocument):
620         (DOM::DocumentImpl::setTransformSourceDocument):
621         * khtml/xml/xml_tokenizer.cpp:
622         (khtml::xmlDocPtrForString):
623         (khtml::XMLTokenizer::setTransformSource):
624         * khtml/xml/xml_tokenizer.h:
625         * khtml/xsl/xslt_processorimpl.cpp:
626         (DOM::parseErrorFunc):
627         (DOM::stylesheetLoadFunc):
628         (DOM::setXSLTLoadCallBack):
629         (DOM::writeToQString):
630         (DOM::saveResultToString):
631         (DOM::transformTextStringToXHTMLDocumentString):
632         (DOM::xsltParamArrayFromQDict):
633         (DOM::freeXsltParamArray):
634         (DOM::XSLTProcessorImpl::createDocumentFromSource):
635         (DOM::createFragmentFromSource):
636         (DOM::xsltStylesheetPointer):
637         (DOM::xmlDocPtrFromNode):
638         (DOM::resultMIMEType):
639         (DOM::XSLTProcessorImpl::transformToString):
640         (DOM::XSLTProcessorImpl::transformToDocument):
641         (DOM::XSLTProcessorImpl::transformToFragment):
642         (DOM::XSLTProcessorImpl::setParameter):
643         (DOM::XSLTProcessorImpl::getParameter):
644         (DOM::XSLTProcessorImpl::removeParameter):
645         * khtml/xsl/xslt_processorimpl.h:
646         (DOM::XSLTProcessorImpl::XSLTProcessorImpl):
647         (DOM::XSLTProcessorImpl::setXSLStylesheet):
648         (DOM::XSLTProcessorImpl::importStylesheet):
649         (DOM::XSLTProcessorImpl::clearParameters):
650         (DOM::XSLTProcessorImpl::reset):
651         (DOM::XSLTProcessorImpl::xslStylesheet):
652
653 2005-10-27  Adele Peterson  <adele@apple.com>
654
655         Reviewed by Vicki.
656
657         Fixed bug that prevents overflow areas from scrolling to reveal anchor.
658         Part of <rdar://problem/3612121>.
659
660         * khtml/khtml_part.cpp: (KHTMLPart::gotoAnchor):  
661
662 2005-10-27  Adele Peterson  <adele@apple.com>
663
664         Reviewed by Vicki.
665
666         - fixed <rdar://problem/4318167> REGRESSION: content doesn't scroll far enough to the left after clicking links at aplacecalledcommon.co.uk
667
668         * khtml/rendering/render_layer.cpp: 
669         (khtml::RenderLayer::scrollRectToVisible): fixed a typo where verticalAlignment was being passed instead of horizontalAlignment.
670         * khtml/khtml_part.cpp: 
671         (KHTMLPart::gotoAnchor): specified alignLeft as horizontal alignment.
672
673 2005-10-27  David Hyatt  <hyatt@apple.com>
674
675         Fix form controls so that they can take advantage of
676         the style sharing optimization.  Special-case the "type"
677         attribute to accomplish this.
678
679         Also add checks for missing pseudo-classes that the sharing
680         code now needs to check once form controls start sharing
681         style.  These include enabled, checked and indeterminate.
682
683         Finally, :target should have been checked all along and was
684         broken by the original style sharing landing.  Add it to the list
685         of things checked as well.
686
687         It's impossible to write a :target test.  Other areas more than
688         covered by existing test cases.
689         
690         Reviewed by mjs
691
692         * khtml/css/cssstyleselector.cpp:
693         (khtml::CSSStyleSelector::canShareStyleWithElement):
694         (khtml::CSSStyleSelector::checkOneSelector):
695
696 2005-10-27  David Hyatt  <hyatt@apple.com>
697
698         Fix for bug 5517, percentage height relative block inside a percentage height absolute
699         block did not stretch properly to fill the absolute block.
700
701         Also fixing box-sizing bugs in percentage height calculations.  Recurrence in
702         calcPercentageHeight needed a content box adjustment.
703         
704         Reviewed by mjs
705
706         fast/block/positioning/062.html
707         fast/box-sizing/percentage-test.html
708         fast/box-sizing/panels-one.html
709         fast/box-sizing/panels-two.html
710
711         * khtml/rendering/render_box.cpp:
712         (RenderBox::calcPercentageHeight):
713
714 2005-10-27  Eric Seidel  <eseidel@apple.com>
715
716         No review, SVG build fix only.
717         Fixing fallout from <rdar://problem/4098450>.
718
719         * WebCore+SVG/xml_kdomtokenizer.cpp:
720         (KDOMTokenizer::write): now returns bool
721         (KDOMTokenizer::finish): error check
722
723 2005-10-26  Eric Seidel  <eseidel@apple.com>
724
725         Reviewed by mjs & darin.
726
727         Various fixes to createMarkup and toString code to properly
728         support serialization of XML.
729         http://bugzilla.opendarwin.org/show_bug.cgi?id=5404
730
731         * khtml/editing/markup.cpp:
732         (khtml::startMarkup):
733         (khtml::doesHTMLForbidEndTag):
734         (khtml::shouldSelfClose):
735         (khtml::endMarkup):
736         (khtml::markup):
737         (khtml::createFragmentFromMarkup):
738         (khtml::createMarkup):
739         * khtml/html/html_elementimpl.cpp:
740         (HTMLElementImpl::createContextualFragment):
741         (HTMLElementImpl::toString):
742         * khtml/html/htmltokenizer.cpp:
743         (khtml::parseHTMLDocumentFragment):
744         * khtml/html/htmltokenizer.h:
745         * khtml/xml/dom_xmlimpl.cpp:
746         (DOM::ProcessingInstructionImpl::ProcessingInstructionImpl):
747         (DOM::ProcessingInstructionImpl::~ProcessingInstructionImpl):
748         (DOM::ProcessingInstructionImpl::toString):
749         * khtml/xml/dom_xmlimpl.h:
750         (DOM::ProcessingInstructionImpl::sheet):
751         (DOM::ProcessingInstructionImpl::setStyleSheet):
752
753 2005-10-26  David Hyatt  <hyatt@apple.com>
754
755         Don't allow position:relative to apply to table sections.  Fixes the crash described in
756         Radar bug 4107882. (http://cityoflakeforest.com/cs/pw/cs_pw2a3.htm)
757         
758         Reviewed by bdakin
759
760         * khtml/css/cssstyleselector.cpp:
761         (khtml::CSSStyleSelector::adjustRenderStyle):
762         
763 2005-10-26  Adele Peterson  <adele@apple.com>
764
765         Reviewed by John.
766
767         Fixes a few problems with <rdar://problem/3612121> that I noticed with code inspection.
768
769         * khtml/rendering/render_layer.h: removed inline scrollToPoint
770         * khtml/rendering/render_layer.cpp: (khtml::RenderLayer::getRectToExpose):
771         * khtml/khtml_part.cpp: (KHTMLPart::gotoAnchor): Used to call scrollToPoint, now calls scrollRectToVisible
772         * kwq/KWQKHTMLPart.mm:
773         (KWQKHTMLPart::jumpToSelection): Now uses the enclosing layer of the selection start, instead of the outermost layer.
774         (KWQKHTMLPart::centerSelectionInVisibleArea): ditto.
775
776 2005-10-26  Anders Carlsson  <andersca@mac.com>
777
778         Reviewed by Maciej.
779
780         * khtml/ecma/kjs_dom.cpp:
781         (KJS::DOMNodeProtoFunc::callAsFunction):
782         * khtml/ecma/kjs_dom.h:
783         Add JS wrapper.
784         
785         (KJS::DOMNode::):
786         * khtml/xml/dom_nodeimpl.cpp:
787         (DOM::NodeImpl::isEqualNode):
788         * khtml/xml/dom_nodeimpl.h:
789         Implement isEqualNode.
790         
791         * kwq/DOM.mm:
792         (-[DOMNode isEqualNode:]):
793         Add Objective C wrapper.
794
795 2005-10-26  David Hyatt  <hyatt@apple.com>
796
797         Add support for the indeterminate boolean for placing checkboxes
798         into a mixed state.  This is a feature of WinIE.
799
800         Along with this feature, add support for the CSS3 :indeterminate
801         selector, although one wonders how this could be part of the selectors spec
802         when no DOM standard covers the ability to make a mixed checkbox
803         in the first place.
804
805         This implementation may seem like it's overlooking some things, but it's not.
806         Specifically "indeterminate" has no effect on form submission, it does not
807         get cleared by a form reset, and the pre/post reversal code for undoing clicks
808         only resets the state that changed in WinIE.  This is all bizarre behavior,
809         but this is a WinIE extension, so we're going to match.
810         
811         Reviewed by mjs
812
813         fast/forms/indeterminate.html
814
815         * khtml/css/css_base.cpp:
816         (CSSSelector::extractPseudoType):
817         * khtml/css/css_base.h:
818         (DOM::CSSSelector::):
819         * khtml/css/cssstyleselector.cpp:
820         (khtml::CSSStyleSelector::checkOneSelector):
821         * khtml/ecma/kjs_html.cpp:
822         (KJS::HTMLElement::inputGetter):
823         (KJS::HTMLElement::inputSetter):
824         * khtml/ecma/kjs_html.h:
825         (KJS::HTMLElement::):
826         * khtml/html/html_formimpl.cpp:
827         (DOM::HTMLInputElementImpl::init):
828         (DOM::HTMLInputElementImpl::setIndeterminate):
829         (DOM::HTMLInputElementImpl::preDispatchEventHandler):
830         (DOM::HTMLInputElementImpl::postDispatchEventHandler):
831         * khtml/html/html_formimpl.h:
832         (DOM::HTMLInputElementImpl::isIndeterminate):
833         (DOM::HTMLInputElementImpl::indeterminate):
834         * khtml/rendering/render_theme.cpp:
835         (khtml::RenderTheme::isIndeterminate):
836         * khtml/rendering/render_theme.h:
837         * khtml/rendering/render_theme_mac.mm:
838         (khtml::RenderThemeMac::updateCheckedState):
839         (khtml::RenderThemeMac::setCheckboxCellState):
840         * khtml/xml/dom_nodeimpl.h:
841         (DOM::NodeImpl::isIndeterminate):
842
843 2005-10-26  Maciej Stachowiak  <mjs@apple.com>
844
845         Re-landed fix for the following bug:
846
847         <rdar://problem/4302874> crash repeatedly reloading www.supermanhomepage.com (fixed in Denver, broken on TOT)
848         
849         * khtml/ecma/kjs_events.cpp:
850         (KJS::JSAbstractEventListener::handleEvent):
851
852 2005-10-25  Darin Adler  <darin@apple.com>
853
854         Reviewed by Eric.
855
856         - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5315
857           need to set document type based on contents of <!DOCTYPE>
858           (fixes one layout test)
859
860         * khtml/html/html_documentimpl.cpp: (DOM::HTMLDocumentImpl::determineParseMode):
861         Use the new setDocType function instead of modifying m_doctype directly.
862
863         * khtml/xml/dom_docimpl.h: Changed to use SharedPtr more.
864         (DOM::DocumentImpl::realDocType): Add get() since we're using SharedPtr.
865         (DOM::DocumentImpl::setDocType): Added.
866         * khtml/xml/dom_docimpl.cpp:
867         (DOMImplementationImpl::createDocument): Use setDocType instead of using
868         realDocType()->copyFrom to set up the document type in the new document.
869         (DocumentImpl::DocumentImpl): Don't create an empty document type during constructor.
870         (DocumentImpl::~DocumentImpl): Remove explicit deref since we're using SharedPtr.
871         (DocumentImpl::doctype): Add get() since we're using SharedPtr.
872         (DocumentTypeImpl::DocumentTypeImpl): Streamlined implementation since we're using SharedPtr.
873
874         * khtml/xml/xml_tokenizer.cpp:
875         (khtml::XMLTokenizer::internalSubset): Added. Calls setDocType.
876         (khtml::internalSubsetHandler): Added. Calls xmlSAX2InternalSubset after calling our function.
877         (khtml::XMLTokenizer::finish): Changed to pass our internalSubsetHandler function pointer.
878
879 2005-10-25  David Hyatt  <hyatt@apple.com>
880
881         This patch makes a number of refinements to buttons to make
882         the custom <input>s on hotwire.com look correct.
883
884         Also back out my fix for bug 5283, since it causes some bad
885         regressions and basically needs to be rethought. (This part
886         not reviewed, since it's just a backout.)
887         
888         Reviewed by darin
889         
890         * khtml/css/html4.css:
891         Added rules to reset many more properties on form controls,
892         including text-align, letter-spacing, word-spacing, line-height
893         text-transform and others.  Remove the !important from the
894         line-height reset, since WinIE honors line-height on buttons.
895         Mozilla does not, but we will match WinIE.
896         
897         * khtml/rendering/render_button.cpp:
898         (khtml::RenderButton::setStyle):
899         Make sure to preserve the box-flex of our generated interior
900         block, so that it doesn't end up packing left inside its
901         container when styles change.
902         
903         (khtml::RenderButton::paintObject):
904         Change the clipping heuristic to only clip to the border box.
905         This does mean text can run right up to the edge of an Aqua
906         button, but without this change we just don't match other
907         browsers.
908         
909         * khtml/rendering/render_flexbox.cpp:
910         (khtml::RenderFlexibleBox::layoutHorizontalBox):
911         (khtml::RenderFlexibleBox::layoutVerticalBox):
912         Change the behavior of box-align:center.  If it would result
913         in spillage out the top or left when centering, then don't move
914         it.
915
916 2005-10-25  Maciej Stachowiak  <mjs@apple.com>
917
918         Re-landing the isSameNode fix from Anders, I verified there is no effect on performance:
919
920         <rdar://problem/4302880> Re-land isSameNode change
921         
922         * khtml/ecma/kjs_dom.cpp:
923         * khtml/ecma/kjs_dom.h:
924         * khtml/xml/dom_nodeimpl.h:
925         * kwq/DOM.mm:
926
927 2005-10-25  Maciej Stachowiak  <mjs@apple.com>
928
929         Re-land the following fix, I tested to verify there is no performance regression:
930
931         Makes <object> tags not use image mode for svg content:
932         http://bugzilla.opendarwin.org/show_bug.cgi?id=5175
933
934         * khtml/html/html_objectimpl.cpp:
935         (DOM::HTMLObjectElementImpl::isImageType):
936
937 2005-10-25  Adele Peterson  <adele@apple.com>
938
939         Reviewed by Hyatt.
940
941         - fixed <rdar://problem/3612121> setting focus, by tabbing, searching, or with JavaScript does not scroll overflow:auto/scroll/overlay to reveal focused element (3480)
942
943         * khtml/rendering/render_layer.cpp: 
944         (khtml::RenderLayer::scrollRectToVisible): Added case for when the renderer has an overflow clip, so we can scroll overflow and views recursively.
945
946 2005-10-25  Adele Peterson  <adele@apple.com>
947
948         Reviewed by Vicki.
949
950         Fixed <rdar://problem/4098450> RoboHelp-generated html help system crashes in latest Safari -KWQValueListImpl::copyOnWrite
951
952         The tokenizer's timer was causing the tokenizer to be deleted twice.  
953         In timerEvent, we'll now check to see if the write has destroyed the tokenizer before trying to do it again.
954
955         * khtml/html/htmltokenizer.cpp:
956         (khtml::HTMLTokenizer::write): Returns a boolean to indicate whether end() gets called
957         (khtml::HTMLTokenizer::timerEvent): Moved code from allDataProcessed, and now, checks to see if write() called end() to notify WebKit that processing is done.
958         * khtml/html/htmltokenizer.h: write() returns a bool.
959         * khtml/xml/xml_tokenizer.cpp: (khtml::XMLTokenizer::write): returns a bool (always false in the XMLTokenizer case).
960         * khtml/xml/xml_tokenizer.h: ditto.
961
962 2005-10-25  Beth Dakin  <bdakin@apple.com>
963
964         Reviewed by Maciej
965
966         Fix for <rdar://problem/4148730> SureSec si#182 safari heap overflow.
967         When a table has a really huge rowSpan, Safari used to crash because
968         the malloc of the grid for the table failed. This fix just checks for
969         the success of the malloc.
970
971         * khtml/rendering/render_table.cpp:
972         (RenderTableSection::ensureRows): Return false if the grid resize is not 
973         successful.
974         (RenderTableSection::addCell): Return early if ensureRows() returned false.
975         * khtml/rendering/render_table.h: Make ensureRows() return a bool instead
976         of void.
977
978 2005-10-25  Adele Peterson  <adele@apple.com>
979
980         Reviewed by Hyatt.
981
982         - first step of fix for <rdar://problem/3612121> setting focus, by tabbing, searching, or with JavaScript does not scroll overflow:auto/scroll/overlay to reveal focused element (3480)
983         This change moves the scrolling code for revealing elements to the RenderLayer, instead of being specific to the view.
984
985         * khtml/rendering/render_layer.h: Added scrollRectToVisible. Added getRectToExpose.
986         Added ScrollAlignment enum so callers can be more specific about exactly where they want to scroll.
987         (khtml::RenderLayer::scrollToPoint): Added inline function to scroll to a point.
988         * khtml/rendering/render_layer.cpp:
989         (khtml::RenderLayer::scrollRectToVisible):  Replaces recursive view scrolling functions.
990         (khtml::RenderLayer::getRectToExpose):  Calculates the rectangle to expose based on the alignment parameters.
991
992         * khtml/khtml_part.cpp:
993         (KHTMLPart::gotoAnchor): Changed use of setContentsPosRecursive to scrollToPoint.
994         (KHTMLPart::setActiveNode): Changed use of ensureVisible to scrollRectToVisible.
995         * khtml/khtmlview.cpp:
996         (KHTMLView::doAutoScroll): Changed use of ensureVisible to scrollRectToVisible.
997         (KHTMLView::focusNextPrevNode): ditto.
998         * kwq/KWQKHTMLPart.mm:
999         (KWQKHTMLPart::jumpToSelection): Changed use of _KWQ_scrollRectToVisible to scrollRectToVisible.
1000         (KWQKHTMLPart::nextKeyViewInFrame): Changed use of ensureRectVisibleCentered to scrollRectToVisible.
1001         (KWQKHTMLPart::centerSelectionInVisibleArea): ditto.
1002         * khtml/xml/dom_elementimpl.cpp: (ElementImpl::scrollIntoView): Changed use of setContentsPos and ensureVisible to scrollRectToVisible.
1003         * kwq/WebCoreBridge.mm: (-[WebCoreBridge ensureSelectionVisible]): Changed use of ensureRectVisibleCentered to scrollRectToVisible.
1004
1005         * kwq/KWQComboBox.mm: (-[KWQPopUpButton becomeFirstResponder]): Changing use of _KWQ_scrollFrameToVisible to scrollRectToVisible.
1006         * kwq/KWQFileButton.mm: (KWQFileButton::focusChanged): ditto.
1007         * kwq/KWQListBox.mm: (-[KWQTableView becomeFirstResponder]): ditto.
1008         * kwq/KWQSlider.mm: (-[KWQSlider becomeFirstResponder]): ditto.
1009         * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView becomeFirstResponder]): ditto.
1010         * kwq/KWQTextField.mm: (-[KWQTextFieldController setHasFocus:]): ditto.
1011
1012         * kwq/KWQScrollView.h: Removed ensureVisible, and ensureRectVisibleCentered.  Added ensureRectVisible which just calls across to AppKit to scroll the NSView.
1013         * kwq/KWQScrollView.mm: (QScrollView::ensureRectVisible): ditto.
1014
1015         * WebCore.xcodeproj/project.pbxproj: Removed KWQNSViewExtras since it is no longer needed.
1016         * kwq/KWQNSViewExtras.h: Removed.
1017         * kwq/KWQNSViewExtras.m: Removed.
1018
1019 2005-10-25  David Hyatt  <hyatt@apple.com>
1020
1021         Land box-sizing support and change button to work correctly
1022         with it.
1023
1024         Also stop honoring of font properties on <input> if
1025         Aqua is enabled.  If you allow bold, but don't honor size, then
1026         you end up with poorly rendered buttons on cnn.com (box-sizing
1027         made this apparent, since the buttons got smaller).
1028
1029         Fix the clipping code for button content to actually work. :)
1030         Function needed to be designated virtual in order to get
1031         called.
1032         
1033         Reviewed by darin
1034
1035         fast/box-sizing/box-sizing.html is the new test case.
1036         
1037         * ChangeLog:
1038         * WebCore.xcodeproj/project.pbxproj:
1039         * khtml/rendering/render_block.cpp:
1040         (khtml::RenderBlock::calcMinMaxWidth):
1041         * khtml/rendering/render_block.h:
1042         * khtml/rendering/render_box.cpp:
1043         (RenderBox::calcBorderBoxWidth):
1044         (RenderBox::calcBorderBoxHeight):
1045         (RenderBox::calcContentBoxWidth):
1046         (RenderBox::calcContentBoxHeight):
1047         (RenderBox::calcWidth):
1048         (RenderBox::calcWidthUsing):
1049         (RenderBox::calcHeight):
1050         (RenderBox::calcHeightUsing):
1051         (RenderBox::calcPercentageHeight):
1052         (RenderBox::calcReplacedWidth):
1053         (RenderBox::calcReplacedWidthUsing):
1054         (RenderBox::calcReplacedHeightUsing):
1055         (RenderBox::availableHeightUsing):
1056         (RenderBox::calcAbsoluteHorizontalValues):
1057         (RenderBox::calcAbsoluteVerticalValues):
1058         * khtml/rendering/render_box.h:
1059         * khtml/rendering/render_button.cpp:
1060         (khtml::RenderButton::paintObject):
1061         * khtml/rendering/render_button.h:
1062         * khtml/rendering/render_flexbox.cpp:
1063         (khtml::RenderFlexibleBox::calcMinMaxWidth):
1064         * khtml/rendering/render_theme_mac.mm:
1065         (khtml::RenderThemeMac::setFontFromControlSize):
1066         (khtml::RenderThemeMac::adjustButtonStyle):
1067
1068 2005-10-25  Vicki Murley  <vicki@apple.com>
1069
1070         Reviewed by Hyatt.
1071  
1072         - fix <rdar://problem/4288276> DOM tests expect hierarchy exception adding wrong types of nodes to parents (4568)
1073
1074         Check that the node being added is an allowable child.  If inserting a document fragment node, check each child of
1075         the node.  Fixes 4 of the W3C DOM HTML tests and 11 of the XHTML tests.
1076
1077         * khtml/xml/dom_nodeimpl.cpp:
1078         (DOM::NodeImpl::checkAddChild):
1079
1080 2005-10-25  Darin Adler  <darin@apple.com>
1081
1082         Reviewed by Dave Hyatt.
1083
1084         - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4945
1085           event init calls should not do anything if the event has already been dispatched
1086         - made a small performance improvement to event creation by simplifying the date code
1087           (seen on profiles)
1088         - changed DOMTimestamp to be a 64-bit integer on Mac OS X (requested by the DOM standard)
1089
1090         * khtml/dom/dom_node.h: Made DOMTimestamp be unsigned long long on Mac OS X.
1091
1092         * khtml/xml/dom_nodeimpl.cpp:
1093         (DOM::NodeImpl::dispatchGenericEvent): Assert that the event has a target.
1094         (DOM::NodeImpl::dispatchWindowEvent): Set the event target to the document.
1095
1096         * khtml/xml/dom2_eventsimpl.h: Changed many data members to use SharedPtr instead of
1097         explicit ref/deref. Changed m_createTime to be a DOMTimeStamp instead of a QDateTime.
1098         (DOM::EventImpl::setTarget): Now inlined.
1099         (DOM::EventImpl::timeStamp): Now inlined.
1100         (DOM::EventImpl::preventDefault): Now inlined.
1101         (DOM::EventImpl::dispatched): Added. Returns true if the event was already dispatched,
1102         meaning it already has a target.
1103
1104         * khtml/xml/dom2_eventsimpl.cpp:
1105         (DOM::currentTimeStamp): Added. Faster inline version on Mac OS X, since this shows
1106         up in profiles.
1107         (DOM::EventImpl::EventImpl): Changed to use contructor syntax and set m_createTime to
1108         currentTimeStamp().
1109         (DOM::EventImpl::~EventImpl): Removed explicit derefs; no longer needed.
1110         (DOM::EventImpl::initEvent): Do nothing if dispatched() is true. Simplify since
1111         SharedPtr handles ref/deref.
1112         (DOM::UIEventImpl::UIEventImpl): Changed to use contructor syntax and take advantage
1113         of the fact that some data members are now SharedPtr.
1114         (DOM::UIEventImpl::initUIEvent): Do nothing if dispatched() is true. Simplify since
1115         SharedPtr handles ref/deref.
1116         (DOM::MouseEventImpl::MouseEventImpl): Changed to use contructor syntax and take advantage
1117         of the fact that some data members are now SharedPtr.
1118         (DOM::MouseEventImpl::~MouseEventImpl): Removed explicit derefs; no longer needed.
1119         (DOM::MouseEventImpl::initMouseEvent): Do nothing if dispatched() is true. Simplify since
1120         SharedPtr handles ref/deref.
1121         (DOM::MouseEventImpl::isDragEvent): Use a local variable.
1122         (DOM::KeyboardEventImpl::KeyboardEventImpl): Changed to use contructor syntax and take
1123         advantage of the fact that some data members are now SharedPtr.
1124         (DOM::KeyboardEventImpl::~KeyboardEventImpl): Removed explicit derefs; no longer needed.
1125         (DOM::KeyboardEventImpl::initKeyboardEvent): Do nothing if dispatched() is true. Simplify
1126         since SharedPtr handles ref/deref.
1127         (DOM::MutationEventImpl::MutationEventImpl): Changed to use contructor syntax and take
1128         advantage of the fact that some data members are now SharedPtr.
1129         (DOM::MutationEventImpl::initMutationEvent): Do nothing if dispatched() is true. Simplify
1130         since SharedPtr handles ref/deref.
1131         (DOM::ClipboardEventImpl::ClipboardEventImpl): Simplify since SharedPtr handles initialization
1132         and ref/deref.
1133         (DOM::RegisteredEventListener::RegisteredEventListener): Ditto.
1134
1135 2005-10-24  Geoffrey Garen  <ggaren@apple.com>
1136
1137         Patch by Niels Leenheer.
1138
1139         Fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=3587
1140         http://bugzilla.opendarwin.org/show_bug.cgi?id=3587
1141
1142         Reviewed by hyatt.
1143
1144         Layout tests added:
1145
1146         * dom/xhtml/level2/html/HTMLBaseElement02-expected.txt:
1147         * dom/xhtml/level2/html/frame-expected.txt:
1148         * fast/frames/calculate-fixed-expected.txt: Added.
1149         * fast/frames/calculate-fixed.html: Added.
1150         * fast/frames/calculate-order-expected.txt: Added.
1151         * fast/frames/calculate-order.html: Added.
1152         * fast/frames/calculate-percentage-expected.txt: Added.
1153         * fast/frames/calculate-percentage.html: Added.
1154         * fast/frames/calculate-relative-expected.txt: Added.
1155         * fast/frames/calculate-relative.html: Added.
1156         * fast/frames/calculate-round-expected.txt: Added.
1157         * fast/frames/calculate-round.html: Added.
1158
1159         * khtml/rendering/render_frames.cpp:
1160         (RenderFrameSet::layout):
1161
1162 2005-10-24  Darin Adler  <darin@apple.com>
1163
1164         Reviewed by Hyatt.
1165
1166         - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5054
1167           Crash with dataTransfer.setDragImage
1168
1169         * khtml/ecma/kjs_events.cpp: (KJS::ClipboardProtoFunc::callAsFunction):
1170         Added type check in case the parameter passed is not an object.
1171
1172 2005-10-24  Darin Adler  <darin@apple.com>
1173
1174         Reviewed by Beth.
1175
1176         - got ready to make m_parent private by removing references to it
1177           also removed tabs (and used spaces instead) to files I touched
1178         - fixed code that initialized m_parent twice
1179
1180         * khtml/css/css_base.cpp:
1181         (StyleBaseImpl::checkLoaded): Use parent().
1182         (StyleBaseImpl::stylesheet): Ditto.
1183         * khtml/css/css_base.h:
1184         (DOM::StyleBaseImpl::StyleBaseImpl): Initialize base TreeShared with the appropriate
1185         parent instead of first setting m_parent to 0 and then to the correct value. Also
1186         removed setParent, since the base class setParent works fine.
1187         * khtml/css/css_ruleimpl.cpp:
1188         (DOM::CSSRuleImpl::parentStyleSheet): Use parent().
1189         (DOM::CSSRuleImpl::parentRule): Ditto.
1190         * khtml/css/css_stylesheetimpl.cpp:
1191         (StyleSheetImpl::parentStyleSheet): Ditto.
1192         (MediaListImpl::parentStyleSheet): Ditto.
1193         (MediaListImpl::parentRule): Ditto.
1194         * khtml/css/css_valueimpl.cpp:
1195         (DOM::CSSStyleDeclarationImpl::parentRule): Ditto.
1196         * khtml/rendering/render_replaced.cpp: Reformatting only, and removed some
1197         APPLE_CHANGES-only instead.
1198         * khtml/xml/dom_nodeimpl.cpp:
1199         (DOM::NodeImpl::isContentEditable): Use parent().
1200         * khtml/xml/dom_nodeimpl.h:
1201         (DOM::NodeImpl::parentNode): Ditto.
1202         * khtml/xsl/xsl_stylesheetimpl.cpp:
1203         (DOM::XSLImportRuleImpl::parentStyleSheet): Ditto.
1204
1205 2005-10-24  David Hyatt  <hyatt@apple.com>
1206
1207         Fix for 5485, make sure generated content's "rightmost selector"
1208         check does not apply once you move to another selector in the 
1209         compound selector chain.
1210         
1211         Reviewed by mjs
1212
1213         * khtml/css/cssstyleselector.cpp:
1214         (khtml::CSSStyleSelector::checkSelector):
1215
1216 2005-10-24  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1217
1218         Reviewed by Darin, committed by beth.
1219
1220         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=5384
1221         Soft hyphen displayed as hyphen when it is the first character 
1222         in a line/run.
1223
1224         * khtml/rendering/bidi.cpp:
1225         (khtml::checkMidpoints):
1226         (khtml::RenderBlock::skipWhitespace):
1227         (khtml::RenderBlock::findNextLineBreak):
1228         * khtml/rendering/render_text.cpp:
1229         (RenderText::calcMinMaxWidth):
1230
1231 2005-10-23  David Hyatt  <hyatt@apple.com>
1232
1233         Make sure the button's generated text using the value with
1234         the default label so that Submit/Reset buttons aren't blank.
1235         
1236         Reviewed by mjs
1237
1238         Added fast/forms/blankbuttons.html
1239         
1240         * khtml/rendering/render_button.cpp:
1241         (khtml::RenderButton::updateFromElement):
1242
1243 2005-10-24  Maciej Stachowiak  <mjs@apple.com>
1244
1245         Re-landing Dave Hyatt's changes from when the tree was closed.
1246
1247         * khtml/rendering/render_container.cpp:
1248         (RenderContainer::destroy):
1249         (RenderContainer::destroyLeftoverAnonymousChildren):
1250         * khtml/rendering/render_container.h:
1251         * khtml/rendering/render_flow.cpp:
1252         (RenderFlow::destroy):
1253         * khtml/rendering/render_layer.cpp:
1254         (khtml::RenderLayer::isTransparent):
1255         (khtml::RenderLayer::paintLayer):
1256         (khtml::isOverflowOnly):
1257         (khtml::compare):
1258         (khtml::sortByZOrder):
1259         * khtml/rendering/render_layer.h:
1260
1261 2005-10-24  Alexey Proskuryakov  <ap@nypop.com>
1262
1263         Reviewed by Darin Adler.
1264         Commited by Tim Hatcher.
1265
1266         - fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=5484
1267         REGRESSION: reproducible crash in CachedCSSStyleSheet::setCharset
1268
1269         * khtml/misc/loader.cpp:
1270         (CachedCSSStyleSheet::setCharset):
1271         (CachedScript::setCharset):
1272
1273 2005-10-24  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1274
1275         Reviewed by Darin.  Committed by David Harrison.
1276
1277         http://bugzilla.opendarwin.org/show_bug.cgi?id=5449
1278         "OBJECT should be accessible by id/name as document property only if its only children are PARAMs"
1279
1280         Test added:
1281         * fast/js/object-by-name-or-id-expected.txt: Added.
1282         * fast/js/object-by-name-or-id.html: Added.
1283
1284         Files changed:
1285         * khtml/html/html_miscimpl.cpp:
1286         (DOM::HTMLNameCollectionImpl::traverseNextItem):
1287         * khtml/html/html_objectimpl.cpp:
1288         (DOM::HTMLObjectElementImpl::HTMLObjectElementImpl):
1289         (DOM::HTMLObjectElementImpl::parseMappedAttribute):
1290         (DOM::HTMLObjectElementImpl::insertedIntoDocument):
1291         (DOM::HTMLObjectElementImpl::removedFromDocument):
1292         (DOM::HTMLObjectElementImpl::childrenChanged):
1293         (DOM::HTMLObjectElementImpl::updateDocNamedItem):
1294         * khtml/html/html_objectimpl.h:
1295         (DOM::HTMLObjectElementImpl::isDocNamedItem):
1296         * manual-tests/drag_select_highlighting.html: Added.
1297
1298 2005-10-24  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1299
1300         Reviewed by Darin.  Committed by David Harrison.
1301
1302         http://bugzilla.opendarwin.org/show_bug.cgi?id=5415
1303         "Left border of selection highlight leaves behind a trail"
1304
1305         (Code changes are in WebKit)
1306         
1307         * manual-tests/drag_select_highlighting.html: Added.
1308
1309 2005-10-24  Vicki Murley  <vicki@apple.com>
1310
1311         Changes by Mitz Pettel, reviewed by Maciej.
1312
1313         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5306 (KHTMLPart::requestObject 
1314         doesn't destroy old plugin content)
1315
1316         * khtml/html/html_objectimpl.cpp:
1317         (DOM::HTMLObjectElementImpl::recalcStyle):
1318
1319 2005-10-24  Vicki Murley  <vicki@apple.com>
1320
1321         Changes by Alexey Proskuryakov, reviewed by Maciej.
1322
1323         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5140 (CachedObject loading 
1324         ignores charset from HTTP headers)
1325
1326         * khtml/misc/loader.cpp:
1327         (CachedCSSStyleSheet::setCharset):
1328         (CachedScript::setCharset):
1329         (CachedXSLStyleSheet::setCharset):
1330         (CachedXSLStyleSheet::data):
1331         (CachedXBLDocument::CachedXBLDocument):
1332         (CachedXBLDocument::setCharset):
1333         (CachedXBLDocument::data):
1334         (Loader::slotReceivedResponse):
1335         * khtml/misc/loader.h:
1336
1337 2005-10-24  Antti Koivisto  <koivisto@iki.fi>
1338
1339         Reviewed by Hyatt, landed by beth.
1340
1341         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=5318
1342         forced line break should not be allowed after a list marker.
1343
1344         * khtml/rendering/bidi.cpp:
1345         (khtml::RenderBlock::findNextLineBreak):
1346
1347 2005-10-24  Darin Adler  <darin@apple.com>
1348
1349         Reviewed by hyatt.
1350
1351         Fix Qualified Name parsing to match spec.
1352         xhtml dom tests cover these cases.
1353         http://bugzilla.opendarwin.org/show_bug.cgi?id=5317
1354
1355         * khtml/xml/dom_docimpl.cpp:
1356         (isValidNameStart):
1357         (isValidNamePart):
1358         (qualifiedNameIsMalformed):
1359         (DOMImplementationImpl::createDocumentType):
1360         (DOMImplementationImpl::createDocument):
1361         (DocumentImpl::createElementNS):
1362         (DocumentImpl::isValidName):
1363         (DocumentImpl::parseQualifiedName):
1364         * khtml/xml/dom_docimpl.h:
1365         * khtml/xml/dom_elementimpl.cpp:
1366         (ElementImpl::setAttributeNS):
1367
1368 2005-10-23  Julien Palmas <julien.palmas@gmail.com>
1369
1370         Reviewed by eseidel.
1371
1372         Finally fix pattern "userspaceonuse" support.
1373         Several test cases already cover this.
1374         http://bugzilla.opendarwin.org/show_bug.cgi?id=5361
1375
1376         * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
1377         (KRenderingPaintServerPatternQuartz::draw):
1378         * svg-tests/W3C-SVG-1.1/pservers-grad-03-b-expected.checksum:
1379         * svg-tests/W3C-SVG-1.1/pservers-grad-03-b-expected.png:
1380         * svg-tests/W3C-SVG-1.1/pservers-grad-06-b-expected.checksum:
1381         * svg-tests/W3C-SVG-1.1/pservers-grad-06-b-expected.png:
1382         * svg-tests/W3C-SVG-1.1/pservers-pattern-01-b-expected.checksum:
1383         * svg-tests/W3C-SVG-1.1/pservers-pattern-01-b-expected.png:
1384
1385 2005-10-23  Julien Palmas <julien.palmas@gmail.com>
1386
1387         Reviewed by eseidel.
1388
1389         Merged over Shared -> Shared<T> change from kdom.
1390         http://bugzilla.opendarwin.org/show_bug.cgi?id=5391
1391
1392         * WebCore.xcodeproj/project.pbxproj:
1393         * kdom/Shared.h:
1394         (KDOM::Shared::Shared):
1395         (KDOM::Shared::~Shared):
1396         (KDOM::Shared::refCount):
1397         (KDOM::Shared::ref):
1398         (KDOM::Shared::deref):
1399         * kdom/SharedPtr.h: Added.
1400         (KDOM::SharedPtr::SharedPtr):
1401         (KDOM::SharedPtr::~SharedPtr):
1402         (KDOM::SharedPtr::isNull):
1403         (KDOM::SharedPtr::notNull):
1404         (KDOM::SharedPtr::reset):
1405         (KDOM::SharedPtr::get):
1406         (KDOM::SharedPtr::operator!):
1407         (KDOM::SharedPtr::operator bool):
1408         (KDOM::SharedPtr::operator==):
1409         (KDOM::::operator):
1410         * kdom/TreeShared.h:
1411         (KDOM::TreeShared::TreeShared):
1412         (KDOM::TreeShared::~TreeShared):
1413         (KDOM::TreeShared::refCount):
1414         (KDOM::TreeShared::ref):
1415         (KDOM::TreeShared::deref):
1416         (KDOM::TreeShared::parent):
1417         (KDOM::TreeShared::setParent):
1418         * kdom/core/DOMConfigurationImpl.cpp:
1419         (DOMConfigurationImpl::DOMConfigurationImpl):
1420         * kdom/core/DOMConfigurationImpl.h:
1421         * kdom/core/DOMErrorHandlerImpl.cpp:
1422         (DOMErrorHandlerImpl::DOMErrorHandlerImpl):
1423         * kdom/core/DOMErrorHandlerImpl.h:
1424         * kdom/core/DOMErrorImpl.cpp:
1425         (DOMErrorImpl::DOMErrorImpl):
1426         * kdom/core/DOMErrorImpl.h:
1427         (KDOM::):
1428         * kdom/core/DOMExceptionImpl.cpp:
1429         (DOMExceptionImpl::DOMExceptionImpl):
1430         * kdom/core/DOMExceptionImpl.h:
1431         * kdom/core/DOMList.h:
1432         (KDOM::DOMList::DOMList):
1433         (KDOM::DOMList::~DOMList):
1434         * kdom/core/DOMLocatorImpl.cpp:
1435         (DOMLocatorImpl::DOMLocatorImpl):
1436         * kdom/core/DOMLocatorImpl.h:
1437         * kdom/core/DOMObjectImpl.cpp:
1438         (DOMObjectImpl::DOMObjectImpl):
1439         * kdom/core/DOMObjectImpl.h:
1440         * kdom/core/DOMStringImpl.cpp:
1441         (DOMStringImpl::DOMStringImpl):
1442         * kdom/core/DOMStringImpl.h:
1443         * kdom/core/DOMUserDataImpl.cpp:
1444         (DOMUserDataImpl::DOMUserDataImpl):
1445         * kdom/core/DOMUserDataImpl.h:
1446         * kdom/core/NamedNodeMapImpl.cpp:
1447         (NamedNodeMapImpl::NamedNodeMapImpl):
1448         * kdom/core/NamedNodeMapImpl.h:
1449         * kdom/core/NodeImpl.h:
1450         * kdom/core/NodeListImpl.cpp:
1451         (NodeListImpl::NodeListImpl):
1452         * kdom/core/NodeListImpl.h:
1453         * kdom/core/TypeInfoImpl.cpp:
1454         (TypeInfoImpl::TypeInfoImpl):
1455         * kdom/core/TypeInfoImpl.h:
1456         * kdom/css/CSSRuleListImpl.cpp:
1457         (CSSRuleListImpl::CSSRuleListImpl):
1458         * kdom/css/CSSRuleListImpl.h:
1459         * kdom/css/CounterImpl.cpp:
1460         (CounterImpl::CounterImpl):
1461         * kdom/css/CounterImpl.h:
1462         * kdom/css/RGBColorImpl.cpp:
1463         (RGBColorImpl::RGBColorImpl):
1464         * kdom/css/RGBColorImpl.h:
1465         * kdom/css/RectImpl.cpp:
1466         (RectImpl::RectImpl):
1467         * kdom/css/RectImpl.h:
1468         * kdom/css/RenderStyle.cpp:
1469         (RenderStyle::RenderStyle):
1470         * kdom/css/RenderStyle.h:
1471         (KDOM::RenderStyle::RenderStyle):
1472         * kdom/css/RenderStyleDefs.cpp:
1473         (StyleSurroundData::StyleSurroundData):
1474         (StyleBoxData::StyleBoxData):
1475         (StyleVisualData::StyleVisualData):
1476         (StyleBackgroundData::StyleBackgroundData):
1477         (StyleMarqueeData::StyleMarqueeData):
1478         (StyleCSS3NonInheritedData::StyleCSS3NonInheritedData):
1479         (StyleCSS3InheritedData::StyleCSS3InheritedData):
1480         (StyleInheritedData::StyleInheritedData):
1481         * kdom/css/RenderStyleDefs.h:
1482         (KDOM::BorderData::BorderData):
1483         * kdom/css/StyleSheetListImpl.cpp:
1484         (StyleSheetListImpl::StyleSheetListImpl):
1485         * kdom/css/StyleSheetListImpl.h:
1486         * kdom/events/EventExceptionImpl.cpp:
1487         (EventExceptionImpl::EventExceptionImpl):
1488         * kdom/events/EventExceptionImpl.h:
1489         * kdom/events/EventImpl.cpp:
1490         (EventImpl::EventImpl):
1491         * kdom/events/EventImpl.h:
1492         * kdom/events/EventListenerImpl.cpp:
1493         (EventListenerImpl::EventListenerImpl):
1494         * kdom/events/EventListenerImpl.h:
1495         * kdom/ls/LSExceptionImpl.cpp:
1496         (LSExceptionImpl::LSExceptionImpl):
1497         * kdom/ls/LSExceptionImpl.h:
1498         * kdom/ls/LSInputImpl.cpp:
1499         (LSInputImpl::LSInputImpl):
1500         * kdom/ls/LSInputImpl.h:
1501         * kdom/ls/LSOutputImpl.cpp:
1502         (LSOutputImpl::LSOutputImpl):
1503         * kdom/ls/LSOutputImpl.h:
1504         * kdom/ls/LSParserFilterImpl.cpp:
1505         (LSParserFilterImpl::LSParserFilterImpl):
1506         * kdom/ls/LSParserFilterImpl.h:
1507         * kdom/ls/LSResourceResolverImpl.cpp:
1508         (LSResourceResolverImpl::LSResourceResolverImpl):
1509         * kdom/ls/LSResourceResolverImpl.h:
1510         * kdom/ls/LSSerializerImpl.cpp:
1511         (LSSerializerImpl::LSSerializerImpl):
1512         * kdom/ls/LSSerializerImpl.h:
1513         * kdom/range/RangeExceptionImpl.cpp:
1514         (RangeExceptionImpl::RangeExceptionImpl):
1515         * kdom/range/RangeExceptionImpl.h:
1516         * kdom/range/RangeImpl.cpp:
1517         (RangeImpl::RangeImpl):
1518         * kdom/range/RangeImpl.h:
1519         * kdom/traversal/NodeFilterImpl.cpp:
1520         (NodeFilterImpl::NodeFilterImpl):
1521         * kdom/traversal/NodeFilterImpl.h:
1522         (KDOM::NodeFilterCondition::NodeFilterCondition):
1523         (KDOM::NodeFilterCondition::~NodeFilterCondition):
1524         (KDOM::NodeFilterCondition::acceptNode):
1525         * kdom/traversal/TraversalImpl.cpp:
1526         (TraversalImpl::TraversalImpl):
1527         * kdom/traversal/TraversalImpl.h:
1528         * kdom/views/AbstractViewImpl.cpp:
1529         (AbstractViewImpl::AbstractViewImpl):
1530         * kdom/views/AbstractViewImpl.h:
1531         * kdom/xpath/XPathExceptionImpl.h:
1532         * kdom/xpath/XPathExpressionImpl.h:
1533         * kdom/xpath/XPathNSResolverImpl.h:
1534         * kdom/xpath/XPathResultImpl.h:
1535         * kdom/xpointer/NBCImpl.cpp:
1536         (NBCImpl::NBCImpl):
1537         * kdom/xpointer/NBCImpl.h:
1538         * kdom/xpointer/PointerPartImpl.cpp:
1539         (PointerPartImpl::PointerPartImpl):
1540         * kdom/xpointer/PointerPartImpl.h:
1541         * kdom/xpointer/XPointerExceptionImpl.cpp:
1542         (XPointerExceptionImpl::XPointerExceptionImpl):
1543         * kdom/xpointer/XPointerExceptionImpl.h:
1544         * kdom/xpointer/XPointerExpressionImpl.cpp:
1545         (XPointerExpressionImpl::XPointerExpressionImpl):
1546         * kdom/xpointer/XPointerExpressionImpl.h:
1547         * kdom/xpointer/XPointerResultImpl.cpp:
1548         (XPointerResultImpl::XPointerResultImpl):
1549         * kdom/xpointer/XPointerResultImpl.h:
1550         * ksvg2/css/SVGRenderStyleDefs.cpp:
1551         (StyleFillData::StyleFillData):
1552         (StyleStrokeData::StyleStrokeData):
1553         (StyleStopData::StyleStopData):
1554         (StyleClipData::StyleClipData):
1555         (StyleMarkerData::StyleMarkerData):
1556         (StyleMiscData::StyleMiscData):
1557         * ksvg2/css/SVGRenderStyleDefs.h:
1558         * ksvg2/svg/SVGAngleImpl.cpp:
1559         (SVGAngleImpl::SVGAngleImpl):
1560         * ksvg2/svg/SVGAngleImpl.h:
1561         * ksvg2/svg/SVGAnimatedBooleanImpl.cpp:
1562         (SVGAnimatedBooleanImpl::SVGAnimatedBooleanImpl):
1563         * ksvg2/svg/SVGAnimatedBooleanImpl.h:
1564         * ksvg2/svg/SVGAnimatedEnumerationImpl.cpp:
1565         (SVGAnimatedEnumerationImpl::SVGAnimatedEnumerationImpl):
1566         * ksvg2/svg/SVGAnimatedEnumerationImpl.h:
1567         * ksvg2/svg/SVGAnimatedIntegerImpl.cpp:
1568         (SVGAnimatedIntegerImpl::SVGAnimatedIntegerImpl):
1569         * ksvg2/svg/SVGAnimatedIntegerImpl.h:
1570         * ksvg2/svg/SVGAnimatedNumberImpl.cpp:
1571         (SVGAnimatedNumberImpl::SVGAnimatedNumberImpl):
1572         * ksvg2/svg/SVGAnimatedNumberImpl.h:
1573         * ksvg2/svg/SVGAnimatedTemplate.h:
1574         (KSVG::SVGAnimatedTemplate::SVGAnimatedTemplate):
1575         * ksvg2/svg/SVGExceptionImpl.cpp:
1576         (SVGExceptionImpl::SVGExceptionImpl):
1577         * ksvg2/svg/SVGExceptionImpl.h:
1578         * ksvg2/svg/SVGLengthImpl.cpp:
1579         (SVGLengthImpl::SVGLengthImpl):
1580         * ksvg2/svg/SVGLengthImpl.h:
1581         * ksvg2/svg/SVGMatrixImpl.cpp:
1582         (SVGMatrixImpl::SVGMatrixImpl):
1583         * ksvg2/svg/SVGMatrixImpl.h:
1584         * ksvg2/svg/SVGNumberImpl.cpp:
1585         (SVGNumberImpl::SVGNumberImpl):
1586         * ksvg2/svg/SVGNumberImpl.h:
1587         * ksvg2/svg/SVGPathSegImpl.cpp:
1588         (SVGPathSegImpl::SVGPathSegImpl):
1589         * ksvg2/svg/SVGPathSegImpl.h:
1590         * ksvg2/svg/SVGPointImpl.cpp:
1591         (SVGPointImpl::SVGPointImpl):
1592         * ksvg2/svg/SVGPointImpl.h:
1593         * ksvg2/svg/SVGPreserveAspectRatioImpl.cpp:
1594         (SVGPreserveAspectRatioImpl::SVGPreserveAspectRatioImpl):
1595         * ksvg2/svg/SVGPreserveAspectRatioImpl.h:
1596         * ksvg2/svg/SVGRectImpl.cpp:
1597         (SVGRectImpl::SVGRectImpl):
1598         * ksvg2/svg/SVGRectImpl.h:
1599         * ksvg2/svg/SVGTransformImpl.cpp:
1600         (SVGTransformImpl::SVGTransformImpl):
1601         * ksvg2/svg/SVGTransformImpl.h:
1602
1603 2005-10-23  Eric Seidel  <eseidel@apple.com>
1604
1605         No review, build fix only.
1606
1607         * WebCore.xcodeproj/project.pbxproj: added RenderButton.cpp
1608
1609 2005-10-23  Geoffrey Garen  <ggaren@apple.com>
1610
1611         Reviewed by Maciej.
1612
1613         Removed early return from stopLoading because it prevented
1614         onunload events from firing.
1615
1616         Also, for better abstraction, made the tokenizer -- instead of the 
1617         data source -- responsible for calling [WebFrame _checkLoadComplete]
1618         when the tokenizer stops.
1619
1620         * khtml/html/htmltokenizer.cpp:
1621         (khtml::HTMLTokenizer::stopParsing):
1622         * khtml/khtml_part.cpp:
1623         (KHTMLPart::stopLoading):
1624
1625 2005-10-23 Julien Palmas <julien.palmas@gmail.com>
1626
1627         Reviewed by mjs.
1628
1629         * WebCore+SVG/xml_kdomtokenizer.cpp:
1630         (KDOMTokenizer::KDOMTokenizer): build fix.
1631         http://bugzilla.opendarwin.org/show_bug.cgi?id=5462
1632
1633 2005-10-23  Nicholas Shanks  <contact@nickshanks.com>
1634
1635         Reviewed by Dave Hyatt.
1636
1637         http://bugzilla.opendarwin.org/show_bug.cgi?id=3442
1638         Adds support for :first-of-type CSS3 pseudo-selectors
1639         And builds foundations for :last-of-type and :only-of-type
1640
1641         * khtml/css/css_base.cpp:
1642         (CSSSelector::extractPseudoType):
1643         * khtml/css/css_base.h:
1644         (DOM::CSSSelector::CSSSelector):
1645         (DOM::CSSSelector::~CSSSelector):
1646         (DOM::CSSSelector::):
1647         (DOM::CSSSelector::pseudoType):
1648         (DOM::StyleBaseImpl::StyleBaseImpl):
1649         (DOM::StyleBaseImpl::~StyleBaseImpl):
1650         (DOM::StyleBaseImpl::isStyleSheet):
1651         (DOM::StyleBaseImpl::isCSSStyleSheet):
1652         (DOM::StyleBaseImpl::isStyleSheetList):
1653         (DOM::StyleBaseImpl::isMediaList):
1654         (DOM::StyleBaseImpl::isRuleList):
1655         (DOM::StyleBaseImpl::isRule):
1656         (DOM::StyleBaseImpl::isStyleRule):
1657         (DOM::StyleBaseImpl::isCharetRule):
1658         (DOM::StyleBaseImpl::isImportRule):
1659         (DOM::StyleBaseImpl::isMediaRule):
1660         (DOM::StyleBaseImpl::isFontFaceRule):
1661         (DOM::StyleBaseImpl::isPageRule):
1662         (DOM::StyleBaseImpl::isUnknownRule):
1663         (DOM::StyleBaseImpl::isStyleDeclaration):
1664         (DOM::StyleBaseImpl::isValue):
1665         (DOM::StyleBaseImpl::isPrimitiveValue):
1666         (DOM::StyleBaseImpl::isValueList):
1667         (DOM::StyleBaseImpl::isValueCustom):
1668         (DOM::StyleBaseImpl::setParent):
1669         (DOM::StyleBaseImpl::parseString):
1670         (DOM::StyleBaseImpl::setStrictParsing):
1671         (DOM::StyleBaseImpl::useStrictParsing):
1672         (DOM::StyleListImpl::StyleListImpl):
1673         (DOM::StyleListImpl::length):
1674         (DOM::StyleListImpl::item):
1675         (DOM::StyleListImpl::append):
1676         * khtml/css/cssstyleselector.cpp:
1677         (khtml::CSSStyleSelector::checkSelector):
1678         (khtml::CSSStyleSelector::checkOneSelector):
1679
1680 2005-10-21  David Hyatt  <hyatt@apple.com>
1681
1682         Reviewed by darin
1683
1684         * khtml/css/cssstyleselector.cpp:
1685         Add support for the GrayText CSS2 system color to represent
1686         the disabled text color for controls.
1687         
1688         * khtml/css/html4.css:
1689         Make sure that the default cursor is set for all types of buttons
1690         and not just the HTML4 button.
1691
1692         Set the foreground color for buttons using the CSS2 system color.
1693         Set the disabled text color using the CSS2 system color.
1694
1695         Move the default padding for buttons into the CSS file.  It will
1696         get overridden by Aqua buttons but be honored by all other types
1697         of buttons.  This allows the author to override it as well when
1698         customizing.
1699         
1700         * khtml/rendering/render_block.h:
1701         Make paintChildren virtual so that RenderButton can push a clip
1702         and pop a clip when painting children.
1703         
1704         * khtml/rendering/render_box.cpp:
1705         (RenderBox::paintBoxDecorations):
1706         Let the theme now decide whether the border/background should
1707         still be painted after the theme has painted.  This allows buttons
1708         to paint custom borders but still use a pretty OS X background for
1709         the button face.
1710         
1711         * khtml/rendering/render_button.cpp:
1712         (khtml::RenderButton::paintChildren):
1713         Overridden to push/pop a clip so that the contents of a button
1714         don't ever spill out.
1715         
1716         * khtml/rendering/render_button.h:
1717         Added paintChildren method.
1718         
1719         * khtml/rendering/render_style.h:
1720         (khtml::BorderData::hasBorder):
1721         Fixed a regression in hasBorder.  The border-image logic was
1722         inverted, resulting in hasBorder being true for every element!
1723         
1724         * khtml/rendering/render_theme.cpp:
1725         (khtml::RenderTheme::paint):
1726         Patched to return a boolean indicating whether or not the
1727         border/background should be painted.
1728         
1729         * khtml/rendering/render_theme.h:
1730         * khtml/rendering/render_theme_mac.h:
1731         * khtml/rendering/render_theme_mac.mm:
1732         (khtml::RenderThemeMac::adjustRepaintRect):
1733         Forgot to include radio and button in this method so that repaint
1734         rects would be correct.
1735         
1736         (khtml::RenderThemeMac::paintCheckbox):
1737         (khtml::RenderThemeMac::paintRadio):
1738         Adjusted to return the boolean to indicate that painting of
1739         border/background should not occur.
1740         
1741         (khtml::RenderThemeMac::adjustButtonStyle):
1742         Added support for border/background/colors.  Also locked
1743         white-space to nowrap for Aqua buttons to avoid line wrapping.
1744         
1745         (khtml::RenderThemeMac::setButtonCellState):
1746         (khtml::RenderThemeMac::paintButton):
1747         More support for custom border/background/color.
1748         
1749 2005-10-21  Geoffrey Garen  <ggaren@apple.com>
1750
1751         Reviewed by darin.
1752
1753         WebCore side of fix for <rdar://problem/4184719> window.print() followed by window.close() 
1754         causes world leak
1755
1756         No test case added because I have another reviewed patch that will include a test
1757         for this bug as well as many others.
1758
1759         Under some conditions, [WebDataSource stopLoading] did not set [WebDataSource isLoading]
1760         to false, so the didFInishLoad delegates never fired.
1761         
1762         The reason isLoading didn't become false was that the tokenizer was still running.
1763         The fix here is to add a call to Tokenizer::stopParsing inside HTMLPart::stopLoading. 
1764         
1765         Since the WebKit side of the fix eliminates an early return that used to protect
1766         HTMLPart::stopLoading from multiple calls, I added an early return inside
1767         HTMLPart::stopLoading.
1768
1769         I also merged stopped and stopLoading, and merged the way XMLTokenizer and HTMLTokenizer
1770         track whether they're in a stopped state, because anything less would be uncivilized.
1771         
1772         * khtml/html/htmltokenizer.cpp:
1773         (khtml::HTMLTokenizer::HTMLTokenizer):
1774         (khtml::HTMLTokenizer::write):
1775         (khtml::HTMLTokenizer::stopParsing):
1776         (khtml::HTMLTokenizer::processToken):
1777         * khtml/html/htmltokenizer.h:
1778         * khtml/khtml_part.cpp:
1779         (KHTMLPart::stopLoading):
1780         (KHTMLPart::endIfNotLoading):
1781         (KHTMLPart::stop):
1782         * khtml/xml/xml_tokenizer.cpp:
1783         (khtml::Tokenizer::Tokenizer):
1784         (khtml::Tokenizer::finishedParsing):
1785         (khtml::XMLTokenizer::XMLTokenizer):
1786         (khtml::XMLTokenizer::endElementNs):
1787         (khtml::XMLTokenizer::characters):
1788         (khtml::XMLTokenizer::error):
1789         (khtml::XMLTokenizer::processingInstruction):
1790         (khtml::XMLTokenizer::cdataBlock):
1791         (khtml::XMLTokenizer::comment):
1792         (khtml::XMLTokenizer::stopParsing):
1793         * khtml/xml/xml_tokenizer.h:
1794         (khtml::Tokenizer::stopParsing):
1795         * kwq/KWQSignalStubs.mm:
1796         (Loader::requestStarted):
1797
1798 2005-10-21  Beth Dakin  <bdakin@apple.com>
1799
1800         Reviewed by Hyatt
1801
1802         Fix for <rdar://problem/3947202> certain sequence of DOM 
1803         method calls involving CSS outline and display crashes Safari 
1804         (in repaint code).
1805
1806         * khtml/rendering/render_flow.cpp:
1807         (RenderFlow::destroy): Need to set m_continuation to 0 after it
1808         is destroyed to prevent possible crashes.
1809
1810 2005-10-21  Vicki Murley  <vicki@apple.com>
1811
1812         Reviewed by John.
1813  
1814         - fixed <rdar://problem/4304213> sometimes have to click twice to jump to top, on href=""
1815
1816         * manual-tests/linkjump-1.html: Added.
1817         * khtml/khtml_part.cpp:
1818         (KHTMLPart::gotoAnchor): remove check for m_url.hasRef() - encodedHtmlRef and gotoAnchor handle empty 
1819         strings for scrolling to the top of the document
1820
1821 2005-10-21  John Sullivan  <sullivan@apple.com>
1822
1823         No test cases added.
1824         
1825         * khtml/rendering/render_theme_mac.mm:
1826         (khtml::RenderThemeMac::setButtonPaddingFromControlSize):
1827         fix deployment build by adding default: statement to button-size switch statement
1828
1829 2005-10-21  Beth Dakin  <bdakin@apple.com>
1830
1831         Reviewed by Hyatt
1832
1833         Fix for <rdar://problem/3847926> crash due to infinite 
1834         layout regression in RenderLayer::updateScrollInfoAfterLayout 
1835         (was at ourmedia.org)
1836
1837         Cannot use hasOverhangingFloats() in this case because
1838         borderBottom() has already been added into m_height.
1839         This was causing m_height to be off by a pixel in some
1840         cases and then causing infinite recursion in the scroll
1841         bar code.
1842
1843         * khtml/rendering/render_block.cpp: Replaced call to
1844                                         hasOverhangingFloats()
1845         (khtml::RenderBlock::layoutBlock):
1846
1847 2005-10-21  Beth Dakin  <bdakin@apple.com>
1848
1849         Reviewed by Hyatt...sort of.
1850
1851         No test cases added.
1852
1853         Fix for a build failure after Hyatt's button check-in. KWQSlider.mm was
1854         still importing the now deprecated KWQButton.h
1855
1856         Changed it to import KWQLineEdit.h instead.
1857
1858         * kwq/KWQSlider.mm:
1859
1860 2005-10-21  David Hyatt  <hyatt@apple.com>
1861
1862         Land the new "NSView-less" buttons.  With this landing both
1863         <input type=button> and <button> will now look like OS X-style
1864         widgets.  Customization of background and border is not yet
1865         enabled, but this is still a big improvement over the old
1866         AppKit widgets.
1867         
1868         Reviewed by mjs
1869
1870         * ForwardingHeaders/qpushbutton.h: Removed.
1871         * WebCore.xcodeproj/project.pbxproj:
1872         * khtml/css/cssstyleselector.cpp:
1873         (khtml::CSSStyleSelector::adjustRenderStyle):
1874         * khtml/css/cssstyleselector.h:
1875         (khtml::CSSStyleSelector::paintMetrics):
1876         * khtml/css/cssvalues.in:
1877         * khtml/css/html4.css:
1878         * khtml/html/html_formimpl.cpp:
1879         (DOM::HTMLButtonElementImpl::createRenderer):
1880         (DOM::HTMLInputElementImpl::click):
1881         (DOM::HTMLInputElementImpl::createRenderer):
1882         * khtml/html/html_formimpl.h:
1883         (DOM::HTMLInputElementImpl::isTextButton):
1884         * khtml/rendering/render_button.cpp: Added.
1885         (khtml::m_inner):
1886         (khtml::RenderButton::~RenderButton):
1887         (khtml::RenderButton::addChild):
1888         (khtml::RenderButton::removeChild):
1889         (khtml::RenderButton::setStyle):
1890         (khtml::RenderButton::updateFromElement):
1891         * khtml/rendering/render_button.h: Added.
1892         (khtml::RenderButton::removeLeftoverAnonymousBoxes):
1893         (khtml::RenderButton::renderName):
1894         * khtml/rendering/render_form.cpp:
1895         * khtml/rendering/render_form.h:
1896         (khtml::RenderFileButton::calcReplacedHeight):
1897         (khtml::RenderFileButton::isEditable):
1898         * khtml/rendering/render_style.h:
1899         (khtml::):
1900         * khtml/rendering/render_theme.cpp:
1901         (khtml::RenderTheme::adjustStyle):
1902         (khtml::RenderTheme::paint):
1903         (khtml::RenderTheme::adjustCheckboxStyle):
1904         (khtml::RenderTheme::adjustRadioStyle):
1905         (khtml::RenderTheme::adjustButtonStyle):
1906         * khtml/rendering/render_theme.h:
1907         (khtml::RenderTheme::setButtonSize):
1908         * khtml/rendering/render_theme_mac.h:
1909         * khtml/rendering/render_theme_mac.mm:
1910         (khtml::RenderThemeMac::setSizeFromFont):
1911         (khtml::RenderThemeMac::setFontFromControlSize):
1912         (khtml::RenderThemeMac::addIntrinsicMargins):
1913         (khtml::RenderThemeMac::setButtonPaddingFromControlSize):
1914         (khtml::RenderThemeMac::adjustButtonStyle):
1915         (khtml::RenderThemeMac::buttonSizes):
1916         (khtml::RenderThemeMac::buttonMargins):
1917         (khtml::RenderThemeMac::setButtonSize):
1918         (khtml::RenderThemeMac::setButtonCellState):
1919         (khtml::RenderThemeMac::paintButton):
1920         * kwq/KWQAccObject.mm:
1921         (-[KWQAccObject actionElement]):
1922         (-[KWQAccObject role]):
1923         (-[KWQAccObject title]):
1924         * kwq/KWQButton.h: Removed.
1925         * kwq/KWQButton.mm: Removed.
1926         * kwq/KWQComboBox.mm:
1927         * kwq/KWQLineEdit.h:
1928         * kwq/KWQLineEdit.mm:
1929         * kwq/KWQPushButton.h: Removed.
1930         * kwq/KWQPushButton.mm: Removed.
1931
1932 2005-10-19  Darin Adler  <darin@apple.com>
1933
1934         Reviewed by Maciej.
1935
1936         - optimizations for a total of about 1% speed-up on PLT
1937
1938         * khtml/html/htmltokenizer.cpp:
1939         (khtml::fixUpChar): Changed to be more inlinable.
1940         (khtml::HTMLTokenizer::processListing): Simplified the skipLF handling.
1941         (khtml::HTMLTokenizer::parseSpecial): Changed to call the new fixUpChar.
1942         (khtml::HTMLTokenizer::parseText): Simplified the skipLF handling and
1943         changed to call the new fixUpChar.
1944         (khtml::HTMLTokenizer::parseEntity): Changed to call the new fixUpChar.
1945         (khtml::HTMLTokenizer::parseTag): Changed to call the new fixUpChar.
1946         (khtml::HTMLTokenizer::write): Changed to call the new fixUpChar.
1947
1948         * khtml/rendering/font.h: Removed the floatCharacterWidths function,
1949         since it's never needed. Made some more functions inline.
1950         * khtml/rendering/font.cpp: Removed lots of stuff that was only for the
1951         !APPLE_CHANGES case.
1952
1953         * kwq/KWQFontMetrics.h: Removed the single-character width overloads, charWidth,
1954         and floatCharacterWidths.
1955         * kwq/KWQFontMetrics.mm:
1956         (QFontMetrics::width): Use lroundf instead of the ROUND_TO_INT macro.
1957         (QFontMetrics::floatWidth): Removed the bogus unneeded call to the ROUND_TO_INT macro.
1958
1959         * khtml/rendering/render_text.cpp:
1960         (RenderText::cacheWidths): Use floatWidth instead of floatCharacterWidths.
1961
1962         * kwq/KWQComboBox.mm: (QComboBox::sizeHint): Update since the floatWidthForRun
1963         method no longer takes a widths parameter.
1964         * kwq/KWQLineEdit.mm: (QLineEdit::sizeForCharacterWidth): Ditto.
1965         * kwq/KWQListBox.mm:
1966         (QListBox::sizeForNumberOfLines): Ditto.
1967         (-[KWQTableView drawRow:clipRect:]): Ditto.
1968         * kwq/KWQPainter.mm: (QPainter::drawText): Ditto. Also use lroundf instead of the
1969         ROUND_TO_INT macro.
1970
1971         * kwq/WebCoreTextRenderer.h: Removed the ROUND_TO_INT macro. Changed to use bool
1972         instead of bit fields. Removed the widths parameter from the floatWidthForRun method.
1973
1974 2005-10-19  Maciej Stachowiak  <mjs@apple.com>
1975
1976         Reviewed by Dave.
1977
1978         - instead of walking the render tree to update widget positions, instead
1979         keep a set of widgets per canvas, maintained by the constructor and destroy method
1980         for RenderWidget. About a .5% speedup.
1981
1982         * khtml/khtmlview.cpp:
1983         (KHTMLView::layout):
1984         * khtml/rendering/render_canvas.cpp:
1985         (RenderCanvas::updateWidgetPositions):
1986         (RenderCanvas::addWidget):
1987         (RenderCanvas::removeWidget):
1988         * khtml/rendering/render_canvas.h:
1989         * khtml/rendering/render_frames.cpp:
1990         (RenderPart::updateWidgetPosition):
1991         (RenderPart::needWidgetPositionUpdating):
1992         * khtml/rendering/render_frames.h:
1993         * khtml/rendering/render_layer.cpp:
1994         (khtml::RenderLayer::scrollToOffset):
1995         * khtml/rendering/render_object.cpp:
1996         (RenderObject::updateWidgetPosition):
1997         (RenderObject::needWidgetPositionUpdating):
1998         * khtml/rendering/render_object.h:
1999         * khtml/rendering/render_replaced.cpp:
2000         (RenderWidget::RenderWidget):
2001         (RenderWidget::destroy):
2002         (RenderWidget::updateWidgetPosition):
2003         (RenderWidget::needWidgetPositionUpdating):
2004         * khtml/rendering/render_replaced.h:
2005
2006 2005-10-18  Darin Adler  <darin@apple.com>
2007
2008         Reviewed and landed by Maciej.
2009
2010         - some simple changes that amount to a < 1% speedup.
2011
2012         * khtml/css/cssstyleselector.cpp:
2013         (khtml::CSSStyleSelector::applyProperty):
2014         * khtml/rendering/bidi.cpp:
2015         (khtml::BidiIterator::direction):
2016         * kwq/KWQKURL.mm:
2017         (hasSlashDotOrDotDot):
2018         * kwq/KWQString.mm:
2019         (QString::~QString):
2020         * kwq/WebCoreTextRendererFactory.h:
2021
2022 2005-10-18  Maciej Stachowiak  <mjs@apple.com>
2023
2024         - back out the last change, it caused a regression with painting of offscreen plugins
2025
2026         * khtml/khtmlview.cpp:
2027         (KHTMLView::layout):
2028         * khtml/rendering/render_form.cpp:
2029         (RenderFormElement::layout):
2030         * khtml/rendering/render_frames.cpp:
2031         (RenderPartObject::layout):
2032         (RenderPart::updateWidgetPositions):
2033         * khtml/rendering/render_frames.h:
2034         * khtml/rendering/render_layer.cpp:
2035         (khtml::RenderLayer::scrollToOffset):
2036         * khtml/rendering/render_object.cpp:
2037         (RenderObject::updateWidgetPositions):
2038         * khtml/rendering/render_object.h:
2039         * khtml/rendering/render_replaced.cpp:
2040         (RenderWidget::layout):
2041         (RenderWidget::updateWidgetPositions):
2042         * khtml/rendering/render_replaced.h:
2043
2044 2005-10-18  Maciej Stachowiak  <mjs@apple.com>
2045
2046         Reviewed by Dave Hyatt.
2047         Committed by John Sullivan.
2048
2049         - .5% or so speedup by removing updateWidgetPositions
2050
2051         Instead, widget sizes are calculated in layout and widget positions are set at
2052         paint time, with the same kind of special handling for incremental repaint that
2053         RenderImage does.
2054
2055         * khtml/khtmlview.cpp:
2056         (KHTMLView::layout):
2057         * khtml/rendering/render_form.cpp:
2058         (RenderFormElement::layout):
2059         * khtml/rendering/render_frames.cpp:
2060         (RenderPartObject::layout):
2061         * khtml/rendering/render_frames.h:
2062         * khtml/rendering/render_layer.cpp:
2063         (khtml::RenderLayer::scrollToOffset):
2064         * khtml/rendering/render_object.cpp:
2065         * khtml/rendering/render_object.h:
2066         * khtml/rendering/render_replaced.cpp:
2067         (RenderWidget::layout):
2068         * khtml/rendering/render_replaced.h:
2069
2070 2005-10-17  Maciej Stachowiak  <mjs@apple.com>
2071
2072         Reviewed by Geoff.
2073
2074         Speed up the tokenizer by keeping more state on the stack instead of in the object,
2075         to avoid load-store traffic. About a .5% speedup.
2076
2077         * khtml/html/htmltokenizer.cpp:
2078         (khtml::HTMLTokenizer::HTMLTokenizer):
2079         (khtml::HTMLTokenizer::reset):
2080         (khtml::HTMLTokenizer::begin):
2081         (khtml::HTMLTokenizer::setForceSynchronous):
2082         (khtml::HTMLTokenizer::processListing):
2083         (khtml::HTMLTokenizer::parseSpecial):
2084         (khtml::HTMLTokenizer::scriptHandler):
2085         (khtml::HTMLTokenizer::scriptExecution):
2086         (khtml::HTMLTokenizer::parseComment):
2087         (khtml::HTMLTokenizer::parseServer):
2088         (khtml::HTMLTokenizer::parseProcessingInstruction):
2089         (khtml::HTMLTokenizer::parseText):
2090         (khtml::HTMLTokenizer::parseEntity):
2091         (khtml::HTMLTokenizer::parseTag):
2092         (khtml::HTMLTokenizer::continueProcessing):
2093         (khtml::HTMLTokenizer::write):
2094         (khtml::HTMLTokenizer::allDataProcessed):
2095         (khtml::HTMLTokenizer::end):
2096         (khtml::HTMLTokenizer::finish):
2097         (khtml::HTMLTokenizer::notifyFinished):
2098         (khtml::HTMLTokenizer::isWaitingForScripts):
2099         * khtml/html/htmltokenizer.h:
2100         (khtml::HTMLTokenizer::):
2101         (khtml::HTMLTokenizer::State::State):
2102         (khtml::HTMLTokenizer::State::tagState):
2103         (khtml::HTMLTokenizer::State::setTagState):
2104         (khtml::HTMLTokenizer::State::entityState):
2105         (khtml::HTMLTokenizer::State::setEntityState):
2106         (khtml::HTMLTokenizer::State::inScript):
2107         (khtml::HTMLTokenizer::State::setInScript):
2108         (khtml::HTMLTokenizer::State::inStyle):
2109         (khtml::HTMLTokenizer::State::setInStyle):
2110         (khtml::HTMLTokenizer::State::inSelect):
2111         (khtml::HTMLTokenizer::State::setInSelect):
2112         (khtml::HTMLTokenizer::State::inXmp):
2113         (khtml::HTMLTokenizer::State::setInXmp):
2114         (khtml::HTMLTokenizer::State::inTitle):
2115         (khtml::HTMLTokenizer::State::setInTitle):
2116         (khtml::HTMLTokenizer::State::inPlainText):
2117         (khtml::HTMLTokenizer::State::setInPlainText):
2118         (khtml::HTMLTokenizer::State::inProcessingInstruction):
2119         (khtml::HTMLTokenizer::State::setInProcessingInstruction):
2120         (khtml::HTMLTokenizer::State::inComment):
2121         (khtml::HTMLTokenizer::State::setInComment):
2122         (khtml::HTMLTokenizer::State::inTextArea):
2123         (khtml::HTMLTokenizer::State::setInTextArea):
2124         (khtml::HTMLTokenizer::State::escaped):
2125         (khtml::HTMLTokenizer::State::setEscaped):
2126         (khtml::HTMLTokenizer::State::inServer):
2127         (khtml::HTMLTokenizer::State::setInServer):
2128         (khtml::HTMLTokenizer::State::skipLF):
2129         (khtml::HTMLTokenizer::State::setSkipLF):
2130         (khtml::HTMLTokenizer::State::startTag):
2131         (khtml::HTMLTokenizer::State::setStartTag):
2132         (khtml::HTMLTokenizer::State::discardLF):
2133         (khtml::HTMLTokenizer::State::setDiscardLF):
2134         (khtml::HTMLTokenizer::State::allowYield):
2135         (khtml::HTMLTokenizer::State::setAllowYield):
2136         (khtml::HTMLTokenizer::State::loadingExtScript):
2137         (khtml::HTMLTokenizer::State::setLoadingExtScript):
2138         (khtml::HTMLTokenizer::State::forceSynchronous):
2139         (khtml::HTMLTokenizer::State::setForceSynchronous):
2140         (khtml::HTMLTokenizer::State::inAnySpecial):
2141         (khtml::HTMLTokenizer::State::hasTagState):
2142         (khtml::HTMLTokenizer::State::hasEntityState):
2143         (khtml::HTMLTokenizer::State::):
2144         (khtml::HTMLTokenizer::State::setBit):
2145         (khtml::HTMLTokenizer::State::testBit):
2146         * khtml/rendering/bidi.cpp:
2147         (khtml::RenderBlock::checkLinesForTextOverflow):
2148         * khtml/rendering/render_block.cpp:
2149         (khtml::RenderBlock::updateFirstLetter):
2150         * khtml/rendering/render_flow.cpp:
2151         (RenderFlow::caretRect):
2152         * khtml/rendering/render_line.cpp:
2153         (khtml::EllipsisBox::paint):
2154         * khtml/rendering/render_object.cpp:
2155         (RenderObject::firstLineStyle):
2156         * khtml/rendering/render_object.h:
2157         (khtml::RenderObject::style):
2158
2159 2005-10-17  Maciej Stachowiak  <mjs@apple.com>
2160
2161         - temporarily back out hyatt's recent changes since the tree was closed
2162
2163         * khtml/rendering/render_container.cpp:
2164         (RenderContainer::destroy):
2165         (RenderContainer::destroyChildren):
2166         * khtml/rendering/render_container.h:
2167         * khtml/rendering/render_flow.cpp:
2168         (RenderFlow::destroy):
2169         * khtml/rendering/render_layer.cpp:
2170         (khtml::RenderLayer::isTransparent):
2171         (khtml::RenderLayer::paintLayer):
2172         (khtml::sortByZOrder):
2173         * khtml/rendering/render_layer.h:
2174
2175 2005-10-17  David Hyatt  <hyatt@apple.com>
2176
2177         Fix for bugzilla bug 5283.  Make overflow layers lose to other kinds of
2178         layers if z-index is equivalent.  Technically overflow isn't even supposed
2179         to establish a stacking context, so the use of RenderLayer for overflow,
2180         although elegant and simple, isn't correct.  This patch is essentially a hack
2181         to make the common problem go away, but the deeper mistake remains.
2182         
2183         Reviewed by eseidel
2184
2185         * khtml/rendering/render_layer.cpp:
2186         (khtml::RenderLayer::isTransparent):
2187         (khtml::RenderLayer::paintLayer):
2188         (khtml::isOverflowOnly):
2189         (khtml::compare):
2190         (khtml::sortByZOrder):
2191         * khtml/rendering/render_layer.h:
2192
2193 2005-10-16  David Hyatt  <hyatt@apple.com>
2194
2195         Clean up the deletion of anonymous boxes in the render tree.
2196         Renamed methods to make it more clear and also added comments.
2197         
2198         Reviewed by bdakin
2199
2200         * khtml/rendering/render_container.cpp:
2201         (RenderContainer::destroy):
2202         (RenderContainer::destroyLeftoverAnonymousChildren):
2203         * khtml/rendering/render_container.h:
2204         * khtml/rendering/render_flow.cpp:
2205         (RenderFlow::destroy):
2206
2207 2005-10-15  Maciej Stachowiak  <mjs@apple.com>
2208
2209         Backed out the following changes, since they are in a range that
2210         provably caused a performance regression:
2211
2212         <rdar://problem/4302874> Denver Regression: crash repeatedly reloading www.supermanhomepage.com
2213         <rdar://problem/4302879> Re-land SVG object element fix
2214         <rdar://problem/4302880> Re-land isSameNode change
2215         <rdar://problem/4065748> Repro crash at http://www.vanaqua.org using menu system (KHTMLParser::setCurrent(DOM::NodeImpl*))
2216         
2217         * khtml/ecma/kjs_dom.cpp:
2218         (KJS::DOMNodeProtoFunc::callAsFunction):
2219         * khtml/ecma/kjs_dom.h:
2220         (KJS::DOMNode::):
2221         * khtml/ecma/kjs_events.cpp:
2222         (KJS::JSAbstractEventListener::handleEvent):
2223         * khtml/html/html_objectimpl.cpp:
2224         (DOM::HTMLObjectElementImpl::isImageType):
2225         * khtml/html/htmlparser.cpp:
2226         (HTMLStackElem::HTMLStackElem):
2227         (HTMLParser::popNestedHeaderTag):
2228         (HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
2229         (HTMLParser::popOneBlock):
2230         * khtml/xml/dom_nodeimpl.h:
2231         * kwq/DOM.mm:
2232
2233 2005-10-14  Geoffrey Garen  <ggaren@apple.com>
2234
2235         Style change suggested by Darin.
2236
2237         * khtml/html/htmltokenizer.cpp:
2238         (khtml::HTMLTokenizer::scriptHandler): Added "Bugzilla" prefix to bug #.
2239
2240 2005-10-14  Julien Palmas <julien.palmas@mac.com>
2241
2242         Reviewed by eseidel.
2243
2244         Fixed crash when animating unsupported elements.
2245         http://bugzilla.opendarwin.org/show_bug.cgi?id=5336
2246
2247         * ksvg2/svg/SVGAnimationElementImpl.cpp:
2248         (SVGAnimationElementImpl::targetElement):
2249
2250 2005-10-13  Justin Garcia  <justin.garcia@apple.com>
2251
2252         Reviewed by hyatt
2253
2254         <rdar://problem/3643259> contentEditable=true elements do not acquire the caret or focus halo when overflow:scroll
2255
2256         Test cases added:
2257         * fast/clip/outline-overflowClip
2258         Test cases changed (since I added the outline rect to the render tree dump)
2259         * fast/clip/001
2260         * fast/clip/009
2261         * fast/clip/010
2262         * fast/clip/011
2263         * fast/clip/012
2264         * fast/clip/013
2265         * fast/clip/014
2266         * fast/clip/016
2267
2268         * khtml/rendering/render_layer.cpp: 
2269         Clip the outline by a new rect, which is equal to the foreground rect w/o clipping
2270         by the overflow rect.
2271         
2272         (khtml::RenderLayer::paintLayer):
2273         (khtml::RenderLayer::hitTestLayer):
2274         (khtml::RenderLayer::calculateRects):
2275         * khtml/rendering/render_layer.h:
2276         * kwq/KWQRenderTreeDebug.cpp:
2277         (write):
2278         (writeLayers):
2279
2280 2005-10-13  Antti Koivisto  <koivisto@iki.fi>
2281
2282         Reviewed by Darin.
2283
2284         no need to calculate linewidth multiple times in findnextlinebreak()
2285         http://bugzilla.opendarwin.org/show_bug.cgi?id=5319
2286
2287         No test case needed, this is a simple optimization.
2288
2289         * khtml/rendering/bidi.cpp:
2290         (khtml::RenderBlock::findNextLineBreak):
2291
2292 2005-10-13  Geoffrey Garen  <ggaren@apple.com>
2293
2294         - Fixed <rdar://problem/4259434> Safari crashes in HTMLTokenizer::~HTMLTokenizer() 
2295           at http://www.timewarner.com/corp/careers/jobtools_us/index.html
2296
2297         I changed the test for whether to put a script in the "to be executed" queue to
2298         match the test for whether to ref a script, so that scripts can't end up in the
2299         queue without being refed.
2300
2301         I also renamed cachedScript to pendingScripts.
2302
2303         Reviewed by Darin.
2304
2305         No test case because the crash isn't deterministically reproducible.
2306         However, I did add assertions that should catch the underlying bug
2307         in the future.
2308
2309         * khtml/html/htmltokenizer.cpp:
2310         (khtml::HTMLTokenizer::reset):
2311         (khtml::HTMLTokenizer::scriptHandler):
2312         (khtml::HTMLTokenizer::write):
2313         (khtml::HTMLTokenizer::notifyFinished):
2314         * khtml/html/htmltokenizer.h:
2315
2316 2005-10-13  Rob Buis  <rwlbuis@xs4all.nl>
2317
2318         Reviewed by eseidel.
2319
2320         Test cases updated:
2321         * svg-tests/W3C-SVG-1.1/filters-color-01-b-expected.checksum:
2322         * svg-tests/W3C-SVG-1.1/filters-color-01-b-expected.png:
2323         * svg-tests/W3C-SVG-1.1/filters-color-01-b-expected.txt:
2324         * svg-tests/W3C-SVG-1.1/struct-symbol-01-b-expected.checksum:
2325         * svg-tests/W3C-SVG-1.1/struct-symbol-01-b-expected.png:
2326         * svg-tests/W3C-SVG-1.1/struct-symbol-01-b-expected.txt:
2327
2328         Fixed <svg> to base %lengths off of the nearest viewbox.
2329         http://bugzilla.opendarwin.org/show_bug.cgi?id=5326
2330
2331         * ksvg2/svg/SVGPreserveAspectRatioImpl.cpp:
2332         (SVGPreserveAspectRatioImpl::SVGPreserveAspectRatioImpl):
2333         * ksvg2/svg/SVGSVGElementImpl.cpp:
2334         (SVGSVGElementImpl::x):
2335         (SVGSVGElementImpl::y):
2336         (SVGSVGElementImpl::width):
2337         (SVGSVGElementImpl::height):
2338
2339 2005-10-12  Vicki Murley  <vicki@apple.com>
2340
2341         Reviewed by Hyatt.
2342
2343         - fix <rdar://problem/4288266> createElement does not validate names when called in an HTML document (4566)
2344
2345         * khtml/html/html_documentimpl.cpp:
2346         (DOM::HTMLDocumentImpl::createElement): 
2347
2348 2005-10-12  Beth Dakin  <bdakin@apple.com>
2349
2350         Reviewed by Hyatt
2351
2352         Fix for <rdar://problem/4112378> CSS :hover:after crash - khtml::inlineWidth
2353         RenderFlows needed to destroy all of their children within RenderFlow. This
2354         used to happen only in RenderFlow's parent class, RenderContainer. But for
2355         some children to be completely destroyed, the parent flow still needs to be
2356         around. Specifically in the case when there is generated content and a line
2357         break, which maintained a stray reference to the destroyed RenderObject through 
2358         the lineBreakObj() of a RootInlineBox. 
2359
2360         * khtml/rendering/render_container.cpp: 
2361         (RenderContainer::destroy): Took the destruction of children out of destroy(),
2362                                 moved to new function, and only call function when m_first
2363                                 is still around.
2364         (RenderContainer::destroyChildren): New function for destruction of children.
2365         * khtml/rendering/render_container.h:
2366         * khtml/rendering/render_flow.cpp:
2367         (RenderFlow::destroy): Call RenderContainer::destroyChildren() at the beginning.
2368
2369 2005-10-11  Darin Adler  <darin@apple.com>
2370
2371         Reviewed by Eric.
2372
2373         Crash: Drag element with CSS ::Before absolute positioning applied to it
2374         http://bugzilla.opendarwin.org/show_bug.cgi?id=4088
2375
2376         * kwq/KWQKHTMLPart.mm:
2377         (KWQKHTMLPart::khtmlMouseMoveEvent):
2378
2379 2005-10-11  Timothy Hatcher  <timothy@apple.com>
2380
2381         Reviewed by Darin.
2382
2383         workaround for <rdar://problem/4294625> to fix our build
2384         
2385         * kwq/KWQPointArray.h:
2386         * kwq/KWQSize.h:
2387
2388 2005-10-10  Justin Garcia  <justin.garcia@apple.com>
2389
2390         Reviewed by eric
2391         
2392         <rdar://problem/4283218> M-JPEG / Server Push and JavaScript
2393         
2394         Ignore multipart loads in numRequests, call checkCompleted() after each section is complete.
2395
2396         * khtml/misc/loader.cpp:
2397         
2398 2005-10-11  Adele Peterson  <adele@apple.com>
2399
2400         Rolling out fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=5195
2401         since it caused:
2402
2403         REGRESSION text areas draw focus ring around each glyph, no caret in text fields
2404         http://bugzilla.opendarwin.org/show_bug.cgi?id=5335
2405
2406         And updated expected results.
2407         * fast/clip/014-expected.checksum: Updated.
2408         * fast/clip/014-expected.png: Updated.
2409
2410         * kwq/KWQTextArea.h:
2411         * kwq/KWQTextArea.mm:
2412         (-[KWQTextAreaTextView displayRectIgnoringOpacity:]):
2413         (-[KWQTextAreaTextView textView:shouldDrawInsertionPointInRect:color:turnedOn:]):
2414         * kwq/KWQTextField.h:
2415         * kwq/KWQTextField.mm:
2416         (-[KWQTextFieldController setInDrawingMachinery:]):
2417         (-[KWQTextFieldController textView:shouldDrawInsertionPointInRect:color:turnedOn:]):
2418         (-[KWQTextField displayRectIgnoringOpacity:]):
2419         (-[KWQSecureTextField displayRectIgnoringOpacity:]):
2420         (-[KWQSearchField displayRectIgnoringOpacity:]):
2421         * kwq/KWQWidget.h:
2422         * kwq/KWQWidget.mm:
2423         (QWidget::QWidget):
2424         (QWidget::~QWidget):
2425         (QWidget::paint):
2426         (QWidget::setDeferFirstResponderChanges):
2427
2428 2005-10-11  Rob Buis  <rwlbuis@xs4all.nl>>
2429
2430         Reviewed by eseidel.
2431
2432         Fix SVGSymbolElementImpl to not warn when inheriting viewbox.
2433         http://bugzilla.opendarwin.org/show_bug.cgi?id=5278
2434
2435         * ksvg2/svg/SVGUseElementImpl.cpp:
2436         (SVGUseElementImpl::close):
2437
2438 2005-10-11  Julien Palmas <julien.palmas@mac.com>
2439
2440         Reviewed by eseidel.
2441
2442         Fixes WebCore+SVG build under gcc 3.3
2443         http://bugzilla.opendarwin.org/show_bug.cgi?id=5301
2444
2445         * WebCore+SVG/DrawCanvasItem.mm:
2446         * WebCore+SVG/DrawView.mm:
2447         (-[DrawDocument drawRect:initWithDrawView:]):
2448         * kwq/KWQSlot.mm:
2449
2450 2005-10-10  Geoffrey Garen  <ggaren@apple.com>
2451
2452         - Fixed <rdar://problem/4245682> Regression: CrashTracer: 923 crashes 
2453           in Safari at com.apple.WebCore: KJS::Window::clear + 132
2454
2455         Reviewed by mjs.
2456
2457         No test case because this crash isn't reliably reproducible.
2458
2459         * khtml/ecma/kjs_window.cpp:
2460         (KJS::Window::Window): Initialize m_returnValueSlot to 0, so that we
2461         know not to write to it until it's explicitly set to a valid address.
2462
2463 2005-10-10  Darin Adler  <darin@apple.com>
2464
2465         Reviewed by Maciej.
2466
2467         - finished fixing http://bugzilla.opendarwin.org/show_bug.cgi?id=5195
2468           Would like API to flush rendering of pending DOM changes
2469
2470         The first half of the fix alone broke DumpRenderTree. Better now.
2471
2472         * kwq/KWQWidget.h: Made paint non-virtual (it had no reason to be virtual in KWQ) and
2473         added an isPainting function.
2474         * kwq/KWQWidget.mm:
2475         (QWidget::QWidget): Added painting boolean (actually a count).
2476         (QWidget::~QWidget): Check that painting is 0 when the widget is destroyed.
2477         (QWidget::paint): Use SPI to draw in a way that works no matter what context we are in.
2478         (QWidget::isPainting): Return true if inside the paint function.
2479
2480         * kwq/KWQTextArea.h: Remove inDrawingMachinery field since we can use isPainting now.
2481         * kwq/KWQTextArea.mm:
2482         (-[KWQTextAreaTextView textView:shouldDrawInsertionPointInRect:color:turnedOn:]):
2483         Use isPainting() instead of inDrawingMachinery. inDrawingMachinery required that we
2484         use displayRectIgnoringOpacity: to paint, which we no longer do.
2485         * kwq/KWQTextField.h: More of the same.
2486         * kwq/KWQTextField.mm:
2487         (-[KWQTextFieldController textView:shouldDrawInsertionPointInRect:color:turnedOn:]):
2488         Ditto.
2489
2490 2005-10-10  Darin Adler  <darin@apple.com>
2491
2492         Reviewed by eseidel.
2493
2494         Mem leak fixes in xslt code.
2495         http://bugzilla.opendarwin.org/show_bug.cgi?id=5320
2496
2497         * khtml/xml/dom_docimpl.cpp:
2498         (DocumentImpl::applyXSLTransform):
2499         (DocumentImpl::setTransformSourceDocument):
2500         * khtml/xml/xml_tokenizer.cpp:
2501         (khtml::parseXMLDocumentFragment):
2502         * khtml/xsl/xslt_processorimpl.cpp:
2503         (DOM::XSLTProcessorImpl::XSLTProcessorImpl):
2504         (DOM::XSLTProcessorImpl::~XSLTProcessorImpl):
2505         (DOM::stylesheetLoadFunc):
2506         (DOM::XSLTProcessorImpl::transformDocument):
2507         (DOM::XSLTProcessorImpl::documentFromXMLDocPtr):
2508         * khtml/xsl/xslt_processorimpl.h:
2509         (DOM::XSLTProcessorImpl::stylesheet):
2510         (DOM::XSLTProcessorImpl::sourceDocument):
2511
2512 2005-10-09  David Hyatt  <hyatt@apple.com>
2513
2514         Land fix for bugzilla bug 4974, make sure to only move below floats in line layout if white-space is normal.
2515         One case was using !isPre and including nowrap incorrectly as a result.  Patch from koivisto.
2516         
2517         Reviewed by hyatt
2518
2519         * khtml/rendering/bidi.cpp:
2520         (khtml::RenderBlock::findNextLineBreak):
2521
2522 2005-10-08  Alexey Proskuryakov  <ap@nypop.com>
2523
2524         Reviewed by Maciej.
2525
2526         - support for WebKit fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=5187
2527           UTF-8 in long text files breaks at some point
2528
2529         No layout test added: only affects plain text view and requires loading the
2530         file in multiple chunks.
2531
2532         * WebCore.exp: Added WebCoreTextDecoder.
2533         * kwq/WebCoreTextDecoder.h: Added.
2534         * kwq/WebCoreTextDecoder.mm: Added.
2535         * WebCore.xcodeproj/project.pbxproj: Added files, made header private (SPI).
2536
2537 2005-10-08  Alexey Proskuryakov  <ap@nypop.com>
2538
2539         Reviewed by Maciej.
2540
2541         - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4821
2542           Text in submitted forms should be entity-encoded if the current encoding doesn't support it
2543
2544         Added one layout test.
2545
2546         * khtml/html/html_formimpl.cpp:
2547         (DOM::HTMLFormElementImpl::formData): Pass true to the fromUnicode function to request entity encoding.
2548         (DOM::FormDataList::appendString): Ditto.
2549
2550         * kwq/KWQTextCodec.h: Add boolean parameter to request entity-style encoding for characters that can't
2551         be expressed in the desired encoding.
2552         * kwq/KWQTextCodec.mm: (QTextCodec::fromUnicode): Added code to entity-encode characters that can't be
2553         expressed in the desired encoding.
2554
2555 2005-10-08  Rosyna  <rosyna@unsanity.com>
2556
2557         Reviewed by Darin.
2558
2559         - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3852
2560           typeahead doesn't work in multiple row select boxes.
2561
2562         * kwq/KWQListBox.mm:
2563         (KWQTableViewTypeSelectCallback): Added.
2564         (-[KWQTableView finalize]): Deallocate the UCTypeSelect object.
2565         (-[KWQTableView dealloc]): Ditto.
2566         (-[KWQTableView keyUp:]): If character typed is a graphic character, pass it along to
2567         the UCTypeSelect object and use it to type select, otherwise flush the object.
2568
2569         * manual-tests/select-element-type-select.html: Added.
2570
2571 2005-10-08  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2572
2573         Reviewed by Darin.
2574
2575         - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3245
2576           Support the 'bdo' element
2577
2578         Fixes the results of some existing layout tests.
2579
2580         * khtml/xml/dom_elementimpl.h: Add eBDO to the list of entry types so there's a way to
2581         keep <bdo> dir attribute mappings separate from those of other elements.
2582
2583         * khtml/html/html_elementimpl.cpp:
2584         (HTMLElementImpl::mapToEntry): Add special case to use eBDO for the dir attribute on
2585         elements with the <bdo> tag.
2586         (HTMLElementImpl::parseMappedAttribute): Use bidi-override for the unicode-bidi CSS property
2587         when setting it based on the dir attribute on a <bdo> tag. Along with the change above this
2588         obviates the need for an HTMLElementImpl subclass for <bdo>, but we could refactor it that
2589         way later if we decide there's an advantage to doing it that way.
2590
2591         * khtml/css/html4.css: Remove the rules about <bdo>. They are insufficient, and now
2592         they are also unnecessary with the changes above.
2593
2594 2005-10-08  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2595
2596         Reviewed by Darin.
2597
2598         - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4898
2599           Failures in dbaron's bidi ordering tests
2600
2601         Added 3 dbaron bidi ordering tests to layout tests.
2602
2603         * khtml/rendering/bidi.cpp:
2604         (khtml::deleteBidiRuns): Set emptyRun back to true.
2605         (khtml::Bidinext): Remove emptyRun checks here.
2606         (khtml::appendRunsForObject): Add a check here to avoid adding an empty run.
2607         (khtml::embed): Add handling for various cases that was missing before.
2608         (khtml::RenderBlock::bidiReorderLine): Many different fixes.
2609
2610 2005-10-08  Rob Buis  <rwlbuis@xs4all.nl>
2611
2612         Reviewed by eseidel.
2613
2614         Almost forgot the layout test for the last commit. ;)
2615         http://bugzilla.opendarwin.org/show_bug.cgi?id=5240
2616
2617         * svg-tests/custom/use-forward-refs-expected.checksum: Added.
2618         * svg-tests/custom/use-forward-refs-expected.png: Added.
2619         * svg-tests/custom/use-forward-refs-expected.txt: Added.
2620         * svg-tests/custom/use-forward-refs.svg: Added.
2621
2622 2005-10-08  Rob Buis  <rwlbuis@xs4all.nl>
2623
2624         Reviewed by eseidel.
2625
2626         Fix to handle forward referencing <use> elements.
2627         http://bugzilla.opendarwin.org/show_bug.cgi?id=5240
2628
2629         * ksvg2/svg/SVGDocumentImpl.cpp:
2630         (SVGDocumentImpl::executeScripts): delayed close.
2631         (SVGDocumentImpl::addForwardReference): new function.
2632         * ksvg2/svg/SVGDocumentImpl.h:
2633         * ksvg2/svg/SVGUseElementImpl.cpp:
2634         (SVGUseElementImpl::close): delay close, if missing reference.
2635
2636 2005-10-07  David Harrison  <harrison@apple.com>
2637
2638         Reviewed by Justin.
2639
2640         "<rdar://problem/4064017> Safari crashes at -[WebCoreBridge firstRectForDOMRange:] + 92"
2641
2642         * khtml/editing/delete_selection_command.cpp:
2643         (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent):
2644         Do not insert placeholder if selection ends at a BR.
2645         
2646         (khtml::DeleteSelectionCommand::handleGeneralDelete):
2647         No need to preserve starting BR because insertPlaceholderForAncestorBlockContent already did.
2648         
2649         * khtml/xml/dom_position.cpp:
2650         (DOM::Position::upstream):
2651         (DOM::Position::downstream):
2652         Fixed to return original position instead of invisible position when no suitable position found upstream.
2653
2654 2005-10-07  Vicki Murley  <vicki@apple.com>
2655
2656         Reviewed by Hyatt.
2657  
2658         - pass the current form to the isindex constructor, so that isindex doesn't malfunction in the 
2659         case of a misnested form
2660
2661         * khtml/html/htmlparser.cpp:
2662         (HTMLParser::handleIsindex):
2663
2664 2005-10-06  Justin Garcia  <justin.garcia@apple.com>
2665
2666         Reviewed by harrison
2667
2668         <rdar://problem/4073133> Tabbing between editable elements leads to loss of keyboard focus
2669         <rdar://problem/3690719> "Select All" when in an editable area selects the whole containing document
2670         <rdar://problem/3690703> selection is allowed to span editable area and rest of document
2671
2672         * khtml/editing/SelectionController.cpp:
2673         (khtml::SelectionController::adjustExtentForEditableContent): Added.
2674         Ensures that a selection based in an editable element cannot extend outside that element's root editable element.
2675         Also ensures that a selection that's based outside of editable content cannot extend into an editable element.
2676         (khtml::SelectionController::validate):
2677         * khtml/editing/SelectionController.h:
2678         * khtml/editing/visible_position.h:
2679         * khtml/khtml_part.cpp:
2680         (KHTMLPart::setSelection):
2681         (KHTMLPart::setFocusNodeIfNeeded):
2682         (KHTMLPart::selectAll):
2683         If the current selection is inside an editable element, only select the contents of the root editable element.
2684         * khtml/xml/dom_nodeimpl.cpp:
2685         (DOM::ContainerNodeImpl::setFocus): Clicking on an editable element used to change the selection twice.
2686         * kwq/KWQKHTMLPart.mm:
2687         (KWQKHTMLPart::nextKeyViewInFrame): Does a select all when tabbing into an editable element, to match <textarea>s.
2688
2689 2005-10-06  Vicki Murley  <vicki@apple.com>
2690
2691         Reviewed by Beth Dakin.
2692  
2693         - fix <rdar://problem/4288307> <form> element is created for <isindex> outside <form>; that's not correct (4828)
2694
2695         * khtml/html/htmlparser.cpp:
2696         (HTMLParser::handleIsindex): if there's no current form, don't create one
2697
2698 2005-10-06  Beth Dakin  <bdakin@apple.com>
2699
2700         Reviewed by Vicki.
2701
2702         Fix for <rdar://problem/4145535> Crash in khtml::RenderBlock::addOverhangingFloats 
2703         with simple HTML test file.
2704
2705         * khtml/rendering/render_block.cpp: Added nil check
2706         (khtml::RenderBlock::addOverhangingFloats):
2707
2708 2005-10-06  John Sullivan  <sullivan@apple.com>
2709
2710         Reviewed by Beth Dakin.
2711
2712         No test cases added because this does not affect layout.
2713
2714         * kwq/KWQTextArea.mm:
2715         (-[KWQTextAreaTextView setLineHeight:]):
2716         Don't call [textView didChangeText] here, because the text itself did not change.
2717
2718 EW2005-10-06  Beth Dakin  <bdakin@apple.com>
2719
2720         Reviewed by nobody.
2721
2722         Rolling out the assertions I put in place earlier today
2723         because they break the layout tests. 
2724
2725         * khtml/rendering/render_container.cpp:
2726         (RenderContainer::destroy):
2727         * khtml/xml/dom_nodeimpl.cpp:
2728         (DOM::NodeImpl::dispatchEvent):
2729         (DOM::NodeImpl::dispatchGenericEvent):
2730         (DOM::NodeImpl::dispatchHTMLEvent):
2731         (DOM::NodeImpl::dispatchWindowEvent):
2732         (DOM::NodeImpl::dispatchMouseEvent):
2733         (DOM::NodeImpl::dispatchSimulatedMouseEvent):
2734         (DOM::NodeImpl::dispatchUIEvent):
2735         (DOM::NodeImpl::dispatchKeyEvent):
2736         (DOM::NodeImpl::dispatchWheelEvent):
2737         (DOM::NodeImpl::detach):
2738         (DOM::ContainerNodeImpl::insertBefore):
2739         (DOM::ContainerNodeImpl::replaceChild):
2740         (DOM::ContainerNodeImpl::removeChild):
2741         (DOM::ContainerNodeImpl::removeChildren):
2742         (DOM::ContainerNodeImpl::appendChild):
2743         (DOM::ContainerNodeImpl::addChild):
2744         (DOM::ContainerNodeImpl::dispatchChildInsertedEvents):
2745
2746 2005-10-06  Beth Dakin  <bdakin@apple.com>
2747
2748         Reviewed by Dave Harrison
2749
2750         No test cases added because this does not affect layout.
2751
2752         Added assertions to catch WebCore whenever it tries to dispatch an event
2753         while it is modifying the DOM tree. This does not fix any bugs but was 
2754         inspired by 4134884 and 4132581. 
2755
2756         * khtml/rendering/render_container.cpp: Assert that m_first is anonymous
2757         (RenderContainer::destroy):
2758         * khtml/xml/dom_nodeimpl.cpp: Added static int eventDispatchForbidden, and
2759                                         forbidEventDispatch() and allowEventDispatch()
2760                                         to wrap code that modifies the tree.
2761         (DOM::forbidEventDispatch):
2762         (DOM::allowEventDispatch): 
2763         (DOM::NodeImpl::dispatchEvent): Added assertion.
2764         (DOM::NodeImpl::dispatchGenericEvent): Added assertion.
2765         (DOM::NodeImpl::dispatchHTMLEvent): Added assertion.
2766         (DOM::NodeImpl::dispatchWindowEvent): Added assertion.
2767         (DOM::NodeImpl::dispatchMouseEvent): Added assertion.
2768         (DOM::NodeImpl::dispatchSimulatedMouseEvent): Added assertion.
2769         (DOM::NodeImpl::dispatchUIEvent): Added assertion.
2770         (DOM::NodeImpl::dispatchKeyEvent): Added assertion.
2771         (DOM::NodeImpl::dispatchWheelEvent): Added assertion.
2772         (DOM::NodeImpl::detach): Added assertion.
2773         (DOM::ContainerNodeImpl::insertBefore): Wrapped tree-modifying code.
2774         (DOM::ContainerNodeImpl::replaceChild): Wrapped tree-modifying code.
2775         (DOM::ContainerNodeImpl::removeChild): Wrapped tree-modifying code.
2776         (DOM::ContainerNodeImpl::removeChildren): Wrapped tree-modifying code.
2777         (DOM::ContainerNodeImpl::appendChild): Wrapped tree-modifying code.
2778         (DOM::ContainerNodeImpl::addChild): Wrapped tree-modifying code.
2779         (DOM::ContainerNodeImpl::dispatchChildInsertedEvents): Added. assertion. 
2780
2781 2005-10-06  Beth Dakin  <bdakin@apple.com>
2782
2783         Reviewed by Hyatt
2784
2785         No test case added because you need to interact with a page to see this crash. 
2786
2787         Fix for <rdar://problem/3918278> CSS: :hover:before or :hover crashes in 
2788         RenderObject::repaintObjectsBeforeLayout()
2789
2790         * khtml/rendering/render_container.cpp:
2791         (RenderContainer::updatePseudoChild): Deleted call to removeChild() because destroy() takes
2792                                                 care of that, and we don't want to remove the
2793                                                 node before we destroy it anyway, or positioned
2794                                                 objects won't be appropriately deleted. 
2795
2796 2005-10-06  David Harrison  <harrison@apple.com>
2797
2798         Reviewed by hyatt.
2799
2800         No test cases added or changed because this patch does not address a bug.
2801         
2802         Fix two detach/destroy renames I missed yesterday.
2803         
2804         * khtml/rendering/bidi.cpp:
2805         (khtml::BidiRun::destroy):
2806         (khtml::BidiRun::operator delete):
2807         Renamed inBidiRunDetach to inBidiRunDestroy.
2808         
2809         * khtml/rendering/render_layer.cpp:
2810         (khtml::RenderLayer::operator delete):
2811         (khtml::RenderLayer::destroy):
2812         Renamed inRenderLayerDetach to inRenderLayerDestroy.
2813
2814 2005-10-06  Darin Adler  <darin@apple.com>
2815
2816         Reviewed by Hyatt.
2817
2818         - fixed <rdar://problem/3217793> Monaco bold comes out as Helvetica bold, very bad if you choose Monaco as your fixed-width font
2819         - fixed <rdar://problem/3256269> CSS1: bold/italic font styles not programmatically created if font doesn't include them (3231)
2820           also <http://bugzilla.opendarwin.org/show_bug.cgi?id=3231>
2821
2822         * kwq/WebCoreTextRendererFactory.h: Added WebCoreFont structure, and made this header work for
2823         non-Objective-C compiles. Changed all the methods to take and return WebCoreFont instead of
2824         NSFont *.
2825         * kwq/WebCoreTextRendererFactory.mm:
2826         (WebCoreInitializeFont): Added.
2827         (-[WebCoreTextRendererFactory fontWithFamilies:traits:size:]): Updated to use ERROR so we notice
2828         cases where the subclass does not override these methods.
2829         (-[WebCoreTextRendererFactory isFontFixedPitch:]): Ditto.
2830         (-[WebCoreTextRendererFactory rendererWithFont:]): Ditto.
2831
2832         * WebCore.exp: Added WebCoreInititalizeFont.
2833
2834         * kwq/KWQFont.h: Added WebCoreFont support.
2835         * kwq/KWQFont.mm:
2836         (QFont::QFont): Change to use WebCoreFont.
2837         (QFont::~QFont): Ditto.
2838         (QFont::operator=): Ditto.
2839         (QFont::setFamily): Ditto.
2840         (QFont::setFirstFamily): Ditto.
2841         (QFont::setPixelSize): Ditto.
2842         (QFont::setWeight): Ditto.
2843         (QFont::setItalic): Ditto.
2844         (QFont::determinePitch): Ditto.
2845         (QFont::getWebCoreFont): Added.
2846
2847         * kwq/KWQComboBox.mm: (QComboBox::sizeHint): Pass in WebCoreFont when creating text renderer.
2848         * kwq/KWQFontMetrics.mm: (QFontMetricsPrivate::getRenderer): Ditto.
2849         * kwq/KWQLineEdit.mm: (QLineEdit::sizeForCharacterWidth): Ditto.
2850         * kwq/KWQListBox.mm:
2851         (itemTextRenderer): Ditto.
2852         (groupLabelTextRenderer): Ditto.
2853         (QListBox::sizeForNumberOfLines): Changed non-system-font case to use QFont rather than NSFont
2854         to add boldness, so that group label fonts are bolded even if it's synthesiized bold.
2855         (-[KWQTableView drawRow:clipRect:]): Ditto.
2856         * kwq/KWQPainter.mm: (QPainter::_updateRenderer): Pass in WebCoreFont when creating text renderer.
2857
2858 2005-10-05  Vicki Murley  <vicki@apple.com>
2859
2860         Reviewed by Maciej.
2861  
2862         - fix <rdar://problem/4288829> repro crash on isIndex tag with no attributes
2863
2864         * khtml/html/htmlparser.cpp:
2865         (HTMLParser::handleIsindex): only deref attributes if they exist
2866
2867 2005-10-05  Maciej Stachowiak  <mjs@apple.com>
2868
2869         Reviewed by Eric.
2870
2871         <rdar://problem/4150976> Safari crashes in HTMLImageLoader::dispatchLoadEvent() on particular page (archive attached)
2872
2873         I couldn't figure out how to make an automated test for this; even once I got DumpRenderTree
2874         to mouse in and out it did not crash.
2875         
2876         * khtml/html/html_imageimpl.cpp:
2877         (HTMLImageLoader::dispatchLoadEvent): Check if CachedImage is null before using it.
2878
2879 2005-10-05  David Harrison  <harrison@apple.com>
2880
2881         Reviewed by Darin.
2882
2883         No test cases added or changed because this patch does not address a bug.
2884
2885         For clarity, renamed the "detach()" function to "destroy()" in the following classes:
2886         RenderObject (and subclasses),  BidiRun, ClipRects, InlineBox (and subclasses).
2887         
2888         * khtml/rendering/bidi.cpp:
2889         (khtml::BidiRun::destroy):
2890         (khtml::BidiRun::operator delete):
2891         (khtml::deleteBidiRuns):
2892         * khtml/rendering/bidi.h:
2893         * khtml/rendering/render_block.cpp:
2894         (khtml::RenderBlock::removeChild):
2895         (khtml::RenderBlock::updateFirstLetter):
2896         * khtml/rendering/render_box.cpp:
2897         (RenderBox::destroy):
2898         (RenderBox::dirtyLineBoxes):
2899         (RenderBox::position):
2900         (RenderBox::deleteLineBoxWrapper):
2901         * khtml/rendering/render_box.h:
2902         * khtml/rendering/render_container.cpp:
2903         (RenderContainer::destroy):
2904         (RenderContainer::updatePseudoChild):
2905         (RenderContainer::removeLeftoverAnonymousBoxes):
2906         * khtml/rendering/render_container.h:
2907         * khtml/rendering/render_flow.cpp:
2908         (RenderFlow::deleteLineBoxes):
2909         (RenderFlow::destroy):
2910         * khtml/rendering/render_flow.h:
2911         * khtml/rendering/render_form.cpp:
2912         (RenderTextArea::destroy):
2913         * khtml/rendering/render_form.h:
2914         * khtml/rendering/render_layer.cpp:
2915         (khtml::ClipRects::operator delete):
2916         (khtml::ClipRects::destroy):
2917         (khtml::RenderLayer::operator delete):
2918         (khtml::RenderLayer::destroy):
2919         (khtml::RenderLayer::removeOnlyThisLayer):
2920         * khtml/rendering/render_layer.h:
2921         (khtml::ClipRects::deref):
2922         * khtml/rendering/render_line.cpp:
2923         (khtml::InlineBox::destroy):
2924         (khtml::InlineBox::operator delete):
2925         (khtml::InlineBox::deleteLine):
2926         (khtml::InlineFlowBox::deleteLine):
2927         (khtml::RootInlineBox::destroy):
2928         (khtml::RootInlineBox::detachEllipsisBox):
2929         * khtml/rendering/render_line.h:
2930         * khtml/rendering/render_list.cpp:
2931         (RenderListItem::setStyle):
2932         (RenderListItem::destroy):
2933         * khtml/rendering/render_list.h:
2934         * khtml/rendering/render_object.cpp:
2935         (RenderObject::operator delete):
2936         (RenderObject::destroy):
2937         * khtml/rendering/render_object.h:
2938         * khtml/rendering/render_replaced.cpp:
2939         (RenderWidget::destroy):
2940         * khtml/rendering/render_replaced.h:
2941         * khtml/rendering/render_style.cpp:
2942         (RenderStyle::operator delete):
2943         * khtml/rendering/render_table.cpp:
2944         (RenderTableSection::destroy):
2945         (RenderTableRow::destroy):
2946         (RenderTableRow::removeChildNode):
2947         (RenderTableCell::destroy):
2948         * khtml/rendering/render_table.h:
2949         * khtml/rendering/render_text.cpp:
2950         (InlineTextBox::destroy):
2951         (InlineTextBox::operator delete):
2952         (InlineTextBox::deleteLine):
2953         (RenderText::destroy):
2954         (RenderText::deleteTextBoxes):
2955         (RenderText::position):
2956         * khtml/rendering/render_text.h:
2957         * khtml/xml/dom_docimpl.cpp:
2958         (DocumentImpl::detach):
2959         * khtml/xml/dom_nodeimpl.cpp:
2960         (DOM::NodeImpl::detach):
2961
2962 2005-10-05  Maciej Stachowiak  <mjs@apple.com>
2963
2964         Reviewed by Eric.
2965
2966         - fixed <rdar://problem/3798746> hang in JavaScript getting at URL from frame; isc.fraunhofer.de (works in IE and Firefox)
2967         
2968         * khtml/xml/dom_docimpl.h:
2969         (DOM::DocumentImpl::URL): if the URL is empty, return "about:blank", the JS DOM
2970         at least counts on this, so we may as well do it for other languages too.
2971         (DOM::DocumentImpl::baseURL): base it on URL(), not m_url
2972
2973 2005-10-05  Eric Seidel  <eseidel@apple.com>
2974
2975         Reviewed by mjs.
2976
2977         Improves dependency checking so that SVG JavaScript wrapper files
2978         regenerate when the perl scripts change.
2979
2980         * WebCore.xcodeproj/project.pbxproj:
2981
2982 2005-10-05  Eric Seidel  <eseidel@apple.com>
2983
2984         Reviewed by mjs.
2985
2986         Makes <object> tags not use image mode for svg content:
2987         http://bugzilla.opendarwin.org/show_bug.cgi?id=5175
2988
2989         * khtml/html/html_objectimpl.cpp:
2990         (DOM::HTMLObjectElementImpl::isImageType):
2991
2992 2005-10-05  Anders Carlsson  <andersca@mac.com>
2993
2994         Reviewed by Maciej.
2995
2996         * khtml/ecma/kjs_dom.cpp:
2997         (KJS::DOMNodeProtoFunc::callAsFunction):
2998         * khtml/ecma/kjs_dom.h:
2999         Add JS binding for isSameNode.
3000         
3001         (KJS::DOMNode::):
3002         * khtml/xml/dom_nodeimpl.h:
3003         Implement isSameNode.
3004         
3005         (DOM::NodeImpl::isSameNode):
3006         * kwq/DOM.mm:
3007         (-[DOMNode isSameNode:]):
3008         Add ObjC binding for isSameNode.
3009         
3010 2005-10-05  Maciej Stachowiak  <mjs@apple.com>
3011
3012         Reviewed by Eric.
3013
3014         - fixed a random crasher that happens because the HTMLParser accidentally was refing
3015         the document.
3016
3017         <rdar://problem/4065748> Repro crash at http://www.vanaqua.org using menu system (KHTMLParser::setCurrent(DOM::NodeImpl*))
3018         
3019         I couldn't figure out how to make a reproducible test case for this. The failure is
3020         random memory trashing.
3021
3022         * khtml/html/htmlparser.cpp:
3023         (HTMLStackElem::HTMLStackElem):
3024         (HTMLStackElem::~HTMLStackElem):
3025         (HTMLParser::popNestedHeaderTag):
3026         (HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
3027         (HTMLParser::popOneBlock):
3028
3029 2005-10-04  Maciej Stachowiak  <mjs@apple.com>
3030
3031         Reviewed by Eric.
3032
3033         <rdar://problem/4285236> Denver Regression: crash repeatedly reloading www.supermanhomepage.com
3034         
3035         I couldn't figure out how to make a reproducible test case for this. The failure is
3036         random memory trashing.
3037
3038         * khtml/ecma/kjs_events.cpp:
3039         (KJS::JSAbstractEventListener::handleEvent): Move an unpaired deref to where it is paired.
3040
3041 2005-10-04  Eric Seidel  <eseidel@apple.com>
3042
3043         Reviewed by mjs.
3044
3045         Support direct named attribute lookkup, like FireFox,IE.
3046         This was causing a JavaScript exception for gap.com
3047         <rdar://problem/4285884> Gap.com throws exception "Undefined value" because of Safari doesn't support indexing into a named node map by name
3048
3049         * khtml/ecma/kjs_dom.cpp:
3050         (KJS::DOMNodeList::getOwnPropertySlot): if cleanup
3051         (KJS::DOMNamedNodeMap::nameGetter):
3052         (KJS::DOMNamedNodeMap::getOwnPropertySlot):
3053         * khtml/ecma/kjs_dom.h: added nameGetter
3054
3055 2005-10-04  Eric Seidel  <eseidel@apple.com>
3056
3057         No review, build fix only.
3058
3059         Fix to include "config.h" in every file.
3060         Necessary to support fastMalloc.
3061         http://bugzilla.opendarwin.org/show_bug.cgi?id=5254
3062
3063         * WebCore+SVG/DrawCanvasItem.mm:
3064         * WebCore+SVG/DrawDocument.mm:
3065         * WebCore+SVG/DrawView.mm:
3066         * WebCore+SVG/dom_kdomdocumentwrapper.cpp:
3067         * WebCore+SVG/dom_kdomnodetreewrapper.cpp:
3068         * WebCore+SVG/render_kcanvaswrapper.cpp:
3069         * WebCore+SVG/xml_kdomtokenizer.cpp:
3070         * kcanvas/KCanvas.cpp:
3071         * kcanvas/KCanvasContainer.cpp:
3072         * kcanvas/KCanvasCreator.cpp:
3073         * kcanvas/KCanvasFilters.cpp:
3074         * kcanvas/KCanvasImage.cpp:
3075         * kcanvas/KCanvasItem.cpp:
3076         * kcanvas/KCanvasMatrix.cpp:
3077         * kcanvas/KCanvasPath.cpp:
3078         * kcanvas/KCanvasRegistry.cpp:
3079         * kcanvas/KCanvasResources.cpp:
3080         * kcanvas/KCanvasTreeDebug.cpp:
3081         * kcanvas/KCanvasView.cpp:
3082         * kcanvas/device/KRenderingDevice.cpp:
3083         * kcanvas/device/KRenderingDeviceFactory.cpp:
3084         * kcanvas/device/KRenderingFillPainter.cpp:
3085         * kcanvas/device/KRenderingPaintServerGradient.cpp:
3086         * kcanvas/device/KRenderingPaintServerImage.cpp:
3087         * kcanvas/device/KRenderingPaintServerPattern.cpp:
3088         * kcanvas/device/KRenderingPaintServerSolid.cpp:
3089         * kcanvas/device/KRenderingStrokePainter.cpp:
3090         * kcanvas/device/KRenderingStyle.cpp:
3091         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
3092         * kcanvas/device/quartz/KCanvasItemQuartz.mm:
3093         * kcanvas/device/quartz/KCanvasResourcesQuartz.mm:
3094         * kcanvas/device/quartz/KCanvasViewQuartz.mm:
3095         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
3096         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
3097         * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
3098         * kcanvas/device/quartz/QuartzSupport.mm:
3099         * kdom/DOMString.cpp:
3100         * kdom/Helper.cpp:
3101         * kdom/KDOMPart.cpp:
3102         * kdom/KDOMSettings.cpp:
3103         * kdom/KDOMView.cpp:
3104         * kdom/Shared.cpp:
3105         * kdom/backends/libxml/LibXMLParser.cpp:
3106         * kdom/bindings/IDLCodeGeneratorEcmaInterface.pm:
3107         * kdom/bindings/IDLCodeGeneratorJs.pm:
3108         * kdom/cache/ImageSource.cpp:
3109         * kdom/cache/KDOMCache.cpp:
3110         * kdom/cache/KDOMCachedDocument.cpp:
3111         * kdom/cache/KDOMCachedImage.cpp:
3112         * kdom/cache/KDOMCachedObject.cpp:
3113         * kdom/cache/KDOMCachedScript.cpp:
3114         * kdom/cache/KDOMCachedStyleSheet.cpp:
3115         * kdom/cache/KDOMLoader.cpp:
3116         * kdom/core/AttrImpl.cpp:
3117         * kdom/core/CDATASectionImpl.cpp:
3118         * kdom/core/CDFInterface.cpp:
3119         * kdom/core/CharacterDataImpl.cpp:
3120         * kdom/core/CommentImpl.cpp:
3121         * kdom/core/DOMConfigurationImpl.cpp:
3122         * kdom/core/DOMErrorHandlerImpl.cpp:
3123         * kdom/core/DOMErrorImpl.cpp:
3124         * kdom/core/DOMExceptionImpl.cpp:
3125         * kdom/core/DOMImplementationImpl.cpp:
3126         * kdom/core/DOMLocatorImpl.cpp:
3127         * kdom/core/DOMObjectImpl.cpp:
3128         * kdom/core/DOMStringImpl.cpp:
3129         * kdom/core/DOMStringListImpl.cpp:
3130         * kdom/core/DOMUserDataImpl.cpp:
3131         * kdom/core/DocumentFragmentImpl.cpp:
3132         * kdom/core/DocumentImpl.cpp:
3133         * kdom/core/DocumentTypeImpl.cpp:
3134         * kdom/core/ElementImpl.cpp:
3135         * kdom/core/EntityImpl.cpp:
3136         * kdom/core/EntityReferenceImpl.cpp:
3137         * kdom/core/NamedAttrMapImpl.cpp:
3138         * kdom/core/NamedNodeMapImpl.cpp:
3139         * kdom/core/NodeImpl.cpp:
3140         * kdom/core/NodeListImpl.cpp:
3141         * kdom/core/NotationImpl.cpp:
3142         * kdom/core/ProcessingInstructionImpl.cpp:
3143         * kdom/core/TagNodeListImpl.cpp:
3144         * kdom/core/TextImpl.cpp:
3145         * kdom/core/TypeInfoImpl.cpp:
3146         * kdom/core/XMLElementImpl.cpp:
3147         * kdom/css/CSSCharsetRuleImpl.cpp:
3148         * kdom/css/CSSFontFaceRuleImpl.cpp:
3149         * kdom/css/CSSImageValueImpl.cpp:
3150         * kdom/css/CSSImportRuleImpl.cpp:
3151         * kdom/css/CSSMediaRuleImpl.cpp:
3152         * kdom/css/CSSPageRuleImpl.cpp:
3153         * kdom/css/CSSPrimitiveValueImpl.cpp:
3154         * kdom/css/CSSRuleImpl.cpp:
3155         * kdom/css/CSSRuleListImpl.cpp:
3156         * kdom/css/CSSStyleDeclarationImpl.cpp:
3157         * kdom/css/CSSStyleRuleImpl.cpp:
3158         * kdom/css/CSSStyleSelector.cpp:
3159         * kdom/css/CSSStyleSheetImpl.cpp:
3160         * kdom/css/CSSUnknownRuleImpl.cpp:
3161         * kdom/css/CSSValueImpl.cpp:
3162         * kdom/css/CSSValueListImpl.cpp:
3163         * kdom/css/CounterImpl.cpp:
3164         * kdom/css/DocumentCSSImpl.cpp:
3165         * kdom/css/DocumentStyleImpl.cpp:
3166         * kdom/css/KDOMCSSParser.cpp:
3167         * kdom/css/LinkStyleImpl.cpp:
3168         * kdom/css/MediaListImpl.cpp:
3169         * kdom/css/RGBColorImpl.cpp:
3170         * kdom/css/RectImpl.cpp:
3171         * kdom/css/RenderStyle.cpp:
3172         * kdom/css/RenderStyleDefs.cpp:
3173         * kdom/css/StyleBaseImpl.cpp:
3174         * kdom/css/StyleSheetImpl.cpp:
3175         * kdom/css/StyleSheetListImpl.cpp:
3176         * kdom/css/kdomparsercss.y:
3177         * kdom/ecma/Ecma.cpp:
3178         * kdom/ecma/GlobalObject.cpp:
3179         * kdom/ecma/Helper.cpp:
3180         * kdom/ecma/ScriptInterpreter.cpp:
3181         * kdom/events/DocumentEventImpl.cpp:
3182         * kdom/events/EventExceptionImpl.cpp:
3183         * kdom/events/EventImpl.cpp:
3184         * kdom/events/EventListenerImpl.cpp:
3185         * kdom/events/EventTargetImpl.cpp:
3186         * kdom/events/KeyboardEventImpl.cpp:
3187         * kdom/events/MouseEventImpl.cpp:
3188         * kdom/events/MutationEventImpl.cpp:
3189         * kdom/events/RegisteredEventListener.cpp:
3190         * kdom/events/UIEventImpl.cpp:
3191         * kdom/ls/DOMImplementationLSImpl.cpp:
3192         * kdom/ls/LSExceptionImpl.cpp:
3193         * kdom/ls/LSInputImpl.cpp:
3194         * kdom/ls/LSOutputImpl.cpp:
3195         * kdom/ls/LSParserFilterImpl.cpp:
3196         * kdom/ls/LSParserImpl.cpp:
3197         * kdom/ls/LSResourceResolverImpl.cpp:
3198         * kdom/ls/LSSerializerFilterImpl.cpp:
3199         * kdom/ls/LSSerializerImpl.cpp:
3200         * kdom/parser/KDOMDocumentBuilder.cpp:
3201         * kdom/parser/KDOMParser.cpp:
3202         * kdom/range/DocumentRangeImpl.cpp:
3203         * kdom/range/RangeExceptionImpl.cpp:
3204         * kdom/range/RangeImpl.cpp:
3205         * kdom/traversal/DocumentTraversalImpl.cpp:
3206         * kdom/traversal/NodeFilterImpl.cpp:
3207         * kdom/traversal/NodeIteratorImpl.cpp:
3208         * kdom/traversal/TraversalImpl.cpp:
3209         * kdom/traversal/TreeWalkerImpl.cpp:
3210         * kdom/views/AbstractViewImpl.cpp:
3211         * kdom/views/DocumentViewImpl.cpp:
3212         * kdom/xpath/XPathEvaluatorImpl.cpp:
3213         * kdom/xpath/XPathExceptionImpl.cpp:
3214         * kdom/xpath/XPathExpressionImpl.cpp:
3215         * kdom/xpath/XPathNSResolverImpl.cpp:
3216         * kdom/xpath/XPathNamespaceImpl.cpp:
3217         * kdom/xpath/XPathResultImpl.cpp:
3218         * kdom/xpath/impl/expression.cpp:
3219         * kdom/xpath/impl/functions.cpp:
3220         * kdom/xpath/impl/parsedstatement.cpp:
3221         * kdom/xpath/impl/path.cpp:
3222         * kdom/xpath/impl/predicate.cpp:
3223         * kdom/xpath/impl/step.cpp:
3224         * kdom/xpath/impl/tokenizer.cpp:
3225         * kdom/xpath/impl/util.cpp:
3226         * kdom/xpath/impl/variablereference.cpp:
3227         * kdom/xpath/impl/xpath.y:
3228         * kdom/xpointer/ElementSchemeImpl.cpp:
3229         * kdom/xpointer/NBCImpl.cpp:
3230         * kdom/xpointer/PointerPartImpl.cpp:
3231         * kdom/xpointer/ShortHandImpl.cpp:
3232         * kdom/xpointer/XMLNSSchemeImpl.cpp:
3233         * kdom/xpointer/XPath1SchemeImpl.cpp:
3234         * kdom/xpointer/XPointerEvaluatorImpl.cpp:
3235         * kdom/xpointer/XPointerExceptionImpl.cpp:
3236         * kdom/xpointer/XPointerExpressionImpl.cpp:
3237         * kdom/xpointer/XPointerHelper.cpp:
3238         * kdom/xpointer/XPointerResultImpl.cpp:
3239         * kdom/xpointer/XPointerSchemeImpl.cpp:
3240         * ksvg2/KSVGFactory.cpp:
3241         * ksvg2/KSVGSettings.cpp:
3242         * ksvg2/KWQKSVGPart.mm:
3243         * ksvg2/KWQKSVGView.mm:
3244         * ksvg2/css/KSVGCSSParser.cpp:
3245         * ksvg2/css/SVGCSSStyleDeclarationImpl.cpp:
3246         * ksvg2/css/SVGCSSStyleSelector.cpp:
3247         * ksvg2/css/SVGCSSStyleSheetImpl.cpp:
3248         * ksvg2/css/SVGRenderStyle.cpp:
3249         * ksvg2/css/SVGRenderStyleDefs.cpp:
3250         * ksvg2/ecma/Ecma.cpp:
3251         * ksvg2/ecma/GlobalObject.cpp:
3252         * ksvg2/events/SVGEventImpl.cpp:
3253         * ksvg2/events/SVGZoomEventImpl.cpp:
3254         * ksvg2/misc/KCanvasRenderingStyle.cpp:
3255         * ksvg2/misc/KSVGDocumentBuilder.cpp:
3256         * ksvg2/misc/KSVGTimeScheduler.cpp:
3257         * ksvg2/svg/CDFInterface.cpp:
3258         * ksvg2/svg/SVGAElementImpl.cpp:
3259         * ksvg2/svg/SVGAngleImpl.cpp:
3260         * ksvg2/svg/SVGAnimateColorElementImpl.cpp:
3261         * ksvg2/svg/SVGAnimateElementImpl.cpp:
3262         * ksvg2/svg/SVGAnimateTransformElementImpl.cpp:
3263         * ksvg2/svg/SVGAnimatedAngleImpl.cpp:
3264         * ksvg2/svg/SVGAnimatedBooleanImpl.cpp:
3265         * ksvg2/svg/SVGAnimatedEnumerationImpl.cpp:
3266         * ksvg2/svg/SVGAnimatedIntegerImpl.cpp:
3267         * ksvg2/svg/SVGAnimatedLengthImpl.cpp:
3268         * ksvg2/svg/SVGAnimatedLengthListImpl.cpp:
3269         * ksvg2/svg/SVGAnimatedNumberImpl.cpp:
3270         * ksvg2/svg/SVGAnimatedNumberListImpl.cpp:
3271         * ksvg2/svg/SVGAnimatedPathDataImpl.cpp:
3272         * ksvg2/svg/SVGAnimatedPointsImpl.cpp:
3273         * ksvg2/svg/SVGAnimatedPreserveAspectRatioImpl.cpp:
3274         * ksvg2/svg/SVGAnimatedRectImpl.cpp:
3275         * ksvg2/svg/SVGAnimatedStringImpl.cpp:
3276         * ksvg2/svg/SVGAnimatedTransformListImpl.cpp:
3277         * ksvg2/svg/SVGAnimationElementImpl.cpp:
3278         * ksvg2/svg/SVGCircleElementImpl.cpp:
3279         * ksvg2/svg/SVGClipPathElementImpl.cpp:
3280         * ksvg2/svg/SVGColorImpl.cpp:
3281         * ksvg2/svg/SVGComponentTransferFunctionElementImpl.cpp:
3282         * ksvg2/svg/SVGCursorElementImpl.cpp:
3283         * ksvg2/svg/SVGDOMImplementationImpl.cpp:
3284         * ksvg2/svg/SVGDefsElementImpl.cpp:
3285         * ksvg2/svg/SVGDescElementImpl.cpp:
3286         * ksvg2/svg/SVGDocumentImpl.cpp:
3287         * ksvg2/svg/SVGElementImpl.cpp:
3288         * ksvg2/svg/SVGElementInstanceImpl.cpp:
3289         * ksvg2/svg/SVGElementInstanceListImpl.cpp:
3290         * ksvg2/svg/SVGEllipseElementImpl.cpp:
3291         * ksvg2/svg/SVGExceptionImpl.cpp:
3292         * ksvg2/svg/SVGExternalResourcesRequiredImpl.cpp:
3293         * ksvg2/svg/SVGFEBlendElementImpl.cpp:
3294         * ksvg2/svg/SVGFEColorMatrixElementImpl.cpp:
3295         * ksvg2/svg/SVGFEComponentTransferElementImpl.cpp:
3296         * ksvg2/svg/SVGFECompositeElementImpl.cpp:
3297         * ksvg2/svg/SVGFEFloodElementImpl.cpp:
3298         * ksvg2/svg/SVGFEFuncAElementImpl.cpp:
3299         * ksvg2/svg/SVGFEFuncBElementImpl.cpp:
3300         * ksvg2/svg/SVGFEFuncGElementImpl.cpp:
3301         * ksvg2/svg/SVGFEFuncRElementImpl.cpp:
3302         * ksvg2/svg/SVGFEGaussianBlurElementImpl.cpp:
3303         * ksvg2/svg/SVGFEImageElementImpl.cpp:
3304         * ksvg2/svg/SVGFEMergeElementImpl.cpp:
3305         * ksvg2/svg/SVGFEMergeNodeElementImpl.cpp:
3306         * ksvg2/svg/SVGFEOffsetElementImpl.cpp:
3307         * ksvg2/svg/SVGFETileElementImpl.cpp:
3308         * ksvg2/svg/SVGFETurbulenceElementImpl.cpp:
3309         * ksvg2/svg/SVGFilterElementImpl.cpp:
3310         * ksvg2/svg/SVGFilterPrimitiveStandardAttributesImpl.cpp:
3311         * ksvg2/svg/SVGFitToViewBoxImpl.cpp:
3312         * ksvg2/svg/SVGGElementImpl.cpp:
3313         * ksvg2/svg/SVGGradientElementImpl.cpp:
3314         * ksvg2/svg/SVGHelper.cpp:
3315         * ksvg2/svg/SVGImageElementImpl.cpp:
3316         * ksvg2/svg/SVGLangSpaceImpl.cpp:
3317         * ksvg2/svg/SVGLengthImpl.cpp:
3318         * ksvg2/svg/SVGLengthListImpl.cpp:
3319         * ksvg2/svg/SVGLineElementImpl.cpp:
3320         * ksvg2/svg/SVGLinearGradientElementImpl.cpp:
3321         * ksvg2/svg/SVGLocatableImpl.cpp:
3322         * ksvg2/svg/SVGMarkerElementImpl.cpp:
3323         * ksvg2/svg/SVGMatrixImpl.cpp:
3324         * ksvg2/svg/SVGNumberImpl.cpp:
3325         * ksvg2/svg/SVGNumberListImpl.cpp:
3326         * ksvg2/svg/SVGPaintImpl.cpp:
3327         * ksvg2/svg/SVGPathElementImpl.cpp:
3328         * ksvg2/svg/SVGPathSegArcImpl.cpp:
3329         * ksvg2/svg/SVGPathSegClosePathImpl.cpp:
3330         * ksvg2/svg/SVGPathSegCurvetoCubicImpl.cpp:
3331         * ksvg2/svg/SVGPathSegCurvetoCubicSmoothImpl.cpp:
3332         * ksvg2/svg/SVGPathSegCurvetoQuadraticImpl.cpp:
3333         * ksvg2/svg/SVGPathSegCurvetoQuadraticSmoothImpl.cpp:
3334         * ksvg2/svg/SVGPathSegImpl.cpp:
3335         * ksvg2/svg/SVGPathSegLinetoHorizontalImpl.cpp:
3336         * ksvg2/svg/SVGPathSegLinetoImpl.cpp:
3337         * ksvg2/svg/SVGPathSegLinetoVerticalImpl.cpp:
3338         * ksvg2/svg/SVGPathSegListImpl.cpp:
3339         * ksvg2/svg/SVGPathSegMovetoImpl.cpp:
3340         * ksvg2/svg/SVGPatternElementImpl.cpp:
3341         * ksvg2/svg/SVGPointImpl.cpp:
3342         * ksvg2/svg/SVGPointListImpl.cpp:
3343         * ksvg2/svg/SVGPolyElementImpl.cpp:
3344         * ksvg2/svg/SVGPolygonElementImpl.cpp:
3345         * ksvg2/svg/SVGPolylineElementImpl.cpp:
3346         * ksvg2/svg/SVGPreserveAspectRatioImpl.cpp:
3347         * ksvg2/svg/SVGRadialGradientElementImpl.cpp:
3348         * ksvg2/svg/SVGRectElementImpl.cpp:
3349         * ksvg2/svg/SVGRectImpl.cpp:
3350         * ksvg2/svg/SVGSVGElementImpl.cpp:
3351         * ksvg2/svg/SVGScriptElementImpl.cpp:
3352         * ksvg2/svg/SVGSetElementImpl.cpp:
3353         * ksvg2/svg/SVGStopElementImpl.cpp:
3354         * ksvg2/svg/SVGStringListImpl.cpp:
3355         * ksvg2/svg/SVGStylableImpl.cpp:
3356         * ksvg2/svg/SVGStyleElementImpl.cpp:
3357         * ksvg2/svg/SVGStyledElementImpl.cpp:
3358         * ksvg2/svg/SVGSwitchElementImpl.cpp:
3359         * ksvg2/svg/SVGSymbolElementImpl.cpp:
3360         * ksvg2/svg/SVGTSpanElementImpl.cpp:
3361         * ksvg2/svg/SVGTestsImpl.cpp:
3362         * ksvg2/svg/SVGTextContentElementImpl.cpp:
3363         * ksvg2/svg/SVGTextElementImpl.cpp:
3364         * ksvg2/svg/SVGTextPositioningElementImpl.cpp:
3365         * ksvg2/svg/SVGTitleElementImpl.cpp:
3366         * ksvg2/svg/SVGTransformImpl.cpp:
3367         * ksvg2/svg/SVGTransformListImpl.cpp:
3368         * ksvg2/svg/SVGTransformableImpl.cpp:
3369         * ksvg2/svg/SVGURIReferenceImpl.cpp:
3370         * ksvg2/svg/SVGUseElementImpl.cpp:
3371         * ksvg2/svg/SVGViewElementImpl.cpp:
3372         * ksvg2/svg/SVGZoomAndPanImpl.cpp:
3373         * ksvg2/svg/svgpathparser.cpp:
3374
3375 2005-10-03  Eric Seidel  <eseidel@apple.com>
3376
3377         Reviewed by mjs.
3378
3379         Fixed AbstractView toString(), by giving it a prototype.
3380         <rdar://problem/4233558> toString on event.view Object fails with "No Default Value" in console
3381
3382         * khtml/ecma/kjs_views.cpp:
3383         (KJS::DOMAbstractView::DOMAbstractView): sets prototype
3384         (KJS::DOMAbstractView::getOwnPropertySlot): now getStaticValue
3385         (KJS::DOMAbstractViewProtoFunc::callAsFunction): renamed
3386         * khtml/ecma/kjs_views.h:
3387
3388 2005-10-03  David Hyatt  <hyatt@apple.com>
3389
3390         Fix regression caused by variable->auto change.  Accidentally removed a line of code from calcWidthUsing.
3391         
3392         Reviewed by mjs
3393
3394         * khtml/rendering/render_box.cpp:
3395         (RenderBox::calcWidthUsing):
3396
3397 2005-10-03  Justin Garcia  <justin.garcia@apple.com>
3398
3399         Reviewed by darin
3400         
3401         <rdar://problem/4060947> Safari crashes trying to save PDF file as web archive (NULL KHTMLPart)
3402
3403         * kwq/WebCoreBridge.mm:
3404         (+[WebCoreBridge bridgeForDOMDocument:]):
3405         Added a check for a null part.
3406
3407 2005-10-03  Justin Garcia  <justin.garcia@apple.com>
3408
3409         Reviewed by geoff, darin
3410
3411         * khtml/khtml_part.cpp:
3412         (KHTMLPart::handleFallbackContent):
3413         Don't handle fallback content for <embed> tags.
3414
3415 2005-10-03  Maciej Stachowiak  <mjs@apple.com>
3416
3417         - add missing config.h
3418
3419         * khtml/config.h: Added.
3420
3421 2005-10-03  Maciej Stachowiak  <mjs@apple.com>
3422
3423         Reviewed by Darin.
3424
3425         http://bugzilla.opendarwin.org/show_bug.cgi?id=5180
3426         event.stopPropagation() prevents the default action - it shouldn't
3427
3428         Amusingly this bug existed in 3 different places.
3429
3430         * khtml/ecma/kjs_events.cpp:
3431         (KJS::DOMEventProtoFunc::callAsFunction): Don't let stopPropagation fall through
3432         to preventDefault.
3433         * khtml/html/html_formimpl.cpp:
3434         (D