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