- fixed <rdar://problem/3524359>: REGRESSSION (119-120):
[WebKit-https.git] / WebCore / ChangeLog-2005-08-23
1 2004-01-08  John Sullivan  <sullivan@apple.com>
2
3         - fixed <rdar://problem/3524359>: REGRESSSION (119-120): 
4         Double click to select text in form broken
5
6         Reviewed by Dave and Darin.
7
8         * khtml/khtmlview.cpp:
9         (KHTMLView::dispatchMouseEvent):
10         Don't blur the focused node if that's the one you clicked on.
11
12 2004-01-07  Richard Williamson   <rjw@apple.com>
13
14         Fixed 3517550.  Named array lookup of applet failed, i.e.:
15         var appletobj = document.applets['myapplet']
16
17         Reviewed by Chris.
18
19         * khtml/ecma/kjs_html.cpp:
20         (KJS::HTMLCollection::getNamedItems):
21
22 === Safari-120 ===
23
24 2004-01-06  David Hyatt  <hyatt@apple.com>
25
26         Possible fix for table bugs 3510005 and 3492945, repainting glitches that occurred when table cells moved.
27
28         Fix for 33522497, empty AXElements appear in AXBrowser.
29         
30         Reviewed by darin
31
32         * khtml/rendering/render_table.cpp:
33         (RenderTableSection::layoutRows):
34         (RenderTableCell::setWidth):
35         * khtml/rendering/render_table.h:
36
37         * kwq/KWQAccObject.mm:
38         (-[KWQAccObject accessibilityIsIgnored]):
39
40 2004-01-06  John Sullivan  <sullivan@apple.com>
41
42         - fixed <rdar://problem/3484465>: REGRESSION (118): button click does 
43         not take focus away from <textarea>; breaks Outlook Web Access
44
45         Reviewed by Dave.
46
47         * khtml/khtmlview.cpp:
48         (KHTMLView::dispatchMouseEvent):
49         Removed nodeimpl == nil test that was preventing button/link clicks
50         from blurring previously-focused text field.
51
52 2004-01-06  David Hyatt  <hyatt@apple.com>
53
54         Fix for 3520636, infinite loop in page breaking code when printing.
55         
56         Reviewed by darin
57
58         * khtml/rendering/render_text.cpp:
59         (RenderText::paintObject):
60         * kwq/WebCoreBridge.mm:
61         (-[WebCoreBridge computePageRectsWithPrintWidth:printHeight:]):
62
63 2004-01-05  David Hyatt  <hyatt@apple.com>
64
65         Fix for 3521466, generated image content should not try to calcWidth/height when it isn't yet rooted in
66         the rendering tree.
67         
68         Reviewed by john
69
70         * khtml/rendering/render_image.cpp:
71         (RenderImage::setPixmap):
72
73 2003-12-26  Darin Adler  <darin@apple.com>
74
75         - one more small step to make -[KWQPageState dealloc] safer
76
77         * kwq/KWQPageState.mm: (-[KWQPageState dealloc]): Only do the real detach() if the
78         document is already in the detached state; we don't want to detach prematurely.
79
80 2003-12-23  John Sullivan  <sullivan@apple.com>
81
82         - fixed <rdar://problem/3451306>: address book search fails at Airborne 
83         Express Corporate site (Apple Shipping wants to use it)
84
85         Reviewed by Darin.
86
87         * khtml/ecma/kjs_html.cpp:
88         commented out definition of document.all; now sites like this one that
89         set document.all to a value will work.
90         * khtml/ecma/kjs_html.lut.h: regenerated this file
91
92 2003-12-23  Darin Adler  <darin@apple.com>
93
94         Reviewed by John.
95
96         - another try at fixing the -[KWQPageState dealloc] bug, even though we don't fully understand it
97         
98         This change saves the renderer inside the document rather than in the KWQPageState to
99         try to eliminate the possibility that multiple KWQPageState objects could restore the
100         same renderer multiple times, resulting in multiple detaches of the same renderer.
101
102         * khtml/xml/dom_docimpl.h: Add a m_savedRenderer field.
103         * khtml/xml/dom_docimpl.cpp:
104         (DocumentImpl::DocumentImpl): Initialize m_savedRenderer to 0.
105         (DocumentImpl::~DocumentImpl): Added some asserts to make sure we don't get destroyed
106         while we are in the page cache.
107         (DocumentImpl::attach): Added an assert.
108         (DocumentImpl::setInPageCache): Save the renderer when setting the flag, and restore
109         the renderer when clearing it.
110
111         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::openURLFromPageCache): Instead of doing a restoreRenderer
112         call, just do setInPageCache(NO), which will restore the renderer as a side effect.
113
114         * kwq/KWQPageState.h: Removed the renderer method and field.
115         * kwq/KWQPageState.mm:
116         (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:interpreterBuiltins:]):
117         Don't store a pointer to the renderer.
118         (-[KWQPageState clear]): New method, shared by invalidate and dealloc.
119         (-[KWQPageState invalidate]): Removed code relating to "relinquishing object ownership";
120         just deallocate everything here without doing a detach().
121         (-[KWQPageState dealloc]): Removed restoreRenderer now that setInPageCache(NO) handles that.
122         Added some assertions. Share code with invalidate by calling clear.
123
124 2003-12-22  John Sullivan  <sullivan@apple.com>
125
126         - fixed <rdar://problem/3508798>: ACCESSIBILITY: role/description/value strings not defined
127
128         Reviewed by Darin.
129
130         * kwq/KWQAccObject.mm:
131         (-[KWQAccObject roleDescription]):
132         provide not-yet-localized strings for all the role descriptions that this class uses.
133         (-[KWQAccObject value]):
134         return nil string rather than dummy string for the cases where we don't have a value attribute.
135         (-[KWQAccObject accessibilityActionDescription:]):
136         changed comment passed to UI_STRING bogus macro so it won't have to change if/when macro
137         loses its bogosity
138
139 2003-12-22  John Sullivan  <sullivan@apple.com>
140
141         - WebCore part of fix for <rdar://problem/3515706>: 
142         REGRESSION (100-118): Web Kit printing does not honor Page Setup scale factor
143
144         Reviewed by Darin.
145
146         * kwq/WebCoreBridge.h:
147         * kwq/WebCoreBridge.mm:
148         (-[WebCoreBridge computePageRectsWithPrintWidth:printHeight:]):
149         renamed method for clarity; now iterates over pages horizontally as well 
150         as vertically; assume x starts at 0 as we were already assuming that y
151         starts at 0; now returns autoreleased result
152
153 2003-12-22  Darin Adler  <darin@apple.com>
154
155         Reviewed by John.
156
157         - follow-on to my fix for 3467919: handle collapsed spaces at the starts of runs too, not just at the
158           end, and make sure that a space inherits style from the run it was collapsed from rather than always
159           from the run it precedes
160
161         * khtml/khtml_part.cpp: (KHTMLPart::text): Add code to deal with collapsed spaces at the start of runs.
162         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::attributedString): Change code to keep the style of a space that
163         was collapsed at the end of the run, and use that styled space if necessary. Also add the code to deal
164         with collapsed spaces at the start of runs. Also remove comment that refers to long-since-deleted code.
165
166 2003-12-21  Darin Adler  <darin@apple.com>
167
168         Reviewed by John.
169
170         - fixed 3467919: REGRESSION (91-92): space missing when copying text with link at start or end of line
171
172         * khtml/khtml_part.cpp: (KHTMLPart::text):
173         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::attributedString):
174         Changed both "turn HTML into text" code paths to generate spaces in a different way.
175         First, corrected the logic so it notices spaces left out at the end of a RenderText object.
176         Second, don't emit the space until we are emitting more text, to prevent emitting trailing
177         spaces. To get this completely right for the attributed string case, I had to add code to
178         adjust the offset used to mark links.
179
180 2003-12-21  Darin Adler  <darin@apple.com>
181
182         Reviewed by John.
183
184         - fixed 3477453: nowrap in a fixed-width TD is ignored on screen but not when printed (Williams-Sonoma)
185
186         * khtml/rendering/render_table.cpp: (RenderTableCell::setStyle):
187         Compute the proper whitespace mode before calling the base class setStyle,
188         since the base class setStyle may create styles that inherit from our style,
189         and we want them to inherit the computed whitespace mode.
190
191         * WebCore.pbproj/project.pbxproj: Let Xcode be 1.1, as it was meant to be.
192
193 2003-12-21  Darin Adler  <darin@apple.com>
194
195         Reviewed by Dave.
196
197         - fixed a storage leak
198
199         * khtml/rendering/render_style.h: Added a destructor and a private unimplemented assignment
200         operator to StyleCSS3InheritedData, since the textShadow field that needs to be allocated
201         and deallocated and the default destructor and assignment operator don't do that.
202         * khtml/rendering/render_style.cpp: (StyleCSS3InheritedData::~StyleCSS3InheritedData):
203         Added destructor that deletes the textShadow object.
204
205         - fixed locking for JavaScript debugging tools in Caches window
206
207         * kwq/WebCoreJavaScript.mm:
208         (+[WebCoreJavaScript rootObjectClasses]): Lock and unlock around call to JavaScriptCore.
209         (+[WebCoreJavaScript garbageCollect]): Ditto.
210
211 2003-12-19  David Hyatt  <hyatt@apple.com>
212
213         Fix for 3483130, repaint doesn't occur when font is decreased dynamically when at the bottom of
214         amazon.com.
215         
216         Reviewed by john
217
218         * khtml/khtml_part.cpp:
219         (KHTMLPart::setZoomFactor):
220         * kwq/WebCoreBridge.mm:
221         (-[WebCoreBridge setTextSizeMultiplier:]):
222
223 2003-12-19  Richard Williamson   <rjw@apple.com>
224
225         Fixed 3515590.  Return Undefined to JS for applet if
226         Java is disabled.
227
228         Reviewed by Chris.
229
230         * khtml/html/html_objectimpl.cpp:
231         (HTMLAppletElementImpl::getAppletInstance):
232
233 2003-12-19  Maciej Stachowiak  <mjs@apple.com>
234
235         Reviewed by Chris.
236
237         <rdar://problem/3512545>: reproducible assertion failure in KWQKHTMLPart::addData scrolling to anchor while page loads
238         
239         * kwq/KWQKHTMLPart.mm:
240         (KWQKHTMLPart::scrollToAnchor): Don't pretend we finished loading,
241         because we don't actually make anchor scrolling stop the current
242         page load.
243
244 === Safari-119 ===
245
246 2003-12-18  Richard Williamson   <rjw@apple.com>
247
248         Fixed 3511415.  We have to un-visually order visually ordered text
249         before passing to ATSU.
250
251         Reviewed by John.
252
253         * khtml/rendering/font.cpp:
254         (Font::drawHighlightForText):
255         (Font::drawText):
256         * khtml/rendering/font.h:
257         * khtml/rendering/render_text.cpp:
258         (InlineTextBox::paintSelection):
259         (RenderText::paintObject):
260         * kwq/KWQPainter.h:
261         * kwq/KWQPainter.mm:
262         (QPainter::drawText):
263         (QPainter::drawHighlightForText):
264         * kwq/WebCoreTextRenderer.h:
265         * kwq/WebCoreTextRendererFactory.m:
266         (WebCoreInitializeEmptyTextStyle):
267
268 2003-12-17  Richard Williamson   <rjw@apple.com>
269
270         Reviewed by NOBODY (OOPS!).
271
272         * khtml/html/html_objectimpl.cpp:
273         (HTMLAppletElementImpl::getAppletInstance):
274         * khtml/html/html_objectimpl.h:
275         * kwq/KWQKHTMLPart.h:
276         * kwq/KWQKHTMLPart.mm:
277         (KWQKHTMLPart::getAppletInstanceForView):
278         (KWQKHTMLPart::addPluginRootObject):
279         (KWQKHTMLPart::cleanupPluginRootObjects):
280         * kwq/WebCoreBridge.mm:
281         (-[WebCoreBridge init]):
282
283 2003-12-17  Darin Adler  <darin@apple.com>
284
285         Reviewed by Dave.
286
287         - fixed 3469085: can't tab to all links on aintitcool.com
288
289         * khtml/html/html_inlineimpl.cpp:
290         (HTMLAnchorElementImpl::isFocusable): Re-implemented this to check width and height of
291         all continuations, not just the main render object. Also, check the absoluteRects after
292         checking all the render objects to catch things like floats.
293         (HTMLAnchorElementImpl::isMouseFocusable): Clean up the code here a bit.
294
295         * khtml/rendering/render_inline.h:
296         * khtml/rendering/render_inline.cpp: (RenderInline::absoluteRects):
297         * khtml/rendering/render_object.h:
298         * khtml/rendering/render_object.cpp: (RenderObject::absoluteRects):
299         * khtml/rendering/render_text.h:
300         * khtml/rendering/render_text.cpp: (RenderText::absoluteRects):
301         * kwq/KWQAccObject.mm: (boundingBoxRect):
302         Use QValueList instead of QPtrList for clarity and to fix storage leaks.
303
304 === Safari-118 ===
305
306 2003-12-16  David Hyatt  <hyatt@apple.com>
307
308         Fix for 3510956, crash on mezzoblue.com.  Relax the float-list searching code that runs when
309         a float is removed.
310         
311         Reviewed by darin
312
313         * khtml/rendering/render_object.cpp:
314         (checkFloats):
315         (RenderObject::removeFromObjectLists):
316
317 2003-12-16  John Sullivan  <sullivan@apple.com>
318
319         fixed <rdar://problem/3482852>: oft-seen, non-repro, nil-deref in 
320         HTMLTokenizer::notifyFinished (snapfish.com, etc.)
321         
322         At least one of the dupes of this bug is a separate (still reproducible) issue;
323         I'll clone it back to life and test the others.
324
325         Reviewed by Darin.
326
327         * khtml/html/htmltokenizer.cpp:
328         (HTMLTokenizer::notifyFinished):
329         Move check of cachedScript.isEmpty() until after scriptExecution()
330         call, because cachedScript.isEmpty() value can be changed by that call.
331
332 2003-12-15  David Hyatt  <hyatt@apple.com>
333
334         Fix for 3508807, positions/sizes wrong for text elts and multi-line elts for accessibility.
335         
336         Reviewed by john
337
338         * khtml/rendering/render_inline.cpp:
339         (RenderInline::absoluteRects):
340         * khtml/rendering/render_inline.h:
341         * khtml/rendering/render_object.cpp:
342         (RenderObject::absoluteRects):
343         * khtml/rendering/render_object.h:
344         * khtml/rendering/render_text.cpp:
345         (RenderText::absoluteRects):
346         * khtml/rendering/render_text.h:
347         * kwq/KWQAccObject.mm:
348         (boundingBoxRect):
349         (-[KWQAccObject position]):
350         (-[KWQAccObject size]):
351
352 2003-12-15  Richard Williamson   <rjw@apple.com>
353
354         Return 0 if the view doesn't have a bridge.
355
356         Reviewed by John.
357
358         * kwq/WebCoreBridge.mm:
359         (rootForView):
360
361 2003-12-15  David Hyatt  <hyatt@apple.com>
362
363         Fix for 3508792.  Remove tables and cells as AxObjects.
364         
365         Reviewed by john
366
367         * kwq/KWQAccObject.mm:
368         (-[KWQAccObject role]):
369         (-[KWQAccObject accessibilityIsIgnored]):
370
371 2003-12-15  John Sullivan  <sullivan@apple.com>
372
373         - fixed <rdar://problem/3510459>: REGRESSION (100-113): Pressing button at google.com 
374         removes focus from text field
375
376         Reviewed by Dave.
377
378         * khtml/khtmlview.cpp:
379         (KHTMLView::dispatchMouseEvent):
380         Don't clear the focused widget when a mousedown occurs on a widget that is focusable
381         in the abstract sense but is not mouse focusable or currently keyboard focusable. This
382         matches the behavior of older Safaris (clicking in background or page text will make the
383         webview itself be first responder, but clicking on a button won't).
384
385 2003-12-14  Darin Adler  <darin@apple.com>
386
387         Reviewed by Maciej.
388
389         - fixed 3458937: nil-deref in timed layout
390
391         * khtml/khtmlview.cpp: (KHTMLView::layout): Add a nil check for m_part.
392
393 2003-12-14  Darin Adler  <darin@apple.com>
394
395         Reviewed by Maciej.
396
397         - fixed 3311205: click() on a file input type form element does not work bring up the file chooser as it does in IE
398
399         * khtml/html/html_formimpl.cpp:
400         (HTMLInputElementImpl::click): Add a case for FILE that calls RenderFileButton's click() function.
401         Get rid of the default case and list more cases explicitly.
402         (HTMLInputElementImpl::accessKeyAction): Change FILE from just focus to focus/click.
403
404         * khtml/rendering/render_form.h: Added a click() function to RenderFileButton.
405         * khtml/rendering/render_form.cpp:
406         (RenderFileButton::slotTextChanged): Added call to onChange on the element to match text input
407         fields; helpful for the test case Adobe supplied.
408         (RenderFileButton::click): Added. Calls click() on KWQFileButton.
409
410         * kwq/KWQFileButton.h: Added a click function.
411         * kwq/KWQFileButton.mm: (KWQFileButton::click): Added. Calls performClick on the file button.
412
413         * kwq/WebCoreBridge.h: Add a performClick method to WebCoreFileButton.
414
415 2003-12-13  Maciej Stachowiak  <mjs@apple.com>
416
417         Reviewed by Darin.
418
419         <rdar://problem/3269212>: FILEMAKER: can't use Option objects created in a different window
420
421         * khtml/ecma/kjs_binding.cpp:
422         (ScriptInterpreter::updateDOMObjectDocument): Update per-document
423         caching for the DOM object - let it be protected by both the old
424         and the new document.
425         * khtml/ecma/kjs_binding.h: Prototype new method.
426         * khtml/xml/dom_nodeimpl.cpp:
427         (NodeImpl::setDocument): New method to change a node's document pointer.
428         (NodeImpl::checkAddChild): If the new child node is owned by the
429         wrong document but not actually in it, change its document (using
430         the two aforementioned methods) instead of throwing an exception.
431         * khtml/xml/dom_nodeimpl.h: Prototype new method.
432
433 2003-12-14  Darin Adler  <darin@apple.com>
434
435         Reviewed by Maciej.
436
437         - fixed 3332280: REGRESSION (74-85): setting src of iframe results in two GETs
438
439         * khtml/html/html_baseimpl.h: Added openURL virtual function.
440         * khtml/html/html_baseimpl.cpp:
441         (HTMLFrameElementImpl::updateForNewURL): Call openURL to do the meat of the work,
442         since it's different for frames and iframes.
443         (HTMLFrameElementImpl::openURL): Move the part that's different for frames in here.
444         (HTMLFrameElementImpl::parseAttribute): Call setLocation to share code.
445         (HTMLFrameElementImpl::setLocation): Do nothing if the location is not changing.
446         Not needed to fix this bug, but could eliminate other cases of extra GETs.
447         (HTMLIFrameElementImpl::parseAttribute): Remove special handling of SRC, because now
448         we will end up calling openURL, which will do the right thing for iframes.
449         (HTMLIFrameElementImpl::openURL): Instead of doing the change to the frame directly,
450         use updateWidget, since that's what we do for other changes to iframes. To trigger a
451         call to updateWidget(), set needWidgetUpdate and mark the node changed.
452
453 2003-12-13  Maciej Stachowiak  <mjs@apple.com>
454
455         Reviewed by Darin.
456
457         <rdar://problem/3507885>: REGRESSION (100-116): frames missing due to cross-domain check (derstandard.at)
458         
459         * khtml/ecma/kjs_window.cpp:
460         (Window::isSafeScript): Loosen the frame access rules a bit. We already allowed access to
461         a document loaded as empty from the parent or opener. Now also allow access from any document
462         in the same domain as the parent or opener, so that, for instance, a sibling frame can access it
463         so long as it is in the same domain as the parent.
464
465 2003-12-13  Darin Adler  <darin@apple.com>
466
467         Reviewed by Maciej.
468
469         - fixed 3506204: homepage.mac slide show window is wrong size on 2nd monitor
470
471         * kwq/KWQApplication.mm: (QDesktopWidget::screenGeometry): Add code to flip the Y coordinate.
472         This has no effect on the main screen, but a big effect on others. I used the same code to
473         flip Y screen coordinates that is used KWQWindowWidget.mm and KWQKHTMLPartBrowserExtension.mm.
474         * kwq/KWQKWinModule.mm: (KWinModule::workArea): Replaced the incorrect code to flip the Y
475         coordinate here with correct code. The code flipped based on the frame of the main screen,
476         but it needs to flip based on the frame of screen 0.
477
478 2003-12-12  Chris Blumenberg  <cblu@apple.com>
479
480         Fixed: <rdar://problem/3505208>: keys added to keychain from KEYGEN need better UI names
481
482         Reviewed by rjw.
483
484         * khtml/html/html_formimpl.cpp:
485         (HTMLKeygenElementImpl::encoding): pass the page URL to signedPublicKeyAndChallengeString
486         * kwq/KWQKSSLKeyGen.h:
487         * kwq/KWQKSSLKeyGen.mm:
488         (KSSLKeyGen::signedPublicKeyAndChallengeString): take a URL
489         * kwq/WebCoreKeyGenerator.h:
490         * kwq/WebCoreKeyGenerator.m:
491         (-[WebCoreKeyGenerator signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:pageURL:]): take a URL
492
493 2003-12-12  David Hyatt  <hyatt@apple.com>
494
495         Fix for 3254534, CSS background-image style should be loaded lazily only when used.
496         
497         Reviewed by rjw
498
499         * ChangeLog:
500         * khtml/css/css_valueimpl.cpp:
501         (CSSImageValueImpl::CSSImageValueImpl):
502         (CSSImageValueImpl::~CSSImageValueImpl):
503         (CSSImageValueImpl::image):
504         * khtml/css/css_valueimpl.h:
505         
506 2003-12-11  David Hyatt  <hyatt@apple.com>
507
508         WebCore part of 3453214.  This ensures that all outline styles except for auto (which has a CG bug) will
509         be displayed properly during the PaintActionOutline phase.
510         
511         Reviewed by john and darin
512
513         * khtml/rendering/render_block.cpp:
514         (khtml::RenderBlock::paint):
515         * khtml/rendering/render_box.cpp:
516         (RenderBox::setStyle):
517         * khtml/rendering/render_canvas.cpp:
518         (RenderCanvas::RenderCanvas):
519         * khtml/rendering/render_canvas.h:
520         (khtml::RenderCanvas::setMaximalOutlineSize):
521         (khtml::RenderCanvas::maximalOutlineSize):
522         * khtml/rendering/render_object.cpp:
523         (RenderObject::maximalOutlineSize):
524         * khtml/rendering/render_object.h:
525         * khtml/rendering/render_replaced.cpp:
526         (RenderReplaced::paint):
527         * khtml/rendering/render_table.cpp:
528         (RenderTable::paint):
529         (RenderTableSection::paint):
530         (RenderTableCell::paint):
531
532 2003-12-12  John Sullivan  <sullivan@apple.com>
533
534         - fixed <rdar://problem/3508825>: REGRESSION (100-116): crash in 
535         HTMLGenericFormElementImpl::attach at sonyericsson.com
536
537         Reviewed by Maciej.
538
539         * khtml/html/html_formimpl.cpp:
540         (HTMLGenericFormElementImpl::attach):
541         Move a few lines inside an existing nil check to prevent nil dereference.
542
543 2003-12-12  John Sullivan  <sullivan@apple.com>
544
545         - fixed <rdar://problem/3508760>: tabbing to out-of-sight link behaves 
546         differently than tabbing to out-of-sight form control
547
548         Reviewed by Dave.
549
550         * kwq/KWQScrollView.h:
551         * kwq/KWQScrollView.mm:
552         (QScrollView::ensureVisible):
553         added comments and changed parameter names to reveal differences between
554         what we've implemented and what QScrollView was intended to do.
555         (QScrollView::ensureRectVisibleCentered):
556         New method that calls _KWQ_scrollRectToVisible, which is the method
557         we use when scrolling to reveal form controls.
558
559         * kwq/KWQKHTMLPart.mm:
560         (KWQKHTMLPart::nextKeyViewInFrame):
561         call ensureRectVisibleCentered so tabbing to a link will use the
562         same scroll-to-reveal code as tabbing to a form control
563         
564 2003-12-11  Maciej Stachowiak  <mjs@apple.com>
565
566         Reviewed by John.
567
568         <rdar://problem/3507856>: XMLHttpRequest xhtml test displays but doesn't load
569
570         * khtml/ecma/xmlhttprequest.cpp:
571         (KJS::XMLHttpRequestProtoFunc::tryCall): complete the URL using the document,
572         not the htmlDocument.
573
574 2003-12-12  Richard Williamson   <rjw@apple.com>
575
576         Replace call to global functions with static member functions.
577
578         Reviewed by Ken.
579
580         * kwq/KWQKHTMLPart.mm:
581         (KWQKHTMLPart::cleanupPluginRootObjects):
582         * kwq/WebCoreBridge.mm:
583         (rootForView):
584         (-[WebCoreBridge init]):
585
586 2003-12-11  Maciej Stachowiak  <mjs@apple.com>
587
588         Reviewed by Darin.
589
590         <rdar://problem/3464315>: createDocument creates document with initial child element, unlike other browsers
591         
592         * khtml/xml/dom_docimpl.cpp:
593         (DOMImplementationImpl::createDocument): Don;t add initial element.
594
595 2003-12-11  Maciej Stachowiak  <mjs@apple.com>
596
597         Reviewed by Darin. 
598
599         <rdar://problem/3507863>: XMLHttpRequest should not parse response if HTML
600         
601         * khtml/ecma/xmlhttprequest.cpp:
602         (KJS::XMLHttpRequest::getValueProperty):
603
604 2003-12-11  Richard Williamson   <rjw@apple.com>
605
606         Cleaned up and verified reference counting scheme, and
607         dereferencing of vended JavaScript objects when applet is
608         destroyed (actually when part is destroyed).
609
610         Reviewed by Ken.
611
612         * kwq/KWQKHTMLPart.h:
613         * kwq/KWQKHTMLPart.mm:
614         (KWQKHTMLPart::~KWQKHTMLPart):
615         (KWQKHTMLPart::getAppletInstanceForView):
616         (KWQKHTMLPart::addPluginRootObject):
617         (KWQKHTMLPart::cleanupPluginRootObjects):
618         * kwq/WebCoreBridge.h:
619         * kwq/WebCoreBridge.mm:
620         (rootForView):
621         (-[WebCoreBridge init]):
622
623 2003-12-11  Maciej Stachowiak  <mjs@apple.com>
624
625         Reviewed by John.
626
627         <rdar://problem/3507862>: XMLHttpRequest documents that reference external resources (e.g. stylesheets) cause crash
628
629         * khtml/html/html_headimpl.cpp:
630         (HTMLLinkElementImpl::process):
631         * khtml/html/htmltokenizer.cpp:
632         (HTMLTokenizer::scriptHandler):
633         * khtml/xml/dom_xmlimpl.cpp:
634         (ProcessingInstructionImpl::checkStyleSheet):
635         * khtml/xml/xml_tokenizer.cpp:
636         (XMLHandler::processingInstruction):
637         (XMLTokenizer::executeScripts):
638
639 2003-12-11  Maciej Stachowiak  <mjs@apple.com>
640
641         Reviewed by Chris.
642
643         <rdar://problem/3507859>: Status text should only include "OK", not full "HTTP/1.0 200 OK" status line
644         
645         * khtml/ecma/xmlhttprequest.cpp:
646         (KJS::XMLHttpRequest::getStatusText): Include only the status
647         text, not the full status line.
648
649 === Safari-117 ===
650
651 2003-12-11  David Hyatt  <hyatt@apple.com>
652
653         Fix for 3507164, scrolling really slow on hixie's web forms spec page.  Hixie has 12 little transparent layers
654         at various points on this page, and beginning/ending transparency on only those 12 layers as you scroll
655         is enough to kill scrolling performance.
656
657         This patch works around the issue by lazily beginning transparency layers only when we determine that
658         we're actually painting a descendant layer of a transparent ancestor or a transparent layer.
659
660         Also fixing QColor's comparison operator.  It was broken and not comparing the "valid" bit, so invalid and
661         valid colors were being assumed to be the same.
662
663         Also fixed the render dumper to not dump transparent and invalid background colors and fixed it do dump the
664         alpha for colors with an alpha < 0xFF.
665         
666         Reviewed by mjs (opacity changes), darin (color changes) and john (render tree dumper changes)
667
668         * ChangeLog:
669         * khtml/rendering/render_layer.cpp:
670         (RenderLayer::RenderLayer):
671         (RenderLayer::beginTransparencyLayers):
672         (RenderLayer::paint):
673         (RenderLayer::paintLayer):
674         * khtml/rendering/render_layer.h:
675         * kwq/KWQColor.h:
676         (operator==):
677         (operator!=):
678         * kwq/KWQColor.mm:
679         (QColor::name):
680         * kwq/KWQRenderTreeDebug.cpp:
681         (operator<<):
682
683 2003-12-11  Ken Kocienda  <kocienda@apple.com>
684
685         * kwq/KWQLoader.mm:
686         (KWQCacheObjectExpiresTime): Fixed deployment build bustage.
687
688 2003-12-09  Ken Kocienda  <kocienda@apple.com>
689
690         Reviewed by Darin
691         
692         <rdar://problem/3505444>: WebCore cache does not use expiration dates on cache items
693         
694         * khtml/misc/loader.cpp:
695         (Loader::slotFinished): Don't reset expiration date. We set this once in
696         slotReceivedResponse.
697         (Loader::slotReceivedResponse): Call new KWQ function to get a cache object's
698         expiration date using its NSURLResponse data.
699         (Cache::requestImage): Don't reset expiration date. We set this once in
700         slotReceivedResponse, and we do not want the value from the DocLoader
701         anyway.
702         (Cache::requestStyleSheet): Ditto.
703         (Cache::requestScript): Ditto.
704         * kwq/KWQLoader.h:
705         * kwq/KWQLoader.mm:
706         (KWQCacheObjectExpiresTime): New function. Call over bridge to get access
707         to SPI in NSURLResponse to calculate expiration time.
708         * kwq/WebCoreBridge.h: Declare bridge method.
709
710 2003-12-10  Maciej Stachowiak  <mjs@apple.com>
711
712         Reviewed by Darin.
713
714         <rdar://problem/3504156>: XMLHttpRequest reuse test fails
715         <rdar://problem/3505158>: XMLHttpRequest "abort with open" test fails
716
717         * khtml/ecma/xmlhttprequest.cpp:
718         (KJS::XMLHttpRequest::open):
719         (KJS::XMLHttpRequest::abort):
720         (KJS::XMLHttpRequestProtoFunc::tryCall):
721
722 2003-12-10  Maciej Stachowiak  <mjs@apple.com>
723
724         Reviewed by Darin.
725
726         <rdar://problem/3507175>: Setting timeout function can allocate JS objects without lock
727
728         * khtml/ecma/kjs_window.cpp:
729         (ScheduledAction::execute): Lock interpreter around code that
730         might allocate JS objects.
731
732 2003-12-10  David Hyatt  <hyatt@apple.com>
733
734         Fix for 3507097, overflow:auto should include the height of the horizontal scrollbar when the height
735         of the block is auto.
736         
737         Reviewed by darin
738
739         * khtml/rendering/bidi.cpp:
740         (khtml::RenderBlock::layoutInlineChildren):
741         * khtml/rendering/render_block.cpp:
742         (khtml::RenderBlock::layoutBlock):
743         (khtml::RenderBlock::layoutBlockChildren):
744
745 2003-12-10  Darin Adler  <darin@apple.com>
746
747         Reviewed by Maciej.
748
749         - fixed 3506739: nil-deref in DocumentImpl::setSelection triple clicking (generated content)
750
751         * khtml/khtml_part.cpp: (KHTMLPart::khtmlMousePressEvent): Check for the case where
752         m_selectionEnd is 0. This doesn't fix the behavior completely, but it does prevent a crash.
753
754 2003-12-10  Maciej Stachowiak  <mjs@apple.com>
755
756         Reviewed by Richard.
757
758         <rdar://problem/3487160>: Implement synchronous loading for XMLHttpRequest
759         
760         * khtml/ecma/xmlhttprequest.cpp:
761         (KJS::XMLHttpRequest::XMLHttpRequest):
762         (KJS::XMLHttpRequest::send):
763         (KJS::XMLHttpRequest::abort):
764         (KJS::XMLHttpRequest::processSyncLoadResults):
765         (KJS::XMLHttpRequest::slotRedirection):
766         (KJS::XMLHttpRequest::slotData):
767         * khtml/ecma/xmlhttprequest.h:
768         * kwq/KWQLoader.h:
769         * kwq/KWQLoader.mm:
770         (KWQHeaderStringFromDictionary):
771         (KWQServeSynchronousRequest):
772         (KWQResponseHeaderString):
773         * kwq/WebCoreBridge.h:
774
775 2003-12-10  Darin Adler  <darin@apple.com>
776
777         Reviewed by Maciej.
778
779         - fixed 3506706: REGRESSION (100-115): onkeyup handlers called twice for active input fields
780
781         * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView keyUp:]): Don't call super because we
782         don't want to pass the event down the responder chain.
783         * kwq/KWQTextField.mm: (-[KWQTextField textView:shouldHandleEvent:]): Return NO for
784         key up events because we don't want to pass the event down the responder chain.
785
786 2003-12-10  Richard Williamson   <rjw@apple.com>
787
788         Added method to get to the bridge from a view.  This is
789         used to ultimately get the part and KJS::Window for a
790         particular applet.
791
792         Reviewed by Hyatt.
793
794         * kwq/WebCoreBridge.h:
795         * kwq/WebCoreBridge.mm:
796         (rootForView):
797         (-[WebCoreBridge init]):
798         * kwq/WebCoreViewFactory.h:
799         * kwq/WebCoreViewFactory.m:
800
801 2003-12-10  John Sullivan  <sullivan@apple.com>
802
803         - WebCore part of fix for:
804         <rdar://problem/3505231>: REGRESSION (100-114): Some sites autoscroll to bottom of page when loading
805
806         Reviewed by Darin.
807
808         * kwq/KWQNSViewExtras.h:
809         * kwq/KWQNSViewExtras.m:
810         (-[NSView _KWQ_scrollPointRecursive:]):
811         (-[NSView _KWQ_scrollPointRecursive:inView:]):
812         new methods, similar to existing scrollRect methods
813         except that the preferred position for the point is
814         the top-left corner rather than centered in the visible area
815         
816         * kwq/KWQScrollView.h:
817         * kwq/KWQScrollView.mm:
818         (QScrollView::setContentsPosRecursive):
819         new method, calls _KWQ_scrollPointRecursive:
820
821         * khtml/khtml_part.cpp:
822         (KHTMLPart::gotoAnchor):
823         call setContentsPosRecursive instead of setContentsPos; also remove
824         the 50 pixel offset that upset Hyatt so.
825         
826
827 2003-12-10  Chris Blumenberg  <cblu@apple.com>
828
829         * kwq/KWQKSSLKeyGen.mm:
830         (KSSLKeyGen::signedPublicKeyAndChallengeString): removed unnecessary includes
831
832 2003-12-10  David Hyatt  <hyatt@apple.com>
833
834         Fix for 3505846, overflow:auto region doesn't update when scrolled.  The child layers inside an overflow:auto
835         block were not updating their positions.
836         
837         Reviewed by john
838
839         * khtml/khtmlview.cpp:
840         (KHTMLView::layout):
841         * khtml/rendering/render_layer.cpp:
842         (RenderLayer::updateLayerPositions):
843         (RenderLayer::scrollToOffset):
844         * khtml/rendering/render_layer.h:
845
846 2003-12-09  Maciej Stachowiak  <mjs@apple.com>
847
848         Reviewed by John.
849
850         <rdar://problem/3505795>: loading invalid XML document crashes trying to create h1 element
851         <rdar://problem/3504158>: XMLHttpRequest xhtml test totally fails
852         
853         * khtml/xml/dom_docimpl.cpp:
854         (DocumentImpl::isValidName): include "0123456789" instead of
855         "0-9", it's not a regexp it's just a list of characters.
856
857 2003-12-09  Maciej Stachowiak  <mjs@apple.com>
858
859         Reviewed by John.
860
861         <rdar://problem/3504155>: Safari fails XMLHttpRequest abort test
862         
863         * khtml/ecma/xmlhttprequest.cpp:
864         (KJS::XMLHttpRequestProtoFunc::tryCall): Avoid throwing an
865         exception after send().
866
867 2003-12-09  David Hyatt  <hyatt@apple.com>
868
869         Rename -apple-aqua to auto for outline styles.
870         
871         Reviewed by darin
872
873         * khtml/css/cssparser.cpp:
874         (CSSParser::parseValue):
875         * khtml/css/cssstyleselector.cpp:
876         (khtml::CSSStyleSelector::applyRule):
877         * khtml/css/cssvalues.c:
878         (hash_val):
879         (findValue):
880         * khtml/css/cssvalues.h:
881         * khtml/css/cssvalues.in:
882         * khtml/css/html4.css:
883         * khtml/rendering/render_inline.cpp:
884         (RenderInline::paintObject):
885         * khtml/rendering/render_object.cpp:
886         (RenderObject::drawBorder):
887         (RenderObject::paintOutline):
888         * khtml/rendering/render_style.h:
889         (khtml::):
890         (khtml::OutlineValue::OutlineValue):
891         (khtml::RenderStyle::outlineStyleIsAuto):
892         (khtml::RenderStyle::outlineOffset):
893         (khtml::RenderStyle::setOutlineStyle):
894         (khtml::RenderStyle::setOutlineOffset):
895         * kwq/KWQRenderTreeDebug.cpp:
896         (printBorderStyle):
897
898 2003-12-09  Maciej Stachowiak  <mjs@apple.com>
899
900         Reviewed by John.
901
902         <rdar://problem/3487195>: Implement responseXML property for XMLHttpRequest
903         
904         * khtml/ecma/xmlhttprequest.cpp:
905         (KJS::XMLHttpRequest::getValueProperty): Implemented responseXML by parsing the
906         document and returning it.
907         (KJS::XMLHttpRequest::XMLHttpRequest): Initialize new field
908         * khtml/ecma/xmlhttprequest.h:
909
910         * khtml/ecma/kjs_window.cpp: 
911         (Windw::get): Forgot this in last commit; add XMLSerializer
912         constructor.
913         * khtml/ecma/kjs_window.lut.h:
914         * khtml/ecma/Makefile.am: Forgot to include this in the last commit.
915
916 2003-12-09  Maciej Stachowiak  <mjs@apple.com>
917
918         Reviewed by Richard.
919
920         <rdar://problem/3504049>: XMLSerializer object and serializeToString method needed for XMLHttpRequest testing
921
922         Also fixed some lasst-minute mistakes in the DOM serialization
923         code that was already there.
924         
925         * WebCore.pbproj/project.pbxproj:
926         * khtml/dom/dom_doc.h:
927         * khtml/ecma/Makefile.am:
928         * khtml/ecma/kjs_window.cpp:
929         (Window::get):
930         * khtml/ecma/kjs_window.h:
931         (KJS::Window::):
932         * khtml/ecma/kjs_window.lut.h:
933         (KJS::):
934         * khtml/ecma/xmlserializer.cpp: Added.
935         (KJS::XMLSerializerConstructorImp::XMLSerializerConstructorImp):
936         (KJS::XMLSerializerConstructorImp::implementsConstruct):
937         (KJS::XMLSerializerConstructorImp::construct):
938         (KJS::):
939         (KJS::XMLSerializer::XMLSerializer):
940         (KJS::XMLSerializerProtoFunc::tryCall):
941         * khtml/ecma/xmlserializer.h: Added.
942         (KJS::XMLSerializer::toBoolean):
943         (KJS::XMLSerializer::classInfo):
944         (KJS::XMLSerializer::):
945         * khtml/ecma/xmlserializer.lut.h: Added.
946         (KJS::):
947         * khtml/xml/dom_docimpl.cpp:
948         (DocumentImpl::toString):
949         (DocumentFragmentImpl::toString):
950         * khtml/xml/dom_elementimpl.cpp:
951         (AttrImpl::toString):
952         (ElementImpl::toString):
953
954 2003-12-09  David Hyatt  <hyatt@apple.com>
955
956         Implement start() and stop() for marquees.
957         
958         Reviewed by darin
959
960         * khtml/ecma/kjs_html.cpp:
961         (KJS::HTMLElement::classInfo):
962         (KJS::HTMLElementFunction::tryCall):
963         * khtml/ecma/kjs_html.h:
964         (KJS::HTMLElement::):
965         * khtml/ecma/kjs_html.lut.h:
966         (KJS::):
967
968 2003-12-09  Darin Adler  <darin@apple.com>
969
970         Reviewed by John.
971
972         - fixed 3505277: nil-deref in ownerElement after choosing item from menu at projectnissan.com
973
974         * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::dispatchWindowEvent): Add check for nil.
975
976 2003-12-09  Darin Adler  <darin@apple.com>
977
978         Reviewed by Maciej.
979
980         * kwq/KWQKHTMLPart.mm:
981         (KWQKHTMLPart::saveLocationProperties): Add locking around the call to get the location
982         since it can allocate.
983         (KWQKHTMLPart::restoreLocationProperties): Ditto.
984
985 2003-12-09  David Hyatt  <hyatt@apple.com>
986
987         Fix for mojibake bg painting problem on bofa.com.  The bug # is 3487144.  Transparent colors were not
988         being handled properly when specified on the body.
989         
990         Reviewed by darin
991
992         * khtml/rendering/render_box.cpp:
993         (RenderBox::paintRootBoxDecorations):
994         (RenderBox::paintBackgroundExtended):
995
996 2003-12-09  Darin Adler  <darin@apple.com>
997
998         Reviewed by Dave.
999
1000         - fixed 3505391: REGRESSION (100-116): pages that move cells around don't repaint correctly
1001
1002         * khtml/rendering/render_table.cpp: (RenderTableSection::layoutRows): Added code
1003         similar to the code in RenderBlock::layoutBlock, but for table cells.
1004
1005 2003-12-09  Darin Adler  <darin@apple.com>
1006
1007         Reviewed by Maciej.
1008
1009         * khtml/ecma/kjs_events.cpp: (JSEventListener::handleEvent): Add locking around the call to
1010         push event handler scope. Without this, we hit the "allocated without locking" assertion.
1011
1012 2003-12-09  David Hyatt  <hyatt@apple.com>
1013
1014         Fix the dirty rect checks on various render_objects to be more accurate so that page-break properties don't
1015         have mojibake when printing.
1016         
1017         Reviewed by john
1018
1019         * khtml/rendering/render_block.cpp:
1020         (khtml::RenderBlock::paint):
1021         * khtml/rendering/render_flow.cpp:
1022         (RenderFlow::paintLineBoxBackgroundBorder):
1023         (RenderFlow::paintLineBoxDecorations):
1024         * khtml/rendering/render_replaced.cpp:
1025         (RenderReplaced::paint):
1026         * khtml/rendering/render_table.cpp:
1027         (RenderTable::paint):
1028
1029 2003-12-09  Darin Adler  <darin@apple.com>
1030
1031         Reviewed by Richard.
1032
1033         - fixed 3500408: Web Kit should pass the MAYSCRIPT attribute from the APPLET tag to the Java plug-in
1034
1035         * khtml/html/html_objectimpl.cpp:
1036         (HTMLAppletElementImpl::parseAttribute): Allow the "mayscript" attribute.
1037         (HTMLAppletElementImpl::createRenderer): Pass the value of the "mayscript" attribute
1038         as an argument named "mayScript".
1039
1040         * khtml/misc/htmlattrs.in: Added "mayscript".
1041         * khtml/misc/htmlattrs.c: Regenerated.
1042         * khtml/misc/htmlattrs.h: Regenerated.
1043
1044 2003-12-09  Maciej Stachowiak  <mjs@apple.com>
1045
1046         Reviewed by Darin.
1047
1048         <rdar://problem/3501030>: JavaScript sites crash when a PAC file is in place (WebCore,Safari 1.2)
1049         
1050         * khtml/ecma/kjs_events.cpp:
1051         (JSEventListener::handleEvent): Lock interpreter when needed.
1052         (JSLazyEventListener::parseCode): Likewise.
1053         (KJS::getDOMEvent): Likewise.
1054         * khtml/ecma/kjs_proxy.cpp:
1055         (KJSProxyImpl::evaluate): Likewise.
1056         (KJSProxyImpl::initScript): Likewise.
1057
1058 2003-12-09  David Hyatt  <hyatt@apple.com>
1059
1060         Fix for 3491235, really make <script src="..."/> work in HTML.  My original attempt to fix this only made
1061         the tag flat, but did not ensure that the script got processed.
1062         
1063         Reviewed by john
1064
1065         * khtml/html/htmltokenizer.cpp:
1066         (HTMLTokenizer::parseTag):
1067
1068 2003-12-08  David Hyatt  <hyatt@apple.com>
1069
1070         Fix for 3503652, news.com misrenders badly (footer is out of position).  My fix to 3495748 caused this
1071         regression.  I made the tag priority of <nobr> too high.  It needed to be the same as <div>, and I
1072         accidentally made it higher.  I intended for it to be the same as <div>.
1073
1074         I also had to make a fix (now that <nobr> has a higher priority) to ensure <nobr> can't be nested inside
1075         other <nobr>.  
1076
1077         Both fixes were required to make news.com render correctly again.
1078         
1079         Reviewed by darin
1080
1081         * khtml/html/dtd.cpp:
1082         * khtml/html/htmlparser.cpp:
1083         (KHTMLParser::getElement):
1084
1085 2003-12-08  Chris Blumenberg  <cblu@apple.com>
1086
1087         Fixed: <rdar://problem/3234676>: Support for KEYGEN tag (ie 509 email certificates from www.thawte.com)
1088
1089         Reviewed by mjs.
1090
1091         * WebCore-combined.exp:
1092         * WebCore.exp:
1093         * WebCore.pbproj/project.pbxproj:
1094         * khtml/html/html_formimpl.cpp:
1095         (HTMLKeygenElementImpl::parseAttribute): store the KEYTYPE attribute
1096         (HTMLKeygenElementImpl::encoding): call KSSLKeyGen::signedPublicKeyAndChallengeString
1097         * khtml/html/html_formimpl.h: remove 2 declared but unimplemented methods
1098         * khtml/misc/htmlattrs.c: generated changes
1099         (hash_attr):
1100         (findAttr):
1101         * khtml/misc/htmlattrs.h: generated change
1102         * khtml/misc/htmlattrs.in: added KEYTYPE
1103         * kwq/KWQKSSLKeyGen.h:
1104         * kwq/KWQKSSLKeyGen.mm:
1105         (KSSLKeyGen::supportedKeySizes): call renamed strengthMenuItemTitles
1106         (KSSLKeyGen::signedPublicKeyAndChallengeString): new, calls [WebCoreKeyGenerationFactory signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:] 
1107         * kwq/WebCoreKeyGenerationFactory.h: Added.
1108         * kwq/WebCoreKeyGenerationFactory.m: Added.
1109         (+[WebCoreKeyGenerationFactory sharedFactory]):
1110         (-[WebCoreKeyGenerationFactory init]):
1111         (-[WebCoreKeyGenerationFactory strengthMenuItemTitles]):
1112         (-[WebCoreKeyGenerationFactory signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:]):
1113         * kwq/WebCoreLocalizedStringFactory.h: Removed.
1114         * kwq/WebCoreLocalizedStringFactory.m: Removed.
1115
1116 2003-12-08  Maciej Stachowiak  <mjs@apple.com>
1117
1118         Reviewed by Ken.
1119
1120         <rdar://problem/3504047>: XMLHttpRequest object needs onload event
1121         
1122         * khtml/ecma/xmlhttprequest.cpp:
1123         (KJS::XMLHttpRequest::getValueProperty): Implemented onload property.
1124         (KJS::XMLHttpRequest::putValue): Ditto.
1125         (KJS::XMLHttpRequest::XMLHttpRequest): Ditto.
1126         (KJS::XMLHttpRequest::changeState): Ditto.
1127         * khtml/ecma/xmlhttprequest.h:
1128         * khtml/ecma/xmlhttprequest.lut.h: Regenerated.
1129
1130 2003-12-08  David Hyatt  <hyatt@apple.com>
1131
1132         Fix for 3503022, asahi.com is too wide.  Bugs in line breaking of breakable Japanese characters caused
1133         the breaks to be ignored.
1134         
1135         Reviewed by john
1136
1137         * khtml/rendering/render_text.cpp:
1138         (RenderText::calcMinMaxWidth):
1139
1140 2003-12-05  David Hyatt  <hyatt@apple.com>
1141
1142         Fix the position method to return screen coords like it should and to use the lower left corner instead of
1143         the upper left.
1144         
1145         Reviewed by john
1146
1147         * kwq/KWQAccObject.h:
1148         * kwq/KWQAccObject.mm:
1149         (-[KWQAccObject position]):
1150         (-[KWQAccObject size]):
1151
1152 2003-12-07  Darin Adler  <darin@apple.com>
1153
1154         Reviewed by John.
1155
1156         - fixed 3502347: REGRESSION (100-116): bottom of login window sometimes missing (TR background image)
1157
1158         * khtml/rendering/render_object.h: Added setPixmap.
1159         * khtml/rendering/render_object.cpp: (RenderObject::setPixmap): Moved this
1160         function here from RenderBox. This code is needed for the table row class and
1161         similar classes that supply a background image that is drawn by the table cell,
1162         and those are not RenderBox subclasses.
1163
1164         * khtml/rendering/render_box.cpp: Removed setPixmap.
1165         * khtml/rendering/render_box.h: Removed setPixmap.
1166
1167 2003-12-06  John Sullivan  <sullivan@apple.com>
1168
1169         - fixed <rdar://problem/3502655>: REGRESSION: Repro crash at espn.com
1170
1171         Reviewed by Darin.
1172
1173         * khtml/html/html_objectimpl.cpp:
1174         (HTMLAppletElementImpl::getAppletInstance):
1175         Check for nil RenderApplet before dereferencing rather than after.
1176
1177 2003-12-05  David Hyatt  <hyatt@apple.com>
1178
1179         Add support for link clicking as an accessibility action.
1180         
1181         Reviewed by john
1182
1183         * kwq/KWQAccObject.mm:
1184         (-[KWQAccObject anchorElement]):
1185         (-[KWQAccObject role]):
1186         (-[KWQAccObject accessibilityAttributeNames]):
1187         (-[KWQAccObject accessibilityActionNames]):
1188         (-[KWQAccObject accessibilityActionDescription:]):
1189         (-[KWQAccObject accessibilityPerformAction:]):
1190
1191 2003-12-05  Maciej Stachowiak  <mjs@apple.com>
1192
1193         Reviewed by John.
1194
1195         <rdar://problem/3487222>: Add ability to create working fully standalone document object
1196         
1197         * khtml/css/cssstyleselector.cpp:
1198         (khtml::CSSStyleSelector::CSSStyleSelector):
1199         (khtml::CSSStyleSelector::addSheet):
1200         (khtml::CSSStyleSelector::initForStyleResolve):
1201         (khtml::CSSStyleSelector::applyRule):
1202         * khtml/dom/dom_doc.cpp:
1203         (DOM::Document::part):
1204         * khtml/dom/dom_doc.h:
1205         * khtml/ecma/kjs_dom.cpp:
1206         (DOMDocument::getValueProperty):
1207         (KJS::checkNodeSecurity):
1208         * khtml/ecma/kjs_html.cpp:
1209         (KJS::HTMLDocFunction::tryCall):
1210         (KJS::HTMLDocument::tryGet):
1211         (KJS::HTMLDocument::putValue):
1212         (KJS::HTMLElement::tryGet):
1213         (Image::notifyFinished):
1214         * khtml/ecma/kjs_traversal.cpp:
1215         (JSNodeFilter::acceptNode):
1216         * khtml/ecma/xmlhttprequest.cpp:
1217         (KJS::XMLHttpRequest::changeState):
1218         * khtml/html/html_baseimpl.cpp:
1219         (HTMLBodyElementImpl::insertedIntoDocument):
1220         (HTMLFrameElementImpl::isURLAllowed):
1221         (HTMLFrameElementImpl::attach):
1222         (HTMLFrameElementImpl::detach):
1223         (HTMLFrameElementImpl::contentDocument):
1224         (HTMLIFrameElementImpl::attach):
1225         * khtml/html/html_documentimpl.cpp:
1226         (HTMLDocumentImpl::referrer):
1227         (HTMLDocumentImpl::lastModified):
1228         * khtml/html/html_formimpl.cpp:
1229         (HTMLFormElementImpl::formData):
1230         (HTMLFormElementImpl::prepareSubmit):
1231         (HTMLFormElementImpl::submit):
1232         (HTMLFormElementImpl::reset):
1233         (HTMLGenericFormElementImpl::isKeyboardFocusable):
1234         (HTMLGenericFormElementImpl::defaultEventHandler):
1235         * khtml/html/html_headimpl.cpp:
1236         (HTMLBaseElementImpl::process):
1237         (HTMLLinkElementImpl::process):
1238         * khtml/html/html_inlineimpl.cpp:
1239         (HTMLAnchorElementImpl::isKeyboardFocusable):
1240         (HTMLAnchorElementImpl::defaultEventHandler):
1241         * khtml/html/html_objectimpl.cpp:
1242         (HTMLAppletElementImpl::createRenderer):
1243         (HTMLAppletElementImpl::getAppletInstance):
1244         (HTMLEmbedElementImpl::rendererIsNeeded):
1245         (HTMLObjectElementImpl::rendererIsNeeded):
1246         * khtml/html/htmltokenizer.cpp:
1247         (HTMLTokenizer::scriptExecution):
1248         (HTMLTokenizer::parseTag):
1249         * khtml/rendering/render_applet.cpp:
1250         (RenderApplet::RenderApplet):
1251         * khtml/xml/dom_docimpl.cpp:
1252         (DocumentImpl::setTitle):
1253         (DocumentImpl::part):
1254         (DocumentImpl::close):
1255         (DocumentImpl::processHttpEquiv):
1256         * khtml/xml/dom_docimpl.h:
1257         * khtml/xml/dom_nodeimpl.cpp:
1258         (NodeImpl::dispatchEvent):
1259         * kwq/KWQAccObject.mm:
1260         (-[KWQAccObject textUnderElement]):
1261         * kwq/KWQKHTMLPart.mm:
1262         (KWQKHTMLPart::partForNode):
1263         (KWQKHTMLPart::attributedString):
1264
1265 2003-12-05  Richard Williamson   <rjw@apple.com>
1266
1267         Fixed 3501885.  Added null test to returned node from collection.
1268
1269         Reviewed by John.
1270
1271         * khtml/ecma/kjs_html.cpp:
1272         (KJS::HTMLCollection::tryGet):
1273
1274 2003-12-04  Richard Williamson   <rjw@apple.com>
1275
1276         Added support for named applet access from document node.
1277         Factored creation of KJS::Values from RuntimeObjectImps.
1278
1279         Reviewed by Chris.
1280
1281         * khtml/ecma/kjs_dom.cpp:
1282         (KJS::getDOMNamedNodeMap):
1283         (KJS::getRuntimeObject):
1284         * khtml/ecma/kjs_dom.h:
1285         * khtml/ecma/kjs_html.cpp:
1286         (KJS::HTMLDocument::tryGet):
1287         (KJS::HTMLElement::tryGet):
1288         (KJS::HTMLCollection::tryGet):
1289
1290 2003-12-04  Darin Adler  <darin@apple.com>
1291
1292         Reviewed by John.
1293
1294         - fixed 3498712: REGRESSION (100-115): Safari aborts at http://www11.dht.dk/~blangstrup_org/
1295
1296         This was an uncaught exception thrown by DocumentImpl. But the design of KHTML DOM is that
1297         "impl" classes return exception codes; they don't throw exceptions.
1298
1299         * khtml/dom/dom_doc.cpp:
1300         (DOM::Document::createElement): Throw exception if necessary. The impl function now returns
1301         an exception code.
1302         (DOM::Document::createElementNS): Ditto.
1303
1304         * khtml/html/html_documentimpl.h: Add exception code parameter to createElement.
1305         * khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::createElement): Pass along the
1306         exception code from the lower level.
1307
1308         * khtml/xml/dom_docimpl.h: Add exception code parameters to createElement, createElementNS,
1309         and createHTMLElement.
1310         * khtml/xml/dom_docimpl.cpp:
1311         (DOMImplementationImpl::createDocument): Handle exception code from createElementNS.
1312         (DocumentImpl::createElement): Add exception code parameter, not set since there is
1313         no exception.
1314         (DocumentImpl::importNode): Handle exception code from createElementNS.
1315         (DocumentImpl::createElementNS): Add exception code parameter. Propagate the exception
1316         codes that we get from createHTMLElement and setPrefix.
1317         (DocumentImpl::createHTMLElement): Add exception code parameter. Use an exception code
1318         rather than a C++ exception for INVALID_CHARACTER_ERR.
1319
1320         * khtml/xml/dom_elementimpl.cpp: (ElementImpl::cloneNode): Pass exception code parameter to
1321         createElement.
1322
1323         * khtml/xml/xml_tokenizer.cpp:
1324         (XMLHandler::startElement): Pass exception code parameter to createElementNS, and return false
1325         if it is not zero. This is where the bug happened. Before we would get an exception from
1326         createElementNS, but "impl" functions are not supposed to throw in KHTML's DOM.
1327         (XMLTokenizer::finish): Add various exception code parameters to compile, but we know we won't
1328         get any exceptions.
1329
1330         * kwq/WebCoreDOMDocument.mm:
1331         (-[WebCoreDOMDocument createElement:]): Pass an (ignored) exception code parameter.
1332         (-[WebCoreDOMDocument createElementNS::]): Pass an (ignored) exception code parameter.
1333
1334 === Safari-116 ===
1335
1336 2003-12-03  Richard Williamson   <rjw@apple.com>
1337
1338         LiveConnect:  Removed some debugging.
1339
1340         Reviewed by Chris.
1341
1342         * khtml/ecma/kjs_html.cpp:
1343         (KJS::HTMLCollection::tryGet):
1344
1345 2003-12-03  David Hyatt  <hyatt@apple.com>
1346
1347         Fix for 3475761, list bullets mislayout after text zooming.
1348         
1349         Reviewed by kocienda
1350
1351         * khtml/rendering/render_block.cpp:
1352         (khtml::RenderBlock::setStyle):
1353
1354 2003-12-03  David Hyatt  <hyatt@apple.com>
1355
1356         Fix for 3493356, table cells didn't repaint properly.
1357         
1358         Reviewed by kocienda
1359
1360         * khtml/rendering/render_object.cpp:
1361         (RenderObject::repaintObjectsBeforeLayout):
1362         * khtml/rendering/render_table.cpp:
1363         (RenderTableCell::getAbsoluteRepaintRect):
1364         * khtml/rendering/render_table.h:
1365
1366 2003-12-03  David Hyatt  <hyatt@apple.com>
1367
1368         Fix for 3495748, hang in parser at ocelot.ca.  <nobr> needs to have very high priority (equal to the
1369         priority of blocks like h1-6, p, and div), so that unclosed <nobr>s will close divs and ps.
1370         
1371         Reviewed by gramps
1372
1373         * khtml/html/dtd.cpp:
1374
1375 2003-12-03  David Hyatt  <hyatt@apple.com>
1376
1377         Fix for 3475767, hang at saabnet.com.  Fix h1-h6 to be more tolerant regarding allowed child elements, to avoid
1378         deeply nested pages.
1379         
1380         Reviewed by darin
1381
1382         * khtml/html/dtd.cpp:
1383         (DOM::checkChild):
1384
1385 2003-12-03  John Sullivan  <sullivan@apple.com>
1386
1387         - fixed these two design issues after Dave and I talked to HI:
1388         <rdar://problem/3497072>: There shouldn't be a focus ring around clicked regions
1389         <rdar://problem/3499315>: Focus ring should use aqua color always
1390
1391         Reviewed by Dave.
1392
1393         * khtml/css/html4.css:
1394
1395 2003-12-03  Maciej Stachowiak  <mjs@apple.com>
1396
1397         Reviewed by Ken.
1398
1399         <rdar://problem/3395759>: results of parent.document.getElementsByTagName can't be added to string
1400         
1401         * khtml/ecma/kjs_dom.cpp:
1402         (DOMNodeList::toPrimitive): Always convert to string instead of trying to convert
1403         to number and failing, as is done for DOMNode.
1404         * khtml/ecma/kjs_dom.h: Prototype new method.
1405
1406 2003-12-02  Richard Williamson   <rjw@apple.com>
1407
1408         Return a value that is backed by RuntimeObjectImpl, instead
1409         of a DOM object for applet[0].  This is better than having
1410         the DOM object redirect to the RuntimeObjectImpl.
1411
1412         Reviewed by Chris.
1413
1414         * khtml/ecma/kjs_html.cpp:
1415         (KJS::HTMLCollection::tryGet):
1416
1417 2003-12-02  Maciej Stachowiak  <mjs@apple.com>
1418
1419         Reviewed by John.
1420
1421         <rdar://problem/3488220>: namespaces test from David Faure causes Safari to crash in DOM::DocumentImpl::createElementNS
1422         
1423         * khtml/xml/dom_docimpl.cpp:
1424         (DocumentImpl::createElementNS): Check if new element is NULL
1425         before messing with it, to avoid a crash.
1426
1427 2003-12-02  David Hyatt  <hyatt@apple.com>
1428
1429         Fix for 3497999, null check the text() of RenderTexts to avoid a crash in current().
1430         
1431         Reviewed by kocienda
1432
1433         * khtml/rendering/bidi.cpp:
1434         (khtml::BidiIterator::current):
1435
1436 2003-12-02  Maciej Stachowiak  <mjs@apple.com>
1437
1438         Reviewed by Darin.
1439
1440         Implemented a simple form of document serialization, enough to take care of:
1441
1442         <rdar://problem/3487190>: implement send of DOMDocument for XMLHttpRequest
1443
1444         * khtml/dom/dom_doc.cpp:
1445         (DOM::Document::toString):
1446         * khtml/dom/dom_doc.h:
1447         * khtml/ecma/xmlhttprequest.cpp:
1448         (KJS::XMLHttpRequest::urlMatchesDocumentDomain):
1449         (KJS::XMLHttpRequestProtoFunc::tryCall):
1450         * khtml/html/html_elementimpl.cpp:
1451         (HTMLElementImpl::toString):
1452         * khtml/html/html_elementimpl.h:
1453         * khtml/xml/dom_docimpl.cpp:
1454         (DocumentImpl::toString):
1455         (DocumentFragmentImpl::toString):
1456         (DocumentTypeImpl::copyFrom):
1457         (DocumentTypeImpl::toString):
1458         * khtml/xml/dom_docimpl.h:
1459         * khtml/xml/dom_elementimpl.cpp:
1460         (AttrImpl::toString):
1461         (ElementImpl::openTagStartToString):
1462         (ElementImpl::toString):
1463         * khtml/xml/dom_elementimpl.h:
1464         * khtml/xml/dom_nodeimpl.h:
1465         * khtml/xml/dom_textimpl.cpp:
1466         (CommentImpl::toString):
1467         (TextImpl::toString):
1468         (CDATASectionImpl::toString):
1469         * khtml/xml/dom_textimpl.h:
1470         * khtml/xml/dom_xmlimpl.cpp:
1471         (EntityImpl::toString):
1472         (EntityReferenceImpl::toString):
1473         (ProcessingInstructionImpl::setStyleSheet):
1474         (ProcessingInstructionImpl::toString):
1475         * khtml/xml/dom_xmlimpl.h:
1476
1477 2003-12-02  David Hyatt  <hyatt@apple.com>
1478
1479         Fix for 3493677, containingBlock() null because we tried to support position:relative on table rows.  Fix
1480         is to disallow this.
1481         
1482         Reviewed by kocienda
1483
1484         * khtml/css/cssstyleselector.cpp:
1485         (khtml::CSSStyleSelector::adjustRenderStyle):
1486
1487 2003-12-02  David Hyatt  <hyatt@apple.com>
1488
1489         Fix for 3493697, nil-deref in bidi code.  Need to null-check strings with no length.
1490         
1491         Reviewed by john
1492
1493         * khtml/rendering/bidi.cpp:
1494         (khtml::addRun):
1495
1496 2003-12-02  David Hyatt  <hyatt@apple.com>
1497
1498         Fix for 3495746, nil deref of containing block (frame inside frameset).
1499         
1500         Reviewed by kocienda
1501
1502         * khtml/rendering/render_box.cpp:
1503         (RenderBox::containingBlockWidth):
1504
1505 2003-12-02  Ken Kocienda  <kocienda@apple.com>
1506
1507         Reviewed by John
1508
1509         * kwq/KWQRect.h:
1510         * kwq/KWQRect.mm:
1511         (QRect::bottomRight): Added helper.
1512
1513 2003-12-02  Maciej Stachowiak  <mjs@apple.com>
1514
1515         Merged the following patch from David Faure to fix:
1516
1517         <rdar://problem/3497663>: Can't look up frames by number using windw[i] notation
1518
1519     2003-11-25  David Faure  <faure@kde.org>
1520
1521         * ecma/kjs_window.cpp: Implement hasProperty and get for frames by number in Window,
1522         to fix window[0] and parent[1] etc. (#56983)
1523
1524 2003-11-21  Maciej Stachowiak  <mjs@apple.com>
1525
1526         Reviewed by Richard.
1527
1528         <rdar://problem/3487185>: implement security checks for XMLHttpRequest
1529         
1530         * khtml/ecma/xmlhttprequest.cpp:
1531         (KJS::XMLHttpRequest::open): Refuse to start if the URL is not one
1532         this document is allowed to access.
1533         (KJS::XMLHttpRequest::slotRedirection): Stop the job if we redirect
1534         to a URL the home document is not allowed to access.
1535         * kwq/KWQResourceLoader.mm:
1536         (-[KWQResourceLoader redirectedToURL:]): emit the right signal
1537         * kwq/WebCoreResourceLoader.h: Prototype new method
1538
1539 2003-12-01  Richard Williamson   <rjw@apple.com>
1540
1541 Fixed parameter passing to applet.  Child elements are NOT valid in setStyle().  So we now either create the widget before needed with createWidgetIfNecessary.  This either happens when doing the first layout, or when JavaScript first references the applet element.
1542
1543 Fixed early delete of the the main applet instance.  When the JS collector cleaned up the last JS object referring to the applet instance we were deleting the java instance.  This caused the applet instance cached on the applet element to be invalid.  The applet instance is the only Java object not to be cleaned up by the JS collector.
1544
1545 Added support for getting at Java object fields.
1546
1547         Reviewed by Chris.
1548
1549         * khtml/ecma/kjs_html.cpp:
1550         (KJS::HTMLElement::tryGet):
1551         * khtml/html/html_objectimpl.cpp:
1552         (HTMLAppletElementImpl::createRenderer):
1553         (HTMLAppletElementImpl::getAppletInstance):
1554         * khtml/html/html_objectimpl.h:
1555         * khtml/rendering/render_applet.cpp:
1556         (RenderApplet::createWidgetIfNecessary):
1557         (RenderApplet::layout):
1558         * khtml/rendering/render_applet.h:
1559         (khtml::RenderApplet::renderName):
1560
1561 2003-12-01  Darin Adler  <darin@apple.com>
1562
1563         Reviewed by Dave.
1564
1565         - fixed 3496960: nil-deref in idFromNode inside elementDoesAutoComplete:
1566
1567         * kwq/WebCoreBridge.mm:
1568         (inputElementFromDOMElement): Added nil check.
1569         (formElementFromDOMElement): Added nil check.
1570
1571 2003-12-01  David Hyatt  <hyatt@apple.com>
1572
1573         Fix for 3490959, collapsed border tables don't paint backgrounds.
1574         
1575         Reviewed by darin
1576
1577         * khtml/rendering/render_table.cpp:
1578         (RenderTable::setStyle):
1579         (RenderTable::paint):
1580         (RenderTable::paintBoxDecorations):
1581         * khtml/rendering/render_table.h:
1582
1583 2003-12-01  Darin Adler  <darin@apple.com>
1584
1585         Reviewed by Dave.
1586
1587         - fixed 3493939: ordered lists with type="A" roll over to A' after X rather than after Z
1588
1589         * khtml/rendering/render_list.cpp: (toLetter): Change 24 to 26.
1590
1591 === Safari-115 ===
1592
1593 2003-11-21  Maciej Stachowiak  <mjs@apple.com>
1594
1595         Reviewed by Ken.
1596
1597         WebCore part of fix for:
1598         
1599         <rdar://problem/3487134>: Implement http request/response status and headers for XMLHttpRequest
1600
1601         * khtml/ecma/xmlhttprequest.cpp:
1602         (KJS::XMLHttpRequest::getValueProperty): Call appropriate methods for
1603         status and statusText.
1604         (KJS::XMLHttpRequest::send): Set request headers as "customHeaders"
1605         metadata property.
1606         (KJS::XMLHttpRequest::setRequestHeader): Simply append to header
1607         string.
1608         (KJS::XMLHttpRequest::getAllResponseHeaders): Return the header string
1609         except for the first line.
1610         (KJS::XMLHttpRequest::getResponseHeader): Scan the response header
1611         string for the header field. Not sure if it's worth being more
1612         efficient.
1613         (KJS::XMLHttpRequest::getStatus): Try to pull a code out
1614         of the status line.
1615         (KJS::XMLHttpRequest::getStatusText): Pull the first line
1616         off the headers (if any), otherwise return undefined.
1617         (KJS::XMLHttpRequest::slotData): The first time through, save
1618         the response headers, retrieved from "HTTP-Headers" metadata
1619         property.
1620         (KJS::XMLHttpRequestProtoFunc::tryCall): Make setRequestHeader,
1621         getResponseHeader, getAllResponseHeaders call the right thing.
1622         * khtml/ecma/xmlhttprequest.h:
1623         * kwq/KWQKJobClasses.h:
1624         * kwq/KWQKJobClasses.mm:
1625         (KIO::TransferJobPrivate::TransferJobPrivate): Added header
1626         support.
1627         (KIO::TransferJobPrivate::~TransferJobPrivate):
1628         (KIO::TransferJob::assembleResponseHeaders): Get a header string
1629         out of the response if needed.
1630         (KIO::TransferJob::queryMetaData): Special-case "HTTP-Headers".
1631         (KIO::TransferJob::emitReceivedResponse): Save response.
1632         * kwq/KWQLoader.h:
1633         * kwq/KWQLoader.mm:
1634         (-[NSDictionary _webcore_initWithHeaderString:]): Helper method to
1635         turn a string of header fields into a dictionary.
1636         (KWQServeRequest): Pass custom headers through.
1637         (KWQResponseMIMEType): Admit it's an NSURLResponse *.
1638         (KWQResponseHeaderString): Assembled status code and response
1639         header fields into response header. Cheat a little on the status
1640         line.
1641         * kwq/KWQResourceLoader.mm:
1642         (-[KWQResourceLoader receivedResponse:]): Admit it's an
1643         NSURLResponse *.
1644         * kwq/WebCoreResourceLoader.h: Ditto.
1645         * kwq/WebCoreBridge.h: Add customHeader: arguments.
1646
1647 2003-11-21  Chris Blumenberg  <cblu@apple.com>
1648
1649         Fixed: <rdar://problem/3491907>: When viewing applet, view hierarchy was an empty KWQView
1650
1651         Reviewed by rjw.
1652
1653         * WebCore.pbproj/project.pbxproj:
1654         * khtml/html/html_objectimpl.cpp: removed setupApplet because that work is done when the applet widget is created
1655         (HTMLAppletElementImpl::createRenderer): pass the PARAM args to the render object
1656         (HTMLAppletElementImpl::getAppletInstance): don't call setupApplet
1657         * khtml/rendering/render_applet.cpp:
1658         (RenderApplet::RenderApplet): store args and context, don't call setQWidget here 
1659         (RenderApplet::setStyle): call setQWidget here
1660         (RenderApplet::layout): don't parse args here, that is done in HTMLAppletElementImpl::createRenderer
1661         * khtml/rendering/render_applet.h:
1662         * kwq/KWQKJavaAppletWidget.h:
1663         (KJavaApplet::KJavaApplet): turned into a stub, this work is no longer needed
1664         (KJavaApplet::setAppletClass): ditto
1665         (KJavaApplet::setAppletName): ditto
1666         (KJavaApplet::setArchives): ditto
1667         (KJavaApplet::setBaseURL): ditto
1668         (KJavaApplet::setCodeBase): ditto
1669         (KJavaApplet::setParameter): ditto
1670         (KJavaAppletWidget::~KJavaAppletWidget): ditto
1671         (KJavaAppletWidget::applet): ditto
1672         (KJavaAppletWidget::setBaseURL): ditto
1673         (KJavaAppletWidget::setParameter): ditto
1674         (KJavaAppletWidget::showApplet): ditto 
1675         * kwq/KWQKJavaAppletWidget.mm:
1676         (KJavaAppletWidget::KJavaAppletWidget): create the java here instead of doing it later
1677
1678 2003-11-21  John Sullivan  <sullivan@apple.com>
1679
1680         - WebCore part of fix for <rdar://problem/3333744>: Safari prints page with 
1681         very, very long line very, very small
1682
1683         Reviewed by Ken.
1684
1685         * kwq/KWQKHTMLPart.h:
1686         * kwq/KWQKHTMLPart.mm:
1687         (KWQKHTMLPart::forceLayoutWithPageWidthRange):
1688         Changed method name from forceLayoutForPageWidth; now takes min and max
1689         page width values. Use max page width value to limit how wide page will
1690         get when there's a very long line.
1691         
1692         * kwq/WebCoreBridge.h:
1693         * kwq/WebCoreBridge.mm:
1694         (-[WebCoreBridge forceLayoutWithMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
1695         changed pageWidth parameter into min and max parameters; pass them along to KWQKHTMLPart.
1696
1697 2003-11-21  Darin Adler  <darin@apple.com>
1698
1699         Reviewed by Ken.
1700
1701         - fixed 3490260: allow &sup1 to be misspelled &supl (lowercase l instead of numeral 1) because WinIE does
1702
1703         * khtml/html/kentities.gperf: Added supl to the list. Maps to U+00B9, just as sup1 does.
1704         * khtml/html/kentities.c: Regenerated.
1705
1706 2003-11-20  Maciej Stachowiak  <mjs@apple.com>
1707
1708         Reviewed by Darin.
1709
1710         - fixed 3487201 - Implement abort for XMLHttpRequest async loads
1711         
1712         * khtml/ecma/xmlhttprequest.cpp:
1713         (KJS::XMLHttpRequest::abort): Kill and clear job.
1714         (KJS::XMLHttpRequest::slotData): Avoid moving to state 3 on early abort.
1715         (KJS::XMLHttpRequestProtoFunc::tryCall): Call abort when appropriate.
1716         * khtml/ecma/xmlhttprequest.h:
1717
1718 2003-11-20  John Sullivan  <sullivan@apple.com>
1719
1720         - WebCore part of <rdar://problem/3183124>: Support page-break-before/after with a value of "always"
1721
1722         Dave wrote this part and we reviewed it together.
1723
1724         * khtml/rendering/render_block.cpp:
1725         (khtml::RenderBlock::paintObject):
1726         if printing, check for CSS page break locations
1727         (khtml::RenderBlock::inRootBlockContext):
1728         new method, used to check whether we're in a context for which
1729         CSS page breaks are legal.
1730         
1731         * khtml/rendering/render_block.h:
1732         prototype for inRootBlockContext; this might be useful for
1733         other code later.
1734         
1735         * khtml/rendering/render_canvas.cpp:
1736         (RenderCanvas::setBestTruncatedAt):
1737         now takes a forcedBreak parameter which overrides others.
1738         
1739         * khtml/rendering/render_canvas.h:
1740         (khtml::RenderCanvas::setTruncatedAt):
1741         set default value for m_forcedPageBreak
1742         
1743         * kwq/WebCoreBridge.h:
1744         * kwq/WebCoreBridge.mm:
1745         (-[WebCoreBridge computePageRects:withPageHeight:]):
1746         do the real work of pagination here
1747
1748 2003-11-20  Chris Blumenberg  <cblu@apple.com>
1749
1750         Fixed: <rdar://problem/3491225>: Need UI and localized strings for <KEYGEN> support
1751
1752         Reviewed by john.
1753
1754         * WebCore-combined.exp:
1755         * WebCore.exp:
1756         * WebCore.pbproj/project.pbxproj:
1757         * kwq/KWQKSSLKeyGen.h:
1758         * kwq/KWQKSSLKeyGen.mm: Added.
1759         (KSSLKeyGen::supportedKeySizes): implemented, calls [WebCoreLocalizedStringFactory keyGenerationMenuItemTitles]
1760         * kwq/WebCoreLocalizedStringFactory.h: Added.
1761         * kwq/WebCoreLocalizedStringFactory.m: Added.
1762         (+[WebCoreLocalizedStringFactory sharedFactory]): new
1763         (-[WebCoreLocalizedStringFactory init]): new
1764         (-[WebCoreLocalizedStringFactory keyGenerationMenuItemTitles]): new
1765
1766 2003-11-19  Maciej Stachowiak  <mjs@apple.com>
1767
1768         Reviewed by Ken.
1769
1770         - fixed 3490086 - support http post for XMLHttpRequest
1771         
1772         * kwq/KWQKJobClasses.h:
1773         * kwq/KWQKJobClasses.mm:
1774         (KIO::TransferJobPrivate::TransferJobPrivate):
1775         (KIO::TransferJob::TransferJob):
1776
1777 2003-11-20  Richard Williamson   <rjw@apple.com>
1778
1779         Cleaned up synchronous applet lookup and initialization.
1780         We need to further cleanup applet instantiation.  It doesn't
1781         need to be lazy with my modified Java Plugin.
1782
1783         Reviewed by Chris.
1784
1785         * khtml/ecma/kjs_html.cpp:
1786         (KJS::HTMLElement::tryGet):
1787         * khtml/html/html_objectimpl.cpp:
1788         (HTMLAppletElementImpl::setupApplet):
1789         (HTMLAppletElementImpl::getAppletInstance):
1790         * khtml/html/html_objectimpl.h:
1791         * kwq/KWQKHTMLPart.mm:
1792         (KWQKHTMLPart::getAppletInstanceForView):
1793         * kwq/KWQKJavaAppletWidget.h:
1794         * kwq/KWQKJavaAppletWidget.mm:
1795         (KJavaAppletWidget::showApplet):
1796
1797 2003-11-20  Ken Kocienda  <kocienda@apple.com>
1798
1799         Reviewed by David
1800
1801         Fix for this bug:
1802
1803         <rdar://problem/3487421>: crash/exception when tabbing to a link without text
1804
1805         * khtml/html/html_inlineimpl.cpp:
1806         (HTMLAnchorElementImpl::isFocusable): A link is also not focusable 
1807         if it has zero width or height, if it has no children, or if it is 
1808         is not a continuation.
1809         * kwq/KWQPainter.mm:
1810         (QPainter::drawFocusRing): Put in a guard against trying to draw a focus
1811         ring with no control points. Log this as an error.
1812
1813 2003-11-19  David Hyatt  <hyatt@apple.com>
1814
1815         Fix for 3486963, crash because generated content was referencing a deleted object.  Fix is to update the
1816         variable to a sane value after deleting old generated content.
1817         
1818         Reviewed by darin
1819
1820         * khtml/rendering/render_container.cpp:
1821         (RenderContainer::updatePseudoChild):
1822
1823 2003-11-19  Maciej Stachowiak  <mjs@apple.com>
1824
1825         Reviewed by John.
1826
1827         - fixed 3486998 - Implement asynchronous http loading for XMLHttpRequest
1828         
1829         * khtml/ecma/xmlhttprequest.cpp:
1830         (KJS::XMLHttpRequestQObject::XMLHttpRequestQObject): New QObject to use to
1831         connect to signals.
1832         (KJS::XMLHttpRequestQObject::slotData): Call XMLHttpRequest.
1833         (KJS::XMLHttpRequestQObject::slotFinished): Ditto.
1834         (KJS::XMLHttpRequestQObject::slotRedirection): Ditto.
1835         (KJS::XMLHttpRequest::getValueProperty): Implemented, onrequeststatechange,
1836         readyState and responseText.
1837         (KJS::XMLHttpRequest::putValue): Implemented onrequeststatechange.
1838         (KJS::XMLHttpRequest::XMLHttpRequest): Initialize new fields.
1839         (KJS::XMLHttpRequest::~XMLHttpRequest): Delete decoder.
1840         (KJS::XMLHttpRequest::changeState): Update state, and send event if needed.
1841         (KJS::XMLHttpRequest::open): Save the parameters.
1842         (KJS::XMLHttpRequest::send): Fire up a post or get job.
1843         (KJS::XMLHttpRequest::slotFinished): go to final state.
1844         (KJS::XMLHttpRequest::slotRedirection): Just stub for now.
1845         (KJS::XMLHttpRequest::slotData): Update state; decode & save data.
1846         (KJS::XMLHttpRequestProtoFunc::tryCall): Implemented open and send.
1847         * khtml/ecma/xmlhttprequest.h: Prototyped new stuff.
1848         * khtml/xml/dom2_eventsimpl.cpp:
1849         (EventImpl::typeToId): Added "readystatechange" event.
1850         (EventImpl::idToType): Ditto.
1851         * khtml/xml/dom2_eventsimpl.h: Ditto.
1852         * kwq/KWQLoader.h:
1853         * kwq/KWQLoader.mm:
1854         (KWQServeRequest): New variant that doesn't need a Request.
1855         * kwq/KWQSlot.mm:
1856         (KWQSlot::KWQSlot): Handle XMLHttpRequestQObject's slots.
1857         (KWQSlot::call): Ditto.
1858
1859 2003-11-19  Richard Williamson   <rjw@apple.com>
1860
1861         More LiveConnect stuff.  With that patch we make the applet
1862         visible to JavaScript in an Bindings::Instance.  Next step
1863         it to flush out implementation of RuntimeObjectImp and
1864         RuntimeFunctionImp.
1865
1866         Reviewed by Ken.
1867
1868         * khtml/html/html_objectimpl.cpp:
1869         (HTMLAppletElementImpl::HTMLAppletElementImpl):
1870         (HTMLAppletElementImpl::~HTMLAppletElementImpl):
1871         (HTMLAppletElementImpl::getAppletInstance):
1872         * khtml/html/html_objectimpl.h:
1873         * kwq/KWQKHTMLPart.h:
1874         * kwq/KWQKHTMLPart.mm:
1875         (KWQKHTMLPart::getAppletInstanceForView):
1876         * kwq/WebCoreBridge.h:
1877
1878 2003-11-19  David Hyatt  <hyatt@apple.com>
1879
1880         Fix for 3488888, about:blank in iframes doesn't repaint properly.  Fix for 3485478, refreshing a remote
1881         page often causes a white flash.  Fix for 3488827, XML/XHTML documents don't fire load events on bodies/framesets.
1882         
1883         Reviewed by darin
1884         
1885         * khtml/html/html_documentimpl.cpp:
1886         (HTMLDocumentImpl::HTMLDocumentImpl):
1887         * khtml/html/html_documentimpl.h:
1888         * khtml/rendering/render_canvas.cpp:
1889         (RenderCanvas::RenderCanvas):
1890         (RenderCanvas::layout):
1891         * khtml/xml/dom_docimpl.cpp:
1892         (DocumentImpl::DocumentImpl):
1893         (DocumentImpl::body):
1894         (DocumentImpl::close):
1895         * khtml/xml/dom_docimpl.h:
1896
1897 2003-11-18  Maciej Stachowiak  <mjs@apple.com>
1898
1899         Reviewed by Darin.
1900
1901         - fixed 3488883 - KIO::TransferJob needs to really use signals instead of calling loader directly
1902         
1903         * khtml/khtml_part.cpp:
1904         (KHTMLPart::openURL):
1905         * khtml/misc/loader.cpp:
1906         (Loader::servePendingRequests):
1907         (Loader::slotReceivedResponse):
1908         * khtml/misc/loader.h:
1909         * kwq/KWQKJobClasses.h:
1910         * kwq/KWQKJobClasses.mm:
1911         (KIO::TransferJob::TransferJob):
1912         (KIO::TransferJob::url):
1913         (KIO::TransferJob::emitData):
1914         (KIO::TransferJob::emitRedirection):
1915         (KIO::TransferJob::emitResult):
1916         (KIO::TransferJob::emitReceivedResponse):
1917         * kwq/KWQLoader.mm:
1918         (KWQServeRequest):
1919         * kwq/KWQObject.mm:
1920         (QObject::connect):
1921         * kwq/KWQResourceLoader.h:
1922         * kwq/KWQResourceLoader.mm:
1923         (-[KWQResourceLoader receivedResponse:]):
1924         (-[KWQResourceLoader addData:]):
1925         (-[KWQResourceLoader finishJobAndHandle]):
1926         * kwq/KWQSignal.h:
1927         * kwq/KWQSignal.mm:
1928         (KWQSignal::call):
1929         * kwq/KWQSlot.h:
1930         * kwq/KWQSlot.mm:
1931         (KWQSlot::KWQSlot):
1932         (KWQSlot::call):
1933
1934 2003-11-18  David Hyatt  <hyatt@apple.com>
1935
1936         Fix for 3488244, marquee-increments with percentage values not handled correctly.  Also added a tweak to ensure
1937         that 1% of a small value ends up being at least an increment of 1.  Also added an optimization to not even
1938         bother kicking off the marquee timer if the increment's initial value is 0 (matches WinIE).
1939
1940         * khtml/rendering/render_layer.cpp:
1941         (Marquee::start):
1942         (Marquee::timerEvent):
1943
1944 2003-11-18  Richard Williamson   <rjw@apple.com>
1945
1946         More live connect stuff.  We're getting close.
1947
1948         Reviewed by Chris.
1949
1950         * WebCore.pbproj/project.pbxproj:
1951         * khtml/ecma/kjs_html.cpp:
1952         (KJS::HTMLElement::tryGet):
1953         * khtml/html/html_objectimpl.cpp:
1954         (HTMLAppletElementImpl::parseAttribute):
1955         (HTMLAppletElementImpl::getAppletInstance):
1956         * khtml/html/html_objectimpl.h:
1957
1958 2003-11-18  David Hyatt  <hyatt@apple.com>
1959
1960         Fix for 3478122, crash using first-letter and zooming, and also the fix for 3478078, generated content
1961         does not get removed properly on w3c site.  The root cause of these two bugs was the same, namely my
1962         change to meld the concept of generated anonymous content and anonymous blocks created by the layout
1963         engine together.  RenderBlock's setStyle method was incorrectly updating before/after/first-letter content
1964         and wiping out its style in random (and bad) ways.
1965         
1966         * khtml/rendering/render_block.cpp:
1967         (khtml::RenderBlock::setStyle):
1968
1969 2003-11-18  David Hyatt  <hyatt@apple.com>
1970
1971         Fix for 3487424, images not painting because of dropped layouts.  When replaced elements dirtied
1972         themselves during line layout, they only needed to do a local dirty and not walk up the parent chain.
1973         
1974         Reviewed by mjs
1975
1976         * khtml/rendering/bidi.cpp:
1977         (khtml::RenderBlock::layoutInlineChildren):
1978
1979 2003-11-17  Maciej Stachowiak  <mjs@apple.com>
1980
1981         Reviewed by Dave.
1982
1983         - fixed 3486991 - Add XMLHttpRequest object and stub methods
1984
1985         * khtml/ecma/kjs_window.cpp:
1986         (Window::get): Handle XMLHttpRequest constructor like Option and Image.
1987         * khtml/ecma/kjs_window.h: Ditto.
1988         * khtml/ecma/kjs_window.lut.h: Regenerated.
1989         * khtml/ecma/xmlhttprequest.cpp: Added. Stub implementations of everything.
1990         (KJS::XMLHttpRequestConstructorImp::XMLHttpRequestConstructorImp):
1991         (KJS::XMLHttpRequestConstructorImp::implementsConstruct):
1992         (KJS::XMLHttpRequestConstructorImp::construct):
1993         (KJS::XMLHttpRequest::tryGet):
1994         (KJS::XMLHttpRequest::getValueProperty):
1995         (KJS::XMLHttpRequest::tryPut):
1996         (KJS::XMLHttpRequest::putValue):
1997         (KJS::XMLHttpRequest::notifyFinished):
1998         (KJS::XMLHttpRequest::XMLHttpRequest):
1999         (KJS::XMLHttpRequest::~XMLHttpRequest):
2000         (KJS::XMLHttpRequestProtoFunc::tryCall):
2001         * khtml/ecma/xmlhttprequest.h: Added. Stub implementations of everything.
2002         (KJS::XMLHttpRequest::toBoolean):
2003         (KJS::XMLHttpRequest::classInfo):
2004         * khtml/ecma/xmlhttprequest.lut.h: Added.
2005         * khtml/ecma/Makefile.am: Add new .lut.h file.
2006         * WebCore.pbproj/project.pbxproj: Add new files.
2007
2008 2003-11-17  David Hyatt  <hyatt@apple.com>
2009
2010         Fix for 3487136, marquees reset when you return to a page in the b/f cache.  This patch makes
2011         marquees suspend and resume properly, so they pick up animating where they left off.
2012         
2013         Reviewed by mjs
2014
2015         * khtml/rendering/render_layer.cpp:
2016         (RenderLayer::suspendMarquees):
2017         (m_direction):
2018         (Marquee::start):
2019         (Marquee::suspend):
2020         * khtml/rendering/render_layer.h:
2021         * kwq/KWQKHTMLPart.mm:
2022         (KWQKHTMLPart::clearTimers):
2023
2024 2003-11-17  Maciej Stachowiak  <mjs@apple.com>
2025
2026         Merged from khtml:
2027         
2028         - fixed 3487324 - CSS url values should be wrapped in "url()" for cssText purposes
2029         
2030     2003-11-07  Dirk Mueller  <mueller@kde.org>
2031          
2032         * css/css_valueimpl.cpp (cssText): wrap uri's into url(). 
2033         Stephan Kulow noted that other browsers do that.
2034         
2035
2036 2003-11-17  David Hyatt  <hyatt@apple.com>
2037
2038         Fix for 3472998, stop a crash on an insanely malformed page.  I had to change the concept of 
2039         "inStrayTableContent" to be a counter, since you could be nested and need to push/pop, and
2040         then I also had to stop from mistakenly popping when I didn't need to.
2041         
2042         Reviewed by rjw
2043
2044         * khtml/html/htmlparser.cpp:
2045         (KHTMLParser::reset):
2046         (KHTMLParser::insertNode):
2047         (KHTMLParser::reopenResidualStyleTags):
2048         (KHTMLParser::popBlock):
2049         (KHTMLParser::popOneBlock):
2050         * khtml/html/htmlparser.h:
2051
2052 2003-11-17  Darin Adler  <darin@apple.com>
2053
2054         Reviewed by Ken.
2055
2056         - did keyboard event cleanup to follow up on the keyCode work I did before
2057         - fixed 3485558: key identifers use lowercase hex, but the W3C document shows uppercase
2058         - fixed 3485564: key identifier for the Return key should be "Enter"
2059         - fixed 3485579: letter keys generate different key identifiers depending on whether the shift key is down
2060         - fixed 3485568: keyboard event modifier key bits are uninitialized; may have incorrect values
2061         - fixed 3481514: which attribute for DOM events reports incorrect value
2062         - fixed 3452569: charCode attribute for DOM events not supported
2063
2064         * khtml/dom/dom2_events.h: Added charCode.
2065         * khtml/dom/dom2_events.cpp:
2066         (UIEvent::keyCode): Call through to KeyboardEventImpl instead of doing the work here;
2067         better factoring.
2068         (UIEvent::charCode): Added. Calls through to KeyboardEventImpl.
2069         (UIEvent::which): Call keyCode in KeyboardEventImpl to share code.
2070
2071         * khtml/ecma/kjs_events.h: Added charCode property for DOMUIEvent.
2072         * khtml/ecma/kjs_events.cpp: (DOMUIEvent::getValueProperty): Added charCode.
2073         * khtml/ecma/kjs_events.lut.h: Regenerated.
2074
2075         * khtml/html/html_formimpl.h:
2076         * khtml/html/html_formimpl.cpp:
2077         (HTMLInputElementImpl::defaultEventHandler): Remove checks for "U+00000d" since we now use "Enter"
2078         for that key; also, we use capitalized hex, so it would have to change to "U+00000D" anyway.
2079         (HTMLSelectElementImpl::defaultEventHandler): Ditto.
2080         * khtml/html/html_inlineimpl.cpp: (HTMLAnchorElementImpl::defaultEventHandler): Ditto.
2081
2082         * khtml/khtmlview.cpp: (KHTMLView::keyPressEvent): Put !APPLE_CHANGES around code we are not
2083         using. It was doing a switch based on Qt key codes, but the key value it was using to check
2084         was a Macintosh virtual key code, which could yield strange results when the codes happen to
2085         match. Safer and smaller code size not to do any of it at all.
2086
2087         * khtml/rendering/render_form.cpp:
2088         (RenderLineEdit::RenderLineEdit): Use a KLineEdit instead of LineEditWidget for APPLE_CHANGES.
2089         Allows us to put !APPLE_CHANGES around more Qt key code stuff.
2090         (RenderLineEdit::select): Cast to KLineEdit instead of LineEditWidget.
2091         (ComboBoxWidget::event): Put !APPLE_CHANGES around more unneeded Qt key code stuff.
2092         (TextAreaWidget::event): Put !APPLE_CHANGES around more unneeded Qt key code stuff.
2093
2094         * khtml/xml/dom2_eventsimpl.h: Made id() const and added keyCode() and charCode().
2095         * khtml/xml/dom2_eventsimpl.cpp:
2096         (KeyboardEventImpl::KeyboardEventImpl): Initialize all fields in the empty constructor.
2097         Initialize all the modifier bits in the main constructor; the old code assumed they started
2098         off false, which is not a safe assumption. Also set m_altGraphKey false. Eliminated the
2099         unneeded check of text() before calling identifier(). Also adapted for the name change from
2100         identifier() to keyIdentifier().
2101         (KeyboardEventImpl::keyCode): Added. Returns the Windows virtual key code for keydown and
2102         keyup events, and the Unicode character for all other events.
2103         (KeyboardEventImpl::charCode): Added. Returns the Unicode character.
2104
2105         * kwq/KWQEvent.h: Changed QCustomEvent to be a typedef for QEvent.
2106         (QEvent::QEvent): Removed AccelAvailable, and added KParts, so I could remove some ugly
2107         constants from the KParts code.
2108         (QMouseEvent::button): Use a cast here since the field is now int.
2109         (QMouseEvent::state): Use a cast here since the field is now int.
2110         (QMouseEvent::stateAfter): Use a cast here since the field is now int, and use the new
2111         _stateAfter field.
2112         (QTimerEvent::QTimerEvent): Moved the constructor to be inline since it's so simple.
2113         (QKeyEvent::QKeyEvent): Removed type and button state parameters, now unneeded.
2114         Also removed now-unused _key, _ascii, and _count fields, and key(), ascii(),
2115         and count() functions.
2116         (QKeyEvent::state): Made inline.
2117         (QKeyEvent::isAccepted): Made inline.
2118         (QKeyEvent::text): Made inline.
2119         (QKeyEvent::isAutoRepeat): Made inline.
2120         (QKeyEvent::accept): Made inline.
2121         (QKeyEvent::ignore): Made inline.
2122         (QKeyEvent::unmodifiedText): Made inline.
2123         (QKeyEvent::keyIdentifier): Made inline and chnaged name from identifier().
2124         * kwq/KWQEvent.mm:
2125         (keyIdentifierForKeyEvent): Renamed from identifierForKeyText and changed parameter
2126         to be the event. Cleaned up the code a little bit, and wrote a comment or two.
2127         Changed from lowercase hex to uppercase, and called toupper on the key so that
2128         letter a-z would work properly. (A non-Unicode toupper is just the ticket here,
2129         because I am only sure we want to do this for a-z, not other lowercase characters.)
2130         (isKeypadEvent): Added. Uses virtual key codes to decide if a key event is a keypad
2131         event, so we can set the state flag correctly.
2132         (WindowsKeyCodeForKeyEvent): Added Clear key to the switch statement; it was missing.
2133         Changed to no longe use the characterCode helper function since this was the only
2134         place it was needed.
2135         (mouseButtonForEvent): Added. Similar logic to what was in KWQKHTMLPart before; better
2136         factoring to have it in here.
2137         (nonMouseButtonsForEvent): Ditto.
2138         (QMouseEvent::QMouseEvent): Rewrote constructors. One matches the one from Qt that's
2139         used in some places in KHTML code. The other takes an NSEvent and uses the new functions
2140         above to compute the button and state.
2141         (QKeyEvent::QKeyEvent): Computer type based on the passed-in NSEvent. Compute the
2142         auto-repeat flag based on the event and also the "forceAutoRepeat" parameter. Compute
2143         the button state based on the event too.
2144
2145         * kwq/KWQKHTMLPart.h: Remove buttonForCurrentEvent and stateForCurrentEvent. Both
2146         are now in KWQEvent.mm.
2147         * kwq/KWQKHTMLPart.mm:
2148         (KWQKHTMLPart::keyEvent): Remove extra parameters in code that creates QKeyEvent, now
2149         that QKeyEvent can handle everything itself.
2150         (KWQKHTMLPart::mouseDown): Same thing as above, only for QMouseEvent.
2151         (KWQKHTMLPart::mouseDragged): Ditto.
2152         (KWQKHTMLPart::mouseUp): Ditto.
2153         (KWQKHTMLPart::mouseMoved): Ditto.
2154         (KWQKHTMLPart::sendContextMenuEvent): Ditto.
2155
2156         * kwq/KWQKPartsEvent.h: Tweaked the class around a little so it can work without
2157         taking advantage of QCustomEvent's data pointer.
2158         * kwq/KWQKPartsEvent.mm:
2159         (KParts::Event::Event): Changed so it does a strdup on the event name and uses the
2160         new event type pre-allocated in KWQEvent.h for us.
2161         (KParts::Event::~Event): Free the event name.
2162         (KParts::Event::test): Reimplemented this.
2163
2164         * kwq/KWQKPartsPart.h: (KParts::Part::event): Removed now-unnecessary cast to change
2165         a QCustomEvent into a QEvent.
2166
2167         * kwq/KWQNamespace.h: Removed the Qt::Key enum. All the code that used it was already
2168         broken because of the mixup between Qt and Macintosh key codes.
2169
2170 2003-11-17  Ken Kocienda  <kocienda@apple.com>
2171
2172         Reviewed by Maciej
2173
2174         <rdar://problem/3487079>: Some scheme checks in KURL do not verify 
2175         first char is a legal first char for a scheme
2176
2177         * kwq/KWQKURL.mm:
2178         (KURL::KURL): Added some additional checks when looking through
2179         strings looking for schemes. Now the first character is checked
2180         for validity as a first character in a scheme.
2181
2182 2003-11-17  David Hyatt  <hyatt@apple.com>
2183
2184         Fix for 3486441, don't use the visibleWidth when computing the containingBlockWidth().  No need to
2185         query the view, since the canvas's width has been set to the proper size (when printing).
2186         
2187         Reviewed by john
2188
2189         * khtml/rendering/render_box.cpp:
2190         (RenderBox::containingBlockWidth):
2191
2192 2003-11-17  Maciej Stachowiak  <mjs@apple.com>
2193
2194         Reviewed by Darin.
2195
2196         - fixed 3413713 - iframe forms posting fails without initial src attribute value
2197
2198         * khtml/rendering/render_frames.cpp:
2199         (RenderPartObject::updateWidget): If the new part is for "about:blank",
2200         set the document base URL to parent's base URL.
2201         * kwq/KWQKHTMLPart.mm:
2202         (KWQKHTMLPart::createEmptyDocument): If this part is an
2203         iframe, set the document base URL to the parent's base URL.
2204
2205 2003-11-17  Darin Adler  <darin@apple.com>
2206
2207         Reviewed by John.
2208
2209         - fixed 3485925: Safari does not correctly parse eight-digit hex character entities
2210
2211         * khtml/html/htmltokenizer.cpp: (HTMLTokenizer::parseEntity): Replaced puzzling variable limit
2212         on number of hexadecimal characters to parse with an 8-character limit.
2213
2214 2003-11-17  Darin Adler  <darin@apple.com>
2215
2216         Reviewed by John.
2217
2218         - fixed 3485572 -- secure form check in KHTML uses case-sensitive comparison with "https"
2219
2220         * khtml/html/html_formimpl.h:
2221         * khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::formWouldHaveSecureSubmission):
2222         Changed to take a DOMString reference for slightly better efficiency, and to use startsWith
2223         so the prefix check is not case sensitive and for slightly better efficiency and clarity
2224         than calling latin1() and using strncmp.
2225
2226 2003-11-17  Maciej Stachowiak  <mjs@apple.com>
2227
2228         - commit updated .lut.h file that I forgot to commit before
2229
2230         * khtml/ecma/kjs_window.lut.h:
2231
2232 2003-11-17  Maciej Stachowiak  <mjs@apple.com>
2233
2234         Reviewed by Darin.
2235
2236         - fixed 3382829 - Safari won't load script src javascript if done by a document.write followed by document.close
2237         
2238         * khtml/xml/dom_docimpl.cpp:
2239         (DocumentImpl::closeInternal): Don't delete the tokenizer if it's
2240         waiting for scripts. It will get destroyed later when the part
2241         gets all subresources and closes the document.
2242         * khtml/html/htmltokenizer.cpp:
2243         (HTMLTokenizer::isWaitingForScripts): Added.
2244         * khtml/html/htmltokenizer.h: Prototyped.
2245         * khtml/xml/xml_tokenizer.cpp:
2246         (XMLTokenizer::isWaitingForScripts): Added.
2247         * khtml/xml/xml_tokenizer.h: Prototyped.
2248
2249 2003-11-17  David Hyatt  <hyatt@apple.com>
2250
2251         Fix for 3480108, crash because of the wrong malformedTableParent when stray content is placed inside
2252         a <tr>.
2253         
2254         Reviewed by john
2255
2256         * khtml/html/htmlparser.cpp:
2257         (KHTMLParser::popBlock):
2258
2259 2003-11-17  Maciej Stachowiak  <mjs@apple.com>
2260
2261         Reviewed by Dave.
2262
2263         - fixed 3397494 - FileMaker: Setting option object text fails if created without text
2264         
2265         * khtml/html/html_formimpl.cpp:
2266         (HTMLOptionElementImpl::childrenChanged): Update the select element.
2267         This ends up getting called when you add a text node to an option that
2268         didn't used to have one.
2269         * khtml/html/html_formimpl.h: Prototype it.
2270
2271 2003-11-17  Ken Kocienda  <kocienda@apple.com>
2272
2273         Reviewed by Maciej
2274
2275         Fix for this bug:
2276
2277         <rdar://problem/3480023>: Links don't work if there's a colon in the URL
2278
2279         The colon in the URL was confusing KURL. I modified some checks in
2280         KURL so that its search for schemes stops when a non-scheme 
2281         character is found rather than when a path end segment character
2282         is found.
2283
2284         * kwq/KWQKURL.mm: Added a new Colon class to the table of characters.
2285         (isSchemeCharOrColon): New helper.
2286         (KURL::KURL): Call on new helper when looking for a scheme.
2287         (KURL::findHostnameInHierarchicalURL): Ditto.
2288
2289 2003-11-17  David Hyatt  <hyatt@apple.com>
2290
2291         Fix for 2931829, lines with hyphens should break on the hyphens.  Match WinIE's behavior of
2292         breaking on - and ?.
2293         
2294         Reviewed by john
2295
2296         * khtml/rendering/break_lines.cpp:
2297         (khtml::isBreakable):
2298
2299 2003-11-17  David Hyatt  <hyatt@apple.com>
2300
2301         Fix for 3415771, Safari should use mini form controls when necessary.  This patch adds heuristics for
2302         swapping in mini form controls and also drops intrinsic margins when mini form controls are used.
2303
2304         Fix for 3486454, options/optgroups should strip leading/trailing space.
2305         
2306         Together these two fixes solve 3486581, travelocity misrenders because form controls are too large.
2307
2308         Reviewed by Darin
2309
2310         Also fixing 3474994, alink needs to be restricted to actual links and not all <a> tags.
2311
2312         Reviewed by John
2313
2314         Finally, adding :active outlines around <input type=image> (covered by the old bug 3141767).
2315
2316         * khtml/css/cssstyleselector.cpp:
2317         (khtml::CSSStyleSelector::CSSStyleSelector):
2318         (khtml::CSSStyleSelector::applyRule):
2319         (khtml::CSSStyleSelector::checkForGenericFamilyChange):
2320         (khtml::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
2321         (khtml::):
2322         (khtml::CSSStyleSelector::fontSizeForKeyword):
2323         (khtml::CSSStyleSelector::largerFontSize):
2324         (khtml::CSSStyleSelector::smallerFontSize):
2325         * khtml/css/cssstyleselector.h:
2326         * khtml/css/html4.css:
2327         * khtml/html/html_baseimpl.cpp:
2328         (HTMLBodyElementImpl::parseAttribute):
2329         * khtml/khtml_part.cpp:
2330         (KHTMLPart::setZoomFactor):
2331         * khtml/rendering/render_form.cpp:
2332         (RenderFormElement::addIntrinsicMarginsIfAllowed):
2333         (RenderSelect::updateFromElement):
2334         * khtml/xml/dom_docimpl.cpp:
2335         (DocumentImpl::recalcStyle):
2336         (DocumentImpl::attach):
2337         * kwq/KWQButton.mm:
2338         (KWQNSControlSizeForFont):
2339
2340 2003-11-17  David Hyatt  <hyatt@apple.com>
2341
2342         Back out my change to exclude text runs from getting a relayout on a style change.  I totally forgot about
2343         text zooming.
2344         
2345         * khtml/rendering/render_object.cpp:
2346         (RenderObject::setStyle):
2347
2348 2003-11-16  Maciej Stachowiak  <mjs@apple.com>
2349
2350         Reviewed by Dave.
2351
2352         <rdar://problem/3131664>: add support for the window.print() command used for "print this page" buttons
2353         
2354         * khtml/ecma/kjs_window.cpp:
2355         (Window::get): add support for window.print (Apple-only)
2356         (WindowFunc::tryCall): ditto
2357         * khtml/ecma/kjs_window.h: Add Print to enum
2358         * khtml/ecma/kjs_window.lut.h: Regenerated
2359         * kwq/KWQKHTMLPart.mm:
2360         (KWQKHTMLPart::print): Call bridge.
2361         * kwq/KWQKHTMLPart.h: Declare above.
2362         * kwq/WebCoreBridge.h: prototype print method for other side of bridge.
2363
2364 2003-11-16  Maciej Stachowiak  <mjs@apple.com>
2365
2366         Reviewed by Darin.
2367
2368         * kwq/KWQKHTMLPartBrowserExtension.mm:
2369         (KHTMLPartBrowserExtension::createNewWindow): Check for the
2370         returned part being NULL, not the out value pointer.
2371
2372 2003-11-16  David Hyatt  <hyatt@apple.com>
2373
2374         Fix for 3485779, <input type=image> and <button> should not be mouse focusable.
2375
2376         Fix for 3485795, <input type=image> and <button> are being treated like links when they should not be.
2377
2378         Fix for 3485817, <input type=image> and <button> should obey full keyboard access mode.
2379
2380         Fix for 3485802, fieldset/legend/option/optgroup/label should not be focusable at all.
2381         
2382         Reviewed by kocienda
2383
2384         * ChangeLog:
2385         * khtml/html/html_formimpl.cpp:
2386         (HTMLGenericFormElementImpl::isKeyboardFocusable):
2387         (HTMLGenericFormElementImpl::isMouseFocusable):
2388         (HTMLFieldSetElementImpl::isFocusable):
2389         (HTMLLabelElementImpl::isFocusable):
2390         (HTMLLegendElementImpl::isFocusable):
2391         (HTMLOptGroupElementImpl::isFocusable):
2392         (HTMLOptionElementImpl::HTMLOptionElementImpl):
2393         (HTMLOptionElementImpl::isFocusable):
2394         * khtml/html/html_formimpl.h:
2395         * khtml/html/html_inlineimpl.cpp:
2396         (HTMLAnchorElementImpl::isMouseFocusable):
2397         (HTMLAnchorElementImpl::isKeyboardFocusable):
2398         * khtml/html/html_inlineimpl.h:
2399         * khtml/khtml_part.cpp:
2400         (KHTMLPart::tabsToLinks):
2401         (KHTMLPart::tabsToAllControls):
2402         * khtml/khtml_part.h:
2403         * kwq/KWQKHTMLPart.h:
2404         * kwq/KWQKHTMLPart.mm:
2405         (KWQKHTMLPart::nextKeyViewInFrame):
2406         (KWQKHTMLPart::tabsToLinks):
2407         (KWQKHTMLPart::tabsToAllControls):
2408
2409 2003-11-16  Maciej Stachowiak  <mjs@apple.com>
2410
2411         Reviewed by Dave.
2412
2413         - fixed 3484723 - name property of window reference from window.open call is always empty
2414         
2415         * kwq/KWQKHTMLPartBrowserExtension.mm:
2416         (KHTMLPartBrowserExtension::createNewWindow): Set the part name on the khtml side when
2417         making a new window.
2418
2419 2003-11-16  David Hyatt  <hyatt@apple.com>
2420
2421         Fix for 3485766.
2422         
2423         Make sure DOM elements that are programmatically focused at a time when they have no render objects restore the
2424         focus to their widgets when render objects get built.
2425         
2426         Reviewed by darin
2427
2428         * khtml/html/html_formimpl.cpp:
2429         (HTMLGenericFormElementImpl::attach):
2430
2431 2003-11-16  David Hyatt  <hyatt@apple.com>
2432
2433         Add border info to the render tree dumper.
2434
2435         * khtml/rendering/render_style.h:
2436         (khtml::BorderValue::operator!=):
2437         * kwq/KWQRenderTreeDebug.cpp:
2438         (printBorderStyle):
2439         (operator<<):
2440         * layout-tests/apple-only/base/bugzilla.mozilla.org/index-expected.txt:
2441         * layout-tests/apple-only/base/home.netscape.com/index-expected.txt:
2442         * layout-tests/apple-only/base/lxr.mozilla.org/index-expected.txt:
2443         * layout-tests/apple-only/base/my.netscape.com/index-expected.txt:
2444         * layout-tests/apple-only/base/news.cnet.com/index-expected.txt:
2445         * layout-tests/apple-only/base/web.icq.com/index-expected.txt:
2446         * layout-tests/apple-only/base/www.altavista.com/index-expected.txt:
2447         * layout-tests/apple-only/base/www.amazon.com/index-expected.txt:
2448         * layout-tests/apple-only/base/www.cnn.com/index-expected.txt:
2449         * layout-tests/apple-only/base/www.digitalcity.com/index-expected.txt:
2450         * layout-tests/apple-only/base/www.ebay.com/index-expected.txt:
2451         * layout-tests/apple-only/base/www.excite.com/index-expected.txt:
2452         * layout-tests/apple-only/base/www.expedia.com/index-expected.txt:
2453         * layout-tests/apple-only/base/www.iplanet.com/index-expected.txt:
2454         * layout-tests/apple-only/base/www.mapquest.com/index-expected.txt:
2455         * layout-tests/apple-only/base/www.microsoft.com/index-expected.txt:
2456         * layout-tests/apple-only/base/www.moviefone.com/index-expected.txt:
2457         * layout-tests/apple-only/base/www.msn.com/index-expected.txt:
2458         * layout-tests/apple-only/base/www.msnbc.com/index-expected.txt:
2459         * layout-tests/apple-only/base/www.nytimes.com/index-expected.txt:
2460         * layout-tests/apple-only/base/www.nytimes.com_Table/index-expected.txt:
2461         * layout-tests/apple-only/base/www.quicken.com/index-expected.txt:
2462         * layout-tests/apple-only/base/www.sun.com/index-expected.txt:
2463         * layout-tests/apple-only/base/www.time.com/index-expected.txt:
2464         * layout-tests/apple-only/base/www.travelocity.com/index-expected.txt:
2465         * layout-tests/apple-only/base/www.w3.org_DOML2Core/index-expected.txt:
2466         * layout-tests/apple-only/base/www.yahoo.com/index-expected.txt:
2467         * layout-tests/apple-only/base/www.zdnet.com/index-expected.txt:
2468         * layout-tests/apple-only/base/www.zdnet.com_Gamespot.com/index-expected.txt:
2469         * layout-tests/css1/basic/class_as_selector-expected.txt:
2470         * layout-tests/css1/basic/comments-expected.txt:
2471         * layout-tests/css1/basic/containment-expected.txt:
2472         * layout-tests/css1/basic/contextual_selectors-expected.txt:
2473         * layout-tests/css1/basic/grouping-expected.txt:
2474         * layout-tests/css1/basic/id_as_selector-expected.txt:
2475         * layout-tests/css1/basic/inheritance-expected.txt:
2476         * layout-tests/css1/box_properties/acid_test-expected.txt:
2477         * layout-tests/css1/box_properties/border-expected.txt:
2478         * layout-tests/css1/box_properties/border_bottom-expected.txt:
2479         * layout-tests/css1/box_properties/border_bottom_inline-expected.txt:
2480         * layout-tests/css1/box_properties/border_bottom_width-expected.txt:
2481         * layout-tests/css1/box_properties/border_bottom_width_inline-expected.txt:
2482         * layout-tests/css1/box_properties/border_color-expected.txt:
2483         * layout-tests/css1/box_properties/border_color_inline-expected.txt:
2484         * layout-tests/css1/box_properties/border_inline-expected.txt:
2485         * layout-tests/css1/box_properties/border_left-expected.txt:
2486         * layout-tests/css1/box_properties/border_left_inline-expected.txt:
2487         * layout-tests/css1/box_properties/border_left_width-expected.txt:
2488         * layout-tests/css1/box_properties/border_left_width_inline-expected.txt:
2489         * layout-tests/css1/box_properties/border_right-expected.txt:
2490         * layout-tests/css1/box_properties/border_right_inline-expected.txt:
2491         * layout-tests/css1/box_properties/border_right_width-expected.txt:
2492         * layout-tests/css1/box_properties/border_right_width_inline-expected.txt:
2493         * layout-tests/css1/box_properties/border_style-expected.txt:
2494         * layout-tests/css1/box_properties/border_style_inline-expected.txt:
2495         * layout-tests/css1/box_properties/border_top-expected.txt:
2496         * layout-tests/css1/box_properties/border_top_inline-expected.txt:
2497         * layout-tests/css1/box_properties/border_top_width-expected.txt:
2498         * layout-tests/css1/box_properties/border_top_width_inline-expected.txt:
2499         * layout-tests/css1/box_properties/border_width-expected.txt:
2500         * layout-tests/css1/box_properties/border_width_inline-expected.txt:
2501         * layout-tests/css1/box_properties/clear-expected.txt:
2502         * layout-tests/css1/box_properties/clear_float-expected.txt:
2503         * layout-tests/css1/box_properties/float-expected.txt:
2504         * layout-tests/css1/box_properties/float_elements_in_series-expected.txt:
2505         * layout-tests/css1/box_properties/float_margin-expected.txt:
2506         * layout-tests/css1/box_properties/float_on_text_elements-expected.txt:
2507         * layout-tests/css1/box_properties/height-expected.txt:
2508         * layout-tests/css1/box_properties/margin-expected.txt:
2509         * layout-tests/css1/box_properties/margin_bottom-expected.txt:
2510         * layout-tests/css1/box_properties/margin_bottom_inline-expected.txt:
2511         * layout-tests/css1/box_properties/margin_inline-expected.txt:
2512         * layout-tests/css1/box_properties/margin_left-expected.txt:
2513         * layout-tests/css1/box_properties/margin_left_inline-expected.txt:
2514         * layout-tests/css1/box_properties/margin_right-expected.txt:
2515         * layout-tests/css1/box_properties/margin_right_inline-expected.txt:
2516         * layout-tests/css1/box_properties/margin_top-expected.txt:
2517         * layout-tests/css1/box_properties/margin_top_inline-expected.txt:
2518         * layout-tests/css1/box_properties/padding-expected.txt:
2519         * layout-tests/css1/box_properties/padding_bottom-expected.txt:
2520         * layout-tests/css1/box_properties/padding_bottom_inline-expected.txt:
2521         * layout-tests/css1/box_properties/padding_inline-expected.txt:
2522         * layout-tests/css1/box_properties/padding_left-expected.txt:
2523         * layout-tests/css1/box_properties/padding_left_inline-expected.txt:
2524         * layout-tests/css1/box_properties/padding_right-expected.txt:
2525         * layout-tests/css1/box_properties/padding_right_inline-expected.txt:
2526         * layout-tests/css1/box_properties/padding_top-expected.txt:
2527         * layout-tests/css1/box_properties/padding_top_inline-expected.txt:
2528         * layout-tests/css1/box_properties/width-expected.txt:
2529         * layout-tests/css1/cascade/cascade_order-expected.txt:
2530         * layout-tests/css1/cascade/important-expected.txt:
2531         * layout-tests/css1/classification/display-expected.txt:
2532         * layout-tests/css1/classification/list_style-expected.txt:
2533         * layout-tests/css1/classification/list_style_image-expected.txt:
2534         * layout-tests/css1/classification/list_style_position-expected.txt:
2535         * layout-tests/css1/classification/list_style_type-expected.txt:
2536         * layout-tests/css1/classification/white_space-expected.txt:
2537         * layout-tests/css1/color_and_background/background-expected.txt:
2538         * layout-tests/css1/color_and_background/background_attachment-expected.txt:
2539         * layout-tests/css1/color_and_background/background_color-expected.txt:
2540         * layout-tests/css1/color_and_background/background_image-expected.txt:
2541         * layout-tests/css1/color_and_background/background_position-expected.txt:
2542         * layout-tests/css1/color_and_background/background_repeat-expected.txt:
2543         * layout-tests/css1/color_and_background/color-expected.txt:
2544         * layout-tests/css1/conformance/forward_compatible_parsing-expected.txt:
2545         * layout-tests/css1/font_properties/font-expected.txt:
2546         * layout-tests/css1/font_properties/font_family-expected.txt:
2547         * layout-tests/css1/font_properties/font_size-expected.txt:
2548         * layout-tests/css1/font_properties/font_style-expected.txt:
2549         * layout-tests/css1/font_properties/font_variant-expected.txt:
2550         * layout-tests/css1/font_properties/font_weight-expected.txt:
2551         * layout-tests/css1/formatting_model/canvas-expected.txt:
2552         * layout-tests/css1/formatting_model/floating_elements-expected.txt:
2553         * layout-tests/css1/formatting_model/height_of_lines-expected.txt:
2554         * layout-tests/css1/formatting_model/inline_elements-expected.txt:
2555         * layout-tests/css1/formatting_model/replaced_elements-expected.txt:
2556         * layout-tests/css1/formatting_model/vertical_formatting-expected.txt:
2557         * layout-tests/css1/pseudo/anchor-expected.txt:
2558         * layout-tests/css1/pseudo/firstletter-expected.txt:
2559         * layout-tests/css1/pseudo/firstline-expected.txt:
2560         * layout-tests/css1/pseudo/multiple_pseudo_elements-expected.txt:
2561         * layout-tests/css1/pseudo/pseudo_elements_in_selectors-expected.txt:
2562         * layout-tests/css1/text_properties/letter_spacing-expected.txt:
2563         * layout-tests/css1/text_properties/line_height-expected.txt:
2564         * layout-tests/css1/text_properties/text-transform-expected.txt:
2565         * layout-tests/css1/text_properties/text_align-expected.txt:
2566         * layout-tests/css1/text_properties/text_decoration-expected.txt:
2567         * layout-tests/css1/text_properties/text_indent-expected.txt:
2568         * layout-tests/css1/text_properties/text_transform-expected.txt:
2569         * layout-tests/css1/text_properties/vertical_align-expected.txt:
2570         * layout-tests/css1/text_properties/word_spacing-expected.txt:
2571         * layout-tests/css1/units/color_units-expected.txt:
2572         * layout-tests/css1/units/length_units-expected.txt:
2573         * layout-tests/css1/units/percentage_units-expected.txt:
2574         * layout-tests/css1/units/urls-expected.txt:
2575         * layout-tests/fast/block/basic/001-expected.txt:
2576         * layout-tests/fast/block/basic/002-expected.txt:
2577         * layout-tests/fast/block/basic/003-expected.txt:
2578         * layout-tests/fast/block/basic/004-expected.txt:
2579         * layout-tests/fast/block/basic/007-expected.txt:
2580         * layout-tests/fast/block/basic/011-expected.txt:
2581         * layout-tests/fast/block/basic/015-expected.txt:
2582         * layout-tests/fast/block/basic/016-expected.txt:
2583         * layout-tests/fast/block/basic/017-expected.txt:
2584         * layout-tests/fast/block/basic/018-expected.txt:
2585         * layout-tests/fast/block/basic/019-expected.txt:
2586         * layout-tests/fast/block/float/004-expected.txt:
2587         * layout-tests/fast/block/float/005-expected.txt:
2588         * layout-tests/fast/block/float/006-expected.txt:
2589         * layout-tests/fast/block/float/007-expected.txt:
2590         * layout-tests/fast/block/float/012-expected.txt:
2591         * layout-tests/fast/block/float/013-expected.txt:
2592         * layout-tests/fast/block/float/015-expected.txt:
2593         * layout-tests/fast/block/float/016-expected.txt:
2594         * layout-tests/fast/block/float/017-expected.txt:
2595         * layout-tests/fast/block/float/019-expected.txt:
2596         * layout-tests/fast/block/float/021-expected.txt:
2597         * layout-tests/fast/block/float/022-expected.txt:
2598         * layout-tests/fast/block/float/024-expected.txt:
2599         * layout-tests/fast/block/float/025-expected.txt:
2600         * layout-tests/fast/block/float/026-expected.txt:
2601         * layout-tests/fast/block/float/027-expected.txt:
2602         * layout-tests/fast/block/float/028-expected.txt:
2603         * layout-tests/fast/block/margin-collapse/001-expected.txt:
2604         * layout-tests/fast/block/margin-collapse/005-expected.txt:
2605         * layout-tests/fast/block/margin-collapse/006-expected.txt:
2606         * layout-tests/fast/block/margin-collapse/010-expected.txt:
2607         * layout-tests/fast/block/margin-collapse/011-expected.txt:
2608         * layout-tests/fast/block/margin-collapse/012-expected.txt:
2609         * layout-tests/fast/block/margin-collapse/015-expected.txt:
2610         * layout-tests/fast/block/margin-collapse/016-expected.txt:
2611         * layout-tests/fast/block/margin-collapse/017-expected.txt:
2612         * layout-tests/fast/block/margin-collapse/018-expected.txt:
2613         * layout-tests/fast/block/margin-collapse/019-expected.txt:
2614         * layout-tests/fast/block/margin-collapse/020-expected.txt:
2615         * layout-tests/fast/block/margin-collapse/021-expected.txt:
2616         * layout-tests/fast/block/margin-collapse/022-expected.txt:
2617         * layout-tests/fast/block/margin-collapse/024-expected.txt:
2618         * layout-tests/fast/block/margin-collapse/025-expected.txt:
2619         * layout-tests/fast/block/margin-collapse/026-expected.txt:
2620         * layout-tests/fast/block/margin-collapse/027-expected.txt:
2621         * layout-tests/fast/block/margin-collapse/028-expected.txt:
2622         * layout-tests/fast/block/margin-collapse/029-expected.txt:
2623         * layout-tests/fast/block/margin-collapse/030-expected.txt:
2624         * layout-tests/fast/block/margin-collapse/032-expected.txt:
2625         * layout-tests/fast/block/margin-collapse/033-expected.txt:
2626         * layout-tests/fast/block/margin-collapse/034-expected.txt:
2627         * layout-tests/fast/block/margin-collapse/035-expected.txt:
2628         * layout-tests/fast/block/margin-collapse/041-expected.txt:
2629         * layout-tests/fast/block/margin-collapse/042-expected.txt:
2630         * layout-tests/fast/block/margin-collapse/043-expected.txt:
2631         * layout-tests/fast/block/positioning/048-expected.txt:
2632         * layout-tests/fast/block/positioning/049-expected.txt:
2633         * layout-tests/fast/block/positioning/050-expected.txt:
2634         * layout-tests/fast/block/positioning/051-expected.txt:
2635         * layout-tests/fast/block/positioning/056-expected.txt:
2636         * layout-tests/fast/block/positioning/057-expected.txt:
2637         * layout-tests/fast/block/positioning/058-expected.txt:
2638         * layout-tests/fast/block/positioning/auto/001-expected.txt:
2639         * layout-tests/fast/block/positioning/auto/002-expected.txt:
2640         * layout-tests/fast/block/positioning/auto/003-expected.txt:
2641         * layout-tests/fast/block/positioning/auto/004-expected.txt:
2642         * layout-tests/fast/block/positioning/auto/005-expected.txt:
2643         * layout-tests/fast/block/positioning/auto/006-expected.txt:
2644         * layout-tests/fast/clip/013-expected.txt:
2645         * layout-tests/fast/clip/014-expected.txt:
2646         * layout-tests/fast/css-generated-content/006-expected.txt:
2647         * layout-tests/fast/css/003-expected.txt:
2648         * layout-tests/fast/css/004-expected.txt:
2649         * layout-tests/fast/css/005-expected.txt:
2650         * layout-tests/fast/dynamic/002-expected.txt:
2651         * layout-tests/fast/dynamic/004-expected.txt:
2652         * layout-tests/fast/encoding/utf-16-big-endian-expected.txt:
2653         * layout-tests/fast/encoding/utf-16-little-endian-expected.txt:
2654         * layout-tests/fast/flexbox/007-expected.txt:
2655         * layout-tests/fast/flexbox/008-expected.txt:
2656         * layout-tests/fast/flexbox/009-expected.txt:
2657         * layout-tests/fast/flexbox/011-expected.txt:
2658         * layout-tests/fast/flexbox/016-expected.txt:
2659         * layout-tests/fast/flexbox/017-expected.txt:
2660         * layout-tests/fast/flexbox/018-expected.txt:
2661         * layout-tests/fast/flexbox/019-expected.txt:
2662         * layout-tests/fast/flexbox/022-expected.txt:
2663         * layout-tests/fast/flexbox/025-expected.txt:
2664         * layout-tests/fast/forms/001-expected.txt:
2665         * layout-tests/fast/forms/002-expected.txt:
2666         * layout-tests/fast/forms/006-expected.txt:
2667         * layout-tests/fast/forms/007-expected.txt:
2668         * layout-tests/fast/forms/form-element-geometry-expected.txt:
2669         * layout-tests/fast/frames/001-expected.txt:
2670         * layout-tests/fast/inline-block/001-expected.txt:
2671         * layout-tests/fast/inline-block/002-expected.txt:
2672         * layout-tests/fast/inline-block/003-expected.txt:
2673         * layout-tests/fast/inline/001-expected.txt:
2674         * layout-tests/fast/invalid/008-expected.txt:
2675         * layout-tests/fast/invalid/014-expected.txt:
2676         * layout-tests/fast/invalid/016-expected.txt:
2677         * layout-tests/fast/lists/001-expected.txt:
2678         * layout-tests/fast/lists/004-expected.txt:
2679         * layout-tests/fast/lists/007-expected.txt:
2680         * layout-tests/fast/overflow/001-expected.txt:
2681         * layout-tests/fast/overflow/002-expected.txt:
2682         * layout-tests/fast/overflow/004-expected.txt:
2683         * layout-tests/fast/replaced/005-expected.txt:
2684         * layout-tests/fast/replaced/006-expected.txt:
2685         * layout-tests/fast/replaced/008-expected.txt:
2686         * layout-tests/fast/selectors/009-expected.txt:
2687         * layout-tests/fast/selectors/014-expected.txt:
2688         * layout-tests/fast/selectors/032-expected.txt:
2689         * layout-tests/fast/selectors/033-expected.txt:
2690         * layout-tests/fast/selectors/039-expected.txt:
2691         * layout-tests/fast/selectors/039b-expected.txt:
2692         * layout-tests/fast/selectors/064-expected.txt:
2693         * layout-tests/fast/selectors/077-expected.txt:
2694         * layout-tests/fast/selectors/077b-expected.txt:
2695         * layout-tests/fast/selectors/078-expected.txt:
2696         * layout-tests/fast/selectors/078b-expected.txt:
2697         * layout-tests/fast/selectors/166a-expected.txt:
2698         * layout-tests/fast/table/003-expected.txt:
2699         * layout-tests/fast/table/004-expected.txt:
2700         * layout-tests/fast/table/005-expected.txt:
2701         * layout-tests/fast/table/006-expected.txt:
2702         * layout-tests/fast/table/007-expected.txt:
2703         * layout-tests/fast/table/008-expected.txt:
2704         * layout-tests/fast/table/009-expected.txt:
2705         * layout-tests/fast/table/015-expected.txt:
2706         * layout-tests/fast/table/017-expected.txt:
2707         * layout-tests/fast/table/018-expected.txt:
2708         * layout-tests/fast/table/020-expected.txt:
2709         * layout-tests/fast/table/023-expected.txt:
2710         * layout-tests/fast/table/025-expected.txt:
2711         * layout-tests/fast/table/027-expected.txt:
2712         * layout-tests/fast/table/028-expected.txt:
2713         * layout-tests/fast/table/029-expected.txt:
2714         * layout-tests/fast/table/030-expected.txt:
2715         * layout-tests/fast/table/035-expected.txt:
2716         * layout-tests/fast/table/036-expected.txt:
2717         * layout-tests/fast/table/038-expected.txt:
2718         * layout-tests/fast/table/border-collapsing/001-expected.txt:
2719         * layout-tests/fast/table/border-collapsing/002-expected.txt:
2720         * layout-tests/fast/table/border-collapsing/003-expected.txt:
2721         * layout-tests/fast/table/border-collapsing/004-expected.txt:
2722         * layout-tests/fast/table/large-width-expected.txt:
2723         * layout-tests/fast/table/nobr-expected.txt:
2724         * layout-tests/fast/text/basic/001-expected.txt:
2725         * layout-tests/fast/text/basic/003-expected.txt:
2726         * layout-tests/fast/text/basic/004-expected.txt:
2727         * layout-tests/fast/text/basic/005-expected.txt:
2728         * layout-tests/fast/text/basic/006-expected.txt:
2729         * layout-tests/fast/text/basic/007-expected.txt:
2730         * layout-tests/fast/text/basic/012-expected.txt:
2731         * layout-tests/fast/text/firstline/002-expected.txt:
2732         * layout-tests/fast/text/whitespace/002-expected.txt:
2733         * layout-tests/fast/text/whitespace/003-expected.txt:
2734         * layout-tests/fast/text/whitespace/020-expected.txt:
2735         * layout-tests/fast/text/whitespace/023-expected.txt:
2736         * layout-tests/fast/text/whitespace/024-expected.txt:
2737         * layout-tests/fast/text/whitespace/025-expected.txt:
2738         * layout-tests/fast/text/whitespace/027-expected.txt:
2739
2740 2003-11-16  Maciej Stachowiak  <mjs@apple.com>
2741
2742         Reviewed by John.
2743
2744         - fixed 3362841 - javascript History Object length property is always 0
2745
2746         * kwq/KWQKPartsBrowserInterface.mm:
2747         (KParts::BrowserInterface::property): For the historyLength property,
2748         retturn a UInt variant, not Int, because that's what the kjs_window code
2749         expects.
2750
2751 2003-11-14  Maciej Stachowiak  <mjs@apple.com>
2752
2753         Reviewed by Ken and Dave.
2754
2755         - fixed 3471925 - getting and setting cssText not implemented
2756
2757         * khtml/css/css_valueimpl.cpp:
2758         (CSSStyleDeclarationImpl::cssText): Implemented by gathering text of all
2759         properties (that are not non-CSS hints), separated with semicolons.
2760         (CSSStyleDeclarationImpl::setCssText): Implemented by clearing all existing
2761         properties (that are not non-CSS hints) and invoking css parser.
2762         (CSSValueListImpl::cssText): Implemented.
2763         (FontValueImpl::cssText): Implemented.
2764         (ShadowValueImpl::cssText): Implemented.
2765         (CSSProperty::cssText): Implemented.
2766         * khtml/css/css_valueimpl.h: Declared new methods; made
2767         CSSValueImpl::cssText() pure virtual; removed CSSValueImpl::setCssText().
2768
2769 2003-11-16  David Hyatt  <hyatt@apple.com>
2770
2771         3485717, Cleanup of the float code.  Eliminated the -khtml-flow-mode style property in favor of two simple methods,
2772         avoidsFloats() and usesLineWidth().  avoidsFloats can be called to tell whether an object does not want
2773         floats to intrude into its space (and that it should also move to avoid floats).  usesLineWidth is called
2774         to find out if an object's containing block width is the line width or the content width, and has all the
2775         right smarts to emulate WinIE's behaviors in both quirks and strict mode.
2776
2777         Also fixed a bug (3485718) where overflow:scroll blocks with auto height did not factor in the horizontal scrollbar's
2778         height (thus causing it to paint on top of content).
2779         
2780         Reviewed by darin
2781
2782         * khtml/css/cssparser.cpp:
2783         (CSSParser::parseValue):
2784         * khtml/css/cssstyleselector.cpp:
2785         (khtml::CSSStyleSelector::applyRule):
2786         * khtml/css/cssvalues.c:
2787         (hash_val):
2788         (findValue):
2789         * khtml/css/cssvalues.h:
2790         * khtml/css/cssvalues.in:
2791         * khtml/css/html4.css:
2792         * khtml/rendering/bidi.cpp:
2793         (khtml::RenderBlock::layoutInlineChildren):
2794         * khtml/rendering/render_block.cpp:
2795         (khtml::RenderBlock::layoutBlock):
2796         (khtml::RenderBlock::layoutBlockChildren):
2797         (khtml::RenderBlock::clearFloats):
2798         * khtml/rendering/render_box.cpp:
2799         (RenderBox::containingBlockWidth):
2800         (RenderBox::calcWidth):
2801         * khtml/rendering/render_object.cpp:
2802         (RenderObject::isHR):
2803         * khtml/rendering/render_object.h:
2804         (khtml::RenderObject::avoidsFloats):
2805         (khtml::RenderObject::usesLineWidth):
2806         * khtml/rendering/render_style.h:
2807         (khtml::RenderStyle::NonInheritedFlags::operator==):
2808         (khtml::RenderStyle::setBitDefaults):
2809         (khtml::RenderStyle::initialTextDecoration):
2810         * khtml/rendering/render_table.cpp:
2811         (RenderTable::calcWidth):
2812
2813 2003-11-14  David Hyatt  <hyatt@apple.com>
2814
2815         Fix for 3485260, regression on Uniview site from incremental repainting.  When appending/inserting child
2816         nodes into the render tree, we need to always mark them as needing layout themselves (and not just as
2817         having children needing layout).  This ensures that the incremental repainting code will know to repaint the
2818         enclosing container (even though that container's size may not change).
2819
2820         Fix for 3411960, block-level replaced elements should avoid floats.
2821
2822         Fix for 3463234, floats should not intrude into overflow blocks (even when siblings happen to get in
2823         between the float and the overflow block).
2824
2825         Fix for 3485576, the containing block for text runs is incorrect.
2826
2827         Fix for 3485577, text runs should not trigger layout when style is re-resolved.
2828         
2829         Reviewed by darin
2830
2831         * khtml/rendering/render_container.cpp:
2832         (RenderContainer::appendChildNode):
2833         (RenderContainer::insertChildNode):
2834         * khtml/rendering/render_box.cpp
2835         * khtml/rendering/render_object.cpp
2836         
2837 2003-11-14  David Hyatt  <hyatt@apple.com>
2838
2839         Fix for 3473707, 100% height positioned divs are too tall.  The padding box wasn't being used like it was
2840         supposed to be when calcing percentage heights.
2841         
2842         Reviewed by kocienda
2843
2844         * khtml/rendering/render_box.cpp:
2845         (RenderBox::calcAbsoluteVertical):
2846
2847 === Safari-114 ===
2848
2849 2003-11-14  Maciej Stachowiak  <mjs@apple.com>
2850
2851         - backed out changes unintentionally commited while the tree was closed
2852
2853         * khtml/css/css_valueimpl.cpp:
2854         * khtml/css/css_valueimpl.h:
2855         * kwq/KWQKPartsBrowserInterface.mm:
2856
2857 2003-11-14  Maciej Stachowiak  <mjs@apple.com>
2858
2859         Reviewed by Ken.
2860
2861         - fixed 3471925 - getting and setting cssText not implemented
2862
2863         * khtml/css/css_valueimpl.cpp:
2864         (CSSStyleDeclarationImpl::cssText): Implemented by gathering text of all
2865         properties, separated with semicolons.
2866         (CSSStyleDeclarationImpl::setCssText): Implemented by clearing all existing
2867         properties and invoking css parser.
2868         (CSSValueListImpl::cssText): Implemented.
2869         (FontValueImpl::cssText): Implemented.
2870         (ShadowValueImpl::cssText): Implemented.
2871         (CSSProperty::cssText): Implemented.
2872         * khtml/css/css_valueimpl.h: Declared new methods; made
2873         CSSValueImpl::cssText() pure virtual; removed
2874         CSSValueImpl::setCssText().
2875
2876 2003-11-14  Darin Adler  <darin@apple.com>
2877
2878         Reviewed by John.
2879
2880         - first half of fix for 3457162 -- selecting text during a page load that blows the text field
2881           away causes a crash
2882
2883         The WebCore part of this fix is to generalize the "defers loading" feature to all mouse clicks,
2884         rather than just doing it for mouse clicks on the combo box.
2885
2886         * kwq/KWQComboBox.mm: (-[KWQPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:]):
2887         Remove code to defer loading.
2888         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Put the code here
2889         instead.
2890
2891 2003-11-14  John Sullivan  <sullivan@apple.com>
2892
2893         - fixed <rdar://problem/3483585>: Option-tab in a text field inputs 
2894         a character rather than tabbing to the next widget
2895
2896         Reviewed by Ken.
2897
2898         * kwq/KWQKHTMLPart.h:
2899         * kwq/KWQKHTMLPart.mm:
2900         (KWQKHTMLPart::handleKeyboardOptionTabInView):
2901         New method. If current event is option-tab or option-shift-tab, do
2902         keyboard navigation and return YES.
2903         
2904         * kwq/KWQTextArea.mm:
2905         (-[KWQTextArea textDidChange:]):
2906         Bail out if KWQKHTMLPart::handleKeyboardOptionTabInView returns YES.
2907         
2908         * kwq/KWQTextField.mm:
2909         (-[KWQTextField controlTextDidChange:]):
2910         Bail out if KWQKHTMLPart::handleKeyboardOptionTabInView returns YES.
2911
2912 2003-11-13  Darin Adler  <darin@apple.com>
2913
2914         Reviewed by Dave.
2915
2916         - fixed 3472875 -- REGRESSION (109-110): insertion point does not blink in a nonempty textarea
2917         - fixed 3484002 -- disabling, then enabling a read-only <textarea> will make it editable
2918
2919         * kwq/KWQTextArea.mm:
2920         (-[KWQTextArea setText:]): Call updateTextColor after setting the text.
2921         (-[KWQTextArea setEditable:]): Don't set the NSTextView editable property directly,
2922         because we don't want to make a disabled text view editable right away, but we need
2923         to later if it's enabled.
2924         (-[KWQTextArea isEditable]): Don't get the NSTextView editable property directly,
2925         because it can be appropriate to return YES even if the text view happens to be disabled.
2926         (-[KWQTextAreaTextView initWithFrame:textContainer:]): Initialize editableIfEnabled to YES.
2927         (-[KWQTextAreaTextView setEnabled:]): Don't set the editable state to true if
2928         editableIfEnabled is NO. The old code would make a read-only field editable if you
2929         changed it to be enabled. Also update the color of the text here.
2930         (-[KWQTextAreaTextView setEditableIfEnabled:]): Store the editableIfEnabled state in a
2931         field, and then alter the state of the editable flag to match if we're currently enabled.
2932         (-[KWQTextAreaTextView isEditableIfEnabled]): Return the editableIfEnabled state.
2933         (-[KWQTextAreaTextView updateTextColor]): Update the color of the text. This was done in
2934         drawRect: before, which was the cause of the lack of insertion point.
2935
2936 2003-11-13  Darin Adler  <darin@apple.com>
2937
2938         Reviewed by Dave.
2939
2940         - fixed 3474330 -- tooltips do not work for <area> elements
2941
2942         * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): When looking for a title, start
2943         with innerNode (which can be an <area> inside a <map>). This matches what Mozilla does.
2944
2945 2003-11-13  Maciej Stachowiak  <mjs@apple.com>
2946
2947         Reviewed by John.
2948
2949         - fixed - 3479285 - hang at www.saccourt.com
2950         - fixed - 3477088 - (85-112) Safari frozen loading a page at Postal Service site of Taiwan
2951         
2952         * khtml/ecma/kjs_html.cpp:
2953         (KJS::HTMLSelectCollection::tryPut): Use the range-checking
2954         version of the number-conversion function to avoid negative
2955         numbers and NaN.
2956
2957 2003-11-13  Ken Kocienda  <kocienda@apple.com>
2958
2959         Reviewed by John
2960         
2961         Fix for this bug:
2962
2963         <rdar://problem/3483284>: Tabbing to links needs to honor new 
2964         WebKit tab-to-links preference
2965
2966         In addition to fixing the bug, I also did a bit of cleanup
2967         in the code which helps to determine tab order.
2968
2969         Biggest change is to modify the keyboard UI mode function so
2970         that it is a set of flags, rather than a straight-up value.
2971
2972         I also tweaked the names on the keyboard UI mode constants
2973         to make them read better.
2974
2975         * kwq/KWQButton.mm:
2976         (QButton::focusPolicy): Tweaks to make more readable and use 
2977         new model for keyboard UI mode.
2978         * kwq/KWQComboBox.mm:
2979         (QComboBox::focusPolicy): Ditto. Plus, this function was not
2980         blocking exceptions.
2981         * kwq/KWQFileButton.mm:
2982         (KWQFileButton::focusPolicy): Tweaks to make more readable and use 
2983         new model for keyboard UI mode.
2984         * kwq/KWQKHTMLPart.h:
2985         * kwq/KWQKHTMLPart.mm:
2986         (KWQKHTMLPart::nextKeyViewInFrame): Now checks new tabsToLinks
2987         function to determine if links can be tabbed to.
2988         (KWQKHTMLPart::currentEventIsKeyboardOptionTab): New function
2989         checks for option-tab keyboard event.
2990         (KWQKHTMLPart::tabsToLinks): New helper to take keyboard UI mode
2991         and option-tab into account.
2992         (KWQKHTMLPart::keyboardUIMode): Name tweak.
2993         * kwq/KWQListBox.mm: Tweaks to make more readable and use 
2994         new model for keyboard UI mode.
2995         (QListBox::focusPolicy):
2996         * kwq/WebCoreKeyboardAccess.h: Tweaked names. Added WebCoreKeyboardAccessTabsToLinks.
2997
2998 2003-11-13  David Hyatt  <hyatt@apple.com>
2999
3000         Implement a custom unfurl marquee style.
3001         
3002         Reviewed by john
3003
3004         * khtml/css/cssparser.cpp:
3005         (CSSParser::parseValue):
3006         * khtml/css/cssstyleselector.cpp:
3007         (khtml::CSSStyleSelector::applyRule):
3008         * khtml/css/cssvalues.c:
3009         (hash_val):
3010         (findValue):
3011         * khtml/css/cssvalues.h:
3012         * khtml/css/cssvalues.in:
3013         * khtml/rendering/render_box.cpp:
3014         (RenderBox::calcHeight):
3015         * khtml/rendering/render_layer.cpp:
3016         (m_direction):
3017         (Marquee::isUnfurlMarquee):
3018         (Marquee::start):
3019         (Marquee::updateMarqueePosition):
3020         (Marquee::updateMarqueeStyle):
3021         (Marquee::timerEvent):
3022         * khtml/rendering/render_layer.h:
3023         (khtml::):
3024         * khtml/rendering/render_style.h:
3025         (khtml::):
3026
3027 2003-11-13  Ken Kocienda  <kocienda@apple.com>
3028
3029         Reviewed by John
3030
3031         Fix for this bug:
3032
3033         <rdar://problem/3480761>: event object type attribute returns 
3034         khtml_keypress instead of keypress
3035
3036         Fixed string so that it returns keypress instead of khtml_keypress.
3037         While I was at it, I changed the constant used for this event from
3038         KHTML_KEYPRESS_EVENT to KEYPRESS_EVENT.
3039
3040         * khtml/ecma/kjs_binding.cpp:
3041         (ScriptInterpreter::wasRunByUserGesture): Constant name fixup.
3042         * khtml/ecma/kjs_dom.cpp: Ditto.
3043         (DOMNode::getValueProperty): Ditto.
3044         (DOMNode::putValue): Ditto.
3045         * khtml/ecma/kjs_window.cpp:
3046         (Window::get): Ditto.
3047         (Window::put): Ditto.
3048         * khtml/html/html_elementimpl.cpp:
3049         (HTMLElementImpl::parseAttribute): Ditto.
3050         * khtml/html/html_formimpl.cpp:
3051         (HTMLInputElementImpl::defaultEventHandler): Ditto.
3052         (HTMLSelectElementImpl::defaultEventHandler): Ditto.
3053         * khtml/xml/dom2_eventsimpl.cpp:
3054         (EventImpl::idToType): This is the change that fixes the bug.
3055         (KeyboardEventImpl::KeyboardEventImpl): Constant name fixup.
3056         * khtml/xml/dom2_eventsimpl.h:
3057         (DOM::EventImpl::): Ditto.
3058
3059 2003-11-13  Darin Adler  <darin@apple.com>
3060
3061         Reviewed by Ken.
3062
3063         - fixed 3452554 -- keyCode attribute for DOM events reports incorrect value
3064
3065         * khtml/dom/dom2_events.cpp:
3066         (UIEvent::keyCode): Return the Windows key code for keydown and keyup events.
3067         But for other events, return the character code. This matches IE.
3068         (UIEvent::which): Same behavior for now; may need further refinement.
3069
3070         * kwq/KWQEvent.h: Change QEvent to allow copying. The Qt version probably doesn't
3071         allow it, but for us it's no big deal. Our event objects are just data holders.
3072         (QKeyEvent::QKeyEvent): Change parameters; take an NSEvent and figure the rest out
3073         here. Except for now get the type, button state, and auto repeat flag from the caller
3074         because that's a smaller change from how things are done now. I'll take this the next
3075         step later.
3076         * kwq/KWQEvent.mm:
3077         (characterCode): Added. Extracts the character code from the string if it's exactly
3078         1 character long.
3079         (WindowsKeyCode): Added. Given an event, figures out the Windows key code. 
3080         (QKeyEvent::QKeyEvent): Changed to get things from the NSEvent rather than having them
3081         passed individually. One change is that _ascii is now the Unicode value of the first
3082         character in the string. This causes us to return the Unicode value from keyCode for
3083         keypress events. Another change is that we now compute the Windows key code.
3084
3085         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::keyEvent): Change to use the new QKeyEvent
3086         constructor, passing in the NSEvent.
3087
3088         * khtml/xml/dom2_eventsimpl.cpp: (KeyboardEventImpl::KeyboardEventImpl):
3089         In APPLE_CHANGES, copy the QKeyEvent using the copy constructor rather than
3090         listing the fields. This is easier to maintain when the list of fields changes.
3091
3092         * khtml/rendering/render_form.cpp: (ComboBoxWidget::eventFilter): Put #if
3093         !APPLE_CHANGES around code that constructs a QKeyEvent. We don't ever run this
3094         code, but now we can't compile it either so we need the #if.
3095
3096 2003-11-12  David Hyatt  <hyatt@apple.com>
3097
3098         Fix for 3482132, incremental repainting for layout, i.e., only repaint areas that change when
3099         doing a layout.
3100         
3101         Reviewed by kocienda
3102
3103         * khtml/khtmlview.h:
3104         * khtml/rendering/render_canvas.cpp:
3105         (RenderCanvas::repaintViewRectangle):
3106         * khtml/rendering/render_layer.h:
3107         * khtml/rendering/render_object.cpp:
3108         (RenderObject::setNeedsLayout):
3109         (RenderObject::setChildNeedsLayout):
3110         * khtml/rendering/render_object.h:
3111         * khtml/rendering/render_table.cpp:
3112         (RenderTableSection::layoutRows):
3113
3114 2003-11-12  Ken Kocienda  <kocienda@apple.com>
3115
3116         I am an idiot for just assuming that these elements implement a focus()
3117         function, without actually compiling and testing. I will have to add 
3118         this function to these elements so I can make this work.
3119
3120         * khtml/html/html_formimpl.cpp:
3121         (HTMLButtonElementImpl::accessKeyAction): These elements do not implement focus().
3122         * khtml/html/html_inlineimpl.cpp:
3123         (HTMLAnchorElementImpl::accessKeyAction): Ditto.
3124
3125 2003-11-12  Ken Kocienda  <kocienda@apple.com>
3126
3127         Reviewed by Richard
3128
3129         * khtml/html/html_formimpl.cpp:
3130         (HTMLButtonElementImpl::click): Implemented. Missed this in my earlier patch.
3131         (HTMLButtonElementImpl::accessKeyAction): Added. Focus and click.
3132         (HTMLInputElementImpl::accessKeyAction): Added. Focus the element.
3133         (HTMLSelectElementImpl::accessKeyAction): Added. Focus the element.
3134         (HTMLTextAreaElementImpl::accessKeyAction): Added. Focus the element.
3135         * khtml/html/html_formimpl.h:
3136         * khtml/html/html_inlineimpl.cpp:
3137         (HTMLAnchorElementImpl::accessKeyAction): Added. Focus and click.
3138         * khtml/html/html_inlineimpl.h:
3139         * khtml/xml/dom_docimpl.cpp:
3140         (DocumentImpl::DocumentImpl):
3141         (DocumentImpl::addElementById): Dirty the accesskey dictionary.
3142         (DocumentImpl::removeElementById): Ditto.
3143         (DocumentImpl::getElementByAccessKey): Function to look up an element
3144         based on the key provided.
3145         (DocumentImpl::setDocumentChanged): Dirty the accesskey dictionary.
3146         (DocumentImpl::defaultEventHandler): Check the accesskey dictionary
3147         to see if some element wants to handle a key event.
3148         * khtml/xml/dom_docimpl.h:
3149         * khtml/xml/dom_elementimpl.h:
3150         (DOM::ElementImpl::accessKeyAction): Added. Send a click to the element.
3151
3152 2003-11-12  Ken Kocienda  <kocienda@apple.com>
3153
3154         Reviewed by Richard
3155
3156         Fix for this bug:
3157
3158         <rdar://problem/3481600>: key event objects do not preserve unmodified keys
3159
3160         * khtml/xml/dom2_eventsimpl.cpp: Modified constructor call to include
3161         unmodifiedText.
3162         (KeyboardEventImpl::KeyboardEventImpl):
3163         * kwq/KWQEvent.h: Added unmodifiedText accessor and variable to QKeyEvent.
3164         * kwq/KWQEvent.mm:
3165         (QKeyEvent::QKeyEvent): Modified constructor to include unmodifiedText.
3166         (QKeyEvent::unmodifiedText): Added accessor.
3167         * kwq/KWQKHTMLPart.mm:
3168         (KWQKHTMLPart::keyEvent): Modified constructor call to include
3169         unmodifiedText.
3170
3171 2003-11-12  Ken Kocienda  <kocienda@apple.com>
3172
3173         Reviewed by Maciej
3174
3175         * khtml/html/html_elementimpl.cpp:
3176         (HTMLElementImpl::click): Implemented a programmatic click function for
3177         elements.
3178         * khtml/html/html_elementimpl.h:
3179         * khtml/html/html_formimpl.cpp:
3180         (HTMLFormElementImpl::submitClick): Implemented a programmatic click function for
3181         elements.
3182         (HTMLInputElementImpl::click): This implementation calls through
3183         to Cocoa button programmatic click function to get user interface
3184         feedback for button elements, and calls through to the superclass
3185         for other elements.
3186         * khtml/html/html_formimpl.h:
3187         * khtml/html/html_inlineimpl.cpp: Removed click() function for anchors.
3188         No longer needed.
3189         * khtml/html/html_inlineimpl.h: Ditto.
3190
3191 2003-11-12  David Hyatt  <hyatt@apple.com>
3192
3193         Fix build bustage in deployment builds.
3194
3195         * kwq/KWQLineEdit.mm:
3196         (QLineEdit::hasMarkedText):
3197
3198 2003-11-11  David Hyatt  <hyatt@apple.com>
3199
3200         Fix for 3481134, shorthand parsing in CSS does not fill in omitted values.  The fix is to implement
3201         the CSS3 'initial' value for all properties (covered by 3481323), and then to fill in the omitted 
3202         values with the 'initial' value.
3203
3204         This patch also fixes two bugs in the style system: 3481324, collapsed borders with border-style: none
3205         should always return a width of 0, and 3481322, 'clip' not inheriting properly in CSS when explicit
3206         inheritance is used.
3207         
3208         Reviewed by mjs
3209
3210         * khtml/css/css_valueimpl.cpp:
3211         (CSSInitialValueImpl::cssText):
3212         * khtml/css/css_valueimpl.h:
3213         (DOM::CSSInitialValueImpl::cssValueType):
3214         * khtml/css/cssparser.cpp:
3215         (CSSParser::parseValue):
3216         (CSSParser::parseShortHand):
3217         * khtml/css/cssstyleselector.cpp:
3218         (khtml::CSSStyleSelector::applyRule):
3219         * khtml/css/cssvalues.c:
3220         (hash_val):
3221         (findValue):
3222         * khtml/css/cssvalues.h:
3223         * khtml/css/cssvalues.in:
3224         * khtml/dom/css_value.h:
3225         (DOM::CSSValue::):
3226         * khtml/rendering/render_style.cpp:
3227         (StyleBoxData::StyleBoxData):
3228         (StyleVisualData::StyleVisualData):
3229         (StyleBackgroundData::StyleBackgroundData):
3230         (StyleMarqueeData::StyleMarqueeData):
3231         (StyleFlexibleBoxData::StyleFlexibleBoxData):
3232         (opacity):
3233         (StyleInheritedData::StyleInheritedData):
3234         (RenderStyle::diff):
3235         * khtml/rendering/render_style.h:
3236         (khtml::BorderValue::BorderValue):
3237         (khtml::CollapsedBorderValue::width):
3238         (khtml::RenderStyle::InheritedFlags::operator==):
3239         (khtml::RenderStyle::setBitDefaults):
3240         (khtml::RenderStyle::resetBorderTop):
3241         (khtml::RenderStyle::resetBorderRight):
3242         (khtml::RenderStyle::resetBorderBottom):
3243         (khtml::RenderStyle::resetBorderLeft):
3244         (khtml::RenderStyle::resetOutline):
3245         (khtml::RenderStyle::setHasClip):
3246         (khtml::RenderStyle::resetMargin):
3247         (khtml::RenderStyle::resetPadding):
3248         (khtml::RenderStyle::setCursor):
3249
3250 2003-11-11  Maciej Stachowiak  <mjs@apple.com>
3251
3252         Reviewed by John.
3253
3254         - fixed 3479537 - reproducible crash in KJS::WindowFunc::tryCall
3255         
3256         * khtml/ecma/kjs_window.cpp:
3257         (WindowFunc::tryCall): Check part and doc impl for null.
3258
3259 2003-11-11  Maciej Stachowiak  <mjs@apple.com>
3260
3261         Reviewed by Ken.
3262
3263         - fixed 3472330 -  REGRESSION: onKeyPress handler not called when hitting keys in <input type=password> field
3264
3265         * kwq/KWQTextField.mm:
3266         (-[KWQSecureTextField initWithQLineEdit:]): New initializer, so
3267         the secure text field knows about the widget.
3268         (-[KWQTextField setPasswordMode:]): Use new initializer for
3269         KWQSecureTextField.
3270         (-[KWQSecureTextField textView:shouldHandleEvent:]): New method,
3271         do the same thing as the non-secure text field to pass the event on.
3272         (-[KWQSecureTextField textView:didHandleEvent:]): Ditto.
3273
3274 2003-11-11  Ken Kocienda  <kocienda@apple.com>
3275
3276         Reviewed by Maciej
3277
3278         Fix for this bug:
3279
3280         <rdar://problem/3480173>: Too many names for programmatic click functions
3281
3282         Changed all instances of performClick() and simulateClick() to click().
3283         Changed all instances of performSubmitClick() to submitClick().
3284
3285         Additionally, KWQButton had a simulateClick method, which was redundant
3286         given that its superclass has a performClick: method.
3287
3288         * khtml/html/html_formimpl.cpp:
3289         (HTMLFormElementImpl::submitClick):
3290         (HTMLInputElementImpl::defaultEventHandler):
3291         (HTMLSelectElementImpl::defaultEventHandler):
3292         * khtml/html/html_formimpl.h:
3293         * khtml/html/html_inlineimpl.cpp:
3294         (HTMLAnchorElementImpl::defaultEventHandler):
3295         (HTMLAnchorElementImpl::click):
3296         * khtml/html/html_inlineimpl.h:
3297         * khtml/rendering/render_form.cpp:
3298         (RenderLineEdit::slotReturnPressed):
3299         * kwq/KWQButton.h:
3300         * kwq/KWQButton.mm:
3301         (QButton::click):
3302
3303 2003-11-11  Maciej Stachowiak  <mjs@apple.com>
3304
3305         Reviewed by John.
3306
3307         - fixed 3475272 - custom property on CSSStyleObject won't hold a value
3308
3309         * khtml/ecma/kjs_css.cpp:
3310         (DOMCSSStyleDeclaration::tryPut): If the property is not a css property,
3311         save it as a custom object property in the normal way.
3312
3313 2003-11-11  John Sullivan  <sullivan@apple.com>
3314
3315         - fixed <rdar://problem/3480421>: Focus rings around links are too thick, 
3316         should use 3 px instead of 5 px
3317
3318         Reviewed by Don and Ken.
3319
3320         * khtml/css/html4.css:
3321         use 3px instead of 5 px for :active, :focus
3322
3323 2003-11-11  Ken Kocienda  <kocienda@apple.com>
3324
3325         Reviewed by John
3326
3327         In the DOM Level 3 Events specification, keydown and keyup are 
3328         standard events. We can remove the KHTML component in the names 
3329         of these constants. Note that the keypress event is still 
3330         nonstandard and will retain the KHTML name component.
3331
3332         * khtml/ecma/kjs_binding.cpp:
3333         (ScriptInterpreter::wasRunByUserGesture)
3334         * khtml/ecma/kjs_dom.cpp:
3335         (DOMNode::getValueProperty)
3336         (DOMNode::putValue)
3337         * khtml/ecma/kjs_window.cpp:
3338         (Window::get)
3339         (Window::put)
3340         * khtml/html/html_elementimpl.cpp:
3341         (HTMLElementImpl::parseAttribute)
3342         * khtml/html/html_formimpl.cpp:
3343         (HTMLGenericFormElementImpl::defaultEventHandler)
3344         * khtml/html/html_inlineimpl.cpp:
3345         (HTMLAnchorElementImpl::defaultEventHandler)
3346         * khtml/xml/dom2_eventsimpl.cpp:
3347         (EventImpl::typeToId)
3348         (EventImpl::idToType)
3349         (KeyboardEventImpl::KeyboardEventImpl)
3350         * khtml/xml/dom2_eventsimpl.h:
3351         (DOM::EventImpl::)
3352
3353 2003-11-11  Chris Blumenberg  <cblu@apple.com>
3354
3355         Fixed: <rdar://problem/3480281>: drag image of selected text and images include broken images
3356         
3357         Reviewed by dave.
3358
3359         * khtml/rendering/render_image.cpp:
3360         (RenderImage::paintObject): when drawing the drag image, don't draw the broken image
3361
3362 2003-11-11  Vicki Murley  <vicki@apple.com>
3363
3364         Reviewed by sullivan.
3365
3366         - rolled Merlot build fix onto the trunk
3367
3368         * WebCorePrefix.h: added #include <sys/types.h>
3369
3370 2003-11-10  David Hyatt  <hyatt@apple.com>
3371
3372         Fix for 3473531, text nested in hr inside h3 did not get the h3's style.
3373         
3374         Reviewed by darin
3375
3376         * khtml/html/dtd.cpp:
3377         (DOM::checkChild):
3378
3379 2003-11-10  David Hyatt  <hyatt@apple.com>
3380
3381         Fix for 3478435, <hr> tags should be centered by default.  Ditched the 1px margin as well.
3382
3383         Fix for 3479441, <h1>-<h6> tags should *not* be centered by default.  They should also use bold instead of
3384         bolder.
3385         
3386         Reviewed by darin
3387
3388         * khtml/css/html4.css:
3389         * khtml/html/html_blockimpl.cpp:
3390         (HTMLHRElementImpl::parseAttribute):
3391         * layout-tests/apple-only/base/bugzilla.mozilla.org/index-expected.txt:
3392         * layout-tests/apple-only/base/home.netscape.com/index-expected.txt:
3393         * layout-tests/apple-only/base/www.altavista.com/index-expected.txt:
3394         * layout-tests/apple-only/base/www.cnn.com/index-expected.txt:
3395         * layout-tests/apple-only/base/www.digitalcity.com/index-expected.txt:
3396         * layout-tests/apple-only/base/www.ebay.com/index-expected.txt:
3397         * layout-tests/apple-only/base/www.excite.com/index-expected.txt:
3398         * layout-tests/apple-only/base/www.mapquest.com/index-expected.txt:
3399         * layout-tests/apple-only/base/www.microsoft.com/index-expected.txt:
3400         * layout-tests/apple-only/base/www.msnbc.com/index-expected.txt:
3401         * layout-tests/apple-only/base/www.nytimes.com/index-expected.txt:
3402         * layout-tests/apple-only/base/www.nytimes.com_Table/index-expected.txt:
3403         * layout-tests/apple-only/base/www.quicken.com/index-expected.txt:
3404         * layout-tests/apple-only/base/www.w3.org_DOML2Core/index-expected.txt:
3405         * layout-tests/css1/basic/class_as_selector-expected.txt:
3406         * layout-tests/css1/basic/comments-expected.txt:
3407         * layout-tests/css1/basic/containment-expected.txt:
3408         * layout-tests/css1/basic/contextual_selectors-expected.txt:
3409         * layout-tests/css1/basic/grouping-expected.txt:
3410         * layout-tests/css1/basic/id_as_selector-expected.txt:
3411         * layout-tests/css1/basic/inheritance-expected.txt:
3412         * layout-tests/css1/box_properties/border-expected.txt: