Fix broken build (CachedObject.cpp was still including kcharsets.h).
[WebKit-https.git] / WebCore / ChangeLog
1 2006-01-09  Alexey Proskuryakov  <ap@nypop.com>
2
3         Fix broken build (CachedObject.cpp was still including kcharsets.h).
4         Proposed and reviewed by Eric Seidel.
5
6 2006-01-09  Eric Seidel  <eseidel@apple.com>
7
8         Reviewed by mjs.
9
10         Remove more unused code from kwq.
11
12         * ForwardingHeaders/dcopclient.h: Removed.
13         * ForwardingHeaders/kaction.h: Removed.
14         * ForwardingHeaders/kcharsets.h: Removed.
15         * ForwardingHeaders/kcombobox.h: Removed.
16         * ForwardingHeaders/klineedit.h: Removed.
17         * ForwardingHeaders/klistbox.h: Removed.
18         * ForwardingHeaders/kwin.h: Removed.
19         * ForwardingHeaders/qcombobox.h: Added.
20         * ForwardingHeaders/qlineedit.h: Added.
21         * WebCore.xcodeproj/project.pbxproj: remove files.
22         * khtml/css/csshelper.cpp:
23         * khtml/css/cssstyleselector.cpp:
24         * khtml/ecma/kjs_window.cpp:
25         (KJS::Window::getValueProperty):
26         * khtml/html/html_documentimpl.cpp:
27         * khtml/html/html_formimpl.cpp:
28         (DOM::HTMLOptionElementImpl::index):
29         (DOM::HTMLOptionElementImpl::setIndex):
30         * khtml/html/htmltokenizer.cpp:
31         * khtml/html/htmltokenizer.h:
32         * khtml/khtml_part.cpp:
33         * khtml/khtmlpart_p.h:
34         * khtml/rendering/render_form.cpp:
35         (RenderLineEdit::RenderLineEdit):
36         (RenderLineEdit::setStyle):
37         (RenderLineEdit::updateFromElement):
38         (RenderLineEdit::selectionStart):
39         (RenderLineEdit::selectionEnd):
40         (RenderLineEdit::setSelectionStart):
41         (RenderLineEdit::setSelectionEnd):
42         (RenderLineEdit::select):
43         (RenderLineEdit::setSelectionRange):
44         (ComboBoxWidget::ComboBoxWidget):
45         (ComboBoxWidget::event):
46         (ComboBoxWidget::eventFilter):
47         (RenderSelect::setWidgetWritingDirection):
48         (RenderSelect::updateFromElement):
49         (RenderSelect::layout):
50         (RenderSelect::slotSelectionChanged):
51         (RenderSelect::createListBox):
52         (RenderSelect::updateSelection):
53         (RenderTextArea::RenderTextArea):
54         * khtml/rendering/render_form.h:
55         (khtml::RenderLineEdit::widget):
56         * kwq/KWQDCOPClient.h: Removed.
57         * kwq/KWQKCharsets.cpp: Removed.
58         * kwq/KWQKCharsets.h: Removed.
59         * kwq/KWQKComboBox.h: Removed.
60         * kwq/KWQKKAction.h: Removed.
61         * kwq/KWQKLineEdit.h: Removed.
62         * kwq/KWQKListBox.h: Removed.
63         * kwq/KWQKWin.cpp: Removed.
64         * kwq/KWQKWin.h: Removed.
65         * kwq/KWQWidget.h:
66         * kwq/KWQWidget.mm:
67
68 2006-01-09  Eric Seidel  <eseidel@apple.com>
69
70         Reviewed by mjs.
71
72         Removing more unused parts of KWQ.
73
74         * ForwardingHeaders/java/kjavaappletcontext.h: Removed.
75         * ForwardingHeaders/khtml_find.h: Removed.
76         * ForwardingHeaders/qimage.h: Removed.
77         * ForwardingHeaders/rendering/break_lines.h: Removed.
78         * ForwardingHeaders/rendering/render_text.h: Removed.
79         * ForwardingHeaders/xbl/xbl_docimpl.h: Removed.
80         * WebCore.xcodeproj/project.pbxproj:
81         * khtml/html/html_canvasimpl.cpp:
82         * khtml/html/html_imageimpl.cpp:
83         * khtml/html/html_objectimpl.cpp:
84         * khtml/html/html_objectimpl.h:
85         * khtml/khtml_part.cpp:
86         (KHTMLPart::init):
87         (KHTMLPart::~KHTMLPart):
88         (KHTMLPart::clear):
89         * khtml/khtml_part.h:
90         * khtml/khtmlpart_p.h:
91         (KHTMLPartPrivate::KHTMLPartPrivate):
92         (KHTMLPartPrivate::~KHTMLPartPrivate):
93         * khtml/rendering/render_applet.cpp:
94         (RenderApplet::RenderApplet):
95         (RenderApplet::createWidgetIfNecessary):
96         * khtml/rendering/render_applet.h:
97         * ksvg2/svg/SVGFEImageElementImpl.cpp:
98         * ksvg2/svg/SVGImageElementImpl.cpp:
99         * kwq/DOMHTML.mm:
100         * kwq/KWQDummyView.h: Removed.
101         * kwq/KWQDummyView.m: Removed.
102         * kwq/KWQImage.h: Removed.
103         * kwq/KWQKHTMLFind.h: Removed.
104         * kwq/KWQKHTMLPart.mm:
105         * kwq/KWQKHTMLPartBrowserExtension.h:
106         * kwq/KWQKJavaAppletContext.h: Removed.
107         * kwq/KWQKJavaAppletWidget.h:
108         * kwq/KWQKJavaAppletWidget.mm:
109         (KJavaAppletWidget::KJavaAppletWidget):
110         * kwq/KWQKPartsBrowserExtension.h:
111         * kwq/KWQObject.h:
112         * kwq/KWQRegion.h:
113
114 2006-01-09  Eric Seidel  <eseidel@apple.com>
115
116         Rubber stamped by mjs.
117
118         Broke out loader.{h,cpp} into multiple files, one per class.
119         This patch also updates all files which previously included
120         loader.h to only include the necessary renamed headers.
121         http://bugzilla.opendarwin.org/show_bug.cgi?id=6444
122
123         * ForwardingHeaders/kdom/cache/KDOMCachedDocument.h: Removed.
124         * ForwardingHeaders/kdom/cache/KDOMCachedImage.h: updated include
125         * ForwardingHeaders/kdom/cache/KDOMCachedObject.h: updated include
126         * ForwardingHeaders/kdom/cache/KDOMCachedScript.h: updated include
127         * WebCore.xcodeproj/project.pbxproj: added files
128         * khtml/css/css_computedstyle.cpp: updated includes
129         * khtml/css/css_ruleimpl.cpp: updated includes
130         * khtml/css/css_stylesheetimpl.h: updated includes
131         * khtml/css/css_valueimpl.cpp: updated includes
132         * khtml/css/cssstyleselector.cpp: updated includes
133         * khtml/ecma/kjs_events.cpp: updated includes
134         * khtml/ecma/kjs_html.cpp: updated includes
135         * khtml/ecma/xmlhttprequest.cpp: updated includes
136         * khtml/html/html_headimpl.cpp: updated includes
137         * khtml/html/html_imageimpl.cpp: updated includes
138         * khtml/html/html_imageimpl.h: updated includes
139         * khtml/html/htmltokenizer.cpp: updated includes
140         * khtml/khtml_part.cpp: updated includes
141         * khtml/khtmlview.cpp: updated includes
142         * khtml/misc/Cache.cpp: Added.
143         * khtml/misc/Cache.h: Added.
144         * khtml/misc/CachedCSSStyleSheet.cpp: Added.
145         * khtml/misc/CachedCSSStyleSheet.h: Added.
146         * khtml/misc/CachedImage.cpp: Added.
147         * khtml/misc/CachedImage.h: Added.
148         * khtml/misc/CachedImageCallback.cpp: Added.
149         * khtml/misc/CachedImageCallback.h: Added.
150         * khtml/misc/CachedObject.cpp: Added.
151         * khtml/misc/CachedObject.h: Added, fixed tabs -> spaces.
152         * khtml/misc/CachedObjectClientWalker.cpp: Added.
153         * khtml/misc/CachedObjectClientWalker.h: Added.
154         * khtml/misc/CachedScript.cpp: Added.
155         * khtml/misc/CachedScript.h: Added.
156         * khtml/misc/CachedXBLDocument.cpp: Added.
157         * khtml/misc/CachedXBLDocument.h: Added.
158         * khtml/misc/CachedXSLStyleSheet.cpp: Added.
159         * khtml/misc/CachedXSLStyleSheet.h: Added.
160         * khtml/misc/DocLoader.cpp: Added.
161         * khtml/misc/DocLoader.h: Added.
162         * khtml/misc/Request.cpp: Added.
163         * khtml/misc/Request.h: Added.
164         * khtml/misc/loader.cpp: updated includes
165         * khtml/misc/loader.h: updated includes
166         * khtml/misc/loader_client.h: updated includes
167         * khtml/rendering/render_box.cpp: updated includes
168         * khtml/rendering/render_line.cpp: updated includes
169         * khtml/rendering/render_list.cpp: updated includes
170         * khtml/rendering/render_object.cpp: updated includes
171         * khtml/xml/dom_docimpl.cpp: updated includes
172         * khtml/xml/dom_xmlimpl.cpp: updated includes
173         * khtml/xml/xml_tokenizer.cpp: updated includes
174         * khtml/xsl/xsl_stylesheetimpl.cpp: updated includes
175         * khtml/xsl/xsl_stylesheetimpl.h: updated includes
176         * khtml/xsl/xslt_processorimpl.cpp: updated includes
177         * ksvg2/svg/SVGCursorElementImpl.cpp: updated includes
178         * ksvg2/svg/SVGDocumentImpl.cpp: updated includes
179         * ksvg2/svg/SVGFEImageElementImpl.cpp: updated includes
180         * ksvg2/svg/SVGImageElementImpl.cpp: updated includes
181         * ksvg2/svg/SVGImageElementImpl.h: updated includes
182         * kwq/KWQKHTMLPart.mm: updated includes
183         * kwq/KWQLoader.mm: updated includes
184         * kwq/KWQPixmap.mm: updated includes
185         * kwq/KWQTextArea.mm: updated includes
186         * kwq/WebCoreBridge.mm: updated includes
187         * kwq/WebCoreCache.mm: updated includes
188
189 2006-01-09  Alexey Proskuryakov  <ap@nypop.com>
190
191         Reviewed by Maciej.
192
193         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6402
194           Implement frameElement.width and frameElement.height
195
196         Test case: fast/frames/frameElement-widthheight.html
197
198         * khtml/ecma/kjs_html.cpp:
199         (KJS::HTMLElement::frameGetter):
200         * khtml/ecma/kjs_html.h:
201         Add FrameWidth, FrameHeight
202
203         * khtml/html/html_baseimpl.cpp:
204         (HTMLFrameElementImpl::frameWidth):
205         (HTMLFrameElementImpl::frameHeight):
206         * khtml/html/html_baseimpl.h:
207         Add frameWidth, frameHeight
208
209 2006-01-09  Mitz Pettel  <opendarwin.org@mitzpettel.com>
210
211         Reviewed by Maciej, landed by ap.
212         
213         Test: fast/replaced/inline-box-wrapper-handover.html
214         
215         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6276
216           Image thumbnails are misplaced on forum.2ostrov.ru
217           
218         * khtml/rendering/render_line.cpp:
219         (khtml::InlineBox::deleteLine): Don't reset the inline box wrapper when
220         deleting an extracted box.
221
222 2006-01-08  Eric Seidel  <eseidel@apple.com>
223
224         Reviewed by ggaren.
225
226         Remove all mention of NSView from khtml.
227
228         * khtml/html/html_objectimpl.cpp:
229         (DOM::HTMLAppletElementImpl::getAppletInstance): call w/ widget
230         (DOM::HTMLEmbedElementImpl::getEmbedInstance): call w/ widget
231         (DOM::HTMLObjectElementImpl::getObjectInstance): call w/ widget
232         * kwq/KWQKHTMLPart.h:
233         * kwq/KWQKHTMLPart.mm:
234         (KWQKHTMLPart::getAppletInstanceForWidget): renamed.
235         (KWQKHTMLPart::getEmbedInstanceForWidget): renamed.
236         (KWQKHTMLPart::getObjectInstanceForWidget): renamed.
237
238 2006-01-08  Eric Seidel  <eseidel@apple.com>
239
240         Rubber stamped by ggaren.
241
242         * ForwardingHeaders/qsortedlist.h: Added. (a khtml file was referencing KWQ directly.)
243         * WebCore.xcodeproj/project.pbxproj: added new files.
244         * khtml/editing/SelectionController.cpp: updated includes
245         * khtml/editing/composite_edit_command.cpp: updated includes
246         * khtml/editing/htmlediting.cpp: updated includes
247         * khtml/editing/markup.cpp: updated includes
248         * khtml/editing/visible_position.cpp: updated includes
249         * khtml/editing/visible_text.cpp: updated includes
250         * khtml/editing/visible_text.h: updated includes
251         * khtml/editing/visible_units.cpp: updated includes
252         * khtml/khtml_part.cpp: updated includes
253         * khtml/khtmlview.cpp: updated includes
254         * khtml/rendering/InlineTextBox.cpp: Split out from render_text
255         * khtml/rendering/InlineTextBox.h: Split out from render_text
256         * khtml/rendering/RenderText.cpp: Split out from render_text
257         (khtml::RenderText::position): removed DEBUG_LAYOUT
258         * khtml/rendering/RenderText.h: Split out from render_text
259         * khtml/rendering/RenderTextFragment.cpp: Split out from render_text
260         * khtml/rendering/RenderTextFragment.h: Split out from render_text
261         * khtml/rendering/bidi.cpp: updated includes
262         * khtml/rendering/render_block.cpp: updated includes
263         * khtml/rendering/render_br.cpp: updated includes
264         * khtml/rendering/render_br.h: updated includes
265         * khtml/rendering/render_button.cpp: updated includes
266         * khtml/rendering/render_container.cpp: updated includes
267         * khtml/rendering/render_flow.cpp: updated includes
268         * khtml/rendering/render_line.cpp: updated includes
269         * khtml/rendering/render_object.cpp: updated includes
270         * khtml/rendering/render_text.cpp: Removed.
271         * khtml/rendering/render_text.h: Removed.
272         * khtml/xml/dom_docimpl.cpp: updated includes
273         * khtml/xml/dom_nodeimpl.cpp: updated includes
274         * khtml/xml/dom_position.cpp: updated includes
275         * khtml/xml/dom_textimpl.cpp: updated includes
276         * kwq/KWQAccObject.mm: updated includes
277         * kwq/KWQKHTMLPart.mm: updated includes
278         * kwq/KWQRenderTreeDebug.cpp: updated includes
279
280 2006-01-08  Eric Seidel  <eseidel@apple.com>
281
282         Reviewed by mjs & xenon.
283
284         Renamed a few in kwq/ from .mm to .cpp
285
286         * WebCore.xcodeproj/project.pbxproj: updated paths
287         * kwq/KWQDictImpl.cpp: Added.
288         * kwq/KWQDictImpl.mm: Removed.
289         * kwq/KWQKPartsEvent.cpp: Added.
290         * kwq/KWQKPartsEvent.mm: Removed.
291         * kwq/KWQListImpl.cpp: Added.
292         * kwq/KWQListImpl.mm: Removed.
293
294 2006-01-08  Eric Seidel  <eseidel@apple.com>
295
296         Reviewed by mjs.
297
298         Renamed several files in kwq/ from .mm to .cpp
299         Removed a few pieces of unused KWQ code.
300
301         * WebCore.xcodeproj/project.pbxproj:
302         * khtml/html/htmltokenizer.cpp:
303         (khtml::HTMLTokenizer::continueProcessing): removed KWQUIEventTime
304         (khtml::HTMLTokenizer::write): removed KWQUIEventTime
305         * khtml/html/htmltokenizer.h:
306         * khtml/khtml_part.cpp:
307         (KHTMLPart::slotFinished): removed KWQUIEventTime
308         * khtml/misc/loader.cpp:
309         (CachedObject::finish): removed KWQUIEventTime
310         * khtml/xml/dom_docimpl.cpp:
311         (DocumentImpl::processHttpEquiv): removed KWQUIEventTime
312         * kwq/KWQArrayImpl.cpp: Added.
313         * kwq/KWQArrayImpl.mm: Removed.
314         * kwq/KWQBuffer.cpp: Added.
315         * kwq/KWQBuffer.mm: Removed.
316         * kwq/KWQCString.cpp: Added.
317         * kwq/KWQCString.mm: Removed.
318         * kwq/KWQCharsets.cpp: Added.
319         * kwq/KWQCharsets.mm: Removed.
320         * kwq/KWQCollection.h:
321         (QPtrCollection::~QPtrCollection): made inline
322         * kwq/KWQCollection.mm: Removed.
323         * kwq/KWQDateTime.cpp: Added, removed KWQUIEventTime
324         * kwq/KWQDateTime.h:
325         * kwq/KWQDateTime.mm: Removed.
326         * kwq/KWQGlobal.cpp: Added.
327         * kwq/KWQGlobal.mm: Removed.
328         * kwq/KWQGuardedPtr.cpp: Added.
329         * kwq/KWQGuardedPtr.mm: Removed.
330         * kwq/KWQKCharsets.cpp: Added.
331         * kwq/KWQKCharsets.mm: Removed.
332         * kwq/KWQKGlobalSettings.h:
333         (KGlobalSettings::generalFont): made inline
334         (KGlobalSettings::windowTitleFont): made inline
335         (KGlobalSettings::menuFont): made inline
336         (KGlobalSettings::contrast): made inline
337         * kwq/KWQKGlobalSettings.mm: Removed.
338         * kwq/KWQKHTMLFactory.cpp: Added.
339         * kwq/KWQKHTMLFactory.mm: Removed.
340         * kwq/KWQKHTMLView.cpp: Added.
341         * kwq/KWQKHTMLView.mm: Removed.
342         * kwq/KWQKJob.h:
343         * kwq/KWQKJob.mm: Removed.
344         * kwq/KWQKWin.cpp: Added.
345         * kwq/KWQKWin.mm: Removed.
346         * kwq/KWQMapImpl.cpp: Added.
347         * kwq/KWQMapImpl.mm: Removed.
348         * kwq/KWQObject.cpp: Added.
349         * kwq/KWQObject.mm: Removed.
350         * kwq/KWQPen.cpp: Added.
351         * kwq/KWQPen.mm: Removed.
352         * kwq/KWQPointArray.cpp: Added.
353         * kwq/KWQPointArray.mm: Removed.
354         * kwq/KWQPtrDictImpl.cpp: Added.
355         * kwq/KWQPtrDictImpl.mm: Removed.
356         * kwq/KWQRegExp.cpp: Added.
357         * kwq/KWQRegExp.mm: Removed.
358         * kwq/KWQRegion.cpp: Added.
359         * kwq/KWQRegion.mm: Removed.
360         * kwq/KWQStyle.cpp: Added.
361         * kwq/KWQStyle.mm: Removed.
362         * kwq/KWQTextCodec.cpp: Added.
363         * kwq/KWQTextCodec.mm: Removed.
364         * kwq/KWQTextStream.cpp: Added.
365         * kwq/KWQTextStream.mm: Removed.
366         * kwq/KWQTimer.cpp: Added.
367         * kwq/KWQTimer.mm: Removed.
368         * kwq/KWQValueListImpl.cpp: Added.
369         * kwq/KWQValueListImpl.mm: Removed.
370         * kwq/KWQVariant.cpp: Added.
371         * kwq/KWQVariant.mm: Removed.
372         * kwq/KWQVectorImpl.cpp: Added.
373         * kwq/KWQVectorImpl.mm: Removed.
374         * kwq/KWQWMatrix.cpp: Added.
375         * kwq/KWQWMatrix.mm: Removed.
376
377 2006-01-07  Maciej Stachowiak  <mjs@apple.com>
378
379         Reviewed by Eric.
380
381         - added basic SVG text support using CSS-based rendering
382         http://bugzilla.opendarwin.org/show_bug.cgi?id=4883
383  
384         Affects many test results in LayoutTests/svg.
385
386         * kcanvas/RenderSVGText.cpp: Added. Simple subclass of RenderBlock for SVG text.
387         (RenderSVGText::RenderSVGText): just call superclass constructor.
388         (RenderSVGText::translateTopToBaseline): helper to account for the fact that
389         y coordinates for <text> give the baseline position, but the render tree expects
390         current y to be the top.
391         (RenderSVGText::translateForAttributes): translate to account for x and y
392         attributes.
393         (RenderSVGText::paint): Apply appropriate CTM transform and then just let
394         RenderBlock paint.
395         * kcanvas/RenderSVGText.h: Added.
396         (RenderSVGText::renderName):
397         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
398         (KRenderingDeviceContextQuartz::nsGraphicsContext): We want the context flipped.
399         * ksvg2/css/svg.css: Give <svg:text> display: block
400         * ksvg2/svg/SVGTextElementImpl.cpp:
401         (SVGTextElementImpl::createRenderer): Create a RenderSVGText renderer.
402         (SVGTextElementImpl::childShouldCreateRenderer): Let child text nodes make
403         renderers, but nothing else (for now).
404         * ksvg2/svg/SVGTextElementImpl.h:
405         (KSVG::SVGTextElementImpl::rendererIsNeeded): It sure is! :-)
406         * WebCore.xcodeproj/project.pbxproj: Add new files.
407
408 2006-01-07  Eric Seidel  <eseidel@apple.com>
409
410         Reviewed by mjs
411
412         Removed old, unneeded code.
413
414         * WebCore+SVG/DrawCanvasItem.h: Removed.
415         * WebCore+SVG/DrawCanvasItem.mm: Removed.
416         * WebCore+SVG/DrawCanvasItemPrivate.h: Removed.
417         * WebCore+SVG/DrawDocument.h: Removed.
418         * WebCore+SVG/DrawDocument.mm: Removed.
419         * WebCore+SVG/DrawDocumentPrivate.h: Removed.
420         * WebCore+SVG/DrawView.h: Removed.
421         * WebCore+SVG/DrawView.mm: Removed.
422         * WebCore+SVG/DrawViewPrivate.h: Removed.
423         * WebCore+SVG/NSSVGImageRep.h: Removed.
424         * WebCore+SVG/NSSVGImageRep.m: Removed.
425         * WebCore.xcodeproj/project.pbxproj: remove files
426
427 2006-01-07  Maciej Stachowiak  <mjs@apple.com>
428
429         Reviewed by Eric.
430
431         - fixed WebCore build
432         http://bugzilla.opendarwin.org/show_bug.cgi?id=6404
433
434         * khtml/rendering/render_canvasimage.h: Remove unneeded extern declarations.
435
436 2006-01-07  Anders Carlsson  <andersca@mac.com>
437
438         Reviewed by Maciej.
439
440         - Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6373
441         REGRESSION: JavaScript hang when comparing large array to null
442         
443         * khtml/ecma/kjs_html.cpp:
444         Remove toPrimitive.
445         
446         * khtml/ecma/kjs_html.h:
447         (KJS::HTMLAllCollection::isEqualToNull):
448         Implement isEqualToNull and have it return true.
449
450 2006-01-06  Eric Seidel  <eseidel@apple.com>
451
452         Reviewed by darin.
453
454         <rdar://problem/4386652> Crash: SVG filter crash at w3schools.com
455
456         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
457         (KCanvasFEDiffuseLightingQuartz::getCIFilter): nil check
458         (KCanvasFESpecularLightingQuartz::getCIFilter): nil check
459
460 2006-01-06  Geoffrey Garen  <ggaren@apple.com>
461
462         Patch by Mitz, reviwed by Darin, layout tested and landed by me.
463
464         - Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=6382
465         REGRESSION: Repro crash when clicking link with target="_blank"
466
467         * kwq/KWQKHTMLPart.mm:
468         (KWQKHTMLPart::setName):
469         * manual-tests/empty-link-target.html: Added.
470
471 2006-01-06  Alexey Proskuryakov  <ap@nypop.com>
472
473         Reviewed by Darin.
474
475         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5291
476           FORM multipart/form-data with GET method issue
477
478         Test cases: 
479         * fast/forms/form-get-multipart.html
480         * fast/forms/form-get-multipart2.html
481         * fast/forms/form-get-multipart3.html
482         * fast/forms/form-post-urlencoded.html
483
484         * khtml/html/html_formimpl.cpp:
485         (DOM::HTMLFormElementImpl::submit):
486         Reset m_multipart to false if not posting.
487         (DOM::HTMLFormElementImpl::parseEnctype):
488         multipart/form-data doesn't imply POST method.
489
490 2006-01-06  Alexey Proskuryakov  <ap@nypop.com>
491
492         Reviewed by Eric.
493
494         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5792
495           Crasher on rendering-shapes from SVG 1.0 testsuite
496
497         Test case: fast/parser/entity-ignorable-whitespace.xhtml
498
499         * khtml/xml/xml_tokenizer.cpp:
500         (khtml::XMLTokenizer::finish): install an ignorableWhitespace callback to
501         work around a libxml2 bug
502         (khtml::ignorableWhitespaceHandler): no-op
503
504 2006-01-06  Anders Carlsson  <andersca@mac.com>
505
506         Reviewed by Eric.
507
508         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5142
509         parseXMLDocumentFragment can't parse fragments correctly
510         
511         * khtml/xml/xml_tokenizer.cpp:
512         (khtml::balancedStartElementNsHandler):
513         (khtml::balancedEndElementNsHandler):
514         (khtml::balancedCharactersHandler):
515         (khtml::balancedProcessingInstructionHandler):
516         (khtml::balancedCdataBlockHandler):
517         (khtml::balancedCommentHandler):
518         (khtml::balancedWarningHandler):
519         Add handlers.
520         
521         (khtml::parseXMLDocumentFragment):
522         Change back into using xmlParseBalancedChunkMemory. 
523
524 2006-01-06  Alexander Kellett  <lypanov@kde.org>
525
526         Reviewed by eseidel.
527
528         Basic support for <mask> tag.
529         http://bugzilla.opendarwin.org/show_bug.cgi?id=5969
530         Still missing attribute support for: maskUnits, maskContentUnits.
531         
532         Mask pixel tests do not work in DumpRenderTree due to:
533         http://bugzilla.opendarwin.org/show_bug.cgi?id=6327
534         Added test cases anyway.
535
536         This also tickles a (known) gradient update issue:
537         http://bugzilla.opendarwin.org/show_bug.cgi?id=6052
538
539         * WebCore.xcodeproj/project.pbxproj: added Mask files
540         * kcanvas/KCanvasResources.cpp:
541         (KCanvasMasker::KCanvasMasker): added.
542         (KCanvasMasker::~KCanvasMasker): added.
543         (KCanvasMasker::setMask): added.
544         (KCanvasMasker::externalRepresentation): added.
545         (getMaskerById): added.
546         * kcanvas/KCanvasResources.h:
547         (KCanvasResource::isMasker): added.
548         (KCanvasMasker::isMasker): added.
549         (KCanvasMasker::mask): added.
550         * kcanvas/device/quartz/KCanvasItemQuartz.mm:
551         (KCanvasItemQuartz::paint): added mask support
552         * kcanvas/device/quartz/KCanvasMaskerQuartz.h: Added.
553         (KCanvasMaskerQuartz::KCanvasMaskerQuartz): added.
554         * kcanvas/device/quartz/KCanvasMaskerQuartz.mm: Added.
555         (applyLuminanceToAlphaFilter): added.
556         (applyExpandAlphatoGrayscaleFilter): added.
557         (transformImageIntoGrayscaleMask): added.
558         (KCanvasMaskerQuartz::applyMask): added.
559         * kcanvas/device/quartz/KCanvasResourcesQuartz.mm:
560         (KCanvasContainerQuartz::paint): added mask support.
561         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
562         (KRenderingDeviceQuartz::createResource): added mask support.
563         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
564         (KRenderingPaintServerRadialGradientQuartz::draw):
565         * kcanvas/device/quartz/QuartzSupport.h:
566         * kcanvas/device/quartz/QuartzSupport.mm:
567         (debugDumpCGImageToFile): added, debug only.
568         (debugDumpCGLayerToFile): added, debug only.
569         (debugDumpCIImageToFile): added, debug only.
570         * ksvg2/css/SVGCSSStyleSelector.cpp:
571         (KDOM::CSSStyleSelector::applySVGProperty): added mask support.
572         * ksvg2/css/SVGRenderStyle.cpp:
573         (SVGRenderStyle::SVGRenderStyle): added mask support.
574         (SVGRenderStyle::operator==): added mask support.
575         * ksvg2/css/SVGRenderStyle.h:
576         * ksvg2/css/SVGRenderStyleDefs.cpp:
577         (StyleMaskData::StyleMaskData): added mask support.
578         (StyleMaskData::operator==): added mask support.
579         * ksvg2/css/SVGRenderStyleDefs.h:
580         (KSVG::StyleMaskData::operator!=): added mask support.
581         * ksvg2/ecma/Ecma.cpp:
582         (Ecma::inheritedGetDOMNode): added mask support.
583         * ksvg2/svg/SVGMaskElementImpl.cpp: Added.
584         (KSVG::SVGMaskElementImpl::SVGMaskElementImpl): added.
585         (KSVG::SVGMaskElementImpl::~SVGMaskElementImpl): added.
586         (KSVG::SVGMaskElementImpl::x): added.
587         (KSVG::SVGMaskElementImpl::y): added.
588         (KSVG::SVGMaskElementImpl::width): added.
589         (KSVG::SVGMaskElementImpl::height): added.
590         (KSVG::SVGMaskElementImpl::attributeChanged): added.
591         (KSVG::SVGMaskElementImpl::childrenChanged): added.
592         (KSVG::SVGMaskElementImpl::parseMappedAttribute): added.
593         (KSVG::SVGMaskElementImpl::drawMaskerContent): added.
594         (KSVG::SVGMaskElementImpl::createRenderer): added.
595         (KSVG::SVGMaskElementImpl::canvasResource): added.
596         * ksvg2/svg/SVGMaskElementImpl.h: Added.
597         (KSVG::SVGMaskElementImpl::isValid): added.
598         (KSVG::SVGMaskElementImpl::rendererIsNeeded): added.
599         * ksvg2/svg/svgtags.in: added <mask> support.
600
601 2006-01-04  Maciej Stachowiak  <mjs@apple.com>
602
603         Reviewed by Darin.
604
605         - move frame management and finding code from WebKit to WebCore
606         http://bugzilla.opendarwin.org/show_bug.cgi?id=6368
607
608         * WebCore.exp: export WebCoreFrameNamespace
609         * WebCore.xcodeproj/project.pbxproj: add new files
610         * kwq/KWQKHTMLPart.mm:
611         (KWQKHTMLPart::setName): Don't call to bridge any more, not needed
612         * kwq/WebCoreBridge.h:
613         * kwq/WebCoreBridge.mm:
614         (isCaseSensitiveEqual): helper function
615         (-[WebCoreBridge appendChild:]): remove excess braces
616         (-[WebCoreBridge childFrameNamed:]): moved here from WebFrame
617         (-[WebCoreBridge _deepLastChildFrame]): ditto
618         (-[WebCoreBridge nextFrameWithWrap:]): ditto
619         (-[WebCoreBridge previousFrameWithWrap:]): ditto
620         (-[WebCoreBridge setFrameNamespace:]): ditto
621         (-[WebCoreBridge frameNamespace]): ditto
622         (-[WebCoreBridge _shouldAllowAccessFrom:]): ditto
623         (-[WebCoreBridge _descendantFrameNamed:sourceFrame:]): ditto
624         (-[WebCoreBridge _frameInAnyWindowNamed:sourceFrame:]): ditto
625         (-[WebCoreBridge findFrameNamed:]): ditto
626         (-[WebCoreBridge setName:]): don't call KHTMLPart setName directly,
627         the kwq version is fine
628         (-[WebCoreBridge _addFramePathToString:]): moved from WebFrame
629         (-[WebCoreBridge generateFrameName]): ditto
630
631 2006-01-04  Anders Carlsson  <andersca@mac.com>
632
633         Reviewed by Eric.
634
635         Based on a patch by Eric.
636         
637         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6180
638         "text" output in fragment produced by XSLTProccessor is wrong (has xhtml garbage)
639         
640         * khtml/xsl/xslt_processorimpl.cpp:
641         (DOM::xsltParamArrayFromParameterMap):
642         (DOM::freeXsltParamArray):
643         Use fastMalloc/fastFree.
644         
645         (DOM::createFragmentFromSource):
646         If the output is "text", just create a text node and add
647         it to the fragment.
648
649 2006-01-04  Geoffrey Garen  <ggaren@apple.com>
650
651         Reviewed by darin.
652
653         - Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=6311
654         document.plugins doesn't exist
655
656         * khtml/ecma/kjs_html.cpp: Added 'plugins' as synonym for 'embeds'
657
658 2006-01-04  Geoffrey Garen  <ggaren@apple.com>
659  
660          Reviewed by darin.
661  
662          - Fixed <rdar://problem/4214080> document.embeds: embeds[0].Play() 
663          undefined at languageguide.org prevents audio playing on mouseover
664  
665          - Layout test: fast/dom/object-embed-plugin-scripting.html
666  
667          A common idiom the kids like to use these days for plugins is to nest 
668          an <embed> inside an <object>, and assume that IE will honor the first,
669          Mozilla the second. We happen to honor both, but the rules dictate that
670          only the outer <object> gets a plugin/renderer. (A plugin is a 
671         renderer.) This is a problem because sites ID us as Mozilla and 
672         therefore attempt to script their plugins through the <embed>, which 
673         has no plugin/renderer. The fix here is to have an <embed> return its 
674         parent node's plugin/renderer when queried, if and only if it has no 
675         renderer of its own and its parent node is an <object>. We may decide
676         to restrict this further in the future.
677
678         One happy consequence of this patch is that all the apple.com Quicktime
679         websites we had previously broken with TOT are now fixed. 
680
681         * khtml/html/html_objectimpl.cpp:
682         (DOM::HTMLEmbedElementImpl::getEmbedInstance): The "if (!r)" clause 
683         implements the logic I just described. The code below it I changed 
684         just for style, to match the style in getObjectInstance().
685
686         (DOM::HTMLEmbedElementImpl::rendererIsNeeded): Assert that an <object>
687         parent has a renderer because we're going to use it later.
688
689         (DOM::HTMLObjectElementImpl::rendererIsNeeded): Changed to match style 
690         of HTMLEmbedElementImpl counterpart.
691
692 2006-01-04  Mitz Pettel  <opendarwin.org@mitzpettel.com>
693
694         Reviewed by Darin, landed by ap.
695         
696         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6301
697           REGRESSION: Border repaint glitch
698
699         * khtml/rendering/render_object.cpp:
700         (RenderObject::repaintAfterLayoutIfNeeded): Repaint parts of the
701         border that moved.
702         * manual-tests/border-repaint-glitch.html: Added.
703
704 2005-12-30  Kimmo Kinnunen  <kimmo.kinnunen@nokia.com>
705
706         Reviewed by eseidel.
707
708         Changed use of QRect to QRectF in the points where SVG can have
709         fractional numbers
710         http://bugzilla.opendarwin.org/show_bug.cgi?id=4462
711
712         Added test cases:
713         * svg/custom/fractional-rects.svg: copy of rounded-rects.svg with
714         fractional coordinates.
715
716         * WebCore.xcodeproj/project.pbxproj:
717         * kwq/KWQWMatrix.h:
718         * kwq/KWQWMatrix.mm:
719         (QWMatrix::mapRect): mapRect for QRectF
720         * kwq/KWQRectF.h:
721         * kwq/KWQRectF.mm:  Added. QRectF impl
722         * kwq/KWQSizeF.h:
723         * kwq/KWQSizeF.mm:  Added.QSizeF impl
724         * kwq/KWQPointF.h:
725         * kwq/KWQPointF.mm: Added. QPointF impl
726         * kcanvas/KCanvasContainer.cpp:
727         (KCanvasContainer::fillContains):
728         (KCanvasContainer::strokeContains):
729         (KCanvasContainer::relativeBBox):
730         (KCanvasContainer::getAspectRatio): QRect -> QRectF
731         * kcanvas/KCanvasContainer.h:
732         * kcanvas/KCanvasFilters.cpp:
733         (KCanvasFilterEffect::subRegion):
734         (KCanvasFilterEffect::setSubRegion): QRect -> QRectF
735         * kcanvas/KCanvasFilters.h:
736         (KCanvasFilter::filterRect):
737         (KCanvasFilter::setFilterRect): QRect -> QRectF
738         (KCanvasFEConvolveMatrix::kernelSize):
739         (KCanvasFEConvolveMatrix::setKernelSize):
740         (KCanvasFEConvolveMatrix::targetOffset):
741         (KCanvasFEConvolveMatrix::setTargetOffset): QSize -> QSizeF
742         * kcanvas/KCanvasItem.cpp:
743         (RenderPath::fillContains):
744         (RenderPath::strokeContains):
745         (RenderPath::relativeBBox): QRect -> QRectF
746         * kcanvas/KCanvasItem.h:
747         * kcanvas/KCanvasResources.cpp:
748         (KCanvasMarker::draw): QRect -> QRectF
749         * kcanvas/KCanvasResources.h:
750         * kcanvas/KCanvasTreeDebug.cpp:
751         (hasFractions): helper function
752         (operator<<): QSizeF operator, QRectF operator
753         * kcanvas/KCanvasTreeDebug.h:
754         * kcanvas/device/KRenderingPaintServerGradient.cpp:
755         (KRenderingPaintServerLinearGradient::gradientStart):
756         (KRenderingPaintServerLinearGradient::setGradientStart):
757         (KRenderingPaintServerLinearGradient::gradientEnd):
758         (KRenderingPaintServerLinearGradient::setGradientEnd):
759         (KRenderingPaintServerRadialGradient::gradientCenter):
760         (KRenderingPaintServerRadialGradient::setGradientCenter):
761         (KRenderingPaintServerRadialGradient::gradientFocal):
762         (KRenderingPaintServerRadialGradient::setGradientFocal): QPoint -> QPointF
763         * kcanvas/device/KRenderingPaintServerGradient.h:
764         * kcanvas/device/KRenderingPaintServerPattern.cpp:
765         (KRenderingPaintServerPattern::Private::Private): x, y, width, height -> QRectF
766         (KRenderingPaintServerPattern::setBbox): replaced get/set methods
767         (KRenderingPaintServerPattern::bbox): replaced get/set methods
768         (KRenderingPaintServerPattern::externalRepresentation):
769         * kcanvas/device/KRenderingPaintServerPattern.h:
770         * kcanvas/device/quartz/KCanvasFilterQuartz.h:
771         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
772         (KCanvasFilterQuartz::prepareFilter):
773         (KCanvasFilterQuartz::applyFilter): QRect -> QRectF
774         * kcanvas/device/quartz/KCanvasItemQuartz.h:
775         (KCanvasItemQuartz::getAbsoluteRepaintRect): QRect -> QRectF
776         * kcanvas/device/quartz/KCanvasItemQuartz.mm:
777         (drawMarkerWithData):
778         (KCanvasItemQuartz::drawMarkersIfNeeded):
779         (KCanvasItemQuartz::paint): QRect -> QRectF
780         (KCanvasItemQuartz::nodeAtPoint): QPoint -> QPointF
781         (KCanvasItemQuartz::bboxForPath) :QRect -> QRectF
782         (KCanvasItemQuartz::hitsPath):
783         * kcanvas/device/quartz/KCanvasResourcesQuartz.h:
784         (KCanvasContainerQuartz::getAbsoluteRepaintRect): QRect -> QRectF
785         * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
786         (KRenderingPaintServerPatternQuartz::draw): QRect -> QRectF
787         * khtml/rendering/render_object.h:
788         (khtml::RenderObject::relativeBBox):QRect -> QRectF
789         * ksvg2/svg/SVGFilterElementImpl.cpp:
790         (SVGFilterElementImpl::canvasResource): QRect -> QRectF
791         * ksvg2/svg/SVGFilterPrimitiveStandardAttributesImpl.cpp:
792         (SVGFilterPrimitiveStandardAttributesImpl::setStandardAttributes):
793         * ksvg2/svg/SVGLengthImpl.cpp:
794         (SVGLengthImpl::value): QRect -> QRectF
795         * ksvg2/svg/SVGLinearGradientElementImpl.cpp:
796         (SVGLinearGradientElementImpl::buildGradient): QPoint -> QPointF, removed integer conversions
797         * ksvg2/svg/SVGLocatableImpl.cpp:
798         (SVGLocatableImpl::getBBox): Rect -> QRectF
799         * ksvg2/svg/SVGPatternElementImpl.cpp:
800         (SVGPatternElementImpl::drawPatternContentIntoTile): QRect -> QRectF
801         * ksvg2/svg/SVGRadialGradientElementImpl.cpp:
802         (SVGRadialGradientElementImpl::buildGradient): QPoint -> QPointF, removed integer conversions
803         * ksvg2/svg/SVGSVGElementImpl.cpp:
804         (SVGSVGElementImpl::checkIntersection): QRect -> QRectF, removed integer conversions
805         (SVGSVGElementImpl::checkEnclosure): QRect -> QRectF, removed integer conversions
806
807 2006-01-03  Maciej Stachowiak  <mjs@apple.com>
808
809         Reviewed by Vicki.
810
811         - moved frame traversal code across from bridge, also dropped the children
812         array
813
814         * kwq/WebCoreBridge.h:
815         * kwq/WebCoreBridge.mm:
816         (-[WebCoreBridge firstChild]): Moved from WebBridge. Use new _firstChild
817         pointer.
818         (-[WebCoreBridge lastChild]): Moved from WebBridge. Use new _lastChild pointer.
819         (-[WebCoreBridge childCount]): Moved from WebBridge. Use _childCount variable.
820         (-[WebCoreBridge previousSibling]): Moved from WebBridge.
821         (-[WebCoreBridge nextSibling]): ditt
822         (-[WebCoreBridge isDescendantOfFrame:]): ditto
823         (-[WebCoreBridge traverseNextFrameStayWithin:]): ditto
824         (-[WebCoreBridge appendChild:]): Moved from WebBridge, maintain count and first/last
825         pointers.
826         (-[WebCoreBridge removeChild:]): Moved from WebBridge, maintain count and first/last
827         pointers.
828
829 2006-01-03  Justin Garcia  <justin.garcia@apple.com>
830
831         Reviewed by harrison
832
833         <http://bugzilla.opendarwin.org/show_bug.cgi?id=4609>
834         window.getSelection().toString() is undefined (range object 
835         returned from window.getSelection() is useless)
836
837         toString was defined as a method on the JS Selection object, 
838         but it didn't return anything.
839
840         Added layout test:
841         * editing/selection/toString.html
842
843         * khtml/ecma/kjs_window.cpp:
844         (KJS::SelectionFunc::callAsFunction):
845
846 2006-01-03  Geoffrey Garen  <ggaren@apple.com>
847
848         Reviewed by timo.
849
850         - Fixed: http://bugzilla.opendarwin.org/show_bug.cgi?id=6318
851         REGRESSION: Repro crash in JS called from Flash on bdash.net.nz
852
853         Since we clear all the plugin data structures in setView, we need to
854         clear the windowScriptObject as well. I had already done this in my
855         previous patch, but I didn't realize there are two windowScriptObjects 
856         -- one for Netscape PlugIns, and one for WebKit PlugIns.
857
858         * kwq/KWQKHTMLPart.mm:
859         (KWQKHTMLPart::setView): Clear the Netscape PlugIn windowScriptObject
860         as well.
861
862 2006-01-03  Anders Carlsson  <andersca@mac.com>
863
864         Reviewed by Eric.
865
866         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6358
867         JS objects missing "prototype" properties
868         
869         * khtml/ecma/XSLTProcessor.cpp:
870         (KJS::XSLTProcessorConstructorImp::XSLTProcessorConstructorImp):
871         * khtml/ecma/XSLTProcessor.h:
872         * khtml/ecma/domparser.cpp:
873         (KJS::DOMParserConstructorImp::DOMParserConstructorImp):
874         * khtml/ecma/xmlhttprequest.cpp:
875         (KJS::XMLHttpRequestConstructorImp::XMLHttpRequestConstructorImp):
876         * khtml/ecma/xmlserializer.cpp:
877         (KJS::XMLSerializerConstructorImp::XMLSerializerConstructorImp):
878         Add "prototype" property in constructors.
879
880 2006-01-03  Eric Seidel  <eseidel@apple.com>
881
882         Reviewed by darin.
883
884         REGRESSION: repro crash w/ invalid charset attribute on <script>
885         http://bugzilla.opendarwin.org/show_bug.cgi?id=6345
886         I also made some small spacing cleanup here.
887         I did *not* fix the usage in formData, as the move from KCharSet to
888         QTextCodec actually fixed a bug whereby if the first listed charset
889         in accept-charsets was invalid, we would assume latin1 instead of
890         checking for the next valid one before assuming system encoding.
891
892         * khtml/html/html_formimpl.cpp:
893         (DOM::HTMLFormElementImpl::formData): cleanup
894         * khtml/misc/loader.cpp:
895         (CachedCSSStyleSheet::CachedCSSStyleSheet): null check
896         (CachedScript::CachedScript): cleanup
897         (CachedXSLStyleSheet::CachedXSLStyleSheet): null check
898         (CachedXBLDocument::CachedXBLDocument): cleanup
899
900 2006-01-03  Justin Garcia  <justin.garcia@apple.com>
901
902         <http://bugzilla.opendarwin.org/show_bug.cgi?id=4904>
903         Bug with baseOffset and extentOffset in selections (for writely.com)
904         <rdar://problem/4259818>
905         selection object incorrect after double-clicking a word
906         
907         Reviewed by harrison
908
909         Changed the Selection object's anchor/focus properties to match 
910         Mozilla's Selection object API, added getRangeAt and outlined the 
911         rest of the API.
912         Cleaned up the JS Selection object (to do less work in the DOM binding).
913         Added an updateLayout call to VisiblePosition::init and removed some 
914         updateLayout calls from other parts of the editing code.
915         
916         Added layout tests:
917         * editing/selection/getRangeAt.html
918         * editing/selection/anchor-focus1.html
919         * editing/selection/anchor-focus2.html
920         * editing/selection/anchor-focus3.html
921         Updated expected results:
922         * editing/selection/unrendered-001-expected.txt
923
924         * khtml/ecma/kjs_window.cpp:
925         (KJS::Selection::getValueProperty):
926         (KJS::Selection::toString):
927         (KJS::SelectionFunc::callAsFunction):
928         * khtml/ecma/kjs_window.h:
929         (KJS::Selection::):
930         * khtml/editing/SelectionController.cpp:
931         (khtml::SelectionController::modify):
932         (khtml::SelectionController::type):
933         (khtml::SelectionController::toString):
934         (khtml::SelectionController::getRangeAt):
935         (khtml::SelectionController::setBaseAndExtent):
936         (khtml::SelectionController::setPosition):
937         (khtml::SelectionController::collapse):
938         (khtml::SelectionController::collapseToEnd):
939         (khtml::SelectionController::collapseToStart):
940         (khtml::SelectionController::empty):
941         (khtml::SelectionController::extend):
942         (khtml::SelectionController::validate):
943         * khtml/editing/SelectionController.h:
944         (khtml::SelectionController::part):
945         (khtml::SelectionController::baseNode):
946         (khtml::SelectionController::extentNode):
947         (khtml::SelectionController::baseOffset):
948         (khtml::SelectionController::extentOffset):
949         (khtml::SelectionController::anchorNode):
950         (khtml::SelectionController::anchorOffset):
951         (khtml::SelectionController::focusNode):
952         (khtml::SelectionController::focusOffset):
953         (khtml::SelectionController::isCollapsed):
954         * khtml/editing/visible_position.cpp:
955         (khtml::VisiblePosition::init):
956         (khtml::VisiblePosition::isCandidate):
957         * khtml/khtml_part.cpp:
958         (KHTMLPart::handleMousePressEventSingleClick):
959
960 2006-01-03  Anders Carlsson  <andersca@mac.com>
961
962         Reviewed by Maciej.
963
964         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5378
965         createDocument fails with DOM Exception 5 when passed empty qname
966         
967         * khtml/ecma/kjs_dom.cpp:
968         (KJS::DOMDOMImplementationProtoFunc::callAsFunction):
969         When passing null to createDocument, pass a null DOMString, and not
970         a DOMString containing the text "null".
971         
972         * khtml/xml/dom_docimpl.cpp:
973         (DOMImplementationImpl::createDocument):
974         Only validate the qualifiedName if it's not null or empty. Also, do not
975         create the document element if the qualifiedName is null or empty.
976
977 2006-01-03  Eric Seidel  <eseidel@apple.com>
978
979         Reviewed by darin.
980
981         No functionality changes, no tests possible.
982
983         khtml/editing should use RefPtr instead of manual ref/deref
984         http://bugzilla.opendarwin.org/show_bug.cgi?id=6109
985
986         Results in a slight performance gain < 1% on the PLT.
987
988         * khtml/editing/SelectionController.cpp:
989         (khtml::SelectionController::toRange):
990         * khtml/editing/SelectionController.h:
991         * khtml/editing/append_node_command.cpp:
992         (khtml::AppendNodeCommand::AppendNodeCommand):
993         (khtml::AppendNodeCommand::doApply):
994         (khtml::AppendNodeCommand::doUnapply):
995         * khtml/editing/append_node_command.h:
996         (khtml::AppendNodeCommand::~AppendNodeCommand):
997         (khtml::AppendNodeCommand::appendChild):
998         (khtml::AppendNodeCommand::parentNode):
999         * khtml/editing/apply_style_command.cpp:
1000         (khtml::StyleChange::init):
1001         (khtml::ApplyStyleCommand::removeInlineStyle):
1002         * khtml/editing/apply_style_command.h:
1003         * khtml/editing/composite_edit_command.cpp:
1004         (khtml::CompositeEditCommand::deleteInsignificantText):
1005         * khtml/editing/delete_from_text_node_command.cpp:
1006         (khtml::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand):
1007         * khtml/editing/delete_from_text_node_command.h:
1008         (khtml::DeleteFromTextNodeCommand::~DeleteFromTextNodeCommand):
1009         (khtml::DeleteFromTextNodeCommand::node):
1010         * khtml/editing/delete_selection_command.cpp:
1011         (khtml::DeleteSelectionCommand::initializePositionData):
1012         (khtml::DeleteSelectionCommand::saveTypingStyleState):
1013         (khtml::DeleteSelectionCommand::handleGeneralDelete):
1014         (khtml::DeleteSelectionCommand::calculateEndingPosition):
1015         (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
1016         (khtml::DeleteSelectionCommand::clearTransientState):
1017         * khtml/editing/delete_selection_command.h:
1018         * khtml/editing/edit_command.cpp:
1019         (khtml::EditCommand::EditCommand):
1020         (khtml::EditCommand::~EditCommand):
1021         (khtml::EditCommand::setTypingStyle):
1022         (khtml::EditCommand::styleAtPosition):
1023         * khtml/editing/edit_command.h:
1024         (khtml::EditCommand::document):
1025         (khtml::EditCommand::typingStyle):
1026         * khtml/editing/insert_into_text_node_command.cpp:
1027         (khtml::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
1028         * khtml/editing/insert_into_text_node_command.h:
1029         (khtml::InsertIntoTextNodeCommand::~InsertIntoTextNodeCommand):
1030         (khtml::InsertIntoTextNodeCommand::node):
1031         * khtml/editing/insert_node_before_command.cpp:
1032         (khtml::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
1033         (khtml::InsertNodeBeforeCommand::doApply):
1034         (khtml::InsertNodeBeforeCommand::doUnapply):
1035         * khtml/editing/insert_node_before_command.h:
1036         (khtml::InsertNodeBeforeCommand::~InsertNodeBeforeCommand):
1037         (khtml::InsertNodeBeforeCommand::insertChild):
1038         (khtml::InsertNodeBeforeCommand::refChild):
1039         * khtml/editing/insert_paragraph_separator_command.cpp:
1040         (khtml::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand):
1041         (khtml::InsertParagraphSeparatorCommand::~InsertParagraphSeparatorCommand):
1042         (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion):
1043         (khtml::InsertParagraphSeparatorCommand::applyStyleAfterInsertion):
1044         * khtml/editing/insert_paragraph_separator_command.h:
1045         * khtml/editing/join_text_nodes_command.cpp:
1046         (khtml::JoinTextNodesCommand::JoinTextNodesCommand):
1047         (khtml::JoinTextNodesCommand::doApply):
1048         (khtml::JoinTextNodesCommand::doUnapply):
1049         * khtml/editing/join_text_nodes_command.h:
1050         (khtml::JoinTextNodesCommand::~JoinTextNodesCommand):
1051         (khtml::JoinTextNodesCommand::firstNode):
1052         (khtml::JoinTextNodesCommand::secondNode):
1053         * khtml/editing/jsediting.cpp:
1054         * khtml/editing/markup.cpp:
1055         (khtml::createMarkup):
1056         (khtml::createFragmentFromMarkup):
1057         (khtml::createFragmentFromText):
1058         (khtml::createFragmentFromNodeList):
1059         * khtml/editing/markup.h:
1060         * khtml/editing/merge_identical_elements_command.cpp:
1061         (khtml::MergeIdenticalElementsCommand::MergeIdenticalElementsCommand):
1062         (khtml::MergeIdenticalElementsCommand::doApply):
1063         (khtml::MergeIdenticalElementsCommand::doUnapply):
1064         * khtml/editing/merge_identical_elements_command.h:
1065         (khtml::MergeIdenticalElementsCommand::~MergeIdenticalElementsCommand):
1066         * khtml/editing/move_selection_command.cpp:
1067         (khtml::MoveSelectionCommand::MoveSelectionCommand):
1068         (khtml::MoveSelectionCommand::~MoveSelectionCommand):
1069         (khtml::MoveSelectionCommand::doApply):
1070         * khtml/editing/move_selection_command.h:
1071         * khtml/editing/rebalance_whitespace_command.cpp:
1072         * khtml/editing/rebalance_whitespace_command.h:
1073         (khtml::RebalanceWhitespaceCommand::~RebalanceWhitespaceCommand):
1074         * khtml/editing/remove_css_property_command.cpp:
1075         (khtml::RemoveCSSPropertyCommand::RemoveCSSPropertyCommand):
1076         * khtml/editing/remove_css_property_command.h:
1077         (khtml::RemoveCSSPropertyCommand::~RemoveCSSPropertyCommand):
1078         (khtml::RemoveCSSPropertyCommand::styleDeclaration):
1079         * khtml/editing/remove_node_attribute_command.cpp:
1080         (khtml::RemoveNodeAttributeCommand::RemoveNodeAttributeCommand):
1081         * khtml/editing/remove_node_attribute_command.h:
1082         (khtml::RemoveNodeAttributeCommand::~RemoveNodeAttributeCommand):
1083         (khtml::RemoveNodeAttributeCommand::element):
1084         * khtml/editing/remove_node_command.cpp:
1085         (khtml::RemoveNodeCommand::RemoveNodeCommand):
1086         (khtml::RemoveNodeCommand::doApply):
1087         (khtml::RemoveNodeCommand::doUnapply):
1088         * khtml/editing/remove_node_command.h:
1089         (khtml::RemoveNodeCommand::~RemoveNodeCommand):
1090         (khtml::RemoveNodeCommand::node):
1091         * khtml/editing/remove_node_preserving_children_command.cpp:
1092         (khtml::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand):
1093         * khtml/editing/remove_node_preserving_children_command.h:
1094         (khtml::RemoveNodePreservingChildrenCommand::~RemoveNodePreservingChildrenCommand):
1095         (khtml::RemoveNodePreservingChildrenCommand::node):
1096         * khtml/editing/replace_selection_command.cpp:
1097         (khtml::ReplacementFragment::ReplacementFragment):
1098         (khtml::ReplacementFragment::~ReplacementFragment):
1099         (khtml::ReplacementFragment::enclosingBlock):
1100         (khtml::ReplacementFragment::removeNodePreservingChildren):
1101         (khtml::ReplacementFragment::removeNode):
1102         (khtml::ReplacementFragment::insertFragmentForTestRendering):
1103         (khtml::ReplacementFragment::restoreTestRenderingNodesToFragment):
1104         (khtml::ReplaceSelectionCommand::fixupNodeStyles):
1105         (khtml::computeAndStoreNodeDesiredStyle):
1106         (khtml::NodeDesiredStyle::NodeDesiredStyle):
1107         (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand):
1108         (khtml::ReplaceSelectionCommand::~ReplaceSelectionCommand):
1109         (khtml::ReplaceSelectionCommand::doApply):
1110         (khtml::ReplaceSelectionCommand::completeHTMLReplacement):
1111         (khtml::ReplaceSelectionCommand::updateNodesInserted):
1112         * khtml/editing/replace_selection_command.h:
1113         (khtml::NodeDesiredStyle::node):
1114         (khtml::NodeDesiredStyle::style):
1115         (khtml::ReplacementFragment::root):
1116         * khtml/editing/set_node_attribute_command.cpp:
1117         (khtml::SetNodeAttributeCommand::SetNodeAttributeCommand):
1118         * khtml/editing/set_node_attribute_command.h:
1119         (khtml::SetNodeAttributeCommand::~SetNodeAttributeCommand):
1120         (khtml::SetNodeAttributeCommand::element):
1121         * khtml/editing/split_element_command.cpp:
1122         (khtml::SplitElementCommand::SplitElementCommand):
1123         (khtml::SplitElementCommand::doApply):
1124         (khtml::SplitElementCommand::doUnapply):
1125         * khtml/editing/split_element_command.h:
1126         (khtml::SplitElementCommand::~SplitElementCommand):
1127         * khtml/editing/split_text_node_command.cpp:
1128         (khtml::SplitTextNodeCommand::SplitTextNodeCommand):
1129         (khtml::SplitTextNodeCommand::doApply):
1130         (khtml::SplitTextNodeCommand::doUnapply):
1131         * khtml/editing/split_text_node_command.h:
1132         (khtml::SplitTextNodeCommand::~SplitTextNodeCommand):
1133         (khtml::SplitTextNodeCommand::node):
1134         * khtml/editing/split_text_node_containing_element.cpp:
1135         (khtml::SplitTextNodeContainingElementCommand::SplitTextNodeContainingElementCommand):
1136         (khtml::SplitTextNodeContainingElementCommand::doApply):
1137         * khtml/editing/split_text_node_containing_element_command.h:
1138         (khtml::SplitTextNodeContainingElementCommand::~SplitTextNodeContainingElementCommand):
1139         * khtml/editing/visible_position.cpp:
1140         (khtml::makeRange):
1141         * khtml/editing/visible_position.h:
1142         * khtml/editing/visible_text.cpp:
1143         (khtml::TextIterator::range):
1144         (khtml::SimplifiedBackwardsTextIterator::range):
1145         (khtml::CharacterIterator::range):
1146         (khtml::findPlainText):
1147         * khtml/editing/visible_text.h:
1148         (khtml::WordAwareIterator::range):
1149         * khtml/editing/wrap_contents_in_dummy_span_command.cpp:
1150         (khtml::WrapContentsInDummySpanCommand::WrapContentsInDummySpanCommand):
1151         (khtml::WrapContentsInDummySpanCommand::doApply):
1152         (khtml::WrapContentsInDummySpanCommand::doUnapply):
1153         * khtml/editing/wrap_contents_in_dummy_span_command.h:
1154         (khtml::WrapContentsInDummySpanCommand::~WrapContentsInDummySpanCommand):
1155         * kwq/DOMHTML.mm:
1156         (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]):
1157         (-[DOMHTMLDocument _createDocumentFragmentWithText:]):
1158         * kwq/WebCoreBridge.mm:
1159         (-[WebCoreBridge documentFragmentWithMarkupString:baseURLString:]):
1160         (-[WebCoreBridge documentFragmentWithText:]):
1161         (-[WebCoreBridge documentFragmentWithNodesAsParagraphs:]):
1162
1163 2006-01-03  Anders Carlsson  <andersca@mac.com>
1164
1165         Reviewed by Darin.
1166
1167         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5177
1168         Javascript cloneNode(deep) does not clone form elements correctly
1169
1170         * khtml/html/html_elementimpl.cpp:
1171         (HTMLElementImpl::cloneNode):
1172         Call copyNonAttributeProperties on the new node.
1173         
1174         * khtml/html/html_formimpl.cpp:
1175         (DOM::HTMLInputElementImpl::copyNonAttributeProperties):
1176         * khtml/html/html_formimpl.h:
1177         Copy m_value, m_checked and m_indeterminate here.
1178         
1179         * khtml/xml/dom_docimpl.cpp:
1180         (DocumentImpl::importNode):
1181         Call copyNonAttributeProperties on the new node.
1182         
1183         * khtml/xml/dom_elementimpl.cpp:
1184         (ElementImpl::cloneNode):
1185         Call copyNonAttributeProperties on the new node.
1186         
1187         * khtml/xml/dom_elementimpl.h:
1188         (DOM::ElementImpl::copyNonAttributeProperties):
1189         Add function declaration.
1190
1191 2006-01-02  Maciej Stachowiak  <mjs@apple.com>
1192
1193         Rubber stamped by Eric.
1194
1195         - remove the no longer used QIntDict
1196
1197         * kwq/KWQIntDict.h: Removed.
1198
1199 2006-01-03  Alexey Proskuryakov  <ap@nypop.com>
1200
1201         Reviewed by Eric.
1202
1203         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5609
1204           XSLT document() doesn't handle relative paths
1205
1206         Test case: fast/xsl/xslt-relative-path.xml
1207
1208         * khtml/xsl/xslt_processorimpl.cpp:
1209         (DOM::docLoaderFunc): Renamed from stylesheetLoadFunc. Use base URL when constructing URLs.
1210         (DOM::XSLTProcessorImpl::transformToString):
1211
1212 2006-01-02  Vicki Murley  <vicki@apple.com>
1213
1214         Reviewed by Maciej.
1215  
1216         - fix for <rdar://problem/4389622> *Pan EU2* iframe swallows events for overlapping elements (part 2)
1217
1218         We originally added a call to passSubframeEventToSubframe here to fix the hand cursor updating problem
1219         reported in <rdar://problem/4316201> REGRESSION: cursor and text in status bar is not updated when 
1220         mousing over links in a frame (5509). However, when we return early after passSubframeEventToSubframe,
1221         we fail to fire onmouseout events.  Since the call to passSubframeEventToSubframe was originally added
1222         to fix the hand cursor updating problem, remove the early return and make cursor updating conditional
1223         on passSubframeEventToSubframe.
1224
1225         * khtml/khtmlview.cpp:
1226         (KHTMLView::viewportMouseMoveEvent):
1227
1228 2005-12-30  Darin Adler  <darin@apple.com>
1229
1230         Reviewed by Maciej.
1231
1232         - http://bugzilla.opendarwin.org/show_bug.cgi?id=4557
1233           rename unusual strcmp and strcasecmp for DOMString family
1234
1235         Added new functions named equal and equalIgnoringCase.
1236
1237         * khtml/xml/dom_stringimpl.h: Changed the type of the length parameter to computeHash to unsigned
1238         to match the rest of the interface. Added equal and equalIgnoringCase functions. Added a
1239         version of the hash function that works on char* to CaseInsensitiveHash as preparation for an
1240         atomic string change.
1241         * khtml/xml/dom_stringimpl.cpp: Moved the QT_ALLOC_QCHAR_VEC and QT_DELETE_QCHAR_VEC macros
1242         here, and changed them into inline functions.
1243         (DOM::equal): Implemented.
1244         (DOM::equalIgnoringCase): Implemented.
1245         (DOM::DOMStringImpl::computeHash): Changed parameter type to unsigned to match other similar
1246         functions.
1247
1248         * khtml/dom/dom_string.h: Removed unnecessary friend declarations. Changed operator
1249         overloads for == and != to call through inline to DOMStringImpl. Replaced strcasecmp
1250         with equalIgnoringCase, overloaded for one more combination of parameters. Removed strcmp.
1251         * khtml/dom/dom_string.cpp: Removed functions that are now implemented in DOMStringImpl*.
1252
1253         * khtml/xml/dom_atomicstring.h: Removed a redundant const. Removed unnecessary
1254         friend declarations. Removed AtomicString::equal. Filled out a larger set of == and
1255         != operator implementations, mostly with inlines calling through to DOMStringImpl.
1256         Renamed equalsIgnoreCase to equalIgnoringCase and filled out a larger set as above.
1257         * khtml/xml/dom_atomicstring.cpp: Renamed AtomicString::equal to just ==.
1258         Removed some implementation of == and equalsIgnoreCase that are replaced by inlines.
1259
1260         * khtml/html/html_listimpl.cpp:
1261         (DOM::HTMLOListElementImpl::parseMappedAttribute):
1262         (DOM::HTMLLIElementImpl::parseMappedAttribute):
1263         Use the "==" operator instead of strcmp.
1264
1265         * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector):
1266         Use equalIgnoringCase instead of equalsIgnoreCase.
1267
1268         * khtml/rendering/render_form.cpp:
1269         (RenderSlider::updateFromElement): Fixed bug where a temporary DOMString was put into
1270         a const DOMString&. Changed some DOMString to AtomicString as appropriate, and also
1271         used equalIgnoringCase instead of strcasecmp.
1272         (RenderSlider::slotSliderValueChanged): More of the same.
1273
1274         * khtml/xml/dom_docimpl.cpp: (DocumentImpl::processHttpEquiv): Replaced use of strcasecmp
1275         with equalIgnoringCase. Added parentheses to fix incorrect operator precedence in one case
1276         (&& binds tighter than ||) which fixes a crash when using a http-equiv pragma when there
1277         is no part (not sure how to reproduce that).
1278
1279         * khtml/khtml_part.cpp:
1280         (updateState):
1281         (KHTMLPart::selectionStartHasStyle):
1282         * khtml/ecma/kjs_html.cpp: (KJS::KJS::HTMLDocument::putValueProperty):
1283         * khtml/editing/apply_style_command.cpp:
1284         (khtml::StyleChange::checkForLegacyHTMLStyleChange):
1285         (khtml::StyleChange::currentlyHasStyle):
1286         (khtml::hasTextDecorationProperty):
1287         (khtml::ApplyStyleCommand::extractTextDecorationStyle):
1288         (khtml::ApplyStyleCommand::extractAndNegateTextDecorationStyle):
1289         * khtml/html/html_baseimpl.cpp:
1290         (HTMLBodyElementImpl::parseMappedAttribute):
1291         (HTMLFrameElementImpl::parseMappedAttribute):
1292         * khtml/html/html_blockimpl.cpp:
1293         (HTMLDivElementImpl::parseMappedAttribute):
1294         (HTMLHRElementImpl::parseMappedAttribute):
1295         (HTMLParagraphElementImpl::parseMappedAttribute):
1296         (HTMLMarqueeElementImpl::parseMappedAttribute):
1297         * khtml/html/html_elementimpl.cpp:
1298         (HTMLElementImpl::parseMappedAttribute):
1299         (HTMLElementImpl::addHTMLAlignment):
1300         (HTMLElementImpl::setContentEditable):
1301         * khtml/html/html_formimpl.cpp:
1302         (DOM::HTMLFormElementImpl::parseMappedAttribute):
1303         (DOM::HTMLButtonElementImpl::parseMappedAttribute):
1304         (DOM::HTMLInputElementImpl::setInputType):
1305         (DOM::HTMLInputElementImpl::parseMappedAttribute):
1306         (DOM::HTMLKeygenElementImpl::appendFormData):
1307         (DOM::HTMLTextAreaElementImpl::parseMappedAttribute):
1308         * khtml/html/html_imageimpl.cpp: (DOM::HTMLAreaElementImpl::parseMappedAttribute):
1309         * khtml/html/html_inlineimpl.cpp: (DOM::HTMLBRElementImpl::parseMappedAttribute):
1310         * khtml/html/html_tableimpl.cpp: (DOM::HTMLTablePartElementImpl::parseMappedAttribute):
1311         * khtml/html/htmlparser.cpp: (HTMLParser::handleError):
1312         Use equalIgnoringCase instead of strcasecmp.
1313
1314 2005-12-30  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1315
1316         Reviewed by Darin, landed by ap.
1317         
1318         Test: fast/text/justified-text-rect.html
1319         
1320         - WebCore part of fix for
1321           http://bugzilla.opendarwin.org/show_bug.cgi?id=5461
1322           Text width measured incorrectly when text-align: justify
1323
1324         * khtml/rendering/font.h:
1325         * khtml/rendering/font.cpp:
1326         (khtml::Font::selectionRectForText): Added.
1327         * khtml/rendering/render_text.cpp:
1328         (kthml::InlineTextBox::selectionRect): Use selectionRectForText. This
1329         works for justified text as well, and avoids intermediate rounding which
1330         resulted in selection rects narrower than AppKit's.
1331         (khtml::InlineTextBox::positionForOffset): Use selectionRectForText,
1332         which works for justified text as well.
1333         * kwq/KWQFontMetrics.h:
1334         * kwq/KWQFontMetrics.mm:
1335         (QFontMetrics::selectionRectForText): Added.
1336         * kwq/WebCoreTextRenderer.h:
1337
1338 2005-12-30  Alexey Proskuryakov  <ap@nypop.com>
1339
1340         - Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6289
1341         REGRESSION: firstCharacterForRange(0, 0) returns a 0x0 rect
1342
1343         * khtml/editing/visible_text.cpp:
1344         (khtml::TextIterator::rangeFromLocationAndLength):
1345         Only special-case (0, 0) ranges for empty documents.
1346
1347 2005-12-30  Geoffrey Garen  <ggaren@apple.com>
1348
1349         Added test case for <rdar://problem/4268278> Submitting a form in onUnload event
1350         handler causes crash in -[WebDataSource(WebPrivate) _commitIfReady:]
1351
1352         * manual-tests/onunload-form-submit-crash.html: Added.
1353
1354 2005-12-30  Anders Carlsson  <andersca@mac.com>
1355
1356         Reviewed by Eric.
1357
1358         - Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6297
1359         XMLSerializer should use createMarkup.
1360
1361         * khtml/ecma/xmlserializer.cpp:
1362         (KJS::XMLSerializerProtoFunc::callAsFunction):
1363         Use createMarkup instead of NodeImpl::toString.
1364
1365         * khtml/editing/markup.cpp:
1366         (khtml::startMarkup):
1367         escape attribute values and ignore document fragment nodes.
1368
1369 2005-12-30  Eric Seidel  <eseidel@apple.com>
1370
1371         Reviewed by mjs.
1372
1373         No functional changes, thus no layout test.
1374
1375         Just removes debug NSLog() calls from ksvg2/kcanvas.
1376         http://bugzilla.opendarwin.org/show_bug.cgi?id=6299
1377
1378         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
1379         (KCanvasFilterQuartz::prepareFilter):
1380         (KCanvasFilterQuartz::applyFilter):
1381         (KCanvasFilterQuartz::getCIFilterStack):
1382         (KCanvasFilterQuartz::imageForName):
1383         (KCanvasFEBlendQuartz::getCIFilter):
1384         (KCanvasFEColorMatrixQuartz::getCIFilter):
1385         (KCanvasFEGaussianBlurQuartz::getCIFilter):
1386         * kcanvas/device/quartz/KCanvasResourcesQuartz.mm:
1387         (KCanvasClipperQuartz::applyClip):
1388         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
1389         (KRenderingDeviceContextQuartz::mapFromVisual):
1390         (KRenderingDeviceContextQuartz::mapToVisual):
1391         (KRenderingDeviceQuartz::createResource):
1392         (KRenderingDeviceQuartz::createFilterEffect):
1393         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
1394         (drawShadingWithStyle):
1395         (KRenderingPaintServerGradientQuartz::updateQuartzGradientCache):
1396         * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
1397         (KRenderingPaintServerPatternQuartz::draw):
1398         * ksvg2/svg/svgpathparser.cpp:
1399         (SVGPathParser::parseSVG):
1400
1401 2005-12-29  Graham Dennis  <Graham.Dennis@gmail.com>
1402
1403         Reviewed by Hyatt.
1404
1405         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=3579
1406           In-place style-switching is leaving junk behind, messing up styles
1407
1408         * khtml/rendering/render_block.h: (khtml::RenderBlock::initMaxMarginValues):
1409         Set all margin values in all cases.
1410
1411 2005-12-29  Eric Seidel  <eseidel@apple.com>
1412
1413         Reviewed by mjs.
1414
1415         XML documents with "html" in dtd name use XHTML entities when they shouldn't
1416         http://bugzilla.opendarwin.org/show_bug.cgi?id=6290
1417
1418         * khtml/xml/xml_tokenizer.cpp:
1419         (khtml::externalSubsetHandler): check for exact xhtml types
1420
1421 2005-12-29  Eric Seidel  <eseidel@apple.com>
1422
1423         Reviewed by mjs.
1424
1425         Close leak in CollectionInfo due to HashMap migration
1426         http://bugzilla.opendarwin.org/show_bug.cgi?id=6295
1427
1428         * khtml/html/html_miscimpl.cpp:
1429         (DOM::HTMLCollectionImpl::CollectionInfo::~CollectionInfo):
1430         * khtml/html/html_miscimpl.h:
1431
1432 2005-12-29  Maciej Stachowiak  <mjs@apple.com>
1433
1434         Reviewed by Eric.
1435
1436         - finished frame traversal cleanup
1437         http://bugzilla.opendarwin.org/show_bug.cgi?id=6293
1438         
1439         * kwq/WebCoreBridge.h: Removed childFrames method from WebCoreBridge protocol
1440         since it is not actually used.
1441
1442 2005-12-29  Eric Seidel  <eseidel@apple.com>
1443
1444         Reviewed by mjs.
1445
1446         Leaks in XSLTProcessorImpl due to early exit in failure case
1447         http://bugzilla.opendarwin.org/show_bug.cgi?id=6101
1448
1449         * khtml/xsl/xslt_processorimpl.cpp:
1450         (DOM::xmlDocPtrFromNode): add "shouldDelete" argument
1451         (DOM::XSLTProcessorImpl::transformToString): delete new'd xmlDoc
1452
1453 2005-12-29  Eric Seidel  <eseidel@apple.com>
1454
1455         File accidentally omitted from previous commit.
1456
1457         Remove QDict from khtml/html
1458         http://bugzilla.opendarwin.org/show_bug.cgi?id=6230
1459
1460         * khtml/ecma/kjs_html.cpp:
1461         (KJS::KJS::HTMLCollection::getNamedItems):
1462
1463 2005-12-29  Eric Seidel  <eseidel@apple.com>
1464
1465         Reviewed by mjs.
1466
1467         Remove QDict from khtml/html
1468         http://bugzilla.opendarwin.org/show_bug.cgi?id=6230
1469         Uses HashMap instead.
1470
1471         * khtml/html/html_miscimpl.cpp:
1472         (DOM::HTMLCollectionImpl::CollectionInfo::CollectionInfo):
1473         (DOM::HTMLCollectionImpl::CollectionInfo::reset):
1474         (DOM::HTMLCollectionImpl::namedItem):
1475         (DOM::HTMLCollectionImpl::updateNameCache):
1476         (DOM::HTMLCollectionImpl::namedItems):
1477         (DOM::HTMLCollectionImpl::nextNamedItem):
1478         (DOM::HTMLFormCollectionImpl::nextNamedItemInternal):
1479         (DOM::HTMLFormCollectionImpl::updateNameCache):
1480         * khtml/html/html_miscimpl.h:
1481
1482 2005-12-29  Eric Seidel  <eseidel@apple.com>
1483
1484         Reviewed by mjs.
1485
1486         DOMString/DOMStringImpl/AtomicString need enhancements before replacing QString
1487         http://bugzilla.opendarwin.org/show_bug.cgi?id=6228
1488         Added find(), contains(), startsWith() and endsWith() to DOMString
1489         Uses the above functions throughout the code.
1490         Small performance boost.
1491
1492         * khtml/css/css_base.cpp:
1493         (CSSSelector::print):
1494         * khtml/css/css_ruleimpl.cpp:
1495         (DOM::CSSImportRuleImpl::init):
1496         * khtml/css/css_valueimpl.cpp:
1497         (DOM::CSSStyleDeclarationImpl::setProperty):
1498         * khtml/css/cssparser.cpp:
1499         (CSSParser::parseValue):
1500         (CSSParser::parseDeclaration):
1501         (CSSParser::parseContent):
1502         * khtml/css/cssstyleselector.cpp:
1503         (khtml::CSSStyleSelector::CSSStyleSelector):
1504         (khtml::CSSStyleSelector::setEncodedURL):
1505         (khtml::parseUASheet):
1506         (khtml::cleanpath):
1507         (khtml::CSSStyleSelector::checkSelector):
1508         (khtml::CSSStyleSelector::checkOneSelector):
1509         (khtml::CSSRuleSet::addRulesFromSheet):
1510         (khtml::CSSStyleSelector::applyProperty):
1511         * khtml/dom/dom_string.cpp:
1512         * khtml/dom/dom_string.h:
1513         (DOM::DOMString::contains):
1514         (DOM::DOMString::find):
1515         (DOM::DOMString::startsWith):
1516         (DOM::DOMString::endsWith):
1517         * khtml/html/html_formimpl.cpp:
1518         (DOM::HTMLFormElementImpl::parseEnctype):
1519         * khtml/khtml_part.cpp:
1520         (KHTMLPart::requestFrame):
1521         (KHTMLPart::submitForm):
1522         * khtml/misc/decoder.cpp:
1523         (Decoder::decode):
1524         * khtml/xml/dom_atomicstring.h:
1525         (DOM::AtomicString::length):
1526         (DOM::AtomicString::operator []):
1527         (DOM::AtomicString::contains):
1528         (DOM::AtomicString::find):
1529         (DOM::AtomicString::startsWith):
1530         (DOM::AtomicString::endsWith):
1531         * khtml/xml/dom_docimpl.cpp:
1532         (DocumentImpl::processHttpEquiv):
1533         * khtml/xml/dom_stringimpl.cpp:
1534         (DOM::equal):
1535         (DOM::equalCaseInsensitive):
1536         (DOM::DOMStringImpl::find):
1537         (DOM::DOMStringImpl::endsWith):
1538         * khtml/xml/dom_stringimpl.h:
1539         (DOM::DOMStringImpl::startsWith):
1540
1541 2005-12-29  Rob Buis  <rwlbuis@xs4all.nl>
1542
1543         Reviewed by eseidel.
1544
1545         WebCore+SVG has some problems with rounded rectangles
1546         http://bugzilla.opendarwin.org/show_bug.cgi?id=6157
1547
1548         * ksvg2/svg/SVGRectElementImpl.cpp:
1549         (SVGRectElementImpl::toPathData): fixed round rect calculations
1550
1551 2005-12-29  Mark Rowe  <opendarwin.org@bdash.net.nz>
1552
1553         Reviewed by eseidel, ggaren, darin.
1554         
1555         - http://bugzilla.opendarwin.org/show_bug.cgi?id=4301
1556         Support HTML entities on pages parsed as XHTML
1557
1558         Added layout tests:
1559         * fast/parser/entities-in-xhtml.xhtml
1560
1561         * khtml/xml/xml_tokenizer.cpp:
1562         (khtml::XMLTokenizer::setIsXHTMLDocument): Track whether the XML document is XHTML.
1563         (khtml::XMLTokenizer::isXHTMLDocument): Ditto.
1564         (khtml::externalSubsetHandler): Ditto.
1565         (khtml::XMLTokenizer::finish): Ditto.
1566         (khtml::getXHTMLEntity): Look up the HTML entity.
1567         (khtml::getEntityHandler): Look up the HTML entity if this is an XHTML document.
1568         * khtml/html/kentities.h: Added.
1569         * khtml/html/kentities.gperf: changed entity to Entity
1570
1571 2005-12-29  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1572
1573         Reviewed by darin
1574
1575         - WebCore part of fix for
1576           http://bugzilla.opendarwin.org/show_bug.cgi?id=3922
1577           Variable word/letter spacing and full justification not supported for
1578           ATSUI-rendered text
1579
1580         * khtml/rendering/font.h:
1581         (khtml::Font::checkSelectionPoint): Make sure the complete run, used for
1582         counting spaces and determining padding per space does not go beyond the
1583         text box.
1584
1585 2005-12-28  Geoffrey Garen  <ggaren@apple.com>
1586
1587         Reviewed by mjs.
1588
1589         - Fixed <rdar://problem/4325722> crash in KJS::Bindings::dispatchJNICall
1590         due to liveconnect call from Java after Java PlugInView has been 
1591         deallocated @ www.binarybet.com
1592         AKA
1593         http://bugzilla.opendarwin.org/show_bug.cgi?id=5518
1594
1595         We had code that checked for whether a call came from a live PlugIn,
1596         but the live PlugIn dictionary would only get cleared when the 
1597         KWQKHTMLPart was destroyed. Since a single part can service multiple
1598         loads, the dictionary needs to clear after each one.
1599
1600         No layout test because this bug is difficult to reproduce.
1601
1602         * kwq/KWQKHTMLPart.mm:
1603         (KWQKHTMLPart::~KWQKHTMLPart):
1604         (1) Unrelated cleanup: Removed manual clearing of form values,
1605         replaced with call to clearRecordedFormValues().
1606         (2) Replaced PlugIn dictionary cleanup code and view deref call
1607         with call to setView(0), since much of this code was duplicated in
1608         setView, and the stuff that wasn't duplicated needed to be.
1609
1610         (KWQKHTMLPart::setView):
1611         (1) Removed some unnecessary braces.
1612         (2) Added PlugIn dictionary cleanup code.
1613         (3) New behavior: clear _bindingRoot and _windowScriptObject after
1614         each view change. This is needed because after a call to
1615         clenaupPluginRootObjects(), both objects have stale references.
1616         (4) Changed a NULL to a 0.
1617
1618         (KWQKHTMLPart::cleanupPluginRootObjects): Removed extra space.
1619
1620 2005-12-28  Anders Carlsson  <andersca@mac.com>
1621
1622         Reviewed by Maciej.
1623
1624         - Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6268
1625         Add undetectable document.all
1626         
1627         * khtml/ecma/kjs_html.cpp:
1628         (KJS::HTMLDocument::getValueProperty):
1629         If "all" has been set to a new value, return the new value.
1630         
1631         (KJS::KJS::HTMLDocument::putValueProperty):
1632         Allow "all" to be set to a new value.
1633         
1634         (KJS::HTMLAllCollection::toPrimitive):
1635         Return jsNull() if the preferred type is NullType.
1636         
1637         (KJS::getAllHTMLCollection):
1638         * khtml/ecma/kjs_html.h:
1639         (KJS::HTMLAllCollection::HTMLAllCollection):
1640         Add HTMLAllCollection, a subclass of HTMLCollection which should
1641         be undetectable.
1642         
1643         (KJS::HTMLAllCollection::toBoolean):
1644         Return false.
1645
1646 2005-12-28  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1647
1648         Reviewed by Eric, landed by ap.
1649         
1650         Test: fast/block/basic/text-indent-rtl.html
1651
1652         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6214
1653           text-indent in RTL block does the opposite
1654
1655         * khtml/rendering/render_block.cpp:
1656         (khtml::RenderBlock::rightRelOffset): Subtract the indent instead of adding it.
1657
1658 2005-12-28  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1659
1660         Reviewed by Darin, landed by ap.
1661
1662         Test: fast/dom/HTMLScriptElement/script-load-events.html
1663
1664         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5812
1665           Generate load events for <script> elements
1666
1667         * khtml/html/html_headimpl.cpp:
1668         (HTMLScriptElementImpl::parseMappedAttribute): Parse the onload and onerror attributes.
1669         (HTMLScriptElementImpl::closeRenderer): Call base class's implementation.
1670         (HTMLScriptElementImpl::notifyFinished): Dispatch load and error events.
1671         * khtml/html/htmlparser.h:
1672         * khtml/html/htmlparser.cpp:
1673         (HTMLParser::parseToken): Return the node that was inserted.
1674         * khtml/html/htmltokenizer.h: Added scriptNode, a RefPtr to the node corresponding
1675         to the current load request.
1676         * khtml/html/htmltokenizer.cpp:
1677         (HTMLTokenizer::scriptHandler): Reset scriptNode if a load request was not made.
1678         (HTMLTokenizer::parseTag): Set scriptNode to the node created from the script tag.
1679         (HTMLTokenizer::processToken): Return the node that was inserted.
1680         (HTMLTokenizer::notifyFinished): Reset scriptNode and dispatch load and error events.
1681         * khtml/misc/loader.h:
1682         (CachedScript::errorOccurred): Added.
1683         * khtml/misc/loader.cpp:
1684         (CachedScript::CachedScript):
1685         (CachedScript::error):
1686
1687 2005-12-28  Alexey Proskuryakov  <ap@nypop.com>
1688
1689         Reviewed by Maciej.
1690
1691         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6246
1692           TextIterator::rangeFromLocationAndLength() returns nil range for an 
1693           empty document
1694
1695         Test: editing/input/range-for-empty-document.html
1696
1697         * khtml/editing/visible_text.cpp:
1698         (khtml::TextIterator::rangeFromLocationAndLength):
1699         Handle the case of an empty document and (0, 0) requested range.
1700
1701 2005-12-28  Anders Carlsson  <andersca@mac.com>
1702
1703         Reviewed and landed by Geoff.
1704
1705         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6269
1706         ToT memory corruption
1707         
1708         * khtml/rendering/render_text.cpp:
1709         (khtml::RenderText::setText):
1710         Remove deref().
1711         
1712 2005-12-27  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1713
1714         Reviewed by Hyatt, landed by Darin.
1715         
1716         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5699
1717           REGRESSION: incomplete repaint
1718
1719         * khtml/rendering/render_object.cpp:
1720         (RenderObject::repaintAfterLayoutIfNeeded): Return false if only the
1721         size changed and not everything was repainted.
1722         * manual-tests/bugzilla-5699.html: Added.
1723
1724 2005-12-27  Sam Weinig  <sam.weinig@gmail.com>
1725
1726         Reviewed by Maciej, landed by Darin.
1727
1728         - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=4101>
1729         CSS Fibonacci spiral using 4 images doesn't render correctly
1730
1731         Added layout tests:
1732         * fast/replaced/absolute-image-sizing.html
1733
1734         * khtml/rendering/render_box.cpp:
1735         (RenderBox::calcAbsoluteHorizontalValues): Use calcReplacedWidth() instead of intrinsicWidth()
1736         for replaced elements.
1737         (RenderBox::calcAbsoluteVerticalValues): Same thing for height.
1738
1739 2005-12-27  Darin Adler  <darin@apple.com>
1740
1741         Reviewed by Geoff and Eric.
1742
1743         - http://bugzilla.opendarwin.org/show_bug.cgi?id=6198
1744           use RefPtr a few places in RenderText and related classes
1745
1746         * khtml/html/htmltokenizer.h: Use RefPtr for some data members in Token.
1747         Also removed use of bitfields in Token, since there's no need to optimize storage here.
1748         * khtml/html/htmlparser.cpp:
1749         (HTMLParser::parseToken): Update for use of RefPtr in Token.
1750         (HTMLParser::textCreateErrorCheck): Ditto.
1751         (HTMLParser::commentCreateErrorCheck): Ditto.
1752         (HTMLParser::handleIsindex): Ditto.
1753         * khtml/html/htmltokenizer.cpp:
1754         (khtml::Token::addAttribute): Ditto.
1755         (khtml::HTMLTokenizer::processToken): Ditto.
1756
1757         * khtml/rendering/render_text.h: Reduce the number of includes, change
1758         SOFT_HYPHEN from a macro into a constant. Change originalString function
1759         to return a PassRefPtr instead of a RefPtr. Make str and m_generatedContentStr
1760         member be a RefPtr.
1761         * khtml/rendering/render_text.cpp:
1762         (khtml::RenderText::previousOffset): Update for use of RefPtr for str.
1763         (khtml::RenderText::nextOffset): Ditto.
1764         (khtml::RenderText::RenderText): Ditto.
1765         (khtml::RenderText::originalString): Change to return PassRefPtr, even though
1766         it's not necessary at this level (since it's a virtual function).
1767         (khtml::RenderText::posOfChar): Update for use of RefPtr for str.
1768         (khtml::RenderText::setText): Ditto.
1769         (khtml::RenderTextFragment::RenderTextFragment): Ditto.
1770         (khtml::RenderTextFragment::originalString): Change to return PassRefPtr.
1771
1772         * khtml/html/html_inlineimpl.cpp: Re-sorted list of includes, added newly-needed ones.
1773         * kwq/KWQRenderTreeDebug.cpp: Added new include needed since QPtrVector is no longer
1774         included by render_text.h.
1775
1776 2005-12-27  Darin Adler  <darin@apple.com>
1777
1778         Fix suggested by Mitz.
1779
1780         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6240
1781           REGRESSION: scrollbars in overflows don't work
1782
1783         * khtml/xml/dom2_eventsimpl.cpp: (DOM::MouseRelatedEventImpl::computePositions):
1784         Remove the code to compute pageX/Y from clientX/Y, because clientX/Y are not passed
1785         in correctly (in fact, what's passed in is pageX/Y)! I accidentally included part
1786         of my fix for clientX/Y in the original patch.
1787
1788 2005-12-27  Maks Orlovich <maksim@kde.org>
1789
1790         Reviewed and landed by Maciej.
1791
1792         - fixed 4405: <button> not listed in form collections.
1793         http://bugzilla.opendarwin.org/show_bug.cgi?id=4405
1794
1795         Test: fast/forms/button-in-forms-collection.html
1796
1797         * khtml/html/html_formimpl.h:
1798         (DOM::HTMLButtonElementImpl::isEnumeratable): override to return true
1799
1800 2005-12-25  Maciej Stachowiak  <mjs@apple.com>
1801
1802         Reviewed by Geoff.
1803
1804         - Remove WebFrame's parent frame pointer, instead rely on WebCore's parent concept
1805         http://bugzilla.opendarwin.org/show_bug.cgi?id=6241
1806
1807         * kwq/WebCoreBridge.h:
1808         * kwq/WebCoreBridge.mm:
1809         (-[WebCoreBridge parent]): New method, relies on the KHTMLPart's
1810         parent pointer.
1811
1812 2005-12-24  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1813
1814         Reviewed by eseidel.
1815         
1816         Test: fast/forms/domstring-replace-crash.html
1817
1818         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6236
1819           REGRESSION: Crash in DOMString::replace() in ToT (12/24/05)
1820
1821         * khtml/dom/dom_string.h:
1822         (DOMString::replace): Added check for null m_impl.
1823
1824 2005-12-24  Maciej Stachowiak  <mjs@apple.com>
1825
1826         Reviewed by Eric.
1827
1828         - replaced QPtrDict for Accessors structs with HashMap (also renamed some
1829         stray getSetInfo methods)
1830         http://bugzilla.opendarwin.org/show_bug.cgi?id=6223
1831
1832         * khtml/ecma/kjs_html.cpp:
1833         (KJS::HTMLElement::accessors):
1834         (KJS::HTMLElement::getValueProperty):
1835         (KJS::HTMLElement::putValueProperty):
1836         * khtml/ecma/kjs_html.h:
1837
1838 2005-12-24  Geoffrey Garen  <ggaren@apple.com>
1839
1840         Reviewed by eric.
1841
1842         http://bugzilla.opendarwin.org/show_bug.cgi?id=6231
1843
1844         - Fixed assertion failure in QString::mid caused by my last checkin. 
1845         parseWindowFeatures() sometimes called QString::mid() with a start 
1846         index past the end of the string but a length of 0. There were two 
1847         problems there. (1) parseWindowFeatures() shouldn't have gotten past 
1848         the end of the string. (2) QString had range truncating code that was 
1849         borked. So I fixed both.
1850
1851         * khtml/ecma/kjs_window.cpp:
1852         (KJS::parseWindowFeatures): One of the "past the end" tests was > 
1853         instead of >=.
1854         * kwq/KWQString.mm:
1855         (QString::mid): Truncate length *before* deciding whether to return 
1856         early. Also, compare start and data._length before computing 
1857         data._length - start, because the error case we're trying to catch 
1858         will almost certainly cause unsigned overflow.
1859         * manual-tests/window-open-features-parsing.html: Added trailing ',' 
1860         to uber-test to catch this failure, too.
1861
1862 2005-12-24  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1863
1864         Reviewed by Maciej.
1865
1866         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6221
1867           REGRESSION: Password field is blank error for secure websites using
1868           password field (ToT, 12/24/05)
1869
1870         * khtml/kwq/KWQSlot.mm:
1871         (KWQSlot::KWQSlot): Changed the parameter type of slotTextChanged to const DOMString &
1872         * khtml/rendering/render_form.h:
1873         * khtml/rendering/render_form.cpp:
1874         (RenderLineEdit::RenderLineEdit): ditto.
1875         (RenderLineEdit::slotTextChanged): ditto.
1876         (RenderFileButton::RenderFileButton): ditto.
1877         (RenderFileButton::slotTextChanged): ditto.
1878
1879 2005-12-22  Geoffrey Garen  <ggaren@apple.com>
1880     
1881         Reviewed by vicki (yay!), eric.
1882
1883         - Fixed: <rdar://problem/4377597> parsing of window.open features strings needs to be more forgiving
1884
1885         Manual test case: WebCore/manual-tests/window-open-features-parsing.html
1886         Also fixed: WebCore/manual-tests/window-open-features.html, which had an incorrect URL in it.
1887
1888         This patch is long. Luckily, it's also complicated.
1889
1890         The main thing I've done is to change our parsing of the window.open 'features' argument to match Win IE.
1891         This is important because we now implement the correct defaults for window.open, and resizing and
1892         scrolling are turned off by default. So, if we parse the 'features' string incorrectly, we'll end
1893         up with an annoying, incorrectly sized window that can't resize or scroll.
1894
1895         To honor a long-standing request by Eric, I factored out the parsing into two new functions:
1896         parseWindowFeatures and constrainToScreen. I also added support for "innerWidth" and "innerHeight,"
1897         since they're just synonyms for "width" and "height."
1898
1899         * khtml/ecma/kjs_window.cpp: removed "emit" statements, since emit is #defined as ""
1900         (KJS::parseDialogFeatures): renamed from parseFeatures, since we now have a 'parseWindowFeatures'.
1901         (KJS::showModalDialog): ditto on parseFeatures. Also added some missing initializations for WindowArgs data members.
1902         (KJS::parseWindowFeatures): new function, all new functionality.
1903         (KJS::constrainToScreen): new function, no new functionality -- just cut and pasted code that used to run as
1904         part of our parsing routine.
1905         (KJS::WindowFunc::callAsFunction):
1906         (1) Factored out previous parsing code.
1907         (2) Factored 17 lines of custom popup-blocking code into 3 lines that use pre-existing 'allowPopUp' function.
1908             Gratuitous, but it cried out to me.
1909         (3) Changed URL parsing to substitute "" for undefined *and* null values (we already did this for undefined),
1910             to avoid trying to navigate to 'http://null'.
1911         (4) Factore a multiline if () { if () {}} into an if ( && )
1912         (4) Removed the main body of code from a giant 'else' block by inserting early returns for the exceptional cases.
1913             This caused some things to show up in the diff even though they're just whitespace changes.
1914             I didn't actually change any code past the line "if (!str.isEmpty() && activePart)"
1915         * kwq/KWQKHTMLPartBrowserExtension.mm:
1916         (KHTMLPartBrowserExtension::createNewWindow): Added code to set toolbars to visible if toolBarVisible is true *or*
1917         locationBarVisible is true. The parser used to do this for us, but it's really the browser that's responsible for
1918         saying that the toolbar and the locationbar are the same thing. Hopefully, we can add a setLocationBarVisible delegate
1919         in the future so that other webkit clients can make their own UI decisions.
1920         * kwq/KWQKPartsBrowserExtension.h: Added locationBarVisible data member to WindowArgs structure and renamed
1921         toolBarsVisible to toolBarVisible (see above). Removed initialization code from WindowArgs structure because
1922         this file is for platform-specific code, and what defaults to use for window arguments is purely engine stuff.
1923
1924 2005-12-23  Eric Seidel  <eseidel@apple.com>
1925
1926         Reviewed by mjs.
1927
1928         Remove many use of .qstring()
1929         Convert several instances of QStrings to DOMStrings
1930         Add DOMString::replace(QChar, QChar)
1931         Remove (unused) KWQLabel, KWQKGlobal
1932         Slight performance improvement.
1933         Also fixed ChangeLog line endings from previous commit.
1934         http://bugzilla.opendarwin.org/show_bug.cgi?id=6138
1935
1936         No tests needed, no functionality changes.
1937
1938         * ChangeLog: Fixed line endings
1939         * ForwardingHeaders/kglobal.h: Removed.
1940         * ForwardingHeaders/qlabel.h: Removed.
1941         * WebCore.xcodeproj/project.pbxproj: removed KWQLabel
1942         * khtml/css/css_base.cpp:
1943         (CSSSelector::selectorText):
1944         * khtml/css/css_stylesheetimpl.cpp:
1945         (MediaListImpl::setMediaText):
1946         * khtml/css/cssstyleselector.cpp:
1947         (khtml::checkPseudoState):
1948         * khtml/dom/dom_string.h:
1949         (DOM::DOMString::replace):
1950         * khtml/ecma/kjs_css.cpp:
1951         (KJS::DOMCSSStyleDeclaration::put):
1952         * khtml/ecma/kjs_dom.cpp:
1953         (KJS::DOMNode::put):
1954         (KJS::DOMAttr::put):
1955         (KJS::DOMDocument::put):
1956         * khtml/ecma/kjs_events.cpp:
1957         (KJS::JSAbstractEventListener::handleEvent):
1958         * khtml/ecma/kjs_html.cpp:
1959         (KJS::KJS::HTMLDocument::put):
1960         (KJS::KJS::HTMLElementFunction::callAsFunction):
1961         (KJS::KJS::HTMLElement::put):
1962         (KJS::KJS::Context2DFunction::callAsFunction):
1963         (KJS::Context2D::putValueProperty):
1964         * khtml/ecma/kjs_proxy.cpp:
1965         (KJSProxyImpl::evaluate):
1966         * khtml/ecma/kjs_window.cpp:
1967         (KJS::Window::isSafeScript):
1968         (KJS::WindowFunc::callAsFunction):
1969         (KJS::ScheduledAction::execute):
1970         * khtml/ecma/xmlhttprequest.cpp:
1971         (KJS::XMLHttpRequest::send):
1972         (KJS::XMLHttpRequestProtoFunc::callAsFunction):
1973         * khtml/ecma/xmlhttprequest.h:
1974         * khtml/editing/jsediting.cpp:
1975         (DOM::JSEditor::queryCommandSupported):
1976         * khtml/editing/markup.cpp:
1977         (khtml::stringValueForRange):
1978         (khtml::startMarkup):
1979         * khtml/html/html_baseimpl.cpp:
1980         (HTMLBodyElementImpl::parseMappedAttribute):
1981         * khtml/html/html_elementimpl.cpp:
1982         (HTMLElementImpl::addHTMLAlignment):
1983         * khtml/html/html_formimpl.cpp:
1984         (DOM::HTMLFormElementImpl::formData):
1985         (DOM::HTMLInputElementImpl::appendFormData):
1986         (DOM::HTMLTextAreaElementImpl::updateValue):
1987         * khtml/html/html_headimpl.cpp:
1988         (HTMLLinkElementImpl::parseMappedAttribute):
1989         * khtml/html/html_imageimpl.cpp:
1990         (DOM::HTMLImageElementImpl::parseMappedAttribute):
1991         * khtml/html/html_objectimpl.cpp:
1992         (DOM::HTMLObjectElementImpl::parseMappedAttribute):
1993         (DOM::HTMLParamElementImpl::isURLAttribute):
1994         * khtml/html/html_objectimpl.h:
1995         * khtml/html/html_tableimpl.cpp:
1996         (DOM::HTMLTableElementImpl::addChild):
1997         (DOM::HTMLTableElementImpl::parseMappedAttribute):
1998         (DOM::HTMLTablePartElementImpl::parseMappedAttribute):
1999         (DOM::HTMLTableSectionElementImpl::addChild):
2000         (DOM::HTMLTableRowElementImpl::addChild):
2001         * khtml/html/htmltokenizer.cpp:
2002         (khtml::HTMLTokenizer::parseTag):
2003         * khtml/khtml_part.cpp:
2004         (KHTMLPart::executeScript):
2005         (KHTMLPart::checkEmitLoadEvent):
2006         * khtml/misc/loader.cpp:
2007         (CachedObject::finish):
2008         (CachedCSSStyleSheet::checkNotify):
2009         (CachedXSLStyleSheet::checkNotify):
2010         (CachedXBLDocument::checkNotify):
2011         (DocLoader::requestImage):
2012         (DocLoader::requestStyleSheet):
2013         (DocLoader::requestScript):
2014         (Loader::servePendingRequests):
2015         (Loader::cancelRequests):
2016         * khtml/rendering/render_applet.cpp:
2017         * khtml/rendering/render_block.cpp:
2018         (khtml::RenderBlock::updateFirstLetter):
2019         * khtml/rendering/render_box.cpp:
2020         (RenderBox::~RenderBox):
2021         * khtml/rendering/render_form.cpp:
2022         (RenderFormElement::slotTextChanged):
2023         (RenderLineEdit::updateFromElement):
2024         (RenderTextArea::updateFromElement):
2025         (RenderTextArea::text):
2026         * khtml/rendering/render_form.h:
2027         * khtml/rendering/render_frames.cpp:
2028         (RenderPartObject::updateWidget):
2029         * khtml/rendering/render_line.cpp:
2030         (khtml::EllipsisBox::paint):
2031         * khtml/rendering/render_list.cpp:
2032         (RenderListItem::paint):
2033         (RenderListMarker::paint):
2034         * khtml/rendering/render_text.cpp:
2035         (khtml::RenderText::RenderText):
2036         (khtml::RenderText::position):
2037         * khtml/xml/dom_docimpl.cpp:
2038         (DOMImplementationImpl::hasFeature):
2039         (DocumentImpl::getElementByAccessKey):
2040         (DocumentImpl::recalcStyleSelector):
2041         (DocumentImpl::defaultEventHandler):
2042         * khtml/xml/dom_elementimpl.cpp:
2043         (ElementImpl::recalcStyle):
2044         * khtml/xml/dom_nodeimpl.cpp:
2045         (DOM::NodeImpl::dump):
2046         (DOM::appendAttributeDesc):
2047         (DOM::NodeImpl::showNode):
2048         * khtml/xml/dom_stringimpl.cpp:
2049         (DOM::DOMStringImpl::lower):
2050         * khtml/xml/xml_tokenizer.cpp:
2051         (khtml::XMLTokenizer::executeScripts):
2052         * khtml/xsl/xsl_stylesheetimpl.cpp:
2053         (DOM::XSLStyleSheetImpl::loadChildSheets):
2054         * kwq/KWQKHTMLPart.h:
2055         * kwq/KWQKHTMLPart.mm:
2056         (KWQKHTMLPart::documentViewForNode):
2057         (KWQKHTMLPart::runJavaScriptAlert):
2058         (KWQKHTMLPart::runJavaScriptConfirm):
2059         (KWQKHTMLPart::runJavaScriptPrompt):
2060         (KWQKHTMLPart::addMessageToConsole):
2061         (KWQKHTMLPart::passWheelEventToChildWidget):
2062         (KWQKHTMLPart::shouldDragAutoNode):
2063         (KWQKHTMLPart::snapshotDragImage):
2064         (convertAttributesToUnderlines):
2065         (KWQKHTMLPart::setMarkedTextRange):
2066         (KWQKHTMLPart::mousePressNode):
2067         * kwq/KWQKGlobal.h: Removed.
2068         * kwq/KWQKGlobal.mm: Removed.
2069         * kwq/KWQLabel.h: Removed.
2070         * kwq/KWQLabel.mm: Removed.
2071         * kwq/KWQLineEdit.h:
2072         * kwq/KWQLineEdit.mm:
2073         (QLineEdit::setText):
2074         (QLineEdit::text):
2075         (QLineEdit::setAutoSaveName):
2076         (QLineEdit::setPlaceholderString):
2077         * kwq/KWQPainter.mm:
2078         (QPainter::compositeOperatorFromString):
2079         * kwq/KWQSignal.h:
2080         * kwq/KWQSignal.mm:
2081         (KWQSignal::call):
2082         * kwq/KWQSlot.h:
2083         * kwq/KWQSlot.mm:
2084         (KWQSlot::call):
2085         * kwq/KWQString.h:
2086         * kwq/KWQString.mm:
2087         * kwq/KWQTextEdit.h:
2088         * kwq/KWQTextEdit.mm:
2089         (QTextEdit::setText):
2090         (QTextEdit::text):
2091         (QTextEdit::textWithHardLineBreaks):
2092         * ksvg2/scripts/cssmakeprops: removed kglobal.h
2093         * ksvg2/scripts/cssmakevalues: removed kglobal.h
2094
2095 2005-12-23  Alexey Proskuryakov  <ap@nypop.com>
2096
2097         Reviewed by Eric Seidel.
2098
2099         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5924
2100           Zero-length responses to XMLHTTPRequest mishandled
2101
2102         * khtml/ecma/xmlhttprequest.cpp (KJS::XMLHttpRequest::slotFinished):
2103           Make sure to fetch response headers and set the state to Loaded, if
2104           this hasn't been done already.
2105
2106 2005-12-23  Alexey Proskuryakov  <ap@nypop.com>
2107
2108         Reviewed by Eric Seidel.
2109
2110         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=3565
2111           Posting data via XML HTTP Request doesnt work
2112
2113         * khtml/ecma/xmlhttprequest.cpp:
2114         (KJS::XMLHttpRequest::send): Set application/xml as a default Content-Type;
2115           use a proper codec for request body if a charset is specified.
2116         (KJS::XMLHttpRequest::getRequestHeader): Use getSpecificHeader.
2117         (KJS::XMLHttpRequest::getResponseHeader): Ditto.
2118         (KJS::XMLHttpRequest::getSpecificHeader): Factored out code from getResponseHeader.
2119         (KJS::XMLHttpRequestProtoFunc::callAsFunction): Removed a FIXME (this is done in send() now).
2120         * khtml/ecma/xmlhttprequest.h:
2121
2122 2005-12-22  Alexey Proskuryakov  <ap@nypop.com>
2123
2124         Reviewed by Darin Adler.
2125
2126         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6118
2127         Investigate not using the frameset charset as a default for frames
2128
2129         * khtml/khtml_part.cpp (KHTMLPart::write):
2130         Do not use the parent frame encoding as a default for sub-frames (revert
2131         rdar://3100151). 
2132
2133 2005-12-22  Maciej Stachowiak  <mjs@apple.com>
2134
2135         Reviewed by Eric.
2136
2137         - made RefPtr<DOMStringImpl> usable as a hashtable key/value
2138         - changed XSLTProcessorImpl to make use of this instead of a QDict.
2139         - partially fixed broken param handling for xslt
2140
2141         See LayoutTests for updated test case.
2142
2143         * khtml/xml/dom_stringimpl.cpp:
2144         * khtml/xml/dom_stringimpl.h:
2145         (KXMLCore::): Set things up so you can use RefPtr<DOMStringImpl> as
2146         a hashtable key (should already be usable as a value).
2147         * khtml/xsl/xslt_processorimpl.cpp:
2148         (DOM::xsltParamArrayFromParameterMap): Updated to use a HashMap of RefPtrs instead
2149         of QDict. Also, fixed bugs that would have kept this from ever working at all.
2150         (DOM::XSLTProcessorImpl::transformToString): ditto
2151         (DOM::XSLTProcessorImpl::setParameter): ditto
2152         (DOM::XSLTProcessorImpl::getParameter): ditto
2153         (DOM::XSLTProcessorImpl::removeParameter): ditto
2154         * khtml/xsl/xslt_processorimpl.h:
2155
2156 2005-12-21  Maciej Stachowiak  <mjs@apple.com>
2157
2158         Reviewed by Darin.
2159
2160         - update for new HashTranslator stuff
2161
2162         * khtml/xml/dom_atomicstring.cpp:
2163         (DOM::CStringTranslator::hash):
2164         (DOM::CStringTranslator::equal):
2165         (DOM::CStringTranslator::translate):
2166         (DOM::AtomicString::equal):
2167         (DOM::AtomicString::add):
2168         (DOM::QCharBufferTranslator::hash):
2169         (DOM::QCharBufferTranslator::equal):
2170         (DOM::QCharBufferTranslator::translate):
2171         * khtml/xml/dom_qname.cpp:
2172         (DOM::QNameComponentsTranslator::hash):
2173         (DOM::QNameComponentsTranslator::equal):
2174         (DOM::QNameComponentsTranslator::translate):
2175         (DOM::QualifiedName::QualifiedName):
2176
2177 2005-12-22  Adele Peterson  <adele@apple.com>
2178
2179         Reviewed by Darin.
2180
2181         Cleaned up a previous checkin by defining global const defaultForm.
2182
2183         * khtml/xml/dom_docimpl.cpp:
2184         (DocumentImpl::radioButtonChecked):
2185         (DocumentImpl::checkedRadioButtonForGroup):
2186         (DocumentImpl::removeRadioButtonGroup):
2187
2188 2005-12-22  Adele Peterson  <adele@apple.com>
2189
2190         Reviewed by Tim Hatcher.
2191
2192         Fixed <rdar://problem/4387433> Seed: Radio buttons behave incorrectly in Gmail settings
2193
2194         * khtml/html/html_formimpl.cpp:
2195         (DOM::HTMLFormElementImpl::registerFormElement): update radio button hash map when moving form elements around.
2196         (DOM::HTMLGenericFormElementImpl::insertedIntoTree): ditto.
2197         * khtml/html/html_formimpl.h:
2198         (DOM::HTMLGenericFormElementImpl::isRadioButton): Added.
2199         (DOM::HTMLInputElementImpl::isRadioButton): Added.
2200         * khtml/xml/dom_docimpl.cpp:
2201         (DocumentImpl::radioButtonChecked): 
2202         Added comment explaining that we use 1 for the default form.  We can't use a null pointer as a key for the hash map.
2203         (DocumentImpl::checkedRadioButtonForGroup): Added conversion of null form pointer to 1.
2204         (DocumentImpl::removeRadioButtonGroup): ditto.
2205
2206 2005-12-22  Anders Carlsson  <andersca@mac.com>
2207
2208         Reviewed by Eric.
2209
2210         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6196
2211         Would like to be able to define prototypes in headers
2212
2213         * khtml/ecma/XSLTProcessor.cpp:
2214         * khtml/ecma/domparser.cpp:
2215         * khtml/ecma/kjs_css.cpp:
2216         * khtml/ecma/kjs_dom.cpp:
2217         * khtml/ecma/kjs_events.cpp:
2218         * khtml/ecma/kjs_html.cpp:
2219         * khtml/ecma/kjs_range.cpp:
2220         * khtml/ecma/kjs_traversal.cpp:
2221         * khtml/ecma/kjs_views.cpp:
2222         * khtml/ecma/xmlhttprequest.cpp:
2223         * khtml/ecma/xmlserializer.cpp:
2224         Update for changes to JSC.
2225
2226 2005-12-22  Darin Adler  <darin@apple.com>
2227
2228         Reviewed by NOBODY (OOPS!).
2229
2230         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6198
2231           use RefPtr a few places in RenderText and related classes
2232
2233         * khtml/html/htmlparser.cpp:
2234         (HTMLParser::parseToken): Use get since text pointer is RefPtr now.
2235         (HTMLParser::textCreateErrorCheck): Ditto.
2236         (HTMLParser::commentCreateErrorCheck): Ditto.
2237         (HTMLParser::handleIsindex): Get rid of explicit deref, no longer needed.
2238
2239         * khtml/html/htmltokenizer.h: Make attrs and text fields of Token use
2240         RefPtr. Also stop using bit fields for the flags in Token -- there's no
2241         evidence this makes things faster.
2242         * khtml/html/htmltokenizer.cpp:
2243         (khtml::Token::addAttribute): Get rid of explicit ref, no longer needed.
2244         (khtml::HTMLTokenizer::processToken): Ditto.
2245
2246         * khtml/rendering/render_block.cpp: (khtml::RenderBlock::updateFirstLetter):
2247         Use a PassRefPtr.
2248
2249         * khtml/rendering/render_text.cpp:
2250         (khtml::RenderText::previousOffset): Use get since str pointer is RefPtr now.
2251         (khtml::RenderText::nextOffset): Ditto.
2252         (khtml::RenderText::RenderText): Get rid of explicit ref, no longer needed.
2253         Change to use initializer syntax instead of assignment.
2254         (khtml::RenderText::setStyle): Use PassRefPtr.
2255         (khtml::RenderText::originalString): Ditto.
2256         (khtml::RenderText::setText): Get rid of explicit ref, no longer needed.
2257         (khtml::RenderTextFragment::RenderTextFragment): Get rid of explicit ref,
2258         no longer needed.
2259         (khtml::RenderTextFragment::originalString): Use PassRefPtr.
2260
2261         * khtml/rendering/render_text.h: Change SOFT_HYPEN to be a constant rather than
2262         a preprocessor macro. Used PassRefPtr in a couple places. Made RenderText's str
2263         and RenderTextFragment's m_generatedContentStr be RefPtr.
2264
2265         * khtml/html/html_inlineimpl.cpp: Add a newly-needed include, sort them.
2266         * kwq/KWQRenderTreeDebug.cpp: Add a newly-needed include.
2267
2268 2005-12-22  Darin Adler  <darin@apple.com>
2269
2270         Reviewed by Eric.
2271
2272         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6193
2273           remove some unused KWQ code
2274
2275         * kcanvas/KCanvasCreator.cpp: (KCanvasCreator::self): Don't use static deleter for
2276         two reasons: (1) We don't want any globals with constructors in any of our frameworks
2277         because they slow down framework load time. (2) There's no need to destroy this object at
2278         process termination time -- it's extra work with no benefit. Because of both these
2279         reasons, our KStaticDeleter implementation was basically a no-op.
2280         * ksvg2/svg/SVGDOMImplementationImpl.cpp: (SVGDOMImplementationImpl::self): Ditto.
2281         * khtml/xml/dom_docimpl.cpp: (DocumentImpl::setDocumentChanged): Ditto.
2282
2283         * khtml/html/html_canvasimpl.cpp: Removed include of kstringhandler.h.
2284         * khtml/html/html_imageimpl.cpp: Ditto.
2285
2286         * khtml/khtmlpart_p.h: Removed something that was in an "APPLE_CANGES" ifdef.
2287
2288         * ForwardingHeaders/kstaticdeleter.h: Removed.
2289         * ForwardingHeaders/kstringhandler.h: Removed.
2290         * kwq/KWQKStaticDeleter.h: Removed.
2291         * kwq/KWQKStringHandler.h: Removed.
2292         * kwq/KWQKStringHandler.mm: Removed.
2293
2294         * WebCore.xcodeproj/project.pbxproj: Removed files.
2295
2296 2005-12-22  Darin Adler  <darin@apple.com>
2297
2298         Reviewed by Eric.
2299
2300         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6192
2301           add support for non-standard &nsup; entity (implemented in other browsers)
2302
2303         * khtml/html/kentities.gperf: Add "nsup" to table.
2304         * khtml/html/htmltokenizer.cpp: Removed old workaround for inlining issue that no
2305         longer seems to be necessary; also touches the file which is important because
2306         Xcode doesn't seem to understand the dependency on kentities.gperf and the need
2307         to recompile.
2308
2309 2005-12-22  Darin Adler  <darin@apple.com>
2310
2311         Reviewed by Eric.
2312
2313         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6167
2314           RenderStyle default constructor should initialize its members for speed
2315
2316         * khtml/rendering/DataRef.h: (khtml::DataRef::operator=): Eliminate an extra
2317         branch by doing ref before deref instead of == check.
2318
2319         * khtml/rendering/render_style.cpp:
2320         (khtml::initDefaultStyle): Added. Function to initialize the default style
2321         for use in constructor.
2322         (khtml::RenderStyle::RenderStyle): Changed constructor to initalize all the
2323         members with constructor syntax instead of using assignment on all of them.
2324         * khtml/rendering/render_style.h: Removed static data member _default --
2325         it's now a file scope global instead.
2326
2327 2005-12-21  Darin Adler  <darin@apple.com>
2328
2329         Reviewed by Justin.
2330
2331         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6142
2332           intermittent failures in some paste tests
2333
2334         * khtml/editing/apply_style_command.cpp:
2335         (khtml::ApplyStyleCommand::applyBlockStyle): Call new updateLayout member function.
2336         (khtml::ApplyStyleCommand::applyInlineStyle): Ditto.
2337         (khtml::ApplyStyleCommand::pushDownTextDecorationStyleAtBoundaries): Ditto.
2338         * khtml/editing/composite_edit_command.cpp:
2339         (khtml::CompositeEditCommand::addBlockPlaceholderIfNeeded): Ditto.
2340         (khtml::CompositeEditCommand::findBlockPlaceholder): Ditto.
2341         (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Ditto.
2342         * khtml/editing/delete_selection_command.cpp:
2343         (khtml::DeleteSelectionCommand::fixupWhitespace): Ditto.
2344         (khtml::DeleteSelectionCommand::moveNodesAfterNode): Ditto.
2345         * khtml/editing/edit_command.cpp:
2346         (khtml::EditCommand::apply): Ditto.
2347         (khtml::EditCommand::unapply): Ditto.
2348         (khtml::EditCommand::reapply): Ditto.
2349         (khtml::EditCommand::updateLayout): Added. Calls updateLayoutIgnorePendingStylesheets
2350         on the document.
2351         * khtml/editing/edit_command.h: Added updateLayout member function.
2352         * khtml/editing/insert_line_break_command.cpp:
2353         (khtml::InsertLineBreakCommand::doApply): Call new updateLayout member function.
2354         * khtml/editing/insert_paragraph_separator_command.cpp:
2355         (khtml::InsertParagraphSeparatorCommand::doApply): Ditto.
2356         * khtml/editing/jsediting.cpp:
2357         (DOM::JSEditor::execCommand): Call updateLayoutIgnorePendingStylesheets instead of updateLayout.
2358         (DOM::JSEditor::queryCommandEnabled): Ditto.
2359         (DOM::JSEditor::queryCommandIndeterm): Ditto.
2360         (DOM::JSEditor::queryCommandState): Ditto.
2361         (DOM::JSEditor::queryCommandValue): Ditto.
2362         * khtml/editing/markup.cpp: (khtml::createMarkup): Ditto.
2363         * khtml/editing/replace_selection_command.cpp:
2364         (khtml::ReplacementFragment::insertFragmentForTestRendering): Ditto.
2365         (khtml::ReplaceSelectionCommand::fixupNodeStyles): Call new updateLayout member function.
2366         (khtml::ReplacementFragment::computeStylesUsingTestRendering): Call
2367         updateLayoutIgnorePendingStylesheets instead of updateLayout.
2368         (khtml::ReplaceSelectionCommand::doApply): Call new updateLayout member function.
2369         (khtml::ReplaceSelectionCommand::removeLinePlaceholderIfNeeded): Ditto.
2370         (khtml::ReplaceSelectionCommand::completeHTMLReplacement): Ditto.
2371         * khtml/editing/visible_units.cpp:
2372         (khtml::previousLinePosition): Call updateLayoutIgnorePendingStylesheets instead of updateLayout.
2373         (khtml::nextLinePosition): Ditto.
2374         * khtml/html/html_elementimpl.cpp:
2375         (HTMLElementImpl::innerText): Ditto.
2376         * kwq/WebCoreBridge.mm:
2377         (-[WebCoreBridge setSelectedDOMRange:affinity:closeTyping:]): Ditto.
2378         (-[WebCoreBridge smartDeleteRangeForProposedRange:]): Ditto.
2379
2380 2005-12-21  Darin Adler  <darin@apple.com>
2381
2382         Reviewed by Geoff.
2383
2384         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6177
2385           move event code from JavaScript binding into DOM implementation
2386
2387         * khtml/ecma/kjs_events.cpp:
2388         (KJS::DOMMouseEvent::getValueProperty): Change everything to just call through instead of doing
2389         the work here.
2390         (KJS::DOMWheelEvent::getValueProperty): Ditto.
2391
2392         * khtml/xml/dom2_eventsimpl.h:
2393         (DOM::MouseRelatedEventImpl::offsetX):
2394         (DOM::MouseRelatedEventImpl::offsetY):
2395         * khtml/xml/dom2_eventsimpl.cpp:
2396         (DOM::MouseRelatedEventImpl::MouseRelatedEventImpl): Initialize new m_pageX, m_pageY, m_layerX,
2397         m_layerY, m_offsetX, and m_offsetY.
2398         (DOM::MouseRelatedEventImpl::computePositions): Renamed from computeLayerPos since it handles
2399         page position andoffset position too now.
2400         (DOM::MouseRelatedEventImpl::pageX): Added. Not in header since it's virtual.
2401         (DOM::MouseRelatedEventImpl::pageY): Ditto.
2402         (DOM::MouseRelatedEventImpl::x): Added, with FIXME since it should change eventually.
2403         (DOM::MouseRelatedEventImpl::y): Ditto.
2404         (DOM::MouseEventImpl::initMouseEvent): Call computePositions instead of computeLayerPos.
2405         (DOM::MouseEventImpl::toElement): Added.
2406         (DOM::MouseEventImpl::fromElement): Added.
2407
2408 2005-12-21  Timothy Hatcher  <timothy@apple.com>
2409
2410         * WebCore.xcodeproj/project.pbxproj:
2411           Set tab width to 8, indent width to 4 and uses tabs to false per file.
2412
2413 2005-12-21  John Sullivan  <sullivan@apple.com>
2414
2415         Reviewed by Tim Omernick and Darin Adler.
2416         
2417         - fixed HiDPI problem with forms auto-fill menu width
2418
2419         No test cases added; this code is used for "chrome" only.
2420
2421         * kwq/DOMHTML.mm:
2422         (-[DOMHTMLInputElement _rectOnScreen]):
2423         convert entire rect to window coordinates, not just origin
2424
2425 2005-12-21  David Harrison  <harrison@apple.com>
2426
2427         Reviewed by Justin.
2428
2429         <rdar://problem/4039777> Pasting particular snippet of HTML containing list items and a link creates too many list items
2430         - Fixed paste crash by making calling RenderBox::deleteLineBoxWrapper() from RenderObject::remove(),
2431         so that the connection is broken before the InlineBox's parent gets deleted.
2432         - Fixed overzealous style changes when setting the style on a specific range of elements.  These specific
2433         ranges are derived programmatically, e.g. as a part of pasting, so they must be respected exactly rather
2434         than modified by converting the endpoints to VisiblePositions.
2435         
2436         Test cases coming soon.
2437
2438         * khtml/editing/apply_style_command.cpp:
2439         (khtml::ApplyStyleCommand::ApplyStyleCommand):
2440         (khtml::ApplyStyleCommand::updateStartEnd):
2441         (khtml::ApplyStyleCommand::startPosition):
2442         (khtml::ApplyStyleCommand::endPosition):
2443         (khtml::ApplyStyleCommand::applyBlockStyle):
2444         (khtml::ApplyStyleCommand::applyRelativeFontStyleChange):
2445         (khtml::ApplyStyleCommand::applyInlineStyle):
2446         (khtml::ApplyStyleCommand::removeInlineStyle):
2447         (khtml::ApplyStyleCommand::splitTextAtStartIfNeeded):
2448         (khtml::ApplyStyleCommand::splitTextAtEndIfNeeded):
2449         (khtml::ApplyStyleCommand::splitTextElementAtStartIfNeeded):
2450         (khtml::ApplyStyleCommand::splitTextElementAtEndIfNeeded):
2451         (khtml::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
2452         (khtml::ApplyStyleCommand::mergeEndWithNextIfIdentical):
2453         (khtml::ApplyStyleCommand::joinChildTextNodes):
2454         * khtml/editing/apply_style_command.h:
2455         * khtml/editing/composite_edit_command.cpp:
2456         (khtml::CompositeEditCommand::applyStyle):
2457         * khtml/editing/composite_edit_command.h:
2458         * khtml/editing/insert_line_break_command.cpp:
2459         (khtml::InsertLineBreakCommand::doApply):
2460         * khtml/editing/replace_selection_command.cpp:
2461         (khtml::ReplaceSelectionCommand::fixupNodeStyles):
2462         (khtml::ReplaceSelectionCommand::completeHTMLReplacement):
2463         * khtml/rendering/render_box.cpp:
2464         (RenderBox::destroy):
2465         (RenderBox::deleteLineBoxWrapper):
2466         * khtml/rendering/render_box.h:
2467         * khtml/rendering/render_list.cpp:
2468         (RenderListMarker::~RenderListMarker):
2469         (RenderListMarker::setStyle):
2470         * khtml/rendering/render_object.cpp:
2471         (RenderObject::remove):
2472         * khtml/rendering/render_object.h:
2473         * khtml/rendering/render_replaced.cpp:
2474         (RenderWidget::destroy):
2475
2476 2005-12-20  Adele Peterson  <adele@apple.com>
2477
2478         Reviewed by Darin.
2479
2480         Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5911
2481         REGRESSION: Page scroll position jumps when clicking on word in editable div
2482
2483         I moved the scrolling code out of setFocusNode, and consolidated some of the focus code to scroll when necessary.
2484
2485         * khtml/html/html_formimpl.cpp: Removed HTMLButtonElementImpl::blur, HTMLButtonElementImpl::focus, HTMLInputElementImpl::blur, HTMLInputElementImpl::focus.  
2486         New code in ElementImpl::focus will now handle these cases.  This allows tabbing through the elements to go through the same code path as calling focus() on an element.  
2487         Before, focus() would scroll to reveal for any form elements that had a RenderWidget, but wouldn't scroll for anchor elements, or any of the new form elements.  
2488         Now the behavior will be more consistent.
2489         (DOM::HTMLLabelElementImpl::focus): calls ElementImpl::focus.
2490         (DOM::HTMLLegendElementImpl::focus): ditto.
2491         * khtml/html/html_formimpl.h:
2492         * khtml/khtml_part.cpp:
2493         (KHTMLPart::selectAll): calls new function selectContentsOfNode
2494         (KHTMLPart::selectContentsOfNode): factored out code to selectAll for a particular node- which is useful for contenteditable elements.
2495         * khtml/khtml_part.h: added selectContentsOfNode
2496         * khtml/xml/dom_docimpl.cpp:
2497         (DocumentImpl::setFocusNode): removed scrolling code.
2498         * khtml/xml/dom_elementimpl.cpp:
2499         (ElementImpl::focus): Calls updateLayout in case focus() is called before there's a renderer.
2500         Makes a selection for editable elements (right now we select all, but this will change).
2501         Doesn't scroll if the renderer is a RenderWidget, since that is handled when the view becomes first responder.  This will go away when we convert the rest of our form elements.
2502         * kwq/KWQKHTMLPart.mm:
2503         (KWQKHTMLPart::revealSelection): Made this more like centerSelectionInVisibleArea  where we get the right rectangle if the selection is a caret.
2504         (KWQKHTMLPart::nextKeyViewInFrame): call ElementImpl::focus() for the node.  This will set the selection too, which used to be done here.
2505
2506 2005-12-20  Alexey Proskuryakov  <ap@nypop.com>
2507
2508         Reviewed by justin
2509         
2510         <http://bugzilla.opendarwin.org/show_bug.cgi?id=4682>
2511         -[WebHTMLView firstRectForCharacterRange:] is using _selectedRange instead of the given range if no marked text
2512
2513         Added layout tests:
2514         * editing/input/firstrectforcharacterrange-styled
2515         * editing/input/firstrectforcharacterrange-plain
2516
2517         * khtml/editing/visible_text.cpp:
2518         (khtml::TextIterator::rangeFromLocationAndLength): 
2519         Return null if the range isn't found, instead of a startless/endless 
2520         range.  Set the end if the requested location+length is out of bounds.
2521         * kwq/WebCoreBridge.mm:
2522         (-[WebCoreBridge convertToDOMRange:]): Handle larged unsigned values 
2523         before calling rangeWithLocationAndLength, which expects signed ints.
2524
2525 2005-12-20  Adele Peterson  <adele@apple.com>
2526
2527         Reviewed by Darin.
2528
2529         Fix for <rdar://problem/4387630> REGRESSION: <select> element's onClick event doesn't fire @ bugweb.apple.com
2530
2531         * kwq/KWQKHTMLPart.mm:
2532         (KWQKHTMLPart::passSubframeEventToSubframe): only pass mouse down for khtmlviews.
2533
2534 2005-12-20  Justin Garcia  <justin.garcia@apple.com>
2535
2536         Reviewed by eric, thatcher
2537         
2538         <rdar://problem/4172984> KWQExceptions needs to use @try/@catch instead of relying on NSException.h internals
2539         
2540         Needed to undef try/catch because of 4333439.  Moved the 
2541         declarations of variables that are returned from within a @try 
2542         block outside the @try block (because of "might be clobbered by 
2543         a longjmp or vfork" warnings).  Moved some return statements
2544         inside the @try block to fix volatilization errors with gcc4.
2545
2546         * WebCore.xcodeproj/project.pbxproj:
2547         * WebCorePrefix.h:
2548         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
2549         (KCanvasFEBlendQuartz::getCIFilter):
2550         (KCanvasFEColorMatrixQuartz::getCIFilter):
2551         (KCanvasFECompositeQuartz::getCIFilter):
2552         (getPointLightVectors):
2553         (getLightVectors):
2554         (getNormalMap):
2555         (KCanvasFEDiffuseLightingQuartz::getCIFilter):
2556         (KCanvasFEFloodQuartz::getCIFilter):
2557         (KCanvasFEImageQuartz::getCIFilter):
2558         (KCanvasFEMergeQuartz::getCIFilter):
2559         (KCanvasFESpecularLightingQuartz::getCIFilter):
2560         * kwq/KWQExceptions.h:
2561         * kwq/KWQExceptions.mm:
2562         (KWQReportBlockedException):
2563         * kwq/KWQFileButton.mm:
2564         (KWQFileButton::sizeForCharacterWidth):
2565         (KWQFileButton::frameGeometry):
2566         * kwq/KWQKCursor.mm:
2567         (+[NSCursor _WebCore_cursorWithName:hotSpot:_WebCore_cursorWithName:hotSpot:]):
2568         * kwq/KWQKHTMLPart.mm:
2569         (KWQKHTMLPart::createPart):
2570         (KWQKHTMLPart::nextKeyView):
2571         (KWQKHTMLPart::runJavaScriptPrompt):
2572         (KWQKHTMLPart::keyEvent):
2573         (KWQKHTMLPart::sendContextMenuEvent):
2574         (KWQKHTMLPart::fileWrapperForElement):
2575         (KWQKHTMLPart::attributedString):
2576         (KWQKHTMLPart::imageFromRect):
2577         * kwq/KWQKHTMLPartBrowserExtension.mm:
2578         * kwq/KWQLineEdit.mm:
2579         (QLineEdit::sizeForCharacterWidth):
2580         * kwq/KWQListBox.mm:
2581         (QListBox::sizeForNumberOfLines):
2582         * kwq/KWQLoader.mm:
2583         (KWQCheckCacheObjectStatus):
2584         * kwq/KWQWidget.mm:
2585         (QWidget::frameGeometry):
2586         (QWidget::mapFromGlobal):
2587
2588 2005-12-20  David Harrison  <harrison@apple.com>
2589
2590         <rdar://problem/4294417> Cannot un-italicize some text after triple clicking it
2591
2592         Reviewed by Justin.
2593
2594         * khtml/editing/apply_style_command.cpp:
2595         (khtml::ApplyStyleCommand::addInlineStyleIfNeeded):
2596         Removed check for tab span because ApplyStyleCommand::removeCSSStyle() already makes the same check.
2597
2598 2005-12-20  Justin Garcia  <justin.garcia@apple.com>
2599
2600         <rdar://problem/4387270> editing/deleting/delete-3800834-fix failing
2601         <http://bugzilla.opendarwin.org/show_bug.cgi?id=6160> REGRESSION: Crash when running editing/deleting/delete-3800834-fix.html
2602         <http://bugzilla.opendarwin.org/show_bug.cgi?id=6161> REGRESSION: crash when pressing tab in editable WebHTMLView
2603
2604         Reviewed by darin
2605     
2606         Some callers call setAttribute on a floating element.  So, using 
2607         a RefPtr for the element inside addAttribute can destroy
2608         it.
2609
2610         * khtml/xml/dom_elementimpl.cpp:
2611         (NamedAttrMapImpl::addAttribute):
2612
2613 2005-12-20  Maciej Stachowiak  <mjs@apple.com>
2614
2615         Reviewed by Darin.
2616
2617         - fixed leak in createAttributeMap
2618         http://bugzilla.opendarwin.org/show_bug.cgi?id=6162
2619
2620         * khtml/xml/dom_elementimpl.cpp:
2621         (StyledElementImpl::createAttributeMap): the new attribute map
2622         is going in a RefPtr, don't also ref it manually.
2623
2624 2005-12-20  Maciej Stachowiak  <mjs@apple.com>
2625
2626         Reviewed by Darin.
2627
2628         - change an assignment to a contructor declaration to build with PassRefPtr
2629         leak fix changes
2630
2631         * ksvg2/svg/SVGTransformableImpl.cpp:
2632         (SVGTransformableImpl::parseTransformAttribute):
2633
2634 2005-12-20  Geoffrey Garen  <ggaren@apple.com>
2635
2636         Reviewed by John.
2637
2638         Fixed <rdar://problem/4310363> JavaScript window.open: Height is 1 
2639         pixel short, and related bugs.
2640
2641         There were a few bugs here.
2642         (1) Our code took size arguments and applied them to the window's
2643             content rect. That's incorrect. The Rhino book says the arguments 
2644             should apply to the WebView. Other things that occupy the content 
2645             rect include the tab bar, the status bar, and the 1 pixel border 
2646             between brushed metal and document. All of these used to impinge 
2647             on the web page's display area.
2648
2649             The fix is to calculate sizing based on the WebView instead of
2650             the content rect. This means that the webViewContentRect and 
2651             setContentRect delegate methods are obsolete and no longer called
2652             by any of our code. (setContentRect was never called in the 
2653             first place.)
2654
2655         (2) None of our sizing accounted for scaled resolutions.
2656
2657             The fix is to ask the WebView to scale all coordintes for us.
2658
2659         (3) Our code assumed that all window accoutrements were on by default.
2660             Safari works that way, but other WebKit clients might not.
2661
2662             The fix is always to explicitly set an on/off state.
2663         
2664         (a) To facilitate scaling, I added a new bridge method, webView, to 
2665         access the webView.
2666
2667         (b) For internal consistency, I changed ___Bars to ___bars in bridge 
2668         methods, and ___bars to ___Bars in WinArgs data members. (Interestingly,
2669         the different classes in our code are evenly divided on which format to 
2670         use.)
2671         
2672         Added manual test:
2673         * manual-tests/window-open-features.html: Added.
2674         * manual-tests/resources/200x200.png: Added.
2675         * manual-tests/resources/popup200x200.html: Added.
2676
2677         * khtml/ecma/kjs_window.cpp:
2678         (KJS::showModalDialog): see (b)
2679         (KJS::WindowFunc::callAsFunction): see (b)
2680         * kwq/KWQKHTMLPart.mm:
2681         (KWQKHTMLPart::statusbarVisible): see (b)
2682         * kwq/KWQKHTMLPartBrowserExtension.mm:
2683         (KHTMLPartBrowserExtension::createNewWindow):
2684         At the top of this method, I just did some formatting cleanup and
2685         moved the 'referrer' variable closer to where it's used.
2686         The changes in the middle of the method are (3), the bottom, (2).
2687         * kwq/KWQKPartsBrowserExtension.h:
2688         (KParts::WindowArgs::WindowArgs): see (b)
2689         * kwq/WebCoreBridge.h: see (a)
2690
2691 2005-12-20  Eric Seidel  <eseidel@apple.com>
2692
2693         Reviewed by mjs.
2694
2695         Leaks when running SVG tests
2696         http://bugzilla.opendarwin.org/show_bug.cgi?id=6156
2697         No additional tests necessary, leaks already caught by other tests.
2698
2699         * kcanvas/KCanvasFilters.cpp:
2700         (KCanvasFEDiffuseLighting::setLightSource): takes ownership
2701         (KCanvasFESpecularLighting::setLightSource): takes ownership
2702         * kcanvas/KCanvasFilters.h:
2703         (KCanvasFEDiffuseLighting::KCanvasFEDiffuseLighting): added
2704         (KCanvasFEDiffuseLighting::~KCanvasFEDiffuseLighting): added
2705         (KCanvasFEDiffuseLighting::lightSource): fixed spacing
2706         (KCanvasFESpecularLighting::KCanvasFESpecularLighting): added
2707         (KCanvasFESpecularLighting::~KCanvasFESpecularLighting): added
2708         (KCanvasFESpecularLighting::lightSource): fixed spacing
2709         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
2710         (KRenderingDeviceQuartz::stringForPath): added missing CFRelease
2711
2712 2005-12-20  Eric Seidel  <eseidel@apple.com>
2713
2714         Reviewed by darin.
2715
2716         Remove additional bit-rotted DEBUG* ifdefs from WebCore.
2717         This removes PARSER_DEBUG, FORMS_DEBUG and CSS_STYLESHEET_DEBUG.
2718         http://bugzilla.opendarwin.org/show_bug.cgi?id=5931
2719         No tests possible, only removing dead code.
2720
2721         * khtml/css/css_stylesheetimpl.cpp:
2722         (CSSStyleSheetImpl::parseString):
2723         (CSSStyleSheetImpl::isLoading):
2724         * khtml/html/html_formimpl.cpp:
2725         (DOM::HTMLFormElementImpl::formData):
2726         (DOM::HTMLFormElementImpl::submit):
2727         (DOM::HTMLFormElementImpl::reset):
2728         (DOM::HTMLGenericFormElementImpl::getForm):
2729         * khtml/html/htmlparser.cpp:
2730         (HTMLParser::processCloseTag):
2731         (HTMLParser::createHead):
2732
2733 2005-12-20  Eric Seidel  <eseidel@apple.com>
2734
2735         Reviewed by darin.
2736
2737         Move Decoder onto Shared<T> and clients onto RefPtr.
2738         http://bugzilla.opendarwin.org/show_bug.cgi?id=6107
2739         No test cases possible, no functional changes.
2740
2741         * khtml/ecma/XSLTProcessor.cpp:
2742         (KJS::XSLTProcessorProtoFunc::callAsFunction):
2743         * khtml/ecma/xmlhttprequest.cpp:
2744         (KJS::XMLHttpRequest::XMLHttpRequest):
2745         (KJS::XMLHttpRequest::~XMLHttpRequest):
2746         (KJS::XMLHttpRequest::changeState):
2747         (KJS::XMLHttpRequest::abort):
2748         (KJS::XMLHttpRequest::slotFinished):
2749         (KJS::XMLHttpRequest::slotData):
2750         * khtml/ecma/xmlhttprequest.h:
2751         * khtml/khtml_part.cpp:
2752         (KHTMLPart::clear):
2753         (KHTMLPart::begin):
2754         (KHTMLPart::write):
2755         * khtml/khtmlpart_p.h:
2756         (KHTMLPartPrivate::KHTMLPartPrivate):
2757         * khtml/misc/decoder.cpp:
2758         (Decoder::Decoder):
2759         (Decoder::~Decoder):
2760         * khtml/misc/decoder.h:
2761         * khtml/misc/loader.h:
2762         * khtml/xml/dom_docimpl.cpp:
2763         (DocumentImpl::DocumentImpl):
2764         (DocumentImpl::~DocumentImpl):
2765         (DocumentImpl::prepareMouseEvent):
2766         (DocumentImpl::setDecoder):
2767         * khtml/xml/dom_docimpl.h:
2768         (DOM::DocumentImpl::decoder):
2769         * khtml/xsl/xslt_processorimpl.cpp:
2770         (DOM::XSLTProcessorImpl::createDocumentFromSource):
2771
2772 2005-12-19  Darin Adler  <darin@apple.com>
2773
2774         Reviewed by Maciej.
2775
2776         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6143
2777           DOM::ElementImpl should use a RefPtr for the attribute map
2778
2779         * khtml/xml/dom_elementimpl.cpp:
2780         (ElementImpl::ElementImpl): Remove code to initialize the pointer; not needed since
2781         RefPtr gets initialized to 0.
2782         (ElementImpl::~ElementImpl): Remove code to deref the pointer; RefPtr handles that.
2783         (ElementImpl::attributes): Add get() call to get raw pointer.
2784         (ElementImpl::setAttributeMap): Remove code to deref the old map and set the new map.
2785         But added code to clear the element pointer from the old map (missing in the old
2786         version). Also added a FIXME.
2787         (ElementImpl::createAttributeMap): Remove ref(); RefPtr handles that.
2788         (NamedAttrMapImpl::addAttribute): Use a RefPtr to guarantee the element does not go
2789         away in the middle of dispatching DOM events.
2790         (StyledElementImpl::attributeChanged): Clean up code by using the inline function
2791         mappedAttributes() instead of doing type casts.
2792         (StyledElementImpl::parseMappedAttribute): Ditto.
2793         (StyledElementImpl::getClassList): Ditto.
2794
2795         * khtml/xml/dom_elementimpl.h: Make ElementImpl::namedAttrMap be a RefPtr instead
2796         of raw pointer. Added an overload of StyledElementImpl::mappedAttributes for both
2797         const and non-const.
2798
2799         * khtml/xml/dom_nodeimpl.cpp: (DOM::NodeImpl::addChild): Use a RefPtr to ref/deref
2800         the child so that it doesn't leak.
2801
2802         * khtml/html/htmlparser.h: Changed isindex to use a RefPtr.
2803         * khtml/html/htmlparser.cpp:
2804         (HTMLParser::~HTMLParser): Removed now-unneeded ref.
2805         (HTMLParser::isindexCreateErrorCheck): Remove now-unneeded deref/ref.
2806         (HTMLParser::handleIsindex): Put isindex element into a RefPtr. This prevents a
2807         crash that was otherwise happening during layout tests (caused indirectly by
2808         the changes above).
2809         (HTMLParser::startBody): Added call to get().
2810
2811 2005-12-19  Darin Adler  <darin@apple.com>
2812
2813         Reviewed by Geoff Garen and Eric Seidel.
2814
2815         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4923
2816           stop using <ostream> in WebCore, eliminating the <cmath> troubles it causes
2817
2818         * ForwardingHeaders/kxmlcore/AlwaysInline.h: Added.
2819         * WebCorePrefix.h: Removed the use of <ostream>.
2820
2821         * kwq/KWQDef.h: Removed now-unused Q_INT64, Q_INT16, Q_UINT16, qRound, and _KWQ_IOSTREAM_.
2822
2823         * kwq/KWQKHTMLPart.h: Removed some unneeded headers and added forward-declarations of classes
2824         instead. Corrected some incorrect member function declarations.
2825         * kwq/KWQKHTMLPart.mm: Added a now-needed header.
2826
2827         * khtml/ecma/kjs_window.cpp: Removed the <cmath> workaround.
2828         * khtml/rendering/bidi.cpp: Added include of AlwaysInline.h and removed a
2829         lot of unnecessary includes.
2830         * khtml/rendering/render_canvasimage.cpp: Removed the <cmath> workaround.
2831         * khtml/rendering/render_image.cpp: Removed the <cmath> workaround.
2832         * khtml/rendering/render_text.cpp: Added include of AlwaysInline.h and removed a
2833         lot of unnecessary includes.
2834
2835         * ksvg2/css/SVGCSSStyleSelector.cpp: (KDOM::CSSStyleSelector::applySVGProperty):
2836         * ksvg2/svg/SVGAnimateColorElementImpl.cpp: (SVGAnimateColorElementImpl::calculateColor):
2837         * ksvg2/svg/SVGAnimateTransformElementImpl.cpp: (SVGAnimateTransformElementImpl::handleTimerEvent):
2838         * ksvg2/svg/SVGAnimationElementImpl.cpp: (SVGAnimationElementImpl::closeRenderer):
2839         * ksvg2/svg/SVGLinearGradientElementImpl.cpp: (SVGLinearGradientElementImpl::buildGradient):
2840         * ksvg2/svg/SVGPatternElementImpl.cpp: (SVGPatternElementImpl::notifyAttributeChange):
2841         * ksvg2/svg/SVGRadialGradientElementImpl.cpp: (SVGRadialGradientElementImpl::buildGradient):
2842         Replaced use of qRound with use of lroundf or lround as appropriate.
2843
2844         * kwq/KWQCString.h:
2845         * kwq/KWQCString.mm:
2846         * kwq/KWQDateTime.h:
2847         * kwq/KWQDateTime.mm:
2848         * kwq/KWQMap.h:
2849         * kwq/KWQMemArray.h:
2850         * kwq/KWQPoint.mm:
2851         * kwq/KWQPointArray.h:
2852         * kwq/KWQPtrList.h:
2853         * kwq/KWQPtrStack.h:
2854         * kwq/KWQPtrVector.h:
2855         * kwq/KWQRect.h:
2856         * kwq/KWQRect.mm:
2857         * kwq/KWQSize.h:
2858         * kwq/KWQSize.mm:
2859         * kwq/KWQValueList.h:
2860         Removed _KWQ_IOSTREAM_ code that was used at one time for unit tests, but is now unneeded,
2861         and requires <ostream>.
2862
2863 2005-12-19  Darin Adler  <darin@apple.com>
2864
2865         Reviewed by Geoff Garen and John Sullivan.
2866
2867         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4312
2868           XMLHttpRequest headers that have two CRLF sequences lead to Obj-C exception
2869
2870         I found this by code inspection after examining a security report about
2871         vulnerabilities in other browsers' XMLHttpRequest implementations.
2872
2873         * kwq/KWQLoader.mm:
2874         (+[NSDictionary _webcore_dictionaryWithHeaderString:_webcore_dictionaryWithHeaderString:]):
2875         Check length of string before calling characterAtIndex:0 since it will fail for an empty string.
2876
2877 2005-12-19  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2878
2879         Reviewed by Beth
2880
2881         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6149
2882           REGRESSION (WebCore-417.5): horizontal scrollbar in overflow with top
2883           border doesn't receive mouse events
2884
2885         * khtml/rendering/render_block.cpp:
2886         (khtml::RenderBlock::isPointInScrollbar):
2887         Removed borderTop() from horizontal scrollbar rect computation.
2888         * manual-tests/scrollbar-hittest2.html: Added.
2889
2890 2005-12-19  Alexey Proskuryakov  <ap@nypop.com>
2891
2892         Reviewed by Darin, committed by Adele.
2893
2894         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5744
2895           XMLHttpRequest does not apply page encoding after assigning via innerHtml
2896
2897         * khtml/ecma/xmlhttprequest.cpp:
2898         (getMIMEType): A helper function to get MIME type from a Content-Type string.
2899         (getCharset): A helper function to get charset from a Content-Type string.
2900         (KJS::XMLHttpRequest::getValueProperty): Factored out responseIsXML().
2901         (KJS::XMLHttpRequest::getResponseHeader): Return QString instead of JSValue
2902           (to get rid of unnecessary JSLocks).
2903         (KJS::XMLHttpRequest::responseIsXML): A new method that analyses Content-Type.
2904         (KJS::XMLHttpRequest::slotData): Use a correct charset for responses, see bug for details.
2905         (KJS::XMLHttpRequestProtoFunc::callAsFunction): Update for getResponseHeader() changes
2906         * khtml/ecma/xmlhttprequest.h:
2907
2908 == Rolled over to ChangeLog-2005-12-19 ==