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