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