c34f9393488c6bbfb37a526231e53cc8958b320b
[WebKit-https.git] / WebCore / ChangeLog
1 2005-12-29  Geoffrey Garen  <ggaren@apple.com>
2
3         Added test case for <rdar://problem/4268278> Submitting a form in onUnload event
4         handler causes crash in -[WebDataSource(WebPrivate) _commitIfReady:]
5
6         * manual-tests/onunload-form-submit-crash.html: Added.
7
8 2005-12-30  Anders Carlsson  <andersca@mac.com>
9
10         Reviewed by Eric.
11
12                 - Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6297
13                 XMLSerializer should use createMarkup.
14                                 
15         * khtml/ecma/xmlserializer.cpp:
16         (KJS::XMLSerializerProtoFunc::callAsFunction):
17                 Use createMarkup instead of NodeImpl::toString.
18                 
19         * khtml/editing/markup.cpp:
20         (khtml::startMarkup):
21                 escape attribute values and ignore document fragment nodes.
22
23 2005-12-30  Eric Seidel  <eseidel@apple.com>
24
25         Reviewed by mjs.
26
27         No functional changes, thus no layout test.
28
29         Just removes debug NSLog() calls from ksvg2/kcanvas.
30         http://bugzilla.opendarwin.org/show_bug.cgi?id=6299
31
32         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
33         (KCanvasFilterQuartz::prepareFilter):
34         (KCanvasFilterQuartz::applyFilter):
35         (KCanvasFilterQuartz::getCIFilterStack):
36         (KCanvasFilterQuartz::imageForName):
37         (KCanvasFEBlendQuartz::getCIFilter):
38         (KCanvasFEColorMatrixQuartz::getCIFilter):
39         (KCanvasFEGaussianBlurQuartz::getCIFilter):
40         * kcanvas/device/quartz/KCanvasResourcesQuartz.mm:
41         (KCanvasClipperQuartz::applyClip):
42         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
43         (KRenderingDeviceContextQuartz::mapFromVisual):
44         (KRenderingDeviceContextQuartz::mapToVisual):
45         (KRenderingDeviceQuartz::createResource):
46         (KRenderingDeviceQuartz::createFilterEffect):
47         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
48         (drawShadingWithStyle):
49         (KRenderingPaintServerGradientQuartz::updateQuartzGradientCache):
50         * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
51         (KRenderingPaintServerPatternQuartz::draw):
52         * ksvg2/svg/svgpathparser.cpp:
53         (SVGPathParser::parseSVG):
54
55 2005-12-29  Graham Dennis  <Graham.Dennis@gmail.com>
56
57         Reviewed by Hyatt.
58
59         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=3579
60           In-place style-switching is leaving junk behind, messing up styles
61
62         * khtml/rendering/render_block.h: (khtml::RenderBlock::initMaxMarginValues):
63         Set all margin values in all cases.
64
65 2005-12-29  Eric Seidel  <eseidel@apple.com>
66
67         Reviewed by mjs.
68
69         XML documents with "html" in dtd name use XHTML entities when they shouldn't
70         http://bugzilla.opendarwin.org/show_bug.cgi?id=6290
71
72         * khtml/xml/xml_tokenizer.cpp:
73         (khtml::externalSubsetHandler): check for exact xhtml types
74
75 2005-12-29  Eric Seidel  <eseidel@apple.com>
76
77         Reviewed by mjs.
78
79         Close leak in CollectionInfo due to HashMap migration
80         http://bugzilla.opendarwin.org/show_bug.cgi?id=6295
81
82         * khtml/html/html_miscimpl.cpp:
83         (DOM::HTMLCollectionImpl::CollectionInfo::~CollectionInfo):
84         * khtml/html/html_miscimpl.h:
85
86 2005-12-29  Maciej Stachowiak  <mjs@apple.com>
87
88         Reviewed by Eric.
89
90         - finished frame traversal cleanup
91         http://bugzilla.opendarwin.org/show_bug.cgi?id=6293
92         
93         * kwq/WebCoreBridge.h: Removed childFrames method from WebCoreBridge protocol
94         since it is not actually used.
95
96 2005-12-29  Eric Seidel  <eseidel@apple.com>
97
98         Reviewed by mjs.
99
100         Leaks in XSLTProcessorImpl due to early exit in failure case
101         http://bugzilla.opendarwin.org/show_bug.cgi?id=6101
102
103         * khtml/xsl/xslt_processorimpl.cpp:
104         (DOM::xmlDocPtrFromNode): add "shouldDelete" argument
105         (DOM::XSLTProcessorImpl::transformToString): delete new'd xmlDoc
106
107 2005-12-29  Eric Seidel  <eseidel@apple.com>
108
109         File accidentally omitted from previous commit.
110
111         Remove QDict from khtml/html
112         http://bugzilla.opendarwin.org/show_bug.cgi?id=6230
113
114         * khtml/ecma/kjs_html.cpp:
115         (KJS::KJS::HTMLCollection::getNamedItems):
116
117 2005-12-29  Eric Seidel  <eseidel@apple.com>
118
119         Reviewed by mjs.
120
121         Remove QDict from khtml/html
122         http://bugzilla.opendarwin.org/show_bug.cgi?id=6230
123         Uses HashMap instead.
124
125         * khtml/html/html_miscimpl.cpp:
126         (DOM::HTMLCollectionImpl::CollectionInfo::CollectionInfo):
127         (DOM::HTMLCollectionImpl::CollectionInfo::reset):
128         (DOM::HTMLCollectionImpl::namedItem):
129         (DOM::HTMLCollectionImpl::updateNameCache):
130         (DOM::HTMLCollectionImpl::namedItems):
131         (DOM::HTMLCollectionImpl::nextNamedItem):
132         (DOM::HTMLFormCollectionImpl::nextNamedItemInternal):
133         (DOM::HTMLFormCollectionImpl::updateNameCache):
134         * khtml/html/html_miscimpl.h:
135
136 2005-12-29  Eric Seidel  <eseidel@apple.com>
137
138         Reviewed by mjs.
139
140         DOMString/DOMStringImpl/AtomicString need enhancements before replacing QString
141         http://bugzilla.opendarwin.org/show_bug.cgi?id=6228
142         Added find(), contains(), startsWith() and endsWith() to DOMString
143         Uses the above functions throughout the code.
144         Small performance boost.
145
146         * khtml/css/css_base.cpp:
147         (CSSSelector::print):
148         * khtml/css/css_ruleimpl.cpp:
149         (DOM::CSSImportRuleImpl::init):
150         * khtml/css/css_valueimpl.cpp:
151         (DOM::CSSStyleDeclarationImpl::setProperty):
152         * khtml/css/cssparser.cpp:
153         (CSSParser::parseValue):
154         (CSSParser::parseDeclaration):
155         (CSSParser::parseContent):
156         * khtml/css/cssstyleselector.cpp:
157         (khtml::CSSStyleSelector::CSSStyleSelector):
158         (khtml::CSSStyleSelector::setEncodedURL):
159         (khtml::parseUASheet):
160         (khtml::cleanpath):
161         (khtml::CSSStyleSelector::checkSelector):
162         (khtml::CSSStyleSelector::checkOneSelector):
163         (khtml::CSSRuleSet::addRulesFromSheet):
164         (khtml::CSSStyleSelector::applyProperty):
165         * khtml/dom/dom_string.cpp:
166         * khtml/dom/dom_string.h:
167         (DOM::DOMString::contains):
168         (DOM::DOMString::find):
169         (DOM::DOMString::startsWith):
170         (DOM::DOMString::endsWith):
171         * khtml/html/html_formimpl.cpp:
172         (DOM::HTMLFormElementImpl::parseEnctype):
173         * khtml/khtml_part.cpp:
174         (KHTMLPart::requestFrame):
175         (KHTMLPart::submitForm):
176         * khtml/misc/decoder.cpp:
177         (Decoder::decode):
178         * khtml/xml/dom_atomicstring.h:
179         (DOM::AtomicString::length):
180         (DOM::AtomicString::operator []):
181         (DOM::AtomicString::contains):
182         (DOM::AtomicString::find):
183         (DOM::AtomicString::startsWith):
184         (DOM::AtomicString::endsWith):
185         * khtml/xml/dom_docimpl.cpp:
186         (DocumentImpl::processHttpEquiv):
187         * khtml/xml/dom_stringimpl.cpp:
188         (DOM::equal):
189         (DOM::equalCaseInsensitive):
190         (DOM::DOMStringImpl::find):
191         (DOM::DOMStringImpl::endsWith):
192         * khtml/xml/dom_stringimpl.h:
193         (DOM::DOMStringImpl::startsWith):
194
195 2005-12-29  Rob Buis  <rwlbuis@xs4all.nl>
196
197         Reviewed by eseidel.
198
199         WebCore+SVG has some problems with rounded rectangles
200         http://bugzilla.opendarwin.org/show_bug.cgi?id=6157
201
202         * ksvg2/svg/SVGRectElementImpl.cpp:
203         (SVGRectElementImpl::toPathData): fixed round rect calculations
204
205 2005-12-29  Mark Rowe  <opendarwin.org@bdash.net.nz>
206
207         Reviewed by eseidel, ggaren, darin.
208         
209         - http://bugzilla.opendarwin.org/show_bug.cgi?id=4301
210         Support HTML entities on pages parsed as XHTML
211
212         Added layout tests:
213         * fast/parser/entities-in-xhtml.xhtml
214
215         * khtml/xml/xml_tokenizer.cpp:
216         (khtml::XMLTokenizer::setIsXHTMLDocument): Track whether the XML document is XHTML.
217         (khtml::XMLTokenizer::isXHTMLDocument): Ditto.
218         (khtml::externalSubsetHandler): Ditto.
219         (khtml::XMLTokenizer::finish): Ditto.
220         (khtml::getXHTMLEntity): Look up the HTML entity.
221         (khtml::getEntityHandler): Look up the HTML entity if this is an XHTML document.
222         * khtml/html/kentities.h: Added.
223         * khtml/html/kentities.gperf: changed entity to Entity
224
225 2005-12-29  Mitz Pettel  <opendarwin.org@mitzpettel.com>
226
227         Reviewed by darin
228
229         - WebCore part of fix for
230           http://bugzilla.opendarwin.org/show_bug.cgi?id=3922
231           Variable word/letter spacing and full justification not supported for
232           ATSUI-rendered text
233
234         * khtml/rendering/font.h:
235         (khtml::Font::checkSelectionPoint): Make sure the complete run, used for
236         counting spaces and determining padding per space does not go beyond the
237         text box.
238
239 2005-12-28  Geoffrey Garen  <ggaren@apple.com>
240
241         Reviewed by mjs.
242
243         - Fixed <rdar://problem/4325722> crash in KJS::Bindings::dispatchJNICall
244         due to liveconnect call from Java after Java PlugInView has been 
245         deallocated @ www.binarybet.com
246         AKA
247         http://bugzilla.opendarwin.org/show_bug.cgi?id=5518
248
249         We had code that checked for whether a call came from a live PlugIn,
250         but the live PlugIn dictionary would only get cleared when the 
251         KWQKHTMLPart was destroyed. Since a single part can service multiple
252         loads, the dictionary needs to clear after each one.
253
254         No layout test because this bug is difficult to reproduce.
255
256         * kwq/KWQKHTMLPart.mm:
257         (KWQKHTMLPart::~KWQKHTMLPart):
258         (1) Unrelated cleanup: Removed manual clearing of form values,
259         replaced with call to clearRecordedFormValues().
260         (2) Replaced PlugIn dictionary cleanup code and view deref call
261         with call to setView(0), since much of this code was duplicated in
262         setView, and the stuff that wasn't duplicated needed to be.
263
264         (KWQKHTMLPart::setView):
265         (1) Removed some unnecessary braces.
266         (2) Added PlugIn dictionary cleanup code.
267         (3) New behavior: clear _bindingRoot and _windowScriptObject after
268         each view change. This is needed because after a call to
269         clenaupPluginRootObjects(), both objects have stale references.
270         (4) Changed a NULL to a 0.
271
272         (KWQKHTMLPart::cleanupPluginRootObjects): Removed extra space.
273
274 2005-12-28  Anders Carlsson  <andersca@mac.com>
275
276         Reviewed by Maciej.
277
278         - Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6268
279         Add undetectable document.all
280         
281         * khtml/ecma/kjs_html.cpp:
282         (KJS::HTMLDocument::getValueProperty):
283         If "all" has been set to a new value, return the new value.
284         
285         (KJS::KJS::HTMLDocument::putValueProperty):
286         Allow "all" to be set to a new value.
287         
288         (KJS::HTMLAllCollection::toPrimitive):
289         Return jsNull() if the preferred type is NullType.
290         
291         (KJS::getAllHTMLCollection):
292         * khtml/ecma/kjs_html.h:
293         (KJS::HTMLAllCollection::HTMLAllCollection):
294         Add HTMLAllCollection, a subclass of HTMLCollection which should
295         be undetectable.
296         
297         (KJS::HTMLAllCollection::toBoolean):
298         Return false.
299
300 2005-12-28  Mitz Pettel  <opendarwin.org@mitzpettel.com>
301
302         Reviewed by Eric, landed by ap.
303         
304         Test: fast/block/basic/text-indent-rtl.html
305
306         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6214
307           text-indent in RTL block does the opposite
308
309         * khtml/rendering/render_block.cpp:
310         (khtml::RenderBlock::rightRelOffset): Subtract the indent instead of adding it.
311
312 2005-12-28  Mitz Pettel  <opendarwin.org@mitzpettel.com>
313
314         Reviewed by Darin, landed by ap.
315
316         Test: fast/dom/HTMLScriptElement/script-load-events.html
317
318         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5812
319           Generate load events for <script> elements
320
321         * khtml/html/html_headimpl.cpp:
322         (HTMLScriptElementImpl::parseMappedAttribute): Parse the onload and onerror attributes.
323         (HTMLScriptElementImpl::closeRenderer): Call base class's implementation.
324         (HTMLScriptElementImpl::notifyFinished): Dispatch load and error events.
325         * khtml/html/htmlparser.h:
326         * khtml/html/htmlparser.cpp:
327         (HTMLParser::parseToken): Return the node that was inserted.
328         * khtml/html/htmltokenizer.h: Added scriptNode, a RefPtr to the node corresponding
329         to the current load request.
330         * khtml/html/htmltokenizer.cpp:
331         (HTMLTokenizer::scriptHandler): Reset scriptNode if a load request was not made.
332         (HTMLTokenizer::parseTag): Set scriptNode to the node created from the script tag.
333         (HTMLTokenizer::processToken): Return the node that was inserted.
334         (HTMLTokenizer::notifyFinished): Reset scriptNode and dispatch load and error events.
335         * khtml/misc/loader.h:
336         (CachedScript::errorOccurred): Added.
337         * khtml/misc/loader.cpp:
338         (CachedScript::CachedScript):
339         (CachedScript::error):
340
341 2005-12-28  Alexey Proskuryakov  <ap@nypop.com>
342
343         Reviewed by Maciej.
344
345         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6246
346           TextIterator::rangeFromLocationAndLength() returns nil range for an 
347           empty document
348
349         Test: editing/input/range-for-empty-document.html
350
351         * khtml/editing/visible_text.cpp:
352         (khtml::TextIterator::rangeFromLocationAndLength):
353         Handle the case of an empty document and (0, 0) requested range.
354
355 2005-12-28  Anders Carlsson  <andersca@mac.com>
356
357         Reviewed and landed by Geoff.
358
359         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6269
360         ToT memory corruption
361         
362         * khtml/rendering/render_text.cpp:
363         (khtml::RenderText::setText):
364         Remove deref().
365         
366 2005-12-27  Mitz Pettel  <opendarwin.org@mitzpettel.com>
367
368         Reviewed by Hyatt, landed by Darin.
369         
370         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5699
371           REGRESSION: incomplete repaint
372
373         * khtml/rendering/render_object.cpp:
374         (RenderObject::repaintAfterLayoutIfNeeded): Return false if only the
375         size changed and not everything was repainted.
376         * manual-tests/bugzilla-5699.html: Added.
377
378 2005-12-27  Sam Weinig  <sam.weinig@gmail.com>
379
380         Reviewed by Maciej, landed by Darin.
381
382         - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=4101>
383         CSS Fibonacci spiral using 4 images doesn't render correctly
384
385         Added layout tests:
386         * fast/replaced/absolute-image-sizing.html
387
388         * khtml/rendering/render_box.cpp:
389         (RenderBox::calcAbsoluteHorizontalValues): Use calcReplacedWidth() instead of intrinsicWidth()
390         for replaced elements.
391         (RenderBox::calcAbsoluteVerticalValues): Same thing for height.
392
393 2005-12-27  Darin Adler  <darin@apple.com>
394
395         Reviewed by Geoff and Eric.
396
397         - http://bugzilla.opendarwin.org/show_bug.cgi?id=6198
398           use RefPtr a few places in RenderText and related classes
399
400         * khtml/html/htmltokenizer.h: Use RefPtr for some data members in Token.
401         Also removed use of bitfields in Token, since there's no need to optimize storage here.
402         * khtml/html/htmlparser.cpp:
403         (HTMLParser::parseToken): Update for use of RefPtr in Token.
404         (HTMLParser::textCreateErrorCheck): Ditto.
405         (HTMLParser::commentCreateErrorCheck): Ditto.
406         (HTMLParser::handleIsindex): Ditto.
407         * khtml/html/htmltokenizer.cpp:
408         (khtml::Token::addAttribute): Ditto.
409         (khtml::HTMLTokenizer::processToken): Ditto.
410
411         * khtml/rendering/render_text.h: Reduce the number of includes, change
412         SOFT_HYPHEN from a macro into a constant. Change originalString function
413         to return a PassRefPtr instead of a RefPtr. Make str and m_generatedContentStr
414         member be a RefPtr.
415         * khtml/rendering/render_text.cpp:
416         (khtml::RenderText::previousOffset): Update for use of RefPtr for str.
417         (khtml::RenderText::nextOffset): Ditto.
418         (khtml::RenderText::RenderText): Ditto.
419         (khtml::RenderText::originalString): Change to return PassRefPtr, even though
420         it's not necessary at this level (since it's a virtual function).
421         (khtml::RenderText::posOfChar): Update for use of RefPtr for str.
422         (khtml::RenderText::setText): Ditto.
423         (khtml::RenderTextFragment::RenderTextFragment): Ditto.
424         (khtml::RenderTextFragment::originalString): Change to return PassRefPtr.
425
426         * khtml/html/html_inlineimpl.cpp: Re-sorted list of includes, added newly-needed ones.
427         * kwq/KWQRenderTreeDebug.cpp: Added new include needed since QPtrVector is no longer
428         included by render_text.h.
429
430 2005-12-27  Darin Adler  <darin@apple.com>
431
432         Fix suggested by Mitz.
433
434         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6240
435           REGRESSION: scrollbars in overflows don't work
436
437         * khtml/xml/dom2_eventsimpl.cpp: (DOM::MouseRelatedEventImpl::computePositions):
438         Remove the code to compute pageX/Y from clientX/Y, because clientX/Y are not passed
439         in correctly (in fact, what's passed in is pageX/Y)! I accidentally included part
440         of my fix for clientX/Y in the original patch.
441
442 2005-12-27  Maks Orlovich <maksim@kde.org>
443
444         Reviewed and landed by Maciej.
445
446         - fixed 4405: <button> not listed in form collections.
447         http://bugzilla.opendarwin.org/show_bug.cgi?id=4405
448
449         Test: fast/forms/button-in-forms-collection.html
450         
451         * khtml/html/html_formimpl.h:
452         (DOM::HTMLButtonElementImpl::isEnumeratable): override to return true
453
454 2005-12-25  Maciej Stachowiak  <mjs@apple.com>
455
456         Reviewed by Geoff.
457
458         - Remove WebFrame's parent frame pointer, instead rely on WebCore's parent concept
459         http://bugzilla.opendarwin.org/show_bug.cgi?id=6241
460
461         * kwq/WebCoreBridge.h:
462         * kwq/WebCoreBridge.mm:
463         (-[WebCoreBridge parent]): New method, relies on the KHTMLPart's
464         parent pointer.
465
466 2005-12-24  Mitz Pettel  <opendarwin.org@mitzpettel.com>
467
468         Reviewed by eseidel.
469         
470         Test: fast/forms/domstring-replace-crash.html
471
472         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6236
473           REGRESSION: Crash in DOMString::replace() in ToT (12/24/05)
474
475         * khtml/dom/dom_string.h:
476         (DOMString::replace): Added check for null m_impl.
477
478 2005-12-24  Maciej Stachowiak  <mjs@apple.com>
479
480         Reviewed by Eric.
481
482         - replaced QPtrDict for Accessors structs with HashMap (also renamed some
483         stray getSetInfo methods)
484         http://bugzilla.opendarwin.org/show_bug.cgi?id=6223
485
486         * khtml/ecma/kjs_html.cpp:
487         (KJS::HTMLElement::accessors):
488         (KJS::HTMLElement::getValueProperty):
489         (KJS::HTMLElement::putValueProperty):
490         * khtml/ecma/kjs_html.h:
491
492 2005-12-24  Geoffrey Garen  <ggaren@apple.com>
493
494         Reviewed by eric.
495
496         http://bugzilla.opendarwin.org/show_bug.cgi?id=6231
497
498         - Fixed assertion failure in QString::mid caused by my last checkin. 
499         parseWindowFeatures() sometimes called QString::mid() with a start 
500         index past the end of the string but a length of 0. There were two 
501         problems there. (1) parseWindowFeatures() shouldn't have gotten past 
502         the end of the string. (2) QString had range truncating code that was 
503         borked. So I fixed both.
504
505         * khtml/ecma/kjs_window.cpp:
506         (KJS::parseWindowFeatures): One of the "past the end" tests was > 
507         instead of >=.
508         * kwq/KWQString.mm:
509         (QString::mid): Truncate length *before* deciding whether to return 
510         early. Also, compare start and data._length before computing 
511         data._length - start, because the error case we're trying to catch 
512         will almost certainly cause unsigned overflow.
513         * manual-tests/window-open-features-parsing.html: Added trailing ',' 
514         to uber-test to catch this failure, too.
515
516 2005-12-24  Mitz Pettel  <opendarwin.org@mitzpettel.com>
517
518         Reviewed by Maciej.
519
520         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6221
521           REGRESSION: Password field is blank error for secure websites using
522           password field (ToT, 12/24/05)
523
524         * khtml/kwq/KWQSlot.mm:
525         (KWQSlot::KWQSlot): Changed the parameter type of slotTextChanged to const DOMString &
526         * khtml/rendering/render_form.h:
527         * khtml/rendering/render_form.cpp:
528         (RenderLineEdit::RenderLineEdit): ditto.
529         (RenderLineEdit::slotTextChanged): ditto.
530         (RenderFileButton::RenderFileButton): ditto.
531         (RenderFileButton::slotTextChanged): ditto.
532
533 2005-12-22  Geoffrey Garen  <ggaren@apple.com>
534     
535         Reviewed by vicki (yay!), eric.
536
537         - Fixed: <rdar://problem/4377597> parsing of window.open features strings needs to be more forgiving
538
539         Manual test case: WebCore/manual-tests/window-open-features-parsing.html
540         Also fixed: WebCore/manual-tests/window-open-features.html, which had an incorrect URL in it.
541
542         This patch is long. Luckily, it's also complicated.
543
544         The main thing I've done is to change our parsing of the window.open 'features' argument to match Win IE.
545         This is important because we now implement the correct defaults for window.open, and resizing and
546         scrolling are turned off by default. So, if we parse the 'features' string incorrectly, we'll end
547         up with an annoying, incorrectly sized window that can't resize or scroll.
548
549         To honor a long-standing request by Eric, I factored out the parsing into two new functions:
550         parseWindowFeatures and constrainToScreen. I also added support for "innerWidth" and "innerHeight,"
551         since they're just synonyms for "width" and "height."
552
553         * khtml/ecma/kjs_window.cpp: removed "emit" statements, since emit is #defined as ""
554         (KJS::parseDialogFeatures): renamed from parseFeatures, since we now have a 'parseWindowFeatures'.
555         (KJS::showModalDialog): ditto on parseFeatures. Also added some missing initializations for WindowArgs data members.
556         (KJS::parseWindowFeatures): new function, all new functionality.
557         (KJS::constrainToScreen): new function, no new functionality -- just cut and pasted code that used to run as
558         part of our parsing routine.
559         (KJS::WindowFunc::callAsFunction):
560         (1) Factored out previous parsing code.
561         (2) Factored 17 lines of custom popup-blocking code into 3 lines that use pre-existing 'allowPopUp' function.
562             Gratuitous, but it cried out to me.
563         (3) Changed URL parsing to substitute "" for undefined *and* null values (we already did this for undefined),
564             to avoid trying to navigate to 'http://null'.
565         (4) Factore a multiline if () { if () {}} into an if ( && )
566         (4) Removed the main body of code from a giant 'else' block by inserting early returns for the exceptional cases.
567             This caused some things to show up in the diff even though they're just whitespace changes.
568             I didn't actually change any code past the line "if (!str.isEmpty() && activePart)"
569         * kwq/KWQKHTMLPartBrowserExtension.mm:
570         (KHTMLPartBrowserExtension::createNewWindow): Added code to set toolbars to visible if toolBarVisible is true *or*
571         locationBarVisible is true. The parser used to do this for us, but it's really the browser that's responsible for
572         saying that the toolbar and the locationbar are the same thing. Hopefully, we can add a setLocationBarVisible delegate
573         in the future so that other webkit clients can make their own UI decisions.
574         * kwq/KWQKPartsBrowserExtension.h: Added locationBarVisible data member to WindowArgs structure and renamed
575         toolBarsVisible to toolBarVisible (see above). Removed initialization code from WindowArgs structure because
576         this file is for platform-specific code, and what defaults to use for window arguments is purely engine stuff.
577
578 2005-12-23  Eric Seidel  <eseidel@apple.com>
579
580         Reviewed by mjs.
581
582         Remove many use of .qstring()
583         Convert several instances of QStrings to DOMStrings
584         Add DOMString::replace(QChar, QChar)
585         Remove (unused) KWQLabel, KWQKGlobal
586         Slight performance improvement.
587         Also fixed ChangeLog line endings from previous commit.
588         http://bugzilla.opendarwin.org/show_bug.cgi?id=6138
589
590         No tests needed, no functionality changes.
591
592         * ChangeLog: Fixed line endings
593         * ForwardingHeaders/kglobal.h: Removed.
594         * ForwardingHeaders/qlabel.h: Removed.
595         * WebCore.xcodeproj/project.pbxproj: removed KWQLabel
596         * khtml/css/css_base.cpp:
597         (CSSSelector::selectorText):
598         * khtml/css/css_stylesheetimpl.cpp:
599         (MediaListImpl::setMediaText):
600         * khtml/css/cssstyleselector.cpp:
601         (khtml::checkPseudoState):
602         * khtml/dom/dom_string.h:
603         (DOM::DOMString::replace):
604         * khtml/ecma/kjs_css.cpp:
605         (KJS::DOMCSSStyleDeclaration::put):
606         * khtml/ecma/kjs_dom.cpp:
607         (KJS::DOMNode::put):
608         (KJS::DOMAttr::put):
609         (KJS::DOMDocument::put):
610         * khtml/ecma/kjs_events.cpp:
611         (KJS::JSAbstractEventListener::handleEvent):
612         * khtml/ecma/kjs_html.cpp:
613         (KJS::KJS::HTMLDocument::put):
614         (KJS::KJS::HTMLElementFunction::callAsFunction):
615         (KJS::KJS::HTMLElement::put):
616         (KJS::KJS::Context2DFunction::callAsFunction):
617         (KJS::Context2D::putValueProperty):
618         * khtml/ecma/kjs_proxy.cpp:
619         (KJSProxyImpl::evaluate):
620         * khtml/ecma/kjs_window.cpp:
621         (KJS::Window::isSafeScript):
622         (KJS::WindowFunc::callAsFunction):
623         (KJS::ScheduledAction::execute):
624         * khtml/ecma/xmlhttprequest.cpp:
625         (KJS::XMLHttpRequest::send):
626         (KJS::XMLHttpRequestProtoFunc::callAsFunction):
627         * khtml/ecma/xmlhttprequest.h:
628         * khtml/editing/jsediting.cpp:
629         (DOM::JSEditor::queryCommandSupported):
630         * khtml/editing/markup.cpp:
631         (khtml::stringValueForRange):
632         (khtml::startMarkup):
633         * khtml/html/html_baseimpl.cpp:
634         (HTMLBodyElementImpl::parseMappedAttribute):
635         * khtml/html/html_elementimpl.cpp:
636         (HTMLElementImpl::addHTMLAlignment):
637         * khtml/html/html_formimpl.cpp:
638         (DOM::HTMLFormElementImpl::formData):
639         (DOM::HTMLInputElementImpl::appendFormData):
640         (DOM::HTMLTextAreaElementImpl::updateValue):
641         * khtml/html/html_headimpl.cpp:
642         (HTMLLinkElementImpl::parseMappedAttribute):
643         * khtml/html/html_imageimpl.cpp:
644         (DOM::HTMLImageElementImpl::parseMappedAttribute):
645         * khtml/html/html_objectimpl.cpp:
646         (DOM::HTMLObjectElementImpl::parseMappedAttribute):
647         (DOM::HTMLParamElementImpl::isURLAttribute):
648         * khtml/html/html_objectimpl.h:
649         * khtml/html/html_tableimpl.cpp:
650         (DOM::HTMLTableElementImpl::addChild):
651         (DOM::HTMLTableElementImpl::parseMappedAttribute):
652         (DOM::HTMLTablePartElementImpl::parseMappedAttribute):
653         (DOM::HTMLTableSectionElementImpl::addChild):
654         (DOM::HTMLTableRowElementImpl::addChild):
655         * khtml/html/htmltokenizer.cpp:
656         (khtml::HTMLTokenizer::parseTag):
657         * khtml/khtml_part.cpp:
658         (KHTMLPart::executeScript):
659         (KHTMLPart::checkEmitLoadEvent):
660         * khtml/misc/loader.cpp:
661         (CachedObject::finish):
662         (CachedCSSStyleSheet::checkNotify):
663         (CachedXSLStyleSheet::checkNotify):
664         (CachedXBLDocument::checkNotify):
665         (DocLoader::requestImage):
666         (DocLoader::requestStyleSheet):
667         (DocLoader::requestScript):
668         (Loader::servePendingRequests):
669         (Loader::cancelRequests):
670         * khtml/rendering/render_applet.cpp:
671         * khtml/rendering/render_block.cpp:
672         (khtml::RenderBlock::updateFirstLetter):
673         * khtml/rendering/render_box.cpp:
674         (RenderBox::~RenderBox):
675         * khtml/rendering/render_form.cpp:
676         (RenderFormElement::slotTextChanged):
677         (RenderLineEdit::updateFromElement):
678         (RenderTextArea::updateFromElement):
679         (RenderTextArea::text):
680         * khtml/rendering/render_form.h:
681         * khtml/rendering/render_frames.cpp:
682         (RenderPartObject::updateWidget):
683         * khtml/rendering/render_line.cpp:
684         (khtml::EllipsisBox::paint):
685         * khtml/rendering/render_list.cpp:
686         (RenderListItem::paint):
687         (RenderListMarker::paint):
688         * khtml/rendering/render_text.cpp:
689         (khtml::RenderText::RenderText):
690         (khtml::RenderText::position):
691         * khtml/xml/dom_docimpl.cpp:
692         (DOMImplementationImpl::hasFeature):
693         (DocumentImpl::getElementByAccessKey):
694         (DocumentImpl::recalcStyleSelector):
695         (DocumentImpl::defaultEventHandler):
696         * khtml/xml/dom_elementimpl.cpp:
697         (ElementImpl::recalcStyle):
698         * khtml/xml/dom_nodeimpl.cpp:
699         (DOM::NodeImpl::dump):
700         (DOM::appendAttributeDesc):
701         (DOM::NodeImpl::showNode):
702         * khtml/xml/dom_stringimpl.cpp:
703         (DOM::DOMStringImpl::lower):
704         * khtml/xml/xml_tokenizer.cpp:
705         (khtml::XMLTokenizer::executeScripts):
706         * khtml/xsl/xsl_stylesheetimpl.cpp:
707         (DOM::XSLStyleSheetImpl::loadChildSheets):
708         * kwq/KWQKHTMLPart.h:
709         * kwq/KWQKHTMLPart.mm:
710         (KWQKHTMLPart::documentViewForNode):
711         (KWQKHTMLPart::runJavaScriptAlert):
712         (KWQKHTMLPart::runJavaScriptConfirm):
713         (KWQKHTMLPart::runJavaScriptPrompt):
714         (KWQKHTMLPart::addMessageToConsole):
715         (KWQKHTMLPart::passWheelEventToChildWidget):
716         (KWQKHTMLPart::shouldDragAutoNode):
717         (KWQKHTMLPart::snapshotDragImage):
718         (convertAttributesToUnderlines):
719         (KWQKHTMLPart::setMarkedTextRange):
720         (KWQKHTMLPart::mousePressNode):
721         * kwq/KWQKGlobal.h: Removed.
722         * kwq/KWQKGlobal.mm: Removed.
723         * kwq/KWQLabel.h: Removed.
724         * kwq/KWQLabel.mm: Removed.
725         * kwq/KWQLineEdit.h:
726         * kwq/KWQLineEdit.mm:
727         (QLineEdit::setText):
728         (QLineEdit::text):
729         (QLineEdit::setAutoSaveName):
730         (QLineEdit::setPlaceholderString):
731         * kwq/KWQPainter.mm:
732         (QPainter::compositeOperatorFromString):
733         * kwq/KWQSignal.h:
734         * kwq/KWQSignal.mm:
735         (KWQSignal::call):
736         * kwq/KWQSlot.h:
737         * kwq/KWQSlot.mm:
738         (KWQSlot::call):
739         * kwq/KWQString.h:
740         * kwq/KWQString.mm:
741         * kwq/KWQTextEdit.h:
742         * kwq/KWQTextEdit.mm:
743         (QTextEdit::setText):
744         (QTextEdit::text):
745         (QTextEdit::textWithHardLineBreaks):
746         * ksvg2/scripts/cssmakeprops: removed kglobal.h
747         * ksvg2/scripts/cssmakevalues: removed kglobal.h
748
749 2005-12-23  Alexey Proskuryakov  <ap@nypop.com>
750
751         Reviewed by Eric Seidel.
752
753         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5924
754           Zero-length responses to XMLHTTPRequest mishandled
755
756         * khtml/ecma/xmlhttprequest.cpp (KJS::XMLHttpRequest::slotFinished):
757           Make sure to fetch response headers and set the state to Loaded, if
758           this hasn't been done already.
759
760 2005-12-23  Alexey Proskuryakov  <ap@nypop.com>
761
762         Reviewed by Eric Seidel.
763
764         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=3565
765           Posting data via XML HTTP Request doesnt work
766
767         * khtml/ecma/xmlhttprequest.cpp:
768         (KJS::XMLHttpRequest::send): Set application/xml as a default Content-Type;
769           use a proper codec for request body if a charset is specified.
770         (KJS::XMLHttpRequest::getRequestHeader): Use getSpecificHeader.
771         (KJS::XMLHttpRequest::getResponseHeader): Ditto.
772         (KJS::XMLHttpRequest::getSpecificHeader): Factored out code from getResponseHeader.
773         (KJS::XMLHttpRequestProtoFunc::callAsFunction): Removed a FIXME (this is done in send() now).
774         * khtml/ecma/xmlhttprequest.h:
775
776 2005-12-22  Alexey Proskuryakov  <ap@nypop.com>
777
778         Reviewed by Darin Adler.
779
780         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6118
781         Investigate not using the frameset charset as a default for frames
782
783         * khtml/khtml_part.cpp (KHTMLPart::write):
784         Do not use the parent frame encoding as a default for sub-frames (revert
785         rdar://3100151). 
786
787 2005-12-22  Maciej Stachowiak  <mjs@apple.com>
788
789         Reviewed by Eric.
790
791         - made RefPtr<DOMStringImpl> usable as a hashtable key/value
792         - changed XSLTProcessorImpl to make use of this instead of a QDict.
793         - partially fixed broken param handling for xslt
794
795         See LayoutTests for updated test case.
796
797         * khtml/xml/dom_stringimpl.cpp:
798         * khtml/xml/dom_stringimpl.h:
799         (KXMLCore::): Set things up so you can use RefPtr<DOMStringImpl> as
800         a hashtable key (should already be usable as a value).
801         * khtml/xsl/xslt_processorimpl.cpp:
802         (DOM::xsltParamArrayFromParameterMap): Updated to use a HashMap of RefPtrs instead
803         of QDict. Also, fixed bugs that would have kept this from ever working at all.
804         (DOM::XSLTProcessorImpl::transformToString): ditto
805         (DOM::XSLTProcessorImpl::setParameter): ditto
806         (DOM::XSLTProcessorImpl::getParameter): ditto
807         (DOM::XSLTProcessorImpl::removeParameter): ditto
808         * khtml/xsl/xslt_processorimpl.h:
809
810 2005-12-21  Maciej Stachowiak  <mjs@apple.com>
811
812         Reviewed by Darin.
813
814         - update for new HashTranslator stuff
815
816         * khtml/xml/dom_atomicstring.cpp:
817         (DOM::CStringTranslator::hash):
818         (DOM::CStringTranslator::equal):
819         (DOM::CStringTranslator::translate):
820         (DOM::AtomicString::equal):
821         (DOM::AtomicString::add):
822         (DOM::QCharBufferTranslator::hash):
823         (DOM::QCharBufferTranslator::equal):
824         (DOM::QCharBufferTranslator::translate):
825         * khtml/xml/dom_qname.cpp:
826         (DOM::QNameComponentsTranslator::hash):
827         (DOM::QNameComponentsTranslator::equal):
828         (DOM::QNameComponentsTranslator::translate):
829         (DOM::QualifiedName::QualifiedName):
830
831 2005-12-22  Adele Peterson  <adele@apple.com>
832
833         Reviewed by Darin.
834
835         Cleaned up a previous checkin by defining global const defaultForm.
836
837         * khtml/xml/dom_docimpl.cpp:
838         (DocumentImpl::radioButtonChecked):
839         (DocumentImpl::checkedRadioButtonForGroup):
840         (DocumentImpl::removeRadioButtonGroup):
841
842 2005-12-22  Adele Peterson  <adele@apple.com>
843
844         Reviewed by Tim Hatcher.
845
846         Fixed <rdar://problem/4387433> Seed: Radio buttons behave incorrectly in Gmail settings
847
848         * khtml/html/html_formimpl.cpp:
849         (DOM::HTMLFormElementImpl::registerFormElement): update radio button hash map when moving form elements around.
850         (DOM::HTMLGenericFormElementImpl::insertedIntoTree): ditto.
851         * khtml/html/html_formimpl.h:
852         (DOM::HTMLGenericFormElementImpl::isRadioButton): Added.
853         (DOM::HTMLInputElementImpl::isRadioButton): Added.
854         * khtml/xml/dom_docimpl.cpp:
855         (DocumentImpl::radioButtonChecked): 
856         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.
857         (DocumentImpl::checkedRadioButtonForGroup): Added conversion of null form pointer to 1.
858         (DocumentImpl::removeRadioButtonGroup): ditto.
859
860 2005-12-22  Anders Carlsson  <andersca@mac.com>
861
862         Reviewed by Eric.
863
864         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6196
865         Would like to be able to define prototypes in headers
866
867         * khtml/ecma/XSLTProcessor.cpp:
868         * khtml/ecma/domparser.cpp:
869         * khtml/ecma/kjs_css.cpp:
870         * khtml/ecma/kjs_dom.cpp:
871         * khtml/ecma/kjs_events.cpp:
872         * khtml/ecma/kjs_html.cpp:
873         * khtml/ecma/kjs_range.cpp:
874         * khtml/ecma/kjs_traversal.cpp:
875         * khtml/ecma/kjs_views.cpp:
876         * khtml/ecma/xmlhttprequest.cpp:
877         * khtml/ecma/xmlserializer.cpp:
878         Update for changes to JSC.
879
880 2005-12-22  Darin Adler  <darin@apple.com>
881
882         Reviewed by NOBODY (OOPS!).
883
884         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6198
885           use RefPtr a few places in RenderText and related classes
886
887         * khtml/html/htmlparser.cpp:
888         (HTMLParser::parseToken): Use get since text pointer is RefPtr now.
889         (HTMLParser::textCreateErrorCheck): Ditto.
890         (HTMLParser::commentCreateErrorCheck): Ditto.
891         (HTMLParser::handleIsindex): Get rid of explicit deref, no longer needed.
892
893         * khtml/html/htmltokenizer.h: Make attrs and text fields of Token use
894         RefPtr. Also stop using bit fields for the flags in Token -- there's no
895         evidence this makes things faster.
896         * khtml/html/htmltokenizer.cpp:
897         (khtml::Token::addAttribute): Get rid of explicit ref, no longer needed.
898         (khtml::HTMLTokenizer::processToken): Ditto.
899
900         * khtml/rendering/render_block.cpp: (khtml::RenderBlock::updateFirstLetter):
901         Use a PassRefPtr.
902
903         * khtml/rendering/render_text.cpp:
904         (khtml::RenderText::previousOffset): Use get since str pointer is RefPtr now.
905         (khtml::RenderText::nextOffset): Ditto.
906         (khtml::RenderText::RenderText): Get rid of explicit ref, no longer needed.
907         Change to use initializer syntax instead of assignment.
908         (khtml::RenderText::setStyle): Use PassRefPtr.
909         (khtml::RenderText::originalString): Ditto.
910         (khtml::RenderText::setText): Get rid of explicit ref, no longer needed.
911         (khtml::RenderTextFragment::RenderTextFragment): Get rid of explicit ref,
912         no longer needed.
913         (khtml::RenderTextFragment::originalString): Use PassRefPtr.
914
915         * khtml/rendering/render_text.h: Change SOFT_HYPEN to be a constant rather than
916         a preprocessor macro. Used PassRefPtr in a couple places. Made RenderText's str
917         and RenderTextFragment's m_generatedContentStr be RefPtr.
918
919         * khtml/html/html_inlineimpl.cpp: Add a newly-needed include, sort them.
920         * kwq/KWQRenderTreeDebug.cpp: Add a newly-needed include.
921
922 2005-12-22  Darin Adler  <darin@apple.com>
923
924         Reviewed by Eric.
925
926         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6193
927           remove some unused KWQ code
928
929         * kcanvas/KCanvasCreator.cpp: (KCanvasCreator::self): Don't use static deleter for
930         two reasons: (1) We don't want any globals with constructors in any of our frameworks
931         because they slow down framework load time. (2) There's no need to destroy this object at
932         process termination time -- it's extra work with no benefit. Because of both these
933         reasons, our KStaticDeleter implementation was basically a no-op.
934         * ksvg2/svg/SVGDOMImplementationImpl.cpp: (SVGDOMImplementationImpl::self): Ditto.
935         * khtml/xml/dom_docimpl.cpp: (DocumentImpl::setDocumentChanged): Ditto.
936
937         * khtml/html/html_canvasimpl.cpp: Removed include of kstringhandler.h.
938         * khtml/html/html_imageimpl.cpp: Ditto.
939
940         * khtml/khtmlpart_p.h: Removed something that was in an "APPLE_CANGES" ifdef.
941
942         * ForwardingHeaders/kstaticdeleter.h: Removed.
943         * ForwardingHeaders/kstringhandler.h: Removed.
944         * kwq/KWQKStaticDeleter.h: Removed.
945         * kwq/KWQKStringHandler.h: Removed.
946         * kwq/KWQKStringHandler.mm: Removed.
947
948         * WebCore.xcodeproj/project.pbxproj: Removed files.
949
950 2005-12-22  Darin Adler  <darin@apple.com>
951
952         Reviewed by Eric.
953
954         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6192
955           add support for non-standard &nsup; entity (implemented in other browsers)
956
957         * khtml/html/kentities.gperf: Add "nsup" to table.
958         * khtml/html/htmltokenizer.cpp: Removed old workaround for inlining issue that no
959         longer seems to be necessary; also touches the file which is important because
960         Xcode doesn't seem to understand the dependency on kentities.gperf and the need
961         to recompile.
962
963 2005-12-22  Darin Adler  <darin@apple.com>
964
965         Reviewed by Eric.
966
967         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6167
968           RenderStyle default constructor should initialize its members for speed
969
970         * khtml/rendering/DataRef.h: (khtml::DataRef::operator=): Eliminate an extra
971         branch by doing ref before deref instead of == check.
972
973         * khtml/rendering/render_style.cpp:
974         (khtml::initDefaultStyle): Added. Function to initialize the default style
975         for use in constructor.
976         (khtml::RenderStyle::RenderStyle): Changed constructor to initalize all the
977         members with constructor syntax instead of using assignment on all of them.
978         * khtml/rendering/render_style.h: Removed static data member _default --
979         it's now a file scope global instead.
980
981 2005-12-21  Darin Adler  <darin@apple.com>
982
983         Reviewed by Justin.
984
985         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6142
986           intermittent failures in some paste tests
987
988         * khtml/editing/apply_style_command.cpp:
989         (khtml::ApplyStyleCommand::applyBlockStyle): Call new updateLayout member function.
990         (khtml::ApplyStyleCommand::applyInlineStyle): Ditto.
991         (khtml::ApplyStyleCommand::pushDownTextDecorationStyleAtBoundaries): Ditto.
992         * khtml/editing/composite_edit_command.cpp:
993         (khtml::CompositeEditCommand::addBlockPlaceholderIfNeeded): Ditto.
994         (khtml::CompositeEditCommand::findBlockPlaceholder): Ditto.
995         (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Ditto.
996         * khtml/editing/delete_selection_command.cpp:
997         (khtml::DeleteSelectionCommand::fixupWhitespace): Ditto.
998         (khtml::DeleteSelectionCommand::moveNodesAfterNode): Ditto.
999         * khtml/editing/edit_command.cpp:
1000         (khtml::EditCommand::apply): Ditto.
1001         (khtml::EditCommand::unapply): Ditto.
1002         (khtml::EditCommand::reapply): Ditto.
1003         (khtml::EditCommand::updateLayout): Added. Calls updateLayoutIgnorePendingStylesheets
1004         on the document.
1005         * khtml/editing/edit_command.h: Added updateLayout member function.
1006         * khtml/editing/insert_line_break_command.cpp:
1007         (khtml::InsertLineBreakCommand::doApply): Call new updateLayout member function.
1008         * khtml/editing/insert_paragraph_separator_command.cpp:
1009         (khtml::InsertParagraphSeparatorCommand::doApply): Ditto.
1010         * khtml/editing/jsediting.cpp:
1011         (DOM::JSEditor::execCommand): Call updateLayoutIgnorePendingStylesheets instead of updateLayout.
1012         (DOM::JSEditor::queryCommandEnabled): Ditto.
1013         (DOM::JSEditor::queryCommandIndeterm): Ditto.
1014         (DOM::JSEditor::queryCommandState): Ditto.
1015         (DOM::JSEditor::queryCommandValue): Ditto.
1016         * khtml/editing/markup.cpp: (khtml::createMarkup): Ditto.
1017         * khtml/editing/replace_selection_command.cpp:
1018         (khtml::ReplacementFragment::insertFragmentForTestRendering): Ditto.
1019         (khtml::ReplaceSelectionCommand::fixupNodeStyles): Call new updateLayout member function.
1020         (khtml::ReplacementFragment::computeStylesUsingTestRendering): Call
1021         updateLayoutIgnorePendingStylesheets instead of updateLayout.
1022         (khtml::ReplaceSelectionCommand::doApply): Call new updateLayout member function.
1023         (khtml::ReplaceSelectionCommand::removeLinePlaceholderIfNeeded): Ditto.
1024         (khtml::ReplaceSelectionCommand::completeHTMLReplacement): Ditto.
1025         * khtml/editing/visible_units.cpp:
1026         (khtml::previousLinePosition): Call updateLayoutIgnorePendingStylesheets instead of updateLayout.
1027         (khtml::nextLinePosition): Ditto.
1028         * khtml/html/html_elementimpl.cpp:
1029         (HTMLElementImpl::innerText): Ditto.
1030         * kwq/WebCoreBridge.mm:
1031         (-[WebCoreBridge setSelectedDOMRange:affinity:closeTyping:]): Ditto.
1032         (-[WebCoreBridge smartDeleteRangeForProposedRange:]): Ditto.
1033
1034 2005-12-21  Darin Adler  <darin@apple.com>
1035
1036         Reviewed by Geoff.
1037
1038         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6177
1039           move event code from JavaScript binding into DOM implementation
1040
1041         * khtml/ecma/kjs_events.cpp:
1042         (KJS::DOMMouseEvent::getValueProperty): Change everything to just call through instead of doing
1043         the work here.
1044         (KJS::DOMWheelEvent::getValueProperty): Ditto.
1045
1046         * khtml/xml/dom2_eventsimpl.h:
1047         (DOM::MouseRelatedEventImpl::offsetX):
1048         (DOM::MouseRelatedEventImpl::offsetY):
1049         * khtml/xml/dom2_eventsimpl.cpp:
1050         (DOM::MouseRelatedEventImpl::MouseRelatedEventImpl): Initialize new m_pageX, m_pageY, m_layerX,
1051         m_layerY, m_offsetX, and m_offsetY.
1052         (DOM::MouseRelatedEventImpl::computePositions): Renamed from computeLayerPos since it handles
1053         page position andoffset position too now.
1054         (DOM::MouseRelatedEventImpl::pageX): Added. Not in header since it's virtual.
1055         (DOM::MouseRelatedEventImpl::pageY): Ditto.
1056         (DOM::MouseRelatedEventImpl::x): Added, with FIXME since it should change eventually.
1057         (DOM::MouseRelatedEventImpl::y): Ditto.
1058         (DOM::MouseEventImpl::initMouseEvent): Call computePositions instead of computeLayerPos.
1059         (DOM::MouseEventImpl::toElement): Added.
1060         (DOM::MouseEventImpl::fromElement): Added.
1061
1062 2005-12-21  Timothy Hatcher  <timothy@apple.com>
1063
1064         * WebCore.xcodeproj/project.pbxproj:
1065           Set tab width to 8, indent width to 4 and uses tabs to false per file.
1066
1067 2005-12-21  John Sullivan  <sullivan@apple.com>
1068
1069         Reviewed by Tim Omernick and Darin Adler.
1070         
1071         - fixed HiDPI problem with forms auto-fill menu width
1072
1073         No test cases added; this code is used for "chrome" only.
1074
1075         * kwq/DOMHTML.mm:
1076         (-[DOMHTMLInputElement _rectOnScreen]):
1077         convert entire rect to window coordinates, not just origin
1078
1079 2005-12-21  David Harrison  <harrison@apple.com>
1080
1081         Reviewed by Justin.
1082
1083         <rdar://problem/4039777> Pasting particular snippet of HTML containing list items and a link creates too many list items
1084         - Fixed paste crash by making calling RenderBox::deleteLineBoxWrapper() from RenderObject::remove(),
1085         so that the connection is broken before the InlineBox's parent gets deleted.
1086         - Fixed overzealous style changes when setting the style on a specific range of elements.  These specific
1087         ranges are derived programmatically, e.g. as a part of pasting, so they must be respected exactly rather
1088         than modified by converting the endpoints to VisiblePositions.
1089         
1090         Test cases coming soon.
1091
1092         * khtml/editing/apply_style_command.cpp:
1093         (khtml::ApplyStyleCommand::ApplyStyleCommand):
1094         (khtml::ApplyStyleCommand::updateStartEnd):
1095         (khtml::ApplyStyleCommand::startPosition):
1096         (khtml::ApplyStyleCommand::endPosition):
1097         (khtml::ApplyStyleCommand::applyBlockStyle):
1098         (khtml::ApplyStyleCommand::applyRelativeFontStyleChange):
1099         (khtml::ApplyStyleCommand::applyInlineStyle):
1100         (khtml::ApplyStyleCommand::removeInlineStyle):
1101         (khtml::ApplyStyleCommand::splitTextAtStartIfNeeded):
1102         (khtml::ApplyStyleCommand::splitTextAtEndIfNeeded):
1103         (khtml::ApplyStyleCommand::splitTextElementAtStartIfNeeded):
1104         (khtml::ApplyStyleCommand::splitTextElementAtEndIfNeeded):
1105         (khtml::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
1106         (khtml::ApplyStyleCommand::mergeEndWithNextIfIdentical):
1107         (khtml::ApplyStyleCommand::joinChildTextNodes):
1108         * khtml/editing/apply_style_command.h:
1109         * khtml/editing/composite_edit_command.cpp:
1110         (khtml::CompositeEditCommand::applyStyle):
1111         * khtml/editing/composite_edit_command.h:
1112         * khtml/editing/insert_line_break_command.cpp:
1113         (khtml::InsertLineBreakCommand::doApply):
1114         * khtml/editing/replace_selection_command.cpp:
1115         (khtml::ReplaceSelectionCommand::fixupNodeStyles):
1116         (khtml::ReplaceSelectionCommand::completeHTMLReplacement):
1117         * khtml/rendering/render_box.cpp:
1118         (RenderBox::destroy):
1119         (RenderBox::deleteLineBoxWrapper):
1120         * khtml/rendering/render_box.h:
1121         * khtml/rendering/render_list.cpp:
1122         (RenderListMarker::~RenderListMarker):
1123         (RenderListMarker::setStyle):
1124         * khtml/rendering/render_object.cpp:
1125         (RenderObject::remove):
1126         * khtml/rendering/render_object.h:
1127         * khtml/rendering/render_replaced.cpp:
1128         (RenderWidget::destroy):
1129
1130 2005-12-20  Adele Peterson  <adele@apple.com>
1131
1132         Reviewed by Darin.
1133
1134         Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5911
1135         REGRESSION: Page scroll position jumps when clicking on word in editable div
1136
1137         I moved the scrolling code out of setFocusNode, and consolidated some of the focus code to scroll when necessary.
1138
1139         * khtml/html/html_formimpl.cpp: Removed HTMLButtonElementImpl::blur, HTMLButtonElementImpl::focus, HTMLInputElementImpl::blur, HTMLInputElementImpl::focus.  
1140         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.  
1141         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.  
1142         Now the behavior will be more consistent.
1143         (DOM::HTMLLabelElementImpl::focus): calls ElementImpl::focus.
1144         (DOM::HTMLLegendElementImpl::focus): ditto.
1145         * khtml/html/html_formimpl.h:
1146         * khtml/khtml_part.cpp:
1147         (KHTMLPart::selectAll): calls new function selectContentsOfNode
1148         (KHTMLPart::selectContentsOfNode): factored out code to selectAll for a particular node- which is useful for contenteditable elements.
1149         * khtml/khtml_part.h: added selectContentsOfNode
1150         * khtml/xml/dom_docimpl.cpp:
1151         (DocumentImpl::setFocusNode): removed scrolling code.
1152         * khtml/xml/dom_elementimpl.cpp:
1153         (ElementImpl::focus): Calls updateLayout in case focus() is called before there's a renderer.
1154         Makes a selection for editable elements (right now we select all, but this will change).
1155         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.
1156         * kwq/KWQKHTMLPart.mm:
1157         (KWQKHTMLPart::revealSelection): Made this more like centerSelectionInVisibleArea  where we get the right rectangle if the selection is a caret.
1158         (KWQKHTMLPart::nextKeyViewInFrame): call ElementImpl::focus() for the node.  This will set the selection too, which used to be done here.
1159
1160 2005-12-20  Alexey Proskuryakov  <ap@nypop.com>
1161
1162         Reviewed by justin
1163         
1164         <http://bugzilla.opendarwin.org/show_bug.cgi?id=4682>
1165         -[WebHTMLView firstRectForCharacterRange:] is using _selectedRange instead of the given range if no marked text
1166
1167         Added layout tests:
1168         * editing/input/firstrectforcharacterrange-styled
1169         * editing/input/firstrectforcharacterrange-plain
1170
1171         * khtml/editing/visible_text.cpp:
1172         (khtml::TextIterator::rangeFromLocationAndLength): 
1173         Return null if the range isn't found, instead of a startless/endless 
1174         range.  Set the end if the requested location+length is out of bounds.
1175         * kwq/WebCoreBridge.mm:
1176         (-[WebCoreBridge convertToDOMRange:]): Handle larged unsigned values 
1177         before calling rangeWithLocationAndLength, which expects signed ints.
1178
1179 2005-12-20  Adele Peterson  <adele@apple.com>
1180
1181         Reviewed by Darin.
1182
1183         Fix for <rdar://problem/4387630> REGRESSION: <select> element's onClick event doesn't fire @ bugweb.apple.com
1184
1185         * kwq/KWQKHTMLPart.mm:
1186         (KWQKHTMLPart::passSubframeEventToSubframe): only pass mouse down for khtmlviews.
1187
1188 2005-12-20  Justin Garcia  <justin.garcia@apple.com>
1189
1190         Reviewed by eric, thatcher
1191         
1192         <rdar://problem/4172984> KWQExceptions needs to use @try/@catch instead of relying on NSException.h internals
1193         
1194         Needed to undef try/catch because of 4333439.  Moved the 
1195         declarations of variables that are returned from within a @try 
1196         block outside the @try block (because of "might be clobbered by 
1197         a longjmp or vfork" warnings).  Moved some return statements
1198         inside the @try block to fix volatilization errors with gcc4.
1199
1200         * WebCore.xcodeproj/project.pbxproj:
1201         * WebCorePrefix.h:
1202         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
1203         (KCanvasFEBlendQuartz::getCIFilter):
1204         (KCanvasFEColorMatrixQuartz::getCIFilter):
1205         (KCanvasFECompositeQuartz::getCIFilter):
1206         (getPointLightVectors):
1207         (getLightVectors):
1208         (getNormalMap):
1209         (KCanvasFEDiffuseLightingQuartz::getCIFilter):
1210         (KCanvasFEFloodQuartz::getCIFilter):
1211         (KCanvasFEImageQuartz::getCIFilter):
1212         (KCanvasFEMergeQuartz::getCIFilter):
1213         (KCanvasFESpecularLightingQuartz::getCIFilter):
1214         * kwq/KWQExceptions.h:
1215         * kwq/KWQExceptions.mm:
1216         (KWQReportBlockedException):
1217         * kwq/KWQFileButton.mm:
1218         (KWQFileButton::sizeForCharacterWidth):
1219         (KWQFileButton::frameGeometry):
1220         * kwq/KWQKCursor.mm:
1221         (+[NSCursor _WebCore_cursorWithName:hotSpot:_WebCore_cursorWithName:hotSpot:]):
1222         * kwq/KWQKHTMLPart.mm:
1223         (KWQKHTMLPart::createPart):
1224         (KWQKHTMLPart::nextKeyView):
1225         (KWQKHTMLPart::runJavaScriptPrompt):
1226         (KWQKHTMLPart::keyEvent):
1227         (KWQKHTMLPart::sendContextMenuEvent):
1228         (KWQKHTMLPart::fileWrapperForElement):
1229         (KWQKHTMLPart::attributedString):
1230         (KWQKHTMLPart::imageFromRect):
1231         * kwq/KWQKHTMLPartBrowserExtension.mm:
1232         * kwq/KWQLineEdit.mm:
1233         (QLineEdit::sizeForCharacterWidth):
1234         * kwq/KWQListBox.mm:
1235         (QListBox::sizeForNumberOfLines):
1236         * kwq/KWQLoader.mm:
1237         (KWQCheckCacheObjectStatus):
1238         * kwq/KWQWidget.mm:
1239         (QWidget::frameGeometry):
1240         (QWidget::mapFromGlobal):
1241
1242 2005-12-20  David Harrison  <harrison@apple.com>
1243
1244         <rdar://problem/4294417> Cannot un-italicize some text after triple clicking it
1245
1246         Reviewed by Justin.
1247
1248         * khtml/editing/apply_style_command.cpp:
1249         (khtml::ApplyStyleCommand::addInlineStyleIfNeeded):
1250         Removed check for tab span because ApplyStyleCommand::removeCSSStyle() already makes the same check.
1251
1252 2005-12-20  Justin Garcia  <justin.garcia@apple.com>
1253
1254         <rdar://problem/4387270> editing/deleting/delete-3800834-fix failing
1255         <http://bugzilla.opendarwin.org/show_bug.cgi?id=6160> REGRESSION: Crash when running editing/deleting/delete-3800834-fix.html
1256         <http://bugzilla.opendarwin.org/show_bug.cgi?id=6161> REGRESSION: crash when pressing tab in editable WebHTMLView
1257
1258         Reviewed by darin
1259     
1260         Some callers call setAttribute on a floating element.  So, using 
1261         a RefPtr for the element inside addAttribute can destroy
1262         it.
1263
1264         * khtml/xml/dom_elementimpl.cpp:
1265         (NamedAttrMapImpl::addAttribute):
1266
1267 2005-12-20  Maciej Stachowiak  <mjs@apple.com>
1268
1269         Reviewed by Darin.
1270
1271         - fixed leak in createAttributeMap
1272         http://bugzilla.opendarwin.org/show_bug.cgi?id=6162
1273         
1274         * khtml/xml/dom_elementimpl.cpp:
1275         (StyledElementImpl::createAttributeMap): the new attribute map
1276         is going in a RefPtr, don't also ref it manually.
1277
1278 2005-12-20  Maciej Stachowiak  <mjs@apple.com>
1279
1280         Reviewed by Darin.
1281
1282         - change an assignment to a contructor declaration to build with PassRefPtr
1283         leak fix changes
1284
1285         * ksvg2/svg/SVGTransformableImpl.cpp:
1286         (SVGTransformableImpl::parseTransformAttribute):
1287
1288 2005-12-20  Geoffrey Garen  <ggaren@apple.com>
1289
1290         Reviewed by John.
1291
1292         Fixed <rdar://problem/4310363> JavaScript window.open: Height is 1 
1293         pixel short, and related bugs.
1294
1295         There were a few bugs here.
1296         (1) Our code took size arguments and applied them to the window's
1297             content rect. That's incorrect. The Rhino book says the arguments 
1298             should apply to the WebView. Other things that occupy the content 
1299             rect include the tab bar, the status bar, and the 1 pixel border 
1300             between brushed metal and document. All of these used to impinge 
1301             on the web page's display area.
1302
1303             The fix is to calculate sizing based on the WebView instead of
1304             the content rect. This means that the webViewContentRect and 
1305             setContentRect delegate methods are obsolete and no longer called
1306             by any of our code. (setContentRect was never called in the 
1307             first place.)
1308
1309         (2) None of our sizing accounted for scaled resolutions.
1310
1311             The fix is to ask the WebView to scale all coordintes for us.
1312
1313         (3) Our code assumed that all window accoutrements were on by default.
1314             Safari works that way, but other WebKit clients might not.
1315
1316             The fix is always to explicitly set an on/off state.
1317         
1318         (a) To facilitate scaling, I added a new bridge method, webView, to 
1319         access the webView.
1320
1321         (b) For internal consistency, I changed ___Bars to ___bars in bridge 
1322         methods, and ___bars to ___Bars in WinArgs data members. (Interestingly,
1323         the different classes in our code are evenly divided on which format to 
1324         use.)
1325         
1326         Added manual test:
1327         * manual-tests/window-open-features.html: Added.
1328         * manual-tests/resources/200x200.png: Added.
1329         * manual-tests/resources/popup200x200.html: Added.
1330
1331         * khtml/ecma/kjs_window.cpp:
1332         (KJS::showModalDialog): see (b)
1333         (KJS::WindowFunc::callAsFunction): see (b)
1334         * kwq/KWQKHTMLPart.mm:
1335         (KWQKHTMLPart::statusbarVisible): see (b)
1336         * kwq/KWQKHTMLPartBrowserExtension.mm:
1337         (KHTMLPartBrowserExtension::createNewWindow):
1338         At the top of this method, I just did some formatting cleanup and
1339         moved the 'referrer' variable closer to where it's used.
1340         The changes in the middle of the method are (3), the bottom, (2).
1341         * kwq/KWQKPartsBrowserExtension.h:
1342         (KParts::WindowArgs::WindowArgs): see (b)
1343         * kwq/WebCoreBridge.h: see (a)
1344
1345 2005-12-20  Eric Seidel  <eseidel@apple.com>
1346
1347         Reviewed by mjs.
1348
1349         Leaks when running SVG tests
1350         http://bugzilla.opendarwin.org/show_bug.cgi?id=6156
1351         No additional tests necessary, leaks already caught by other tests.
1352
1353         * kcanvas/KCanvasFilters.cpp:
1354         (KCanvasFEDiffuseLighting::setLightSource): takes ownership
1355         (KCanvasFESpecularLighting::setLightSource): takes ownership
1356         * kcanvas/KCanvasFilters.h:
1357         (KCanvasFEDiffuseLighting::KCanvasFEDiffuseLighting): added
1358         (KCanvasFEDiffuseLighting::~KCanvasFEDiffuseLighting): added
1359         (KCanvasFEDiffuseLighting::lightSource): fixed spacing
1360         (KCanvasFESpecularLighting::KCanvasFESpecularLighting): added
1361         (KCanvasFESpecularLighting::~KCanvasFESpecularLighting): added
1362         (KCanvasFESpecularLighting::lightSource): fixed spacing
1363         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
1364         (KRenderingDeviceQuartz::stringForPath): added missing CFRelease
1365
1366 2005-12-20  Eric Seidel  <eseidel@apple.com>
1367
1368         Reviewed by darin.
1369
1370         Remove additional bit-rotted DEBUG* ifdefs from WebCore.
1371         This removes PARSER_DEBUG, FORMS_DEBUG and CSS_STYLESHEET_DEBUG.
1372         http://bugzilla.opendarwin.org/show_bug.cgi?id=5931
1373         No tests possible, only removing dead code.
1374
1375         * khtml/css/css_stylesheetimpl.cpp:
1376         (CSSStyleSheetImpl::parseString):
1377         (CSSStyleSheetImpl::isLoading):
1378         * khtml/html/html_formimpl.cpp:
1379         (DOM::HTMLFormElementImpl::formData):
1380         (DOM::HTMLFormElementImpl::submit):
1381         (DOM::HTMLFormElementImpl::reset):
1382         (DOM::HTMLGenericFormElementImpl::getForm):
1383         * khtml/html/htmlparser.cpp:
1384         (HTMLParser::processCloseTag):
1385         (HTMLParser::createHead):
1386
1387 2005-12-20  Eric Seidel  <eseidel@apple.com>
1388
1389         Reviewed by darin.
1390
1391         Move Decoder onto Shared<T> and clients onto RefPtr.
1392         http://bugzilla.opendarwin.org/show_bug.cgi?id=6107
1393         No test cases possible, no functional changes.
1394
1395         * khtml/ecma/XSLTProcessor.cpp:
1396         (KJS::XSLTProcessorProtoFunc::callAsFunction):
1397         * khtml/ecma/xmlhttprequest.cpp:
1398         (KJS::XMLHttpRequest::XMLHttpRequest):
1399         (KJS::XMLHttpRequest::~XMLHttpRequest):
1400         (KJS::XMLHttpRequest::changeState):
1401         (KJS::XMLHttpRequest::abort):
1402         (KJS::XMLHttpRequest::slotFinished):
1403         (KJS::XMLHttpRequest::slotData):
1404         * khtml/ecma/xmlhttprequest.h:
1405         * khtml/khtml_part.cpp:
1406         (KHTMLPart::clear):
1407         (KHTMLPart::begin):
1408         (KHTMLPart::write):
1409         * khtml/khtmlpart_p.h:
1410         (KHTMLPartPrivate::KHTMLPartPrivate):
1411         * khtml/misc/decoder.cpp:
1412         (Decoder::Decoder):
1413         (Decoder::~Decoder):
1414         * khtml/misc/decoder.h:
1415         * khtml/misc/loader.h:
1416         * khtml/xml/dom_docimpl.cpp:
1417         (DocumentImpl::DocumentImpl):
1418         (DocumentImpl::~DocumentImpl):
1419         (DocumentImpl::prepareMouseEvent):
1420         (DocumentImpl::setDecoder):
1421         * khtml/xml/dom_docimpl.h:
1422         (DOM::DocumentImpl::decoder):
1423         * khtml/xsl/xslt_processorimpl.cpp:
1424         (DOM::XSLTProcessorImpl::createDocumentFromSource):
1425
1426 2005-12-19  Darin Adler  <darin@apple.com>
1427
1428         Reviewed by Maciej.
1429
1430         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6143
1431           DOM::ElementImpl should use a RefPtr for the attribute map
1432
1433         * khtml/xml/dom_elementimpl.cpp:
1434         (ElementImpl::ElementImpl): Remove code to initialize the pointer; not needed since
1435         RefPtr gets initialized to 0.
1436         (ElementImpl::~ElementImpl): Remove code to deref the pointer; RefPtr handles that.
1437         (ElementImpl::attributes): Add get() call to get raw pointer.
1438         (ElementImpl::setAttributeMap): Remove code to deref the old map and set the new map.
1439         But added code to clear the element pointer from the old map (missing in the old
1440         version). Also added a FIXME.
1441         (ElementImpl::createAttributeMap): Remove ref(); RefPtr handles that.
1442         (NamedAttrMapImpl::addAttribute): Use a RefPtr to guarantee the element does not go
1443         away in the middle of dispatching DOM events.
1444         (StyledElementImpl::attributeChanged): Clean up code by using the inline function
1445         mappedAttributes() instead of doing type casts.
1446         (StyledElementImpl::parseMappedAttribute): Ditto.
1447         (StyledElementImpl::getClassList): Ditto.
1448
1449         * khtml/xml/dom_elementimpl.h: Make ElementImpl::namedAttrMap be a RefPtr instead
1450         of raw pointer. Added an overload of StyledElementImpl::mappedAttributes for both
1451         const and non-const.
1452
1453         * khtml/xml/dom_nodeimpl.cpp: (DOM::NodeImpl::addChild): Use a RefPtr to ref/deref
1454         the child so that it doesn't leak.
1455
1456         * khtml/html/htmlparser.h: Changed isindex to use a RefPtr.
1457         * khtml/html/htmlparser.cpp:
1458         (HTMLParser::~HTMLParser): Removed now-unneeded ref.
1459         (HTMLParser::isindexCreateErrorCheck): Remove now-unneeded deref/ref.
1460         (HTMLParser::handleIsindex): Put isindex element into a RefPtr. This prevents a
1461         crash that was otherwise happening during layout tests (caused indirectly by
1462         the changes above).
1463         (HTMLParser::startBody): Added call to get().
1464
1465 2005-12-19  Darin Adler  <darin@apple.com>
1466
1467         Reviewed by Geoff Garen and Eric Seidel.
1468
1469         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4923
1470           stop using <ostream> in WebCore, eliminating the <cmath> troubles it causes
1471
1472         * ForwardingHeaders/kxmlcore/AlwaysInline.h: Added.
1473         * WebCorePrefix.h: Removed the use of <ostream>.
1474
1475         * kwq/KWQDef.h: Removed now-unused Q_INT64, Q_INT16, Q_UINT16, qRound, and _KWQ_IOSTREAM_.
1476
1477         * kwq/KWQKHTMLPart.h: Removed some unneeded headers and added forward-declarations of classes
1478         instead. Corrected some incorrect member function declarations.
1479         * kwq/KWQKHTMLPart.mm: Added a now-needed header.
1480
1481         * khtml/ecma/kjs_window.cpp: Removed the <cmath> workaround.
1482         * khtml/rendering/bidi.cpp: Added include of AlwaysInline.h and removed a
1483         lot of unnecessary includes.
1484         * khtml/rendering/render_canvasimage.cpp: Removed the <cmath> workaround.
1485         * khtml/rendering/render_image.cpp: Removed the <cmath> workaround.
1486         * khtml/rendering/render_text.cpp: Added include of AlwaysInline.h and removed a
1487         lot of unnecessary includes.
1488
1489         * ksvg2/css/SVGCSSStyleSelector.cpp: (KDOM::CSSStyleSelector::applySVGProperty):
1490         * ksvg2/svg/SVGAnimateColorElementImpl.cpp: (SVGAnimateColorElementImpl::calculateColor):
1491         * ksvg2/svg/SVGAnimateTransformElementImpl.cpp: (SVGAnimateTransformElementImpl::handleTimerEvent):
1492         * ksvg2/svg/SVGAnimationElementImpl.cpp: (SVGAnimationElementImpl::closeRenderer):
1493         * ksvg2/svg/SVGLinearGradientElementImpl.cpp: (SVGLinearGradientElementImpl::buildGradient):
1494         * ksvg2/svg/SVGPatternElementImpl.cpp: (SVGPatternElementImpl::notifyAttributeChange):
1495         * ksvg2/svg/SVGRadialGradientElementImpl.cpp: (SVGRadialGradientElementImpl::buildGradient):
1496         Replaced use of qRound with use of lroundf or lround as appropriate.
1497
1498         * kwq/KWQCString.h:
1499         * kwq/KWQCString.mm:
1500         * kwq/KWQDateTime.h:
1501         * kwq/KWQDateTime.mm:
1502         * kwq/KWQMap.h:
1503         * kwq/KWQMemArray.h:
1504         * kwq/KWQPoint.mm:
1505         * kwq/KWQPointArray.h:
1506         * kwq/KWQPtrList.h:
1507         * kwq/KWQPtrStack.h:
1508         * kwq/KWQPtrVector.h:
1509         * kwq/KWQRect.h:
1510         * kwq/KWQRect.mm:
1511         * kwq/KWQSize.h:
1512         * kwq/KWQSize.mm:
1513         * kwq/KWQValueList.h:
1514         Removed _KWQ_IOSTREAM_ code that was used at one time for unit tests, but is now unneeded,
1515         and requires <ostream>.
1516
1517 2005-12-19  Darin Adler  <darin@apple.com>
1518
1519         Reviewed by Geoff Garen and John Sullivan.
1520
1521         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4312
1522           XMLHttpRequest headers that have two CRLF sequences lead to Obj-C exception
1523
1524         I found this by code inspection after examining a security report about
1525         vulnerabilities in other browsers' XMLHttpRequest implementations.
1526
1527         * kwq/KWQLoader.mm:
1528         (+[NSDictionary _webcore_dictionaryWithHeaderString:_webcore_dictionaryWithHeaderString:]):
1529         Check length of string before calling characterAtIndex:0 since it will fail for an empty string.
1530
1531 2005-12-19  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1532
1533         Reviewed by Beth
1534
1535         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6149
1536           REGRESSION (WebCore-417.5): horizontal scrollbar in overflow with top
1537           border doesn't receive mouse events
1538
1539         * khtml/rendering/render_block.cpp:
1540         (khtml::RenderBlock::isPointInScrollbar):
1541         Removed borderTop() from horizontal scrollbar rect computation.
1542         * manual-tests/scrollbar-hittest2.html: Added.
1543
1544 2005-12-19  Alexey Proskuryakov  <ap@nypop.com>
1545
1546         Reviewed by Darin, committed by Adele.
1547
1548         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5744
1549           XMLHttpRequest does not apply page encoding after assigning via innerHtml
1550
1551         * khtml/ecma/xmlhttprequest.cpp:
1552         (getMIMEType): A helper function to get MIME type from a Content-Type string.
1553         (getCharset): A helper function to get charset from a Content-Type string.
1554         (KJS::XMLHttpRequest::getValueProperty): Factored out responseIsXML().
1555         (KJS::XMLHttpRequest::getResponseHeader): Return QString instead of JSValue
1556           (to get rid of unnecessary JSLocks).
1557         (KJS::XMLHttpRequest::responseIsXML): A new method that analyses Content-Type.
1558         (KJS::XMLHttpRequest::slotData): Use a correct charset for responses, see bug for details.
1559         (KJS::XMLHttpRequestProtoFunc::callAsFunction): Update for getResponseHeader() changes
1560         * khtml/ecma/xmlhttprequest.h:
1561
1562 == Rolled over to ChangeLog-2005-12-19 ==