Written by Darin, reviewed by me.
[WebKit-https.git] / WebCore / ChangeLog-2005-08-23
1 2005-02-16  John Sullivan  <sullivan@apple.com>
2
3         Written by Darin, reviewed by me.
4         
5         - WebCore part of fix for <rdar://problem/4007384> 
6         FILTER: Bookmark of RSS with Japanese search word & multiple RSS pages loses filter
7
8         * kwq/DOM.mm:
9         (-[DOMElement _getURLAttribute:]):
10         new SPI method, uses parseURL and completeURL to get valid URL from attribute value
11
12         * kwq/DOMPrivate.h:
13         declare new SPI method
14
15 2005-02-15  Maciej Stachowiak  <mjs@apple.com>
16
17         Reviewed by Darin.
18
19         <rdar://problem/3942428> reproducible crash loading cbs.sportsline.com
20         
21         This change reverts the fix for <rdar://problem/3805311>, and
22         re-fixes it in a different (better) way. Instead of preventing
23         programmatic open from setting the parsing flag, instead make sure
24         that programmatic close resets it.
25
26         * khtml/khtml_part.cpp:
27         (KHTMLPart::openURL):
28         (KHTMLPart::didExplicitOpen):
29         (KHTMLPart::closeURL):
30         (KHTMLPart::begin):
31         (KHTMLPart::end):
32         (KHTMLPart::endIfNotLoading):
33         (KHTMLPart::slotFinishedParsing):
34         (KHTMLPart::checkEmitLoadEvent):
35         * khtml/khtml_part.h:
36         * khtml/khtmlpart_p.h:
37         (KHTMLPartPrivate::KHTMLPartPrivate):
38         * khtml/xml/dom_docimpl.cpp:
39         (DocumentImpl::open):
40         (DocumentImpl::implicitOpen):
41         (DocumentImpl::close):
42         (DocumentImpl::implicitClose):
43         * khtml/xml/dom_docimpl.h:
44
45 2005-02-15  David Harrison  <harrison@apple.com>
46
47         Reviewed by Maciej.
48
49         <rdar://problem/3933665> smart delete seems to delete too much after expanding selection with arrow keys
50
51         Fixed by updating the selection granularity.  Only byWord granularity enables smart delete, but in this
52         case the granularity changed from byWord to byCharacter.
53
54         * khtml/khtml_part.cpp:
55         (KHTMLPart::setSelectionGranularity):
56         * khtml/khtml_part.h:
57         * kwq/WebCoreBridge.mm:
58         (-[WebCoreBridge rangeByExpandingSelectionWithGranularity:]):
59         (-[WebCoreBridge rangeByAlteringCurrentSelection:direction:granularity:]):
60         (-[WebCoreBridge alterCurrentSelection:direction:granularity:]):
61
62 2005-02-15  David Harrison  <harrison@apple.com>
63
64         Reviewed by Darin.
65
66         (continued) <rdar://problem/4004305> REGRESSION (Mail): Command-right-arrow on wrapped text goes to end of previous line
67
68         This was supposed have been committed yesterday with the other part of the fix, but was not.
69         
70         * khtml/editing/visible_units.cpp:
71         (khtml::endOfWord):
72
73 2005-02-15  Ken Kocienda  <kocienda@apple.com>
74
75         Reviewed by John
76         
77         Fix for this bug:
78         
79         <rdar://problem/3951178> REGRESSION (Mail): blank line lost after pasting as quotation
80         
81         Problem was that the blank line after the selection was getting deleted incorrectly since the
82         paste code thought this was an unneeded placeholder rather than a placeholder outside of the
83         selection.
84
85         * khtml/editing/htmlediting.cpp:
86         (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Now calls findBlockPlaceholder.
87         (khtml::CompositeEditCommand::findBlockPlaceholder): Moved finding code formerly in 
88         removeBlockPlaceholderIfNeeded to this new helper.
89         (khtml::ReplaceSelectionCommand::doApply): Do not delete placeholder up front. Call 
90         findBlockPlaceholder, and delete it later if needed in the already-existing cleanup step.
91         * khtml/editing/htmlediting.h: Add new function.
92
93         New layout test.
94
95         * layout-tests/editing/pasteboard/paste-text-017-expected.txt: Added.
96         * layout-tests/editing/pasteboard/paste-text-017.html: Added.
97
98         Result changed for the better.
99
100         * layout-tests/editing/pasteboard/paste-text-011-expected.txt
101
102 2005-02-14  David Harrison  <harrison@apple.com>
103
104         Reviewed by Darin.
105
106         <rdar://problem/4004305> REGRESSION (Mail): Command-right-arrow on wrapped text goes to end of previous line
107
108         Reviewed by Darin.
109
110         <rdar://problem/4004305> REGRESSION (Mail): Command-right-arrow on wrapped text goes to end of previous line
111
112         * khtml/editing/visible_text.cpp:
113         (khtml::SimplifiedBackwardsTextIterator::advance):
114         Add BR in for <rdar://problem/3917929> fix only if leaving a visible text node.
115         
116         * khtml/editing/visible_units.cpp:
117         (khtml::endOfWord):
118         Do not move left over a paragraph boundary.
119
120 2005-02-14  Darin Adler  <darin@apple.com>
121
122         Reviewed by John.
123
124         - fixed <rdar://problem/3686434> Safari uses too much RAM on file upload, leading to malloc errors and crashes (HP printers)
125
126         * khtml/html/html_formimpl.cpp:
127         (DOM::FormDataList::begin): Updated to use a list of FormDataListItem instead of QCString.
128         (DOM::FormDataList::end): Ditto.
129         (DOM::HTMLFormElementImpl::formData): Same here, and also use appendFile rather than appendData
130         when we encounter a path name rather than data.
131         (DOM::HTMLInputElementImpl::appendFormData): Use appendFile here rather than reading the file
132         in; the reading now happens inside WebKit.
133         (DOM::FormDataList::appendString): Updated for FormDataListItem.
134         (DOM::FormDataList::appendFile): Added.
135
136         * ForwardingHeaders/kfileitem.h: Emptied out the file; no longer includes KWQKFileItem.h.
137         * ForwardingHeaders/netaccess.h: Emptied out the file; no longer includes KWQKIONetAccess.h.
138         * kwq/KWQKFileItem.h: Removed.
139         * kwq/KWQKFileItem.mm: Removed.
140         * kwq/KWQKIONetAccess.h: Removed.
141         * kwq/KWQKIONetAccess.mm: Removed.
142         * WebCore.pbproj/project.pbxproj: Removed the 4 files above.
143
144         - small unrelated fix (not reviewed by John)
145
146         * khtml/ecma/kjs_window.cpp: (Window::isSafeScript): Put some logging code outside if statements so it works all the time.
147
148 2005-02-14  David Harrison  <harrison@apple.com>
149
150         Reviewed by Darin.
151
152         <rdar://problem/4004305> REGRESSION (Mail): Command-right-arrow on wrapped text goes to end of previous line
153
154         Fixed nextLinePosition to calculate affinity rather than take it as a parameter.  Propagated the parameter change out to related methods.
155
156         * khtml/editing/htmlediting.cpp:
157         (khtml::DeleteSelectionCommand::initializePositionData):
158         (khtml::InsertLineBreakCommand::doApply):
159         (khtml::InsertParagraphSeparatorCommand::doApply):
160         (khtml::InsertTextCommand::input):
161         (khtml::ReplaceSelectionCommand::doApply):
162         (khtml::ReplaceSelectionCommand::applyStyleToInsertedNodes):
163         * khtml/editing/selection.cpp:
164         (khtml::Selection::modifyExtendingRightForward):
165         (khtml::Selection::modifyMovingRightForward):
166         (khtml::Selection::modifyExtendingLeftBackward):
167         (khtml::Selection::modifyMovingLeftBackward):
168         (khtml::Selection::modify):
169         (khtml::Selection::validate):
170         * khtml/editing/visible_position.cpp:
171         (khtml::visiblePositionsOnDifferentLines):
172         * khtml/editing/visible_units.cpp:
173         (khtml::rootBoxForLine):
174         (khtml::startOfLine):
175         (khtml::endOfLine):
176         (khtml::inSameLine):
177         (khtml::isStartOfLine):
178         (khtml::isEndOfLine):
179         (khtml::previousLinePosition):
180         (khtml::nextLinePosition):
181         (khtml::previousSentencePosition):
182         (khtml::nextSentencePosition):
183         (khtml::previousParagraphPosition):
184         (khtml::nextParagraphPosition):
185         * khtml/editing/visible_units.h:
186         * khtml/khtml_events.cpp:
187         (khtml::MouseEvent::offset):
188         * khtml/khtml_part.cpp:
189         (KHTMLPart::isPointInsideSelection):
190         (KHTMLPart::selectClosestWordFromMouseEvent):
191         (KHTMLPart::handleMousePressEventTripleClick):
192         (KHTMLPart::handleMousePressEventSingleClick):
193         (KHTMLPart::handleMouseMoveEventSelection):
194         (KHTMLPart::khtmlMouseReleaseEvent):
195         * khtml/rendering/render_block.cpp:
196         (khtml::RenderBlock::positionForCoordinates):
197         * khtml/rendering/render_block.h:
198         * khtml/rendering/render_br.cpp:
199         (RenderBR::positionForCoordinates):
200         * khtml/rendering/render_br.h:
201         * khtml/rendering/render_container.cpp:
202         (RenderContainer::positionForCoordinates):
203         * khtml/rendering/render_container.h:
204         * khtml/rendering/render_inline.cpp:
205         (RenderInline::positionForCoordinates):
206         * khtml/rendering/render_inline.h:
207         * khtml/rendering/render_object.cpp:
208         (RenderObject::caretRect):
209         (RenderObject::positionForCoordinates):
210         * khtml/rendering/render_object.h:
211         * khtml/rendering/render_replaced.cpp:
212         (RenderReplaced::positionForCoordinates):
213         * khtml/rendering/render_replaced.h:
214         * khtml/rendering/render_text.cpp:
215         (RenderText::positionForCoordinates):
216         * khtml/rendering/render_text.h:
217         * khtml/xml/dom_position.cpp:
218         (DOM::Position::previousCharacterPosition):
219         (DOM::Position::nextCharacterPosition):
220         (DOM::Position::leadingWhitespacePosition):
221         (DOM::Position::trailingWhitespacePosition):
222         * khtml/xml/dom_position.h:
223         * kwq/KWQAccObject.mm:
224         (-[KWQAccObject value]):
225         (-[KWQAccObject accessibilityAttributeValue:]):
226         (-[KWQAccObject doAXLineForTextMarker:]):
227         (-[KWQAccObject doAXTextMarkerRangeForLine:]):
228         (-[KWQAccObject doAXTextMarkerForPosition:]):
229         (-[KWQAccObject doAXLeftLineTextMarkerRangeForTextMarker:]):
230         (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
231         (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
232         (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
233         * kwq/KWQKHTMLPart.mm:
234         * kwq/WebCoreBridge.mm:
235         (-[WebCoreBridge _visiblePositionForPoint:]):
236
237 05-02-07  Maciej Stachowiak  <mjs@apple.com>
238
239         Reviewed by Ken and John.
240
241         Re-fixed a specific case of the following:
242
243         <rdar://problem/3790449> REGRESSION (Mail): underline behavior is flaky because of how CSS handles text-decoration
244
245         Oddly, Cmd-B, Cmd-U, type some text, return, Cmd-U, Cmd-B, type
246         some text, worked fine. But hitting the second Cmd-B before the
247         second Cmd-U still failed to remove underlining. The reason for
248         this is that our code to compute the style of the current position
249         did not work when you had a typing style and were positioned right
250         at a <br> element. For various reasons, this did not show up for
251         bold and italic, since those are handled through the font manager.
252
253         The following change fixes this - for elements that can't have
254         children, we add the dummy span after the element of interest,
255         rather than as a child of it.
256         
257         * khtml/khtml_part.cpp:
258         (KHTMLPart::selectionComputedStyle): 
259
260 2005-02-11  David Harrison  <harrison@apple.com>
261
262         Reviewed by Darin.
263
264         <rdar://problem/3978980> Double Clicking on a line in Mail selected the entire body
265
266         * khtml/editing/visible_units.cpp:
267         (khtml::startOfWord):
268         (khtml::endOfWord):
269         Pay attention to being at the end of a paragraph.
270         
271         (khtml::previousLinePosition):
272         (khtml::nextLinePosition):
273         (khtml::endOfParagraph):
274         Use DOWNSTREAM per recent affinity changes.
275
276 2005-02-11  Richard Williamson   <rjw@apple.com>
277
278         Fixed <rdar://problem/3985118> DOM objects not being marshaled on JS->native calls
279
280         Re-factored how 'native' wrappers for JS objects are created.  The interpreter now
281         creates these wrappers.  The WebCore subclass of the interpreter now overrides
282         createLanguageInstanceForValue() and creates a DOM ObjC wrapper for DOM objects.
283
284         * WebCore.pbproj/project.pbxproj:
285         * khtml/ecma/kjs_binding.cpp:
286         (ScriptInterpreter::createLanguageInstanceForValue):
287         * khtml/ecma/kjs_binding.h:
288         * kwq/DOMUtility.mm: Added.
289         (KJS::ScriptInterpreter::createObjcInstanceForValue):
290         * kwq/KWQKHTMLPart.mm:
291         (KWQKHTMLPart::getAppletInstanceForView):
292         (getInstanceForView):
293         (KWQKHTMLPart::getEmbedInstanceForView):
294         (KWQKHTMLPart::getObjectInstanceForView):
295
296 2005-02-11  Chris Blumenberg  <cblu@apple.com>
297
298         Fixed: <rdar://problem/3937352> Quote level not maintained when copied and pasted within a Mail message
299
300         Reviewed by harrison.
301
302         * khtml/editing/markup.cpp:
303         (khtml::isMailBlockquote): new 
304         (khtml::createMarkup): retain the Mail quote level by including all ancestor mail block quotes
305         * khtml/rendering/render_block.cpp:
306         (khtml::RenderBlock::positionForCoordinates): default to downstream for the affinity since the affinity is only upstream when the cursor is clicked to the right of a wrapped line
307         * khtml/rendering/render_text.cpp:
308         (RenderText::positionForCoordinates): ditto
309
310 2005-02-11  Adele Amchan  <adele@apple.com>
311
312         Reviewed by Darin.
313
314         fix for <rdar://problem/4004004> no need to add body element for xml documents
315
316         In the fix for <rdar://problem/3758785> we decided to add a body element when closing a document 
317         to ensure that the onload handler would fire.  This is unnecessary for xml documents, 
318         so now we also check to see if we're dealing with an html document before adding the body element.
319
320         * khtml/xml/dom_docimpl.cpp: (DocumentImpl::close): 
321
322 2005-02-11  Adele Amchan  <adele@apple.com>
323
324         Reviewed by Darin.
325
326         * layout-tests/apple-only/base/www.excite.com/index-expected.txt: updates tests because of custom tag change.
327         * layout-tests/apple-only/base/www.msnbc.com/index-expected.txt:
328         * layout-tests/apple-only/base/www.time.com/index-expected.txt:
329         * layout-tests/apple-only/base/www.travelocity.com/index-expected.txt:
330         * layout-tests/apple-only/base/www.zdnet.com/index-expected.txt:
331         * layout-tests/fast/overflow/003-expected.txt:
332
333         * layout-tests/fast/js/window-object-cross-frame-calls-expected.txt: updated test because of added Body (see rdar://problem/3758785)
334
335 === Safari-186 ===
336
337 2005-02-11  Darin Adler  <darin@apple.com>
338
339         Reviewed by John.
340
341         - fixed <rdar://problem/3915449> paths are relative to the old src URL after document.open, which is supposed to clear the document, including the URL
342
343         * khtml/xml/dom_docimpl.h: Added a new openInternal function for use by KHTMLPart.
344         * khtml/xml/dom_docimpl.cpp:
345         (DocumentImpl::open): Changed to do everything we did before, but also clear the URL and set the
346         base URL based on the enclosing document. This is the basic JavaScript/DOM operation of opening a
347         document, which is supposed to clear the document, including the URL. In the long run we might want
348         to do even more document "resetting and clearing" in here, but this URL clearing is what's needed
349         now to fix the most important problem.
350         (DocumentImpl::openInternal): Moved the old open code in here, except for the "parsing" check, which
351         is unnecessary and inappropriate in the one place we call this.
352
353         * khtml/khtml_part.cpp: (KHTMLPart::begin): Call openInternal instead of open.
354
355 2005-02-10  Ken Kocienda  <kocienda@apple.com>
356
357         Reviewed by Hyatt
358
359         Fix for this bug:
360         
361         <rdar://problem/3992092> 8A374: Mail crash while pasting - RemoveNodeCommand
362
363         * khtml/editing/htmlediting.cpp:
364         (khtml::ReplaceSelectionCommand::doApply): Code tried to remove a node that was no longer in 
365         the document. We try to do a good job of detecting all these cases, and generally do. This
366         one was missed. Fixed.
367
368 2005-02-10  Darin Adler  <darin@apple.com>
369
370         Reviewed by Harrison.
371
372         - added support needed to fix <rdar://problem/3991225> Format->Style->Underline menu item does not get checked when selected text is underlined
373
374         * kwq/WebCoreBridge.h: Added selectionHasStyle: method.
375         * kwq/WebCoreBridge.mm: (-[WebCoreBridge selectionHasStyle:]): Added. Calls selectionHasStyle on the part.
376
377 2005-02-10  Darin Adler  <darin@apple.com>
378
379         Reviewed by Harrison.
380
381         - fixed <rdar://problem/3990484> cursor changes to I-beam when moving over text in widgets, even when selection off via CSS
382
383         * khtml/khtmlview.cpp: (KHTMLView::viewportMouseMoveEvent): Changed code to check canSelect when deciding
384         whether to show an I-beam cursor.
385
386         * khtml/rendering/render_object.h: Added canSelect.
387         * khtml/rendering/render_object.cpp:
388         (selectStartNode): Added. Helper function with the guts of shouldSelect.
389         (RenderObject::canSelect): Added. Like shouldSelect, but does not call the "start selecting" event handler.
390         (RenderObject::shouldSelect): Refactored to use selectStartNode.
391
392         * khtml/css/cssvalues.c: Regnerated with newer gperf.
393
394 2005-02-10  David Hyatt  <hyatt@apple.com>
395
396         Fix for 3867759, .mac regression where scrollers don't show up.  Make sure you can set the .width and
397         .height properties on the Image object.
398         
399         Reviewed by John Sullivan
400
401         * khtml/ecma/kjs_html.cpp:
402         (ImageConstructorImp::construct):
403         (Image::getValueProperty):
404         (Image::putValue):
405         (Image::Image):
406         * khtml/ecma/kjs_html.h:
407
408 2005-02-10  Ken Kocienda  <kocienda@apple.com>
409
410         Reviewed by Chris
411
412         Fix for this bug:
413         
414         <rdar://problem/3965158> Drag-n-drop within a rich text message sometimes changes the color of the dragged text
415         
416         This change fixes the bug....and much more. Now, for the first time, the paste code can do "smart merging"
417         or "smooshing" of styles during its operation. Since this new code is actively, rather than passively
418         working with styles, it fixes the bug, and lays the groundwork for similar work we need to do to
419         preserve quote levels in Mail.
420
421         * khtml/css/css_valueimpl.cpp:
422         (DOM::CSSMutableStyleDeclarationImpl::clear): New method.
423         (DOM::CSSMutableStyleDeclarationImpl::removeBlockProperties): Ditto.
424         (DOM::CSSMutableStyleDeclarationImpl::removePropertiesInSet): Ditto.
425         (DOM::operator==): Add operator for CSSProperty.
426         * khtml/css/css_valueimpl.h: Declare new functions.
427         * khtml/editing/htmlediting.cpp:
428         (khtml::isEmptyStyleSpan): Improved the test in this function, rolling together the old implementation
429         with some code that did this work inline elsewhere. Sum of the parts is better than either test was by itself.
430         (khtml::isStyleSpan): Check for ID_SPAN.
431         (khtml::ApplyStyleCommand::removeCSSStyle): Call isEmptyStyleSpan. This was the place with an inline implementation before.
432         (khtml::ReplacementFragment::ReplacementFragment): Now takes a DocumentImpl argument. No longer does a "default style"
433         check, but rather calls functions which do a similar check to that, and much more.
434         (khtml::ReplacementFragment::~ReplacementFragment): Deref document, and computed styles.
435         (khtml::ReplacementFragment::styleForNode): New helper. Looks up and returns computed style for a node.
436         (khtml::ReplacementFragment::removeNodePreservingChildren): New helper.
437         (khtml::ReplacementFragment::computeStylesForNodes): New function which computes the "desired" style for
438         every node in the fragment. This information is used later after paste is done as a reference for testing
439         what styles need to be added, and which can be removed as redundant, from all the nodes inserted by the
440         replacement code.
441         (khtml::ReplacementFragment::removeStyleNodes): Clears out all style nodes from the fragment. They are
442         no longer needed after the call to computeStylesForNodes(),
443         (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): Add a document to the call to initialize the
444         command's ReplacementFragment.
445         (khtml::ReplaceSelectionCommand::doApply): Call applyStyleToInsertedNodes() after inserting nodes to make
446         styles come out right.
447         (khtml::ReplaceSelectionCommand::applyStyleToInsertedNodes): This is the "style smooshing" function. It 
448         computes the styles that need to be added to each node inserted, comparing the style it gets from just
449         being inserted into its correct destination with the computed "desired style" done in the 
450         ReplacementFragment constructor. It then adds in all the necessary styles, and will also remove redundant styles.
451         * khtml/editing/htmlediting.h: Update declarations and member variables as needed.
452         * khtml/editing/markup.cpp:
453         (khtml::startMarkup): Add additional style annotations to the markup we generate, so that paste code can preserve it.
454         (khtml::markup): Ditto.
455         (khtml::createMarkup): Ditto.
456         
457         These test results are subtly better with this change. They no longer have an unneeded empty span.
458         Visually the same as before.
459         
460         * layout-tests/editing/style/remove-underline-across-paragraph-expected.txt
461         * layout-tests/editing/style/remove-underline-across-paragraph-in-bold-expected.txt
462         * layout-tests/editing/style/remove-underline-expected.txt
463         * layout-tests/editing/style/remove-underline-from-stylesheet-expected.txt
464
465         New tests:
466
467         * layout-tests/editing/style/smoosh-styles-001-expected.txt
468         * layout-tests/editing/style/smoosh-styles-002-expected.txt
469         * layout-tests/editing/style/smoosh-styles-001.html
470         * layout-tests/editing/style/smoosh-styles-002.html
471
472 2005-02-10  Darin Adler  <darin@apple.com>
473
474         Reviewed by Adele.
475
476         - fixed <rdar://problem/3974988> WebHTMLView drops scroll wheel events when deltas are 0
477
478         * kwq/WebCoreScrollView.m: (-[WebCoreScrollView autoforwardsScrollWheelEvents]): Added, for Tiger only.
479         For Tiger, removed the override of scrollWheel:, which doesn't work quite right because of how the
480         delta attributes return all 0 for newfangled scrolling events from the new trackpads.
481
482 2005-02-10  David Harrison  <harrison@apple.com>
483
484         Reviewed by Darin.
485
486         <rdar://problem/3991532> REGRESSION (Mail): Triple-click on trailing blank line should select previous line but doesn't
487
488         * khtml/css/cssvalues.c:
489         (hash_val):
490         (findValue):
491         * khtml/editing/selection.cpp:
492         (khtml::Selection::validate):
493         Do moral equiavalent of LeftWordIfOnBoundary for PARAGRAPH.
494
495 2005-02-10  David Harrison  <harrison@apple.com>
496
497         Reviewed by Darin.
498
499         <rdar://problem/3991848> Double-click on first character selects wrong item
500
501         * khtml/editing/selection.cpp:
502         (khtml::Selection::validate):
503         Honor the fact that clicking on a character positions the cursor on the left side of the character.
504
505 2005-02-10  David Hyatt  <hyatt@apple.com>
506
507         Fix for 3980778, repro crash in RootInlineBox::paint.  Make sure that when merging blocks we dirty them for layout
508         up front. That way as we do the merge, we dont attempt to examine the lines in dirtyLinesForChangedChild.
509         
510         Reviewed by mjs
511
512         * khtml/rendering/render_block.cpp:
513         (khtml::RenderBlock::removeChild):
514
515 2005-02-10  David Hyatt  <hyatt@apple.com>
516
517         Fix for 3987010, fix a bug that caused the self-collapsing-block-cleared-float bit to never get set correctly.
518         
519         Reviewed by mjs
520
521         * khtml/rendering/render_block.h:
522         (khtml::RenderBlock::MarginInfo::setSelfCollapsingBlockClearedFloat):
523
524 2005-02-10  David Hyatt  <hyatt@apple.com>
525
526         Fix  for 3992440, text not wrapping correctly on half moon bay web site.  Refine an incorrect optimization I
527         added to be less restrictive.
528         
529         Reviewed by mjs
530
531         * khtml/rendering/render_block.cpp:
532         (khtml::RenderBlock::layoutBlockChildren):
533
534 2005-02-08  Maciej Stachowiak  <mjs@apple.com>
535
536         Reviewed by Darin.
537
538         <rdar://problem/3977973> pages on ebay leak referenced JavaScript objects -- over time browsing becomes super-slow
539
540         I fixed this by removing all event listeners for a document, it's
541         children, and any disconnected nodes that used to be in the
542         document at document detach time. Mozilla temporarily disables
543         event listeners on such nodes, but re-enables them if you
544         re-parant a node into a new document. However, in WebCore, you
545         can't re-parent a node into another document, so there is no
546         observable change in behavior.
547
548         We have to do this to break the possible reference cycles between
549         event listeners and the dom nodes they are attached to (e.g. via
550         scope chain, as in this case).
551
552         * khtml/xml/dom_docimpl.cpp:
553         (DocumentImpl::detach):
554         (DocumentImpl::removeAllEventListenersFromAllNodesx):
555         (DocumentImpl::registerDisconnectedNodeWithEventListeners):
556         (DocumentImpl::unregisterDisconnectedNodeWithEventListeners):
557         (DocumentImpl::removeAllDisconnectedNodeEventListeners):
558         * khtml/xml/dom_docimpl.h:
559         * khtml/xml/dom_nodeimpl.cpp:
560         (NodeImpl::~NodeImpl):
561         (NodeImpl::addEventListener):
562         (NodeImpl::removeEventListener):
563         (NodeImpl::removeAllEventListeners):
564         (NodeImpl::removeHTMLEventListener):
565         (NodeImpl::insertedIntoDocument):
566         (NodeImpl::removedFromDocument):
567         * khtml/xml/dom_nodeimpl.h:
568
569 2005-02-09  Chris Blumenberg  <cblu@apple.com>
570
571         Fixed: <rdar://problem/3999213> Sometimes 2 Windows Media Player plugin instances are loaded
572
573         Reviewed by hyatt.
574
575         * khtml/html/html_objectimpl.cpp:
576         (HTMLObjectElementImpl::attach): Set needWidgetUpdate to false before calling updateWidget because updateWidget may cause this method or another method (which also calls updateWidget) to be called.
577         (HTMLObjectElementImpl::recalcStyle): ditto
578
579 2005-02-09  David Harrison  <harrison@apple.com>
580
581         Reviewed by Darin.
582         
583         <rdar://problem/3937447> Mail-689: Arrow key navigation in new message body stops working when a line ends with a bold word
584         
585         Added affinity to VisiblePosition.  Changed Selection code to use affinity more.
586         
587         (Partial) <rdar://problem/3982096> editing/pasteboard/paste-text-007 is failing
588         
589         Changed ReplaceSelectionCommand to also pay attention to the top children of the incoming fragment, not just the very last node inserted, when deciding whether to insert a paragraph for the Apple interchange newline.
590
591         * khtml/ecma/kjs_window.cpp:
592         (SelectionFunc::tryCall):
593         * khtml/editing/htmlediting.cpp:
594         (khtml::EditCommandPtr::setStartingSelection):
595         (khtml::EditCommandPtr::setEndingSelection):
596         (khtml::EditCommand::setStartingSelection):
597         (khtml::EditCommand::setEndingSelection):
598         (khtml::CompositeEditCommand::deleteInsignificantTextDownstream):
599         (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
600         (khtml::ApplyStyleCommand::splitTextAtStartIfNeeded):
601         (khtml::ApplyStyleCommand::splitTextAtEndIfNeeded):
602         (khtml::ApplyStyleCommand::splitTextElementAtStartIfNeeded):
603         (khtml::ApplyStyleCommand::splitTextElementAtEndIfNeeded):
604         (khtml::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
605         (khtml::ApplyStyleCommand::mergeEndWithNextIfIdentical):
606         (khtml::ApplyStyleCommand::joinChildTextNodes):
607         (khtml::DeleteSelectionCommand::initializePositionData):
608         (khtml::DeleteSelectionCommand::handleGeneralDelete):
609         (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
610         (khtml::DeleteSelectionCommand::doApply):
611         (khtml::InsertLineBreakCommand::doApply):
612         (khtml::InsertParagraphSeparatorCommand::doApply):
613         (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply):
614         (khtml::InsertTextCommand::input):
615         (khtml::MoveSelectionCommand::doApply):
616         (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand):
617         (khtml::ReplaceSelectionCommand::~ReplaceSelectionCommand):
618         (khtml::ReplaceSelectionCommand::doApply):
619         (khtml::ReplaceSelectionCommand::completeHTMLReplacement):
620         (khtml::ReplaceSelectionCommand::updateNodesInserted):
621         (khtml::TypingCommand::deleteKeyPressed):
622         (khtml::TypingCommand::forwardDeleteKeyPressed):
623         (khtml::TypingCommand::markMisspellingsAfterTyping):
624         * khtml/editing/htmlediting.h:
625         * khtml/editing/selection.cpp:
626         (khtml::Selection::Selection):
627         (khtml::Selection::init):
628         (khtml::Selection::moveTo):
629         (khtml::Selection::modifyExtendingRightForward):
630         (khtml::Selection::modifyMovingRightForward):
631         (khtml::Selection::modifyExtendingLeftBackward):
632         (khtml::Selection::modifyMovingLeftBackward):
633         (khtml::Selection::modify):
634         (khtml::Selection::xPosForVerticalArrowNavigation):
635         (khtml::Selection::clear):
636         (khtml::Selection::setBase):
637         (khtml::Selection::setExtent):
638         (khtml::Selection::setBaseAndExtent):
639         (khtml::Selection::layout):
640         (khtml::Selection::validate):
641         * khtml/editing/selection.h:
642         (khtml::Selection::startAffinity):
643         (khtml::Selection::endAffinity):
644         (khtml::Selection::baseAffinity):
645         (khtml::Selection::extentAffinity):
646         (khtml::operator==):
647         * khtml/editing/text_affinity.h:
648         (khtml::):
649         * khtml/editing/visible_position.cpp:
650         (khtml::VisiblePosition::VisiblePosition):
651         (khtml::VisiblePosition::init):
652         (khtml::VisiblePosition::initUpstream):
653         (khtml::VisiblePosition::initDownstream):
654         (khtml::VisiblePosition::next):
655         (khtml::VisiblePosition::previous):
656         (khtml::startVisiblePosition):
657         (khtml::endVisiblePosition):
658         * khtml/editing/visible_position.h:
659         (khtml::VisiblePosition::):
660         (khtml::VisiblePosition::VisiblePosition):
661         (khtml::VisiblePosition::affinity):
662         (khtml::VisiblePosition::setAffinity):
663         (khtml::operator==):
664         * khtml/editing/visible_units.cpp:
665         (khtml::previousBoundary):
666         (khtml::nextBoundary):
667         (khtml::startOfLine):
668         (khtml::endOfLine):
669         (khtml::previousLinePosition):
670         (khtml::nextLinePosition):
671         (khtml::startOfParagraph):
672         (khtml::endOfParagraph):
673         (khtml::previousParagraphPosition):
674         (khtml::nextParagraphPosition):
675         (khtml::startOfBlock):
676         (khtml::endOfBlock):
677         (khtml::startOfDocument):
678         (khtml::endOfDocument):
679         * khtml/editing/visible_units.h:
680         * khtml/khtml_part.cpp:
681         (KHTMLPart::findTextNext):
682         (KHTMLPart::selectClosestWordFromMouseEvent):
683         (KHTMLPart::handleMousePressEventTripleClick):
684         (KHTMLPart::handleMousePressEventSingleClick):
685         (KHTMLPart::handleMouseMoveEventSelection):
686         (KHTMLPart::khtmlMouseReleaseEvent):
687         (KHTMLPart::selectAll):
688         (KHTMLPart::computeAndSetTypingStyle):
689         (KHTMLPart::selectionComputedStyle):
690         * khtml/rendering/render_br.cpp:
691         (RenderBR::positionForCoordinates):
692         * khtml/xml/dom_docimpl.cpp:
693         (DocumentImpl::updateSelection):
694         * khtml/xml/dom_nodeimpl.cpp:
695         (NodeBaseImpl::setFocus):
696         * khtml/xml/dom_position.cpp:
697         (DOM::Position::previousCharacterPosition):
698         (DOM::Position::nextCharacterPosition):
699         * khtml/xml/dom_position.h:
700         * kwq/KWQAccObject.mm:
701         (-[KWQAccObject value]):
702         (-[KWQAccObject visiblePositionForStartOfTextMarkerRange:]):
703         (-[KWQAccObject visiblePositionForEndOfTextMarkerRange:]):
704         (-[KWQAccObject accessibilityAttributeValue:]):
705         (-[KWQAccObject doAXLineForTextMarker:]):
706         (-[KWQAccObject doAXTextMarkerRangeForLine:]):
707         (-[KWQAccObject doAXTextMarkerForPosition:]):
708         (-[KWQAccObject doAXLeftLineTextMarkerRangeForTextMarker:]):
709         (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
710         (-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]):
711         (-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]):
712         (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
713         (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
714         (-[KWQAccObject doSetAXSelectedTextMarkerRange:]):
715         * kwq/KWQAccObjectCache.mm:
716         (KWQAccObjectCache::textMarkerForVisiblePosition):
717         (KWQAccObjectCache::visiblePositionForTextMarker):
718         * kwq/KWQKHTMLPart.mm:
719         (KWQKHTMLPart::findString):
720         (KWQKHTMLPart::advanceToNextMisspelling):
721         (KWQKHTMLPart::styleForSelectionStart):
722         (KWQKHTMLPart::baseWritingDirectionForSelectionStart):
723         (KWQKHTMLPart::setSelectionFromNone):
724         (KWQKHTMLPart::respondToChangedSelection):
725         * kwq/WebCoreBridge.mm:
726         (-[WebCoreBridge setSelectedDOMRange:affinity:]):
727         (-[WebCoreBridge selectionAffinity]):
728         (-[WebCoreBridge setMarkDOMRange:]):
729         (-[WebCoreBridge _visiblePositionForPoint:]):
730         (-[WebCoreBridge moveDragCaretToPoint:]):
731         (-[WebCoreBridge editableDOMRangeForPoint:]):
732         (-[WebCoreBridge ensureSelectionVisible]):
733         (-[WebCoreBridge rangeOfCharactersAroundCaret]):
734
735 2005-02-09  Chris Blumenberg  <cblu@apple.com>
736
737         Fixed: <rdar://problem/3985211> Seed: Mail: Drag-and-drop destination indicator / insertion point disappears
738
739         Reviewed by kocienda.
740
741         * khtml/rendering/render_block.cpp:
742         (khtml::RenderBlock::paintCaret): new
743         (khtml::RenderBlock::paintObject): call paintCaret for the cursor caret and the drag caret
744         * khtml/rendering/render_block.h:
745
746 === Safari-185 ===
747
748 2005-02-08  Ken Kocienda  <kocienda@apple.com>
749
750         Reviewed by John
751
752         Fix for this bug:
753         
754         <rdar://problem/3996344> Entire document content is deleted when only the first paragraph was supposed to be
755
756         Problem stems from my attempt to fix this bug: <rdar://problem/3986155> Insertion point goes 
757         to beginning of doc after deleting.
758         
759         I added an "optimization" that proved to do more harm than good. So, basically, the fix is to remove code.
760
761         * khtml/editing/htmlediting.cpp:
762         (khtml::DeleteSelectionCommand::handleGeneralDelete)
763
764 2005-02-07  Darin Adler  <darin@apple.com>
765
766         Reviewed by Kevin.
767
768         - fixed <rdar://problem/3890352> REGRESSION (125-170, Panther-only): pasted textarea contents disappear (exception in NSText)
769
770         * kwq/KWQTextArea.mm: (-[KWQTextArea tile]): Don't resize the text view immediately here.
771         Use performWithDelay to defer it to avoid the re-entrancy that bothers the Panther version
772         of NSTextView. On Tiger, leave the code alone.
773
774 2005-02-07  Adele Amchan  <adele@apple.com>
775
776         Reviewed by Darin.
777
778         Fix for <rdar://problem/3993628> REGRESSION (180-181): Logitelnet bank's website doesn't work
779
780         This fixes an oversight in the fix for <rdar://problem/3964286>.  
781         We're now making sure there is a document before calling checkCompleted in slotLoaderRequestDone.
782         That function is called even when other parts finish loads of their subresources, so we could end
783         up calling checkCompleted before we had a document. We also looked over all the other calls to
784         checkCompleted to convince ourselves no other call sites had a similar issue.
785
786         * khtml/khtml_part.cpp: (KHTMLPart::slotLoaderRequestDone): Check if doc is nil before calling
787         checkCompleted.
788
789 2005-02-07  Ken Kocienda  <kocienda@apple.com>
790
791         Reviewed by Darin
792
793         Fix for this bug:
794         
795         <rdar://problem/3953302> Replacing quoted text ends up with blue-colored text that is not quoted
796
797         * khtml/editing/htmlediting.cpp:
798         (khtml::DeleteSelectionCommand::doApply): Removed special case delete code for select all. It was
799         causing as many bugs as it fixed. What's more, the design concept is a bit shaky. By removing
800         this special case, the bug goes away.
801         * khtml/editing/htmlediting.h: Remove declaration.
802         
803         Test results using selectAll() updated to reflect changed behavior.
804         
805         * layout-tests/editing/deleting/delete-3775172-fix-expected.txt:
806         * layout-tests/editing/deleting/delete-select-all-001-expected.txt:
807         * layout-tests/editing/deleting/delete-select-all-003-expected.txt:
808         * layout-tests/editing/inserting/insert-3654864-fix-expected.txt:
809         * layout-tests/editing/inserting/insert-3775316-fix-expected.txt:
810         * layout-tests/editing/inserting/insert-3851164-fix-expected.txt:
811         * layout-tests/editing/inserting/insert-3907422-fix-expected.txt:
812         * layout-tests/editing/pasteboard/paste-text-015-expected.txt:
813
814 2005-02-06  Darin Adler  <darin@apple.com>
815
816         Reviewed by Ken.
817
818         - fixed <rdar://problem/3994164> setting a new style attribute with setAttribute("style") doesn't blow away the old style
819
820         * khtml/css/css_valueimpl.h: Renamed parseProperty to parseDeclaration, since it's used to parse
821         an entire style declaration, not a single property.
822         * khtml/css/css_valueimpl.cpp: (DOM::CSSMutableStyleDeclarationImpl::parseDeclaration): Renamed,
823         and added code to clear m_values.
824         * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseHTMLAttribute): Call function by its
825         new name, and remove some unnecessary comments.
826
827 2005-02-06  Darin Adler  <darin@apple.com>
828
829         Reviewed by Maciej.
830
831         - fixed <rdar://problem/3993722> need oncut and onpaste handlers implemented for <textarea> (needed for widgets)
832
833         * kwq/KWQTextArea.mm:
834         (-[KWQTextAreaTextView dispatchHTMLEvent:]): Added.
835         (-[KWQTextAreaTextView cut:]): Dispatch "before cut" and "cut" events.
836         (-[KWQTextAreaTextView copy:]): Dispatch "before copy" and "copy" events.
837         (-[KWQTextAreaTextView paste:]): Dispatch "before paste" and "paste" events.
838         (-[KWQTextAreaTextView pasteAsPlainText:]): Ditto.
839         (-[KWQTextAreaTextView pasteAsRichText:]): Ditto.
840
841 2005-02-06  Darin Adler  <darin@apple.com>
842
843         Reviewed by Maciej.
844
845         - fixed <rdar://problem/3943038> <input type=search> that is focused in onload handler doesn't have a visible editor
846
847         * khtml/xml/dom_docimpl.cpp: (DocumentImpl::setFocusNode): Always update layout before giving focus to a widget.
848         This prevents the bad case where we give a widget focus before it has been positioned or sized, causing us to
849         exercise edge cases AppKit doesn't handle well.
850
851         * kwq/KWQTextField.mm: (-[KWQTextFieldController initWithTextField:QLineEdit:]): Remove workaround code I added
852         to fix bug 3943049. Updating the layout fixes the same problem in a cleaner, safer way, and solves another problem,
853         with the way the clip view is set up.
854
855 2005-02-06  Darin Adler  <darin@apple.com>
856
857         Reviewed by Maciej.
858
859         - fixed <rdar://problem/3425232> textarea won't trigger onchange action when clicking to new field
860
861         * khtml/rendering/render_form.h: Added new m_dirty data member.
862         * khtml/rendering/render_form.cpp:
863         (RenderTextArea::RenderTextArea): Initialize m_dirty to false.
864         (RenderTextArea::detach): Call value() on the DOM element to cause it to fetch the value from this object.
865         (RenderTextArea::handleFocusOut): Ditto. Also send the onchange event based only on the m_dirty flag.
866         (RenderTextArea::updateFromElement): Clear the m_dirty flag if the edited value is blown away by a value
867         that comes from the DOM element. Remove code to clear the element's m_dirtyvalue flag; that's an unnecessary
868         optimization, and ideally we'll stop having code in the render object that knows about that flag later.
869         (RenderTextArea::slotTextChanged): Set the m_dirty flag.
870
871 2005-02-06  Darin Adler  <darin@apple.com>
872
873         Reviewed by Maciej.
874
875         - re-fixed <rdar://problem/3760910> please add support for custom tag names in HTML
876
877         * khtml/xml/dom_docimpl.cpp:
878         (DocumentImpl::tagId): Use ID_LAST_TAG + 1 for the ID of the first assigned tag ID. Before we'd use ID_LAST_TAG,
879         which resulted in the same number being used for ID_COMMENT and the first custom tag.
880         (DocumentImpl::tagName): Use ID_LAST_TAG + 1, as above.
881         (DocumentImpl::namespaceURI): Change a < ID_LAST_TAG to <= ID_LAST_TAG in the same spirit as above.
882
883 2005-02-06  Darin Adler  <darin@apple.com>
884
885         Reviewed by Maciej.
886
887         - fixed <rdar://problem/3986639> Crash occurs after choosing Undo Typing from the Edit menu
888
889         * kwq/KWQTextArea.mm: (-[KWQTextArea viewWillMoveToWindow:]): Remove actions from undo manager when the view is
890         removed from the window. Unfortunately, to do this the code has to know that the target of NSTextView actions
891         will be the text storage object, but given the NSText architecture, that's pretty clear.
892
893 2005-02-05  Chris Blumenberg  <cblu@apple.com>
894
895         Fixed: <rdar://problem/3991974> REGRESSION: www.jabra.com world location screen does not work
896
897         Reviewed by hyatt.
898
899         * kwq/KWQKJavaAppletWidget.mm:
900         (KJavaAppletWidget::KJavaAppletWidget): fallback to the document's base URL if there is no baseURL attribute
901         * kwq/WebCoreBridge.h:
902         * kwq/WebCoreBridge.mm:
903         (-[WebCoreBridge baseURL]): new
904
905 2005-02-04  David Harrison  <harrison@apple.com>
906
907         Reviewed by Darin.
908
909         Rolled out Ken's accidental checkin when committing <rdar://problem/3986155> fix yesterday.
910         
911         * khtml/editing/selection.cpp:
912         (khtml::Selection::validate):
913
914 2005-02-04  Adele Amchan  <adele@apple.com>
915
916         Reviewed by Darin.
917
918         Fix for <rdar://problem/3758785> Safari no longer works at BankOfAmerica online banking for military users
919   
920         When closing the document, if a body doesn't exist we now create one.  This bug was preventing the onload handler from
921         firing in cases where there wasn't a body.  In the BankOfAmerica case, the page was just a bit of script where the onload
922         handler redirected to the correct page.
923
924         * khtml/xml/dom_docimpl.cpp: (DocumentImpl::close):
925
926 2005-02-03  Ken Kocienda  <kocienda@apple.com>
927
928         Reviewed by Chris
929
930         Fix for this bug:
931         
932         <rdar://problem/3986155> Insertion point goes to beginning of doc after deleting
933
934         * khtml/editing/htmlediting.cpp:
935         (khtml::DeleteSelectionCommand::setStartNode): New convenience to handle reference counting when setting.
936         (khtml::DeleteSelectionCommand::handleGeneralDelete): This contains the crux of the bug fix. Improve tests
937         that detect when a selected node needs to be retained, rather than deleted, to preserve the intent of the user.
938         This has the side effect of causing the insertion point placement code to succeed rather than fail. Before
939         this fix, the failure of the insertion point placement code caused the insertion point to jump to the start
940         of the document, which is the symptom that can be perceived by users when editing.
941         * khtml/editing/htmlediting.h: Add setStartNode declaration.
942         * khtml/editing/visible_units.cpp:
943         (khtml::startOfBlock): This function had a stubbed-in non-tested implementation. Implement and 
944         * layout-tests/editing/deleting/delete-at-paragraph-boundaries-001-expected.txt: Added.
945         * layout-tests/editing/deleting/delete-at-paragraph-boundaries-001.html: Added.
946         * layout-tests/editing/deleting/delete-at-paragraph-boundaries-002-expected.txt: Added.
947         * layout-tests/editing/deleting/delete-at-paragraph-boundaries-002.html: Added.
948         * layout-tests/editing/deleting/delete-at-paragraph-boundaries-003-expected.txt: Added.
949         * layout-tests/editing/deleting/delete-at-paragraph-boundaries-003.html: Added.
950         * layout-tests/editing/deleting/delete-at-paragraph-boundaries-004-expected.txt: Added.
951         * layout-tests/editing/deleting/delete-at-paragraph-boundaries-004.html: Added.
952         * layout-tests/editing/deleting/delete-at-paragraph-boundaries-005-expected.txt: Added.
953         * layout-tests/editing/deleting/delete-at-paragraph-boundaries-005.html: Added.
954         * layout-tests/editing/deleting/delete-at-paragraph-boundaries-006-expected.txt: Added.
955         * layout-tests/editing/deleting/delete-at-paragraph-boundaries-006.html: Added.
956
957 === Safari-183 ===
958
959 2005-02-03  Richard Williamson   <rjw@apple.com>
960
961         Fixed <rdar://problem/3987419> Stocks and Weather leak what appears to XMLHTTPRequest results
962
963         XMLHTTPRequests were causing massive leaks.  _webcore_initWithHeaderString: did funky things with
964         self replacement.  Re-wrote to use more traditional factory constructor avoiding self replacement.
965         
966         Reviewed by David Harrison.
967
968         * kwq/KWQLoader.mm:
969         (+[NSDictionary _webcore_dictionaryWithHeaderString:]):
970         (KWQServeRequest):
971         (KWQServeSynchronousRequest):
972
973 2005-02-03  Chris Blumenberg  <cblu@apple.com>
974
975         Fixed: <rdar://problem/3938763> Cannot view Windows Media Player videos (soundtrack is played twice with delay)
976
977         Reviewed by hyatt.
978
979         * khtml/html/html_objectimpl.cpp:
980         (HTMLObjectElementImpl::attach): set needWidgetUpdate to false right after calling updateWidget because dispatchHTMLEvent can end up calling this method again
981         (HTMLObjectElementImpl::recalcStyle): ditto
982
983 2005-02-02  John Sullivan  <sullivan@apple.com>
984
985         Reviewed by Chris.
986
987         - WebCore part of fix for <rdar://problem/3980651> REGRESSION (125-180): Huge number of pages printed from certain page, 
988         iFrame involved
989         
990         This also fixes the problems with printing from GMail, yay!
991
992         * khtml/rendering/render_flow.cpp:
993         (RenderFlow::paintLines):
994         If the current line is taller than the entire page height (e.g. tall iFrame), don't try
995         to avoid splitting it across pages.
996         
997         * kwq/WebCoreBridge.mm:
998         (-[WebCoreBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
999         Handle error cases in a more obvious manner; this will cause future problems like this
1000         to print a blank page and complain to the console on debug builds, rather than print a 
1001         zillionty mostly-blank pages.
1002
1003 2005-02-02  Chris Blumenberg  <cblu@apple.com>
1004
1005         Fixed: <rdar://problem/3960304> can't load a particular applet (at www.escape.de) unless it's the first applet to be loaded
1006
1007         Reviewed by hyatt.
1008
1009         * khtml/rendering/render_frames.cpp:
1010         (RenderPartObject::updateWidget): when getting the MIME type from the PARAM tag, make sure the MIME type is the text from the left of the semi-colon if there is one. We do this elsewhere as well.
1011
1012 2005-02-02  Chris Blumenberg  <cblu@apple.com>
1013
1014         Fixed: <rdar://problem/3983628> control-click on WebView is not selecting the word under the cursor (Mail, non-editable WebView)
1015
1016         Reviewed by rjw.
1017
1018         * kwq/KWQKHTMLPart.mm:
1019         (KWQKHTMLPart::sendContextMenuEvent): check if SPI to always enable selecting closest word is enabled
1020         * kwq/WebCoreBridge.h:
1021
1022 2005-02-02  Ken Kocienda  <kocienda@apple.com>
1023
1024         Reviewed by me
1025
1026         * khtml/editing/markup.cpp:
1027         (khtml::createMarkup): Removed debug spam I committed earlier in error.
1028
1029 2005-02-02  Ken Kocienda  <kocienda@apple.com>
1030
1031         Reviewed by Darin
1032
1033         Fix for this bug:
1034         
1035         <rdar://problem/3823109> WebKit should support -toggleBaseWritingDirection: (bidi editing support)
1036
1037         Since base writing direction is a paragraph-level property in AppKit, and we use the CSS direction
1038         property in WebCore, which can be applied to inline elements as well as blocks, a new notion has
1039         been added to the WebCore apply style logic. It is now possible to force all properties in a 
1040         style declaration to be applied as though they were block properties.
1041
1042         * khtml/editing/htmlediting.cpp:
1043         (khtml::ApplyStyleCommand::ApplyStyleCommand): Add an enum and a flag to this command that controls whether to force all
1044         properties in the style to be applied as block styles. Default is "no", retaining previous behavior.
1045         (khtml::ApplyStyleCommand::doApply): Switch on new flag to apply styles as before, or force all preoperties to be applied
1046         as block styles.
1047         * khtml/editing/htmlediting.h:
1048         (khtml::ApplyStyleCommand::): Add an enum and a flag, as above.
1049         * khtml/khtml_part.cpp:
1050         (KHTMLPart::applyParagraphStyle): New method to force application of all style properties as block styles.
1051         * khtml/khtml_part.h: Update header declarations.
1052         * kwq/KWQKHTMLPart.h: Update header declarations.
1053         * kwq/KWQKHTMLPart.mm:
1054         (KWQKHTMLPart::baseWritingDirectionForSelectionStart): Accessor to help WebKit do a toggle operation on 
1055         writing direction.
1056         * kwq/WebCoreBridge.h: Update header declarations.
1057         * kwq/WebCoreBridge.mm:
1058         (-[WebCoreBridge applyParagraphStyle:withUndoAction:]): New method to force application of all style properties as block styles.
1059         (-[WebCoreBridge baseWritingDirectionForSelectionStart]): Accessor to help WebKit do a toggle operation on 
1060         writing direction.
1061
1062         Fix for this bug:
1063         
1064         <rdar://problem/3985035> REGRESSION (Mail): Text copied from wrapped line contains extra character when pasted
1065
1066         * khtml/editing/markup.cpp:
1067         (khtml::renderedText): Add an enum and a flag to this command that controls whether to force all
1068         This is the result of an error in the code that computes the rendered text that is selected 
1069         when copying. Since spaces collapse at the end of lines, and these spaces need to be copied 
1070         when the selection spans line endings, code runs to compute this text. However, this code 
1071         was also running incorrectly in cases where lines wrapped. I have now added the missing 
1072         test to check that the selection does indeed extend to the end of the line.
1073
1074
1075 2005-02-02  Ken Kocienda  <kocienda@apple.com>
1076
1077         Reviewed by Darin
1078
1079         Fix for these bugs:
1080         
1081         <rdar://problem/3984894> REGRESSION (Mail): Command-right-arrow in reply does the wrong thing (two ways)
1082         <rdar://problem/3985130> REGRESSION (Mail): command-right-arrow in pasted RTF selects only up to tab
1083
1084         * khtml/editing/visible_units.cpp:
1085         (khtml::endOfLine): Two separate problems in this new function recently added to take the place of
1086         selectionForLine. In the first, endOfLine did not stop at BR elements, and returned the position
1087         beyond them. In the second, the VisiblePosition constructor gives the wrong answer in certain cases.
1088         Darin is going to work on a solution for that problem. In the meantime, I can fix the symptom of this
1089         bug by going down to the last leaf child of the root line box; a one line change we will roll out when
1090         Darin's fix is in.
1091
1092 2005-02-01  Richard Williamson   <rjw@apple.com>
1093
1094         Fixed <rdar://problem/3985535> QT Plug-in JavaScript support now fails in <embed> tag only case
1095
1096         Reviewed by Maciej.
1097
1098         * khtml/ecma/kjs_html.cpp:
1099         (KJS::HTMLDocument::tryGet):
1100
1101 2005-02-01  John Sullivan  <sullivan@apple.com>
1102
1103         Written by Darin, reviewed and tested by me
1104         
1105         - fixed <rdar://problem/3969684> Panther-only: extra blank lines between 
1106         pasted content from Blot
1107
1108         * kwq/KWQKHTMLPart.mm:
1109         (KWQKHTMLPart::attributedString):
1110         don't emit paragraph breaks if the margins are tiny; matches what
1111         we do for plain-text conversion
1112
1113 === Safari-182 ===
1114
1115 2005-02-01  Ken Kocienda  <kocienda@apple.com>
1116
1117         Reviewed by John
1118
1119         Fix for this bug:
1120         
1121         <rdar://problem/3985160> Deficiencies in pasting architecture blocking progress on other bugs
1122
1123         * khtml/editing/html_interchange.h: Move style span text used to mark element added to 
1124         add style to this header.
1125         * khtml/editing/htmlediting.cpp:
1126         (khtml::styleSpanClassString): Change to use constant moved to html_interchange.h.
1127         (khtml::isStyleSpan): New helper function. Checks if this is a span we added to apply style.
1128         (khtml::CompositeEditCommand::insertNodeBefore): Added an assert to check that the node
1129         we are inserting before is not the body.
1130         (khtml::CompositeEditCommand::insertNodeAfter): Ditto, but check is for after.
1131         (khtml::ReplacementFragment::ReplacementFragment): Added code to process the "default style"
1132         that is added by the copy code.
1133         (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): first and last nodes inserted are
1134         now member variables instead of function locals. Initialize them here.
1135         (khtml::ReplaceSelectionCommand::~ReplaceSelectionCommand): Deref first and last nodes inserted
1136         if necessary.
1137         (khtml::ReplaceSelectionCommand::doApply): Change design to fix the bug. Major change is to
1138         separate out the code that inserts nodes into the tree so additional styling checks can
1139         be done in a centralized way. Also got rid of the notion of "merging into the end block." That
1140         concept was just wrong.
1141         (khtml::ReplaceSelectionCommand::completeHTMLReplacement): Tweak interface now that first and 
1142         last nodes inserted are member variables.
1143         (khtml::ReplaceSelectionCommand::insertNodeAfterAndUpdateNodesInserted): New helper used
1144         by replace code to do the stated DOM operation and update state internal to the command.
1145         This will also be a catch point to handle the kinds of additional style checks needed to
1146         make paste work right.
1147         (khtml::ReplaceSelectionCommand::insertNodeAtAndUpdateNodesInserted): Ditto.
1148         (khtml::ReplaceSelectionCommand::insertNodeBeforeAndUpdateNodesInserted): Ditto.
1149         (khtml::ReplaceSelectionCommand::updateNodesInserted): Ditto.
1150         * khtml/editing/htmlediting.h: Update declarations as needed.
1151         * khtml/editing/markup.cpp:
1152         (khtml::createMarkup): Adds a "default style" span to the content written to the pasteboard.
1153         This will help us to fix some of the bugs blocked by the bug above.
1154         * khtml/xml/dom_nodeimpl.cpp:
1155         (NodeImpl::lastDescendent): New helper.
1156         * khtml/xml/dom_nodeimpl.h: Ditto.
1157         * khtml/xml/dom_position.cpp:
1158         (DOM::Position::upstream): Fixed a bug which would allow the upstream position returned to be
1159         in unrendered content.
1160         (DOM::Position::downstream): Ditto.
1161
1162         * layout-tests/editing/deleting/delete-3775172-fix-expected.txt: Ending positions tweaked due to 
1163         changes in upstream() and downstream() functions.
1164         * layout-tests/editing/inserting/insert-3851164-fix-expected.txt: Ditto
1165         * layout-tests/editing/inserting/insert-3907422-fix-expected.txt: Ditto
1166         * layout-tests/editing/selection/extend-by-character-006-expected.txt: Ditto
1167
1168         * layout-tests/editing/pasteboard/paste-text-003-expected.txt: Changed what we expect, given
1169         new behavior of paste code.
1170
1171 2005-01-31  John Sullivan  <sullivan@apple.com>
1172
1173         Reviewed by Dave Hyatt.
1174         
1175         - fixed <rdar://problem/3983097> Tabbing on RSS pages gets stuck in search field 
1176         with "full keyboard navigation" off
1177
1178         * kwq/KWQSlider.h:
1179         * kwq/KWQSlider.mm:
1180         (QSlider::focusPolicy):
1181         Implemented this method for KWQSlider. It is needed for our widget subclasses that
1182         can become focused in some situations. I missed this when fixing 3949203 because
1183         it only comes into play when tab-to-controls is on, and because the other relevant
1184         methods are objective-C methods.
1185
1186 2005-01-31  David Harrison  <harrison@apple.com>
1187
1188         Reviewed by Darin.
1189
1190         <rdar://problem/3964164> AXWebArea needs to unregister on going invisible
1191
1192         * khtml/xml/dom_docimpl.cpp:
1193         (DocumentImpl::detach):
1194         Detach the AX UIElement for the AXWebArea.
1195
1196 2005-01-31  David Harrison  <harrison@apple.com>
1197
1198         Reviewed by Darin
1199
1200         <rdar://problem/3850876> AX: button exposed as only an AXImage at http://appleseed.apple.com/ site (<input type=image>)
1201
1202         * khtml/rendering/render_form.h:
1203         (khtml::RenderImageButton::isImageButton):
1204         New.
1205         * khtml/rendering/render_image.h:
1206         (khtml::RenderImage::isImageButton):
1207         New.
1208         * kwq/KWQAccObject.mm:
1209         (-[KWQAccObject isImageButton]):
1210         (-[KWQAccObject actionElement]):
1211         (-[KWQAccObject role]):
1212         (-[KWQAccObject accessibilityActionNames]):
1213         (-[KWQAccObject accessibilityPerformAction:]):
1214         Represent RenderImageButton elements as buttons instead of images.
1215
1216 2005-01-31  David Harrison  <harrison@apple.com>
1217
1218         Prevent nil dereference in debug code.
1219
1220         * khtml/xml/dom_nodeimpl.cpp:
1221         (NodeImpl::displayTree):
1222         Stop when parent is 0, too.
1223
1224 2005-01-31  John Sullivan  <sullivan@apple.com>
1225
1226         Reviewed by Dave Hyatt.
1227         
1228         - fixed <rdar://problem/3949203> cannot tab to, within, or out of the RSS sidebar
1229
1230         * kwq/KWQSlider.mm:
1231         (-[KWQSlider becomeFirstResponder]):
1232         (-[KWQSlider resignFirstResponder]):
1233         (-[KWQSlider nextKeyView]):
1234         (-[KWQSlider previousKeyView]):
1235         (-[KWQSlider canBecomeKeyView]):
1236         (-[KWQSlider nextValidKeyView]):
1237         (-[KWQSlider previousValidKeyView]):
1238         Copied these methods from KWQButton. The lack of special handling for first-responder-ness
1239         here was causing the focus to get "stuck" on the RSS page's slider widget. Added FIXME
1240         about how it would be nice to share more of this code rather than replicating it in each
1241         KWQ widget subclass.
1242
1243 2005-01-31  Darin Adler  <darin@apple.com>
1244
1245         Reviewed by Harrison.
1246
1247         - fixed <rdar://problem/3980066> Double-click on single character moves insertion point to previous line
1248
1249         * khtml/khtml_part.cpp:
1250         (KHTMLPart::selectClosestWordFromMouseEvent): Set affinity too.
1251         (KHTMLPart::handleMousePressEventTripleClick): Ditto.
1252         (KHTMLPart::handleMouseMoveEventSelection): Ditto.
1253         (KHTMLPart::khtmlMouseReleaseEvent): Ditto.
1254
1255         * khtml/editing/selection.cpp:
1256         (khtml::Selection::modifyExtendingRightForward): Use endOfLine and endOfDocument.
1257         (khtml::Selection::modifyMovingRightForward): Ditto.
1258         (khtml::Selection::modifyExtendingLeftBackward): Use startOfLine and startOfDocument.
1259         (khtml::Selection::modifyMovingLeftBackward): Ditto.
1260         (khtml::Selection::validate): Rewrote the section that handles double-click. Two main fixes: 1) use isStartOfLine to
1261         check for another case where we want to select the word to the right, and 2) use isEndOfParagraph, which seems
1262         to work correctly in cases where isLastVisiblePositionInParagraph is giving the wrong answer. Also changed the line
1263         code to use startOfLine/endOfLine and the document code to use startOfDocument/endOfDocument.
1264
1265 2005-01-31  Darin Adler  <darin@apple.com>
1266
1267         Reviewed by Harrison.
1268
1269         - fixed <rdar://problem/3935275> unexpected quit scrolling over link; last.fm (works in IE and Firefox)
1270
1271         * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): By using the correct document, fix the crash reported here.
1272         The page still crashes when you close the browser window, but it's not trivial to fix so I'll file a new bug after that.
1273
1274 2005-01-31  Darin Adler  <darin@apple.com>
1275
1276         Reviewed by Ken and Harrison.
1277
1278         - fixed <rdar://problem/3947901> REGRESSION (Mail): Pasting paragraph of rich text leaves insertion point before pasted text
1279         - fixed <rdar://problem/3949790> hitting return after underlined line results in too much or too little underlined
1280         - fixed <rdar://problem/3981759> nil-deref and crash when pasting just a paragraph break
1281         - fixed a couple problems I discovered while working with bug 3949790
1282
1283         * khtml/editing/htmlediting.cpp:
1284         (khtml::ApplyStyleCommand::applyInlineStyle): Pass StayInBlock to upstream. Without this, we end up going too far
1285         upstream in the test case in bug 3949790.
1286         (khtml::ApplyStyleCommand::removeInlineStyle): Pass StayInBlock to upstream and downstream. Same reason as above.
1287         (khtml::ReplaceSelectionCommand::doApply): Update endPos if inserting a new node and endPos is using that node's
1288         parent and an offset past the node being inserted. That change fixes a problem with the position of the insertion point
1289         after pasting into the top level of a document (from test cases in 3947901 and 3949790). When setting insertionPos, use
1290         code that works when lastNodeInserted is a block rather than a text node. That change fixes a problem where a newline is
1291         not added when pasting an entire paragraph into the end of a document (from test case in 3949790). Added nil check before
1292         checking if lastNodeInserted is a <br> element, which fixes the crash when pasting just a paragraph break.
1293
1294         * khtml/editing/visible_units.h: Filled out the set of calls to add some boolean checks for lines (needed for the
1295         bug fix), and calls for blocks (not yet implemented), and documents. The document checks may need refinement to
1296         properly handle documents with a mix of editable and non-editable content, but for now they just refactor code
1297         and make things a little clearer. Also removed the "include line break" parameter from endOfSentence.
1298         * khtml/editing/visible_units.cpp:
1299         (khtml::rootBoxForLine): Added.
1300         (khtml::startOfLine): Added. Algorithm taken from selectionForLine in selection.cpp.
1301         (khtml::endOfLine): Ditto.
1302         (khtml::inSameLine): Added.
1303         (khtml::isStartOfLine): Added.
1304         (khtml::isEndOfLine): Added.
1305         (khtml::endOfSentence): Removed "include line break" parameter.
1306         (khtml::inSameParagraph): Added a null check.
1307         (khtml::isStartOfParagraph): Ditto.
1308         (khtml::isEndOfParagraph): Ditto.
1309         (khtml::startOfBlock): Added.
1310         (khtml::endOfBlock): Added.
1311         (khtml::inSameBlock): Added.
1312         (khtml::isStartOfBlock): Added.
1313         (khtml::isEndOfBlock): Added.
1314         (khtml::startOfDocument): Added.
1315         (khtml::endOfDocument): Added.
1316         (khtml::inSameDocument): Added.
1317         (khtml::isStartOfDocument): Added.
1318         (khtml::isEndOfDocument): Added.
1319
1320 2005-01-30  Darin Adler  <darin@apple.com>
1321
1322         Reviewed by John.
1323
1324         - fixed <rdar://problem/3977000> form data set posted for <input type="image" ...> omits name/value pair
1325
1326         * khtml/html/html_formimpl.cpp:
1327         (DOM::HTMLInputElementImpl::appendFormData): Append a name/value pair for type IMAGE in addition to the X/Y
1328         coordinates.
1329
1330 2005-01-30  Darin Adler  <darin@apple.com>
1331
1332         Reviewed by John.
1333
1334         - fixed <rdar://problem/3974246> REGRESSION (125-180): popup menus are missing item text on Harmony Remote web site
1335
1336         * khtml/html/html_formimpl.cpp: (DOM::HTMLOptionElementImpl::text): Change this function to traverse the entire tree
1337         and gather all the text rather than just looking at immediate children.
1338
1339         * khtml/xml/dom_nodeimpl.h: Added const.
1340         * khtml/xml/dom_nodeimpl.cpp:
1341         (NodeImpl::traverseNextNode): Added const.
1342         (NodeImpl::traverseNextSibling): Ditto.
1343         (NodeImpl::traversePreviousNodePostOrder): Ditto.
1344         (NodeImpl::detach): Add a missing nil check.
1345
1346 2005-01-30  Darin Adler  <darin@apple.com>
1347
1348         Reviewed by John.
1349
1350         - fixed <rdar://problem/3864536> crash copying text from other apps and pasting in a sticky in dashboard
1351
1352         * khtml/editing/markup.cpp: (khtml::createFragmentFromText): Added missing ref/deref of newly created element.
1353
1354 2005-01-28  Darin Adler  <darin@apple.com>
1355
1356         * khtml/css/cssproperties.c: Regenerated with newer gperf.
1357
1358 2005-01-28  David Harrison  <harrison@apple.com>
1359
1360         Reviewed by John Sullivan.
1361
1362         <rdar://problem/3968144> AX need to be able to focus an AXLink by setting AXFocused to true
1363         
1364         * kwq/KWQAccObject.mm:
1365         (-[KWQAccObject accessibilityPerformAction:]):
1366         (-[KWQAccObject accessibilityIsAttributeSettable:]):
1367         Add AXFocused for AXLinks.
1368
1369 2005-01-28  David Harrison  <harrison@apple.com>
1370
1371         Reviewed by Darin.
1372
1373         <rdar://problem/3584942> AX: Safari Accessibility parent-child mismatch
1374
1375         Use AppKit SPI _accessibilityParentForSubview to return KWQAccObject parent of AppKit AX object.
1376         
1377         * kwq/KWQAccObject.mm:
1378         (-[KWQAccObject _accessibilityParentForSubview:]):
1379         New.
1380
1381 2005-01-27  Adele Amchan  <adele@apple.com>
1382
1383         fixed by Darin, reviewed by me.
1384
1385         <rdar://problem/3976314> REGRESSION (180-TOT): submitting password fields fail on Panther
1386
1387         * kwq/KWQTextField.mm: (-[KWQTextFieldController string]): on panther, the secure text field's editor 
1388         does not contain the real string, so now we just call stringValue on the field in that case.
1389
1390 2005-01-26  Maciej Stachowiak  <mjs@apple.com>
1391
1392         Reviewed by Darin, Hyatt and Ken.
1393
1394         <rdar://problem/3790449> REGRESSION (Mail): underline behavior is flaky because of how CSS handles text-decoration
1395         
1396         * khtml/css/css_computedstyle.cpp:
1397         (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Add support
1398         for -khtml-text-decorations-in-effect property. This works like text-docration
1399         but follows proper inline semantics, that is, if a parent is causing text
1400         decoration then -khtml-text-decorations-in-effect on this element will reflect that.
1401         * khtml/css/cssproperties.in: Add -khtml-text-decorations-in-effect property.
1402         * khtml/css/cssproperties.h: regenerated
1403         * khtml/css/cssvalues.c: regenerated
1404         * khtml/css/cssparser.cpp: regenerated
1405         * khtml/css/cssproperties.c: regenerated
1406
1407         * khtml/css/css_valueimpl.h: Made copyPropertiesInSet public.
1408
1409         * khtml/editing/htmlediting.cpp:
1410         (khtml::StyleChange::init): Handle -khtml-text-decorations-in-effect
1411         specially, translate to text-decoration
1412         (khtml::ApplyStyleCommand::applyInlineStyle): Fix a comment.
1413         (khtml::ApplyStyleCommand::removeInlineStyle): Add new way of pushing down
1414         text-decoration styles around the edges of the selected range.
1415         (khtml::ApplyStyleCommand::pushDownTextDecorationStyleAroundNode): Helper for this.
1416         (khtml::ApplyStyleCommand::pushDownTextDecorationStyleAtBoundaries): ditto
1417         (khtml::ApplyStyleCommand::nodeFullyUnselected): ditto
1418         (khtml::hasTextDecorationProperty): ditto
1419         (khtml::highestAncestorWithTextDecoration): ditto
1420         (khtml::ApplyStyleCommand::extractTextDecorationStyle): ditto
1421         (khtml::ApplyStyleCommand::extractAndNegateTextDecorationStyle): ditto
1422         (khtml::ApplyStyleCommand::applyTextDecorationStyle): ditto
1423         * khtml/editing/htmlediting.h: Prototype new methods.
1424         * khtml/editing/jsediting.cpp: Make underline execCommand use the new CSS property.
1425
1426         - as a necessary part of the fix, fixed the longstanding problem
1427         that mutating an element's inlineStyleDecl would not property
1428         update its style attribute. now it does.
1429         
1430         * khtml/css/css_valueimpl.cpp:
1431         (DOM::CSSMutableStyleDeclarationImpl::setChanged): If this is an inline style
1432         declaration, tell the element it's style attribute needs updating.
1433         * khtml/html/html_elementimpl.cpp:
1434         (HTMLElementImpl::invalidateStyleAttribute): New method, just calls down
1435         to the dom element.
1436         (HTMLElementImpl::updateStyleAttribute): Regenerate style attribute from
1437         inline style declaration.
1438         * khtml/html/html_elementimpl.h: Prototype new stuff.
1439         * khtml/xml/dom_elementimpl.cpp:
1440         (ElementImpl::ElementImpl): Initialize new attribute.
1441         (ElementImpl::updateStyleAttributeIfNeeded): New method to check if the style
1442         is dirty and this is an html element, and if so call the html element to
1443         regenerate the style attribute.
1444         (ElementImpl::attributes): update style if needed
1445         (ElementImpl::getAttribute): ditto
1446         (ElementImpl::hasAttributes): ditto
1447         (ElementImpl::dump): ditto
1448         (XMLElementImpl::cloneNode): ditto
1449         * khtml/xml/dom_elementimpl.h:
1450         (DOM::ElementImpl::isStyleAttributeValid): new method to manage style attr
1451         dirty bit
1452         (DOM::ElementImpl::setStyleAttributeValid): ditto
1453
1454         - added new layout tests for underlining:
1455         
1456         * layout-tests/editing/editing.js:
1457         * layout-tests/editing/style/remove-underline-across-paragraph-expected.txt: Added.
1458         * layout-tests/editing/style/remove-underline-across-paragraph-in-bold-expected.txt: Added.
1459         * layout-tests/editing/style/remove-underline-across-paragraph-in-bold.html: Added.
1460         * layout-tests/editing/style/remove-underline-across-paragraph.html: Added.
1461         * layout-tests/editing/style/remove-underline-after-paragraph-expected.txt: Added.
1462         * layout-tests/editing/style/remove-underline-after-paragraph-in-bold-expected.txt: Added.
1463         * layout-tests/editing/style/remove-underline-after-paragraph-in-bold.html: Added.
1464         * layout-tests/editing/style/remove-underline-after-paragraph.html: Added.
1465         * layout-tests/editing/style/remove-underline-expected.txt: Added.
1466         * layout-tests/editing/style/remove-underline-from-stylesheet-expected.txt: Added.
1467         * layout-tests/editing/style/remove-underline-from-stylesheet.html: Added.
1468         * layout-tests/editing/style/remove-underline-in-bold-expected.txt: Added.
1469         * layout-tests/editing/style/remove-underline-in-bold.html: Added.
1470         * layout-tests/editing/style/remove-underline.html: Added.
1471         * layout-tests/editing/style/underline-expected.txt: Added.
1472         * layout-tests/editing/style/underline.html: Added.
1473
1474 2005-01-27  David Hyatt  <hyatt@apple.com>
1475
1476         Fix for 3875199, search field needs to be able to  show a magnifying  glass without a dropdown menu.
1477         
1478         Reviewed by kocienda
1479
1480         * khtml/html/html_formimpl.cpp:
1481         (DOM::HTMLInputElementImpl::HTMLInputElementImpl):
1482         (DOM::HTMLInputElementImpl::parseHTMLAttribute):
1483         * kwq/KWQLineEdit.mm:
1484         (QLineEdit::setMaxResults):
1485
1486 2005-01-27  Ken Kocienda  <kocienda@apple.com>
1487
1488         Reviewed by Maciej
1489
1490         Fix for this bug:
1491         
1492         <rdar://problem/3973254> Deletions of ranges does not coalesce correctly with subsequent typing
1493
1494         * khtml/editing/htmlediting.cpp:
1495         (khtml::InsertTextCommand::deleteCharacter): Remove this dead code.
1496         (khtml::ReplaceSelectionCommand::editingAction): Moved this code to a better place in the file. 
1497         It was in with unrelated functions.
1498         (khtml::TypingCommand::TypingCommand): Reorganize initialization list so it is easier to read.
1499         (khtml::TypingCommand::issueCommandForDeleteKey): Remove dead code. Roll in remaining code into deleteKeyPressed.
1500         (khtml::TypingCommand::deleteKeyPressed): Add in support for carrying along smart delete flag.
1501         (khtml::TypingCommand::forwardDeleteKeyPressed): New function. Makes forward delete work like
1502         "regular" delete in terms of coalescing typing.
1503         (khtml::TypingCommand::doApply): Add case for ForwardDeleteKey.
1504         (khtml::TypingCommand::preservesTypingStyle): Ditto.
1505         * khtml/editing/htmlediting.h:
1506         (khtml::TypingCommand::): Add ForwardDeleteKey constant. Remove a couple declarations for now-dead code.
1507         (khtml::TypingCommand::smartDelete): New accessor.
1508         (khtml::TypingCommand::setSmartDelete): Ditto.
1509         * kwq/WebCoreBridge.h:
1510         * kwq/WebCoreBridge.mm:
1511         (-[WebCoreBridge deleteKeyPressedWithSmartDelete:]): Add smart delete flag.
1512         (-[WebCoreBridge forwardDeleteKeyPressedWithSmartDelete:]): New method.
1513         * khtml/editing/jsediting.cpp: Add supprt for ForwardDelete command
1514         * layout-tests/editing/editing.js: Ditto.
1515         * layout-tests/editing/deleting/delete-and-undo-expected.txt: Added.
1516         * layout-tests/editing/deleting/delete-and-undo.html: Added.
1517         * layout-tests/editing/deleting/forward-delete-expected.txt: Added.
1518         * layout-tests/editing/deleting/forward-delete.html: Added.
1519
1520 === Safari-181 ===
1521
1522 2005-01-27  David Harrison  <harrison@apple.com>
1523
1524         Reviewed by Ken.
1525
1526         <rdar://problem/3962214> AX: AXLeftLineTextMarkerRangeForTextMarker returns incorrect range
1527
1528         * kwq/KWQAccObject.mm:
1529         (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
1530         Allowed for selection to end of line including the linebreak.
1531         
1532 2005-01-27  David Harrison  <harrison@apple.com>
1533
1534         Reviewed by Darin, Ken.
1535
1536         <rdar://problem/3964470> AX: Include attachments in AXAttributedStringForTextMarkerRange
1537
1538         * kwq/KWQAccObject.mm:
1539         (-[KWQAccObject isAttachment]):
1540         (-[KWQAccObject attachmentView]):
1541         (-[KWQAccObject role]):
1542         (-[KWQAccObject subrole]):
1543         (-[KWQAccObject roleDescription]):
1544         (-[KWQAccObject value]):
1545         (-[KWQAccObject title]):
1546         (-[KWQAccObject accessibilityDescription]):
1547         (-[KWQAccObject accessibilityIsIgnored]):
1548         (-[KWQAccObject accessibilityAttributeNames]):
1549         (-[KWQAccObject accessibilityAttributeValue:]):
1550         Make attachments accessible.
1551         
1552         (CreateCGColorIfDifferent):
1553         (AXAttributeStringSetColor):
1554         (AXAttributeStringSetNumber):
1555         (AXAttributeStringSetFont):
1556         (AXAttributeStringSetStyle):
1557         (AXAttributeStringSetElement):
1558         (AXLinkElementForNode):
1559         (AXAttributedStringAppendText):
1560         (AXAttributedStringAppendReplaced):
1561         (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
1562         Add attachments and more text attributes to AXAttributedStringForTextMarkerRange.
1563
1564 2005-01-27  Darin Adler  <darin@apple.com>
1565
1566         Reviewed by John.
1567
1568         - fixed <rdar://problem/3807935> DOM CSS computed style line-height is wrong in two ways
1569
1570         * khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
1571         Use specified size rather than computed size when dealing with a percentage for line height.
1572
1573 2005-01-27  Darin Adler  <darin@apple.com>
1574
1575         Reviewed by John.
1576
1577         - fixed <rdar://problem/3971372> SWB: template function DOM_cast() won't compile with gcc 4.0
1578         - fixed other gcc 4.0 compiling problems Patrick Beard pointed out on the phone
1579
1580         * kwq/DOMInternal.h: (DOM_cast): Change the "failToCompile()" trick to use a dependent name.
1581         Nowadays, if a name is not dependent, it is checked at template definition time. But we want
1582         a failure only at template instantiation time.
1583
1584         * ForwardingHeaders/editing/text_granularity.h: Added. Needed but a bug in the 3.3 compiler made
1585         it compile anyway without this.
1586
1587         - other changes
1588
1589         * khtml/html/html_miscimpl.h: For clarity, mark these functions virtual too. They are automatically
1590         virtual because the base class ones are virtual, but it's ugly to leave it this way.
1591
1592 2005-01-26  Ken Kocienda  <kocienda@apple.com>
1593
1594         Reviewed by Hyatt
1595
1596         Fix for this bug:
1597         
1598         <rdar://problem/3971609> REGRESSION (Mail): up/down arrow navigation broken after rewrapping text by resizing window
1599         <rdar://problem/3975661> REGRESSION (Mail): left/right arrow navigation can place insertion point after last character on line
1600
1601         * khtml/editing/selection.cpp:
1602         (khtml::Selection::modifyAffinity): PARAGRAPH and LINE movements should not alter affinity. This was
1603         just a mistake before when it reset to upstream in some cases.
1604         * khtml/rendering/render_line.cpp:
1605         (khtml::RootInlineBox::closestLeafChildForXPos): Move this function down from InlineBox, and 
1606         rework the implementation. This fixes 3971609.
1607         * khtml/rendering/render_line.h:
1608         * khtml/rendering/render_text.cpp:
1609         (RenderText::caretRect): Rework the algorithm to fix 3975661. This regressed when we began placing
1610         the spaces on the end of lines in text boxes when lines wrap.
1611
1612 2005-01-26  Richard Williamson   <rjw@apple.com>
1613
1614         Fixed <rdar://problem/3972522> (179-180) 40% slowdown on iBench JavaScript test
1615
1616         I added a member variable to ObjectImp.  This changed it's size and consequently
1617         hampered the optimizations built into the garbage collector.  Objects no longer
1618         fit within the allocators cell size, and thus allocation fell back to a slower
1619         allocator.
1620
1621         As a result of this fix I also dramatically cleaned up how runtime objects are
1622         accessed.  The path mostly *removes* code.
1623         
1624         Reviewed by Chris.
1625
1626         * khtml/ecma/kjs_dom.cpp:
1627         (DOMDocumentProtoFunc::tryCall):
1628         (DOMElementProtoFunc::tryCall):
1629         (KJS::getRuntimeObject):
1630         * khtml/ecma/kjs_dom.h:
1631         * khtml/ecma/kjs_html.cpp:
1632         (KJS::HTMLDocument::tryGet):
1633         (KJS::HTMLElement::tryGet):
1634         (KJS::HTMLElement::implementsCall):
1635         (KJS::HTMLElement::call):
1636         (KJS::HTMLElement::tryPut):
1637         (KJS::HTMLCollection::tryGet):
1638         (KJS::HTMLCollection::getNamedItems):
1639         * khtml/ecma/kjs_html.h:
1640         * khtml/ecma/kjs_window.cpp:
1641         (Window::get):
1642
1643 2005-01-26  Richard Williamson   <rjw@apple.com>
1644
1645         Fixed <rdar://problem/3757712> REGRESSION (Mail): WebCore does not allow Devanagari ligature input
1646
1647         For now we are using ICU UBreakIterator to determine grapheme boundaries for
1648         cursor and deletion.  This does not match what Cocoa does exactly, but does match
1649         what Carbon does.  The areas are difference are obscure, but, according to
1650         Deborah Goldsmith, using the UBreakIterator is the reasonable approach.
1651
1652         Reviewed by Ken.
1653
1654         * khtml/rendering/render_text.cpp:
1655         (RenderText::previousOffset):
1656         (RenderText::nextOffset):
1657
1658 2005-01-25  David Harrison  <harrison@apple.com>
1659
1660         Reviewed by Maciej and Richard.
1661
1662         <rdar://problem/3963731> AX VO: Changing window sizes causes a crash using with Voice Over - KWQPtrDictImpl::clear
1663
1664         * khtml/html/html_miscimpl.cpp:
1665         (HTMLCollectionImpl::HTMLCollectionImpl):
1666         Ensure that isHTMLDocument before calling HTMLDocument-only method.
1667
1668 2005-01-25  Richard Williamson   <rjw@apple.com>
1669
1670         Part one of fix for <rdar://problem/3757712> REGRESSION (Mail): WebCore does not allow Devanagari ligature input
1671
1672         This patch changes the semantics of next() and previous() on
1673         VisiblePosition to move a grapheme (character cluster) at a
1674         time.  This means that cursor navigation with correctly move
1675         over an entire cluster.
1676
1677         However, the expected behavior for deleting a grapheme is to
1678         delete individual code points, thus decomposing the grapheme
1679         into it constituent parts.  That will be addressed in the next
1680         part of the fix.
1681
1682         Reviewed by Ken.
1683
1684         * khtml/editing/visible_position.cpp:
1685         (khtml::VisiblePosition::previousPosition):
1686         (khtml::VisiblePosition::nextPosition):
1687         * khtml/editing/visible_position.h:
1688         * khtml/rendering/render_object.cpp:
1689         (RenderObject::previousOffset):
1690         (RenderObject::nextOffset):
1691         * khtml/rendering/render_object.h:
1692         * khtml/rendering/render_text.cpp:
1693         (RenderText::previousOffset):
1694         (RenderText::nextOffset):
1695         (RenderText::findNextInlineTextBox):
1696         * khtml/rendering/render_text.h:
1697         * khtml/xml/dom_nodeimpl.cpp:
1698         (NodeImpl::previousOffset):
1699         (NodeImpl::nextOffset):
1700         * khtml/xml/dom_nodeimpl.h:
1701
1702 2005-01-25  David Harrison  <harrison@apple.com>
1703
1704         Reviewed by Maciej.
1705
1706         <rdar://problem/3973067> AXWebArea for http://apple.netscape.com/ has an empty AXLinkUIElements
1707
1708         * kwq/KWQAccObject.mm:
1709         (-[KWQAccObject accessibilityAttributeValue:]):
1710         Omit ignored AXLinks from AXLinkUIElements result
1711
1712 2005-01-25  Ken Kocienda  <kocienda@apple.com>
1713
1714         Reviewed by John
1715
1716         Fix for this bug:
1717         
1718         <rdar://problem/3972851> REGRESSION (179-180+): Repro crash in ApplyStyleCommand::cleanUpEmptyStyleSpans
1719
1720         * khtml/editing/htmlediting.cpp:
1721         (khtml::ApplyStyleCommand::cleanUpEmptyStyleSpans): Added two null checks.
1722
1723 2005-01-25  Ken Kocienda  <kocienda@apple.com>
1724
1725         Reviewed by John
1726
1727         Fix for this bug:
1728         
1729         <rdar://problem/3954710> Mail crashed while editing signatures - NodeImpl::isBlockFlow
1730
1731         The fix is more general than for this one bug, and may work to fix many crashers. The problem
1732         is that the ReplaceSelectionCommand never checked whether its starting selection is empty. If
1733         it is, then we need to bail before doing the work of the command, which we need to deref the
1734         start and end points of the selection in order to do its work. I think you can see the crash
1735         potential.
1736
1737         * khtml/editing/htmlediting.cpp:
1738         (khtml::ReplaceSelectionCommand::doApply): Assert selection is not empty.
1739         * kwq/WebCoreBridge.mm:
1740         (partHasSelection): New helper function to test that bridge has a part with a selection.
1741         
1742         Use new helper function to test part and selection; return from these function if this test fails.
1743         
1744         (-[WebCoreBridge rangeByExpandingSelectionWithGranularity:])
1745         (-[WebCoreBridge rangeByAlteringCurrentSelection:direction:granularity:])
1746         (-[WebCoreBridge alterCurrentSelection:direction:granularity:])
1747         (-[WebCoreBridge rangeByAlteringCurrentSelection:verticalDistance:])
1748         (-[WebCoreBridge alterCurrentSelection:verticalDistance:])
1749         (-[WebCoreBridge documentFragmentWithText:])
1750         (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:smartReplace:])
1751         (-[WebCoreBridge insertLineBreak])
1752         (-[WebCoreBridge insertParagraphSeparator])
1753         (-[WebCoreBridge insertParagraphSeparatorInQuotedContent])
1754         (-[WebCoreBridge insertText:selectInsertedText:])
1755         (-[WebCoreBridge deleteSelectionWithSmartDelete:])
1756         (-[WebCoreBridge ensureSelectionVisible])
1757
1758 2005-01-24  Kevin Decker  <kdecker@apple.com>
1759
1760         Reviewed by Darin.
1761
1762         Fixed <rdar://problem/3932374> REGRESSION: 'ReferenceError - Can't find variable' JavaScript error at webxpress.fidelity.com
1763
1764         * khtml/html/html_miscimpl.h: Missing virtual identifiers for namedItem() and nextNamedItem() exposed a flaw that prevented finding variables in form [HTMLFormCollectionImpl] scopes.
1765         
1766
1767 2005-01-24  Vicki Murley <vicki@apple.com>
1768
1769         Reviewed by kocienda.
1770
1771         - fix <rdar://problem/3810661> computed style not handled for Apple extensions
1772  
1773         * khtml/css/css_computedstyle.cpp: (DOM::):
1774         (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): add -apple-line-clamp and -apple-text-size-adjust
1775
1776 2005-01-24  Darin Adler  <darin@apple.com>
1777
1778         Reviewed by Kevin.
1779
1780         - fixed <rdar://problem/3969884> REGRESSION (179-180): Typing password not echoed as "bullets" at paypal.com when field is first focused
1781
1782         * kwq/KWQTextField.mm: (-[KWQTextFieldController initWithTextField:QLineEdit:]):
1783         Sizing up the form editor, which fixes things for normal fields and search fields,
1784         screws things up for password fields. Eventually, I'll need to figure out why this is
1785         and file a bug so that the AppKit team fixes it. In the mean time, just check for the
1786         case of the secure text field, and don't size up in that case.
1787
1788 2005-01-24  Ken Kocienda  <kocienda@apple.com>
1789
1790         Reviewed by Hyatt
1791
1792         Fix for this bug:
1793         
1794         <rdar://problem/3963560> 8A354: Inserting Japanese text to the line head causes line break
1795
1796         * khtml/editing/htmlediting.cpp:
1797         (khtml::ReplaceSelectionCommand::doApply): Add one more case where we merge content into the
1798         existing line. This covers the situation see using the steps to reproduce this bug.
1799
1800 2005-01-21  Maciej Stachowiak  <mjs@apple.com>
1801
1802         Reviewed by Darin.
1803
1804         <rdar://problem/3967572> Editing should split elements before removing style
1805         
1806         * khtml/editing/htmlediting.cpp:
1807         (khtml::CompositeEditCommand::splitElement):
1808         (khtml::CompositeEditCommand::mergeIdenticalElements):
1809         (khtml::CompositeEditCommand::wrapContentsInDummySpan):
1810         (khtml::CompositeEditCommand::splitTextNodeContainingElement):
1811         (khtml::ApplyStyleCommand::applyInlineStyle):
1812         (khtml::ApplyStyleCommand::splitTextAtStartIfNeeded):
1813         (khtml::ApplyStyleCommand::splitTextAtEndIfNeeded):
1814         (khtml::ApplyStyleCommand::splitTextElementAtStartIfNeeded):
1815         (khtml::ApplyStyleCommand::splitTextElementAtEndIfNeeded):
1816         (khtml::areIdenticalElements):
1817         (khtml::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
1818         (khtml::ApplyStyleCommand::mergeEndWithNextIfIdentical):
1819         (khtml::ApplyStyleCommand::cleanUpEmptyStyleSpans):
1820         (khtml::ApplyStyleCommand::addInlineStyleIfNeeded):
1821         (khtml::InsertParagraphSeparatorCommand::doApply):
1822         (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply):
1823         (khtml::InsertTextCommand::prepareForTextInsertion):
1824         (khtml::SplitTextNodeCommand::doUnapply):
1825         (khtml::SplitElementCommand::SplitElementCommand):
1826         (khtml::SplitElementCommand::~SplitElementCommand):
1827         (khtml::SplitElementCommand::doApply):
1828         (khtml::SplitElementCommand::doUnapply):
1829         (khtml::MergeIdenticalElementsCommand::MergeIdenticalElementsCommand):
1830         (khtml::MergeIdenticalElementsCommand::~MergeIdenticalElementsCommand):
1831         (khtml::MergeIdenticalElementsCommand::doApply):
1832         (khtml::MergeIdenticalElementsCommand::doUnapply):
1833         (khtml::WrapContentsInDummySpanCommand::WrapContentsInDummySpanCommand):
1834         (khtml::WrapContentsInDummySpanCommand::~WrapContentsInDummySpanCommand):
1835         (khtml::WrapContentsInDummySpanCommand::doApply):
1836         (khtml::WrapContentsInDummySpanCommand::doUnapply):
1837         (khtml::SplitTextNodeContainingElementCommand::SplitTextNodeContainingElementCommand):
1838         (khtml::SplitTextNodeContainingElementCommand::~SplitTextNodeContainingElementCommand):
1839         (khtml::SplitTextNodeContainingElementCommand::doApply):
1840         * khtml/editing/htmlediting.h:
1841
1842         New layout test that shows the side benefit of this.
1843         
1844         * layout-tests/editing/style/unbold-in-bold-expected.txt: Added.
1845         * layout-tests/editing/style/unbold-in-bold.html: Added.
1846
1847 2005-01-24  Darin Adler  <darin@apple.com>
1848
1849         Reviewed by John.
1850
1851         - fixed <rdar://problem/3933435> -[DOMRange cloneContents] sometimes alters the original DOMRange
1852
1853         * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::processContents): Fixed code that was collapsing
1854         the range after processing the contents. That's right for extract and delete, but not clone.
1855
1856         - fixed <rdar://problem/3714184> inline input works incorrectly when I type Korean slowly in textfield in form on www.google.co.kr
1857         - fixed <rdar://problem/3193848> Can't enter SSN to sign up for Chase visa online account (changing focus inside key press handler)
1858         - fixed <rdar://problem/3874683> REGRESSION (161-162): Crash after typing command-Z to undo after pasting text with newline in it into a text field <input type=text>
1859
1860         * kwq/KWQLineEdit.mm:
1861         (QLineEdit::text): Changed to call a new string method on the controller instead of calling
1862         stringValue, since stringValue has a bad side effect of ending inline input.
1863         (QLineEdit::selectAll): Changed to only call selectText: when the field is already selected.
1864         When you are giving the field focus, it automatically gets all selected, and this change
1865         is required in the case where we defer the focus change.
1866
1867         * kwq/KWQTextField.h: Added a new string method to the controller.
1868         * kwq/KWQTextField.mm:
1869         (-[KWQTextFieldController setMaximumLength:]): Call the new string method instead of using stringValue.
1870         (-[KWQTextFieldController controlTextDidChange:]): Removed the code to truncate at the first CR or LF.
1871         That's now handled in the shouldChangeTextInRange method instead.
1872         (-[KWQTextFieldController textView:shouldHandleEvent:]): Add new logic to defer responder changes until
1873         after the event is handled. This makes sure the key gets into the field that's already handling it at
1874         rather than ending up in the newly-focused field if the key press handler focuses a different element.
1875         (-[KWQTextFieldController textView:didHandleEvent:]): Turn off deferral here, now that the key press
1876         has been handled.
1877         (-[KWQTextFieldController string]): Added. Calls stringValue only if there's no editor. If there is
1878         an editor, calls string on that instead.
1879         (-[KWQTextFieldController textView:shouldChangeTextInRange:replacementString:]): Added. Called by
1880         the three field subclasses. Truncates incoming strings at the first CR or LF character. This works
1881         properly with Undo, and the old technique did not.
1882         (-[KWQTextFieldController preprocessString:]): Added. Helper used for all the setStringValue methods
1883         so they all truncate at the first CR or LF as well as truncating to the appropriate length.
1884         (-[KWQTextField setStringValue:]): Changed to call the controller.
1885         (-[KWQTextField textView:shouldChangeTextInRange:replacementString:]): Added. Calls the controller.
1886         (-[KWQSecureTextField setStringValue:]): More of the same.
1887         (-[KWQSecureTextField textView:shouldChangeTextInRange:replacementString:]): Ditto.
1888         (-[KWQSearchField setStringValue:]): Ditto.
1889         (-[KWQSearchField textView:shouldChangeTextInRange:replacementString:]): Ditto.
1890
1891         * kwq/KWQWidget.h: Added the new setDeferFirstResponderChanges function.
1892         * kwq/KWQWidget.mm:
1893         (QWidget::~QWidget): Clear out the deferredFirstResponder global just in case we are destroyed
1894         while we "have the ball".
1895         (QWidget::hasFocus): If we are in the deferred mode, use the global to decide who to say is focused.
1896         (QWidget::setFocus): If we are in the deferred mode, set the global instead of making something be
1897         the first responder.
1898         (QWidget::setDeferFirstResponderChanges): Set the boolean. If the boolean is being cleared, then
1899         get the deferred first responder and call setFocus on it again, which will do the work we didn't
1900         want to do earlier.
1901
1902 2005-01-24  Ken Kocienda  <kocienda@apple.com>
1903
1904         Reviewed by John
1905
1906         Fix for this bug:
1907         
1908         <rdar://problem/3964350> Deleting all content and typing in a message gets one letter, then beeps
1909
1910         This is a problem with the way we turn key events, when a user starts typing, into editing commands. 
1911         Right now, that initial delete key in an empty window is turned into an editing command, and much 
1912         editing code runs that need not run. What's more, this is confusing the selection machinery. The
1913         solution is to detect the "delete in an empty window" case and don't turn this into an editing
1914         command at all.
1915
1916         * khtml/editing/htmlediting.cpp:
1917         (khtml::TypingCommand::deleteKeyPressed)
1918
1919 2005-01-23  Adele Amchan  <adele@apple.com>
1920
1921         Fixed <rdar://problem/3964286> REGRESSION (178-179): menus and "go to old site" link at Ameritrade's new site don't work
1922
1923         Removed check for document from checkCompleted.  In this case, WebCore never knew that a WebImageView was complete because 
1924         it fell into this document check case in checkCompleted.  
1925         Added check for document to tokenizerProcessedData (see <rdar://problem/3807144>)
1926
1927         Reviewed by Darin.
1928
1929         * khtml/khtml_part.cpp:
1930         (KHTMLPart::stop):
1931         (KHTMLPart::checkCompleted):
1932         * khtml/khtml_part.h:
1933         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::tokenizerProcessedData):
1934
1935 2005-01-21  Richard Williamson   <rjw@apple.com>
1936
1937         Fixed <rdar://problem/3759399> Javascript / Liveconnect problems ((event handler):Undefined value)
1938
1939         Java applets specified with <object> or <embed> weren't scriptable.  Now they are.
1940
1941         Reviewed by Chris.
1942
1943         * khtml/html/html_objectimpl.cpp:
1944         (HTMLEmbedElementImpl::getEmbedInstance):
1945         (HTMLObjectElementImpl::getObjectInstance):
1946
1947 2005-01-21  Ken Kocienda  <kocienda@apple.com>
1948
1949         Reviewed by John
1950
1951         Fix for this bug:
1952         
1953         <rdar://problem/3959464> REGRESSION (Mail): Insertion point goes back to beginning of document after deleting
1954
1955         * khtml/editing/htmlediting.cpp:
1956         (khtml::DeleteSelectionCommand::handleGeneralDelete): Add special case to handle retaining a fully-selected block.
1957         This fixes the bug.
1958         * layout-tests/editing/deleting/delete-3959464-fix-expected.txt: Added.
1959         * layout-tests/editing/deleting/delete-3959464-fix.html: Added.
1960
1961 2005-01-21  Richard Williamson   <rjw@apple.com>
1962
1963         Fixed <rdar://problem/3966998> REGRESSION(179-TOT) clicking on gmail message brings me to blank screen
1964
1965         getElementById() sometimes returns Undefined() instead of Null().
1966
1967         Reviewed by Hyatt.
1968
1969         * khtml/ecma/kjs_dom.cpp:
1970         (DOMDocumentProtoFunc::tryCall):
1971
1972 2005-01-21  David Hyatt  <hyatt@apple.com>
1973
1974         Fix for 3773809, make sure that overflow regions never end up at an invalid scroll offset because of a layout change.
1975         
1976         Reviewed by kocienda
1977
1978         * khtml/rendering/render_layer.cpp:
1979         (RenderLayer::updateScrollInfoAfterLayout):
1980
1981 2005-01-21  David Hyatt  <hyatt@apple.com>
1982
1983         Fix for 3966349, hang loading page.  Make sure that loops using popOneBlock properly check for a null
1984         blockStack to avoid an infinite loop.
1985         
1986         Reviewed by kocienda
1987
1988         * khtml/html/htmlparser.cpp:
1989         (KHTMLParser::parseToken):
1990         (KHTMLParser::insertNode):
1991         (KHTMLParser::popInlineBlocks):
1992
1993 2005-01-21  Ken Kocienda  <kocienda@apple.com>
1994
1995         Reviewed by John
1996
1997         Fix for this bug:
1998         
1999         <rdar://problem/3957204> Mail crashed when sending a message in ~InsertParagraphSeparatorInQuotedContentCommand
2000
2001         * khtml/editing/htmlediting.cpp:
2002         (khtml::InsertParagraphSeparatorInQuotedContentCommand::InsertParagraphSeparatorInQuotedContentCommand):
2003         InsertParagraphSeparatorInQuotedContentCommand has this member variable: DOM::ElementImpl *m_breakNode;
2004         I failed to initialize this variable to null in the constructor, and there is an uncommonly-traveled 
2005         code path which does not set this variable to something good. In the destructor, we check for null, 
2006         and deref if non-null. Obvious "BOOM" potential. Fixed.
2007
2008 2005-01-21  Ken Kocienda  <kocienda@apple.com>
2009
2010         Reviewed by John
2011
2012         Fix for this bug:
2013         
2014         <rdar://problem/3966311> REGRESSION (Mail): Hitting return makes space character disappear
2015
2016         * khtml/editing/htmlediting.cpp:
2017         (khtml::InsertParagraphSeparatorCommand::doApply): When writing the code to insert a block
2018         in response to the return key, I did not write code to cover the case described in the bug.
2019         Now I have.
2020         * layout-tests/editing/inserting/insert-div-025-expected.txt: Added.
2021         * layout-tests/editing/inserting/insert-div-025.html: Added.
2022
2023 2005-01-20  Maciej Stachowiak  <mjs@apple.com>
2024
2025         Reviewed by Ken.
2026
2027         <rdar://problem/3965196> security fix for javascript: exploit missed one case (already fixed in updates)
2028         
2029         * khtml/ecma/kjs_window.cpp:
2030         (WindowFunc::tryCall): correct mistake in earlier fix for the following bug, caught by Adele:
2031
2032 2005-01-20  Maciej Stachowiak  <mjs@apple.com>
2033
2034         Reviewed by Ken.
2035
2036         <rdar://problem/3965466> editing needs to insert text before applying typing style
2037         
2038         * khtml/editing/htmlediting.cpp:
2039         (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): Remove a FIXME comment.
2040         (khtml::InsertLineBreakCommand::doApply): Apply style to the BR
2041         node after inserting it.
2042         (khtml::InsertTextCommand::prepareForTextInsertion): Don't try to
2043         apply style to any new nodes created before inserting.
2044         (khtml::InsertTextCommand::input): Apply style to the inserted range
2045         after doing the text insert.
2046         * khtml/editing/htmlediting.h:
2047
2048         This change leads to improved results on one of the layout tests:
2049         
2050         * layout-tests/editing/inserting/insert-div-024-expected.txt:
2051
2052 === Safari-180 ===
2053
2054 2005-01-20  Ken Kocienda  <kocienda@apple.com>
2055
2056         Reviewed by John
2057
2058         Fix for this bug:
2059         
2060         <rdar://problem/3964646> REGRESSION (179-180): Typing space at end of line makes following paragraph disappear
2061
2062         * khtml/editing/htmlediting.cpp:
2063         (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Recent change to block placeholder removal code 
2064         caused this regression. The code became too aggressive in removing block placeholders, and would remove them
2065         from blocks other than the block containing the selection.
2066         * layout-tests/editing/inserting/insert-div-023-expected.txt: This file had a spurious BR element in it that
2067         I did not notice earlier.
2068         * layout-tests/editing/inserting/insert-div-024-expected.txt: Ditto.
2069
2070 2005-01-20  David Hyatt  <hyatt@apple.com>
2071
2072         Fix for oddness on albertsons.com.  Make sure not to crash when setting/removing style properties on a node
2073         with no document.  The bug # is 3813900.
2074         
2075         Reviewed by john
2076
2077 2005-01-20  David Harrison  <harrison@apple.com>
2078
2079         Reviewed by Darin.
2080
2081         PARTIAL fix for following bug.  Create attributed string with fonts and links.  Still need to add attachments.
2082         <rdar://problem/3942606> AX: Support kAXAttributedStringForTextMarkerRangeParameterizedAttribute
2083         
2084         * kwq/KWQAccObject.mm:
2085         (-[KWQAccObject textUnderElement]):
2086         Touched up previous checkin to match code review comments.
2087         
2088         (-[KWQAccObject value]):
2089         Use plainText for this one instead of obsolete attributedString.
2090         
2091         (-[KWQAccObject accessibilityParameterizedAttributeNames]):
2092         Advertise AXAttributedStringForTextMarkerRange.
2093         
2094         (AXAttributeStringAddFont):
2095         (AXAttributeStringAddElement):
2096         (-[KWQAccObject linkUIElementForNode:]):
2097         (-[KWQAccObject _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
2098         (-[KWQAccObject accessibilityAttributedStringForRange:]):
2099         New routines to support AXAttributedStringForTextMarkerRange.
2100         
2101         (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
2102         Use new routines instead of obsolete attributedString.
2103
2104 2005-01-20  David Harrison  <harrison@apple.com>
2105
2106         Reviewed by Darin.
2107
2108         <rdar://problem/3960196> AX Crash in DOM::Range::setStartBefore
2109
2110         * khtml/xml/dom_docimpl.cpp:
2111         (DocumentImpl::getAccObjectCache):
2112         Adjust when detecting cache in non-top level WebArea.
2113         * kwq/KWQAccObject.mm:
2114         (-[KWQAccObject textUnderElement]):
2115         (-[KWQAccObject accessibilityAttributeValue:]):
2116         Make sure the elements document is the current one for the part.
2117
2118 2005-01-20  Darin Adler  <darin@apple.com>
2119
2120         Reviewed by John.
2121
2122         - fixed <rdar://problem/3922980> Mail not crashing, just quitting itself suddenly in -[WebHTMLView(MailExtras) findString:options:]
2123
2124         * khtml/dom/dom2_range.cpp: (DOM::operator==): Handle null and detached ranges without raising exceptions.
2125         The uncaught exception would make the entire program terminate.
2126
2127         - fixed <rdar://problem/3885729> attempting to modify a computed style does nothing, but should raise a DOM exception
2128
2129         * kwq/DOM-CSS.mm: (-[DOMCSSStyleDeclaration setProperty:::]): Uncommented this code which I had to disable
2130         back in November because Mail was stumbling over it.
2131
2132         - fixed <rdar://problem/3943049> focus() called during onload handler results in square text field on <input type=search>        
2133
2134         * kwq/KWQLineEdit.mm: (QLineEdit::baselinePosition): Change computation so it will work even for fields
2135         that position their text in a way that depends on vertical size. In the case of a search field, the text
2136         is centered, so the old logic was broken.
2137         * kwq/KWQTextField.mm: (-[KWQTextFieldController initWithTextField:QLineEdit:]): Set the frame size to
2138         something large enough to accomodate the field editor. If we start the frame at size 0,0 we run into
2139         AppKit trouble when it insets the frame to figure out the frame for the field editor. In the case of this
2140         bug this happens because we become first responder before being sized and positioned by the HTML layout code.
2141
2142         - improved debugging output when using "po" from gdb with Objective-C DOM
2143
2144         * kwq/DOM.mm:
2145         (-[DOMNode description]): Added. Includes node name ("<tr>") and node value (e.g., string for text node).
2146         (-[DOMRange description]): Tweaked format.
2147
2148 2005-01-19  Richard Williamson   <rjw@apple.com>
2149
2150         After further discussion with Real we have decided to NOT include the
2151         additional CLSID for the real plugin.  See 3958601.
2152
2153         Reviewed by Darin.
2154
2155         * khtml/rendering/render_frames.cpp:
2156         (RenderPartObject::updateWidget):
2157
2158 2005-01-19  David Harrison  <harrison@apple.com>
2159
2160         Reviewed by Maciej.
2161
2162         <rdar://problem/3949429> AX: word marker routines returns incorrect data for empty line
2163
2164         Previous checkin for this bug was missing some of the patch.  Editing snafu with multiple changes in tree.
2165         
2166         * kwq/KWQAccObject.mm:
2167         (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
2168         (-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]):
2169         (-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]):
2170         (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
2171         (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
2172         (-[KWQAccObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
2173         (-[KWQAccObject doAXPreviousParagraphStartTextMarkerForTextMarker:]):
2174
2175 2005-01-19  Ken Kocienda  <kocienda@apple.com>
2176
2177         Reviewed by John
2178
2179         * khtml/editing/htmlediting.cpp:
2180         (khtml::InsertParagraphSeparatorCommand::applyStyleAfterInsertion): Small, cosmetic change John and I decided
2181         to do on my last checkin, but I forgot to do before landing.
2182
2183 2005-01-19  Ken Kocienda  <kocienda@apple.com>
2184
2185         Reviewed by John
2186
2187         Fix for this bug:
2188         
2189         <rdar://problem/3959727> REGRESSION (Mail): Style not preserved on blank lines
2190
2191         * khtml/editing/htmlediting.cpp:
2192         (khtml::CompositeEditCommand::applyStyle):
2193         (khtml::CompositeEditCommand::insertBlockPlaceholder): New function that unconditionally adds a block placeholder.
2194         (khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Now returns bool based on whether
2195         placeholder was added or not.
2196         (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Now searches all the descendents of a block
2197         looking for a placeholder. The old code, which just looked at the last child of a node, started missing
2198         once block placeholders became styled (which started happening with this patch).
2199         (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Now handles applying typing style
2200         to a block placeholder at call time, rather than setting the typing style as a latent style that
2201         might be applied later. This is an important part of the bug fix.
2202         (khtml::DeleteSelectionCommand::doApply): Now uses bool return value from insertBlockPlaceholderIfNeeded()
2203         and passes it along to calculateStyleBeforeInsertion, so the case where a block placeholder needs to
2204         be styled can be detected.
2205         (khtml::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): Changed the way this class
2206         managed style. Before it would calculate and set typing style for the block added. This is not
2207         sufficient. Added blocks need to styled immediately. Some name changes to instance variables in 
2208         this class due to the change to accommodate this change.
2209         (khtml::InsertParagraphSeparatorCommand::~InsertParagraphSeparatorCommand): Name changes, as above.
2210         (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): Ditto.
2211         (khtml::InsertParagraphSeparatorCommand::applyStyleAfterInsertion): Ditto.
2212         (khtml::InsertParagraphSeparatorCommand::doApply): Ditto.
2213         (khtml::ReplaceSelectionCommand::doApply): Improve check for testing when a placeholder
2214         block can be removed in its entirety after the insertion.
2215         * khtml/editing/htmlediting.h: Update header accordingly.
2216         * khtml/khtml_part.cpp:
2217         (KHTMLPart::selectionComputedStyle): Move position for computed style check downstream before
2218         doing check when the position is in an empty block (this makes sure any style on any block
2219         placeholder is accounted for).
2220
2221         New layout tests to check bug fix.
2222
2223         * layout-tests/editing/style/block-style-004-expected.txt: Added.
2224         * layout-tests/editing/style/block-style-004.html: Added.
2225         * layout-tests/editing/style/block-style-005-expected.txt: Added.
2226         * layout-tests/editing/style/block-style-005.html: Added.
2227         * layout-tests/editing/style/block-style-006-expected.txt: Added.
2228         * layout-tests/editing/style/block-style-006.html: Added.
2229
2230         Results updated to reflect new block placeholder code.
2231
2232         * layout-tests/editing/inserting/insert-div-004-expected.txt 
2233         * layout-tests/editing/inserting/insert-div-005-expected.txt
2234         * layout-tests/editing/inserting/insert-div-006-expected.txt
2235         * layout-tests/editing/inserting/insert-div-008-expected.txt
2236         * layout-tests/editing/inserting/insert-div-011-expected.txt
2237         * layout-tests/editing/inserting/insert-div-012-expected.txt
2238         * layout-tests/editing/inserting/insert-div-013-expected.txt
2239         * layout-tests/editing/inserting/insert-div-014-expected.txt
2240         * layout-tests/editing/inserting/insert-div-015-expected.txt
2241         * layout-tests/editing/inserting/insert-div-016-expected.txt
2242         * layout-tests/editing/inserting/insert-div-017-expected.txt
2243         * layout-tests/editing/inserting/insert-div-018-expected.txt
2244         * layout-tests/editing/inserting/insert-div-019-expected.txt
2245         * layout-tests/editing/inserting/insert-div-021-expected.txt
2246         * layout-tests/editing/inserting/insert-div-022-expected.txt
2247         * layout-tests/editing/inserting/insert-div-023-expected.txt
2248         * layout-tests/editing/inserting/insert-div-024-expected.txt
2249
2250 2005-01-19  David Hyatt  <hyatt@apple.com>
2251
2252         Dont null-check the renderer before submitting, since a script can set it to display:none and still expect the
2253         submission to occur.  Fixes bug #3477282.
2254         
2255         Reviewed by kdecker
2256
2257         (DOM::HTMLInputElementImpl::defaultEventHandler):
2258
2259 2005-01-18  Richard Williamson   <rjw@apple.com>
2260         
2261         Fixed several issues all arising from analysis of plugin detection code at ifilm.com:
2262
2263         Fixed <rdar://problem/3958592> can't script plug-ins if plug-in is invoked with <object> element instead of <embed>
2264         Fixed <rdar://problem/3958597> <object> elements with IDs do not show up as named properties of the document
2265         Fixed <rdar://problem/3960973> DOM objects for plugin elements are not accessible
2266         Fixed <rdar://problem/3958601> need an additional class ID in WebCore for the Real plug-in
2267
2268         We now support accessing scriptable plugin objects that are specified with <applet>, <embed>, or <object>
2269         tags.  Also, if any of these elements are named they can be accessed from the document or window objects.
2270         Finally, DOM methods are properties will be forwarded appropriately for the plugin's root scriptable object.
2271
2272         Reviewed by Chris.
2273
2274         * khtml/dom/html_document.cpp:
2275         (HTMLDocument::objects):
2276         * khtml/dom/html_document.h:
2277         * khtml/ecma/kjs_dom.cpp:
2278         (DOMDocumentProtoFunc::tryCall):
2279         (DOMElementProtoFunc::tryCall):
2280         (KJS::getRuntimeObject):
2281         * khtml/ecma/kjs_dom.h:
2282         * khtml/ecma/kjs_html.cpp:
2283         (KJS::HTMLDocument::tryGet):
2284         (KJS::HTMLElement::tryGet):
2285         (KJS::HTMLCollection::tryGet):
2286         (KJS::HTMLCollection::getNamedItems):
2287         * khtml/ecma/kjs_window.cpp:
2288         (Window::get):
2289         * khtml/html/html_miscimpl.cpp:
2290         (HTMLCollectionImpl::traverseNextItem):
2291         * khtml/html/html_miscimpl.h:
2292         (DOM::HTMLCollectionImpl::):
2293         * khtml/html/html_objectimpl.cpp:
2294         (HTMLAppletElementImpl::getAppletInstance):
2295         (HTMLObjectElementImpl::HTMLObjectElementImpl):
2296         (HTMLObjectElementImpl::getObjectInstance):
2297         * khtml/html/html_objectimpl.h:
2298         * khtml/rendering/render_frames.cpp:
2299         (RenderPartObject::updateWidget):
2300         * kwq/KWQKHTMLPart.h:
2301         * kwq/KWQKHTMLPart.mm:
2302         (KWQKHTMLPart::getObjectInstanceForView):
2303
2304 2005-01-18  David Hyatt  <hyatt@apple.com>
2305
2306         Fix for 3948123, rolling over link erases nearby text.  The repaint rect check for lines was wrong whenever
2307         two lines overlapped.
2308         
2309         Reviewed by kocienda
2310
2311         * khtml/rendering/render_flow.cpp:
2312         (RenderFlow::paintLines):
2313
2314 2005-01-18  Ken Kocienda  <kocienda@apple.com>
2315
2316         Reviewed by Hyatt
2317         
2318         Fix for this bug:
2319         
2320         <rdar://problem/3960116> Focus rings paint incorrectly for contenteditable blocks in web pages
2321
2322         * khtml/rendering/render_flow.cpp:
2323         (RenderFlow::addFocusRingRects): Fix painting of focus rings so that ring only paints around
2324         outermost contenteditable elements.
2325
2326 2005-01-18  David Harrison  <harrison@apple.com>
2327
2328         Reviewed by Darin.
2329
2330         <rdar://problem/3959668> accessibilityFocusedUIElement sometimes returns an ignored element; it must not
2331
2332         * kwq/KWQAccObject.mm:
2333         (-[KWQAccObject accessibilityFocusedUIElement]):
2334         Return parentObjectUnignored if focused object is ignored.
2335
2336 2005-01-18  Ken Kocienda  <kocienda@apple.com>
2337
2338         Reviewed by John
2339
2340         Fix for this bug:
2341         
2342         <rdar://problem/3952877> REGRESSION (Mail): Command-left/right-arrows don't work with file attachment
2343
2344         * khtml/editing/selection.cpp:
2345         (khtml::nodeForInlineBox): New helper function used in reimplementation of function below.
2346         (khtml::selectionForLine): Reimplemented using line box smarts. I originally wrote this code when
2347         I had a less than full understanding of line layout. I can do better now, and my new version no
2348         longer fails to notice attachments when doing the kind of navigation mentioned in the bug.
2349
2350 2005-01-17  David Harrison  <harrison@apple.com>
2351
2352         Reviewed by John Sullivan.
2353
2354         <rdar://problem/3949429> AX: word marker routines returns incorrect data for empty line
2355         <rdar://problem/3949848> AX: paragraph marker routines do not work when given a paragraph end marker
2356
2357         Also fixed sentence support in the same way.
2358         
2359         * kwq/KWQAccObject.mm:
2360         (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
2361         (-[KWQAccObject doAXNextSentenceEndTextMarkerForTextMarker:]):
2362         (-[KWQAccObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
2363         (-[KWQAccObject doAXNextParagraphEndTextMarkerForTextMarker:]):
2364         (-[KWQAccObject doAXPreviousParagraphStartTextMarkerForTextMarker:]):
2365         Move one position in desired direction before calling visible_units.cpp code.
2366
2367 2005-01-17  David Harrison  <harrison@apple.com>
2368
2369         Updated expected test results.
2370         
2371         <rdar://problem/3945880> line-ending space seems not to be present
2372
2373         * layout-tests/editing/deleting/delete-ws-fixup-001-expected.txt:
2374         * layout-tests/editing/deleting/delete-ws-fixup-002-expected.txt:
2375         * layout-tests/editing/inserting/insert-div-020-expected.txt:
2376         * layout-tests/editing/inserting/insert-div-021-expected.txt:
2377         * layout-tests/editing/inserting/insert-div-022-expected.txt:
2378         * layout-tests/editing/inserting/insert-div-023-expected.txt:
2379         * layout-tests/editing/inserting/insert-div-024-expected.txt:
2380
2381 2005-01-17  David Harrison  <harrison@apple.com>
2382
2383         Reviewed by Dave Hyatt (bidi.cpp) and Darin Adler (selection.cpp).
2384
2385         <rdar://problem/3945880> line-ending space seems not to be present
2386
2387         * khtml/editing/selection.cpp:
2388         (khtml::Selection::validate):
2389         Extend AFTER_WHITE_SPACE code to support white spac in the middle of paragraphs, not just the end.
2390         * khtml/rendering/bidi.cpp:
2391         (khtml::RenderBlock::findNextLineBreak):
2392         Pick left/rightness of word selection based on being at the end of paragraph (i.e. after a hard line break).
2393
2394 2005-01-17  Darin Adler  <darin@apple.com>
2395
2396         Reviewed by John Louch.
2397
2398         - fixed <rdar://problem/3958503> need screenX and screenY to use WebKit windowFrame delegate
2399
2400         * khtml/ecma/kjs_window.cpp: (Window::get): Change screenX and screenY to use frameGeometry instead
2401         of using mapToGlobal and screen in a complicated way.
2402         * kwq/KWQKHTMLView.mm: Removed unused mapToGlobal function.
2403         * kwq/KWQWindowWidget.h: Ditto.
2404         * kwq/KWQWindowWidget.mm: Ditto.
2405
2406 2005-01-17  David Hyatt  <hyatt@apple.com>
2407
2408         Fix a screwup in rightmost/lowets position computation.  3955207.  Make sure floats with layers are still checked.
2409
2410         Reviewed by kocienda
2411         
2412         * khtml/rendering/render_block.cpp
2413
2414 2005-01-17  Ken Kocienda  <kocienda@apple.com>
2415
2416         Reviewed by John
2417
2418         <rdar://problem/3953366> Problems with typing attributes in HTML compose
2419
2420         * khtml/editing/htmlediting.cpp:
2421         (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Remove misguided "optimization"
2422         that tried to sense when typing style could be cleared without actually doing a style diff between
2423         before-delete and after-delete positions. Removing this extra check and running the 
2424         general-purpose code fixes the bug.
2425
2426 2005-01-17  Richard Williamson   <rjw@apple.com>
2427
2428         Fixed <rdar://problem/3753030> Need to ensure same origin for plugin binding invocations (origin security rules)
2429
2430         Keep track of originating execution context and target execution
2431         context for native JS object wrappers, and perform appropriate
2432         security checks.
2433
2434         Reviewed by David Harrison.
2435
2436         * khtml/ecma/kjs_binding.cpp:
2437         (ScriptInterpreter::isGlobalObject):
2438         (ScriptInterpreter::isSafeScript):
2439         (ScriptInterpreter::interpreterForGlobalObject):
2440         * khtml/ecma/kjs_binding.h:
2441         * khtml/ecma/kjs_window.cpp:
2442         (Window::interpreter):
2443         (Window::isSafeScript):
2444         * khtml/ecma/kjs_window.h:
2445         * kwq/DOMInternal.mm:
2446         (-[WebScriptObject _initializeScriptDOMNodeImp]):
2447         * kwq/KWQKHTMLPart.mm:
2448         (KWQKHTMLPart::windowScriptObject):
2449         (KWQKHTMLPart::windowScriptNPObject):
2450         * kwq/WebCoreBridge.mm:
2451         (rootForView):
2452         (-[WebCoreBridge init]):
2453
2454 2005-01-17  Ken Kocienda  <kocienda@apple.com>
2455
2456         Reviewed by John
2457
2458         Fix for this bug:
2459         
2460         <rdar://problem/3786659> REGRESSION (Mail): editable WebViews don't work with 
2461         "size up" and "size down" NSFontManager changes
2462
2463         * khtml/css/cssparser.cpp:
2464         (CSSParser::parseValue): Add support for parsing new font size delta property.
2465         * khtml/css/cssproperties.c: Generated file.
2466         * khtml/css/cssproperties.h: Ditto.
2467         * khtml/css/cssproperties.in: Add support for parsing new font size delta property.
2468         * khtml/editing/htmlediting.cpp:
2469         (khtml::isEmptyStyleSpan): New helper function. Code existed before, but now factored out for convenient use.
2470         (khtml::CompositeEditCommand::removeNodeAttribute): Does check on value to see it exists before creating
2471         and running command to do the removal.
2472         (khtml::ApplyStyleCommand::doApply): Now calls new applyRelativeFontStyleChange() function as part of its work.
2473         (khtml::ApplyStyleCommand::applyRelativeFontStyleChange): New function that does the "heavy lifting" to handle 
2474         relative font size changes.
2475         (khtml::ApplyStyleCommand::applyInlineStyle): Range check the start and end positions to make sure the start is
2476         before or equal to the end. Swap them if not true. I ran into this problem in some similar code in 
2477         applyRelativeFontStyleChange(). Moving that goodness here too.
2478         (khtml::ApplyStyleCommand::splitTextAtEndIfNeeded): Uses a local variable to save a value used often.
2479         Code is the same, but reads better now. Function now returns bool as well, just like splitTextAtStartIfNeeded.
2480         I use the bool return value now (I obviously did not need it before).
2481         (khtml::ApplyStyleCommand::computedFontSize): New helper function.
2482         (khtml::ApplyStyleCommand::joinChildTextNodes): Ditto.
2483         (khtml::createStyleSpanElement): Ditto.
2484         * khtml/editing/htmlediting.h: Update header accordingly.
2485         * khtml/editing/jsediting.cpp: Add new command string to enable relative font size changes.
2486         * kwq/DOM-CSS.mm:
2487         (-[DOMCSSStyleDeclaration _fontSizeDelta]): New convenience.
2488         (-[DOMCSSStyleDeclaration _setFontSizeDelta:]): Ditto.
2489         * kwq/DOMPrivate.h: Declare new conveniences.
2490         * layout-tests/editing/editing.js: Add new JS to enable relative font size changes, as well as explicit font size setting.
2491         * layout-tests/editing/style/relative-font-size-change-001-expected.txt: Added.
2492         * layout-tests/editing/style/relative-font-size-change-001.html: Added.
2493         * layout-tests/editing/style/relative-font-size-change-002-expected.txt: Added.
2494         * layout-tests/editing/style/relative-font-size-change-002.html: Added.
2495         * layout-tests/editing/style/relative-font-size-change-003-expected.txt: Added.
2496         * layout-tests/editing/style/relative-font-size-change-003.html: Added.
2497         * layout-tests/editing/style/relative-font-size-change-004-expected.txt: Added.
2498         * layout-tests/editing/style/relative-font-size-change-004.html: Added.
2499
2500 2005-01-14  Darin Adler  <darin@apple.com>
2501
2502         * khtml/css/cssproperties.c: Regenerated with gperf 3.0.1.
2503         * khtml/css/cssvalues.c: Regenerated with gperf 3.0.1.
2504         * khtml/misc/htmlattrs.c: Regenerated with gperf 3.0.1.
2505         * khtml/misc/htmltags.c: Regenerated with gperf 3.0.1.
2506
2507 2005-01-14  Chris Blumenberg  <cblu@apple.com>
2508
2509         Fixed: <rdar://problem/3886415> arrow keys don't work when the user hits Back to return to RSS page
2510
2511         Reviewed by hyatt.
2512
2513         (KWQKHTMLPart::openURLFromPageCache): restore mousePressNode
2514         (KWQKHTMLPart::mousePressNode): new
2515         * kwq/KWQPageState.h:
2516         * kwq/KWQPageState.mm:
2517         (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:interpreterBuiltins:]): save the mousePressNode
2518         (-[KWQPageState clear]): clear the mousePressNode
2519         (-[KWQPageState dealloc]): deref the mousePressNode
2520         (-[KWQPageState mousePressNode]): new
2521
2522 === Safari-179 ===
2523
2524 2005-01-13  Vicki Murley <vicki@apple.com>
2525
2526         Reviewed by Adele.
2527
2528         - fix <rdar://problem/3946836> Safari about box lists 2004 instead of 2005
2529
2530         * WebCore.pbproj/project.pbxproj: bump "2004" to "2005"
2531
2532 2005-01-13  David Harrison  <harrison@apple.com>
2533
2534         Reviewed by Ken Kocienda.
2535         
2536         Better fix for 3905066.
2537         
2538         * khtml/editing/htmlediting.cpp:
2539         (khtml::InsertParagraphSeparatorCommand::doApply):
2540
2541 2005-01-10  Maciej Stachowiak  <mjs@apple.com>
2542
2543         Reviewed by Darin.
2544
2545         <rdar://problem/3758033> REGRESSION (Mail): Support attributes in marked text (International input)
2546         
2547         * khtml/rendering/render_text.cpp:
2548         (InlineTextBox::paint): Support painting custom underline markers for
2549         marked text in place of generic yellow.
2550         (InlineTextBox::paintMarkedTextUnderline): New method that handles this.
2551         * khtml/rendering/render_text.h:
2552         * kwq/KWQKHTMLPart.h: Declare new methods and structs.
2553         * kwq/KWQKHTMLPart.mm:
2554         (KWQKHTMLPart::clear): Clear marked test underlines.
2555         (KWQKHTMLPart::setMarkedTextRange): Takes attributes and ranges now.
2556         (convertAttributesToUnderlines): Converts NSAttributedString attributes
2557         to simplified and C++-friendly form.
2558         (KWQKHTMLPart::markedTextUsesUnderlines): New method.
2559         (KWQKHTMLPart::markedTextUnderlines): New method.
2560         * kwq/KWQPainter.mm:
2561         (QPainter::drawLineForText): Handle pen width.
2562         * kwq/WebCoreBridge.h:
2563         * kwq/WebCoreBridge.mm:
2564         (-[WebCoreBridge setMarkedTextDOMRange:customAttributes:ranges:]): Take attributes
2565         and ranges.
2566         * kwq/WebCoreTextRenderer.h:
2567
2568 2005-01-12  David Harrison  <harrison@apple.com>
2569
2570         Reviewed by Dave Hyatt.
2571
2572         <rdar://problem/3888973> AX: Parent AXWebArea of nested AXWebAreas is messed up
2573         
2574         * kwq/KWQAccObject.mm:
2575         (-[KWQAccObject addChildrenToArray:]):
2576         Use the widget's outer view.
2577
2578 2005-01-12  David Harrison  <harrison@apple.com>
2579
2580         Reviewed by Darin Adler.
2581
2582         <rdar://problem/3949908> Crash when asking for the kAXLengthForTextMarkerRangeParameterizedAttribute
2583         
2584         * khtml/xml/dom_nodeimpl.cpp:
2585         (NodeImpl::displayNode):
2586         Add quotes around text node content.
2587         (NodeBaseImpl::childNode):
2588         Add nil check to return nil rather than crash when child node not found.
2589         * kwq/KWQAccObject.mm:
2590         (-[KWQAccObject doAXStringForTextMarkerRange:]):
2591         Pass range compliant positions to TextIterator.
2592
2593 2005-01-12  David Hyatt  <hyatt@apple.com>
2594
2595         Fix for 3951203, CSS border style incorrectly clipped on inline elements.  Make sure the repaint rect set during
2596         line layout is smarter about including the overflow for both old states and new states.
2597         
2598         Reviewed by john
2599
2600         * khtml/rendering/bidi.cpp:
2601         (khtml::RenderBlock::layoutInlineChildren):
2602
2603 2005-01-12  David Hyatt  <hyatt@apple.com>
2604
2605         Fix for bug 3937608, versiontracker.com flashes and displays the right column below content.  Make sure to move
2606         tables/overflows that dont fit within a block only in strict mode.
2607
2608         Fix for bug 3931049, characters dont show up when typing.  Make sure to dirty the right lines when this specific
2609         case in editing is hit.
2610         
2611         Reviewed by darin (first one), kocienda (second one)
2612
2613         * khtml/rendering/render_block.cpp:
2614         (khtml::RenderBlock::getClearDelta):
2615         * khtml/rendering/render_flow.cpp:
2616         (RenderFlow::dirtyLinesFromChangedChild):
2617         * khtml/rendering/render_line.cpp:
2618         (khtml::InlineFlowBox::verticallyAlignBoxes):
2619
2620 2005-01-12  Ken Kocienda  <kocienda@apple.com>
2621
2622         Reviewed by John
2623
2624         Fix for this bug:
2625         
2626         <rdar://problem/3926142> REGRESSION (Mail): Deleting text decreases quote level
2627
2628         * khtml/editing/htmlediting.cpp:
2629         (khtml::DeleteSelectionCommand::initializePositionData): Change test that will prevent block
2630         merging. End-of-line test was just wrong. Call new start-of and end-of paragraph functions
2631         added to visible_position files.
2632         (khtml::DeleteSelectionCommand::moveNodesAfterNode): Add tests for BR elements, which makes
2633         tests to determine when to stop moving nodes more complete and correct. Also improved comments.
2634         * khtml/editing/visible_position.cpp:
2635         (khtml::isFirstVisiblePositionInParagraph): New function.
2636         (khtml::isLastVisiblePositionInParagraph): New function.
2637         * khtml/editing/visible_position.h: Update header accordingly.
2638         * layout-tests/editing/deleting/delete-block-merge-contents-002-expected.txt: New results, slightly different from former
2639         results but still correct.
2640         * layout-tests/editing/deleting/delete-block-merge-contents-007-expected.txt: Ditto.
2641         * layout-tests/editing/deleting/delete-block-merge-contents-018-expected.txt: Added.
2642         * layout-tests/editing/deleting/delete-block-merge-contents-018.html: Added.
2643         * layout-tests/editing/deleting/delete-block-merge-contents-019-expected.txt: Added.
2644         * layout-tests/editing/deleting/delete-block-merge-contents-019.html: Added.
2645         * layout-tests/editing/deleting/delete-block-merge-contents-020-expected.txt: Added.
2646         * layout-tests/editing/deleting/delete-block-merge-contents-020.html: Added.
2647         * layout-tests/editing/deleting/delete-block-merge-contents-021-expected.txt: Added.
2648         * layout-tests/editing/deleting/delete-block-merge-contents-021.html: Added.
2649         * layout-tests/editing/deleting/delete-line-014-expected.txt: These new results are actually better, and fix a bug.
2650
2651 2005-01-11  Richard Williamson   <rjw@apple.com>
2652
2653         Fixed 3922875.  Fall back to DOM object is EMBED element
2654         has no associated runtime object.
2655
2656         Reviewed by Chris.
2657
2658         * khtml/ecma/kjs_dom.cpp:
2659         (KJS::getRuntimeObject):
2660         * khtml/ecma/kjs_html.cpp:
2661         (KJS::HTMLDocument::tryGet):
2662         (KJS::HTMLElement::tryGet):
2663         (KJS::HTMLCollection::tryGet):
2664         (KJS::HTMLCollection::getNamedItems):
2665
2666 2005-01-11  David Hyatt  <hyatt@apple.com>
2667
2668         Fix for 3882299, missing content on gibson.com.  Change our handling of " and ' in certain states of the parser to match
2669         other browsers.
2670         
2671         Reviewed by Maciej
2672
2673         * khtml/html/htmltokenizer.cpp:
2674         (khtml::HTMLTokenizer::parseTag):
2675
2676 2005-01-11  Chris Blumenberg  <cblu@apple.com>
2677
2678         Fixed: <rdar://problem/3930733> Mail prints second page of email blank
2679
2680         Reviewed by dave.
2681
2682         * khtml/rendering/render_canvas.cpp:
2683         (RenderCanvas::paint): cache the print rect since the dirty rect can get changed during printing
2684         * khtml/rendering/render_flow.cpp:
2685         (RenderFlow::paintLines): removed null check since the print rect should never be null
2686         * khtml/rendering/render_list.cpp:
2687         (RenderListMarker::paint): ditto
2688         * kwq/KWQKHTMLPart.mm:
2689         (KWQKHTMLPart::adjustPageHeight): don't set the print rect here since this method is not called for the last page
2690
2691 2005-01-10  Ken Kocienda  <kocienda@apple.com>
2692
2693         Reviewed by Hyatt
2694
2695         Fix for this bug:
2696         
2697         <rdar://problem/3943648> extra line is inserted after pressing return within quoted text of reply
2698
2699         * khtml/editing/htmlediting.cpp:
2700         (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): This bug was the result of a 
2701         simple coding mistake. A local variable was erroneously redefined in a deeper scope, and so the 
2702         result calculated in that deeper scope was not available when tested.
2703
2704 2005-01-10  Ken Kocienda  <kocienda@apple.com>
2705
2706         Reviewed by John
2707
2708         Fix for this bug:
2709         
2710         <rdar://problem/3946852> Option-e goes to next line
2711
2712         * khtml/editing/htmlediting.cpp:
2713         (khtml::ReplaceSelectionCommand::doApply): Tweak case used to determine when merging content
2714         into the start line is done. We plan to change pretty substantially soon to better handle
2715         the problem described in <rdar://problem/3937352> Quote level not maintained when copied 
2716         and pasted within a Mail message. In the meantime, this change does no harm, and fixes the bug.
2717
2718 2005-01-10  Ken Kocienda  <kocienda@apple.com>
2719
2720         Reviewed by Darin
2721
2722         Fix for this bug:
2723         
2724         <rdar://problem/3907005> Applying block styles to a line of text can unexpectedly affect other lines
2725
2726         * khtml/editing/htmlediting.cpp:
2727         (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): New function which moves "paragraphs"
2728         to their own blocks if needed so that a block style can be applied.
2729         (khtml::CompositeEditCommand::isMailBlockquote): Moved this function to base class so it can be used more generally.
2730         (khtml::ApplyStyleCommand::applyBlockStyle): Pass a node instead of a block to addBlockStyleIfNeeded().
2731         (khtml::ApplyStyleCommand::addBlockStyleIfNeeded): Now accepts a node instead of a block for styling.
2732         This function also now calls moveParagraphContentsToNewBlockIfNecessary() to make sure that only the current
2733         paragraph is styled.
2734         (khtml::SetNodeAttributeCommand::doUnapply): Should not assert on undo if old value of attribute was null.
2735         Should remove attributue instead.
2736         * khtml/editing/htmlediting.h: Touch function declarations accordingly.
2737         * layout-tests/editing/style/create-block-for-style-001-expected.txt: Added.
2738         * layout-tests/editing/style/create-block-for-style-001.html: Added.
2739         * layout-tests/editing/style/create-block-for-style-002-expected.txt: Added.
2740         * layout-tests/editing/style/create-block-for-style-002.html: Added.
2741         * layout-tests/editing/style/create-block-for-style-003-expected.txt: Added.
2742         * layout-tests/editing/style/create-block-for-style-003.html: Added.
2743         * layout-tests/editing/style/create-block-for-style-004-expected.txt: Added.
2744         * layout-tests/editing/style/create-block-for-style-004.html: Added.
2745         * layout-tests/editing/style/create-block-for-style-005-expected.txt: Added.
2746         * layout-tests/editing/style/create-block-for-style-005.html: Added.
2747         * layout-tests/editing/style/create-block-for-style-006-expected.txt: Added.
2748         * layout-tests/editing/style/create-block-for-style-006.html: Added.
2749         * layout-tests/editing/style/create-block-for-style-007-expected.txt: Added.
2750         * layout-tests/editing/style/create-block-for-style-007.html: Added.
2751         * layout-tests/editing/style/create-block-for-style-008-expected.txt: Added.
2752         * layout-tests/editing/style/create-block-for-style-008.html: Added.
2753         * layout-tests/editing/style/create-block-for-style-009-expected.txt: Added.
2754         * layout-tests/editing/style/create-block-for-style-009.html: Added.
2755         * layout-tests/editing/style/create-block-for-style-010-expected.txt: Added.
2756         * layout-tests/editing/style/create-block-for-style-010.html: Added.
2757         * layout-tests/editing/style/create-block-for-style-011-expected.txt: Added.
2758         * layout-tests/editing/style/create-block-for-style-011.html: Added.
2759         * layout-tests/editing/style/create-block-for-style-012-expected.txt: Added.
2760         * layout-tests/editing/style/create-block-for-style-012.html: Added.
2761         * layout-tests/editing/style/create-block-for-style-013-expected.txt: Added.
2762         * layout-tests/editing/style/create-block-for-style-013.html: Added.
2763
2764         Unrelated updates to these expected results.
2765         * layout-tests/editing/inserting/insert-div-007-expected.txt
2766         * layout-tests/editing/pasteboard/paste-text-013-expected.txt
2767
2768 2005-01-10  Chris Blumenberg  <cblu@apple.com>
2769
2770         Fixed: <rdar://problem/3936844> Mail: Messages with rich text do not print
2771
2772         Reviewed by john.
2773
2774         * khtml/rendering/render_flow.cpp:
2775         (RenderFlow::paintLines): don't do pagination work if printRect is not set
2776         * khtml/rendering/render_list.cpp:
2777         (RenderListMarker::paint): ditto
2778
2779 2005-01-10  David Harrison  <harrison@apple.com>
2780
2781         Reviewed by Darin.
2782
2783         * kwq/KWQTextUtilities.mm:
2784         (currentTextBreakLocaleID):
2785         Return empty string (AKA root locale) if locale pref can not be canonicalized.
2786
2787 2005-01-10  John Sullivan  <sullivan@apple.com>
2788
2789         Fixed broken Panther build.
2790
2791         * kwq/KWQTextUtilities.mm:
2792         (currentTextBreakLocaleID):
2793         This recently-added function was using code copy/pasted from CarbonCore UnicodeUtilities.
2794         That code used a Tiger-only function, CFLocaleCreateCanonicalLanguageIdentifierFromString.
2795         To fix the build, I added a BUILDING_ON_PANTHER #ifdef that avoids the call to the Tiger
2796         function. However, the Tiger-only code was wrong; the string generated using 
2797         CFLocaleCreateCanonicalLanguageIdentifierFromString was not used at all, so I fixed that
2798         as well.
2799
2800 2005-01-09  David Harrison  <harrison@apple.com>
2801
2802         Reviewed by Ken Kocienda.
2803
2804         <rdar://problem/3786362> REGRESSION (Mail): pasted text loses one newline
2805         
2806         * khtml/editing/htmlediting.cpp:
2807         (khtml::ReplaceSelectionCommand::doApply):
2808         Tune check for need for insertParagraphSeparator when hasInterchangeNewline.
2809
2810 2005-01-09  Darin Adler  <darin@apple.com>
2811
2812         Reviewed by Harrison.
2813
2814         - fixed <rdar://problem/3939176> select() method does not work on <input type=search>
2815
2816         * khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::select): Changed if statement
2817         to a switch statement. Added SEARCH to the set of types that treat the renderer as a
2818         RenderLineEdit.
2819
2820 2005-01-09  David Harrison  <harrison@apple.com>
2821
2822         Reviewed by Ken Kocienda.
2823
2824         <rdar://problem/3905066> REGRESSION (Mail): Hitting return key with caret in front of space causes space to become lost (resize fixes)
2825
2826         Problem was that InsertParagraphSeparatorCommand::doApply() was not collapsing
2827         whitespace to a single non-breaking space when splitting a text node.
2828
2829         * khtml/editing/htmlediting.cpp:
2830         (khtml::InsertParagraphSeparatorCommand::doApply):
2831
2832 2005-01-08  Kevin Decker  <kdecker@apple.com>
2833
2834         Reviewed by Ken.
2835
2836         Fixed: <rdar://problem/3924219> Calling setOuterHTML: on a DOMHTMLHtmlElement can crash a program
2837
2838         * khtml/html/html_elementimpl.cpp:
2839         (HTMLElementImpl::setOuterHTML): Added a nil check for fragments who don't have parents.
2840
2841 2005-01-07  Maciej Stachowiak  <mjs@apple.com>
2842
2843         Reviewed by Darin.
2844         
2845         <rdar://problem/3807144> REGRESSION (125-TOT): my bank's website doesn't work (Societe Generale, socgen.com)
2846
2847         * Khtml/khtml_part.cpp:
2848         (KHTMLPart::checkCompleted): If the document is NULL, assume this frame has
2849         not started loading yet so it could not possibly be finishing here...
2850         (KHTMLPart::stop): ...unless the part is explicitly stopped and there is still
2851         no document, in this case we must have hit an error or been loading a non-HTML
2852         frame.
2853         * khtml/khtml_part.h:
2854
2855 2005-01-08  David Harrison  <harrison@apple.com>
2856
2857         Reviewed by Maciej.
2858
2859         <rdar://problem/3943415> REGRESSION (Mail): double-clicking past word selects previous word instead of only blank space
2860         
2861         * khtml/editing/selection.cpp:
2862         (khtml::Selection::validate):
2863         Tune word selections left/right choice to use right if on empty last line.
2864
2865 2005-01-07  David Harrison  <harrison@apple.com>
2866
2867         Reviewed by Darin.
2868
2869         <rdar://problem/3942619> AX: Support sentence ax attributes
2870
2871         Needed to use the unicode utilities properly.  Twas lame before.
2872
2873         * khtml/editing/visible_units.cpp:
2874         (khtml::previousBoundary):
2875         (khtml::nextBoundary):
2876         (khtml::startOfWord):
2877         (khtml::endOfWord):
2878         (khtml::previousWordPosition):
2879         (khtml::nextWordPosition):
2880         (khtml::startOfSentence):
2881         (khtml::endOfSentence):
2882         (khtml::previousSentencePosition):
2883         (khtml::nextSentencePosition):
2884         * kwq/KWQAccObject.mm:
2885         (-[KWQAccObject accessibilityAttributeNames]):
2886         (-[KWQAccObject accessibilityAttributeValue:]):
2887         (-[KWQAccObject accessibilityParameterizedAttributeNames]):
2888         (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
2889         * kwq/KWQTextUtilities.mm:
2890         (currentTextBreakLocaleID):
2891         (KWQFindSentenceBoundary):
2892         (KWQFindNextSentenceFromIndex):
2893
2894 2005-01-07  Ken Kocienda  <kocienda@apple.com>
2895
2896         Reviewed by Kevin
2897
2898         Fix for these bugs:
2899         
2900         <rdar://problem/3939523> in some cases, text does not retain style info after pressing return twice
2901         <rdar://problem/3944492> after pressing return twice, text is bold when it shouldn't be
2902
2903         * khtml/editing/htmlediting.cpp:
2904         (khtml::InsertParagraphSeparatorCommand::setFullTypingStyleBeforeInsertion):
2905         Merge the typing style with the computed style for the current position. Fixes both bugs.
2906         * khtml/editing/htmlediting.h:
2907         * layout-tests/editing/inserting/insert-div-023-expected.txt: Added.
2908         * layout-tests/editing/inserting/insert-div-023.html: Added.
2909         * layout-tests/editing/inserting/insert-div-024-expected.txt: Added.
2910         * layout-tests/editing/inserting/insert-div-024.html: Added.
2911
2912 2005-01-07  David Hyatt  <hyatt@apple.com>
2913
2914         Fix for 3941364, make sure tables reset overflowWidth/Height when they lay out again.  Fixes the odd scrolling
2915         behavior on worldofwarcraft.com.
2916         
2917         Reviewed by kevin
2918
2919         * khtml/rendering/render_table.cpp:
2920         (RenderTable::layout):
2921
2922 2005-01-06  David Hyatt  <hyatt@apple.com>
2923
2924         Fix for 3932418 and 3920998, assertion failures caused by stray inline content inside tables.  Bulletproof the hit testing to
2925         ignore inline flows in this case.
2926         
2927         Reviewed by kevin
2928
2929         * khtml/rendering/render_block.cpp:
2930         (khtml::RenderBlock::nodeAtPoint):
2931
2932 2005-01-07  Ken Kocienda  <kocienda@apple.com>
2933
2934         Reviewed by Hyatt
2935
2936         Fix for this bug:
2937         
2938         <rdar://problem/3848412> for forwarded message, tabbing to message view scrolls to bottom of view
2939
2940         * kwq/KWQKHTMLPart.mm:
2941         (KWQKHTMLPart::nextKeyViewInFrame): Don't scroll the focus node to visible if it is not
2942         in the document, or if it is not a descendent of the document element. In the case of the bug,
2943         since the selection has not yet been set up, the focus node passed here is the HTML element, and
2944         that does not yield a rect that is useful to us here. So now, in the case the bug mentions, we do nothing.
2945
2946 2005-01-06  Kevin Decker  <kdecker@apple.com>
2947
2948         Reviewed by mjs.
2949
2950         Fixed: <rdar://problem/3932215> REGRESSION (125-177): iFrame example at developer.apple.com fails in Safari
2951
2952         * khtml/khtml_part.cpp:
2953         (KHTMLPart::processObjectRequest): m_bComplete was never true for frames generated by Javascript due to our synchronous loading and as a result, scheduled redirects wouldn't fire in KHTMLPart::scheduleLocationChange().  By virtue of being an empty document, a document is complete.  In this special case it's safe at this point to call checkCompleted() which sets m_bComplete true. 
2954
2955 === Safari-178 ===
2956
2957 2005-01-06  David Harrison  <harrison@apple.com>
2958
2959         Reviewed by Chris.
2960
2961         (addendum to previous checkin for this bug) 
2962         <rdar://problem/3776056> AX: Editable HTML should not be viewed as AXStaticText
2963
2964         Fix line navigation.  Add AXUIElementForTextMarker.
2965
2966         * kwq/KWQAccObject.mm:
2967         (-[KWQAccObject accessibilityParameterizedAttributeNames]):
2968         (-[KWQAccObject doAXUIElementForTextMarker:]):
2969         (-[KWQAccObject doAXLineForTextMarker:]):
2970         (-[KWQAccObject doAXTextMarkerRangeForLine:]):
2971         (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
2972         (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
2973         (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
2974         (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
2975
2976 2005-01-06  Darin Adler  <darin@apple.com>
2977
2978         Reviewed by Ken.
2979
2980         - re-fixed <rdar://problem/3760910> Request to include support for custom tag names in HTML (they already work in XML)
2981
2982         (turns out the PLT regression was a false alarm)
2983
2984         * khtml/html/htmlparser.h: Change forbidden tag array to be allocated in the object rather than on
2985         the heap. Also use ID_LAST_TAG for the array size; the old code used ID_CLOSE_TAG which is now a
2986         much larger number.
2987         * khtml/html/htmlparser.cpp:
2988         (KHTMLParser::KHTMLParser): Remove code that creates the forbidden tag array on the heap; makes more
2989         sense to just have the array be a member so we don't have to use new and delete on it. Also needed
2990         to eliminate code that used ID_CLOSE_TAG for an array size.
2991         (KHTMLParser::~KHTMLParser): Remove code that deletes the forbidden tag array. Also changed the code
2992         that manages isindex to use deref instead of delete.
2993         (KHTMLParser::reset): Use safer sizeof for clearing the forbidden tag array. Old code had the
2994         mistake of using ID_CLOSE_TAG for the array size too.
2995         (KHTMLParser::parseToken): Removed code that checks for bogus tags; it's not clear why it was ever
2996         there and it would prevent custom tags from working. Added range check before using the forbidden
2997         tag array with the token ID since custom tags will use index values past the end of the array.
2998         (KHTMLParser::getElement): Removed most of the code that makes an element by ID; now the work is done
2999         inside the DocumentImpl createHTMLElement. Any code that needs to be different than a dynamic
3000         createElement call is still here. Last time I left out a few form element types from this switch;
3001         fixed now.
3002         * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Call the tagId function in the
3003         document if getTagID fails; this creates a unique per-document ID.
3004
3005         * khtml/misc/htmltags.c: Regenerated.
3006         * khtml/misc/htmltags.h: Regenerated.
3007
3008         * khtml/misc/maketags: Changed the generated constants to use "const unsigned short" instead of "#define".
3009         Changed ID_CLOSE_TAG to be a fixed value of 32000 rather than being just past the IDs of the HTML tags.
3010         Also rewrote getTagName to work with the new scheme.
3011
3012 2005-01-06  David Harrison  <harrison@apple.com>
3013         
3014         Fixed Panther build.  Also, do not advertize sentence support since it is incomplete.
3015         
3016         * kwq/KWQAccObject.mm:
3017         (-[KWQAccObject visiblePositionForEndOfTextMarkerRange:]):
3018         (-[KWQAccObject accessibilityParameterizedAttributeNames]):
3019         (-[KWQAccObject accessibilityIsAttributeSettable:]):
3020
3021 2005-01-06  David Harrison  <harrison@apple.com>
3022
3023         Reviewed by Dave Hyatt.
3024
3025         <rdar://problem/3776056> AX: Editable HTML should not be viewed as AXStaticText
3026         <rdar://problem/3588548> AX: tabbing does not work correctly with the screen reader and a focused link; need AXFocusedUIElement to work
3027         
3028         Many more AX attributes supported.  Numerous fixes to previous AX work.
3029         
3030         * khtml/editing/visible_units.cpp:
3031         (khtml::startSentenceBoundary):
3032         (khtml::startOfSentence):
3033         (khtml::endSentenceBoundary):
3034         (khtml::endOfSentence):
3035         (khtml::previousSentencePositionBoundary):
3036         (khtml::previousSentencePosition):
3037         (khtml::nextSentencePositionBoundary):
3038         (khtml::nextSentencePosition):
3039         * khtml/editing/visible_units.h:
3040         * khtml/khtmlview.cpp:
3041         (KHTMLView::layout):
3042         * khtml/misc/helper.cpp:
3043         (khtml::findSentenceBoundary):
3044         (khtml::nextSentenceFromIndex):
3045         * khtml/misc/helper.h:
3046         * khtml/misc/htmltags.c:
3047         (hash_tag):
3048         (findTag):
3049         * khtml/rendering/render_container.cpp:
3050         (RenderContainer::removeChildNode):
3051         (RenderContainer::appendChildNode):
3052         (RenderContainer::insertChildNode):
3053         * khtml/rendering/render_object.cpp:
3054         (RenderObject::remove):
3055         * khtml/xml/dom_docimpl.cpp:
3056         (DocumentImpl::getAccObjectCache):
3057         (DocumentImpl::updateSelection):
3058         (DocumentImpl::close):
3059         (DocumentImpl::setFocusNode):
3060         (DocumentImpl::parentDocument):
3061         (DocumentImpl::topDocument):
3062         * khtml/xml/dom_docimpl.h:
3063         * kwq/KWQAccObject.mm:
3064         (-[KWQAccObject accessibilityShouldUseUniqueId]):
3065         (-[KWQAccObject detach]):
3066         (-[KWQAccObject anchorElement]):
3067         (-[KWQAccObject firstChild]):
3068         (-[KWQAccObject lastChild]):
3069         (-[KWQAccObject previousSibling]):
3070         (-[KWQAccObject nextSibling]):
3071         (-[KWQAccObject parentObject]):
3072         (-[KWQAccObject value]):
3073         (-[KWQAccObject accessibilityAttributeNames]):
3074         (-[KWQAccObject accessibilityPerformAction:]):
3075         (-[KWQAccObject textMarkerForVisiblePosition:]):
3076         (-[KWQAccObject visiblePositionForTextMarker:]):
3077         (-[KWQAccObject textMarkerRangeFromVisiblePositions:andEndPos:]):
3078         (-[KWQAccObject topDocument]):
3079         (-[KWQAccObject topRenderer]):
3080         (-[KWQAccObject topView]):
3081         (-[KWQAccObject accessibilityAttributeValue:]):
3082         (-[KWQAccObject accessibilityParameterizedAttributeNames]):
3083         (-[KWQAccObject doAXLineForTextMarker:]):
3084         (-[KWQAccObject doAXTextMarkerRangeForLine:]):
3085         (-[KWQAccObject doAXStringForTextMarkerRange:]):
3086         (-[KWQAccObject doAXTextMarkerForPosition:]):
3087         (-[KWQAccObject doAXBoundsForTextMarkerRange:]):
3088         (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
3089         (-[KWQAccObject doAXTextMarkerRangeForUnorderedTextMarkers:]):
3090         (-[KWQAccObject doAXNextTextMarkerForTextMarker:]):
3091         (-[KWQAccObject doAXPreviousTextMarkerForTextMarker:]):
3092         (-[KWQAccObject doAXLeftWordTextMarkerRangeForTextMarker:]):
3093         (-[KWQAccObject doAXRightWordTextMarkerRangeForTextMarker:]):
3094         (-[KWQAccObject doAXLeftLineTextMarkerRangeForTextMarker:]):
3095         (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
3096         (-[KWQAccObject doAXSentenceTextMarkerRangeForTextMarker:]):
3097         (-[KWQAccObject doAXParagraphTextMarkerRangeForTextMarker:]):
3098         (-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]):
3099         (-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]):
3100         (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
3101         (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
3102         (-[KWQAccObject doAXNextSentenceEndTextMarkerForTextMarker:]):
3103         (-[KWQAccObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
3104         (-[KWQAccObject doAXNextParagraphEndTextMarkerForTextMarker:]):
3105         (-[KWQAccObject doAXPreviousParagraphStartTextMarkerForTextMarker:]):
3106         (-[KWQAccObject doAXLengthForTextMarkerRange:]):
3107         (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
3108         (-[KWQAccObject accessibilityHitTest:]):
3109         (-[KWQAccObject accessibilityFocusedUIElement]):
3110         (-[KWQAccObject accessibilityIsAttributeSettable:]):
3111         (-[KWQAccObject doSetAXSelectedTextMarkerRange:]):
3112         (-[KWQAccObject setAccObjectID:]):
3113         (-[KWQAccObject removeAccObjectID]):
3114         * kwq/KWQAccObjectCache.h:
3115         * kwq/KWQAccObjectCache.mm:
3116         (KWQAccObjectCache::setAccObject):
3117         (KWQAccObjectCache::removeAccObject):
3118         (KWQAccObjectCache::visiblePositionForTextMarker):
3119         (KWQAccObjectCache::postNotificationToTopWebArea):
3120         (KWQAccObjectCache::postNotification):
3121         (KWQAccObjectCache::handleFocusedUIElementChanged):
3122         * kwq/KWQKHTMLPart.mm:
3123         (KWQKHTMLPart::respondToChangedContents):
3124         * kwq/KWQTextUtilities.h:
3125         * kwq/KWQTextUtilities.mm:
3126         (KWQFindNextWordFromIndex):
3127         (KWQFindSentenceBoundary):
3128         (KWQFindNextSentenceFromIndex):
3129         * kwq/WebCoreBridge.mm:
3130         (-[WebCoreBridge accessibilityTree]):
3131
3132 2005-01-05  Darin Adler  <darin@apple.com>
3133
3134         Reviewed by Ken.
3135
3136         - re-landing a subset of my custom tag change that does not fix the bug, but also does
3137           not introduce a performance regression
3138
3139         * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Changed
3140         some code that used ID_LAST_TAG in a slightly wrong, but harmless, way.
3141
3142         * khtml/editing/htmlediting.cpp:
3143         (khtml::debugPosition): Use nodeName rather than getTagName, since the latter works for
3144         per-document tags and is just better all around for things like the document.
3145         (khtml::debugNode): Ditto.
3146         * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Ditto.
3147         * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
3148         * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Ditto.
3149         * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.
3150
3151         * khtml/html/dtd.cpp: (DOM::checkChild): Use ID_LAST_TAG rather than 1000 for the check that allows
3152         non-HTML elements to be nested as desired.
3153
3154         * khtml/misc/htmlhashes.h: Changed return types to unsigned short.
3155         * khtml/misc/htmlhashes.cpp:
3156         (khtml::getTagID): Changed return type to unsigned short.
3157         (khtml::getAttrID): Ditto.
3158
3159         * khtml/xml/dom_docimpl.h: Added overload of createHTMLElement, made it non-virtual since it's not overriden.
3160         * khtml/xml/dom_docimpl.cpp:
3161         (DocumentImpl::createHTMLElement): Refactored into two separate functions, one that takes the tag ID.
3162         Also updated for a few tags that the parser handled but this did not.
3163
3164         * kwq/KWQRenderTreeDebug.cpp:
3165         (getTagName): Added. Works for custom nodes, because it calls nodeName rather than using getTagName on
3166         the tag ID directly, which only works for standard nodes.
3167         (operator<<): Update to call getTagName.
3168         (nodePositionRelativeToRoot): Ditto.
3169         (writeSelection): Ditto.
3170
3171 2005-01-05  Ken Kocienda  <kocienda@apple.com>
3172
3173         Reviewed by Hyatt
3174
3175         Fix for this bug:
3176         
3177         <rdar://problem/3941203> REGRESSION (Mail): Paste inserts content in wrong place
3178
3179         * khtml/editing/htmlediting.cpp:
3180         (khtml::ReplaceSelectionCommand::doApply): Some cleanup and refinement of the concepts used to make
3181         this operation work correctly, particularly in the logic to figure out whether to merge content, and
3182         also performing merges.
3183         * khtml/editing/visible_position.cpp:
3184         (khtml::isFirstVisiblePositionInBlock): Simplification of test used to make this determination.
3185         * khtml/editing/visible_units.cpp:
3186         (khtml::isStartOfParagraph): New helper, used in khtml::ReplaceSelectionCommand::doApply().
3187         (khtml::isEndOfParagraph): Ditto.
3188         * khtml/editing/visible_units.h: Declare new functions.
3189
3190 2005-01-04  Ken Kocienda  <kocienda@apple.com>
3191
3192         Reviewed by John
3193
3194         Fix for this bug:
3195         
3196         <rdar://problem/3926522> Pressing return in a quoted block inserts too many newlines
3197
3198         * khtml/editing/htmlediting.cpp:
3199         (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Call to insertBlockPlaceholderIfNeeded()
3200         for the block we are adding was being done at the wrong time, which led to the placeholder remaining
3201         in the document when it was not needed. This resulted in the extra space reported in the bug.
3202
3203 2005-01-04  Kevin Decker  <kdecker@apple.com>
3204
3205         Reviewed by Hyatt.
3206
3207         Fixed: <rdar://problem/3936879> nil-deref, crash in InlineFlowBox::nodeAtPoint closing DHTML menus at hrweb.apple.com
3208
3209         * khtml/rendering/render_block.cpp:
3210         (khtml::RenderBlock::fillInlineSelectionGaps): Added a nil check. If there is no selection, don't try to get the selection's containing block. If we do, we'll crash. 
3211
3212 2005-01-04  David Hyatt  <hyatt@apple.com>
3213
3214         Fix for 3937203, force an update of the dashboard regions when scrollbars are added/removed.
3215         
3216         Reviewed by kevin
3217
3218         * khtml/rendering/render_layer.cpp:
3219         (RenderLayer::updateScrollInfoAfterLayout):
3220
3221 2005-01-04  Ken Kocienda  <kocienda@apple.com>
3222
3223         Reviewed by John
3224
3225         Fix for these two bugs:
3226         
3227         <rdar://problem/3938935> REGRESSION (Mail): Pasting into an empty document mangles content
3228         <rdar://problem/3939148> REGRESSION (Mail): Pasting mistakenly reverses lines
3229
3230         * khtml/editing/htmlediting.cpp:
3231         (khtml::ReplaceSelectionCommand::doApply): For 3938935, add one more case to handle an empty document; merge
3232         neither start nor end. For 3939148, improve the code which adjusts the insertion point during 
3233         the process of pasting. It formerly handled only one of the possible cases.
3234         * layout-tests/editing/pasteboard/paste-text-015-expected.txt: Added.
3235         * layout-tests/editing/pasteboard/paste-text-015.html: Added.
3236
3237 2005-01-04  David Hyatt  <hyatt@apple.com>
3238
3239         Fix for 3936571, placeholder attribute should work for normal inputs for Dashboard.
3240         
3241         Reviewed by john
3242
3243         * khtml/rendering/render_form.cpp:
3244         (RenderLineEdit::updateFromElement):
3245         * kwq/KWQLineEdit.mm:
3246         (QLineEdit::setPlaceholderString):
3247
3248 2005-01-04  David Hyatt  <hyatt@apple.com>
3249
3250         Fix for 3830936, hang on changeforamerica.com.  Make sure to ignore the style not yet available option when
3251         returning pseudo-styles.
3252         
3253         Reviewed by john
3254
3255         * khtml/css/cssstyleselector.cpp:
3256         (khtml::CSSStyleSelector::matchRulesForList):
3257         (khtml::CSSStyleSelector::pseudoStyleForElement):
3258         * khtml/rendering/render_style.cpp:
3259         (RenderStyle::addPseudoStyle):
3260
3261 2005-01-04  Darin Adler  <darin@apple.com>
3262
3263         - rolled out my custom tag name change again -- it caused a 1 ms PLT regression
3264
3265         * khtml/css/cssstyleselector.cpp:
3266         * khtml/editing/htmlediting.cpp:
3267         * khtml/editing/selection.cpp:
3268         * khtml/editing/visible_position.cpp:
3269         * khtml/html/dtd.cpp:
3270         * khtml/html/htmlparser.cpp:
3271         * khtml/html/htmlparser.h:
3272         * khtml/html/htmltokenizer.cpp:
3273         * khtml/misc/htmlhashes.cpp:
3274         * khtml/misc/htmlhashes.h:
3275         * khtml/misc/htmltags.c:
3276         * khtml/misc/htmltags.h:
3277         * khtml/misc/maketags:
3278         * khtml/xml/dom_docimpl.cpp:
3279         * khtml/xml/dom_docimpl.h:
3280         * khtml/xml/dom_nodeimpl.cpp:
3281         * khtml/xml/dom_position.cpp:
3282         * kwq/KWQRenderTreeDebug.cpp:
3283
3284 2005-01-04  Ken Kocienda  <kocienda@apple.com>
3285
3286         Reviewed by John
3287
3288         Fix for this bug:
3289         
3290         <rdar://problem/3927554> Style info applied to remainder of document after a newline is entered
3291
3292         * khtml/editing/htmlediting.cpp:
3293         (khtml::InsertParagraphSeparatorCommand::doApply): Clean up and simplification in code that inserts
3294         a paragraph separator. The bug was all about applying styles to the new paragraph that did not need
3295         to be applied. Now the code will detect when at the end of a style run and will not move and apply 
3296         that ending style to the new paragraph, though it will place that style into the typing style. This
3297         seems to match NSText behavior.
3298         * layout-tests/editing/inserting/insert-div-021-expected.txt: This test result exhibited the bug fixed 
3299         here. The only reason it was not noticed is that the erroneously copied inline was a span, and so did
3300         not have any visible effect on the document.
3301         * layout-tests/editing/inserting/insert-div-022-expected.txt: Added.
3302         * layout-tests/editing/inserting/insert-div-022.html: Added.
3303
3304 2005-01-04  David Hyatt  <hyatt@apple.com>
3305
3306         Fix for 3904562, make sure to clear the outline dictionary when drawing so that random focus rings dont get drawn
3307         all over the place.
3308         
3309         Reviewed by john
3310
3311         * khtml/rendering/render_flow.cpp:
3312         (RenderFlow::paintLines):
3313
3314 2005-01-03  David Hyatt  <hyatt@apple.com>
3315
3316         Fix for float painting regressions 3932524, 3931664, and 3933068.  Make the noPaint flag setting more
3317         robust and make it work regardless of which objects get a layout or not.
3318         
3319         Reviewed by mjs
3320
3321         * khtml/rendering/render_block.cpp:
3322         (khtml::RenderBlock::insertFloatingObject):
3323         (khtml::RenderBlock::addOverhangingFloats):
3324         (khtml::RenderBlock::addIntrudingFloats):
3325         * khtml/rendering/render_block.h:
3326         (khtml::RenderBlock::FloatingObject::FloatingObject):
3327
3328 2005-01-03  Maciej Stachowiak  <mjs@apple.com>
3329
3330         Reviewed by Kevin.
3331
3332         <rdar://problem/3935390> Tiger 8A341: nil deref crash in DOM::NodeImpl::traverseNextNode
3333         
3334         * khtml/html/html_miscimpl.cpp:
3335         (HTMLCollectionImpl::traverseNextItem): Assert that the starting point is not nil,
3336         it should not ever be (now).
3337         (HTMLCollectionImpl::item): When traversing items stop when we hit
3338         nil, meaning the end to avoid triggering above assert (formerly crash).
3339
3340 2005-01-03  Maciej Stachowiak  <mjs@apple.com>
3341
3342         Reviewed by John and Kevin.
3343
3344         <rdar://problem/3870317> REGRESSION(125.9-125.11) broken behavior at test.profoundlearning.com - used to
3345         
3346         * khtml/ecma/kjs_window.cpp:
3347         (Window::get): Look up frame names before buitin window properties
3348         to match other browsers. This regressed because we added a builtin
3349         "toolbar" property but this site had a frame with that name.
3350
3351 2004-12-21  Maciej Stachowiak  <mjs@apple.com>
3352
3353         Reviewed by Darin.
3354
3355         <rdar://problem/3888931> frame naming allows malicious site to bring up a window when you click on a link in another
3356         
3357         Added opener bridge method to help WebKit implement security check
3358         for named frame visibility.
3359         
3360         * khtml/khtml_part.h:
3361         * kwq/WebCoreBridge.h:
3362         * kwq/WebCoreBridge.mm:
3363         (-[WebCoreBridge opener]):
3364
3365 2005-01-03  Ken Kocienda  <kocienda@apple.com>
3366
3367         Reviewed by John
3368
3369         Fix for this bug:
3370         
3371         <rdar://problem/3933926> Tiger8A341: Mail crashes while forwarding embedded HTML message in -[WebCoreBridge ensureSelectionVisible]
3372
3373         * kwq/WebCoreBridge.mm:
3374         (-[WebCoreBridge ensureSelectionVisible]): Put in some null checks to prevent crash experienced in bug.
3375
3376 2005-01-03  David Hyatt  <hyatt@apple.com>
3377
3378         Fix for 3936881, make sure positioned objects prooperly update y-position.
3379         
3380         Reviewed by john
3381
3382         * khtml/rendering/render_block.cpp:
3383         (khtml::RenderBlock::layoutPositionedObjects):
3384
3385 2005-01-03  Ken Kocienda  <kocienda@apple.com>
3386
3387         Reviewed by Harrison
3388         
3389         Fix for this bug:
3390         
3391         <rdar://problem/3928250> REGRESSION (Mail): Typing style lost after hitting return key
3392
3393         * khtml/editing/htmlediting.cpp:
3394         (khtml::InsertLineBreakCommand::preservesTypingStyle): Now implemented, returning yes for this command.
3395         (khtml::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): Initialize new typing style member variable.
3396         (khtml::InsertParagraphSeparatorCommand::~InsertParagraphSeparatorCommand): Deref new typing style member variable.
3397         (khtml::InsertParagraphSeparatorCommand::preservesTypingStyle): Now implemented, returning yes for this command.
3398         (khtml::InsertParagraphSeparatorCommand::setFullTypingStyleBeforeInsertion): New function to set the typing style
3399         (khtml::InsertParagraphSeparatorCommand::calculateAndSetTypingStyleAfterInsertion): Function called after the <p>
3400         insertion is done. This function diffs the style created in setFullTypingStyleBeforeInsertion() with the style
3401         of the new <p> and only sets those styles needed to preserve the style in effect before the insertion.
3402         (khtml::InsertParagraphSeparatorCommand::doApply): Call new functions.
3403         (khtml::TypingCommand::preservesTypingStyle): Now yes for inserting line breaks and paragraphs.
3404          * khtml/editing/htmlediting.h: Declare new functions.
3405
3406 2004-12-25  Kevin Decker  <kdecker@apple.com>
3407
3408         Reviewed by Hyatt.
3409
3410         Fixed: <rdar://problem/3505072> hang in KHTMLParser::parseToken (consulting.soroos.net)
3411         
3412         * khtml/html/dtd.cpp: <label> needed a much higher priority such that it will close block elements.  Malformed HTML (ugh) is the only reason why we need to do this. 
3413
3414 2004-12-23  Darin Adler  <darin@apple.com>
3415
3416         Reviewed by Ken.
3417
3418         - re-fixed <rdar://problem/3760910> Request to include support for custom tag names in HTML (they already work in XML)
3419
3420         * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Changed
3421         some code that used ID_LAST_TAG in a slightly wrong, but harmless, way.
3422
3423         * khtml/editing/htmlediting.cpp:
3424         (khtml::debugPosition): Use nodeName rather than getTagName, since the latter works for
3425         per-document tags and is just better all around for things like the document.
3426         (khtml::debugNode): Ditto.
3427         * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Ditto.
3428         * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
3429         * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Ditto.
3430         * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.
3431
3432         * khtml/html/dtd.cpp: (DOM::checkChild): Use ID_LAST_TAG rather than 1000 for the check that allows
3433         non-HTML elements to be nested as desired.
3434
3435         * khtml/html/htmlparser.h: Change forbidden tag array to be allocated in the object rather than on
3436         the heap. Also use ID_LAST_TAG for the array size; the old code used ID_CLOSE_TAG which is now a
3437         much larger number.
3438         * khtml/html/htmlparser.cpp:
3439         (KHTMLParser::KHTMLParser): Remove code that creates the forbidden tag array on the heap; makes more
3440         sense to just have the array be a member so we don't have to use new and delete on it. Also needed
3441         to eliminate code that used ID_CLOSE_TAG for an array size.
3442         (KHTMLParser::~KHTMLParser): Remove code that deletes the forbidden tag array. Also changed the code
3443         that manages isindex to use deref instead of delete.
3444         (KHTMLParser::reset): Use safer sizeof for clearing the forbidden tag array. Old code had the
3445         mistake of using ID_CLOSE_TAG for the array size too.
3446         (KHTMLParser::parseToken): Removed code that checks for bogus tags; it's not clear why it was ever
3447         there and it would prevent custom tags from working. Added range check before using the forbidden
3448         tag array with the token ID since custom tags will use index values past the end of the array.
3449         (KHTMLParser::getElement): Removed most of the code that makes an element by ID; now the work is done
3450         inside the DocumentImpl createHTMLElement. Any code that needs to be different than a dynamic
3451         createElement call is still here. Last time I left out a few form element types from this switch;
3452         fixed now.
3453         * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Call the tagId function in the
3454         document if getTagID fails; this creates a unique per-document ID.
3455
3456         * khtml/misc/htmlhashes.h: Changed return types to unsigned short.
3457         * khtml/misc/htmlhashes.cpp:
3458         (khtml::getTagID): Changed return type to unsigned short.
3459         (khtml::getAttrID): Ditto.
3460
3461         * khtml/misc/htmltags.c: Regenerated.
3462         * khtml/misc/htmltags.h: Regenerated.
3463
3464         * khtml/misc/maketags: Changed the generated constants to use "const unsigned short" instead of "#define".
3465         Changed ID_CLOSE_TAG to be a fixed value of 32000 rather than being just past the IDs of the HTML tags.
3466         Also rewrote getTagName to work with the new scheme.
3467
3468         * khtml/xml/dom_docimpl.h: Added overload of createHTMLElement, made it non-virtual since it's not overriden.
3469         * khtml/xml/dom_docimpl.cpp:
3470         (DocumentImpl::createHTMLElement): Refactored into two separate functions, one that takes the tag ID.
3471         Also updated for a few tags that the parser handled but this did not.
3472
3473         * kwq/KWQRenderTreeDebug.cpp:
3474         (getTagName): Added. Works for custom nodes, because it calls nodeName rather than using getTagName on
3475         the tag ID directly, which only works for standard nodes.
3476         (operator<<): Update to call getTagName.
3477         (nodePositionRelativeToRoot): Ditto.
3478         (writeSelection): Ditto.
3479
3480 === Safari-177 ===
3481
3482 2004-12-22  Darin Adler  <darin@apple.com>
3483
3484         - rolled out my custom tag name change -- it broke amazon.com
3485
3486         * khtml/css/cssstyleselector.cpp:
3487         * khtml/editing/htmlediting.cpp:
3488         * khtml/editing/selection.cpp:
3489         * khtml/editing/visible_position.cpp:
3490         * khtml/html/dtd.cpp:
3491         * khtml/html/htmlparser.cpp:
3492         * khtml/html/htmlparser.h:
3493         * khtml/html/htmltokenizer.cpp:
3494         * khtml/misc/htmlhashes.cpp:
3495         * khtml/misc/htmlhashes.h:
3496         * khtml/misc/htmltags.c:
3497         * khtml/misc/htmltags.h:
3498         * khtml/misc/maketags:
3499         * khtml/xml/dom_docimpl.cpp:
3500         * khtml/xml/dom_docimpl.h:
3501         * khtml/xml/dom_nodeimpl.cpp:
3502         * khtml/xml/dom_position.cpp:
3503         * kwq/KWQRenderTreeDebug.cpp:
3504
3505 2004-12-22  David Harrison  <harrison@apple.com>
3506
3507         Reviewed by Darin Adler.
3508
3509         * khtml/editing/selection.cpp:
3510         (khtml::Selection::validate):
3511         The selecting/deselecting bad behavior is because the Selection code that expands by words
3512         had an inaccurate test for being at the end of the document (where double-clicking needs
3513         to select the last word).  Fixed that check.
3514
3515 2004-12-22  Adele Amchan  <adele@apple.com>
3516
3517         Reviewed by Chris.
3518
3519         Fix for <rdar://problem/3911650> tabs at safeway.com stop working after a while
3520
3521         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::scrollToAnchor): removed call to cancelRedirection 
3522           so that we match Firefox and WinIE behavior.
3523
3524 2004-12-22  Darin Adler  <darin@apple.com>
3525
3526         Reviewed by Ken.
3527
3528         - fixed <rdar://problem/3760910> Request to include support for custom tag names in HTML (they already work in XML)
3529
3530         * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Changed
3531         some code that used ID_LAST_TAG in a slightly wrong, but harmless, way.
3532
3533         * khtml/editing/htmlediting.cpp:
3534         (khtml::debugPosition): Use nodeName rather than getTagName, since the latter works for
3535         per-document tags and is just better all around for things like the document.
3536         (khtml::debugNode): Ditto.
3537         * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Ditto.
3538         * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
3539         * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Ditto.
3540         * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.
3541
3542         * khtml/html/dtd.cpp: (DOM::checkChild): Use ID_LAST_TAG rather than 1000 for the check that allows
3543         non-HTML elements to be nested as desired.
3544
3545         * khtml/html/htmlparser.h: Change forbidden tag array to be allocated in the object rather than on
3546         the heap. Also use ID_LAST_TAG for the array size; the old code used ID_CLOSE_TAG which is now a
3547         much larger number.
3548         * khtml/html/htmlparser.cpp:
3549         (KHTMLParser::KHTMLParser): Remove code that creates the forbidden tag array on the heap; makes more
3550         sense to just have the array be a member so we don't have to use new and delete on it. Also needed
3551         to eliminate code that used ID_CLOSE_TAG for an array size.
3552         (KHTMLParser::~KHTMLParser): Remove code that deletes the forbidden tag array. Also changed the code
3553         that manages isindex to use deref instead of delete.
3554         (KHTMLParser::reset): Use safer sizeof for clearing the forbidden tag array. Old code had the
3555         mistake of using ID_CLOSE_TAG for the array size too.
3556         (KHTMLParser::parseToken): Removed code that checks for bogus tags; it's not clear why it was ever
3557         there and it would prevent custom tags from working. Added range check before using the forbidden
3558         tag array with the token ID since custom tags will use index values past the end of the array.
3559         (KHTMLParser::getElement): Removed most of the code that makes an element by ID; now the work is done
3560         inside the DocumentImpl createHTMLElement. Any code that needs to be different than a dynamic
3561         createElement call is still here.
3562         * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Call the tagId function in the
3563         document if getTagID fails; this creates a unique per-document ID.
3564
3565         * khtml/misc/htmlhashes.h: Changed return types to unsigned short.
3566         * khtml/misc/htmlhashes.cpp:
3567         (khtml::getTagID): Changed return type to unsigned short.
3568         (khtml::getAttrID): Ditto.
3569
3570         * khtml/misc/htmltags.c: Regenerated.
3571         * khtml/misc/htmltags.h: Regenerated.
3572
3573         * khtml/misc/maketags: Changed the generated constants to use "const unsigned short" instead of "#define".
3574         Changed ID_CLOSE_TAG to be a fixed value of 32000 rather than being just past the IDs of the HTML tags.
3575         Also rewrote getTagName to work with the new scheme.
3576
3577         * khtml/xml/dom_docimpl.h: Added overload of createHTMLElement, made it non-virtual since it's not overriden.
3578         * khtml/xml/dom_docimpl.cpp:
3579         (DocumentImpl::createHTMLElement): Refactored into two separate functions, one that takes the tag ID.
3580         Also updated for a few tags that the parser handled but this did not.
3581
3582         * kwq/KWQRenderTreeDebug.cpp:
3583         (getTagName): Added. Works for custom nodes, because it calls nodeName rather than using getTagName on
3584         the tag ID directly, which only works for standard nodes.
3585         (operator<<): Update to call getTagName.
3586         (nodePositionRelativeToRoot): Ditto.
3587         (writeSelection): Ditto.
3588
3589 2004-12-21  David Harrison  <harrison@apple.com>
3590
3591         Reviewed by Ken Kocienda.
3592
3593         <rdar://problem/3924934> REGRESSION: double click at end of line selects start of next line
3594
3595         Problem was the TextIterator was not handling exitNode() from a P block properly.
3596         
3597         * khtml/editing/visible_text.cpp:
3598         (khtml::TextIterator::TextIterator):
3599         Add new param that specifies whether the iterator is for content or for searching.
3600         Search iterators do not prevent newlines at the beginning.
3601         (khtml::TextIterator::advance):
3602         Added some comments.
3603         (khtml::TextIterator::handleTextNode):
3604         Added some comments.
3605         (khtml::TextIterator::exitNode):
3606         Emit newline for P (and other) blocks with position following the block, instead of the m_lastTextNode.
3607         (khtml::TextIterator::emitCharacter):
3608         Added some comments.
3609         (khtml::TextIterator::range):
3610         Added some comments.
3611         (khtml::CharacterIterator::CharacterIterator):
3612         Specify search type TextIterator.
3613         (khtml::CharacterIterator::advance):
3614         * khtml/editing/visible_text.h:
3615         (khtml::):
3616         Add new TextIterator::TextIterator param that specifies whether the iterator is for content or for searching.
3617         * khtml/editing/visible_units.cpp:
3618         (khtml::nextWordBoundary):
3619         Specify search type TextIterator.
3620
3621 2004-12-21  David Harrison  <harrison@apple.com>
3622
3623         Reviewed by Ken Kocienda.
3624
3625         <rdar://problem/3924695> REGRESSION (Mail): double-clicking past end of line shows no selection, should select to EOL
3626         
3627         Problem was that RenderText::setSelectionState did not handle the SelectionStart case where start and end are the end of the line.
3628         Fixed by pretending the start == end-1 in that situation, as long as end > 0.
3629         
3630         * khtml/rendering/render_text.cpp:
3631         (RenderText::setSelectionState)
3632
3633 2004-12-21  Maciej Stachowiak  <mjs@apple.com>
3634
3635         Reviewed by John.
3636
3637         <rdar://problem/3929187> WebKit needs to restrict access to certain window operations by domain
3638         
3639         * khtml/ecma/kjs_window.cpp:
3640         (Window::get): Change most window functions to be restricted by
3641         XSS domain check.
3642
3643 2004-12-21  Ken Kocienda  <kocienda@apple.com>
3644
3645         Reviewed by John
3646
3647         Fix for this bug:
3648         
3649         <rdar://problem/3928305> selecting an entire line and typing over causes new inserted text at top of document
3650
3651         * khtml/editing/htmlediting.cpp:
3652         (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent): New function to detect case
3653         formerly undetected and unhandled. This is the crux of the bug fix.
3654         (khtml::DeleteSelectionCommand::doApply): Call insertPlaceholderForAncestorBlockContent() during
3655         execution of command.
3656         * khtml/editing/htmlediting.h: Declare new function.
3657         * layout-tests/editing/deleting/delete-3928305-fix-expected.txt: Added.
3658         * layout-tests/editing/deleting/delete-3928305-fix.html: Added.
3659
3660 2004-12-21  Ken Kocienda  <kocienda@apple.com>
3661
3662         Reviewed by me
3663
3664         * khtml/editing/htmlediting.cpp:
3665         (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Note to self: Must compile code before
3666         checking in (aka must return false from function returning bool).
3667
3668 2004-12-21  Ken Kocienda  <kocienda@apple.com>
3669
3670         Reviewed by John
3671         
3672         Fix for this bug:
3673         
3674         <rdar://problem/3927752> Crash in khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded(DOM::NodeImpl*)
3675
3676         * khtml/editing/htmlediting.cpp:
3677         (khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Added some null checks.
3678         (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Ditto.
3679
3680 2004-12-21  Ken Kocienda  <kocienda@apple.com>
3681
3682         Reviewed by Darin
3683
3684         * khtml/editing/htmlediting.cpp:
3685         (khtml::ReplacementFragment::mergeStartNode): Refine concept of how this node is found based on
3686         further experiements.
3687         (khtml::ReplaceSelectionCommand::doApply): Add a special case for determining merges that need to
3688         be done if the insertion point is in an empty block.
3689         * layout-tests/editing/pasteboard/paste-text-012-expected.txt: Added.
3690         * layout-tests/editing/pasteboard/paste-text-012.html: Added.
3691         * layout-tests/editing/pasteboard/paste-text-013-expected.txt: Added.
3692         * layout-tests/editing/pasteboard/paste-text-013.html: Added.
3693         * layout-tests/editing/pasteboard/paste-text-014-expected.txt: Added.
3694         * layout-tests/editing/pasteboard/paste-text-014.html: Added.
3695
3696 2004-12-21  Darin Adler  <darin@apple.com>
3697
3698         Reviewed by Ken.
3699
3700         - fixed <rdar://problem/3899133> text search in a Safari window takes a very long time on Tiger updates page (and some other pages)
3701
3702         * khtml/editing/visible_text.h: Add an "offset base node" parameter to emitCharacter, and also
3703         add a field to track it. Must make a few things mutable so we can update them in the range accessor.
3704         * khtml/editing/visible_text.cpp:
3705         (khtml::TextIterator::advance): Pass in base node and offsets rather than computing actual offsets
3706         using the node's index. We only compute the node index if actually asked for the range.
3707         (khtml::TextIterator::handleTextNode): Pass 0 for base node and set base node to 0 when setting
3708         up the offsets.
3709         (khtml::TextIterator::handleTextBox): Ditto.
3710         (khtml::TextIterator::handleReplacedElement): Pass base node and set base node instead of calling
3711         nodeIndex.
3712         (khtml::TextIterator::handleNonTextNode): Pass 0 for offset.
3713         (khtml::TextIterator::exitNode): More of the same.
3714         (khtml::TextIterator::emitCharacter): Ditto.
3715         (khtml::TextIterator::range): If an offset base node is stored, then get its node index, and then
3716         add that in to the offsets. Doing the work here guarantees it's done only once when doing a text search.
3717
3718         - another small fix
3719
3720         * khtml/khtml_part.cpp: Removed SPEED_DEBUG define. Not sure why it was on.
3721
3722 === Safari-176 ===
3723
3724 2004-12-20  Ken Kocienda  <kocienda@apple.com>
3725
3726         Reviewed by Darin
3727
3728         * khtml/editing/htmlediting.cpp:
3729         (khtml::DeleteSelectionCommand::moveNodesAfterNode): My one-liner for this bug introduced layout test
3730         regressions: <rdar://problem/3926142> REGRESSION (Mail): Deleting text decreases quote level
3731         Rolling out until I can develop a real fix.
3732
3733 2004-12-20  David Harrison  <harrison@apple.com>
3734
3735         Reviewed by Dave Hyatt.
3736         
3737         Initial checkin of AXTextMarkerRef support.
3738
3739         * khtml/xml/dom_docimpl.cpp:
3740         (DocumentImpl::updateSelection):
3741         (DocumentImpl::setFocusNode):
3742         * kwq/KWQAccObject.h:
3743         * kwq/KWQAccObject.mm:
3744         (-[KWQAccObject detach]):
3745         (-[KWQAccObject anchorElement]):
3746         (-[KWQAccObject addChildrenToArray:]):
3747         (-[KWQAccObject accessibilityAttributeNames]):
3748         (-[KWQAccObject accessibilityActionDescription:]):
3749         (-[KWQAccObject accessibilityPerformAction:]):
3750         (-[KWQAccObject textMarkerRangeFromMarkers:andEndMarker:]):
3751         (-[KWQAccObject textMarkerForVisiblePosition:]):
3752         (-[KWQAccObject visiblePositionForTextMarker:]):
3753         (-[KWQAccObject AXTextMarkerRangeCopyStartMarkerWrapper:]):
3754         (-[KWQAccObject AXTextMarkerRangeCopyEndMarkerWrapper:]):
3755         (-[KWQAccObject visiblePositionForStartOfTextMarkerRange:]):
3756         (-[KWQAccObject visiblePositionForEndOfTextMarkerRange:]):
3757         (-[KWQAccObject accessibilityAttributeValue:]):
3758         (-[KWQAccObject accessibilityParameterizedAttributeNames]):
3759         (-[KWQAccObject textMarkerRangeFromVisiblePositions:andEndPos:]):
3760         (-[KWQAccObject getSelectedTextMarkerRange]):
3761         (-[KWQAccObject doAXLineForTextMarker:]):
3762         (-[KWQAccObject doAXTextMarkerRangeForLine:]):
3763         (-[KWQAccObject doAXStringForTextMarkerRange:]):
3764         (-[KWQAccObject doAXNextTextMarkerForTextMarker:]):
3765         (-[KWQAccObject doAXPreviousTextMarkerForTextMarker:]):
3766         (-[KWQAccObject doAXLeftWordTextMarkerRangeForTextMarker:]):
3767         (-[KWQAccObject doAXRightWordTextMarkerRangeForTextMarker:]):
3768         (-[KWQAccObject doAXLeftLineTextMarkerRangeForTextMarker:]):
3769         (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
3770         (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
3771         (-[KWQAccObject accessibilityFocusedUIElement]):
3772         (-[KWQAccObject clearChildren]):
3773         (-[KWQAccObject accObjectID]):
3774         (-[KWQAccObject setAccObjectID:]):
3775         (-[KWQAccObject removeAccObjectID]):
3776         * kwq/KWQAccObjectCache.h:
3777         * kwq/KWQAccObjectCache.mm:
3778         (KWQAccObjectCache::KWQAccObjectCache):
3779         (KWQAccObjectCache::~KWQAccObjectCache):
3780         (KWQAccObjectCache::getAccObjectID):
3781         (KWQAccObjectCache::removeAccObjectID):
3782         (KWQAccObjectCache::textMarkerForVisiblePosition):
3783         (KWQAccObjectCache::visiblePositionForTextMarker):
3784
3785 2004-12-19  Darin Adler  <darin@apple.com>
3786
3787         * kwq/KWQFoundationExtras.h: (KWQCFAutorelease): Added nil check.
3788
3789 2004-12-19  Darin Adler  <darin@apple.com>
3790
3791         Reviewed by Kevin.
3792
3793         - a garbage collection fix
3794
3795         * kwq/KWQFoundationExtras.h: (KWQCFAutorelease): Added a more-extensive comment and fixed the BUILDING_ON_PANTHER
3796         #ifndef to use #if (in practice, either is OK).
3797         * kwq/KWQKURL.mm: (KURL::getNSURL): Use KWQCFAutorelease instead of autorelease.
3798
3799 2004-12-17  David Hyatt  <hyatt@apple.com>
3800
3801         Fix for 3923255, specified percentage heights of divs with overflow auto inside tables not honored.
3802         
3803         Reviewed by kocienda
3804
3805         * khtml/rendering/render_box.cpp:
3806         (RenderBox::calcPercentageHeight):
3807         * khtml/rendering/render_table.cpp:
3808         (RenderTableSection::layoutRows):
3809
3810 2004-12-17  David Harrison  <harrison@apple.com>
3811
3812         Reviewed by Ken Kocienda.
3813
3814         <rdar://problem/3924930> REGRESSION: triple click does not select to end of line
3815         
3816         * khtml/editing/visible_units.cpp:
3817         (khtml::endOfParagraph):
3818         When includeLineBreak is true, allow traversal to next node after enclosingBlockFlowElement.
3819
3820 2004-12-17  Ken Kocienda  <kocienda@apple.com>
3821
3822         Reviewed by Vicki
3823
3824         * khtml/editing/htmlediting.cpp:
3825         (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Missed deleting some now-obsolete expcetion
3826         codes when I added the createBreakElement() function.
3827
3828 2004-12-17  Richard Williamson   <rjw@apple.com>
3829
3830         Set the floor of max cacheable object size to 40K.  This restores
3831         the long standing floor.  Lower floor deleteriously impacts the PLT.
3832         Reviewed by Hyatt.
3833
3834         * khtml/khtml_part.cpp:
3835         (KHTMLPart::checkCompleted):
3836         * khtml/misc/loader.cpp:
3837         (Cache::setSize):
3838
3839 2004-12-17  Ken Kocienda  <kocienda@apple.com>
3840
3841         Reviewed by Hyatt