3c1df7052d1b3d1eb0185a918fe363200915d7dd
[WebKit-https.git] / WebCore / ChangeLog-2005-08-23
1 2004-05-18  Richard Williamson   <rjw@apple.com>
2
3         Added stubs to get the WebScriptObject for the window
4         JS object.
5         
6         Made updateRenderingForBindings more robust when handed a
7         nil root object.  This was causing a crash in DB.  Still need to
8         address root cause of nil root object.
9
10         Reviewed by Maciej.
11
12         * khtml/khtml_part.cpp:
13         (KHTMLPart::begin):
14         * kwq/KWQKHTMLPart.h:
15         * kwq/KWQKHTMLPart.mm:
16         (KWQKHTMLPart::windowScriptObject):
17         (KWQKHTMLPart::partClearedInBegin):
18         * kwq/WebCoreBridge.h:
19         * kwq/WebCoreBridge.mm:
20         (updateRenderingForBindings):
21         (-[WebCoreBridge init]):
22         (-[WebCoreBridge stringByEvaluatingJavaScriptFromString:]):
23         (-[WebCoreBridge windowScriptObject]):
24
25 2004-05-17  Maciej Stachowiak  <mjs@apple.com>
26
27         Reviewed by Ken.
28
29         <rdar://problem/3656719>: Implement outerHTML and setOuterHTML DOM extensions
30
31         They were already implemented (by Chris), all that was required
32         was exporting them to JavaScript.
33
34         * khtml/dom/html_element.cpp:
35         (HTMLElement::outerHTML): Call impl.
36         (HTMLElement::setOuterHTML): Ditto.
37         * khtml/dom/html_element.h: Prototype new methods.
38         * khtml/ecma/kjs_html.cpp:
39         (KJS::HTMLElement::getValueProperty): Add OuterHTML.
40         (KJS::HTMLElement::putValue): Add OuterHTML.
41         * khtml/ecma/kjs_html.h: Add new enum values.
42         * khtml/ecma/kjs_html.lut.h: Regenerated.
43
44 2004-05-18  Ken Kocienda  <kocienda@apple.com>
45
46         Reviewed by Hyatt
47
48         Removed support for designMode attribute, which we will not be supporting for Tiger.
49         Removed inEditMode from KHTMLPart. This cached designMode value.
50         Removed KHTMLPart::isEditingAtNode function. Asking a node if it is content-editable
51         is a suitable replacement.
52
53         * khtml/dom/dom_misc.h: Remove TristateFlag enum that was used to track designMode values.
54         * khtml/dom/html_document.cpp: Remove designMode and setDesignMode.
55         * khtml/dom/html_document.h: Ditto.
56         * khtml/ecma/kjs_html.cpp:
57         (KJS::HTMLDocument::tryGet): Remove designMode.
58         (KJS::HTMLDocument::putValue): Ditto.
59         * khtml/ecma/kjs_html.lut.h:
60         (KJS::): Ditto.
61         * khtml/html/html_documentimpl.cpp: Remove designMode and setDesignMode.
62         * khtml/html/html_documentimpl.h: Ditto.
63         * khtml/khtml_part.cpp: Remove setEditMode, editMode, inEditMode, and isEditingAtNode.
64         * khtml/khtml_part.h: Ditto.
65         * khtml/khtmlpart_p.h: Remove m_inEditMode variable.
66         (KHTMLPartPrivate::KHTMLPartPrivate):
67         * khtml/khtmlview.cpp:
68         (KHTMLView::focusNextPrevNode): Change over one use in tree of isEditingAtNode to use
69         isContentEditable instead. isContentEditable will be modified in future patch to handle
70         whether the per-part switch has been thrown to override whether something is editable or not.
71
72 2004-05-17  Richard Williamson   <rjw@apple.com>
73
74         Implemented new API for WebScriptObject.
75         Fixed <rdar://problem/3657145>: (objc to javascript method calls do not cause updates.)
76
77         Reviewed by Hyatt.
78
79         * kwq/WebCoreBridge.mm:
80         (updateRenderingForBindings):
81         (-[WebCoreBridge init]):
82
83 2004-05-14  Vicki Murley  <vicki@apple.com>
84
85         Reviewed by mjs.
86  
87         <rdar://problem/3642427>: framework marketing number should be 2.0 for DoubleBarrel release
88
89         * WebCore.pbproj/project.pbxproj: change CFBundleShortVersionString to 2.0
90
91 2004-05-14  Darin Adler  <darin@apple.com>
92
93         Reviewed by Darin, coded by Maciej.
94
95         - fixed extra repaints when doing auto-fill checks on all pages that have pop-up buttons
96
97         * kwq/KWQComboBox.mm:
98         (QComboBox::populateMenu): Set the populating-menu flag and clear it when done.
99         (-[KWQPopUpButton setPopulatingMenu:]): Added. Sets flag.
100         (-[KWQPopUpButton setNeedsDisplayInRect:]): Do nothing if the flag is set.
101
102 2004-05-14  Darin Adler  <darin@apple.com>
103
104         Reviewed by Dave.
105
106         - fixed <rdar://problem/3650026>: "background property doesn't work right on webdevtips.com due to background:inherit"
107
108         * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::applyDeclarations):
109         Added CSS_PROP_BACKGROUND to the list of properties that must be applied in the first pass.
110
111 === Safari-140 ===
112
113 2004-05-13  David Hyatt  <hyatt@apple.com>
114
115         Fix image loading for <input type=image> and <object>.  Make sure it works dynamically and make sure
116         the renderer is properly null-checked at attach time.
117         
118         Reviewed by darin
119
120         * khtml/html/html_formimpl.cpp:
121         (HTMLInputElementImpl::HTMLInputElementImpl):
122         (HTMLInputElementImpl::~HTMLInputElementImpl):
123         (HTMLInputElementImpl::parseHTMLAttribute):
124         (HTMLInputElementImpl::attach):
125         * khtml/html/html_formimpl.h:
126         * khtml/html/html_objectimpl.cpp:
127         (HTMLObjectElementImpl::HTMLObjectElementImpl):
128         (HTMLObjectElementImpl::~HTMLObjectElementImpl):
129         (HTMLObjectElementImpl::parseHTMLAttribute):
130         (HTMLObjectElementImpl::attach):
131         * khtml/html/html_objectimpl.h:
132
133 2004-05-14  Chris Blumenberg  <cblu@apple.com>
134
135         - Made DOMEventTarget a formal protocol that is implemented by DOMNode
136         - Made DOMEventListener a formal protocol that any object can implement
137
138         Reviewed by kocienda.
139
140         * kwq/DOMCore.h:
141         * kwq/DOMEvents.h:
142
143 2004-05-13  Richard Williamson   <rjw@apple.com>
144
145         Removed vestigial isSelected method.
146
147         Reviewed by Chris.
148
149         * kwq/KWQWidget.h:
150         * kwq/KWQWidget.mm:
151         (QWidget::setIsSelected):
152         * kwq/WebCoreBridge.h:
153
154 2004-05-13  Chris Blumenberg  <cblu@apple.com>
155
156         Fixed: <rdar://problem/3616555>: (API: Make DOM extensions and WebKit DOM operations public)
157
158         Reviewed by rjw.
159
160         * kwq/DOM.h: added DOMExtensions.h
161         * kwq/DOMHTML.h: renamed frame on DOMHTMLTableElement to frameBorders to avoid NSView conflicts
162         * kwq/DOMHTML.mm:
163         (-[DOMHTMLTableElement frameBorders]):
164         (-[DOMHTMLTableElement setFrameBorders:]):
165
166 2004-05-13  Richard Williamson   <rjw@apple.com>
167
168         Changed imports of all DOM headers.  DOM headers
169         should be imported using the normal #import <WebCore/foo.h>,
170         they import is modified when copied to WebKit.
171
172         Reviewed by Chris.
173
174         * ChangeLog:
175         * kwq/DOM.h:
176         * kwq/DOMCSS.h:
177         * kwq/DOMCore.h:
178         * kwq/DOMEvents.h:
179         * kwq/DOMExtensions.h:
180         * kwq/DOMHTML.h:
181         * kwq/DOMInternal.h:
182         * kwq/DOMRange.h:
183         * kwq/DOMStylesheets.h:
184         * kwq/DOMTraversal.h:
185         * kwq/DOMViews.h:
186
187 2004-05-13  Ken Kocienda  <kocienda@apple.com>
188
189         Reviewed by me
190
191         * khtml/editing/htmlediting_impl.cpp:
192         (khtml::ApplyStyleCommandImpl::applyStyleIfNeeded): Fix deployment
193         build bustage. Uninitialized variable.
194
195 2004-05-13  Ken Kocienda  <kocienda@apple.com>
196
197         Reviewed by Hyatt
198
199         Implemented first cut at text style change code.
200
201         * khtml/editing/htmlediting.cpp:
202         (khtml::ApplyStyleCommand::ApplyStyleCommand):
203         (khtml::ApplyStyleCommand::~ApplyStyleCommand):
204         (khtml::ApplyStyleCommand::impl):
205         (khtml::RemoveCSSPropertyCommand::RemoveCSSPropertyCommand):
206         (khtml::RemoveCSSPropertyCommand::~RemoveCSSPropertyCommand):
207         (khtml::RemoveCSSPropertyCommand::impl):
208         (khtml::RemoveCSSPropertyCommand::styleDeclaration):
209         (khtml::RemoveCSSPropertyCommand::property):
210         (khtml::RemoveNodeAttributeCommand::RemoveNodeAttributeCommand):
211         (khtml::RemoveNodeAttributeCommand::~RemoveNodeAttributeCommand):
212         (khtml::RemoveNodeAttributeCommand::impl):
213         (khtml::RemoveNodeAttributeCommand::element):
214         (khtml::RemoveNodeAttributeCommand::attribute):
215         (khtml::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand):
216         (khtml::RemoveNodePreservingChildrenCommand::~RemoveNodePreservingChildrenCommand):
217         (khtml::RemoveNodePreservingChildrenCommand::impl):
218         (khtml::RemoveNodePreservingChildrenCommand::node):
219         (khtml::SetNodeAttributeCommand::SetNodeAttributeCommand):
220         (khtml::SetNodeAttributeCommand::~SetNodeAttributeCommand):
221         (khtml::SetNodeAttributeCommand::impl):
222         (khtml::SetNodeAttributeCommand::element):
223         (khtml::SetNodeAttributeCommand::attribute):
224         (khtml::SetNodeAttributeCommand::value):
225         * khtml/editing/htmlediting.h:
226         (khtml::):
227         (khtml::ApplyStyleCommand::):
228         
229         Removed a bunch of unnecessary DOM namespace qualifiers.
230         Fixed calls to parent(), which relied on the TreeShared interface to get a parent,
231         and changed to the parentNode() DOM Node call, which is more suitable given the
232         intention.
233         
234         * khtml/editing/htmlediting_impl.cpp:
235         (khtml::CompositeEditCommandImpl::insertNodeBefore):
236         (khtml::CompositeEditCommandImpl::insertNodeAfter):
237         (khtml::CompositeEditCommandImpl::appendNode):
238         (khtml::CompositeEditCommandImpl::removeNode):
239         (khtml::CompositeEditCommandImpl::removeNodeAndPrune):
240         (khtml::CompositeEditCommandImpl::removeNodePreservingChildren):
241         (khtml::CompositeEditCommandImpl::splitTextNode):
242         (khtml::CompositeEditCommandImpl::joinTextNodes):
243         (khtml::CompositeEditCommandImpl::insertText):
244         (khtml::CompositeEditCommandImpl::deleteText):
245         (khtml::CompositeEditCommandImpl::replaceText):
246         (khtml::CompositeEditCommandImpl::removeCSSProperty):
247         (khtml::CompositeEditCommandImpl::removeNodeAttribute):
248         (khtml::CompositeEditCommandImpl::setNodeAttribute):
249         
250         
251         Text style change command implementations.
252         There are a couple more parent() -> parentNode() changes in here as well.
253         
254         (khtml::ApplyStyleCommandImpl::ApplyStyleCommandImpl):
255         (khtml::ApplyStyleCommandImpl::~ApplyStyleCommandImpl):
256         (khtml::ApplyStyleCommandImpl::commandID):
257         (khtml::ApplyStyleCommandImpl::doApply):
258         (khtml::ApplyStyleCommandImpl::isHTMLStyleNode):
259         (khtml::ApplyStyleCommandImpl::removeHTMLStyleNode):
260         (khtml::ApplyStyleCommandImpl::removeCSSStyle):
261         (khtml::ApplyStyleCommandImpl::removeCSSProperty):
262         (khtml::ApplyStyleCommandImpl::setNodeAttribute):
263         (khtml::ApplyStyleCommandImpl::removeNodeAttribute):
264         (khtml::ApplyStyleCommandImpl::removeNodePreservingChildren):
265         (khtml::ApplyStyleCommandImpl::mustExlicitlyApplyStyle):
266         (khtml::ApplyStyleCommandImpl::createExplicitApplyStyleNode):
267         (khtml::ApplyStyleCommandImpl::currentlyHasStyle):
268         (khtml::ApplyStyleCommandImpl::cssProperty):
269         (khtml::ApplyStyleCommandImpl::matchesTargetStyle):
270         (khtml::ApplyStyleCommandImpl::positionInsertionPoint):
271         (khtml::ApplyStyleCommandImpl::splitTextAtStartIfNeeded):
272         (khtml::ApplyStyleCommandImpl::splitTextAtEndIfNeeded):
273         (khtml::ApplyStyleCommandImpl::applyStyleIfNeeded):
274         (khtml::ApplyStyleCommandImpl::removeStyle):
275         (khtml::ApplyStyleCommandImpl::cloneSelection):
276         (khtml::ApplyStyleCommandImpl::insertFragment):
277         (khtml::ApplyStyleCommandImpl::applyInPlace):
278         (khtml::ApplyStyleCommandImpl::applyUsingFragment):
279         (khtml::DeleteSelectionCommandImpl::DeleteSelectionCommandImpl):
280         (khtml::InsertNodeBeforeCommandImpl::doApply):
281         (khtml::InsertNodeBeforeCommandImpl::doUnapply):
282         (khtml::JoinTextNodesCommandImpl::doApply):
283         (khtml::PasteMarkupCommandImpl::PasteMarkupCommandImpl):
284         (khtml::RemoveCSSPropertyCommandImpl::RemoveCSSPropertyCommandImpl):
285         (khtml::RemoveCSSPropertyCommandImpl::~RemoveCSSPropertyCommandImpl):
286         (khtml::RemoveCSSPropertyCommandImpl::commandID):
287         (khtml::RemoveCSSPropertyCommandImpl::doApply):
288         (khtml::RemoveCSSPropertyCommandImpl::doUnapply):
289         (khtml::RemoveNodeAttributeCommandImpl::RemoveNodeAttributeCommandImpl):
290         (khtml::RemoveNodeAttributeCommandImpl::~RemoveNodeAttributeCommandImpl):
291         (khtml::RemoveNodeAttributeCommandImpl::commandID):
292         (khtml::RemoveNodeAttributeCommandImpl::doApply):
293         (khtml::RemoveNodeAttributeCommandImpl::doUnapply):
294         (khtml::RemoveNodePreservingChildrenCommandImpl::RemoveNodePreservingChildrenCommandImpl):
295         (khtml::RemoveNodePreservingChildrenCommandImpl::~RemoveNodePreservingChildrenCommandImpl):
296         (khtml::RemoveNodePreservingChildrenCommandImpl::commandID):
297         (khtml::RemoveNodePreservingChildrenCommandImpl::doApply):
298         (khtml::SetNodeAttributeCommandImpl::SetNodeAttributeCommandImpl):
299         (khtml::SetNodeAttributeCommandImpl::~SetNodeAttributeCommandImpl):
300         (khtml::SetNodeAttributeCommandImpl::commandID):
301         (khtml::SetNodeAttributeCommandImpl::doApply):
302         (khtml::SetNodeAttributeCommandImpl::doUnapply):
303         (khtml::SplitTextNodeCommandImpl::doUnapply):
304         (khtml::TypingCommandImpl::insertText):
305
306
307         Text style change command implementations.
308
309         * khtml/editing/htmlediting_impl.h:
310         (khtml::ApplyStyleCommandImpl::):
311         (khtml::ApplyStyleCommandImpl::removingStyle):
312         (khtml::RemoveCSSPropertyCommandImpl::styleDeclaration):
313         (khtml::RemoveCSSPropertyCommandImpl::property):
314         (khtml::RemoveNodeAttributeCommandImpl::element):
315         (khtml::RemoveNodeAttributeCommandImpl::attribute):
316         (khtml::RemoveNodePreservingChildrenCommandImpl::node):
317         (khtml::SetNodeAttributeCommandImpl::element):
318         (khtml::SetNodeAttributeCommandImpl::attribute):
319         (khtml::SetNodeAttributeCommandImpl::value):
320         
321         
322         Fixed a bug where the TreeWalker returned the current node instead
323         of null when an attempt was made to use the iterator to go to a
324         non-existent location.
325         
326         * khtml/xml/dom2_traversalimpl.cpp:
327         (DOM::TreeWalkerImpl::parentNode):
328         (DOM::TreeWalkerImpl::firstChild):
329         (DOM::TreeWalkerImpl::lastChild):
330         (DOM::TreeWalkerImpl::previousSibling):
331         (DOM::TreeWalkerImpl::nextSibling):
332         (DOM::TreeWalkerImpl::previousNode):
333         (DOM::TreeWalkerImpl::nextNode):
334         
335         
336         A convenience.
337         
338         * khtml/xml/dom_elementimpl.cpp:
339         (ElementImpl::hasAttributes):
340         * khtml/xml/dom_elementimpl.h:
341         
342         
343         New helpers to begin moving us to using DOM Range-compliant positions in our code.
344         
345         * khtml/xml/dom_position.cpp:
346         (DOM::Position::equivalentRangeCompliantPosition):
347         (DOM::Position::equivalentShallowPosition):
348         (DOM::Position::inLastEditableInContainingEditableBlock):
349         
350         
351         (DOM::Position::debugPosition): Debugging aid.
352         * khtml/xml/dom_position.h:
353        
354         * kwq/WebCoreBridge.mm:
355         (-[WebCoreBridge applyStyle:]): First bit of wiring up. Some hard-coded temporary code 
356         in here will need to be improved soon.
357
358 2004-05-12  David Hyatt  <hyatt@apple.com>
359
360         Improve layout scheduling.  Make sure no layouts can be scheduled until over a minimum delay threshold.
361         
362         * khtml/khtmlview.cpp:
363         (KHTMLView::scheduleRelayout):
364         * khtml/rendering/render_frames.cpp:
365         (RenderPart::updateWidgetPositions):
366         * khtml/rendering/render_text.cpp:
367         (RenderText::paint):
368         * khtml/xml/dom_docimpl.cpp:
369         (DocumentImpl::DocumentImpl):
370         (DocumentImpl::close):
371         (DocumentImpl::setParsing):
372         (DocumentImpl::shouldScheduleLayout):
373         (DocumentImpl::minimumLayoutDelay):
374         * khtml/xml/dom_docimpl.h:
375
376 2004-05-11  Chris Blumenberg  <cblu@apple.com>
377
378         Support for: <rdar://problem/3616471>: (API: provide way to get from WebFrame to DOMDocument and vice versa)
379
380         Reviewed by rjw.
381
382         * kwq/DOM.mm:
383         (-[DOMDocument _ownerElement]): new
384         * kwq/DOMInternal.h:
385         * kwq/WebCoreBridge.h:
386         * kwq/WebCoreBridge.mm:
387         (-[WebCoreBridge frameElement]): new
388
389 2004-05-11  David Hyatt  <hyatt@apple.com>
390
391         Fix makeChildrenNonInline so that it does not wrap floats unless an inline is actually found.
392
393         Fix block minmaxwidth to add together contiguous runs of floats.
394
395         Fix the content image loader to not destroy the image when removed from the document.
396
397         Reviewed by darin
398         
399         * ChangeLog:
400         * khtml/html/html_imageimpl.cpp:
401         (HTMLImageLoader::~HTMLImageLoader):
402         (HTMLImageElementImpl::detach):
403         * khtml/html/html_imageimpl.h:
404         (DOM::):
405         * khtml/html/html_objectimpl.cpp:
406         (HTMLObjectElementImpl::createRenderer):
407         * khtml/html/html_objectimpl.h:
408         * khtml/rendering/render_block.cpp:
409         (khtml::getInlineRun):
410         (khtml::RenderBlock::calcInlineMinMaxWidth):
411         (khtml::RenderBlock::calcBlockMinMaxWidth):
412
413 2004-05-06  David Hyatt  <hyatt@apple.com>
414
415         Fix makeChildrenNonInline so that it does not wrap floats unless an inline is actually found.
416
417         Fix block minmaxwidth to add together contiguous runs of floats.
418
419         Fix the content image loader to not destroy the image when removed from the document.
420         
421         Reviewed by darin
422
423         * khtml/rendering/render_block.cpp:
424         (khtml::getInlineRun):
425         (khtml::RenderBlock::calcBlockMinMaxWidth):
426
427 2004-05-11  Vicki Murley  <vicki@apple.com>
428
429         Reviewed by Vicki (fixed by Darin).
430
431         * kwq/KWQKSSLKeyGen.h: fix build failure in B&I due to case sensitivity
432
433 2004-05-09  Maciej Stachowiak  <mjs@apple.com>
434
435         Reviewed by Darin.
436
437         - avoid redecoding animated images that are only used once for
438         ~2.5% iBench speedup (WebCore part of fix)
439
440         * khtml/rendering/render_image.cpp:
441         (RenderImage::setPixmap): Maintain use count for pixmap.
442         (RenderImage::~RenderImage): Likewise.
443         * kwq/KWQPixmap.h:
444         * kwq/KWQPixmap.mm:
445         (QPixmap::increaseUseCount): Call WebCoreImageRenderer
446         (QPixmap::decreaseUseCount): Call WebCoreImageRenderer
447         * kwq/WebCoreImageRenderer.h: Prototype new protocol methods.
448
449 2004-05-10  David Hyatt  <hyatt@apple.com>
450
451         Make sure that when finished parsing if all the right conditions are met, we just go ahead and updateRendering and
452         layout.
453         
454         Reviewed by rjw
455         
456         * khtml/khtmlview.cpp:
457         (KHTMLView::scheduleRelayout):
458
459 2004-05-08  Maciej Stachowiak  <mjs@apple.com>
460
461         Reviewed by Dave.
462
463         - some minor performance tweaks that together give .5% or so on
464         the HTML iBench
465         
466         * khtml/css/css_valueimpl.h: don't use a bitfield for id and important,
467         unpacking the bitfield is too expensive
468         * kwq/KWQArrayImpl.h:
469         * kwq/KWQArrayImpl.mm:
470         (KWQArrayImpl::at): inline this method because it's so hot
471         * kwq/KWQString.mm:
472         (allocateHandle): inline this function because it's so hot
473         (initializeHandleNodes): move this in the file so above can be inlined
474         (allocateNode): ditto
475
476 2004-05-10  David Hyatt  <hyatt@apple.com>
477
478         Move image loading to content.
479         
480         Reviewed by kocienda
481
482         * khtml/html/html_imageimpl.cpp:
483         (m_imageComplete):
484         (HTMLImageLoader::~HTMLImageLoader):
485         (HTMLImageLoader::updateFromElement):
486         (HTMLImageLoader::removedFromDocument):
487         (HTMLImageLoader::dispatchLoadEvent):
488         (HTMLImageLoader::notifyFinished):
489         (HTMLImageElementImpl::HTMLImageElementImpl):
490         (HTMLImageElementImpl::parseHTMLAttribute):
491         (HTMLImageElementImpl::attach):
492         (HTMLImageElementImpl::detach):
493         (HTMLImageElementImpl::removedFromDocument):
494         (HTMLImageElementImpl::currentImage):
495         * khtml/html/html_imageimpl.h:
496         (DOM::):
497         * khtml/html/html_objectimpl.cpp:
498         (HTMLObjectElementImpl::HTMLObjectElementImpl):
499         (HTMLObjectElementImpl::removedFromDocument):
500         (HTMLObjectElementImpl::attach):
501         * khtml/html/html_objectimpl.h:
502         * khtml/misc/loader.cpp:
503         (CachedImage::ref):
504         * khtml/rendering/render_image.cpp:
505         (RenderImage::RenderImage):
506         (RenderImage::setImage):
507         (RenderImage::updateAltText):
508         * khtml/rendering/render_image.h:
509         (khtml::RenderImage::getImage):
510         * khtml/rendering/render_object.cpp:
511         (RenderObject::canvas):
512         * khtml/xml/dom_docimpl.cpp:
513         (DocumentImpl::dispatchImageLoadEventSoon):
514         (DocumentImpl::removeImage):
515         (DocumentImpl::dispatchImageLoadEventsNow):
516         * khtml/xml/dom_docimpl.h:
517
518 2004-05-10  Darin Adler  <darin@apple.com>
519
520         Reviewed by Vicki.
521
522         - fixed build failure seen in B&I log (due to case sensitive file system?)
523
524         * kwq/KWQLoader.h: Include "KWQCString.h" rather than "QCString.h". The latter was
525         failing because the forwarding header is called "qcstring.h" and I guess B&I started
526         building with a case sensitive file system. I could have changed this to "qcstring.h",
527         but it seemed better to use the header's real name since we're inside KWQ here.
528
529 2004-05-07  Maciej Stachowiak  <mjs@apple.com>
530
531         Reviewed by Dave.
532
533         - change things around so extremely hot TokenizerString::current()
534         method doesn't have to do any work. It's cheaper to maintain the
535         relevant state than to always compute it.
536         
537         * khtml/misc/stringit.h:
538         (khtml::TokenizerString::TokenizerString): Initialize m_currentChar
539         (khtml::TokenizerString::push): update m_currentChar
540         (khtml::TokenizerString::advance): ditto
541         (khtml::TokenizerString::current): return m_currentChar
542         * khtml/misc/stringit.cpp:
543         (khtml::TokenizerString::clear): update m_currentChar
544         (khtml::TokenizerString::append): update m_currentChar
545         (khtml::TokenizerString::prepend): update m_currentChar
546
547 2004-05-07  Don Melton  <gramps@apple.com>
548
549         Reviewed by Dave.
550
551         Fixed minor, edge-case regression in KEYGEN RSA logic caused by Dave's
552         "atomic string" patch back in January.
553
554         * khtml/html/html_formimpl.cpp:
555         (HTMLKeygenElementImpl::encoding):
556
557 === Safari-139 ===
558
559 2004-05-06  Maciej Stachowiak  <mjs@apple.com>
560
561         Reviewed by Darin.
562
563         - two trivial changes for a 1% speedup, thanks to Shark
564         
565         * khtml/dom/dom_string.cpp:
566         * khtml/dom/dom_string.h:
567         (DOM::DOMString::~DOMString): inline this method because it's hot and the
568         function call overhead was very costly.
569         * WebCore.pbproj/project.pbxproj: Add -falign-loops=16
570         optimization flag, as suggested by Shark.
571
572 2004-05-06  Chris Blumenberg  <cblu@apple.com>
573
574         Added alpha to DOMRGBColor as an extension.
575
576         Reviewed by dave.
577
578         * kwq/DOM-CSS.mm:
579         (-[DOMRGBColor alpha]): new
580         * kwq/DOMExtensions.h:
581
582 2004-05-05  David Hyatt  <hyatt@apple.com>
583
584         Fix whitespace rendering for brs inside pres. The bug is 3640711.
585         
586         Reviewed by kocienda
587
588         * khtml/rendering/bidi.cpp:
589         (khtml::RenderBlock::layoutInlineChildren):
590         (khtml::RenderBlock::findNextLineBreak):
591
592 2004-04-25  Maciej Stachowiak  <mjs@apple.com>
593
594         Reviewed by Darin.
595
596         * khtml/ecma/kjs_events.cpp:
597         (JSLazyEventListener::parseCode): Make sure to protect the
598         permanent "event" string object.
599
600 2004-05-05  David Hyatt  <hyatt@apple.com>
601
602         Fixes for 3637924, 3643356, and 3558513, all crashes in recalcStyle.  Make sure the tree is always in a
603         sane state when removing children while changing .innerHTML.
604         
605         Reviewed by darin
606
607         * khtml/xml/dom_nodeimpl.cpp:
608
609 2004-05-05  David Hyatt  <hyatt@apple.com>
610
611         A collection of fixes.
612
613         (1) Fix a regression from the style sharing landing that made visited and unvisited links accidentally share.
614         (2) Make sure 100% height divs fill the <body> in quirks mode, even if the body has no height specified.
615         (3) Make sure table cell percentage heights exclude border/padding.
616         (4) Make sure that before flexing auto height is used for the contents of the cells.
617         
618         Reviewed by darin
619
620         * khtml/css/cssstyleselector.cpp:
621         (khtml::CSSStyleSelector::canShareStyleWithElement):
622         (khtml::CSSStyleSelector::locateSharedStyle):
623         * khtml/rendering/render_box.cpp:
624         (RenderBox::calcPercentageHeight):
625         * khtml/rendering/render_table.cpp:
626         (RenderTable::layout):
627         (RenderTableSection::layoutRows):
628
629 2004-05-05  Chris Blumenberg  <cblu@apple.com>
630
631         - DOM Extensions API tweaks
632         - Implemented outerHTML
633
634         Reviewed by kocienda.
635
636         * WebCore-combined.exp:
637         * khtml/html/html_elementimpl.cpp:
638         (HTMLElementImpl::outerHTML): new
639         (HTMLElementImpl::setOuterHTML): mew
640         * khtml/html/html_elementimpl.h:
641         * kwq/DOMExtensions.h: removed background methods on table and table cell since these are unnecessary conveniences
642         * kwq/DOMHTML.mm:
643         (-[DOMHTMLElement outerHTML]): new
644         (-[DOMHTMLElement setOuterHTML:]): mew
645
646 2004-05-04  David Hyatt  <hyatt@apple.com>
647
648         Fix for 3641331, make sure <th> elements don't reset text-align to center if they inherit a specified
649         value.
650
651         Also remove the styles from <abbr> and <acronym>.
652         
653         Reviewed by darin
654
655         * khtml/css/cssstyleselector.cpp:
656         (khtml::CSSStyleSelector::adjustRenderStyle):
657         * khtml/css/html4.css:
658         * khtml/css/quirks.css:
659
660 2004-05-04  Ken Kocienda  <kocienda@apple.com>
661
662         Reviewed by Hyatt
663         
664         Fix for behavior which extends selection drawing to beginning and end of blocks.
665         I added this feature a few days ago, but my checks to see if the extension should
666         be done was naive: Is first or last item in root line box selected? Clearly this 
667         needs to be "selection is *beyond* first or last item in root line box. Done.
668
669         * khtml/rendering/render_image.cpp:
670         (RenderImage::paint): Add selectionState() == SelectionInside check.
671         * khtml/rendering/render_text.cpp:
672         (InlineTextBox::paintSelection): Constrain passed-in offsets to be relative to box.
673         Use passed-in offsets to check whether selection extends beyond this box. Also, now
674         passes in flag to tell whether the whole RenderText has selectionState() == SelectionInside
675         (in which case you always want to extend).
676         (RenderText::paint): Remove box offset constraining from here. Now done in above function.
677         * khtml/rendering/render_text.h: Modify paintSelection interface to add 
678         selectionState() == SelectionInside flag.
679
680 2004-05-04  Ken Kocienda  <kocienda@apple.com>
681
682         Reviewed by me
683         
684         Added layout tests for DOM traversal objects.
685
686         * layout-tests/traversal/node-iterator-001-expected.txt: Added.
687         * layout-tests/traversal/node-iterator-001.html: Added.
688         * layout-tests/traversal/node-iterator-002-expected.txt: Added.
689         * layout-tests/traversal/node-iterator-002.html: Added.
690         * layout-tests/traversal/node-iterator-003-expected.txt: Added.
691         * layout-tests/traversal/node-iterator-003.html: Added.
692         * layout-tests/traversal/node-iterator-004-expected.txt: Added.
693         * layout-tests/traversal/node-iterator-004.html: Added.
694         * layout-tests/traversal/node-iterator-005-expected.txt: Added.
695         * layout-tests/traversal/node-iterator-005.html: Added.
696         * layout-tests/traversal/node-iterator-006-expected.txt: Added.
697         * layout-tests/traversal/node-iterator-006.html: Added.
698         * layout-tests/traversal/node-iterator-007-expected.txt: Added.
699         * layout-tests/traversal/node-iterator-007.html: Added.
700         * layout-tests/traversal/traversal.js: Added.
701         * layout-tests/traversal/tree-walker-001-expected.txt: Added.
702         * layout-tests/traversal/tree-walker-001.html: Added.
703         * layout-tests/traversal/tree-walker-002-expected.txt: Added.
704         * layout-tests/traversal/tree-walker-002.html: Added.
705         * layout-tests/traversal/tree-walker-003-expected.txt: Added.
706         * layout-tests/traversal/tree-walker-003.html: Added.
707         * layout-tests/traversal/tree-walker-004-expected.txt: Added.
708         * layout-tests/traversal/tree-walker-004.html: Added.
709
710 2004-05-04  Ken Kocienda  <kocienda@apple.com>
711
712         Reviewed by Hyatt
713
714         * khtml/xml/dom2_traversalimpl.cpp:
715         (DOM::NodeIteratorImpl::nextNode): Change to make NodeIterators behave like the spec in that
716         reference node is null until you iterate the first time. 
717         (DOM::NodeIteratorImpl::previousNode): Ditto.
718
719 2004-05-04  Ken Kocienda  <kocienda@apple.com>
720
721         Reviewed by me
722
723         * WebCore.pbproj/project.pbxproj: Backed out unintentional
724         change.
725
726 2004-05-04  Ken Kocienda  <kocienda@apple.com>
727
728         Reviewed by Hyatt
729         
730         Implemented DOM traversal objects, NodeIterator and TreeWalker.
731
732         * WebCore-combined.exp: Regenerate
733         * WebCore.exp: Export DOMNodeFilter protocol
734         * khtml/dom/dom2_traversal.cpp: Completed half-done implementation pulled from KDE tree.
735         * khtml/dom/dom2_traversal.h: Ditto.
736         * khtml/dom/dom_doc.cpp:
737         (DOM::Document::createNodeIterator): Ditto.
738         (DOM::Document::createTreeWalker): Ditto.
739         * khtml/dom/dom_doc.h: Ditto.
740         * khtml/ecma/kjs_dom.cpp:
741         (DOMDocumentProtoFunc::tryCall): Fix cases that create traversal objects.
742         * khtml/ecma/kjs_traversal.cpp:
743         (DOMNodeIterator::getValueProperty): Add referenceNode and pointerBeforeReferenceNode
744         properties to node interator.
745         (DOMTreeWalkerProtoFunc::tryCall): Fix typo where DOMTreeWalker::PreviousNode case called previousSibling function.
746         (JSNodeFilterCondition::JSNodeFilterCondition): Implement JS glue class for node filter conditions.
747         (JSNodeFilterCondition::acceptNode): Ditto.
748         * khtml/ecma/kjs_traversal.h:
749         (KJS::DOMNodeIterator::): Add ReferenceNode and PointerBeforeReferenceNode constants.
750         * khtml/ecma/kjs_traversal.lut.h:
751         (KJS::): Regenerated
752         * khtml/xml/dom2_traversalimpl.cpp: Completed half-done implementation pulled from KDE tree.
753         * khtml/xml/dom2_traversalimpl.h: Ditto.
754         * khtml/xml/dom_docimpl.cpp:
755         (DocumentImpl::createNodeIterator): Ditto.
756         (DocumentImpl::createTreeWalker): Ditto.
757         * khtml/xml/dom_docimpl.h: Ditto.
758         * khtml/xml/dom_nodeimpl.cpp:
759         (NodeImpl::checkAddChild): Patched due to change in isAncestor function. This was the one pre-existing caller.
760         (NodeImpl::isAncestor): Changed so that it does not return true for itself: node->isAncestor(node) now returns false.
761         * khtml/xml/dom_nodeimpl.h: Made isAncestor const.
762         * kwq/DOM.mm: Implemented obj-c glue for traversal objects.
763         * kwq/DOMInternal.h: Ditto.
764         * kwq/DOMTraversal.h: Ditto.
765
766 2004-05-04  Darin Adler  <darin@apple.com>
767
768         Reviewed by Ken.
769
770         - fixed <rdar://problem/3642252>: "starting to drag a link and then releasing needs to activate the link if you are still over it"
771
772         * khtml/khtmlview.cpp:
773         (KHTMLView::viewportMouseMoveEvent): Put hysteresis check inside !APPLE_CHANGES because
774         the Web Kit does our hysteresis checks.
775         (KHTMLView::viewportMouseReleaseEvent): Ditto.
776
777         * kwq/KWQApplication.h: Removed startDragDistance and globalStrut; unused.
778         * kwq/KWQApplication.mm: Removed the implementations.
779         * kwq/KWQPointArray.h: Removed manhattanLength; unused.
780         * kwq/KWQPoint.mm:  Removed the implementation.
781
782         * WebCore-tests.exp: Removed manhattanLength.
783         * WebCore-combined.exp: Regenerated.
784
785 2004-05-03  Ken Kocienda  <kocienda@apple.com>
786
787         Reviewed by Hyatt
788
789         Nifty hack to work around problem where BR's inserted at the end of a block do not 
790         render. Since only the *last* BR has this quirk, insert two when at the end of a block.
791         Once done, you can't caret past the last one, so you never insert two again.
792
793         * khtml/editing/htmlediting_impl.cpp:
794         (InputNewlineCommandImpl::doApply)
795
796 2004-05-03  Darin Adler  <darin@apple.com>
797
798         Reviewed by Ken
799
800         - fixed <rdar://problem/3091531>: "should format copied tables with tabs between cells, spreadsheet-style, for pasting to Excel"
801         - fixed <rdar://problem/3110002>: "Find doesn't match across formatting boundaries"
802         - fixed <rdar://problem/3640340>: "REGRESSION (136-137): nil-deref in KHTMLPart::setFocusNodeIfNeeded inside triple click code after repeatedly click/drag selecting text"
803         - fixed <rdar://problem/3640422>: "too many blank lines between paragraphs in copied text"
804
805         * khtml/dom/dom2_range.h: Added == and != operators to DOMRange.
806         * khtml/dom/dom2_range.cpp: (DOM::operator==): Added.
807
808         * khtml/khtml_part.cpp:
809         (KHTMLPart::init): Don't call findTextBegin any more; it's now not used at all
810         in WebCore.
811         (KHTMLPart::clear): Don't call findTextBegin any more. Also don't set up the
812         load statistics variables.
813         (KHTMLPart::findTextNext): Roll out APPLE_CHANGES; this function is no longer
814         used in WebCore any more and instead the entire thing is compiled out.
815         (KHTMLPart::text): Reimplement this by calling one of the new text operations. All the interesting
816         parts were moved into the TextIterator class.
817         (KHTMLPart::setFocusNodeIfNeeded): Add a check for nil; this is the fix for 364030.
818
819         * khtml/khtmlpart_p.h: (KHTMLPartPrivate::KHTMLPartPrivate): Put m_findPos,
820         m_findNode, m_overURL, m_overURLTarget, m_scrollTimer, m_loadedObjects,
821         m_totalObjectCount, and m_jobPercent inside !APPLE_CHANGES.
822
823         * khtml/xml/dom_selection.h: Replaced uses of 4-character tabs with spaces.
824         (DOM::Selection::Selection): Added a constructor that takes a DOM range.
825         (DOM::Selection::operator=): Overloaded operator= for DOM range and position.
826         This is slightly more efficient than letting a second Selection object be constructed.
827         * khtml/xml/dom_selection.cpp: Replaced uses of 4-character tabs with spaces.
828         (DOM::Selection::Selection): Added a constructor that takes a DOM range.
829
830         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::findString): Reimplement find so it uses
831         the new text operations function for finding.
832
833         * khtml/misc/khtml_text_operations.h:
834         * khtml/misc/khtml_text_operations.cpp:
835         * WebCore.pbproj/project.pbxproj:
836         Added new text iterator classes that do the heavy lifting.
837
838 2004-05-03  David Hyatt  <hyatt@apple.com>
839
840         Make sure that XML processing instructions set themselves as the parent node of the stylesheets they load,
841         so that they will get stylesheetLoaded() notifications when @imported stylesheets are contained inside the
842         sheet.
843
844         Reviewed by cblu
845
846         * khtml/xml/dom_xmlimpl.cpp:
847         (ProcessingInstructionImpl::setStyleSheet):
848
849 2004-04-30  Chris Blumenberg  <cblu@apple.com>
850
851         Fixed: <rdar://problem/3543662>: HITLIST-137: REGRESSION: reproducible hang copying all text at Dave's blog, and other pages
852
853         Reviewed by dave.
854
855         * khtml/xml/dom2_rangeimpl.cpp:
856         (RangeImpl::toHTMLWithOptions): when looping with containingBlock, check the value to see if it is the same
857
858 2004-04-30  David Hyatt  <hyatt@apple.com>
859
860         Fix for 3639530, regression on generated content pages.  They crash because I forgot to null-check the style
861         object.
862         
863         Reviewed by kocienda
864
865         * khtml/css/cssstyleselector.cpp:
866         (khtml::CSSStyleSelector::checkOneSelector):
867
868 2004-04-30  John Sullivan  <sullivan@apple.com>
869
870         - added bridge method to get the NSFont used to render a node, to
871         help with supporting the font panel
872
873         Reviewed by Ken.
874
875         * kwq/WebCoreBridge.h:
876         * kwq/WebCoreBridge.mm:
877         (-[WebCoreBridge renderedFontForNode:]):
878         return nil if no renderer, otherwise return NSFont
879
880 2004-04-29  David Hyatt  <hyatt@apple.com>
881
882         Expose summary on tables.
883         
884         Reviewed by darin
885
886         * kwq/KWQAccObject.mm:
887         (-[KWQAccObject helpText]):
888
889 2004-04-29  David Hyatt  <hyatt@apple.com>
890
891         Implement image maps for accessibility.
892         
893         Reviewed by darin
894
895         * khtml/html/html_imageimpl.cpp:
896         (HTMLAreaElementImpl::getRect):
897         * khtml/html/html_imageimpl.h:
898         * khtml/rendering/render_image.cpp:
899         (RenderImage::imageMap):
900         (RenderImage::nodeAtPoint):
901         * khtml/rendering/render_image.h:
902         * kwq/KWQAccObject.h:
903         * kwq/KWQAccObject.mm:
904         (-[KWQAccObject initWithRenderer:]):
905         (-[KWQAccObject anchorElement]):
906         (-[KWQAccObject parentObject]):
907         (-[KWQAccObject parentObjectUnignored]):
908         (-[KWQAccObject addChildrenToArray:]):
909         (-[KWQAccObject role]):
910         (-[KWQAccObject helpText]):
911         (-[KWQAccObject value]):
912         (-[KWQAccObject title]):
913         (-[KWQAccObject position]):
914         (-[KWQAccObject size]):
915         (-[KWQAccObject accessibilityIsIgnored]):
916         (-[KWQAccObject accessibilityAttributeNames]):
917         (-[KWQAccObject accessibilityAttributeValue:]):
918         * kwq/KWQRegion.mm:
919         (QRegion::boundingRect):
920
921 2004-04-29  Chris Blumenberg  <cblu@apple.com>
922
923         Fixed:
924         <rdar://problem/3631431>: web archive of .Mac welcome page renders has gaps in layout
925         <rdar://problem/3631470>: news.google.com web archive has a different font than the live site
926
927         Reviewed by kocienda.
928
929         * khtml/html/html_documentimpl.cpp:
930         (HTMLDocumentImpl::determineParseMode): don't set a name on the doc type when there is no doc type in the source
931         * khtml/xml/dom_docimpl.cpp:
932         (DocumentTypeImpl::toString): don't return "<!DOCTYPE>" when there is no doc type in the source
933         * khtml/xml/dom_nodeimpl.cpp:
934         (NodeImpl::recursive_toHTMLWithOptions): don't escape STYLE text, don't include the end tags for document nodes just as we don't for start tags
935
936 2004-04-29  Darin Adler  <darin@apple.com>
937
938         Reviewed by Dave.
939
940         - some tweaks on image
941
942         * khtml/html/html_imageimpl.h: Remove unused noref bit and unneeded override of isURLAttribute.
943         * khtml/html/html_imageimpl.cpp:
944         (HTMLAreaElementImpl::HTMLAreaElementImpl): Remove unused noref bit.
945         (HTMLAreaElementImpl::parseHTMLAttribute): Remove parsing of noref; no need to store the
946         bit since it has no meaning.
947
948 2004-04-29  David Hyatt  <hyatt@apple.com>
949
950         1. Change the role of links from AXButton to AXLink.
951         2. Add support for list markers using a new role, AXListMarker.
952         
953         Reviewed by kocienda
954
955         * khtml/rendering/render_list.h:
956         (khtml::RenderListMarker::text):
957         * kwq/KWQAccObject.mm:
958         (-[KWQAccObject role]):
959         (-[KWQAccObject roleDescription]):
960         (-[KWQAccObject value]):
961         (-[KWQAccObject accessibilityIsIgnored]):
962
963 2004-04-29  Darin Adler  <darin@apple.com>
964
965         Reviewed by Ken.
966
967         - fixed <rdar://problem/3636566>: "space bar on a form button hits default button instead (autorestore.apple.com)"
968
969         * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::defaultEventHandler):
970         Remove special handling for space, falling back to default AppKit behavior. Change enter handling to
971         click the form element itself in the case of elements other than text input ones.
972
973 2004-04-29  Darin Adler  <darin@apple.com>
974
975         Reviewed by Ken.
976
977         - fixed <rdar://problem/3636673>: "unrepro nil-deref crash in KHTMLPart::frameDetached() (espn.com)"
978
979         * kwq/KWQKHTMLPart.mm: (KHTMLPart::frameDetached): Check for nil.
980
981 2004-04-28  Chris Blumenberg  <cblu@apple.com>
982
983         - Implemented DOMHTMLElementExtensions.
984         - Added stubs for the rest of the DOM API.
985
986         Reviewed by dave.
987
988         * WebCore.pbproj/project.pbxproj:
989         * khtml/dom/html_element.cpp:
990         (HTMLElement::setContentEditable): moved implementation from here to HTMLElementImpl
991         * khtml/html/html_elementimpl.cpp:
992         (HTMLElementImpl::setContentEditable): new, moved from HTMLElement
993         * khtml/html/html_elementimpl.h:
994         * kwq/DOM-CSS.mm:
995         (-[DOMObject sheet]):
996         (-[DOMDocument getComputedStyle::]):
997         * kwq/DOM.mm:
998         (-[DOMAbstractView document]):
999         (-[DOMDocumentView defaultView]):
1000         (-[DOMDocument createNodeIterator::::]):
1001         (-[DOMDocument createTreeWalker::::]):
1002         (-[DOMNodeFilter acceptNode:]):
1003         (-[DOMNodeIterator root]):
1004         (-[DOMNodeIterator whatToShow]):
1005         (-[DOMNodeIterator filter]):
1006         (-[DOMNodeIterator expandEntityReferences]):
1007         (-[DOMNodeIterator nextNode]):
1008         (-[DOMNodeIterator previousNode]):
1009         (-[DOMNodeIterator detach]):
1010         (-[DOMTreeWalker root]):
1011         (-[DOMTreeWalker whatToShow]):
1012         (-[DOMTreeWalker filter]):
1013         (-[DOMTreeWalker expandEntityReferences]):
1014         (-[DOMTreeWalker currentNode]):
1015         (-[DOMTreeWalker setCurrentNode:]):
1016         (-[DOMTreeWalker parentNode]):
1017         (-[DOMTreeWalker firstChild]):
1018         (-[DOMTreeWalker lastChild]):
1019         (-[DOMTreeWalker previousSibling]):
1020         (-[DOMTreeWalker nextSibling]):
1021         (-[DOMTreeWalker previousNode]):
1022         (-[DOMTreeWalker nextNode]):
1023         * kwq/DOMEvents.mm: Added.
1024         (-[DOMEvent type]):
1025         (-[DOMEvent target]):
1026         (-[DOMEvent currentTarget]):
1027         (-[DOMEvent eventPhase]):
1028         (-[DOMEvent bubbles]):
1029         (-[DOMEvent cancelable]):
1030         (-[DOMEvent timeStamp]):
1031         (-[DOMEvent stopPropagation]):
1032         (-[DOMEvent preventDefault]):
1033         (-[DOMEvent initEvent:::]):
1034         (-[DOMEventTarget addEventListener:::]):
1035         (-[DOMEventTarget removeEventListener:::]):
1036         (-[DOMEventTarget dispatchEvent:]):
1037         (-[DOMMouseEvent screenX]):
1038         (-[DOMMouseEvent screenY]):
1039         (-[DOMMouseEvent clientX]):
1040         (-[DOMMouseEvent clientY]):
1041         (-[DOMMouseEvent ctrlKey]):
1042         (-[DOMMouseEvent shiftKey]):
1043         (-[DOMMouseEvent altKey]):
1044         (-[DOMMouseEvent metaKey]):
1045         (-[DOMMouseEvent button]):
1046         (-[DOMMouseEvent relatedTarget]):
1047         (-[DOMMouseEvent initMouseEvent:::::::::::::::]):
1048         (-[DOMMutationEvent relatedNode]):
1049         (-[DOMMutationEvent prevValue]):
1050         (-[DOMMutationEvent newValue]):
1051         (-[DOMMutationEvent attrName]):
1052         (-[DOMMutationEvent attrChange]):
1053         (-[DOMMutationEvent initMutationEvent::::::::]):
1054         (-[DOMUIEvent view]):
1055         (-[DOMUIEvent detail]):
1056         (-[DOMUIEvent initUIEvent:::::]):
1057         (-[DOMDocument createEvent:]):
1058         * kwq/DOMHTML.mm:
1059         (-[DOMHTMLElement innerHTML]): implemented
1060         (-[DOMHTMLElement setInnerHTML:]): implemented
1061         (-[DOMHTMLElement innerText]): implemented
1062         (-[DOMHTMLElement setInnerText:]): implemented
1063         (-[DOMHTMLElement children]): implemented
1064         (-[DOMHTMLElement contentEditable]): implemented
1065         (-[DOMHTMLElement setContentEditable:]): implemented
1066         (-[DOMHTMLElement isContentEditable]): implemented
1067
1068 2004-04-27  David Hyatt  <hyatt@apple.com>
1069
1070         Implement sharing of similar style objects. Cuts the # of style objects allocated on the PLT by more
1071         than half.
1072         
1073         Reviewed by kocienda
1074
1075         * khtml/css/cssstyleselector.cpp:
1076         (khtml::CSSStyleSelector::initElementAndPseudoState):
1077         (khtml::CSSStyleSelector::initForStyleResolve):
1078         (khtml::cleanpath):
1079         (khtml::checkPseudoState):
1080         (khtml::CSSStyleSelector::locateSiblingList):
1081         (khtml::CSSStyleSelector::canShareStyleWithElement):
1082         (khtml::CSSStyleSelector::locateSharedStyle):
1083         (khtml::CSSStyleSelector::styleForElement):
1084         (khtml::CSSStyleSelector::pseudoStyleForElement):
1085         (khtml::CSSStyleSelector::checkOneSelector):
1086         * khtml/css/cssstyleselector.h:
1087         * khtml/css/html4.css:
1088         * khtml/css/parser.cpp:
1089         * khtml/css/parser.y:
1090         * khtml/html/html_baseimpl.cpp:
1091         (HTMLBodyElementImpl::mapToEntry):
1092         (HTMLIFrameElementImpl::mapToEntry):
1093         * khtml/html/html_baseimpl.h:
1094         * khtml/html/html_blockimpl.cpp:
1095         (HTMLDivElementImpl::mapToEntry):
1096         (HTMLHRElementImpl::mapToEntry):
1097         (HTMLParagraphElementImpl::mapToEntry):
1098         (HTMLMarqueeElementImpl::mapToEntry):
1099         * khtml/html/html_blockimpl.h:
1100         * khtml/html/html_elementimpl.cpp:
1101         (HTMLNamedAttrMapImpl::declCount):
1102         (HTMLNamedAttrMapImpl::mapsEquivalent):
1103         (HTMLElementImpl::attributeChanged):
1104         (HTMLElementImpl::mapToEntry):
1105         * khtml/html/html_elementimpl.h:
1106         (DOM::HTMLElementImpl::isMappedAttribute):
1107         * khtml/html/html_formimpl.cpp:
1108         (HTMLInputElementImpl::mapToEntry):
1109         * khtml/html/html_formimpl.h:
1110         * khtml/html/html_imageimpl.cpp:
1111         (HTMLImageElementImpl::mapToEntry):
1112         * khtml/html/html_imageimpl.h:
1113         * khtml/html/html_inlineimpl.cpp:
1114         (HTMLBRElementImpl::mapToEntry):
1115         (HTMLFontElementImpl::mapToEntry):
1116         * khtml/html/html_inlineimpl.h:
1117         * khtml/html/html_listimpl.cpp:
1118         (HTMLUListElementImpl::mapToEntry):
1119         (HTMLOListElementImpl::mapToEntry):
1120         (HTMLLIElementImpl::mapToEntry):
1121         * khtml/html/html_listimpl.h:
1122         * khtml/html/html_objectimpl.cpp:
1123         (HTMLAppletElementImpl::mapToEntry):
1124         (HTMLEmbedElementImpl::mapToEntry):
1125         (HTMLObjectElementImpl::mapToEntry):
1126         * khtml/html/html_objectimpl.h:
1127         * khtml/html/html_tableimpl.cpp:
1128         (HTMLTableElementImpl::mapToEntry):
1129         (HTMLTablePartElementImpl::mapToEntry):
1130         (HTMLTableCellElementImpl::mapToEntry):
1131         (HTMLTableColElementImpl::mapToEntry):
1132         (HTMLTableCaptionElementImpl::mapToEntry):
1133         * khtml/html/html_tableimpl.h:
1134         * khtml/rendering/render_object.cpp:
1135         (RenderObject::setStyle):
1136         * khtml/rendering/render_style.cpp:
1137         (m_affectedByAttributeSelectors):
1138         (RenderStyle::RenderStyle):
1139         * khtml/rendering/render_style.h:
1140         (khtml::):
1141         (khtml::RenderStyle::pseudoState):
1142         (khtml::RenderStyle::setPseudoState):
1143         (khtml::RenderStyle::affectedByAttributeSelectors):
1144         (khtml::RenderStyle::setAffectedByAttributeSelectors):
1145         * khtml/xml/dom_docimpl.cpp:
1146         (DocumentImpl::DocumentImpl):
1147         * khtml/xml/dom_docimpl.h:
1148         (DOM::DocumentImpl::usesSiblingRules):
1149         (DOM::DocumentImpl::setUsesSiblingRules):
1150
1151 2004-04-28  Darin Adler  <darin@apple.com>
1152
1153         Reviewed by Chris.
1154
1155         - another step of refinement on the reinterpret_cast stuff; now it's a compile-time
1156           error if you do it wrong
1157         - fixed a couple of storage leaks
1158
1159         * kwq/DOMInternal.h: Added new DOM_cast template function. Like reinterpret_cast, but a
1160         compile-time error if you use it with the wrong parameters. Also added type-safe versions
1161         of the wrapper functions that do the DOM_cast automatically.
1162         * kwq/DOMInternal.mm:
1163         (getDOMWrapperImpl): Changed name and parameter type as part of above change.
1164         (addDOMWrapperImpl): Ditto.
1165         (removeDOMWrapper): Ditto.
1166
1167         * kwq/DOM.mm: Use the new DOM_cast instead of reinterpret_cast, and the new
1168         DOM wrapper calls that do the cast automatically.
1169         * kwq/DOM-CSS.mm: More of the same.
1170         (-[DOMCSSStyleSheet dealloc]): Added override to deref, fixes leak.
1171         * kwq/DOMHTML.mm: More of the same.
1172         (-[DOMHTMLCollection dealloc]): Added override to deref, fixes leak.
1173         (-[DOMHTMLOptionsCollection dealloc]): Added override to deref, fixes theoretical leak.
1174
1175 2004-04-28  Darin Adler  <darin@apple.com>
1176
1177         Reviewed by Chris.
1178
1179         - fixed reinterpret_cast mistakes and some style issues in DOM implementation
1180
1181         * kwq/DOM-CSS.mm:
1182         (-[DOMCSSStyleRule _styleRuleImpl]): Fix broken reinterpret_cast; you must reinterpret_cast back
1183         to the class you reinterpret_casted from, not to a derived class.
1184         (-[DOMCSSMediaRule _mediaRuleImpl]): Ditto.
1185         (-[DOMCSSFontFaceRule _fontFaceRuleImpl]): Ditto.
1186         (-[DOMCSSPageRule _pageRuleImpl]): Ditto.
1187         (-[DOMCSSImportRule _importRuleImpl]): Ditto.
1188         (-[DOMCSSCharsetRule _importRuleImpl]): Ditto.
1189         * kwq/DOMHTML.mm:
1190         (-[DOMHTMLOptionsCollection length]): Put in an "unimplemented" version instead of leaving out
1191         the class implementation altogether.
1192         (-[DOMHTMLOptionsCollection setLength:]): Ditto.
1193         (-[DOMHTMLOptionsCollection item:]): Ditto.
1194         (-[DOMHTMLOptionsCollection namedItem:]): Ditto.
1195         (+[DOMHTMLElement _elementWithImpl:]): Corrected this implementation. The wrapper must use a
1196         standard node wrapper, since this is a subclass of DOMNode. Also moved into a separate category
1197         so it gets checked against the declarations above.
1198         (-[DOMHTMLElement _HTMLElementImpl]): Fix broken reinterpret_cast.
1199         (-[DOMHTMLHtmlElement _HTMLHtmlElementImpl]): Ditto.
1200         (-[DOMHTMLHeadElement _headElementImpl]): Ditto.
1201         (-[DOMHTMLLinkElement _linkElementImpl]): Ditto.
1202         (-[DOMHTMLTitleElement _titleElementImpl]): Ditto.
1203         (-[DOMHTMLMetaElement _metaElementImpl]): Ditto.
1204         (-[DOMHTMLBaseElement _baseElementImpl]): Ditto.
1205         (-[DOMHTMLStyleElement _styleElementImpl]): Ditto.
1206         (-[DOMHTMLBodyElement _bodyElementImpl]): Ditto.
1207         (-[DOMHTMLFormElement _formElementImpl]): Ditto.
1208         (+[DOMHTMLFormElement _formElementWithImpl:]): Another DOMNode subclass wrapper fix.
1209         (-[DOMHTMLIsIndexElement _isIndexElementImpl]): Fix broken reinterpret_cast.
1210         (-[DOMHTMLSelectElement _selectElementImpl]): Ditto.
1211         (-[DOMHTMLOptGroupElement _optGroupElementImpl]): Ditto.
1212         (-[DOMHTMLOptionElement _optionElementImpl]): Ditto.
1213         (-[DOMHTMLInputElement _inputElementImpl]): Ditto.
1214         (-[DOMHTMLTextAreaElement _textAreaElementImpl]): Ditto.
1215         (-[DOMHTMLButtonElement _buttonElementImpl]): Ditto.
1216         (-[DOMHTMLLabelElement _labelElementImpl]): Ditto.
1217         (-[DOMHTMLFieldSetElement _fieldSetElementImpl]): Ditto.
1218         (-[DOMHTMLLegendElement _legendElementImpl]): Ditto.
1219         (-[DOMHTMLUListElement _uListElementImpl]): Ditto.
1220         (-[DOMHTMLOListElement _oListElementImpl]): Ditto.
1221         (-[DOMHTMLDListElement _dListElementImpl]): Ditto.
1222         (-[DOMHTMLDirectoryElement _directoryListElementImpl]): Ditto.
1223         (-[DOMHTMLMenuElement _menuListElementImpl]): Ditto.
1224         (-[DOMHTMLLIElement _liElementImpl]): Ditto.
1225         (-[DOMHTMLQuoteElement _quoteElementImpl]): Ditto.
1226         (-[DOMHTMLDivElement _divElementImpl]): Ditto.
1227         (-[DOMHTMLParagraphElement _paragraphElementImpl]): Ditto.
1228         (-[DOMHTMLHeadingElement _headingElementImpl]): Ditto.
1229         (-[DOMHTMLPreElement _preElementImpl]): Ditto.
1230         (-[DOMHTMLBRElement _BRElementImpl]): Ditto.
1231         (-[DOMHTMLBaseFontElement _baseFontElementImpl]): Ditto.
1232         (-[DOMHTMLFontElement _fontElementImpl]): Ditto.
1233         (-[DOMHTMLHRElement _HRElementImpl]): Ditto.
1234         (-[DOMHTMLModElement _modElementImpl]): Ditto.
1235         (-[DOMHTMLAnchorElement _anchorElementImpl]): Ditto.
1236         (-[DOMHTMLImageElement _imageElementImpl]): Ditto.
1237         (-[DOMHTMLObjectElement _objectElementImpl]): Ditto.
1238         (-[DOMHTMLParamElement _paramElementImpl]): Ditto.
1239         (-[DOMHTMLAppletElement _appletElementImpl]): Ditto.
1240         (-[DOMHTMLMapElement _mapElementImpl]): Ditto.
1241         (-[DOMHTMLAreaElement _areaElementImpl]): Ditto.
1242         (-[DOMHTMLScriptElement _scriptElementImpl]): Ditto.
1243         (+[DOMHTMLTableCaptionElement _tableCaptionElementWithImpl:]): Another DOMNode subclass wrapper fix.
1244         (-[DOMHTMLTableCaptionElement _tableCaptionElementImpl]): Fix broken reinterpret_cast.
1245         (+[DOMHTMLTableSectionElement _tableSectionElementWithImpl:]): Another DOMNode subclass wrapper fix.
1246         (-[DOMHTMLTableSectionElement _tableSectionElementImpl]): Fix broken reinterpret_cast.
1247         (+[DOMHTMLTableElement _tableElementWithImpl:]): Another DOMNode subclass wrapper fix.
1248         (-[DOMHTMLTableElement _tableElementImpl]): Fix broken reinterpret_cast.
1249         (-[DOMHTMLTableColElement _tableColElementImpl]): Ditto.
1250         (-[DOMHTMLTableRowElement _tableRowElementImpl]): Ditto.
1251         (+[DOMHTMLTableCellElement _tableCellElementWithImpl:]): Another DOMNode subclass wrapper fix.
1252         (-[DOMHTMLTableCellElement _tableCellElementImpl]): Fix broken reinterpret_cast.
1253         (-[DOMHTMLFrameSetElement _frameSetElementImpl]): Ditto.
1254         (-[DOMHTMLFrameElement _frameElementImpl]): Ditto.
1255         (-[DOMHTMLIFrameElement _IFrameElementImpl]): Ditto.
1256         (-[DOMHTMLEmbedElement _embedElementImpl]): Ditto.
1257
1258         * kwq/HTMLDOM.mm: Removed.
1259
1260 2004-04-28  Ken Kocienda  <kocienda@apple.com>
1261
1262         Reviewed by Darin
1263
1264         * khtml/khtml_part.cpp:
1265         (KHTMLPart::notifySelectionChanged): Call new postDidChangeSelectionNotification function
1266         to send Cocoa notification when the selection changes.
1267         (KHTMLPart::appliedEditing): Call postDidChangeNotification to send Cocoa notification when the document changes
1268         due to editing.
1269         (KHTMLPart::unappliedEditing): Ditto.
1270         (KHTMLPart::reappliedEditing): Ditto.
1271         * kwq/DOMHTML.mm:
1272         (-[DOMHTMLDocument _HTMLDocumentImpl]): Fix cast to account for multiple inheritance used by the impl class.
1273         * kwq/KWQKHTMLPart.h:
1274         * kwq/KWQKHTMLPart.mm:
1275         (KWQKHTMLPart::postDidChangeSelectionNotification): New function. Call the bridge to post the notification.
1276         (KWQKHTMLPart::postDidChangeNotification): Ditto.
1277         * kwq/WebCoreBridge.h: Declare new -postDidChangeSelectionNotification and -postDidChangeNotification methods.
1278
1279 2004-04-28  Darin Adler  <darin@apple.com>
1280
1281         Reviewed by Ken.
1282
1283         - fixed <rdar://problem/3636261>: "nil-deref in selectedStylesheetSet iterating through properties in a non-view document"
1284
1285         * khtml/xml/dom_docimpl.cpp:
1286         (DocumentImpl::selectedStylesheetSet): Add nil check.
1287         (DocumentImpl::setSelectedStylesheetSet): Ditto.
1288
1289 2004-04-27  Richard Williamson   <rjw@apple.com>
1290
1291         <rdar://problem/3564519>: API: please add a way to set the media type for a WebView
1292
1293         Reviewed by Chris.
1294
1295         * khtml/khtmlview.cpp:
1296         (KHTMLView::mediaType):
1297         * kwq/KWQKHTMLPart.h:
1298         * kwq/KWQKHTMLPart.mm:
1299         (KWQKHTMLPart::overrideMediaType):
1300         * kwq/WebCoreBridge.h:
1301
1302 2004-04-27  Ken Kocienda  <kocienda@apple.com>
1303
1304         Reviewed by Hyatt
1305         
1306         Make selections draw in a more Cocoa-like way, where
1307         fully-selected lines draw out to the ends of lines, and
1308         spaces between lines are drawn with the selection color as well.
1309
1310         * WebCore-combined.exp: Add _WebCoreInitializeEmptyTextGeometry symbol
1311         * WebCore.exp: Ditto.
1312         * khtml/khtml_part.cpp:
1313         (KHTMLPart::isPointInsideSelection): Marginally-related change. Fix up this function
1314         so that it works right, given my recent changes to positionForCoordinates. This fix
1315         "really" fixes the problem. Unlike my attempt to fix yesterday.
1316         * khtml/rendering/font.cpp:
1317         (Font::drawHighlightForText): New drawHighlightForText interface which includes extra
1318         information to draw the selection.
1319         * khtml/rendering/font.h: Ditto.
1320         * khtml/rendering/render_block.cpp:
1321         (khtml::RenderBlock::positionForCoordinates): Some minor improvements and cleanups to
1322         make this code work correctly in more cases.
1323         * khtml/rendering/render_block.h: Remove spurious semi-colon after namespace block.
1324         * khtml/rendering/render_container.cpp:
1325         (RenderContainer::positionForCoordinates): Fix typo in comment. Also, clean up
1326         one unnecessary call to absolutePosition.
1327         * khtml/rendering/render_image.cpp:
1328         (RenderImage::paint): Many changes to add the new selection drawing behavior.
1329         * khtml/rendering/render_inline.cpp:
1330         (RenderInline::positionForCoordinates): Added to help make selections work right 
1331         with continuations.
1332         * khtml/rendering/render_inline.h: Ditto.
1333         * khtml/rendering/render_object.h: Give zero default argument to inlineBox() helper.
1334         * khtml/rendering/render_text.cpp:
1335         (InlineTextBox::paintSelection): Many changes to add the new selection drawing behavior.
1336         * kwq/KWQListBox.mm:
1337         (-[KWQTableView drawRow:clipRect:]): Use new WebCoreTextGeometry struct.
1338         * kwq/KWQPainter.h: New drawHighlightForText interface which includes extra
1339         information to draw the selection.
1340         * kwq/KWQPainter.mm:
1341         (QPainter::drawText): Use new WebCoreInitializeEmptyTextGeometry struct.
1342         (QPainter::drawHighlightForText): Use new WebCoreTextGeometry struct.
1343         * kwq/WebCoreTextRenderer.h: Declare new WebCoreTextGeometry struct.
1344         * kwq/WebCoreTextRendererFactory.m:
1345         (WebCoreInitializeEmptyTextGeometry): Initializer for WebCoreTextGeometry struct.
1346
1347 2004-04-27  Richard Williamson   <rjw@apple.com>
1348
1349         Don't do unnecessary string comparisons when no composite operator is
1350         specified.  
1351
1352         Reviewed by Hyatt.
1353
1354         * kwq/KWQPainter.mm:
1355         (compositeOperatorFromString):
1356
1357 2004-04-27  Darin Adler  <darin@apple.com>
1358
1359         Reviewed by Ken.
1360
1361         - fixed <rdar://problem/3623694>: "top level <option> and <optgroup> labels look identical in pop-up menus; should not"
1362
1363         * khtml/rendering/render_form.cpp: (RenderSelect::updateFromElement):
1364         Call appendGroupLabel instead of appendItem for group labels.
1365
1366         * kwq/KWQComboBox.h: Added appendGroupLabel, private setControlSize, labelFont, setTitle, _labelFont,
1367         and make _items a QValueList<KWQListBoxItem> instead of QStringList.
1368         * kwq/KWQComboBox.mm:
1369         (QComboBox::QComboBox): Initializes _labelFont to nil.
1370         (QComboBox::~QComboBox): Release _labelFont.
1371         (QComboBox::setTitle): Added helper function. Uses an attributed string for group labels, and also sets
1372         the action to NULL so they are disabled.
1373         (QComboBox::appendItem): Added isLabel boolean parameter, make KWQListBoxItem, call setTitle.
1374         (QComboBox::sizeHint): Changed to handle group labels with a separate renderer to measure bolded text.
1375         (QComboBox::setCurrentItem): Changed to use setTitle helper.
1376         (QComboBox::setFont): Release _labelFont if control size changed.
1377         (QComboBox::labelFont): Compute label font lazily.
1378         (QComboBox::populateMenu): Changed to use setTitle helper.
1379
1380         * kwq/KWQListBox.h: Removed excess includes, fixed comment.
1381
1382 2004-04-26  Darin Adler  <darin@apple.com>
1383
1384         Reviewed by Maciej.
1385
1386         - follow-on to fix for <rdar://problem/3488892>: "anchor names with non-ASCII characters in them do not work"
1387         This part fixes anchor names with non-ASCII characters in local files.
1388
1389         * kwq/KWQKURL.mm: (KURL::KURL): For file and help URLs, force UTF-8 only for the path part of the URL.
1390         Use the document encoding for the rest of the URL.
1391         * kwq/KWQTextCodec.h: (operator!=): Added.
1392
1393 2004-04-26  David Hyatt  <hyatt@apple.com>
1394
1395         Fix for Emerson truncation problem using apple-line-clamp.  Always dirty positioned objects so that they
1396         will move when the height changes.
1397         
1398         Reviewed by darin
1399
1400         * khtml/rendering/render_block.cpp:
1401         (khtml::RenderBlock::markPositionedObjectsForLayout):
1402         * khtml/rendering/render_block.h:
1403         * khtml/rendering/render_flexbox.cpp:
1404         (khtml::RenderFlexibleBox::layoutVerticalBox):
1405
1406 2004-04-26  Richard Williamson   <rjw@apple.com>
1407
1408         Added support for specifying composite operation on an
1409         image element.  Attribute name is "composite", possible values
1410         are:
1411
1412         clear,
1413         copy
1414         source-over
1415         source-in
1416         source-out
1417         source-atop
1418         destination-over
1419         destination-in
1420         destination-out
1421         destination-atop
1422         xor
1423         darker
1424         highlight
1425         lighter
1426
1427         <img composite="source-over" src="triangle.png">
1428         <img style="position:relative; left:-200px;" composite="destination-in" src="circle.png">
1429
1430         Reviewed by Ken.
1431
1432         * khtml/html/html_imageimpl.cpp:
1433         (HTMLImageElementImpl::parseHTMLAttribute):
1434         * khtml/html/html_imageimpl.h:
1435         (DOM::HTMLImageElementImpl::compositeOperator):
1436         * khtml/misc/htmlattrs.c:
1437         (findAttr):
1438         * khtml/misc/htmlattrs.h:
1439         * khtml/misc/htmlattrs.in:
1440         * khtml/rendering/render_image.cpp:
1441         (RenderImage::paint):
1442         * kwq/KWQPainter.h:
1443         * kwq/KWQPainter.mm:
1444         (compositeOperatorFromString):
1445         (QPainter::drawPixmap):
1446         * kwq/WebCoreImageRenderer.h:
1447
1448 2004-04-26  Darin Adler  <darin@apple.com>
1449
1450         - fixed <rdar://problem/3634145>: "REGRESSION: nil-deref in QTextCodec::toUnicode every time loading page at wiki.wordpress.org"
1451
1452         * kwq/KWQKURL.mm:
1453         (KURL::KURL): Simplify check for nil that defaults to UTF-8.
1454         (KURL::decode_string): Add a similar test here.
1455
1456 2004-04-26  David Hyatt  <hyatt@apple.com>
1457
1458         Implement the quirk that makes the <body> and <html> size to fill the viewport in quirks mode.  This
1459         matches WinIE.
1460         
1461         Reviewed by john
1462
1463         * khtml/rendering/render_box.cpp:
1464         (RenderBox::calcHeight):
1465
1466 2004-04-26  Ken Kocienda  <kocienda@apple.com>
1467
1468         Reviewed by John
1469         
1470         Fix for this bug:
1471         
1472         <rdar://problem/3633458>: "REGRESSION (125-137): Can't drag a selection unless it starts at beginning of line"
1473
1474         * khtml/khtml_part.cpp:
1475         (KHTMLPart::isPointInsideSelection): I flubbed when I converted this
1476         code to use my new positionForCoordinates helper. I failed to add in
1477         the passed in values for x and y to the absolute coordinates for the
1478         clicked node. So, the "unless it starts at beginning of line" behavior 
1479         is exactly as one would expect.
1480
1481 2004-04-25  David Hyatt  <hyatt@apple.com>
1482
1483         Eliminate overhangingContents.  This concept was redundant with the overflowHeight mechanism that I
1484         implemented some time ago, and in fact, it causes us to grovel through much more of the render tree
1485         than we should when painting.  It turns out that none of the places that used this boolean needed
1486         to any longer, and so the entire implementation can now be removed from the tree.
1487         
1488         Reviewed by mjs, darin
1489
1490         * khtml/rendering/render_block.cpp:
1491         (khtml::RenderBlock::addChildToFlow):
1492         (khtml::RenderBlock::layoutBlock):
1493         (khtml::RenderBlock::paint):
1494         (khtml::RenderBlock::insertPositionedObject):
1495         * khtml/rendering/render_box.cpp:
1496         (RenderBox::calcHeight):
1497         * khtml/rendering/render_image.cpp:
1498         (RenderImage::setStyle):
1499         * khtml/rendering/render_inline.cpp:
1500         (RenderInline::addChildToFlow):
1501         * khtml/rendering/render_object.cpp:
1502         (RenderObject::RenderObject):
1503         (RenderObject::containingBlock):
1504         (RenderObject::information):
1505         (RenderObject::dump):
1506         (RenderObject::nodeAtPoint):
1507         * khtml/rendering/render_object.h:
1508         (khtml::RenderObject::minMaxKnown):
1509         * khtml/rendering/render_table.cpp:
1510         (RenderTable::layout):
1511         (RenderTable::paint):
1512         (RenderTableCell::paint):
1513
1514 2004-04-23  David Hyatt  <hyatt@apple.com>
1515
1516         Fix for 3258403, implement support for min-height and max-height on normal flow elements.  With this patch the
1517         only min-height/max-height work that remains to be done is for table cells and positioned elements.
1518         
1519         Reviewed by darin
1520
1521         * khtml/rendering/render_box.cpp:
1522         (RenderBox::calcHeight):
1523         (RenderBox::calcHeightUsing):
1524         (RenderBox::calcPercentageHeight):
1525         * khtml/rendering/render_box.h:
1526         * layout-tests/fast/block/basic/minheight-expected.txt: Added.
1527         * layout-tests/fast/block/basic/minheight.html: Added.
1528
1529 2004-04-25  Darin Adler  <darin@apple.com>
1530
1531         Reviewed by Dave.
1532
1533         - fixed <rdar://problem/3633091>: "add overrideMimeType function to XMLHttpRequest"
1534
1535         * khtml/ecma/xmlhttprequest.cpp:
1536         (KJS::XMLHttpRequest::getValueProperty): Add logic to override MIME type if
1537         OverrideMIMEType was called.
1538         (KJS::XMLHttpRequestProtoFunc::tryCall): Store the MIME type when overrideMimeType is called.
1539         * khtml/ecma/xmlhttprequest.h: Add OverrideMIMEType to the XMLHttpRequest property enum,
1540         and also add a MIMETypeOverride data member to the class.
1541         * khtml/ecma/xmlhttprequest.lut.h: Regenerated.
1542
1543 2004-04-25  Maciej Stachowiak  <mjs@apple.com>
1544
1545         Reviewed by Darin.
1546
1547         <rdar://problem/3628309>: Fedex tracking page so slow it seems like a hang (site change?)
1548         <rdar://problem/3608061>: "ATI Developer site so slow it seems like a hang"
1549         <rdar://problem/3612130>: "Reproducible hang in JavaScript at www.tfl.gov.uk"
1550         <rdar://problem/3626022>: "Safari was consuming > 100% CPU on dual-G5 Mac, sample shows JavaScript"
1551         <rdar://problem/3632348>: "www.whatis.com search for "pivot table" leads to JavaScript hang"
1552         
1553         * khtml/ecma/kjs_html.cpp:
1554         (KJS::HTMLElement::getValueProperty): The "text" property for anchors should be
1555         innerText, not innerHTML.
1556         * khtml/html/html_elementimpl.cpp:
1557         (HTMLElementImpl::innerText): Make sure not to include all the text after an
1558         element if it has no children.
1559         * layout-tests/fast/dom/anchor-text-expected.txt: Added.
1560         * layout-tests/fast/dom/anchor-text.html: Added.
1561         * layout-tests/fast/dom/inner-text-expected.txt: Added.
1562         * layout-tests/fast/dom/inner-text.html: Added.
1563
1564 2004-04-24  Darin Adler  <darin@apple.com>
1565
1566         Reviewed by Dave.
1567
1568         - fixed <rdar://problem/3488892>: "anchor names with non-ASCII characters in them do not work"
1569
1570         * khtml/khtml_part.h: Add new gotoAnchor helper function, private.
1571         * khtml/khtml_part.cpp:
1572         (KHTMLPart::openURL): Call new gotoAnchor helper, since the code is now complex enough
1573         that I don't want to copy and paste.
1574         (KHTMLPart::gotoAnchor): Use the pages own encoding when decoding the string for an
1575         anchor reference when going to an anchor. This matches the behavior of other browsers.
1576         (KHTMLPart::slotFinishedParsing): Call new gotoAnchor helper.
1577         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::scrollToAnchor): Call new gotoAnchor helper.
1578
1579         * kwq/KWQKURL.h: Removed htmlRef function, and made encodedHtmlRef an inline.
1580         Removed unused encoding hint parameter from setQuery (it's not a "hint" at all, but we
1581         don't use it). Added a codec parameter to decode_string.
1582         * kwq/KWQKURL.mm:
1583         (hexDigitValue): Added. Helper function.
1584         (KURL::setQuery): Removed unused parameter.
1585         (KURL::decode_string): Implemented this function. It needs to use an encoding specified
1586         by the web page. Also, we wanted to make a version that did not use the
1587         CFURLCreateStringByReplacingPercentEscapes function anyway.
1588
1589         * kwq/KWQString.h: Added parameters to copyLatin1. Now you can copy an arbitrary substring.
1590         * kwq/KWQString.mm: (QString::copyLatin1): Updated implementation to handle the two
1591         new parameters.
1592
1593         * WebCore-tests.exp: Updated for change in signature of setQuery and decode_string.
1594         * WebCore-combined.exp: Regenerated.
1595
1596 2004-04-24  Darin Adler  <darin@apple.com>
1597
1598         - fixed <rdar://problem/3570953>: "Update "Acknowledgements" to remove expat and possibly include libxml"
1599
1600         * WebCore.pbproj/project.pbxproj: Removed the part of the copyright notice that was for expat contributors.
1601
1602 2004-04-23  David Hyatt  <hyatt@apple.com>
1603
1604         Fix the apple-line-clamp values to more closely match what is needed, an even split of the max lines between the possible
1605         values.
1606
1607         * khtml/rendering/render_flexbox.cpp:
1608         (khtml::RenderFlexibleBox::layoutVerticalBox):
1609
1610 2004-04-23  David Hyatt  <hyatt@apple.com>
1611
1612         Fix to make the containing block percentage height calculation actually work according to the CSS2 spec.
1613         Percentages other than 100% are now supported, and flexing percentage height blocks inside table cells
1614         are now supported.
1615
1616         Reviewed by kocienda
1617
1618         * khtml/rendering/render_box.cpp:
1619         (RenderBox::calcHeight):
1620         (RenderBox::calcPercentageHeight):
1621         * khtml/rendering/render_box.h:
1622
1623 2004-04-23  Ken Kocienda  <kocienda@apple.com>
1624
1625         Reviewed by John
1626
1627         Fix for this bug:
1628         <rdar://problem/3632163>: "REGRESSSION: crash on css home page"
1629
1630         * khtml/rendering/render_block.cpp:
1631         (khtml::RenderBlock::positionForRenderer): Add null check.
1632
1633 2004-04-20  David Hyatt  <hyatt@apple.com>
1634
1635         Fix hiermenu opacity bug.  Make sure to save/restore the graphics state before pushing and popping
1636         transparency layers, so that alterations to alpha don't accidentally persist.
1637         
1638         Reviewed by kocienda
1639
1640         * kwq/KWQPainter.mm:
1641         (QPainter::beginTransparencyLayer):
1642         (QPainter::endTransparencyLayer):
1643
1644 2004-04-20  David Hyatt  <hyatt@apple.com>
1645
1646         Fix for 3622818, bad rendering on sabernomics.com.  Just eliminate the priority difference between
1647         4 and 5, and make all of the priority 4 tags the same.  This seems to match other browsers.
1648         
1649         Reviewed by kocienda
1650
1651         * khtml/html/dtd.cpp:
1652
1653 2004-04-23  Ken Kocienda  <kocienda@apple.com>
1654
1655         Reviewed by Darin
1656
1657         Changed inlineBoxForRenderer(RenderObject *, int) helper that was static 
1658         in dom_position.cpp into a virtual method on RenderObjects. Function is
1659         now called inlineBox(int). Functionality unchanged.
1660
1661         * khtml/rendering/render_br.cpp:
1662         (RenderBR::inlineBox)
1663         * khtml/rendering/render_br.h:
1664         * khtml/rendering/render_object.cpp:
1665         (RenderObject::caretMaxRenderedOffset)
1666         (RenderObject::inlineBox)
1667         * khtml/rendering/render_object.h:
1668         * khtml/rendering/render_text.cpp:
1669         (RenderText::inlineBox)
1670         * khtml/rendering/render_text.h:
1671         * khtml/xml/dom_position.cpp:
1672         (DOM::renderersOnDifferentLine):
1673         (DOM::nextRenderedEditable)
1674         (DOM::previousRenderedEditable)
1675         (DOM::Position::previousLinePosition)
1676         (DOM::Position::nextLinePosition)
1677         (DOM::Position::rendersInDifferentPosition)
1678
1679 2004-04-23  Ken Kocienda  <kocienda@apple.com>
1680
1681         Reviewed by Darin
1682
1683         * khtml/editing/htmlediting_impl.cpp:
1684         (DeleteSelectionCommandImpl::doApply): Fix editing test
1685         regression with deleting whitespace at the end of the line.
1686         I just made this "improvement" yesterday, and the concept
1687         of the change is a good one, but instead of short-circuiting
1688         if the selection after deleting collapsible whitespace is a
1689         range (which can be confused by "significant" collapsed 
1690         whitespace at the end of a line), short-circuit if the 
1691         upstream start position equals the downstream end position.
1692
1693 === Safari-138 ===
1694
1695 2004-04-23  Ken Kocienda  <kocienda@apple.com>
1696
1697         Reviewed by John
1698
1699         Added some plumbing for applying styles.
1700
1701         * khtml/xml/dom_docimpl.cpp:
1702         (DocumentImpl::createCSSStyleDeclaration): New factory method.
1703         * khtml/xml/dom_docimpl.h: Declare the above.
1704         * kwq/DOM-CSS.mm:
1705         (-[DOMCSSStyleDeclaration _styleDeclarationImpl]): Expose this in the
1706         WebCoreInternal category, "promoting" it from being private to the 
1707         DOM-CSS.mm file.
1708         * kwq/DOM.mm: Add -(DOMCSSStyleDeclaration *)createCSSStyleDeclaration extension.
1709         * kwq/DOMExtensions.h: Delcare the above.
1710         * kwq/DOMInternal.h: Add _styleDeclarationImpl to WebCoreInternal category.
1711
1712 2004-04-23  John Sullivan  <sullivan@apple.com>
1713
1714         - fixed <rdar://problem/3631541>: "repro crash in KHTMLPart::setFocusNodeIfNeeded"
1715
1716         Reviewed by Maciej.
1717
1718         * khtml/khtml_part.cpp:
1719         (KHTMLPart::setFocusNodeIfNeeded):
1720         added nil check
1721
1722 2004-04-23  Maciej Stachowiak  <mjs@apple.com>
1723
1724         Back out one of the previous changes, it causes a crash. Whoops!
1725         
1726         * kwq/KWQScrollView.mm:
1727         (QScrollView::addChild):
1728
1729 2004-04-23  Maciej Stachowiak  <mjs@apple.com>
1730
1731         Reviewed by Dave.
1732
1733         These two tiny changes (made w/ Dave's help) should get us about
1734         1% or so combined on the HTML iBench.
1735
1736         * khtml/rendering/render_br.cpp:
1737         (RenderBR::setStyle): Don't call superclass setStyle, since
1738         according to Dave we don't need any of the work done in there.
1739         * kwq/KWQScrollView.mm:
1740         (QScrollView::addChild): Don't actually move the widget if the x
1741         coordinate is -500000, since we don't need the initial offscreen
1742         positioning that KHTML does and it is costly to do.
1743
1744 2004-04-22  Ken Kocienda  <kocienda@apple.com>
1745
1746         Reviewed by Hyatt
1747
1748         * khtml/editing/htmlediting_impl.cpp:
1749         (DeleteSelectionCommandImpl::doApply): Short-circuit return if the selection
1750         is not a range after collapsing whitespace.
1751
1752 2004-04-22  Ken Kocienda  <kocienda@apple.com>
1753
1754         Reviewed by Hyatt
1755
1756         More work to bring code up to date with the latest API proposal.
1757
1758         * khtml/xml/dom_selection.h: Fix typo in comment.
1759         * kwq/WebCoreBridge.h: -applyStyle:toElementsInDOMRange: is now applyStyle:
1760         * kwq/WebCoreBridge.mm:
1761         (-[WebCoreBridge applyStyle:]): Ditto.
1762
1763 2004-04-22  Ken Kocienda  <kocienda@apple.com>
1764
1765         Reviewed by John
1766
1767         Adds the notion of selection affinity to the editing API, bringing it up to
1768         date with the latest proposal.
1769
1770         * khtml/xml/dom_selection.cpp:
1771         (DOM::Selection::Selection): Adds support for selection affinity member variable.
1772         (DOM::Selection::init): Ditto.
1773         (DOM::Selection::operator=): Ditto.
1774         (DOM::Selection::setAffinity): New function.
1775         (DOM::Selection::layoutCaret): Added comment to indicate that we need to enhance this
1776         function to handle selection affinity.
1777         * khtml/xml/dom_selection.h: Added EAffinity enum and m_affinity member variable.
1778         (DOM::Selection::): Moved the enums above the constructors. No code change.
1779         (DOM::Selection::affinity): New accessor.
1780         * kwq/WebCoreBridge.h:
1781         * kwq/WebCoreBridge.mm: Add selection affinity to API declarations as needed.
1782         (-[WebCoreBridge setSelectedDOMRange:affinity:]): Ditto.
1783         (-[WebCoreBridge selectedDOMRange]): Ditto.
1784         (-[WebCoreBridge selectionAffinity]): Ditto.
1785
1786 2004-04-21  Maciej Stachowiak  <mjs@apple.com>
1787
1788         Reviewed by Darin.
1789
1790         Preliminary change for conservative GC. Use new "protected"
1791         subclasses to GC-protect objects when on heap, since we will soon
1792         remove the built-in refcounting of the normal wrapper classes.
1793         
1794         * ForwardingHeaders/kjs/protect.h: Added.
1795         * khtml/ecma/kjs_binding.h:
1796         * khtml/ecma/kjs_events.h:
1797         * khtml/ecma/kjs_traversal.h:
1798         * khtml/ecma/kjs_window.h:
1799
1800 2004-04-22  Darin Adler  <darin@apple.com>
1801
1802         * khtml/ecma/kjs_window.cpp: (Window::get): Removed code that gets properties from the parent.
1803         This was a mistake we inherited from KHTML, and they have long since fixed it.
1804
1805 2004-04-22  Ken Kocienda  <kocienda@apple.com>
1806
1807         Reviewed by Hyatt
1808
1809         Ensures caret visibility after making an editing action.
1810
1811         * khtml/xml/dom_selection.cpp:
1812         (DOM::Selection::getRepaintRect): Expose this as public.
1813         * khtml/xml/dom_selection.h: Ditto.
1814         * kwq/WebCoreBridge.h: Add ensureCaretVisible method.
1815         * kwq/WebCoreBridge.mm:
1816         (-[WebCoreBridge replaceSelectionWithMarkupString:baseURLString:]):
1817         Unrelated crash fix. Null-check baseURLString.
1818         (-[WebCoreBridge ensureCaretVisible]): Added.
1819
1820 2004-04-21  David Hyatt  <hyatt@apple.com>
1821
1822         Fix for 3245627, nested tables don't expand vertically.  I actually fixed the basic problem in the
1823         previous checkin, but this exposed another basic math error where |numVariable| was not being
1824         decremented properly.  This meant space was mis-allocated when multiple variable height rows both needed
1825         to expand.
1826
1827         * khtml/rendering/render_table.cpp:
1828         (RenderTableSection::layoutRows):
1829
1830 2004-04-21  David Hyatt  <hyatt@apple.com>
1831
1832         Fix for 3020449, ensure that the paint order of cells with rowspans matches other browsers.
1833         
1834         Reviewed by darin
1835
1836         * khtml/rendering/render_table.cpp:
1837         (RenderTableSection::paint):
1838
1839 2004-04-21  David Hyatt  <hyatt@apple.com>
1840
1841         Remove the (incorrect) restriction on table flexing that required the cell to have a fixed width.  In
1842         reality, the style on the cell is completely irrelevant.
1843         
1844         Reviewed by kocienda
1845
1846         * khtml/rendering/render_table.cpp:
1847         (RenderTable::layout):
1848
1849 2004-04-21  David Hyatt  <hyatt@apple.com>
1850
1851         Make sure cells that get flexed vertically in tables don't check text children when looking for 
1852         percentage height children.
1853         
1854         Reviewed by kocienda
1855
1856         * khtml/rendering/render_table.cpp:
1857         (RenderTableSection::layoutRows):
1858
1859 2004-04-21  David Hyatt  <hyatt@apple.com>
1860
1861         Fix for hiermenus bug.  Absolutely positioned images should not contribute to their containing block's
1862         max width.  Make sure to disregard positioned elements when computing min/max width.
1863         
1864         Reviewed by kocienda
1865
1866         * khtml/rendering/render_block.cpp:
1867         (khtml::InlineMinMaxIterator::next):
1868
1869 2004-04-21  Ken Kocienda  <kocienda@apple.com>
1870
1871         Reviewed by Hyatt
1872
1873         * khtml/editing/htmlediting_impl.cpp:
1874         (DeleteSelectionCommandImpl::doApply): Do not shift ending selection downstream
1875         when at position zero of a BR. That's just wrong. Simplify code that does
1876         "onlyWhitespace" delete. No need to handle multiple characters here; we can
1877         only ever have one thanks to the delete-collapsible-whitespace code.
1878         (TypingCommandImpl::issueCommandForDeleteKey): Don't do anything if at the
1879         start of a root editable block. This is a no-op....not an opportunity to crash.
1880         * khtml/rendering/render_block.cpp:
1881         (khtml::RenderBlock::positionForRenderer): Return this renderer's element position
1882         if the passed-in renderer is nil. This helps to make clicking in empty blocks work.
1883         * khtml/rendering/render_container.cpp:
1884         (RenderContainer::positionForCoordinates): Fixed typo in comment.
1885         * khtml/xml/dom_position.cpp:
1886         (DOM::Position::equivalentLeafPosition): Do not attempt to find a leaf if the
1887         position's node does not have a renderer, if the renderer has no kids.
1888         * layout-tests/editing/deleting/delete-br-001-expected.txt: Update expected results for BR fix.
1889         * layout-tests/editing/deleting/delete-br-003-expected.txt: Ditto.
1890         * layout-tests/editing/deleting/delete-br-006-expected.txt: Ditto.
1891         * layout-tests/editing/deleting/delete-br-007.html: Added. New BR test.
1892         * layout-tests/editing/deleting/delete-br-007-expected.txt: Added.
1893
1894 2004-04-21  Ken Kocienda  <kocienda@apple.com>
1895
1896         Reviewed by Hyatt
1897
1898         * khtml/css/css_computedstyle.cpp:
1899         (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Added implementations for
1900         these properties: CSS_PROP_TEXT_DECORATION, CSS_PROP_VERTICAL_ALIGN, CSS_PROP_TEXT_INDENT,
1901         CSS_PROP_LETTER_SPACING, CSS_PROP_WORD_SPACING, CSS_PROP_LINE_HEIGHT
1902
1903 2004-04-21  Ken Kocienda  <kocienda@apple.com>
1904
1905         Reviewed by John
1906
1907         The Selection class now uses the Position class throughout its public and
1908         private interface. This replaces the inconsistent use of the Position
1909         class here and node/offset pairs there. There are no functional changes, only
1910         updates to the new Selection class API.
1911
1912         * khtml/ecma/kjs_window.cpp:
1913         (Selection::get):
1914         (SelectionFunc::tryCall):
1915         * khtml/editing/htmlediting_impl.cpp:
1916         (DeleteCollapsibleWhitespaceCommandImpl::doApply):
1917         (DeleteSelectionCommandImpl::joinTextNodesWithSameStyle):
1918         (DeleteSelectionCommandImpl::doApply):
1919         (InputNewlineCommandImpl::doApply):
1920         (InputTextCommandImpl::deleteCharacter):
1921         (InputTextCommandImpl::prepareForTextInsertion):
1922         (InputTextCommandImpl::execute):
1923         (PasteMarkupCommandImpl::doApply):
1924         (TypingCommandImpl::issueCommandForDeleteKey):
1925         * khtml/khtml_part.cpp:
1926         (KHTMLPart::findTextNext):
1927         (KHTMLPart::setFocusNodeIfNeeded):
1928         (KHTMLPart::notifySelectionChanged):
1929         (KHTMLPart::isPointInsideSelection):
1930         (KHTMLPart::handleMouseMoveEventSelection):
1931         (KHTMLPart::khtmlMouseReleaseEvent):
1932         (KHTMLPart::selectAll):
1933         * khtml/rendering/render_block.cpp:
1934         (khtml::RenderBlock::paintObject):
1935         * khtml/xml/dom_docimpl.cpp:
1936         (DocumentImpl::updateSelection):
1937         * khtml/xml/dom_nodeimpl.cpp:
1938         * khtml/xml/dom_selection.cpp:
1939         (DOM::emptyPosition):
1940         (DOM::Selection::Selection):
1941         (DOM::Selection::init):
1942         (DOM::Selection::operator=):
1943         (DOM::Selection::moveTo):
1944         (DOM::Selection::modify):
1945         (DOM::Selection::xPosForVerticalArrowNavigation):
1946         (DOM::Selection::clear):
1947         (DOM::Selection::setBase):
1948         (DOM::Selection::setExtent):
1949         (DOM::Selection::setBaseAndExtent):
1950         (DOM::Selection::setStart):
1951         (DOM::Selection::setEnd):
1952         (DOM::Selection::setStartAndEnd):
1953         (DOM::Selection::toRange):
1954         (DOM::Selection::layoutCaret):
1955         (DOM::Selection::needsCaretRepaint):
1956         (DOM::Selection::paintCaret):
1957         (DOM::Selection::validate):
1958         (DOM::Selection::moveToRenderedContent):
1959         (DOM::Selection::nodeIsBeforeNode):
1960         (DOM::startAndEndLineNodesIncludingNode):
1961         (DOM::Selection::debugRenderer):
1962         (DOM::Selection::debugPosition):
1963         * khtml/xml/dom_selection.h:
1964         (DOM::Selection::~Selection):
1965         (DOM::Selection::base):
1966         (DOM::Selection::extent):
1967         (DOM::Selection::start):
1968         (DOM::Selection::end):
1969         (DOM::Selection::assignBase):
1970         (DOM::Selection::assignExtent):
1971         (DOM::Selection::assignBaseAndExtent):
1972         (DOM::Selection::assignStart):
1973         (DOM::Selection::assignEnd):
1974         (DOM::Selection::assignStartAndEnd):
1975         (DOM::operator==):
1976         * kwq/KWQKHTMLPart.mm:
1977         (KWQKHTMLPart::jumpToSelection):
1978         (KWQKHTMLPart::selectionStartOffset):
1979         (KWQKHTMLPart::selectionEndOffset):
1980         (KWQKHTMLPart::selectionStart):
1981         (KWQKHTMLPart::selectionEnd):
1982         * kwq/KWQRenderTreeDebug.cpp:
1983         (writeSelection):
1984         * kwq/WebCoreBridge.mm:
1985         (-[WebCoreBridge isSelectionEditable]):
1986         (-[WebCoreBridge setSelectionFrom:startOffset:to:endOffset:]):
1987         (-[WebCoreBridge setSelectedDOMRange:]):
1988
1989 2004-04-20  Ken Kocienda  <kocienda@apple.com>
1990
1991         Reviewed by Hyatt
1992         
1993         Renamed DOMPosition class to Position.
1994         Renamed KHTMLSelection to Selection and moved to DOM namespace.
1995
1996         * ForwardingHeaders/xml/dom_selection.h: Added.
1997         * WebCore.pbproj/project.pbxproj: Go Xcode!
1998         * khtml/khtml_selection.cpp: Removed.
1999         * khtml/khtml_selection.h: Removed.
2000         * khtml/xml/dom_position.cpp: Renamed DOMPosition to Position
2001         * khtml/xml/dom_position.h: Ditto.
2002         * khtml/xml/dom_selection.cpp: New home for renamed Selection object.
2003         * khtml/xml/dom_selection.h: Ditto.
2004
2005 2004-04-20  Ken Kocienda  <kocienda@apple.com>
2006
2007         Reviewed by Hyatt
2008
2009         * WebCore.pbproj/project.pbxproj:
2010         * khtml/khtml_part.cpp:
2011         (KHTMLPart::handleMousePressEventDoubleClick): Improved name of expandToElement. Now is expandUsingGranularity.
2012         (KHTMLPart::handleMousePressEventTripleClick): Ditto.
2013         (KHTMLPart::handleMouseMoveEventSelection): Ditto.
2014         * khtml/khtml_selection.cpp:
2015         (KHTMLSelection::modify): Added support for modifying and extending selection right and left by word.
2016         Also added support for extending selection up and down.
2017         (KHTMLSelection::expandUsingGranularity): New name for expandToElement.
2018         (KHTMLSelection::xPosForVerticalArrowNavigation): Made this function handle cases where we know we
2019         want to use a particular position for calculating the right x position. We need this to handle
2020         extending selection up and down, and for setting the caret to the right place when moving up
2021         and down when a range is already selected.
2022         (KHTMLSelection::validate): Name tweak. expandTo variable now granularity.
2023         * khtml/khtml_selection.h: Make declaration changes for changes to cpp file.
2024         * khtml/misc/helper.cpp:
2025         (khtml::findWordBoundary): Added this hook for KDE to do their version of KWQFindWordBoundary
2026         * khtml/misc/helper.h:
2027         * khtml/rendering/render_block.cpp:
2028         (khtml::RenderBlock::positionForCoordinates): Factor out closest box finder code to its own function
2029         * khtml/rendering/render_line.cpp:
2030         (InlineFlowBox::closestChildForXPos): New function. This is the factored code that was taken out of 
2031         render_block.cpp.
2032         (InlineBox::closestLeafChildForXPos): Ditto.
2033         * khtml/rendering/render_line.h: Ditto.
2034         * khtml/rendering/render_replaced.cpp:
2035         (RenderReplaced::positionForCoordinates): I think I am starting to get how the coordinate transforms work.
2036         Made some fixups based on this greater sense of enlightenment.
2037         * khtml/rendering/render_text.cpp:
2038         (RenderText::positionForCoordinates): Ditto. Fix lastTextBox/firstTextBox code mistake.
2039         * khtml/xml/dom_position.cpp:
2040         (DOMPosition::previousWordPosition): Added.
2041         (DOMPosition::nextWordPosition): Added.
2042         (DOMPosition::previousLinePosition): No longer use nodeAtPoint. Use new closestLeafChildForXPos instead.
2043         (DOMPosition::nextLinePosition): Ditto.
2044         (DOMPosition::inLastEditableInContainingEditableBlock):
2045         * khtml/xml/dom_position.h:
2046         * kwq/KWQTextUtilities.cpp: Added.
2047         (KWQFindWordBoundary): Factored out code that was in a static function in khtml_selection.cpp so 
2048         that DOMPosition can use it too.
2049         * kwq/KWQTextUtilities.h: Added.
2050
2051 2004-04-19  Ken Kocienda  <kocienda@apple.com>
2052
2053         Reviewed by Hyatt
2054
2055         * khtml/khtml_part.cpp:
2056         (KHTMLPart::notifySelectionChanged): Clear the value
2057         used for maintaining x position when doing vertical arrow
2058         navigation. WebCoreBridge restores this value when needed. 
2059         (KHTMLPart::setXPosForVerticalArrowNavigation): New accessor.
2060         (KHTMLPart::xPosForVerticalArrowNavigation): New accessor.
2061         * khtml/khtml_part.h:
2062         (KHTMLPart::): Add NoXPosForVerticalArrowNavigation constant.
2063         * khtml/khtml_selection.cpp:
2064         (KHTMLSelection::modify): Add cases for UP and DOWN navigation
2065         (KHTMLSelection::xPosForVerticalArrowNavigation): New helper.
2066         * khtml/khtml_selection.h: Add UP and DOWN constants to EDirection enum.
2067         (KHTMLSelection::):
2068         * khtml/khtmlpart_p.h: Declare storage for m_xPosForVerticalArrowNavigation, 
2069         the value used for maintaining x position when doing vertical arrow
2070         navigation. 
2071         * khtml/rendering/render_block.cpp:
2072         (khtml::RenderBlock::positionForCoordinates): Improved this function to
2073         handle deficiencies exposed when trying to implement new behavior.
2074         * khtml/rendering/render_br.cpp:
2075         (RenderBR::positionForCoordinates): Added implementation of this virtual function.
2076         * khtml/rendering/render_br.h: Declare implementation for positionForCoordinates virtual function.
2077         * khtml/rendering/render_replaced.cpp:
2078         (RenderReplaced::positionForCoordinates): Improved this function to
2079         handle deficiencies exposed when trying to implement new behavior.
2080         * khtml/rendering/render_text.cpp:
2081         (InlineTextBox::offsetForPosition): Remove left/right "bounds" check here.
2082         (RenderText::positionForCoordinates): Improved this function to
2083         handle deficiencies exposed when trying to implement new behavior.
2084         * khtml/xml/dom_position.cpp:
2085         (inlineBoxForRenderer): Moved to top of file so all code in the file can see this static function.
2086         (renderersOnDifferentLine): Ditto.
2087         (nextRenderedEditable): Ditto.
2088         (previousRenderedEditable): Ditto.
2089         (DOMPosition::previousLinePosition): New function. Implements the guts of up/down navigation.
2090         (DOMPosition::nextLinePosition): Ditto.
2091         * khtml/xml/dom_position.h: Added declarations for nextLinePosition and previousLinePosition.
2092         * kwq/WebCoreBridge.h: Add WebSelectUp and WebSelectDown constants.
2093         * kwq/WebCoreBridge.mm:
2094         (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): Handles saving and restoring the 
2095         x position used for doing vertical arrow navigation.
2096
2097 2004-04-16  Ken Kocienda  <kocienda@apple.com>
2098
2099         Reviewed by Hyatt
2100
2101         * khtml/css/css_computedstyle.cpp:
2102         (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Added implementations for
2103         these four properties: CSS_PROP_WHITE_SPACE, CSS_PROP_DISPLAY, CSS_PROP_FLOAT, and CSS_PROP_COLOR.
2104
2105 2004-04-16  Chris Blumenberg  <cblu@apple.com>
2106
2107         Subresources weren't being archived for LINK tags.
2108
2109         Reviewed by kocienda.
2110
2111         * khtml/xml/dom_nodeimpl.cpp:
2112         (NodeImpl::recursive_toHTMLWithOptions): indent tweak
2113         * kwq/DOMHTML.mm:
2114         (-[DOMHTMLLinkElement _linkElementImpl]): C+casting voodoo to make methods like rel and href work correctly
2115
2116 2004-04-16  Ken Kocienda  <kocienda@apple.com>
2117
2118         Reviewed by Hyatt
2119
2120         * khtml/html/html_elementimpl.cpp:
2121         (HTMLElementImpl::isContentEditable): Call getDocument()->updateRendering() to make sure 
2122         outstanding changes for this attribute are applied.
2123         (HTMLElementImpl::contentEditable): Call getDocument()->updateRendering() to make sure 
2124         outstanding changes for this attribute are applied.
2125         (HTMLElementImpl::setContentEditable): Call enabled.isEmpty() before strcasecmp(enabled, "true").
2126         It's cheaper.
2127
2128 2004-04-16  Ken Kocienda  <kocienda@apple.com>
2129
2130         Reviewed by Hyatt
2131
2132         * khtml/editing/htmlediting_impl.cpp: New helper.
2133         (DeleteSelectionCommandImpl::containsOnlyWhitespace): Fix deleting collapsed whitespace 
2134         at the end of a line where text has flowed to the next line and the caret is at the 
2135         beginning of the next line. 
2136         (DeleteSelectionCommandImpl::doApply): Updated for new helper.
2137         * khtml/editing/htmlediting_impl.h:
2138         * layout-tests/editing/deleting/delete-line-end-ws-001-expected.txt: Added.
2139         * layout-tests/editing/deleting/delete-line-end-ws-001.html: Added.
2140         * layout-tests/editing/deleting/delete-line-end-ws-002-expected.txt: Added.
2141         * layout-tests/editing/deleting/delete-line-end-ws-002.html: Added.
2142
2143 === Safari-137 ===
2144
2145 2004-04-16  Richard Williamson   <rjw@apple.com>
2146
2147         Added an SPI to allow ObjC instances to be easily bound to 
2148         JS.  This is needed by the dashboard guys for their prototyping.
2149         Eventually they will use new API.
2150
2151         Reviewed by Chris.
2152
2153         * kwq/KWQKHTMLPart.h:
2154         * kwq/KWQKHTMLPart.mm:
2155         (KWQKHTMLPart::bindObject):
2156         * kwq/WebCoreBridge.h:
2157         * kwq/WebCoreBridge.mm:
2158         (-[WebCoreBridge bindObject:withName:]):
2159
2160 2004-04-16  Chris Blumenberg  <cblu@apple.com>
2161
2162         Added DOMHTMLEmbedElement as a DOM extension since EMBED is represented in our DOM even though its not part of the spec.
2163         Added all DOMCore and DOMHTML symbols to WebCore's symbols file.
2164         Removed isSubresourceURLAttribute from dom node. This was only used for the WebArchive feature and all that work is now done in WebKit.
2165
2166         Reviewed by kocienda.
2167
2168         * WebCore-combined.exp:
2169         * WebCore.exp:
2170         * khtml/html/html_baseimpl.cpp:
2171         (HTMLBodyElementImpl::isURLAttribute): renamed from isSubresourceURLAttribute. As a convenience to subclasses, dom_elementimpl would call isSubresourceURLAttribute in isURLAttribute, but this is no longer done
2172         (HTMLFrameElementImpl::isURLAttribute): ditto
2173         (HTMLIFrameElementImpl::isURLAttribute): ditto
2174         * khtml/html/html_baseimpl.h:
2175         * khtml/html/html_formimpl.cpp:
2176         (HTMLInputElementImpl::isURLAttribute): ditto
2177         * khtml/html/html_formimpl.h:
2178         * khtml/html/html_headimpl.cpp:
2179         (HTMLScriptElementImpl::isURLAttribute): ditto
2180         * khtml/html/html_headimpl.h:
2181         * khtml/html/html_imageimpl.cpp: 
2182         (HTMLImageElementImpl::isURLAttribute): ditto
2183         * khtml/html/html_imageimpl.h:
2184         * khtml/html/html_objectimpl.cpp:
2185         (HTMLEmbedElementImpl::isURLAttribute): ditto
2186         (HTMLObjectElementImpl::isURLAttribute): ditto
2187         (HTMLParamElementImpl::isURLAttribute): ditto
2188         * khtml/html/html_objectimpl.h:
2189         * khtml/html/html_tableimpl.cpp:
2190         (HTMLTableElementImpl::isURLAttribute): ditto
2191         (HTMLTableCellElementImpl::isURLAttribute): ditto
2192         * khtml/html/html_tableimpl.h:
2193         * khtml/xml/dom2_rangeimpl.cpp:
2194         (RangeImpl::toHTMLWithOptions): take a node list (see below)
2195         * khtml/xml/dom2_rangeimpl.h:
2196         * khtml/xml/dom_elementimpl.cpp:
2197         (ElementImpl::isURLAttribute):
2198         * khtml/xml/dom_elementimpl.h:
2199         * khtml/xml/dom_nodeimpl.cpp:
2200         (NodeImpl::recursive_toHTMLWithOptions): append copied nodes to a list of nodes so that WebKit can operate on them
2201         * khtml/xml/dom_nodeimpl.h:
2202         * kwq/DOM.mm:
2203         (+[DOMNode _nodeWithImpl:]): added support for HTML types
2204         * kwq/DOMExtensions.h:
2205         * kwq/DOMHTML.mm:
2206         (-[DOMHTMLPreElement setWidth:]):
2207         (-[DOMHTMLEmbedElement _embedElementImpl]):
2208         (-[DOMHTMLEmbedElement align]):
2209         (-[DOMHTMLEmbedElement setAlign:]):
2210         (-[DOMHTMLEmbedElement height]):
2211         (-[DOMHTMLEmbedElement setHeight:]):
2212         (-[DOMHTMLEmbedElement name]):
2213         (-[DOMHTMLEmbedElement setName:]):
2214         (-[DOMHTMLEmbedElement src]):
2215         (-[DOMHTMLEmbedElement setSrc:]):
2216         (-[DOMHTMLEmbedElement type]):
2217         (-[DOMHTMLEmbedElement setType:]):
2218         (-[DOMHTMLEmbedElement width]):
2219         (-[DOMHTMLEmbedElement setWidth:]):
2220         (-[DOMHTMLTableElement background]):
2221         (-[DOMHTMLTableElement setBackground:]):
2222         (-[DOMHTMLTableCellElement background]): new extension 
2223         (-[DOMHTMLTableCellElement setBackground:]): ditto
2224         * kwq/WebCoreBridge.h:
2225         * kwq/WebCoreBridge.mm:
2226         (-[WebCoreBridge nodesFromList:]): new
2227         (-[WebCoreBridge markupStringFromNode:nodes:]): return a list of nodes instead of subresource URLs so WebKit can operate on the nodes
2228         (-[WebCoreBridge markupStringFromRange:nodes:]): ditto
2229
2230 2004-04-15  David Hyatt  <hyatt@apple.com>
2231
2232         Fix for 3624335, bugs with overflow and positioned objects.  The scrollbar didn't properly update
2233         as you changed the sizes of positioned objects inside an overflow block.
2234         
2235         Reviewed by rjw
2236
2237         * khtml/rendering/render_block.cpp:
2238         (khtml::RenderBlock::layoutBlock):
2239         * khtml/rendering/render_flexbox.cpp:
2240         (khtml::RenderFlexibleBox::layoutBlock):
2241         * khtml/rendering/render_layer.cpp:
2242         (RenderLayer::updateScrollInfoAfterLayout):
2243
2244 2004-04-15  Ken Kocienda  <kocienda@apple.com>
2245
2246         Reviewed by Dave
2247         
2248         Improved selection behavior. As part of this work, I removed
2249         almost all of the checkSelectionPoint() functions, leaving
2250         only those associated with fonts, and all of the 
2251         checkSelectionPointIgnoringContinuations() functions. Each
2252         of these has been replaced by a new function called
2253         positionForCoordinates(), which returns a DOMPosition.
2254         
2255         * WebCore.pbproj/project.pbxproj:
2256         * khtml/khtml_events.cpp:
2257         (khtml::MouseEvent::offset): Converted to use positionForCoordinates.
2258         * khtml/khtml_part.cpp: Ditto.
2259         (KHTMLPart::isPointInsideSelection):
2260         (KHTMLPart::handleMousePressEventDoubleClick): Ditto.
2261         (KHTMLPart::handleMousePressEventTripleClick): Ditto.
2262         (KHTMLPart::handleMousePressEventSingleClick): Ditto.
2263         (KHTMLPart::handleMouseMoveEventSelection): Ditto.
2264         (KHTMLPart::khtmlMouseReleaseEvent): Ditto.
2265         * khtml/khtml_part.h:
2266         * khtml/rendering/render_block.cpp:
2267         (khtml::RenderBlock::positionForBox): New helper.
2268         (khtml::RenderBlock::positionForRenderer): New helper.
2269         (khtml::RenderBlock::positionForCoordinates): New selection-node-offset-finder method.
2270         * khtml/rendering/render_block.h:
2271         * khtml/rendering/render_br.cpp: Removed checkSelectionPointIgnoringContinuations.
2272         No special behavior is needed for this class anymore.
2273         * khtml/rendering/render_br.h: Ditoo.
2274         * khtml/rendering/render_container.cpp:
2275         (RenderContainer::positionForCoordinates): New selection-node-offset-finder method.
2276         * khtml/rendering/render_container.h:
2277         * khtml/rendering/render_line.cpp:
2278         (InlineBox::firstLeafChild): New helper.
2279         (InlineBox::lastLeafChild): New helper.
2280         (InlineFlowBox::firstLeafChild): New helper.
2281         (InlineFlowBox::lastLeafChild): New helper.
2282         * khtml/rendering/render_line.h:
2283         * khtml/rendering/render_object.cpp:
2284         (RenderObject::firstLeafChild): New helper.
2285         (RenderObject::lastLeafChild): New helper.
2286         (RenderObject::positionForCoordinates):
2287         * khtml/rendering/render_object.h:
2288         * khtml/rendering/render_replaced.cpp:
2289         (RenderReplaced::positionForCoordinates): New selection-node-offset-finder method.
2290         * khtml/rendering/render_replaced.h:
2291         * khtml/rendering/render_text.cpp:
2292         (InlineTextBox::offsetForPosition): New helper, replaces checkSelectionPoint()
2293         (RenderText::positionForCoordinates): New selection-node-offset-finder method.
2294         * khtml/rendering/render_text.h:
2295         * khtml/xml/dom_nodeimpl.cpp: Added positionForCoordinates() convenience here. This
2296         checks to see if the node has a renderer before doing the position check.
2297         * khtml/xml/dom_nodeimpl.h: Ditto.
2298         * kwq/DOM.mm:
2299         (-[DOMNode isContentEditable]): Added this unrelated method, since without it, I crash when dragging an image.
2300         * kwq/WebCoreBridge.mm:
2301         (-[WebCoreBridge moveCaretToPoint:]): Converted to use positionForCoordinates.
2302
2303 2004-04-15  David Hyatt  <hyatt@apple.com>
2304
2305         Fix for 3603455, block truncation support.
2306         
2307         Reviewed by kocienda
2308
2309         * khtml/css/cssparser.cpp:
2310         (CSSParser::parseValue):
2311         * khtml/css/cssproperties.c:
2312         (hash_prop):
2313         (findProp):
2314         * khtml/css/cssproperties.h:
2315         * khtml/css/cssproperties.in:
2316         * khtml/css/cssstyleselector.cpp:
2317         (khtml::CSSStyleSelector::applyProperty):
2318         * khtml/ecma/kjs_css.cpp:
2319         (cssPropertyName):
2320         * khtml/rendering/render_block.cpp:
2321         (khtml::RenderBlock::lineCount):
2322         (khtml::RenderBlock::heightForLineCount):
2323         * khtml/rendering/render_block.h:
2324         * khtml/rendering/render_flexbox.cpp:
2325         (khtml::RenderFlexibleBox::layoutHorizontalBox):
2326         (khtml::RenderFlexibleBox::layoutVerticalBox):
2327         * khtml/rendering/render_style.cpp:
2328         (marquee):
2329         (StyleCSS3NonInheritedData::operator==):
2330         (RenderStyle::diff):
2331         * khtml/rendering/render_style.h:
2332         (khtml::RenderStyle::lineClamp):
2333         (khtml::RenderStyle::setLineClamp):
2334         (khtml::RenderStyle::initialLineClamp):
2335
2336 2004-04-13  Chris Blumenberg  <cblu@apple.com>
2337
2338         - Removed WebCoreElementIsEditableKey. This functionality is available via [DOMNode isContentEditable].
2339
2340         Reviewed by rjw.
2341
2342         * WebCore-combined.exp:
2343         * WebCore.exp:
2344         * kwq/WebCoreBridge.h:
2345         * kwq/WebCoreBridge.mm:
2346         (-[WebCoreBridge elementAtPoint:]): removed use of WebCoreElementIsEditableKey
2347         (-[WebCoreBridge URLWithRelativeString:]): new method for WebKit API
2348
2349 2004-04-13  David Hyatt  <hyatt@apple.com>
2350
2351         Fix for 3559764, make sure overflow is applied consistently using a separate bit on render objects, so that
2352         the body scroll quirk can easily disable overflow even when it is present on the style.
2353         
2354         Reviewed by kocienda
2355
2356         * khtml/ecma/kjs_dom.cpp:
2357         (DOMNode::putValue):
2358         * khtml/rendering/bidi.cpp:
2359         (khtml::RenderBlock::layoutInlineChildren):
2360         * khtml/rendering/render_block.cpp:
2361         (khtml::RenderBlock::setStyle):
2362         (khtml::RenderBlock::layoutBlock):
2363         (khtml::RenderBlock::layoutBlockChildren):
2364         (khtml::RenderBlock::paintObject):
2365         (khtml::RenderBlock::rightOffset):
2366         (khtml::RenderBlock::lowestPosition):
2367         (khtml::RenderBlock::rightmostPosition):
2368         (khtml::RenderBlock::leftmostPosition):
2369         (khtml::RenderBlock::isPointInScrollbar):
2370         (khtml::RenderBlock::nodeAtPoint):
2371         (khtml::RenderBlock::inRootBlockContext):
2372         * khtml/rendering/render_block.h:
2373         (khtml::RenderBlock::overflowHeight):
2374         (khtml::RenderBlock::overflowWidth):
2375         * khtml/rendering/render_box.cpp:
2376         (RenderBox::setStyle):
2377         (RenderBox::contentWidth):
2378         (RenderBox::contentHeight):
2379         (RenderBox::absolutePosition):
2380         (RenderBox::computeAbsoluteRepaintRect):
2381         (RenderBox::calcAbsoluteVertical):
2382         * khtml/rendering/render_flexbox.cpp:
2383         (khtml::RenderFlexibleBox::layoutBlock):
2384         * khtml/rendering/render_flow.cpp:
2385         (RenderFlow::lowestPosition):
2386         (RenderFlow::rightmostPosition):
2387         (RenderFlow::leftmostPosition):
2388         * khtml/rendering/render_layer.cpp:
2389         (RenderLayer::updateLayerPosition):
2390         (RenderLayer::updateScrollInfoAfterLayout):
2391         (RenderLayer::intersectsDamageRect):
2392         (RenderLayer::containsPoint):
2393         * khtml/rendering/render_object.cpp:
2394         (RenderObject::RenderObject):
2395         (RenderObject::requiresLayer):
2396         (RenderObject::clientWidth):
2397         (RenderObject::clientHeight):
2398         (RenderObject::scrollWidth):
2399         (RenderObject::scrollHeight):
2400         (RenderObject::setStyle):
2401         (RenderObject::absolutePosition):
2402         (RenderObject::nodeAtPoint):
2403         (RenderObject::avoidsFloats):
2404         * khtml/rendering/render_object.h:
2405         (khtml::RenderObject::hasOverflowClip):
2406         (khtml::RenderObject::hasAutoScrollbars):
2407         (khtml::RenderObject::scrollsOverflow):
2408         (khtml::RenderObject::includeScrollbarSize):
2409         (khtml::RenderObject::setHasOverflowClip):
2410         * khtml/rendering/render_style.h:
2411         (khtml::RenderStyle::overflow):
2412         (khtml::RenderStyle::isDisplayReplacedType):
2413         (khtml::RenderStyle::isDisplayInlineType):
2414         * khtml/rendering/render_table.cpp:
2415         (RenderTable::setStyle):
2416         (RenderTableCell::setStyle):
2417         (RenderTableCell::requiresLayer):
2418         * khtml/rendering/render_table.h:
2419
2420 2004-04-12  David Hyatt  <hyatt@apple.com>
2421
2422         Fix for 3556036, make sure that when the position changes via style that all render layer
2423         descendants simply immediately repaint.
2424         
2425         Reviewed by kocienda
2426         
2427         * khtml/rendering/render_layer.cpp:
2428         (RenderLayer::repaintIncludingDescendants):
2429         * khtml/rendering/render_layer.h:
2430         * khtml/rendering/render_object.cpp:
2431         (RenderObject::setStyle):
2432
2433 2004-04-12  Chris Blumenberg  <cblu@apple.com>
2434
2435         - Fixed build failure by removing references to WebArchive in WebCore.
2436         - For HTML copy/paste, relative URLs are now made absolute at paste time instead of at copy time. This allows relative URLs to be kept relative if the destination page has the same base URL as the source page.
2437
2438         Reviewed by kocienda.
2439
2440         * khtml/editing/htmlediting.cpp:
2441         (PasteMarkupCommand::PasteMarkupCommand): take the base URL of the clipping
2442         * khtml/editing/htmlediting.h:
2443         * khtml/editing/htmlediting_impl.cpp:
2444         (PasteMarkupCommandImpl::PasteMarkupCommandImpl): take the base URL of the clipping
2445         (PasteMarkupCommandImpl::doApply): if we have a base URL and it is different than the base URL of the document, fix the URLs in the new DOM tree
2446         * khtml/editing/htmlediting_impl.h:
2447         * khtml/xml/dom2_rangeimpl.cpp:
2448         (RangeImpl::toHTMLWithOptions): removed completeURLs param
2449         * khtml/xml/dom2_rangeimpl.h:
2450         * khtml/xml/dom_nodeimpl.cpp:
2451         (NodeImpl::recursive_toHTMLWithOptions): removed completeURLs param
2452         (NodeImpl::recursive_toHTML): ditto
2453         (NodeImpl::recursive_completeURLs): new
2454         * khtml/xml/dom_nodeimpl.h:
2455         * kwq/WebCoreBridge.h:
2456         * kwq/WebCoreBridge.mm:
2457         (-[WebCoreBridge markupStringFromNode:subresourceURLStrings:]): call recursive_toHTML with less params
2458         (-[WebCoreBridge markupStringFromRange:subresourceURLStrings:]): ditto
2459         (-[WebCoreBridge replaceSelectionWithMarkupString:baseURLString:]): take a base URL
2460
2461 2004-04-12  Ken Kocienda  <kocienda@apple.com>
2462
2463         Reviewed by Dave
2464
2465         Added execCommand support for cut/copy/paste.
2466         
2467         * khtml/xml/dom_docimpl.cpp:
2468         (DocumentImpl::execCommand): Added cut/copy/paste atoms and added else if cases
2469         for the commands.
2470         * kwq/KWQKHTMLPart.h:
2471         * kwq/KWQKHTMLPart.mm:
2472         (KWQKHTMLPart::issueCutCommand): Glue for calling from WebCore to do a cut in Cocoa.
2473         (KWQKHTMLPart::issueCopyCommand): Same as above, but for copy.
2474         (KWQKHTMLPart::issuePasteCommand): Same as above, but for paste.
2475         * kwq/WebCoreBridge.h: Declared issueCutCommand, issueCopyCommand, and issuePasteCommand
2476         to be implemented on the WebKit side of the bridge.
2477         * layout-tests/editing/editing.js: Added cut/copy/paste support to js library to support
2478         making layout tests.
2479         * layout-tests/editing/pasteboard/copy-paste-text-001-expected.txt: Added.
2480         * layout-tests/editing/pasteboard/copy-paste-text-001.html: Added.
2481         * layout-tests/editing/pasteboard/cut-paste-text-002-expected.txt: Added.
2482         * layout-tests/editing/pasteboard/cut-paste-text-002.html: Added.
2483         * layout-tests/editing/pasteboard/cut-text-001-expected.txt: Added.
2484         * layout-tests/editing/pasteboard/cut-text-001.html: Added.
2485
2486 2004-04-12  Ken Kocienda  <kocienda@apple.com>
2487
2488         Reviewed by John
2489         
2490         Some delete and insert cleanups.
2491
2492         * khtml/editing/htmlediting_impl.cpp:
2493         (DeleteSelectionCommandImpl::doApply): For ending position case 1,
2494         the caret should be placed before the first child of the containing block, 
2495         not before the containing block itself. Also, add some code to handle
2496         converting nbsp's back to regular spaces. This will need to be improved
2497         some day to convert only nbsp's added by the editor to make rendering come out right.
2498         (InputTextCommandImpl::execute): 
2499         (TypingCommandImpl::issueCommandForDeleteKey): Make deleting collapsible whitespace part 
2500         of the work of deleting a selection, rather than something that needs to be done by a 
2501         user of DeleteSelectionCommandImpl. This makes it impossible to leave out
2502         this essential step.
2503         (TypingCommandImpl::deleteKeyPressed): We can't use a possible optimization here until 
2504         the code to do deletions properly has been factored better. Big FIXME added.
2505         * layout-tests/editing/deleting/delete-block-contents-001-expected.txt: Updated for
2506         ending position case 1 behavior change.
2507         * layout-tests/editing/deleting/delete-block-contents-002-expected.txt: Ditto. 
2508         * layout-tests/editing/deleting/delete-block-contents-003-expected.txt: Ditto.
2509
2510 2004-04-09  Ken Kocienda  <kocienda@apple.com>
2511
2512         Reviewed by Darin
2513
2514         Added support for methods added to flesh out the WebKit 
2515         editing API.
2516
2517         * khtml/khtml_part.h: Removed pasteMarkupString and deleteSelection functions.
2518         All this work is now done in WebCoreBridge.
2519         * kwq/WebCoreBridge.h:
2520         * kwq/WebCoreBridge.mm:
2521         (-[WebCoreBridge isSelectionEditable]): Added a FIXME.
2522         (-[WebCoreBridge setDrawsBackground:]): Moved this since CVS merged this in the
2523         middle of editing code.
2524         (-[WebCoreBridge replaceSelectionWithNode:]): New method.
2525         (-[WebCoreBridge replaceSelectionWithText:]): Replaces insertText:
2526         (-[WebCoreBridge replaceSelectionWithMarkupString:]): New method.
2527         (-[WebCoreBridge replaceSelectionWithWebArchive:]): New method.
2528         (-[WebCoreBridge replaceSelectionWithNewline]): Replaces insertNewline:
2529         (-[WebCoreBridge deleteSelection]): New method.
2530         (-[WebCoreBridge applyStyle:toElementsInDOMRange:]): New method.
2531
2532 2004-04-09  Darin Adler  <darin@apple.com>
2533
2534         Reviewed by Ken.
2535
2536         - added "transparent mode"
2537
2538         * khtml/khtmlview.h: Added isTransparent and setTransparent functions.
2539         * khtml/khtmlview.cpp:
2540         (KHTMLViewPrivate::KHTMLViewPrivate): Initialize isTransparent to false.
2541         (KHTMLView::isTransparent): Return isTransparent.
2542         (KHTMLView::setTransparent): Set isTransparent.
2543
2544         * khtml/rendering/render_box.cpp:
2545         (RenderBox::paintRootBoxDecorations): Use slow repaints for the top frame when the view
2546         is transparent; also don't draw a background. This is the same thing we do for subframes.
2547         (RenderBox::paintBackgroundExtended): Don't do the extra draw so we can blend with the
2548         background color for the top frame when the view is transparent.
2549         * khtml/rendering/render_canvas.cpp: (RenderCanvas::paintBoxDecorations): More of the same.
2550
2551         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::paint): Make "fill with red" debug mode work only
2552         when the view is not transparent.
2553
2554         * kwq/WebCoreBridge.h: Added setDrawsBackground: method.
2555         * kwq/WebCoreBridge.mm: (-[WebCoreBridge setDrawsBackground:]): If told NO
2556         (don't draw background), then set isTransparent to true on the KHTMLView.
2557
2558 2004-04-09  Ken Kocienda  <kocienda@apple.com>
2559
2560         Reviewed by me
2561         
2562         Added one more layout test for editing.
2563
2564         * layout-tests/editing/deleting/delete-3608445-fix-expected.txt: Added.
2565         * layout-tests/editing/deleting/delete-3608445-fix.html: Added.
2566
2567 2004-04-08  Maciej Stachowiak  <mjs@apple.com>
2568
2569         Reviewed by John.
2570
2571         Changed things so that newly created objects get a prototype based
2572         on the scope chain of the current function, rather than the
2573         interpreter that started execution. This fixes the following bugs:
2574         
2575         <rdar://problem/3368523>: ARCH: wrong prototype used to create new objects (hang on lookup.atomica.com)
2576         <rdar://problem/3559173>: ARCH: Cannot scan using a HP Jetdirect product (JS object prototypes bind incorrectly)
2577
2578         * khtml/ecma/kjs_binding.h:
2579         (KJS::cacheDOMObject):
2580         (KJS::cacheGlobalObject):
2581         * khtml/ecma/kjs_css.cpp:
2582         (KJS::getDOMStyleSheet):
2583         (KJS::getDOMStyleSheetList):
2584         (KJS::getDOMCSSValue):
2585         * khtml/ecma/kjs_dom.cpp:
2586         (KJS::getDOMDocumentNode):
2587         (KJS::getDOMNode):
2588         * khtml/ecma/kjs_events.cpp:
2589         (KJS::getDOMEvent):
2590         * khtml/ecma/kjs_html.cpp:
2591         (KJS::HTMLDocument::tryGet):
2592         (KJS::HTMLDocument::putValue):
2593         (KJS::getSelectHTMLCollection):
2594         * khtml/ecma/kjs_navigator.cpp:
2595         (Navigator::Navigator):
2596         (PluginBase::PluginBase):
2597         * khtml/ecma/kjs_window.cpp:
2598         (KJS::History::History):
2599         (KJS::FrameArray::FrameArray):
2600         (Screen::Screen):
2601         (Window::retrieveActive):
2602         (Window::put):
2603         (Window::isSafeScript):
2604         (WindowFunc::tryCall):
2605         (Location::put):
2606         (LocationFunc::tryCall):
2607
2608 2004-04-09  David Hyatt  <hyatt@apple.com>
2609
2610         Fix for 3613081, repaint glitches when using overflow:auto/overlay.
2611         
2612         Reviewed by john
2613
2614         * khtml/rendering/render_layer.cpp:
2615         (RenderLayer::updateScrollInfoAfterLayout):
2616
2617 2004-04-09  David Hyatt  <hyatt@apple.com>
2618
2619         Fix for 3608445, garbage characters rendered after doing delete.  Delta was unsigned when it was supposed to
2620         be signed, since deletion involves a negative delta.  Also had an off-by-one error in the line break end check.
2621         
2622         Reviewed by john
2623
2624         * khtml/rendering/render_text.cpp:
2625         (RenderText::setTextWithOffset):
2626
2627 2004-04-09  Ken Kocienda  <kocienda@apple.com>
2628
2629         Reviewed by me
2630         
2631         Added two more layout tests for editing.
2632
2633         * layout-tests/editing/selection/move-between-blocks-no-001-expected.txt: Added.
2634         * layout-tests/editing/selection/move-between-blocks-no-001.html: Added.
2635         * layout-tests/editing/selection/move-between-blocks-yes-001-expected.txt: Added.
2636         * layout-tests/editing/selection/move-between-blocks-yes-001.html: Added.
2637
2638 2004-04-09  Ken Kocienda  <kocienda@apple.com>
2639
2640         Reviewed by Dave
2641         
2642         Small collection of editing improvements.
2643
2644         * ChangeLog:
2645         * khtml/editing/htmlediting_impl.cpp:
2646         (shouldDeleteUpstreamPosition): This was deleting significant spaces on preceding
2647         lines when the caret was at the start of a line. Fixed. 
2648         (DeleteSelectionCommandImpl::doApply): Fixed a case where caret jumped to previous
2649         line when deleting a character at the start of a line after a BR.
2650         (InputNewlineCommandImpl::doApply): Handle more cases correctly. Previously, this
2651         only handled inserting a newline when the caret was already in a text node.
2652         (InputTextCommandImpl::prepareForTextInsertion): Ditto.
2653         (InputTextCommandImpl::execute): Ditto.
2654         * khtml/editing/htmlediting_impl.h:
2655         * khtml/rendering/render_block.cpp:
2656         (khtml::RenderBlock::checkSelectionPointIgnoringContinuations): Now can place caret
2657         with a click in an empty block.
2658         * khtml/rendering/render_block.h: Added checkSelectionPointIgnoringContinuations declaration.
2659         * khtml/rendering/render_replaced.cpp: 
2660         (RenderReplaced::checkSelectionPointIgnoringContinuations): Now can place caret with a click 
2661         on a replaced element.
2662         * khtml/rendering/render_replaced.h: Added checkSelectionPointIgnoringContinuations declaration.
2663         * khtml/rendering/render_text.cpp:
2664         (InlineTextBox::checkSelectionPoint): Now can place caret with a click in text on a line made "tall"
2665         by an image on the same line.
2666         * khtml/xml/dom_docimpl.cpp:
2667         (DocumentImpl::createEditingTextNode): This creates a text node subclass that whill always create
2668         a renderer for itself.
2669         * khtml/xml/dom_docimpl.h:
2670         * khtml/xml/dom_position.cpp:
2671         (DOMPosition::isLastRenderedPositionInEditableBlock): Improved code to handle more cases.
2672         * khtml/xml/dom_textimpl.cpp:
2673         (TextImpl::TextImpl): Rolled out m_rendererIsNeeded flag.
2674         (TextImpl::rendererIsNeeded): Ditto.
2675         (EditingTextImpl::EditingTextImpl): New class.
2676         (EditingTextImpl::~EditingTextImpl): New.
2677         (EditingTextImpl::rendererIsNeeded): New. Always returns true.
2678         * khtml/xml/dom_textimpl.h: New EditingTextImpl class.
2679         * layout-tests/editing/deleting/delete-3608430-fix-expected.txt: Added.
2680         * layout-tests/editing/deleting/delete-3608430-fix.html: Added.
2681         * layout-tests/editing/deleting/delete-3608462-fix-expected.txt: Added.
2682         * layout-tests/editing/deleting/delete-3608462-fix.html: Added.
2683         * layout-tests/editing/deleting/delete-trailing-ws-002-expected.txt: Added.
2684         * layout-tests/editing/deleting/delete-trailing-ws-002.html: Added.
2685
2686 2004-04-08  Chris Blumenberg  <cblu@apple.com>
2687
2688         Renamed the PasteHTMLCommand to PasteMarkupCommand. Removed PasteImageCommand because we will use PasteMarkupCommand for pasting images.
2689
2690         Reviewed by kocienda.
2691
2692         * ChangeLog:
2693         * khtml/editing/htmlediting.cpp:
2694         (PasteMarkupCommand::PasteMarkupCommand):
2695         (PasteMarkupCommand::~PasteMarkupCommand):
2696         (PasteMarkupCommand::impl):
2697         (PasteMarkupCommand::markupString):
2698         * khtml/editing/htmlediting.h:
2699         (khtml::):
2700         * khtml/editing/htmlediting_impl.cpp:
2701         (PasteMarkupCommandImpl::PasteMarkupCommandImpl):
2702         (PasteMarkupCommandImpl::~PasteMarkupCommandImpl):
2703         (PasteMarkupCommandImpl::commandID):
2704         (PasteMarkupCommandImpl::doApply):
2705         * khtml/editing/htmlediting_impl.h:
2706         (khtml::PasteMarkupCommandImpl::markupString):
2707         * khtml/khtml_part.cpp:
2708         (KHTMLPart::pasteMarkupString):
2709         * khtml/khtml_part.h:
2710         * kwq/WebCoreBridge.h:
2711         * kwq/WebCoreBridge.mm:
2712         (-[WebCoreBridge pasteMarkupString:]):
2713
2714
2715 2004-04-08  David Hyatt  <hyatt@apple.com>
2716
2717         Fix for 3608430 and 3608462, crashes in findNextLineBreak when deleting.  Make sure that the removal of line boxes
2718         always checks the previous root line box's line break information and dirties the line if it is pointing
2719         to the deleted object.
2720         
2721         Reviewed by kocienda
2722
2723         * khtml/rendering/render_line.cpp:
2724         (InlineFlowBox::removeChild):
2725
2726 2004-04-08  Chris Blumenberg  <cblu@apple.com>
2727
2728         Removed DOMExtensions.h from DOM.h until it is public.
2729
2730         Reviewed by koicienda.
2731
2732         * kwq/DOM.h:
2733
2734 2004-04-07  Chris Blumenberg  <cblu@apple.com>
2735
2736         WebCore side for supporting WebDOMOperations.   
2737
2738         Reviewed by rjw.
2739
2740         * WebCore-combined.exp:
2741         * WebCore.exp:
2742         * kwq/DOM.mm:
2743         * kwq/DOMExtensions.h:
2744         * kwq/WebCoreBridge.h:
2745         * kwq/WebCoreBridge.mm:
2746         (+[WebCoreBridge bridgeForDOMDocument:]): new
2747         (-[WebCoreBridge imageForImageElement:]): new
2748
2749 2004-04-07  Darin Adler  <darin@apple.com>
2750
2751         Reviewed by Chris.
2752
2753         * kwq/DOMCSS.h: Changed DOMCSS2Properties to be a category on DOMCSSStyleDeclaration
2754         (after API review, oops!, but I doubt anyone will even notice).
2755         * kwq/DOM-CSS.mm: Implemented the entire DOMCSS2Properties category.
2756
2757 2004-04-07  Ken Kocienda  <kocienda@apple.com>
2758
2759         Reviewed by Chris
2760
2761         * kwq/WebCoreBridge.mm:
2762         (-[WebCoreBridge _stringWithDocumentTypeStringAndMarkupString:]): Do not add a newline in between
2763         the doctype and the content. The newline was showing up when the content was pasted.
2764
2765 2004-04-07  Ken Kocienda  <kocienda@apple.com>
2766
2767         Reviewed by John
2768
2769         Removed concept of currentSelection from EditCommands and refined concept of
2770         startingSelection and endingSelection, making them work more sensibly in the 
2771         system of composed editing commands.
2772
2773         * khtml/editing/htmlediting.cpp: Removed currentSelection().
2774         * khtml/editing/htmlediting.h: Ditto.
2775         * khtml/editing/htmlediting_impl.cpp: currentSelection().
2776         (CompositeEditCommandImpl::applyCommandToComposite): Set the startingSelection 
2777         and endingSelection for the command being applied to the endingSelection of
2778         its new parent. This is the proper starting and ending point.
2779         (CompositeEditCommandImpl::deleteSelection): Changed call to currentSelection
2780         to endingSelection.
2781         (DeleteCollapsibleWhitespaceCommandImpl::DeleteCollapsibleWhitespaceCommandImpl): Ditto.
2782         (DeleteSelectionCommandImpl::DeleteSelectionCommandImpl): Changed call from startingSelection
2783         to endingSelection.
2784         (DeleteSelectionCommandImpl::joinTextNodesWithSameStyle): Changed call to currentSelection
2785         to endingSelection.
2786         (InputNewlineCommandImpl::doApply): Ditto.
2787         (InputTextCommandImpl::deleteCharacter): Ditto.
2788         (InputTextCommandImpl::prepareForTextInsertion): Ditto.
2789         (InputTextCommandImpl::execute): Ditto.
2790         (PasteHTMLCommandImpl::doApply): Ditto.
2791         (TypingCommandImpl::insertText): Remove extraneous call to reset endingSelection. This has
2792         already been done by the helpers this command uses to do its work.
2793         (TypingCommandImpl::issueCommandForDeleteKey): Changed call to currentSelection
2794         to endingSelection.
2795         (TypingCommandImpl::deleteKeyPressed): Remove extraneous call to reset endingSelection. This has
2796         already been done by the helpers this command uses to do its work.
2797         * khtml/editing/htmlediting_impl.h:
2798         (khtml::EditCommandImpl::endingSelection): Remove extraneous call to reset endingSelection. This has
2799         already been done by the helpers this command uses to do its work.
2800
2801 2004-04-07  Ken Kocienda  <kocienda@apple.com>
2802
2803         Reviewed by John
2804         
2805         Make paste work again. It has been broken for some undetermined
2806         period of time.
2807
2808         * khtml/editing/htmlediting_impl.cpp:
2809         (CompositeEditCommandImpl::insertNodeAt): Handle inserting a node when
2810         the reference node has children, or is an empty block.
2811         (CompositeEditCommandImpl::inputText): New convenience to create and
2812         apply an InputTextCommand.
2813         (InputTextCommandImpl::execute): Collapse whitespace when selection is
2814         not a range. Deleting the selection when it is a range already does that, 
2815         so no need to make special accommodation for it.
2816         (PasteHTMLCommandImpl::PasteHTMLCommandImpl): Initialize m_HTMLString using 
2817         an initialization list.
2818         (PasteHTMLCommandImpl::doApply): Collapse whitespace.... as above for 
2819         InputTextCommandImpl::execute. Don't need to qualify NodeImpl's with DOM 
2820         namespace. Clean up selection access; no need to grep around for it, the
2821         desired selection is returned by calling currentSelection(). Treat "simple
2822         text paste" like typing. Tighten up and simplify HTML fragment paste; no
2823         real change in algorithm. 
2824         (SplitTextNodeCommandImpl::SplitTextNodeCommandImpl): m_text1 member variable
2825         not initialized. This bug was introduced by a recent change by me. Fixing now.
2826         * khtml/editing/htmlediting_impl.h: Add inputText() declaration.
2827
2828 2004-04-06  Ken Kocienda  <kocienda@apple.com>
2829
2830         Reviewed by Richard
2831
2832         * khtml/khtml_part.cpp:
2833         (KHTMLPart::setSelection): Now calls setFocusNodeIfNeeded.
2834         (KHTMLPart::takeSelectionFrom): Now calls setFocusNodeIfNeeded.
2835         (KHTMLPart::clearSelection): Now calls setFocusNodeIfNeeded.
2836         (KHTMLPart::invalidateSelection): Now calls setFocusNodeIfNeeded.
2837         (KHTMLPart::setSelectionVisible): Now calls setFocusNodeIfNeeded.
2838         (KHTMLPart::setFocusNodeIfNeeded): New function focuses first element 
2839         of a selection that is contenteditable, if any of the nodes are. The "first"
2840         determination is made by doing a document-order search.
2841         * khtml/khtml_part.h:
2842         * khtml/xml/dom_nodeimpl.cpp: Remove debug spam.
2843         * kwq/WebCoreBridge.mm:
2844         (-[WebCoreBridge setSelectedDOMRange:]): Now updates document layout before
2845         setting the selection. This was needed for Blot, so that setting the 
2846         contenteditable attribute on the body is "seen" when the attempt is made
2847         to set the selection right immediately after.
2848
2849 2004-04-06  David Hyatt  <hyatt@apple.com>
2850
2851         After columns have been expanded to their preferred sizes, if space is left over in the table, then
2852         fixed columns should expand to fill space before percentage width columns do.  The old code had it
2853         backwards.
2854         
2855         Reviewed by john
2856
2857         * khtml/rendering/table_layout.cpp:
2858         (AutoTableLayout::layout):
2859
2860 2004-04-06  Ken Kocienda  <kocienda@apple.com>
2861
2862         Reviewed by Dave
2863
2864         * khtml/dom/dom_node.cpp:
2865         (Node::isContentEditable): Added. Calls through to impl function of same name.
2866         * khtml/dom/dom_node.h: Added isContentEditable declaration.
2867         * khtml/khtmlview.cpp:
2868         (KHTMLView::viewportMouseMoveEvent): Now, the cursor will change
2869         to an i-beam whenever it is over a node that is contenteditable, and nothing, 
2870         like a link, takes precedence.
2871
2872 2004-04-06  Ken Kocienda  <kocienda@apple.com>
2873
2874         Reviewed by Dave
2875
2876         * khtml/css/html4.css: Refine focus rules so that HTML and BODY
2877         elements do not draw a focus ring around themselves when focused.
2878         This prevents a silly-looking focus ring from drawing around a 
2879         document's entire contents when a body element is contenteditable.
2880
2881 2004-04-06  Ken Kocienda  <kocienda@apple.com>
2882
2883         Reviewed by Dave
2884
2885         Caret height is now the height of the tallest element on the line,
2886         mimicking NSText behavior.
2887
2888         * khtml/rendering/render_box.cpp:
2889         (RenderBox::caretPos): Use root line box topOverflow and bottomOverflow 
2890         for the calculation of caret height.
2891         * khtml/rendering/render_text.cpp:
2892         (RenderText::caretPos): Ditto.
2893
2894 2004-04-06  Ken Kocienda  <kocienda@apple.com>
2895
2896         Reviewed by me
2897
2898         Added a new suite of layout tests for editing, all added
2899         in the new layout-tests/editing subtree.
2900
2901         * layout-tests/editing/abe.jpg: Added.
2902         * layout-tests/editing/deleting/delete-block-contents-001-expected.txt: Added.
2903         * layout-tests/editing/deleting/delete-block-contents-001.html: Added.
2904         * layout-tests/editing/deleting/delete-block-contents-002-expected.txt: Added.
2905         * layout-tests/editing/deleting/delete-block-contents-002.html: Added.
2906         * layout-tests/editing/deleting/delete-block-contents-003-expected.txt: Added.
2907         * layout-tests/editing/deleting/delete-block-contents-003.html: Added.
2908         * layout-tests/editing/deleting/delete-br-001-expected.txt: Added.
2909         * layout-tests/editing/deleting/delete-br-001.html: Added.
2910         * layout-tests/editing/deleting/delete-br-002-expected.txt: Added.
2911         * layout-tests/editing/deleting/delete-br-002.html: Added.
2912         * layout-tests/editing/deleting/delete-br-003-expected.txt: Added.
2913         * layout-tests/editing/deleting/delete-br-003.html: Added.
2914         * layout-tests/editing/deleting/delete-br-004-expected.txt: Added.
2915         * layout-tests/editing/deleting/delete-br-004.html: Added.
2916         * layout-tests/editing/deleting/delete-br-005-expected.txt: Added.
2917         * layout-tests/editing/deleting/delete-br-005.html: Added.
2918         * layout-tests/editing/deleting/delete-br-006-expected.txt: Added.
2919         * layout-tests/editing/deleting/delete-br-006.html: Added.
2920         * layout-tests/editing/deleting/delete-character-001-expected.txt: Added.
2921         * layout-tests/editing/deleting/delete-character-001.html: Added.
2922         * layout-tests/editing/deleting/delete-contiguous-ws-001-expected.txt: Added.
2923         * layout-tests/editing/deleting/delete-contiguous-ws-001.html: Added.
2924         * layout-tests/editing/deleting/delete-image-001-expected.txt: Added.
2925         * layout-tests/editing/deleting/delete-image-001.html: Added.
2926         * layout-tests/editing/deleting/delete-image-002-expected.txt: Added.
2927         * layout-tests/editing/deleting/delete-image-002.html: Added.
2928         * layout-tests/editing/deleting/delete-image-003-expected.txt: Added.
2929         * layout-tests/editing/deleting/delete-image-003.html: Added.
2930         * layout-tests/editing/deleting/delete-leading-ws-001-expected.txt: Added.
2931         * layout-tests/editing/deleting/delete-leading-ws-001.html: Added.
2932         * layout-tests/editing/deleting/delete-selection-001-expected.txt: Added.
2933         * layout-tests/editing/deleting/delete-selection-001.html: Added.
2934         * layout-tests/editing/deleting/delete-trailing-ws-001-expected.txt: Added.
2935         * layout-tests/editing/deleting/delete-trailing-ws-001.html: Added.
2936         * layout-tests/editing/editing.js: Added.
2937         * layout-tests/editing/inserting/typing-001-expected.txt: Added.
2938         * layout-tests/editing/inserting/typing-001.html: Added.
2939         * layout-tests/editing/inserting/typing-002-expected.txt: Added.
2940         * layout-tests/editing/inserting/typing-002.html: Added.
2941         * layout-tests/editing/inserting/typing-around-br-001-expected.txt: Added.
2942         * layout-tests/editing/inserting/typing-around-br-001.html: Added.
2943         * layout-tests/editing/inserting/typing-around-image-001-expected.txt: Added.
2944         * layout-tests/editing/inserting/typing-around-image-001.html: Added.
2945         * layout-tests/editing/selection/extend-by-character-001-expected.txt: Added.
2946         * layout-tests/editing/selection/extend-by-character-001.html: Added.
2947         * layout-tests/editing/selection/extend-by-character-002-expected.txt: Added.
2948         * layout-tests/editing/selection/extend-by-character-002.html: Added.
2949         * layout-tests/editing/selection/extend-by-character-003-expected.txt: Added.
2950         * layout-tests/editing/selection/extend-by-character-003.html: Added.
2951         * layout-tests/editing/selection/extend-by-character-004-expected.txt: Added.
2952         * layout-tests/editing/selection/extend-by-character-004.html: Added.
2953         * layout-tests/editing/selection/extend-by-character-005-expected.txt: Added.
2954         * layout-tests/editing/selection/extend-by-character-005.html: Added.
2955         * layout-tests/editing/selection/move-by-character-001-expected.txt: Added.
2956         * layout-tests/editing/selection/move-by-character-001.html: Added.
2957         * layout-tests/editing/selection/move-by-character-002-expected.txt: Added.
2958         * layout-tests/editing/selection/move-by-character-002.html: Added.
2959         * layout-tests/editing/selection/move-by-character-003-expected.txt: Added.
2960         * layout-tests/editing/selection/move-by-character-003.html: Added.
2961         * layout-tests/editing/selection/move-by-character-004-expected.txt: Added.
2962         * layout-tests/editing/selection/move-by-character-004.html: Added.
2963         * layout-tests/editing/selection/move-by-character-005-expected.txt: Added.
2964         * layout-tests/editing/selection/move-by-character-005.html: Added.
2965         * layout-tests/editing/undo/redo-typing-001-expected.txt: Added.
2966         * layout-tests/editing/undo/redo-typing-001.html: Added.
2967         * layout-tests/editing/undo/undo-typing-001-expected.txt: Added.
2968         * layout-tests/editing/undo/undo-typing-001.html: Added.
2969
2970 2004-04-06  Ken Kocienda  <kocienda@apple.com>
2971
2972         Reviewed by Dave
2973
2974         Added execCommand feature. 
2975         Added Javascript selection object.
2976         This lays the groundwork for layout tests for editing.
2977
2978         * khtml/dom/dom_doc.cpp:
2979         (DOM::Document::execCommand): Added. Calls through to impl's execCommand.
2980         * khtml/dom/dom_doc.h: Added execCommand declaration.
2981         * khtml/ecma/kjs_dom.cpp:
2982         (DOMDocumentProtoFunc::tryCall): Switch on new ExecCommand constant and call through to the document.
2983         * khtml/ecma/kjs_dom.h: Added ExecCommand constant.
2984         (KJS::DOMDocument::):
2985         * khtml/ecma/kjs_dom.lut.h: Generated file.
2986         * khtml/ecma/kjs_window.cpp:
2987         (Window::Window): Initialize selection object.
2988         (Window::selection): Return window's selection object.
2989         (Window::mark): Mark selection object.
2990         (WindowFunc::tryCall): Return selection object on GetSelection.
2991         (LocationFunc::tryCall): Added.
2992         (Selection::Selection): Added.
2993         (Selection::~Selection): Added.
2994         (Selection::get): Added.
2995         (Selection::put): Added.
2996         (Selection::toPrimitive): Added.
2997         (Selection::toString): Added.
2998         (SelectionFunc::tryCall): Added.
2999         * khtml/ecma/kjs_window.h:
3000         (KJS::Selection::): Added.
3001         (KJS::Selection::part): Added.
3002         (KJS::Selection::classInfo): Added.
3003         * khtml/ecma/kjs_window.lut.h: Generated file.
3004         * khtml/editing/htmlediting_impl.cpp:
3005         (debugPosition): Debugging aid.
3006         (DeleteCollapsibleWhitespaceCommandImpl::deleteWhitespace): Move the ending position
3007         if you are about to delete it. Fixes a crasher I discovered while writing tests.
3008         (DeleteSelectionCommandImpl::doApply): Move to containing editable block position 0
3009         instead of 1 in a block in delete case 1.
3010         (InputTextCommandImpl::prepareForTextInsertion):
3011         (TypingCommandImpl::issueCommandForDeleteKey):
3012         * khtml/khtml_part.h:
3013         * khtml/khtml_selection.cpp:
3014         (KHTMLSelection::validate): Now adjusts the selection down to leaf nodes if needed.
3015         (KHTMLSelection::debugPosition): Debugging aid.
3016         * khtml/xml/dom_docimpl.cpp:
3017         (DocumentImpl::execCommand): Added. Supports five different commands.
3018         * khtml/xml/dom_docimpl.h:
3019         * khtml/xml/dom_nodeimpl.cpp:
3020         (NodeImpl::previousEditable): Use false instead of 0 for equality check.
3021         (NodeImpl::nextEditable): Ditto.
3022         * khtml/xml/dom_position.cpp:
3023         (DOMPosition::equivalentLeafPosition): New function
3024         (DOMPosition::previousRenderedEditablePosition): New function
3025         (DOMPosition::nextRenderedEditablePosition): New function
3026         (DOMPosition::equivalentUpstreamPosition): Refined behavior to handle more cases correctly.
3027         (DOMPosition::equivalentDownstreamPosition): Ditto.
3028         (DOMPosition::atStartOfContainingEditableBlock):New function
3029         (DOMPosition::atStartOfRootEditableBlock):New function
3030         * khtml/xml/dom_position.h:
3031         * kwq/KWQKHTMLPart.h:
3032         * kwq/KWQKHTMLPart.mm:
3033         (KWQKHTMLPart::issueUndoCommand): New function for calling undo programatically.
3034         (KWQKHTMLPart::issueRedoCommand): Ditto, but for redo.
3035         * kwq/KWQRenderTreeDebug.cpp:
3036         (nodePositionRelativeToRoot): New function to generate log information for the selection.
3037         (writeSelection): Writes the selection if there is one.
3038         (externalRepresentation): Calls writeSelection
3039         * kwq/WebCoreBridge.h: New declarations for issueUndoCommand and issueRedoCommand.
3040
3041 2004-04-05  Darin Adler  <darin@apple.com>
3042
3043         * khtml/html/kentities.gperf: Added &COPY; and &REG;, both supported by Gecko
3044         (and presumably by WinIE). Also re-sorted the list.
3045         * khtml/html/kentities.c: Regenerated.
3046
3047 2004-04-05  Darin Adler  <darin@apple.com>
3048
3049         Reviewed by Dave.
3050
3051         - rolled over fix from KHTML tree; anchor inside another anchor
3052
3053         * khtml/rendering/render_layer.cpp: (RenderLayer::nodeAtPoint):
3054         Make sure the URL element is the innermost one, by not setting it once
3055         it's already set.
3056
3057 2004-04-05  David Hyatt  <hyatt@apple.com>
3058
3059         Implement overflow: overlay so that a scrollbar can show/hide without causing a layout.
3060         
3061         Reviewed by darin
3062
3063         * ChangeLog:
3064         * khtml/css/css_computedstyle.cpp:
3065         (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
3066         * khtml/css/cssparser.cpp:
3067         (CSSParser::parseValue):
3068         * khtml/css/cssstyleselector.cpp:
3069         (khtml::CSSStyleSelector::applyProperty):
3070         * khtml/css/cssvalues.c:
3071         (hash_val):
3072         (findValue):
3073         * khtml/css/cssvalues.h:
3074         * khtml/css/cssvalues.in:
3075         * khtml/rendering/render_block.cpp:
3076         (khtml::RenderBlock::layoutBlock):
3077         (khtml::RenderBlock::layoutBlockChildren):
3078         (khtml::RenderBlock::rightOffset):
3079         * khtml/rendering/render_box.cpp:
3080         (RenderBox::contentWidth):
3081         (RenderBox::contentHeight):
3082         * khtml/rendering/render_layer.cpp:
3083         (RenderLayer::updateScrollInfoAfterLayout):
3084         * khtml/rendering/render_object.cpp:
3085         (RenderObject::clientWidth):
3086         (RenderObject::clientHeight):
3087         * khtml/rendering/render_style.h:
3088         (khtml::):
3089         (khtml::RenderStyle::hasAutoScrollbars):
3090         (khtml::RenderStyle::scrollsOverflow):
3091         (khtml::RenderStyle::includeScrollbarSize):
3092
3093 2004-04-03  David Hyatt  <hyatt@apple.com>
3094
3095         Implementation of <input type=range>, which makes sliders available in Web pages.
3096         
3097         Reviewed by john
3098
3099         * WebCore.pbproj/project.pbxproj:
3100         * khtml/ecma/kjs_dom.cpp:
3101         (DOMNode::getValueProperty):
3102         (DOMNode::putValue):
3103         * khtml/ecma/kjs_dom.h:
3104         (KJS::DOMNode::):
3105         * khtml/ecma/kjs_dom.lut.h:
3106         (KJS::):
3107         * khtml/html/html_formimpl.cpp:
3108         (HTMLInputElementImpl::setType):
3109         (HTMLInputElementImpl::type):
3110         (HTMLInputElementImpl::click):
3111         (HTMLInputElementImpl::accessKeyAction):
3112         (HTMLInputElementImpl::parseHTMLAttribute):
3113         (HTMLInputElementImpl::rendererIsNeeded):
3114         (HTMLInputElementImpl::createRenderer):
3115         (HTMLInputElementImpl::encoding):
3116         * khtml/html/html_formimpl.h:
3117         (DOM::HTMLInputElementImpl::):
3118         * khtml/misc/htmlattrs.c:
3119         (hash_attr):
3120         (findAttr):
3121         * khtml/misc/htmlattrs.h:
3122         * khtml/misc/htmlattrs.in:
3123         * khtml/rendering/render_form.cpp:
3124         (RenderLineEdit::slotTextChanged):
3125         (:RenderFormElement):
3126         (RenderSlider::calcMinMaxWidth):
3127         (RenderSlider::updateFromElement):
3128         (RenderSlider::slotSliderValueChanged):
3129         * khtml/rendering/render_form.h:
3130         (khtml::RenderSlider::element):
3131         (khtml::RenderSlider::renderName):
3132         (khtml::RenderSlider::canHaveIntrinsicMargins):
3133         * khtml/xml/dom2_eventsimpl.cpp:
3134         (EventImpl::typeToId):
3135         (EventImpl::idToType):
3136         * khtml/xml/dom2_eventsimpl.h:
3137         (DOM::EventImpl::):
3138         * kwq/KWQSlider.h: Added.
3139         * kwq/KWQSlider.mm: Added.
3140         (-[KWQSlider initWithQSlider:]):
3141         (-[KWQSlider slide:]):
3142         (m_val):
3143         (QSlider::setFont):
3144         (QSlider::sizeHint):
3145         (QSlider::setValue):
3146         (QSlider::setMinValue):
3147         (QSlider::setMaxValue):
3148         (QSlider::value):
3149         (QSlider::minValue):
3150         (QSlider::maxValue):
3151         (QSlider::sliderValueChanged):
3152         (QSlider::dimensions):
3153         * kwq/KWQSlot.mm:
3154         (KWQSlot::KWQSlot):
3155         (KWQSlot::call):
3156
3157 2004-04-05  Chris Blumenberg  <cblu@apple.com>
3158
3159         Fixed: <rdar://problem/3612580>: SPI: WebPlugin selection
3160
3161         Reviewed by kocienda.
3162
3163         * WebCore.pbproj/project.pbxproj:
3164         * khtml/rendering/render_replaced.cpp:
3165         (RenderWidget::setSelectionState): new override, calls QWidget::setIsSelected
3166         * khtml/rendering/render_replaced.h:
3167         (khtml::RenderWidget::selectionState): new override
3168         * kwq/KWQWidget.h:
3169         * kwq/KWQWidget.mm:
3170         (QWidget::setIsSelected): new, calls [WebCoreBridge setIsSelected:forView:]
3171         (QWidget::isSelected): new, calls [WebCoreBridge isViewSelected:]
3172         * kwq/WebCoreBridge.h:
3173         * kwq/WebCoreBridge.mm:
3174         (-[WebCoreBridge selectionColor]): new
3175
3176 2004-04-03  David Hyatt  <hyatt@apple.com>
3177
3178         Fix for 3601728, text overlaps borders at ejai.org.  Remove all the code in addForbidden for
3179         dir, menu, nobr, and pre that made them too restrictive regarding what child tags they could
3180         contain.
3181         
3182         Reviewed by kocienda
3183
3184         * khtml/html/dtd.cpp:
3185         (DOM::addForbidden):
3186         (DOM::removeForbidden):
3187
3188 2004-04-02  Chris Blumenberg  <cblu@apple.com>
3189
3190         Moved the DOM extensions to their own headers
3191
3192         Reviewed by kocienda.
3193
3194         * WebCore.pbproj/project.pbxproj:
3195         * kwq/DOM.h: include DOMExtensions.h
3196         * kwq/DOMExtensions.h: Added.
3197         * kwq/DOMHTML.h: moved extensions to DOMExtensions.h
3198         * kwq/DOMHTML.mm: Renamed to match header
3199
3200 2004-04-02  David Hyatt  <hyatt@apple.com>
3201
3202         Fix for 3610662, rendering sometimes doesn't update in response to mouse events that change style.
3203         The document changed list was getting messed up.
3204         
3205         Reviewed by darin
3206
3207         * khtml/xml/dom_docimpl.cpp:
3208         (DocumentImpl::updateDocumentsRendering):
3209         * khtml/xml/dom_docimpl.h:
3210
3211 === Safari-135 ===
3212
3213 2004-04-01  Darin Adler  <darin@apple.com>
3214
3215         Based on a fix by Eric Albert.
3216
3217         - fixed <rdar://problem/3594247>: Safari crashes when a background image has a height or width of 0
3218
3219         * khtml/rendering/render_box.cpp: (RenderBox::paintBackgroundExtended):
3220         Change code path so we don't mod with 0.
3221
3222 2004-04-01  Darin Adler  <darin@apple.com>
3223
3224         Reviewed by Dave.
3225
3226         - fixed <rdar://problem/3608305>: DEMO: menu in search field has one disabled item: localized string not found
3227
3228         * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::HTMLInputElementImpl):
3229         Initialize m_maxResults to 0.
3230
3231 2004-04-01  Darin Adler  <darin@apple.com>
3232
3233         Reviewed by John.
3234
3235         - cleaned up image map code and made it work with XML documents
3236
3237         * khtml/html/html_documentimpl.h: Removed getMap and mapMap.
3238         * khtml/html/html_documentimpl.cpp: Removed getMap; moved to base class.
3239
3240         * khtml/html/html_imageimpl.cpp:
3241         (HTMLMapElementImpl::~HTMLMapElementImpl): Call new removeImageMap function instead
3242         of manipulating the mapMap field directly.
3243         (HTMLMapElementImpl::parseHTMLAttribute): Rewrite name changing code for simplicity
3244         and to avoid running off the end of the bufffer.
3245         Also remove image map before changing name so it doesn't end up in the map twice
3246         under both the old and new names.
3247         * khtml/html/html_imageimpl.h: Use a DOMString instead of QString for the name, since
3248         the public API already uses a DOMString.
3249
3250         * khtml/rendering/render_image.cpp: (RenderImage::nodeAtPoint): Call the new
3251         getImageMap instead of the old getMap.
3252
3253         * khtml/xml/dom_docimpl.h: Added addImageMap, removeImageMap, getImageMap, and m_imageMapsByName.
3254         * khtml/xml/dom_docimpl.cpp:
3255         (DocumentImpl::addImageMap): Added. Stores the image map under its name, unless there's
3256         already another map of the same.
3257         (DocumentImpl::removeImageMap): Added. Removes the image map if it's already filed by
3258         name. Avoid pitfall of removing another image map that has the same name.
3259         (DocumentImpl::getImageMap): Added. Simplified version of logic from getMap in HTMLDocumentImpl.
3260
3261 2004-04-01  Darin Adler  <darin@apple.com>
3262
3263         Reviewed by Ken.
3264
3265         - fixed <rdar://problem/3608978>: dual <map> means you can't select the enter site button at jurassicpark.com (same problem in MacIE, works in Netscape)
3266
3267         * khtml/html/html_imageimpl.cpp: (HTMLMapElementImpl::parseHTMLAttribute):
3268         Make the first <map> seen win, as in other browsers. The old code made the last <map> seen win.
3269
3270 2004-04-01  Ken Kocienda  <kocienda@apple.com>
3271
3272         Reviewed by me
3273         
3274         Missing file broke build after my last checkin
3275
3276         * ForwardingHeaders/rendering/render_line.h: Added.
3277
3278 2004-03-31  Ken Kocienda  <kocienda@apple.com>
3279
3280         Reviewed by Dave.
3281         
3282         Many, many editing improvements, with a concentration on getting
3283         caret navigation and deleting selections working correctly.
3284
3285         * WebCore.pbproj/project.pbxproj:
3286         * khtml/dom/dom_position.cpp: Removed.
3287         * khtml/dom/dom_position.h: Removed.
3288         * khtml/editing/htmlediting.cpp:
3289         (EditCommand::isNull): Inlined.
3290         (EditCommand::notNull): New function.
3291         (EditCommand::parent): Commands now have parents. Allows for walking the tree of composite commands.
3292         (EditCommand::setParent): Ditto.
3293         (EditCommand::emptyCommand): Returns a static empty command.
3294         (AppendNodeCommand::AppendNodeCommand): 
3295         (AppendNodeCommand::parentNode): Member variable name change only. parent -> parentNode.
3296         (DeleteCollapsibleWhitespaceCommand::DeleteCollapsibleWhitespaceCommand): New command.
3297         (InputTextCommand::InputTextCommand):
3298         (InputTextCommand::input):
3299         (InputTextCommand::charactersAdded):
3300         (JoinTextNodesCommand::JoinTextNodesCommand): Now derives directly from EditCommand.
3301         (RemoveNodeAndPruneCommand::RemoveNodeAndPruneCommand): New command.
3302         (SplitTextNodeCommand::SplitTextNodeCommand): Now derives directly from EditCommand.
3303         * khtml/editing/htmlediting.h:
3304         * khtml/editing/htmlediting_impl.cpp:
3305         (isNBSP): New helper.
3306         (isWS): New helper.
3307         (shouldPruneNode): New helper.
3308         (leadingWhitespacePosition): New helper.
3309         (trailingWhitespacePosition): New helper.
3310         (textNodesAreJoinable): New helper.
3311         (nonBreakingSpaceString): Returns a static DOMString containing a non-breaking space.
3312         (EditCommandImpl::EditCommandImpl):
3313         (EditCommandImpl::setStartingSelection): Now recursively sets starting selection on parents.
3314         (EditCommandImpl::setEndingSelection): As above, for ending selection.
3315         (EditCommandImpl::parent): New accessor.
3316         (EditCommandImpl::setParent): New accessor.
3317         (CompositeEditCommandImpl::doUnapply): Removed some logging.
3318         (CompositeEditCommandImpl::doReapply): Removed some logging.
3319         (CompositeEditCommandImpl::applyCommandToComposite): Sets parent.
3320         (CompositeEditCommandImpl::removeNodeAndPrune): New comvenience.
3321         (CompositeEditCommandImpl::replaceText): New comvenience.
3322         (CompositeEditCommandImpl::deleteSelection): New comvenience.
3323         (CompositeEditCommandImpl::deleteCollapsibleWhitespace): New comvenience.
3324         (AppendNodeCommandImpl::AppendNodeCommandImpl): Member variable name change only. parent -> parentNode.
3325         (AppendNodeCommandImpl::~AppendNodeCommandImpl): Ditto.
3326         (AppendNodeCommandImpl::doApply): Ditto.
3327         (AppendNodeCommandImpl::doUnapply): Ditto.
3328         (DeleteCollapsibleWhitespaceCommandImpl::DeleteCollapsibleWhitespaceCommandImpl): New command
3329         (debugPosition): New debugging aid.
3330         (DeleteSelectionCommandImpl::doApply): Major reworking to handle more cases correctly.
3331         (InputNewlineCommandImpl::doApply): Position and selection tweaks.
3332         (InputTextCommandImpl::InputTextCommandImpl): Handles more cases now, like typing after an image.
3333         (JoinTextNodesCommandImpl::JoinTextNodesCommandImpl): Now derives directly from EditCommand.
3334         Implements the guts of the command itself now, rather than replying on its former base class.
3335         (RemoveNodeAndPruneCommandImpl::RemoveNodeAndPruneCommandImpl): New command.
3336         (SplitTextNodeCommandImpl::SplitTextNodeCommandImpl): Now derives directly from EditCommand.
3337         Implements the guts of the command itself now, rather than replying on its former base class.
3338         (TypingCommandImpl::TypingCommandImpl): Major rework to handle more cases correctly.
3339         * khtml/editing/htmlediting_impl.h:
3340         * khtml/html/html_elementimpl.cpp:
3341         (HTMLElementImpl::isContentEditable): More efficient use of the style system to answer the question.
3342         * khtml/khtml_part.cpp:
3343         (KHTMLPart::setSelection): Fixes an issue where the caret would not repaint after being moved when undoing.
3344         (KHTMLPart::takeSelectionFrom): Ditto.
3345         (KHTMLPart::clearSelection): Ditto.
3346         (KHTMLPart::invalidateSelection): Ditto.
3347         (KHTMLPart::setSelectionVisible): Ditto.
3348         (KHTMLPart::slotClearSelection): Ditto.
3349         (KHTMLPart::clearCaretRectIfNeeded):  Ditto.
3350         (KHTMLPart::notifySelectionChanged): Ditto.
3351         (KHTMLPart::unappliedEditing): Now uses EditCommand::emptyCommand().
3352         (KHTMLPart::reappliedEditing): Ditto.
3353         * khtml/khtml_part.h:
3354         * khtml/khtml_selection.cpp:
3355         (KHTMLSelection::KHTMLSelection):
3356         (KHTMLSelection::modify): Updated to work with new DOMPosition API.
3357         (KHTMLSelection::paintCaret): Ditto.
3358         (KHTMLSelection::moveToRenderedContent): Ditto.
3359         (KHTMLSelection::basePosition): New convenience.
3360         (KHTMLSelection::extentPosition): New convenience.
3361         (KHTMLSelection::startPosition): New convenience.
3362         (KHTMLSelection::endPosition): New convenience.
3363         (KHTMLSelection::debugPosition): Modified debug output.
3364         * khtml/khtml_selection.h:
3365         (KHTMLSelection::isEmpty):
3366         (KHTMLSelection::notEmpty):
3367         * khtml/rendering/bidi.cpp:
3368         (khtml::RenderBlock::layoutInlineChildren): Fixed a crasher that happened when deleting content at the start of a line.
3369         * khtml/rendering/render_br.cpp:
3370         (RenderBR::caretMaxRenderedOffset): New function.
3371         (RenderBR::caretPos): Now draws the caret in the right place when a block is empty.
3372         * khtml/rendering/render_br.h:
3373         * khtml/rendering/render_flow.cpp:
3374         (RenderFlow::caretPos): Now draws the caret in the right place when a flow is empty.
3375         * khtml/rendering/render_line.cpp:
3376         (InlineBox::caretMaxRenderedOffset): New function.
3377         * khtml/rendering/render_line.h:
3378         * khtml/rendering/render_object.cpp:
3379         (RenderObject::isEditable):
3380         (RenderObject::caretMaxRenderedOffset): New function.
3381         * khtml/rendering/render_object.h:
3382         * khtml/rendering/render_replaced.cpp:
3383         (RenderReplaced::caretMaxRenderedOffset): New function.
3384         * khtml/rendering/render_replaced.h:
3385         * khtml/rendering/render_text.cpp:
3386         (InlineTextBox::caretMaxRenderedOffset): New function.
3387         (RenderText::detach):
3388         (RenderText::caretMaxOffset):
3389         (RenderText::caretMaxRenderedOffset): New function.
3390         * khtml/rendering/render_text.h:
3391         (khtml::InlineTextBox::len):
3392         * khtml/xml/dom_edititerator.cpp: Added.
3393         * khtml/xml/dom_edititerator.h: Added.
3394         * khtml/xml/dom_nodeimpl.cpp:
3395         (NodeImpl::previousEditable): Improved the correctness of this function.
3396         (NodeImpl::nextEditable): Ditto.
3397         * khtml/xml/dom_nodeimpl.h:
3398         * khtml/xml/dom_position.cpp: Added.
3399         (DOMPosition::renderedOffset): New function.
3400         (DOMPosition::previousCharacterPosition): New function.
3401         (DOMPosition::nextCharacterPosition): New function.
3402         (DOMPosition::equivalentUpstreamPosition): New function.
3403         (DOMPosition::equivalentDownstreamPosition): New function.
3404         (DOMPosition::validUpstreamDownstreamPosition): New function.
3405         (DOMPosition::inRenderedContent): New function.
3406         (inlineBoxForRenderer): New function.
3407         (renderersOnDifferentLine): New function.
3408         (nextRenderedEditable): New function.
3409         (previousRenderedEditable): New function.
3410         (DOMPosition::inRenderedText): New function.
3411         (DOMPosition::rendersOnSameLine): New function.
3412         (DOMPosition::rendersInDifferentPosition): New function.
3413         (DOMPosition::isFirstRenderedPositionOnLine): New function.
3414         (DOMPosition::isLastRenderedPositionOnLine): New function.
3415         (DOMPosition::isLastRenderedPositionInEditableBlock): New function.
3416         (DOMPosition::inFirstEditableInRootEditableBlock): New function.
3417         (DOMPosition::inLastEditableInRootEditableBlock): New function.
3418         (DOMPosition::inFirstEditableInContainingEditableBlock): New function.
3419         (DOMPosition::inLastEditableInContainingEditableBlock): New function.
3420         * khtml/xml/dom_position.h: Added.
3421         (DOM::DOMPosition::notEmpty): New function.
3422         * khtml/xml/dom_stringimpl.cpp:
3423         (DOM::DOMStringImpl::containsOnlyWhitespace): Added a version which takes an offset and length.
3424         * khtml/xml/dom_stringimpl.h:
3425         * khtml/xml/dom_textimpl.cpp:
3426         (CharacterDataImpl::containsOnlyWhitespace): As above
3427         (CharacterDataImpl::maxOffset): New function.
3428         (CharacterDataImpl::caretMaxRenderedOffset): New function.
3429         (TextImpl::TextImpl):
3430         (TextImpl::rendererIsNeeded): A new bit. When set, makes a text renderer unconditionally.
3431         * khtml/xml/dom_textimpl.h:
3432         (DOM::TextImpl::setRendererIsNeeded): Sets the bit.
3433         * kwq/KWQAssertions.m:
3434         (KWQLog): Change to decrease the amount of output for the Editing log level. (my preference)
3435
3436 2004-03-31  David Hyatt  <hyatt@apple.com>
3437
3438         Fix for 3601834, make sure that textareas do a layout when their rows/cols/wrap attributes are dynamically
3439         changed.
3440         
3441         Reviewed by darin.
3442
3443         * khtml/html/html_formimpl.cpp:
3444         (HTMLTextAreaElementImpl::parseHTMLAttribute):
3445
3446 2004-03-30  David Hyatt  <hyatt@apple.com>
3447
3448         Fix for 3604241, simple space collapsing results in a doubled character.  Simplify the ignoring of
3449         whitespace and make sure it works across absolutely positioned spans.
3450         
3451         Reviewed by darin
3452
3453         * khtml/rendering/bidi.cpp:
3454         (khtml::RenderBlock::findNextLineBreak):
3455
3456 2004-03-30  Darin Adler  <darin@apple.com>
3457
3458         Reviewed by Dave.
3459
3460         - fixed <rdar://problem/3570877>: REGRESSION: onfocus handler not working at weather.com
3461
3462         * khtml/ecma/kjs_binding.cpp:
3463         (UString::string): Turn a null UString into a null DOMString, but a non-null empty UString into a
3464         non-null empty DOMString.
3465         (UString::qstring): Ditto, for QString.
3466         (Identifier::string): Ditto, for Identifier.
3467         (Identifier::qstring): Ditto.
3468
3469         * kwq/KWQLineEdit.h: Override focusPolicy.
3470         * kwq/KWQLineEdit.mm: (QLineEdit::focusPolicy): Return StrongFocus instead of TabFocus, since
3471         we allow clicking to focus on these widgets.
3472         * kwq/KWQTextEdit.h: More of the same.
3473         * kwq/KWQTextEdit.mm: (QTextEdit::focusPolicy): And still more.
3474
3475         - fixed <rdar://problem/3605919>: text fields in web pages are too tall
3476
3477         * kwq/KWQTextField.mm:
3478         (-[KWQTextFieldCell _typesetterBehavior]): Ignore the per-application typesetter setting and
3479         instead always use the latest behavior for text fields in web pages.
3480         (-[KWQSecureTextFieldCell _typesetterBehavior]): Ditto.
3481         (-[KWQSearchFieldCell _typesetterBehavior]): Ditto.
3482
3483         - additional cleanup
3484
3485         * khtml/html/html_formimpl.cpp:
3486         (HTMLGenericFormElementImpl::isKeyboardFocusable): Check tab focus bit instead of different modes.
3487         (HTMLGenericFormElementImpl::isMouseFocusable): Check click focus bit instead of different modes.
3488
3489 2004-03-30  David Hyatt  <hyatt@apple.com>
3490
3491         Fix for 3603326, spurious line breaks in encyclopedia articles.  Make sure makeChildrenNonInline knows to
3492         skip over floating/positioned elements so that they remain part of contiguous inline runs for static positioning
3493         purposes.
3494         
3495         Reviewed by darin
3496
3497         * khtml/rendering/render_block.cpp:
3498         (khtml::getInlineRun):
3499
3500 2004-03-30  Darin Adler  <darin@apple.com>
3501
3502         Reviewed by Ken.
3503
3504         - fixed garbage characters seen while I was rigging up the Mozilla JavaScript tests
3505
3506         * kwq/KWQString.h: Add a "move constructor" for KWQStringData that extracts the data
3507         from an existing KWQStringData.
3508         * kwq/KWQString.mm:
3509         (KWQStringData::KWQStringData): Implement the move constructor.
3510         (QString::detachInternal): Use the move constructor rather than making a copy of the
3511         data. Should be both more efficient and preserves both the Unicode and the ASCII. The
3512         bug here is that TokenizerSubstring relies on the Unicode staying around. We still
3513         have a problem in the case where the Unicode is inside the KWQStringData. To deal with
3514         that we'll have to add a new QString call that TokenizerSubstring can use. The new call
3515         will force QString to keep the Unicode outside the internal KWQStringData.
3516
3517 2004-03-30  Darin Adler  <darin@apple.com>
3518
3519         Reviewed by Ken.
3520
3521         - fixed <rdar://problem/3606146>: repro nil-deref in QWidget::move (www.stoltoffshore.com)
3522
3523         * khtml/khtml_part.cpp:
3524         (KHTMLPart::requestObject): Add check for NULL widget.
3525         (KHTMLPart::processObjectRequest): Add check for NULL widget.
3526
3527 2004-03-29  David Hyatt  <hyatt@apple.com>
3528
3529         Make sure "auto" is allowed as a valid value when parsing rect shapes (e.g., for the clip property).
3530         
3531         Reviewed by rjw
3532
3533         * khtml/css/cssparser.cpp:
3534         (CSSParser::parseShape):
3535
3536 2004-03-29  David Hyatt  <hyatt@apple.com>
3537
3538         Followup fix.  Handle the case where a hard line break occurs right after a soft hyphen.  In this
3539         case we were losing a letter of the word in addition to not rendering the soft hyphen.
3540         
3541         Reviewed by kocienda
3542
3543         * khtml/rendering/bidi.cpp:
3544         (khtml::checkMidpoints):
3545
3546 2004-03-29  David Hyatt  <hyatt@apple.com>
3547
3548         Fix for 3604154, support soft hyphens when rendering.  This patch implements soft hyphen support that
3549         matches IE6 on Windows and Opera 7.  Soft hyphens that don't break lines end up getting collapsed away.
3550         Only if the hyphen breaks a line does it render.
3551         
3552         Reviewed by kocienda
3553
3554         * khtml/rendering/bidi.cpp:
3555         (khtml::chopMidpointsAt):
3556         (khtml::appendRunsForObject):
3557         (khtml::RenderBlock::findNextLineBreak):
3558         * khtml/rendering/render_text.cpp:
3559         (RenderText::calcMinMaxWidth):
3560
3561 2004-03-29  John Sullivan  <sullivan@apple.com>
3562
3563         Made menu shortcuts work again when editing HTML
3564
3565         Reviewed by Darin.
3566
3567         * khtml/xml/dom_elementimpl.cpp:
3568         (ElementImpl::defaultEventHandler):
3569         Don't treat key events with command key down as
3570         editing events.
3571
3572 2004-03-28  Darin Adler  <darin@apple.com>
3573
3574         Reviewed by John.
3575
3576         - fixed <rdar://problem/3602202>: "feed:uuid:...." links in Emerson content are being changed into "feed:uuuid:...."
3577
3578         * kwq/KWQKURL.mm: (copyPathRemovingDots): Add special case for empty path. The old code had an
3579         assertion that explicitly allowed this case, but it copied a character from the src buffer,
3580         which was incorrect.
3581
3582 2004-03-26  David Hyatt  <hyatt@apple.com>
3583
3584         Fix for 3600642, letter magnet demo doesn't update until mouse move.  This patch also fixes problems
3585         with the animated text Gecko DOM demos on developer.netscape.com.  Make sure that timer callbacks via
3586         setTimeout always updateRendering after executing the JS code.
3587         
3588         Reviewed by darin
3589
3590         * khtml/ecma/kjs_window.cpp:
3591         (ScheduledAction::execute):
3592
3593 === Safari-134 ===
3594
3595 2004-03-25  David Hyatt  <hyatt@apple.com>
3596
3597         Implement the rest of the search field.  Make it work with form submission.  Implement onscroll at
3598         the document level.
3599         
3600         Reviewed by darin
3601
3602         * khtml/html/html_formimpl.cpp:
3603         (HTMLFormElementImpl::submit):
3604         * khtml/rendering/render_form.cpp:
3605         (RenderLineEdit::addSearchResult):
3606         * khtml/rendering/render_form.h:
3607         * kwq/KWQKHTMLPart.h:
3608         * kwq/KWQKHTMLPart.mm:
3609         (KWQKHTMLPart::sendScrollEvent):
3610         * kwq/KWQLineEdit.h:
3611         * kwq/KWQLineEdit.mm:
3612         (QLineEdit::setMaxResults):
3613         (QLineEdit::setPlaceholderString):
3614         (QLineEdit::addSearchResult):
3615         * kwq/WebCoreBridge.h:
3616         * kwq/WebCoreBridge.mm:
3617         (-[WebCoreBridge sendScrollEvent]):
3618         * kwq/WebCoreViewFactory.h:
3619
3620 2004-03-25  David Hyatt  <hyatt@apple.com>
3621
3622         Fix for 3570700, crash in inlineBox::isDirty.  Make sure line boxes null out parent pointers when those
3623         parents get deleted.  r=john
3624
3625         Fix for .value not being settable on selects.  r=darin
3626         
3627         * khtml/html/html_formimpl.cpp:
3628         (HTMLSelectElementImpl::setValue):
3629         * khtml/rendering/render_block.cpp:
3630         (khtml::RenderBlock::removeChildrenFromLineBoxes):
3631         (khtml::RenderBlock::removeChild):
3632         * khtml/rendering/render_block.h:
3633         * khtml/rendering/render_line.cpp:
3634         (InlineFlowBox::removeChild):
3635         
3636 2004-03-25  Darin Adler  <darin@apple.com>
3637
3638         Fix by Kristin Webster, reviewed by me.
3639
3640         - fixed <rdar://problem/3582431>: HiDPI - Form elements not working when scaling factor != 1.0
3641
3642         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Pass nil for fromView
3643         rather than passing the top level view.
3644
3645 2004-03-24  Darin Adler  <darin@apple.com>
3646
3647         Reviewed by John.
3648
3649         - fixed <rdar://problem/3566805>: REGRESSION: When the subject of mailto is 2 byte Safari failed to send mail address and subject to Mail.app
3650
3651         * kwq/KWQKURL.mm: (KURL::findHostnamesInMailToURL): Update to handle hostnames that end just before
3652         a '?' since a '?' ends the entire part of the URL that can contain hostnames. Also change the logic so
3653         that the '?' will successfully end the search.
3654
3655 2004-03-24  Darin Adler  <darin@apple.com>
3656
3657         Reviewed by John.
3658
3659         - fixed <rdar://problem/3599650>: main image missing due to incorrect relative URL resolution at www.brother.com
3660
3661         * kwq/KWQKURL.mm: (KURL::KURL): Implement compatibility rule from the URI RFC.
3662         If a URL has a scheme, but does not start with the "/" character, and the scheme
3663         matches the base URL, then treat it as a relative URL.
3664
3665 2004-03-24  Ken Kocienda  <kocienda@apple.com>
3666
3667         Reviewed by me.
3668
3669         I neglected to check in these required changes when I landed previously.
3670         This is what I get for trying to commit when I had other changes in
3671         my tree.
3672
3673         * khtml/dom/html_form.cpp:
3674         (HTMLSelectElement::add): Uses new-style call.
3675         * khtml/html/html_formimpl.cpp:
3676         (HTMLSelectElementImpl::add): Change the interface for this call to use
3677         impl objects instead of API objects. This works around the fact that the
3678         API object's constructor that takes an impl is protected.
3679         * khtml/html/html_formimpl.h: Uses new-style call.
3680
3681 2004-03-24  Ken Kocienda <kocienda@apple.com>
3682
3683         Implemented the remainder of the HTML DOM API.
3684     
3685         Reviewed by Chris.
3686     
3687         * kwq/DOMHTML.h
3688         * kwq/HTMLDOM.mm
3689
3690 2004-03-23  David Hyatt  <hyatt@apple.com>
3691
3692         Fix for 3487207, implement onscroll DOM event for elements with overflow:auto/scroll/hidden.  This does
3693         not handle firing onscroll on the window when the document scrolls, nor does it handle firing onscroll
3694         on textareas.  These are two separate bugs.
3695
3696         This patch finishes stubbing out the onscroll event and adds support for it to the DOM.  It also supports
3697         the firing of the event when overflow blocks scroll.
3698         
3699         Reviewed by darin
3700
3701         * khtml/ecma/kjs_dom.cpp:
3702         (DOMNode::getValueProperty):
3703         (DOMNode::putValue):
3704         * khtml/ecma/kjs_dom.h:
3705         (KJS::DOMNode::):
3706         * khtml/ecma/kjs_dom.lut.h:
3707         (KJS::):
3708         * khtml/ecma/kjs_window.cpp:
3709         (Window::get):
3710         (Window::put):
3711         * khtml/ecma/kjs_window.h:
3712         (KJS::Window::):
3713         * khtml/ecma/kjs_window.lut.h:
3714         (KJS::):
3715         * khtml/html/html_baseimpl.cpp:
3716         (HTMLBodyElementImpl::parseHTMLAttribute):
3717         * khtml/html/html_elementimpl.cpp:
3718         (HTMLElementImpl::parseHTMLAttribute):
3719         * khtml/misc/htmlattrs.c:
3720         (hash_attr):
3721         (findAttr):
3722         * khtml/misc/htmlattrs.h:
3723         * khtml/misc/htmlattrs.in:
3724         * khtml/rendering/render_layer.cpp:
3725         (RenderLayer::scrollToOffset):
3726
3727 2004-03-23  David Hyatt  <hyatt@apple.com>
3728
3729         Fix for 3513627, HTML mail prints upside down occasionally.  Change printing so that it never resizes the
3730         WebHTMLView when formatting for printing.  When computing page rects, instead of using the view's bounds,
3731         use the root layer's width instead.
3732
3733         Reviewed by darin
3734
3735         * khtml/khtmlview.cpp:
3736         (KHTMLView::layout):
3737         * kwq/WebCoreBridge.h:
3738         * kwq/WebCoreBridge.mm:
3739         (-[WebCoreBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
3740
3741 2004-03-23  David Hyatt  <hyatt@apple.com>
3742
3743         Fix for crasher 3598204, previousKeyView was calling nextKeyView instead.
3744         
3745         Reviewed by darin
3746
3747         * kwq/KWQTextField.mm:
3748         (-[KWQTextField previousKeyView]):
3749         (-[KWQSecureTextField previousKeyView]):
3750         (-[KWQSearchField previousKeyView]):
3751
3752 2004-03-23  Darin Adler  <darin@apple.com>
3753
3754         Reviewed by Vicki.
3755
3756         - fixed deployment build
3757
3758 2004-03-22  David Hyatt  <hyatt@apple.com>
3759
3760         Wire up NSSearchField to WebCore.  Add support for placeholder strings, autosaving of recent items, the ability to show/hide
3761         the magnifying glass search button, the ability to specify the maximum number of results, the ability to specify an incremental
3762         search or not, etc.  Added a DOM event that fires when the search field indicates that search results should be updated.
3763         
3764         Reviewed by darin
3765
3766         * khtml/ecma/kjs_dom.cpp:
3767         (DOMNode::getValueProperty):
3768         (DOMNode::putValue):
3769         * khtml/ecma/kjs_dom.h:
3770         (KJS::DOMNode::):
3771         * khtml/ecma/kjs_dom.lut.h:
3772         (KJS::):
3773         * khtml/ecma/kjs_window.cpp:
3774         (Window::get):
3775         (Window::put):
3776         * khtml/ecma/kjs_window.h:
3777         (KJS::Window::):
3778         * khtml/ecma/kjs_window.lut.h:
3779         (KJS::):
3780         * khtml/html/html_formimpl.cpp:
3781         (HTMLInputElementImpl::parseHTMLAttribute):
3782         * khtml/html/html_formimpl.h:
3783         (DOM::HTMLInputElementImpl::maxResults):
3784         * khtml/misc/htmlattrs.c:
3785         (hash_attr):
3786         (findAttr):
3787         * khtml/misc/htmlattrs.h:
3788         * khtml/misc/htmlattrs.in:
3789         * khtml/rendering/render_form.cpp:
3790         (RenderLineEdit::RenderLineEdit):
3791         (RenderLineEdit::slotPerformSearch):
3792         (RenderLineEdit::updateFromElement):
3793         * khtml/rendering/render_form.h:
3794         * khtml/xml/dom2_eventsimpl.cpp:
3795         (EventImpl::typeToId):
3796         (EventImpl::idToType):
3797         * khtml/xml/dom2_eventsimpl.h:
3798         (DOM::EventImpl::):
3799         * kwq/KWQLineEdit.h:
3800         (QLineEdit::performSearch):
3801         (QLineEdit::type):
3802         * kwq/KWQLineEdit.mm:
3803         (QLineEdit::QLineEdit):
3804         (QLineEdit::setLiveSearch):
3805         (QLineEdit::setAutoSaveName):
3806         (QLineEdit::setMaxResults):
3807         (QLineEdit::setPlaceholderString):
3808         * kwq/KWQSlot.mm:
3809         (KWQSlot::KWQSlot):
3810         (KWQSlot::call):
3811         * kwq/KWQTextField.mm:
3812         (-[KWQTextFieldController initWithTextField:QLineEdit:]):
3813         (-[KWQTextFieldController invalidate]):
3814         (-[KWQTextFieldController action:]):
3815         (-[KWQTextFieldController controlTextDidBeginEditing:]):
3816         (-[KWQTextFieldController controlTextDidEndEditing:]):
3817         (-[KWQTextFieldController controlTextDidChange:]):
3818         (-[KWQTextFieldController control:textShouldBeginEditing:]):
3819         (-[KWQTextFieldController control:textShouldEndEditing:]):
3820         (-[KWQTextFieldController control:didFailToFormatString:errorDescription:]):
3821         (-[KWQTextFieldController control:didFailToValidatePartialString:errorDescription:]):
3822         (-[KWQTextFieldController control:isValidObject:]):
3823         (-[KWQTextFieldController control:textView:doCommandBySelector:]):
3824         (-[KWQTextFieldController textChanged]):
3825
3826 2004-03-22  David Hyatt  <hyatt@apple.com>
3827
3828         Factoring of form control code to enable sharing between three types of text fields: normal, password, and
3829         the new search field.  Also made search field creatable using <input type="search">.  There are still many
3830         bugs with the field, but you can at least type in it and submit it with a form.
3831         
3832         Reviewed by darin
3833
3834         * khtml/html/html_formimpl.cpp:
3835         (HTMLInputElementImpl::setType):
3836         (HTMLInputElementImpl::type):
3837         (HTMLInputElementImpl::click):
3838         (HTMLInputElementImpl::accessKeyAction):
3839         (HTMLInputElementImpl::rendererIsNeeded):
3840         (HTMLInputElementImpl::createRenderer):
3841         (HTMLInputElementImpl::encoding):
3842         (HTMLInputElementImpl::defaultEventHandler):
3843         (HTMLInputElementImpl::isEditable):
3844         * khtml/html/html_formimpl.h:
3845         (DOM::HTMLInputElementImpl::):
3846         * khtml/rendering/render_form.cpp:
3847         (RenderLineEdit::RenderLineEdit):
3848         * kwq/KWQKLineEdit.h:
3849         (KLineEdit::KLineEdit):
3850         * kwq/KWQLineEdit.h:
3851         (QLineEdit::):
3852         * kwq/KWQLineEdit.mm:
3853         (QLineEdit::QLineEdit):
3854         (QLineEdit::~QLineEdit):
3855         (QLineEdit::setFont):
3856         (QLineEdit::setText):
3857         (QLineEdit::text):
3858         (QLineEdit::setMaxLength):
3859         (QLineEdit::isReadOnly):
3860         (QLineEdit::setReadOnly):
3861         (QLineEdit::maxLength):
3862         (QLineEdit::selectAll):
3863         (QLineEdit::edited):
3864         (QLineEdit::setEdited):
3865         (QLineEdit::sizeForCharacterWidth):
3866         (QLineEdit::baselinePosition):
3867         (QLineEdit::setAlignment):
3868         (QLineEdit::setWritingDirection):
3869         (KWQNSTextAlignmentForAlignmentFlags):
3870         (QLineEdit::setLiveSearch):
3871         * kwq/KWQTextField.h:
3872         * kwq/KWQTextField.mm:
3873         (-[KWQTextFieldController initWithTextField:QLineEdit:]):
3874         (-[KWQTextFieldController action:]):
3875         (-[KWQTextFieldController dealloc]):
3876         (-[KWQTextFieldController widget]):
3877         (-[KWQTextFieldController setMaximumLength:]):
3878         (-[KWQTextFieldController controlTextDidBeginEditing:]):
3879         (-[KWQTextFieldController controlTextDidEndEditing:]):
3880         (-[KWQTextFieldController controlTextDidChange:]):
3881         (-[KWQTextFieldController control:textShouldBeginEditing:]):
3882         (-[KWQTextFieldController control:textShouldEndEditing:]):
3883         (-[KWQTextFieldController control:didFailToFormatString:errorDescription:]):
3884         (-[KWQTextFieldController control:didFailToValidatePartialString:errorDescription:]):
3885         (-[KWQTextFieldController control:isValidObject:]):
3886         (-[KWQTextFieldController control:textView:doCommandBySelector:]):
3887         (-[KWQTextFieldController textChanged]):
3888         (-[KWQTextFieldController setInDrawingMachinery:]):
3889         (-[KWQTextFieldController textView:shouldDrawInsertionPointInRect:color:turnedOn:]):
3890         (-[KWQTextFieldController textView:shouldHandleEvent:]):
3891         (-[KWQTextFieldController textView:didHandleEvent:]):
3892         (-[KWQTextFieldController setBaseWritingDirection:]):
3893         (-[KWQTextFieldController baseWritingDirection]):
3894         (-[KWQTextFieldController selectedRange]):
3895         (-[KWQTextFieldController setSelectedRange:]):
3896         (-[KWQTextFieldController setHasFocus:]):
3897         (-[KWQTextFieldController updateTextAttributes:]):
3898         (+[KWQTextField cellClass]):
3899         (-[KWQTextField initWithQLineEdit:]):
3900         (-[KWQTextField dealloc]):
3901         (-[KWQTextField controller]):
3902         (-[KWQTextField widget]):
3903         (-[KWQTextField selectText:]):
3904         (-[KWQTextField setStringValue:]):
3905         (-[KWQTextField nextKeyView]):
3906         (-[KWQTextField previousKeyView]):
3907         (-[KWQTextField nextValidKeyView]):
3908         (-[KWQTextField previousValidKeyView]):
3909         (-[KWQTextField acceptsFirstResponder]):
3910         (-[KWQTextField display]):
3911         (-[KWQTextField displayRectIgnoringOpacity:]):
3912         (-[KWQTextField textView:shouldDrawInsertionPointInRect:color:turnedOn:]):
3913         (-[KWQTextField textView:shouldHandleEvent:]):
3914         (-[KWQTextField textView:didHandleEvent:]):
3915         (-[KWQTextFieldCell editWithFrame:inView:editor:delegate:event:]):
3916         (-[KWQTextFieldCell selectWithFrame:inView:editor:delegate:start:length:]):
3917         (-[KWQTextFieldCell _textAttributes]):
3918         (-[KWQSecureTextField initWithQLineEdit:]):
3919         (-[KWQSecureTextField dealloc]):
3920         (-[KWQSecureTextField controller]):
3921         (-[KWQSecureTextField widget]):
3922         (-[KWQSecureTextField setStringValue:]):
3923         (-[KWQSecureTextField nextKeyView]):
3924         (-[KWQSecureTextField previousKeyView]):
3925         (-[KWQSecureTextField acceptsFirstResponder]):
3926         (-[KWQSecureTextField display]):
3927         (-[KWQSecureTextField displayRectIgnoringOpacity:]):
3928         (-[KWQSecureTextField textView:shouldDrawInsertionPointInRect:color:turnedOn:]):
3929         (-[KWQSecureTextField textView:shouldHandleEvent:]):
3930         (-[KWQSecureTextField textView:didHandleEvent:]):
3931         (-[KWQSecureTextField selectText:]):
3932         (-[KWQSecureTextFieldCell editWithFrame:inView:editor:delegate:event:]):
3933         (-[KWQSecureTextFieldCell selectWithFrame:inView:editor:delegate:start:length:]):
3934         (-[KWQSecureTextFieldCell _textAttributes]):
3935         (+[KWQSearchField cellClass]):
3936         (-[KWQSearchField initWithQLineEdit:]):
3937         (-[KWQSearchField dealloc]):
3938         (-[KWQSearchField controller]):
3939         (-[KWQSearchField widget]):
3940         (-[KWQSearchField selectText:]):
3941         (-[KWQSearchField setStringValue:]):
3942         (-[KWQSearchField nextKeyView]):