Make http cookies work
[WebKit-https.git] / WebCore / ChangeLog
1 2007-02-05  George Staikos  <staikos@kde.org>
2
3         Reviewed by Maciej.
4
5         Send HTTP cookies.
6
7         * platform/network/qt/ResourceHandleManagerQt.cpp:
8         (WebCore::RequestQt::RequestQt):
9
10 2007-02-05  Adele Peterson  <adele@apple.com>
11
12         Reviewed by Mitz and Anders.
13
14         Fix for http://bugs.webkit.org/show_bug.cgi?id=11811
15         <rdar://problem/4947184> REGRESSION (r11783): Hebrew text in list boxes is reversed
16
17         http://bugs.webkit.org/show_bug.cgi?id=11812
18         <rdar://problem/4960269> REGRESSION (Native file upload): Hebrew filenames are reversed
19
20         Tests: 
21         fast/text/international/bidi-listbox.html
22         fast/text/international/bidi-listbox-atsui.html
23
24         * rendering/RenderBlock.h: Added static bidiReorderCharacters that will run the bidi algorithm on a character buffer.
25         * rendering/bidi.cpp:
26         (WebCore::RenderBlock::bidiReorderCharacters): Added. Creates an anonymous RenderBlock and RenderText to feed into bidiReorderLines.
27         (WebCore::RenderBlock::constructLine): Uses the new convenience methods on BidiRun.
28         * rendering/bidi.h:
29         (WebCore::BidiRun::reversed): Added convenience method.
30         (WebCore::BidiRun::dirOverride): ditto.
31
32         * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::paintObject): Creates a buffer and calls bidiReorderCharacters
33           to get a correctly ordered character buffer for drawText.
34         * rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintItemForeground): ditto.
35
36 2007-02-05  Mitz Pettel  <mitz@webkit.org>
37
38         Reviewed by Darin.
39
40         - fix http://bugs.webkit.org/show_bug.cgi?id=12590
41           REGRESSION: Text selection is weird in textareas in Trac wiki editing pages
42
43         Test: fast/repaint/selection-gap-overflow-scroll.html
44
45         * rendering/RenderBlock.cpp:
46         (WebCore::RenderBlock::selectionGapRects): Adjust for overflow scroll.
47
48 2007-02-05  Mitz Pettel  <mitz@webkit.org>
49
50         Reviewed by Adele.
51
52         - fix http://bugs.webkit.org/show_bug.cgi?id=11916
53           REGRESSION (SearchField): RTL search fields are mixed up
54
55         Test: fast/forms/search-rtl.html
56
57         * rendering/RenderTextControl.cpp:
58         (WebCore::RenderTextControl::createInnerBlockStyle): Always make the inner
59         block LTR so that the results button will be on the left and the cancel
60         button will be on the right.
61         (WebCore::RenderTextControl::createInnerTextStyle): Inherit the direction
62         property directly from the control so that it won't be masked by the inner
63         block's LTR override.
64         (WebCore::RenderTextControl::nodeAtPoint): Removed code that swapped the
65         results and cancel buttons for RTL.
66         (WebCore::RenderTextControl::forwardEvent): Ditto.
67         (WebCore::RenderTextControl::clientPaddingLeft): Ditto.
68         (WebCore::RenderTextControl::clientPaddingRight): Ditto.
69
70 2007-02-05  Mitz Pettel  <mitz@webkit.org>
71
72         Reviewed by Adele.
73
74         - fix http://bugs.webkit.org/show_bug.cgi?id=12618
75           REGRESSION (SearchField): Dragging across the text and releasing over the clear button clears the field
76
77         Test: fast/forms/search-cancel-button-mouseup.html
78
79         Made the cancel button capturing.
80
81         * html/HTMLTextFieldInnerElement.cpp:
82         (WebCore::HTMLSearchFieldCancelButtonElement::HTMLSearchFieldCancelButtonElement):
83         (WebCore::HTMLSearchFieldCancelButtonElement::defaultEventHandler):
84         * html/HTMLTextFieldInnerElement.h:
85
86 2007-02-05  Mitz Pettel  <mitz@webkit.org>
87
88         Reviewed by Darin.
89
90         - fix http://bugs.webkit.org/show_bug.cgi?id=6626
91           Arabic & Farsi rendered with no shaping (all glyphs separate, unreadable!)
92
93         No test possible since Mac OS X only ships with fonts that contain shaping
94         information.
95
96         * icu/unicode/ushape.h: Added from
97         http://www.opensource.apple.com/darwinsource/10.4.8.ppc/ICU-6.2.9/icuSources/common/unicode/
98         * platform/FontData.h:
99         (WebCore::FontData::shapesArabic): Added. Returns whether the font contains
100         shaping information for Arabic or not.
101         * platform/mac/FontDataMac.mm:
102         (WebCore::FontData::platformInit):
103         (WebCore::FontData::checkShapesArabic): Added. Checks whether the font contains
104         a glyph metamorphosis table. The heuristic is that if a font contains Arabic glyphs
105         and a metamorphosis table, then it includes shaping information for Arabic.
106         * platform/mac/FontMac.mm:
107         (WebCore::overrideLayoutOperation): Changed to use the same character buffer passed
108         to ATSUI instead of the original character buffer and to give zero-width spaces zero
109         width.
110         (WebCore::isArabicLamWithAlefLigature): Added. Checks if the character is one
111         of the Arabic presentation forms of Lam with Alef.
112         (WebCore::shapeArabic): Added. This is a wrapper around the ICU Arabic shaping routine
113         that replaces each space following a Lam with Alef ligature resulting from shaping
114         with a zero-width space.
115         (WebCore::ATSULayoutParameters::initialize): Changed to allocate the auxiliary buffer
116         lazily for mirroring and Arabic shaping. Added a call to shapeArabic() when required.
117
118 2007-02-05  Eric Seidel  <eric@webkit.org>
119
120         No review, build fix only.
121
122         * ksvg2/svg/SVGStyleElement.cpp: add forgotten header.
123
124 2007-02-05  Eric Seidel  <eric@webkit.org>
125
126         Reviewed by bdash.
127
128         Fix style name testcase which I broke in my last commit.
129
130         * ksvg2/svg/SVGStyleElement.cpp:
131         (WebCore::SVGStyleElement::xmlspace):
132         (WebCore::SVGStyleElement::title): override Element::title()
133         (WebCore::SVGStyleElement::parseMappedAttribute):
134         * ksvg2/svg/SVGStyleElement.h:
135
136 2007-02-04  Eric Seidel  <eric@webkit.org>
137
138         Reviewed by darin.
139
140         Fix hand cursor on link hover for SVG
141         Fix status text on link hover for SVG
142         Fix tooltips on link hover for SVG
143         Fix link dragging for SVG
144         http://bugs.webkit.org/show_bug.cgi?id=12575
145         
146         Test: added manual-tests/svg-links.svg
147
148         * dom/Document.cpp:
149         (WebCore::Document::prepareMouseEvent):
150         * dom/Element.cpp:
151         (WebCore::Element::title):
152         * dom/Element.h:
153         * html/HTMLElement.cpp:
154         (WebCore::HTMLElement::setId):
155         (WebCore::HTMLElement::title):
156         (WebCore::HTMLElement::setTitle):
157         (WebCore::HTMLElement::setLang):
158         * html/HTMLElement.h:
159         * ksvg2/svg/SVGAElement.cpp:
160         (WebCore::SVGAElement::title):
161         (WebCore::SVGAElement::parseMappedAttribute):
162         (WebCore::SVGAElement::defaultEventHandler):
163         * ksvg2/svg/SVGAElement.h:
164         * ksvg2/svg/SVGTitleElement.cpp:
165         * ksvg2/svg/SVGTitleElement.h:
166         * manual-tests/svg-links.svg: Added.
167         * rendering/HitTestResult.cpp:
168         (WebCore::HitTestResult::title):
169         (WebCore::HitTestResult::absoluteImageURL):
170         (WebCore::HitTestResult::absoluteLinkURL):
171         (WebCore::HitTestResult::isLiveLink):
172         (WebCore::HitTestResult::titleDisplayString):
173
174 2007-02-04  Alexey Proskuryakov  <ap@webkit.org>
175
176         Reviewed by Darin.
177
178         http://bugs.webkit.org/show_bug.cgi?id=12602
179         XPath functions string(), normalize-space() and string-length() don't work
180         without arguments
181
182         Test: fast/xpath/implicit-node-args.html
183
184         * xml/XPathFunctions.cpp:
185         (WebCore::XPath::FunString::doEvaluate):
186         (WebCore::XPath::FunStringLength::doEvaluate):
187         (WebCore::XPath::FunNormalizeSpace::doEvaluate):
188         Don't try to pass RefPtr<Node> to the Value ctor.
189
190 2007-02-04  Alexey Proskuryakov  <ap@webkit.org>
191
192         Reviewed by Darin.
193
194         http://bugs.webkit.org/show_bug.cgi?id=8791
195         XPath should support custom node resolvers
196
197         * bindings/js/JSCustomXPathNSResolver.cpp: Added.
198         (WebCore::JSCustomXPathNSResolver::create):
199         (WebCore::JSCustomXPathNSResolver::JSCustomXPathNSResolver):
200         (WebCore::JSCustomXPathNSResolver::~JSCustomXPathNSResolver):
201         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
202         * bindings/js/JSCustomXPathNSResolver.h: Added.
203         * bindings/objc/DOMCustomXPathNSResolver.h: Added.
204         * bindings/objc/DOMCustomXPathNSResolver.mm: Added.
205         (WebCore::DOMCustomXPathNSResolver::DOMCustomXPathNSResolver):
206         (WebCore::DOMCustomXPathNSResolver::~DOMCustomXPathNSResolver):
207         (WebCore::DOMCustomXPathNSResolver::lookupNamespaceURI):
208         Wrappers for JS/ObjC objects that can be used as resolvers.
209
210         * bindings/scripts/CodeGeneratorJS.pm:
211         * bindings/scripts/CodeGeneratorObjC.pm:
212         Use the above wrappers to support custom resolvers.
213
214         * xml/XPathNSResolver.cpp:
215         * xml/XPathNSResolver.h:
216         Turned this class into an abstract one.
217
218         * xml/NativeXPathNSResolver.cpp: Added.
219         (WebCore::NativeXPathNSResolver::NativeXPathNSResolver):
220         (WebCore::NativeXPathNSResolver::~NativeXPathNSResolver):
221         (WebCore::NativeXPathNSResolver::lookupNamespaceURI):
222         * xml/NativeXPathNSResolver.h: Added.
223         A XPathNSResolver subclass, doing what XPathNSResolver used to do.
224
225         * xml/XPathEvaluator.cpp:
226         (WebCore::XPathEvaluator::createNSResolver): Create a NativeXPathNSResolver.
227
228         * WebCore.xcodeproj/project.pbxproj: Added new files.
229
230 2007-02-04  Oliver Hunt  <oliver@apple.com>
231
232         Reviewed by Adam.
233
234         Tidying up EventHandler, and moving more of
235         EventHandlerMac.mm to EventHandler.cpp
236
237         Also added EventHandler::eventLoopHandleMouse[Dragged,Up]
238         these are basically helper functions to allow correct event
239         handling on MacOS.        
240
241         * page/EventHandler.cpp:
242         (WebCore::EventHandler::handleMouseUp):
243         (WebCore::EventHandler::dragSourceMovedTo):
244         (WebCore::EventHandler::dragSourceEndedAt):
245         (WebCore::EventHandler::dispatchDragSrcEvent):
246            Moved from EventHandlerMac to EventHandler
247
248         * page/EventHandler.h:
249         (WebCore::EventHandler::eventLoopHandleMouseUp):
250         (WebCore::EventHandler::eventLoopHandleMouseDragged):
251           Null implementations of two Mac helper functions
252         * page/mac/EventHandlerMac.mm:
253         (WebCore::EventHandler::eventLoopHandleMouseDragged):           
254         (WebCore::EventHandler::handleDrag):
255           Much tidying, reduced nesting, made less dependent on NS types   
256         (WebCore::EventHandler::eventLoopHandleMouseDragged):
257         (WebCore::EventHandler::eventLoopHandleMouseUp):  
258           Helper functions to let us process events properly on MacOS
259
260         * page/mac/WebCoreFrameBridge.mm:
261         (-[WebCoreFrameBridge dragSourceEndedAt:operation:]):
262
263 2007-02-04  George Staikos  <staikos@kde.org>
264
265         Reviewed by Zack.
266
267         Some Qt hacks and cleanups - makes rendering of forms much better on
268         OS X
269
270         * platform/qt/PlatformKeyboardEventQt.cpp: Add Key_Return/Enter
271         (WebCore::keyIdentifierForQtKeyCode):
272         (WebCore::windowsKeyCodeForKeyEvent):
273         * platform/qt/RenderThemeQt.cpp: Hacks and fix buttons
274         (WebCore::RenderThemeQt::addIntrinsicMargins):
275         (WebCore::RenderThemeQt::setCheckboxSize):
276         (WebCore::RenderThemeQt::supportsFocus):
277         (WebCore::RenderThemeQt::applyTheme):
278
279 2007-02-03  Maciej Stachowiak  <mjs@apple.com>
280
281         Rubber stamped by Adam.
282
283         - remove obsolete code that has an annoying space in the directory name
284
285         * WebCore.vcproj/Image Viewer/Image Viewer.cpp: Removed.
286         * WebCore.vcproj/Image Viewer/Image Viewer.h: Removed.
287         * WebCore.vcproj/Image Viewer/Image Viewer.rc: Removed.
288         * WebCore.vcproj/Image Viewer/Image Viewer.reg: Removed.
289         * WebCore.vcproj/Image Viewer/Image Viewer.vcproj: Removed.
290         * WebCore.vcproj/Image Viewer/ImageDocument.cpp: Removed.
291         * WebCore.vcproj/Image Viewer/ImageDocument.h: Removed.
292         * WebCore.vcproj/Image Viewer/ImageMainFrame.cpp: Removed.
293         * WebCore.vcproj/Image Viewer/ImageMainFrame.h: Removed.
294         * WebCore.vcproj/Image Viewer/ImageView.cpp: Removed.
295         * WebCore.vcproj/Image Viewer/ImageView.h: Removed.
296         * WebCore.vcproj/Image Viewer/Resource.h: Removed.
297         * WebCore.vcproj/Image Viewer/res/Image Viewer.ico: Removed.
298         * WebCore.vcproj/Image Viewer/res/Image ViewerDoc.ico: Removed.
299         * WebCore.vcproj/Image Viewer/res/ImageViewer.rc2: Removed.
300         * WebCore.vcproj/Image Viewer/res/Toolbar.bmp: Removed.
301         * WebCore.vcproj/Image Viewer/stdafx.cpp: Removed.
302         * WebCore.vcproj/Image Viewer/stdafx.h: Removed.
303
304 2007-02-04  Mitz Pettel  <mitz@webkit.org>
305
306         Reviewed by Oliver.
307
308         - fix http://bugs.webkit.org/show_bug.cgi?id=12564
309           REGRESSION: Uncaught AppKit exception when using the scrollwheel while Gmail is loading
310
311         * platform/mac/PlatformMouseEventMac.mm:
312         (WebCore::eventNumberForEvent): Scroll wheel events don't have an event number.
313
314 2007-02-04  Nikolas Zimmermann  <zimmermann@kde.org>
315
316         Reviewed by Sam.
317
318         Add support for xml:space="preserve" for SVG text.
319         It can be modeled by using white-space="pre" and replace \n by spaces.
320
321         Handle xml:space="default" correctly.
322         Always remove tabs from SVG text - as demanded by spec.
323
324         Added test: svg/custom/text-whitespace-handling.svg
325
326         * css/svg.css:
327         * ksvg2/svg/SVGTextContentElement.cpp:
328         (WebCore::SVGTextContentElement::parseMappedAttribute):
329         * rendering/RenderText.cpp:
330         (WebCore::RenderText::setStyle):
331         (WebCore::RenderText::setTextInternal):
332         * rendering/bidi.cpp:
333         (WebCore::shouldPreserveNewline):
334         (WebCore::RenderBlock::skipWhitespace):
335         (WebCore::RenderBlock::findNextLineBreak):
336
337 2007-02-03  Alexey Proskuryakov  <ap@webkit.org>
338
339         Reviewed by Darin.
340
341         http://bugs.webkit.org/show_bug.cgi?id=12560
342         W3C XPath test Text_Nodes.svg fails
343
344         Covered by dom/svg/level3/xpath/Text_Nodes.svg
345
346         * xml/XPathStep.cpp:
347         (WebCore::XPath::Step::nodeTestMatches): Only include the first text sibling in text() matches.
348
349 2007-02-03  Alexey Proskuryakov  <ap@webkit.org>
350
351         Reviewed by Darin.
352
353         http://bugs.webkit.org/show_bug.cgi?id=12485
354         XPath id() function doesn't work as root in paths
355
356         Test: fast/xpath/id-path.html
357
358         * xml/XPathPath.cpp:
359         (WebCore::XPath::Path::doEvaluate): Implemented.
360         (WebCore::XPath::LocationPath::evaluate): A new overload that takes an initial NodeVector.
361         (WebCore::XPath::LocationPath::doEvaluate): Moved most of the logic to the new evaluate().
362
363         * xml/XPathPath.h: Added a new evaluate() overload and a using declaration to keep the
364         generic one visible.
365
366 2007-02-03  Alexey Proskuryakov  <ap@webkit.org>
367
368         Reviewed by Darin.
369
370         http://bugs.webkit.org/show_bug.cgi?id=12559
371         REGRESSION: Crash in checkForHeadCharset() under GuardMalloc
372
373         No tests possible.
374
375         * loader/TextResourceDecoder.cpp:
376         (WebCore::TextResourceDecoder::checkForHeadCharset): Fix end of buffer checks; sprinkle a number 
377         of new ones over the function.
378
379 2007-02-03  David Kilzer  <ddkilzer@webkit.org>
380
381         Reviewed by NOBODY (no-svg build fix).
382
383         * page/EventHandler.cpp: Include FloatPoint.h.
384
385 2007-02-03  Alexey Proskuryakov  <ap@webkit.org>
386
387         Reviewed by Mitz.
388
389         http://bugs.webkit.org/show_bug.cgi?id=12549
390         Wrong character encoding at www.ravmilim.co.il
391
392         Test: fast/encoding/meta-charset.html
393
394         * loader/TextResourceDecoder.cpp:
395         (WebCore::TextResourceDecoder::checkForHeadCharset): Fix an off by one error.
396
397 2007-02-02  Maciej Stachowiak  <mjs@apple.com>
398         
399         Reviewed by Hyatt & Adele.
400         
401         - <rdar://problem/4896972> TV guide listings page doesn't finish loading (11674)
402         
403         Test case: fast/forms/disabled-select-change-index.html
404         
405         * html/HTMLOptionElement.cpp:
406         (WebCore::HTMLOptionElement::setSelected): Allow changing selected state of a disabled
407         option.
408         
409 2007-02-03  Nikolas Zimmermann  <zimmermann@kde.org>
410
411         Build fix, not reviewed.
412
413         Blind attempt to fix Qt build.
414
415         * WebCore.pro: Add RenderSVGGradientStop.cpp / RenderSVGHiddenContainer.cpp
416
417 2007-02-03  Nikolas Zimmermann  <zimmermann@kde.org>
418
419         Reviewed by Eric & Maciej.
420
421         Fix serveral <use> issues:
422         - When events are dispatch to a referenced element, the actual event.target
423           has to be set to the corresponding SVGElementInstance object
424
425         - Node::shadowAncestorNode() should _not_ return the shadowParentNode for SVG elements
426           This is only needed for the HTML forms concept and breaks event dispatching for SVG shadow tree elements.
427
428         - Add SVGElementInstance as possible EventTarget in bindings/js/kjs_dom.cpp
429           (Now event.target returns the actual SVGElementInstance object for a shadow tree element)
430
431         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12502 (Reproducible crash when browsing SVG map.)
432         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12511 (<use> has event dispatching issues)
433
434         Added test: svg/custom/use-event-handler-on-use-element.svg
435         Added test: svg/custom/use-event-handler-on-referenced-element.svg
436         Added test: svg/custom/use-elementInstance-event-target.svg
437         Added test: svg/custom/use-elementInstance-methods.svg
438
439         * bindings/js/kjs_dom.cpp:
440         (KJS::toJS):
441         * dom/EventTarget.cpp:
442         (WebCore::EventTarget::toSVGElementInstance):
443         * dom/EventTarget.h:
444         * dom/EventTargetNode.cpp:
445         (WebCore::EventTargetNode::handleLocalEvents):
446         (WebCore::EventTargetNode::dispatchGenericEvent):
447         (WebCore::EventTargetNode::dispatchEvent):
448         * dom/EventTargetNode.h:
449         * dom/Node.cpp:
450         (WebCore::Node::shadowAncestorNode):
451         * ksvg2/svg/SVGElement.cpp:
452         (WebCore::shadowTreeParentElementForShadowTreeElement):
453         (WebCore::SVGElement::dispatchEvent):
454         * ksvg2/svg/SVGElement.h:
455         * ksvg2/svg/SVGElementInstance.cpp:
456         (WebCore::SVGElementInstance::toSVGElementInstance):
457         * ksvg2/svg/SVGElementInstance.h:
458         * ksvg2/svg/SVGUseElement.cpp:
459         (WebCore::SVGUseElement::notifyAttributeChange):
460         (WebCore::SVGUseElement::instanceForShadowTreeElement):
461         * ksvg2/svg/SVGUseElement.h:
462
463 2007-02-02  Oliver Hunt  <oliver@apple.com>
464
465         Reviewed by Geoff.
466
467         Add guard around accessing [NSEvent eventNumber] to ensure
468         we don't attempt to access it on on non-mouse related NSEvent.
469
470         * platform/mac/PlatformMouseEventMac.mm:
471         (WebCore::eventNumberForEvent):
472         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
473
474 2007-02-02  Adam Roben  <aroben@apple.com>
475
476         Reviewed by Anders.
477
478         Try to be a little less selfish about DocumentLoader.
479
480         Spotted while working on <rdar://problem/4957747>.
481
482         * page/ContextMenuController.cpp:
483         (WebCore::ContextMenuController::contextMenuItemSelected):
484             Everyone can open frames in new windows.
485
486 2007-02-02  Nikolas Zimmermann  <zimmermann@kde.org>
487
488         Reviewed by Eric.
489
490         Move xml:space/xml:lang from svgattrs.in to xmlattrs.in where they actually belong.
491         Now they are actually recognized by SVGLangSpace::parseMappedAttribute.
492         Patch implementing xml:space="preserve" coming soon, which acts as test for this stuff.
493
494         Always build XMLNames.cpp (not only for SVG) and replace all occourences of
495         "http://www.w3.org/XML/1998/namespace" by "XMLNames::xmlNamespaceURI".
496
497         * DerivedSources.make:
498         * dom/DOMImplementation.cpp:
499         (WebCore::DOMImplementation::createDocument):
500         * ksvg2/svg/SVGLangSpace.cpp:
501         (WebCore::SVGLangSpace::SVGLangSpace):
502         (WebCore::SVGLangSpace::parseMappedAttribute):
503         * ksvg2/svg/SVGLangSpace.h:
504         * ksvg2/svg/svgattrs.in:
505         * page/Frame.cpp:
506         (WebCore::Frame::Frame):
507         * xml/XPathNSResolver.cpp:
508         (WebCore::XPathNSResolver::lookupNamespaceURI):
509         * xml/xmlattrs.in:
510
511 2007-02-02  Beth Dakin  <bdakin@apple.com>
512
513         Reviewed by Maciej.
514
515         Working on a layout test.
516
517         Fix for <rdar://problem/4966100> REGRESSION: Reproducible ASSERT 
518         hit at Walgreens.com
519
520         * page/Frame.cpp:
521         (WebCore::Frame::setView): If we are setting the view to 0 and 
522         detaching the document, call unscheduleRealyout() on the old view 
523         before setting it to 0.
524
525 2007-02-01  Geoffrey Garen  <ggaren@apple.com>
526
527         Reviewed by Maciej Stachowiak.
528         
529         Added support for selectively ignoring WebCore::Node leaks during layout
530         tests, so that we can ignore known leaks in other components.
531
532         * WebCore.exp:
533         * dom/Node.cpp:
534         (WebCore::Node::isSupported): Moved isSupported up with the rest of the static functions.
535
536         (WebCore::): Added an ignoreSet, which collects WebCore::Nodes whose lifetime
537         we want to ignore. We need to track which nodes to ignore rather than, say,
538         just suspending the count, because node destruction depends on lots of
539         different variables, so it would be nearly impossible to know when exactly 
540         to suspend the count and when exactly to resume it.
541
542         (WebCore::NodeCounter::~NodeCounter): Changed to use WTFLog instead of fprintf.
543
544         (WebCore::Node::startIgnoringLeaks): Do the ignoring.
545         (WebCore::Node::stopIgnoringLeaks): ditto
546         (WebCore::Node::Node): ditto
547         (WebCore::Node::~Node): ditto
548
549         * dom/Node.h: Moved isSupported up with the rest of the static functions.
550
551         * platform/mac/LoggingMac.mm:
552         (WebCore::initializeWithUserDefault): Renamed from "initializeLoggingChannel"
553         because the real goal here is to honor a user default -- WTFLoggingChannels
554         need no run-time initialization. Also replaced "off by default, on if a 
555         user default says so" behavior with "only override existing setting if a
556         user default says so" behavior. It seemed like a bug that you would specify 
557         a channel's on/off state in its definition, but this function would unconditionally
558         blow that state away.
559         (WebCore::InitializeLoggingChannelsIfNecessary):
560
561 2007-02-02  Eric Seidel  <eric@webkit.org>
562
563         Reviewed by mitz.
564
565         Fix gradient stop style resolution to be less of a hack, fixing style invalidation:
566         http://bugs.webkit.org/show_bug.cgi?id=12193
567         and fix stop-color and stop-opacity not to inherit:
568         http://bugs.webkit.org/show_bug.cgi?id=12193
569         
570         Tests:
571         * svg/custom/gradient-stops-style-change.svg: added
572         * svg/W3C-SVG-1.1/pservers-grad-18-b.svg: updated
573
574         * WebCore.xcodeproj/project.pbxproj:
575         * ksvg2/css/SVGCSSStyleSelector.cpp:
576         (WebCore::CSSStyleSelector::applySVGProperty):
577         * ksvg2/css/SVGRenderStyle.cpp:
578         (WebCore::SVGRenderStyle::inheritedNotEqual):
579         (WebCore::SVGRenderStyle::inheritFrom):
580         * ksvg2/css/SVGRenderStyle.h:
581         * ksvg2/svg/SVGDefsElement.cpp:
582         (WebCore::SVGDefsElement::createRenderer):
583         * ksvg2/svg/SVGGradientElement.cpp:
584         (WebCore::SVGGradientElement::createRenderer):
585         (WebCore::SVGGradientElement::buildStops):
586         * ksvg2/svg/SVGGradientElement.h:
587         (WebCore::SVGGradientElement::rendererIsNeeded):
588         * ksvg2/svg/SVGStopElement.cpp:
589         (WebCore::SVGStopElement::createRenderer):
590         * ksvg2/svg/SVGStopElement.h:
591         (WebCore::SVGStopElement::rendererIsNeeded):
592         * rendering/RenderSVGGradientStop.cpp: Added.
593         * rendering/RenderSVGGradientStop.h: Added.
594         * rendering/RenderSVGHiddenContainer.cpp: Added.
595         * rendering/RenderSVGHiddenContainer.h: Added.
596         * rendering/RenderSVGContainer.cpp:
597         * rendering/RenderSVGContainer.h:
598
599 2007-02-02  Zack Rusin  <zrusin@trolltech.com>
600
601         Reviewed by Lars
602
603         Fix scrolling-on-selection bug by correctly
604         scrolling to the offset instead of trying to 
605         ensure visibility with margins.
606
607         * platform/qt/ScrollViewQt.cpp:
608         (WebCore::ScrollView::scrollPointRecursively):
609
610 2007-02-02  Zack Rusin  <zrusin@trolltech.com>
611
612         Reviewed by Lars
613
614         Fix drawing of dashed and colored lines. Pen
615         has to be inherited for stroke to stay consistent.
616
617         * platform/graphics/qt/GraphicsContextQt.cpp:
618         (WebCore::GraphicsContext::setAlpha):
619         (WebCore::GraphicsContext::setPlatformStrokeColor):
620         (WebCore::GraphicsContext::setPlatformStrokeStyle):
621
622 2007-02-01  Nicholas Shanks  <webkit@nickshanks.com>
623
624         Reviewed by Mark.
625
626         Add support for CSS2 font-stretch property.
627
628         * css/CSSComputedStyleDeclaration.cpp:
629         (WebCore::):
630         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
631         * css/cssparser.cpp:
632         (WebCore::CSSParser::parseValue):
633         * css/cssstyleselector.cpp:
634         (WebCore::CSSStyleSelector::applyDeclarations):
635         (WebCore::CSSStyleSelector::applyProperty):
636         * platform/FontCache.cpp:
637         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
638         (WebCore::FontPlatformDataCacheKey::operator==):
639         (WebCore::computeHash):
640         (WebCore::FontPlatformDataCacheKeyTraits::deletedValue):
641         (WebCore::FontPlatformDataCacheKeyTraits::emptyValue):
642         (WebCore::FontCache::getCachedFontPlatformData):
643         * platform/FontDescription.h:
644         (WebCore::):
645         (WebCore::FontDescription::FontDescription):
646         (WebCore::FontDescription::stretch):
647         (WebCore::FontDescription::narrowerStretch):
648         (WebCore::FontDescription::widerStretch):
649         (WebCore::FontDescription::setStretch):
650         (WebCore::FontDescription::operator==):
651         * platform/mac/FontCacheMac.mm:
652         (WebCore::FontCache::createFontPlatformData):
653         * platform/mac/WebFontCache.mm:
654         (acceptableChoice):
655         (betterChoice):
656         (+[WebFontCache fontWithFamily:traits:size:]):
657
658 2007-02-01  Timothy Hatcher  <timothy@apple.com>
659
660         Reviewed by Mark Rowe.
661
662         <rdar://problem/4969201> REGRESSION: Safari applies the wrong font to BODY element at http://www.apple.com/downloads/dashboard/
663
664         * platform/mac/WebFontCache.mm:
665         (+[WebFontCache fontWithFamily:traits:size:]): Don't call [NSFont fontWithName:] with the desiredFamily on Tiger.
666
667 2007-02-01  Alexey Proskuryakov  <ap@webkit.org>
668
669         Reviewed by Darin.
670
671         http://bugs.webkit.org/show_bug.cgi?id=12506
672         REGRESSION: Safari doesn't display hebrew text on a web page,
673         displayed correctly on Tiger
674
675         * loader/TextResourceDecoder.cpp:
676         (WebCore::TextResourceDecoder::checkForHeadCharset): Advance the pointer when necessary.
677
678 2007-02-01  George Staikos  <staikos@kde.org>
679
680         Reviewed by Zack and Lars.
681
682         Add a cookie interface for the Qt build.
683
684         * WebCore.pro:
685         * platform/qt/CookieJarQt.cpp:
686         (WebCore::setCookies):
687         (WebCore::cookies):
688         (WebCore::cookiesEnabled):
689
690 2007-02-01  Maciej Stachowiak  <mjs@apple.com>
691
692         Reviewed by Adele.
693         
694         - fixed <rdar://problem/4922764> ASSERTION: (!m_contentFunction) in PolicyCheck::call trying to visit feed URL (CNN, Apple, etc.)
695
696         * loader/FrameLoader.cpp:
697         (WebCore::FrameLoader::stopPolicyCheck): Call new cancel method instead of call(false) on old check.
698         (WebCore::PolicyCheck::cancel): call any callback function that is set with false or PolicyIgnore as
699         appropriate.
700         * loader/FrameLoader.h:
701
702 2007-02-01  Beth Dakin  <bdakin@apple.com>
703
704         Reviewed by Hyatt.
705
706         Fix for http://bugs.webkit.org/show_bug.cgi?id=10517 REGRESSION 
707         (r12065-r12082): Navigation graphic wraps to the next line on 
708         duart.com and <rdar://problem/4960505> REGRESSION: The Awesome 
709         Windows Vista page has a layout error in the header table (10517)
710
711         The problem is that we never supported a quirk that other browsers 
712         support where, under very specific circumstances, a table cell will 
713         grow to fit an image inside of it. This is only a regression 
714         because a bug was fixed were we were 1 pixel off in the calculation 
715         of overflow in some cases.
716
717         * rendering/RenderBlock.cpp:
718         (WebCore::shouldGrowTableCellForImage):
719         (WebCore::RenderBlock::calcInlineMinMaxWidth):
720
721 2007-02-01  Zack Rusin  <zrusin@trolltech.com>
722
723         Reviewed by Lars
724
725         Implement native look for comboboxes
726         and fix/implement popup menus.
727
728         * platform/PopupMenu.h:
729         * platform/qt/PopupMenuQt.cpp:
730         (WebCore::PopupMenu::PopupMenu):
731         (WebCore::PopupMenu::~PopupMenu):
732         (WebCore::PopupMenu::clear):
733         (WebCore::PopupMenu::populate):
734         (WebCore::PopupMenu::show):
735         (WebCore::PopupMenu::hide):
736         (WebCore::PopupMenu::updateFromElement):
737         * platform/qt/RenderThemeQt.cpp:
738         (WebCore::RenderThemeQt::adjustMenuListStyle):
739         (WebCore::RenderThemeQt::paintButton):
740         (WebCore::RenderThemeQt::paintTextField):
741         (WebCore::RenderThemeQt::paintMenuList):
742
743 2007-02-01  Darin Adler  <darin@apple.com>
744
745         Reviewed by Maciej.
746
747         - fix <rdar://problem/4887428> REGRESSION: Implement slight delay for firing incremental onSearch event
748
749         * rendering/RenderTextControl.h:
750         * rendering/RenderTextControl.cpp:
751         (WebCore::RenderTextControl::RenderTextControl): Set up timer.
752         (WebCore::RenderTextControl::subtreeHasChanged): Start timer here instead of immediately sending event.
753         (WebCore::RenderTextControl::searchEventTimerFired): Added. Sends search event.
754         (WebCore::RenderTextControl::stopSearchEventTimer): Added.
755         (WebCore::RenderTextControl::startSearchEventTimer): Added. Sends search event right away if there is
756         no text. If there is some text, sets the timer using the same delay rule as NSSearchField. If you keep
757         typing, then the timer keeps getting reset 0.2 seconds into the future until you pause.
758
759         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::onSearch): Tell the renderer to
760         stop the timer, since we're sending a search event. This helps when a caller other than
761         the timer decides to send an explicit search event.
762
763 2007-02-01  Maciej Stachowiak  <mjs@apple.com>
764
765         Fix by Darin, reviewed by Maciej.
766
767         - fix ~10% performance regression from encoding fix
768
769         * loader/TextResourceDecoder.cpp:
770         (WebCore::TextResourceDecoder::checkForHeadCharset): Fix a logic
771         error which made huge strings accidentally.
772
773 2007-02-01  Lars Knoll <lars@trolltech.com>
774
775         Fix the Qt build
776
777         * page/qt/EventHandlerQt.cpp:
778
779 2007-01-31  Darin Adler  <darin@apple.com>
780
781         Reviewed by Adam and Geoff.
782
783         - fix <rdar://problem/4786767> REGRESSION: <select> controls are not resized when zooming text
784
785         Test: fast/forms/select-width-font-change.html
786
787         * rendering/RenderMenuList.h: Cleaned up formatting a bit. Removed unneeded include of PopupMenu.h.
788         Made a lot more things private, including the PopupMenuClient base class, all of the virtual
789         functions from PopupMenuClient, and the setTextFromOption function. Added updateOptionsWidth.
790
791         * rendering/RenderMenuList.cpp:
792         (WebCore::RenderMenuList::setStyle): Added code to call updateOptionsWidth when the font changes.
793         (WebCore::RenderMenuList::updateOptionsWidth): Added. Factored code out of updateFromElement.
794         Changed to do nothing when m_optionsWidth is already correct.
795         (WebCore::RenderMenuList::updateFromElement): Moved code to recomputed options width to the new
796         updateOptionsWidth function.
797         (WebCore::RenderMenuList::text): Made const.
798
799 2007-01-31  Oliver Hunt  <oliver@apple.com>
800
801         Reviewed by Adam.
802
803         Migrate more drag and drop logic to WebCore, start preparing
804         to move EventHandler::handleDrag from EventHandlerMac to EventHandler 
805
806         * WebCore.exp:   
807           updating methods
808                     
809         * dom/Clipboard.cpp:
810         * dom/Clipboard.h:
811         (WebCore::Clipboard::Clipboard):
812         (WebCore::Clipboard::setDragHasStarted):
813         (WebCore::Clipboard::dragStarted): 
814           Moving from ClipboardMac to Clipboard 
815
816         * dom/EventTargetNode.cpp:
817         (WebCore::EventTargetNode::dispatchMouseEvent):
818           PlatformMouseEvent no longer lies about button state, however 
819           DOM Events don't allow NoButton, so we need to convert NoButton 
820           to LeftButton when we create a DOM Event from PlatformMouseEvent
821
822         * page/DragClient.h:
823           Tidying comment 
824
825         * page/DragController.cpp:
826         (WebCore::createMouseEvent):
827           Updated for new PlatformMouseEvent constructors
828         (WebCore::DragController::mayStartDragAtEventLocation):
829           Migrated from WebKit
830
831         * page/DragController.h:
832           Added above function declarations
833
834         * page/EventHandler.cpp:
835         (WebCore::EventHandler::dragState): 
836         (WebCore::EventHandler::dragHysteresisExceeded):
837         (WebCore::EventHandler::freeClipboard):
838         (WebCore::EventHandler::shouldDragAutoNode):
839           Moved from EventHandlerMac
840         (WebCore::EventHandler::handleMouseMoveEvent):
841         (WebCore::EventHandler::eventMayStartDrag):
842         (WebCore::EventHandler::handleMousePressEvent):
843           Use DragController     
844
845         * page/EventHandler.h:
846           Added DragState struct definition to EventHandler
847
848         * page/mac/EventHandlerMac.mm:
849         (WebCore::EventHandler::eventActivatedView):
850         (WebCore::EventHandler::handleDrag):
851         (WebCore::EventHandler::handleMouseUp):
852         (WebCore::EventHandler::mouseDown):
853           Update to use DragController and PlatformMouseEvent
854
855         * page/mac/WebCoreFrameBridge.h:
856         * page/mac/WebCoreFrameBridge.mm:
857         (-[WebCoreFrameBridge dragSourceMovedTo:]):
858         (-[WebCoreFrameBridge dragSourceEndedAt:operation:]):
859           Use DragController for state
860
861         * platform/PlatformMouseEvent.h:
862         (WebCore::):
863         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
864         (WebCore::PlatformMouseEvent::eventType):
865         (WebCore::PlatformMouseEvent::timestamp):
866         (WebCore::PlatformMouseEvent::eventNumber):
867         (WebCore::PlatformMouseEvent::setClickCount):
868           Exposing necessary data for Drag logic
869
870         * platform/mac/ClipboardMac.h:
871         * platform/mac/ClipboardMac.mm:
872         (WebCore::ClipboardMac::ClipboardMac):
873         (WebCore::ClipboardMac::setDragImage):
874           Have moved a number of fields from ClipboardMac to Clipboard
875           so need to use accessors in a few places now
876
877         * platform/mac/PlatformMouseEventMac.mm:
878         (WebCore::mouseButtonForEvent):
879         (WebCore::mouseEventForNSEvent):
880         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
881           Determine MouseEventType, and provide event time info
882
883 2007-01-31  Alexey Proskuryakov  <ap@webkit.org>
884
885         Reviewed by Darin.
886
887         http://bugs.webkit.org/show_bug.cgi?id=12506
888         REGRESSION: Safari doesn't display hebrew text on a web page,
889         displayed correctly on Tiger
890
891         * loader/TextResourceDecoder.cpp:
892         (WebCore::TextResourceDecoder::checkForHeadCharset): Skip over 
893         quoted attributes.
894
895 2007-01-31  David Carson  <dacarson@gmail.com>
896
897         Reviewed by Darin.
898
899         - fix http://bugs.webkit.org/show_bug.cgi?id=12510
900         Initialize the variable m_totalLoops
901         Is tested by LayoutTests/fast/css/MarqueeLayoutTest.html
902
903         * rendering/RenderLayer.cpp:
904         (WebCore::Marquee::Marquee):
905
906 2007-01-31  Anders Carlsson  <acarlsson@apple.com>
907
908         Reviewed by Maciej.
909
910         <rdar://problem/4886776>
911         REGRESSION: After opening a web archive, location shows the actual URL, not the webarchive file
912
913         * WebCore.exp:
914         * loader/FrameLoader.cpp:
915         (WebCore::FrameLoader::continueLoadWithData):
916         * loader/FrameLoader.h:
917         New function which continues a load but using a given buffer instead.
918         
919 2007-01-31  Adele Peterson  <adele@apple.com>
920
921         Reviewed by Adam.
922
923         Fix for http://bugs.webkit.org/show_bug.cgi?id=12516
924         REGRESSION (r19313): All keyboard navigation has stopped working
925
926         For non-editable selections, handleKeyPress doesn't need to call _interceptEditingKeyEvent. 
927
928         * editing/Editor.cpp:
929         (WebCore::selectionForEvent): Moved this to the top of the file.
930         (WebCore::Editor::handleKeyPress): Do the equivalent of the _canEdit check that used to be in WebKit WebEditorClient::handleKeyPress.
931
932 2007-01-31  Geoffrey Garen  <ggaren@apple.com>
933
934         Reviewed by Darin Adler.
935
936         Added a Range counter to detect leaks. Tweaked the Node counter.
937         
938         Also fixed a TextIterator destructive modification bug that I noticed along the
939         way. No test case for this bug because no clients have been bitten by it
940         yet.
941
942         * dom/Node.cpp: Renamed NodeImplCounter to NodeCounter, changed counter
943         to unsigned, fixed formatting to match style guidelines.
944         (WebCore::NodeCounter::~NodeCounter):
945         (WebCore::Node::Node):
946         (WebCore::Node::~Node):
947
948         * dom/Range.cpp:
949         (WebCore::RangeCounter::~RangeCounter): Added.
950         (WebCore::Range::Range):
951         (WebCore::Range::~Range):
952         (WebCore::Range::ownerDocument): New accessor, used by TextIterator to avoid
953         annoying NULL checks.
954         * dom/Range.h:
955
956         * editing/TextIterator.cpp:
957         (WebCore::TextIterator::subrange): 
958         (1) Don't initialize result with entireRange --  doing so would create a 
959         PassRefPtr that pointed to entireRange, so this function would destructively 
960         modify the Range you passed it. Initialize it with a new Range instead.
961         (2) Don't use a PassRefPtr as a local variable, because they have sneaky
962         semantics. Use a RefPtr instead.
963         (3) Don't call CharacterIterator::range() willy-nilly, since it does 
964         non-trivial work. Use a local variable instead.
965
966 2007-01-31  Adele Peterson  <adele@apple.com>
967
968         Reviewed by Darin.
969
970         WebCore part of fix for <rdar://problem/4521461> REGRESSION: when keyPress event changes form focus, inserted key goes to wrong control
971
972         Test: fast/events/keypress-focus-change.html
973
974         * editing/Editor.cpp:
975         (WebCore::selectionForEvent): Added.  This computes a selection that considers the case where an event handler 
976          has moved the selection outside of a text control.  In that case, we use the target control's selection.
977         (WebCore::Editor::insertText): This gets the selectionForEvent, checks that the selection is editable,
978          and calls TypingCommand::insertText with the correct selection.
979
980         * editing/TypingCommand.h: Added a version of insertText that takes a selection.  The old version of insertText will call this, and pass
981           in the frame's selection.
982         * editing/TypingCommand.cpp: (WebCore::TypingCommand::insertText): Added. Uses the passed in selection to 
983           set the starting and ending selections correctly so that the editing machinery will insert the text in the correct place.
984
985         * page/Page.h: Added convenience method to get selection from focused or main frame.
986         * page/Page.cpp: (WebCore::Page::selection):
987
988         * html/HTMLInputElement.h: Added selection methods to get selection for text controls.
989         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::selection):
990         * html/HTMLTextAreaElement.h:
991         * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::selection):
992         * rendering/RenderTextControl.h:
993         * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::selection):
994
995 2007-01-31  Darin Adler  <darin@apple.com>
996
997         - fix build
998
999         * ForwardingHeaders/wtf/ListHashSet.h: Added.
1000
1001 2007-01-31  Zack Rusin  <zrusin@trolltech.com>
1002
1003         Reviewed by Lars
1004
1005         Return the correct selection color.
1006
1007         * platform/qt/RenderThemeQt.cpp:
1008         (WebCore::RenderThemeQt::supportsFocusRing):
1009         (WebCore::RenderThemeQt::platformActiveSelectionBackgroundColor):
1010         (WebCore::RenderThemeQt::platformInactiveSelectionBackgroundColor):
1011         (WebCore::RenderThemeQt::platformActiveSelectionForegroundColor):
1012         (WebCore::RenderThemeQt::platformInactiveSelectionForegroundColor):
1013
1014 2007-01-31  Maciej Stachowiak  <mjs@apple.com>
1015
1016         Reviewed by Mark.
1017
1018         - fixed <rdar://problem/4751164> REGRESSION: Safari places text on incorrect button when returning to a page via back [10541]
1019         http://bugs.webkit.org/show_bug.cgi?id=10541
1020
1021         * dom/Document.cpp:
1022         (WebCore::Document::formElementsState):
1023         * dom/Document.h:
1024         
1025         I couldn't figure out the back/forward support in the tests enough
1026         to make an automated test, but this maual test reproduces the
1027         problem 100% without this patch:
1028         
1029         * manual-tests/back.html: Added.
1030         * manual-tests/form-control-madness.html: Added.
1031
1032 2007-01-31  David Kilzer  <ddkilzer@kilzer.net>
1033
1034         Reviewed by Mitz.
1035
1036         - fix http://bugs.webkit.org/show_bug.cgi?id=12490
1037           Clean up canPlaceOnLine logic in bidi.cpp
1038
1039         No test cases since there is no change in functionality.
1040
1041         * rendering/bidi.cpp:
1042         (WebCore::RenderBlock::findNextLineBreak): Simplify canFitOnLine expression.
1043
1044 2007-01-31  Zack Rusin  <zack@kde.org>
1045
1046         Adding comments explaining how the focus ring implementation
1047         works on the Qt platform and just move focus ring rendering
1048         related code to the same spot.
1049
1050         * platform/graphics/qt/GraphicsContextQt.cpp:
1051         (WebCore::setFocusRingColorChangeFunction):
1052         (WebCore::focusRingColor):
1053         (WebCore::GraphicsContext::drawFocusRing):
1054         * platform/qt/TemporaryLinkStubs.cpp:
1055
1056 2007-01-31  Zack Rusin  <zrusin@trolltech.com>
1057
1058         Reviewed by Lars
1059
1060         Properly propagate key events. 
1061
1062         * page/qt/FrameQt.cpp:
1063         * page/qt/FrameQt.h: Remove redundant method.
1064         * platform/qt/ScrollViewCanvasQt.cpp:
1065         (WebCore::ScrollViewCanvasQt::handleKeyEvent):
1066
1067 2007-01-31  George Staikos  <staikos@kde.org>
1068
1069         Reviewed by Zack and Lars.
1070
1071         Fix double delete on cancel as well as assertion with proxy.
1072
1073         * platform/network/qt/ResourceHandleManagerQt.cpp:
1074         (WebCore::WebCoreHttp::getConnection):
1075         (WebCore::WebCoreHttp::onRequestFinished):
1076         (WebCore::WebCoreHttp::cancel):
1077
1078 2007-01-31  Mark Rowe  <mrowe@apple.com>
1079
1080         Reviewed by Oliver.
1081
1082         * dom/Document.h: Change #if XSLT_SUPPORT to #ifdef XSLT_SUPPORT.
1083
1084 2007-01-31  Lars Knoll <lars@trolltech.com>
1085
1086         Fix the Qt build.
1087
1088         * platform/network/qt/ResourceHandleQt.cpp:
1089         (WebCore::ResourceHandle::setDefersLoading):
1090
1091 2007-01-31  Zack Rusin  <zack@kde.org>
1092
1093         Reviewed by Eric.
1094
1095         Implement SVGImage on the Qt platform.
1096
1097         * WebCore.pro:
1098         * loader/CachedImage.cpp:
1099         (WebCore::CachedImage::createImage):
1100         * platform/graphics/ImageBuffer.h:
1101         * platform/graphics/qt/ImageBufferQt.cpp:
1102         (WebCore::ImageBuffer::create):
1103         (WebCore::ImageBuffer::ImageBuffer):
1104         (WebCore::ImageBuffer::~ImageBuffer):
1105         (WebCore::ImageBuffer::context):
1106         (WebCore::ImageBuffer::pixmap):
1107         * platform/graphics/svg/SVGImage.cpp:
1108         (WebCore::SVGImage::nativeImageForCurrentFrame):
1109         (WebCore::SVGImage::setData):
1110
1111 2007-01-30  Maciej Stachowiak  <mjs@apple.com>
1112
1113         Reviewed by Brady.
1114
1115         - fixed <rdar://problem/4939366> REGRESSION: Assertion failure and crash when going back in history (12314)
1116
1117         * loader/FrameLoader.cpp:
1118         (WebCore::FrameLoader::createWindow): special case a frame name of "_blank"
1119         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): ditto
1120
1121 2007-01-30  Maciej Stachowiak  <mjs@apple.com>
1122
1123         Reviewed by Anders.
1124
1125         - fixed <rdar://problem/4963871> REGRESSION: Crash occurs at WebCore::Frame::loader() when attempting to open a saved archive file
1126
1127         * loader/DocumentLoader.cpp:
1128         (WebCore::DocumentLoader::request): Removed obsolete FIXME.
1129         (WebCore::DocumentLoader::initialRequest): Ditto.
1130         * loader/MainResourceLoader.cpp:
1131         (WebCore::MainResourceLoader::MainResourceLoader): Handle data loads from a timer, otherwise bad things happen.
1132         (WebCore::MainResourceLoader::handleDataLoadNow):
1133         (WebCore::MainResourceLoader::handleDataLoadSoon):
1134         (WebCore::MainResourceLoader::loadNow):
1135         (WebCore::MainResourceLoader::didCancel): cancel data load timer
1136         * loader/MainResourceLoader.h:
1137
1138 2007-01-30  Timothy Hatcher  <timothy@apple.com>
1139
1140         Reviewed by Darin.
1141
1142         <rdar://problem/4961953> Stop using NSString deprecated methods like initWithCString:
1143
1144         * WebCore.xcodeproj/project.pbxproj:
1145         * platform/graphics/svg/filters/cg/WKArithmeticFilter.m:
1146         (-[WKArithmeticFilter init]):
1147         * platform/graphics/svg/filters/cg/WKComponentMergeFilter.m:
1148         (-[WKComponentMergeFilter init]):
1149         * platform/graphics/svg/filters/cg/WKDiffuseLightingFilter.m:
1150         (-[WKDiffuseLightingFilter init]):
1151         * platform/graphics/svg/filters/cg/WKDiscreteTransferFilter.m:
1152         (-[WKDiscreteTransferFilter init]):
1153         * platform/graphics/svg/filters/cg/WKDisplacementMapFilter.m:
1154         (-[WKDisplacementMapFilter init]):
1155         * platform/graphics/svg/filters/cg/WKDistantLightFilter.m:
1156         (-[WKDistantLightFilter init]):
1157         * platform/graphics/svg/filters/cg/WKGammaTransferFilter.m:
1158         (-[WKGammaTransferFilter init]):
1159         * platform/graphics/svg/filters/cg/WKLinearTransferFilter.m:
1160         (-[WKLinearTransferFilter init]):
1161         * platform/graphics/svg/filters/cg/WKNormalMapFilter.m:
1162         (-[WKNormalMapFilter init]):
1163         * platform/graphics/svg/filters/cg/WKPointLightFilter.m:
1164         (-[WKPointLightFilter init]):
1165         * platform/graphics/svg/filters/cg/WKSpecularLightingFilter.m:
1166         (-[WKSpecularLightingFilter init]):
1167         * platform/graphics/svg/filters/cg/WKSpotLightFilter.m:
1168         (-[WKSpotLightFilter init]):
1169         * platform/graphics/svg/filters/cg/WKTableTransferFilter.m:
1170         (-[WKTableTransferFilter init]):
1171
1172 2007-01-30  David Hyatt  <hyatt@apple.com>
1173
1174         Fix for Radar bug #4679426, golden gate bridge Web site layout broken.
1175         
1176         This is a regression caused by the addition of :lang support.  This
1177         feature caused us to accept any pseudo-class/element with function
1178         arguments, even ones we couldn't handle.  The site used such a construct
1179         in conjunction with :not, which turned :not(something-crazy) into not(false).
1180         This ended up being "true", and so we started matching a rule we used to
1181         reject.
1182
1183         The fix is to now aggressively parse pseudo-elements and classes and to
1184         cause the rejection of an entire rule if any pseudoclass or element within
1185         any simple selector of that rule is unrecognized.
1186
1187         Reviewed by darin
1188
1189         fast/css/invalid-pseudo-classes.html
1190
1191         * css/CSSGrammar.y:
1192         * css/CSSSelector.cpp:
1193         (WebCore::CSSSelector::extractPseudoType):
1194         * css/CSSSelector.h:
1195         (WebCore::CSSSelector::):
1196         * css/cssstyleselector.cpp:
1197         (WebCore::CSSStyleSelector::checkOneSelector):
1198
1199 2007-01-30  Mitz Pettel  <mitz@webkit.org>
1200
1201         Reviewed by Darin.
1202
1203         - fix http://bugs.webkit.org/show_bug.cgi?id=12487
1204           REGRESSION: Repro crash when a second background image is animated
1205
1206         Test: fast/images/animated-background-image-crash.html
1207
1208         * rendering/RenderObject.cpp:
1209         (WebCore::RenderObject::arenaDelete): Deref() all background images and the
1210         border image.
1211
1212 2007-01-30  Darin Adler  <darin@apple.com>
1213
1214         Reviewed by Maciej.
1215
1216         * dom/EventTarget.h:
1217         * dom/EventTarget.cpp: (WebCore::EventTarget::toNode):
1218         Use EventTargetNode instead of Node. Removed unneeded includes.
1219         Make EventTarget's destructor protected to make it clear that you
1220         should never delete one.
1221
1222         * dom/EventTargetNode.h:
1223         (WebCore::EventTargetNode::toNode):
1224         Tweaked formatting. Updated for change to return value.
1225
1226         * platform/graphics/BitmapImage.h: Updated comment for clarity.
1227         Marked FrameData Noncopyable.
1228
1229         * platform/graphics/Image.h: Tweaked formatting.
1230
1231         * platform/graphics/ImageAnimationObserver.h:
1232         Make ImageAnimationObserver's destructor protected to make it clear that you
1233         should never delete one.
1234
1235 2007-01-30  Mitz Pettel  <mitz@webkit.org>
1236
1237         Reviewed by Darin (by way of Hyatt).
1238
1239         - fix http://bugs.webkit.org/show_bug.cgi?id=12373
1240           ASSERTION FAILURE: !child->needsLayout() on paypal.com
1241
1242         Test: fast/table/inline-form-assert.html
1243
1244         * rendering/RenderContainer.cpp:
1245         (WebCore::RenderContainer::layout): Changed the assertion to ignore inlines.
1246
1247 2007-01-30  Alexey Proskuryakov  <ap@webkit.org>
1248
1249         Reviewed by Darin.
1250
1251         http://bugs.webkit.org/show_bug.cgi?id=12486
1252         XPathNSResolver.lookupNamespaceURI should return null if no URI is found
1253
1254         * xml/XPathNSResolver.idl: added [ConvertNullStringTo=Null].
1255
1256 2007-01-30  Anders Carlsson  <acarlsson@apple.com>
1257
1258         Reviewed by Maciej.
1259
1260         Revert the parts of 19244 that removed deferring NSURLConnections, that was not a correct change.
1261         Remove ASSERTS from loader.cpp that aren't true anymore since the callbacks are invoked without a handle
1262         when loading a subresource from an archive.
1263
1264         * loader/MainResourceLoader.cpp:
1265         (WebCore::MainResourceLoader::loadNow):
1266         * loader/ResourceLoader.cpp:
1267         (WebCore::ResourceLoader::releaseResources):
1268         (WebCore::ResourceLoader::load):
1269         (WebCore::ResourceLoader::setDefersLoading):
1270         * loader/loader.cpp:
1271         (WebCore::Loader::didFail):
1272         (WebCore::Loader::didReceiveResponse):
1273         (WebCore::Loader::didReceiveData):
1274         * platform/network/ResourceHandle.cpp:
1275         (WebCore::ResourceHandle::ResourceHandle):
1276         (WebCore::ResourceHandle::create):
1277         * platform/network/ResourceHandle.h:
1278         * platform/network/ResourceHandleInternal.h:
1279         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1280         * platform/network/mac/ResourceHandleMac.mm:
1281         (WebCore::ResourceHandle::start):
1282         (WebCore::ResourceHandle::setDefersLoading):
1283
1284 2007-01-30  Darin Adler  <darin@apple.com>
1285
1286         Reviewed by John.
1287
1288         - fix for <rdar://problem/4911504> REGRESSION: With a image selected, ctrl-clicking
1289           on page displays the wrong contextual menu items "Search in Google", "Search in Spotlight"
1290           and "Look up in Dictionary"
1291
1292         * platform/ContextMenu.cpp:
1293         (WebCore::selectionContainsPossibleWord): Added. Returns true if there are some
1294         non-whitespace characters in the selection.
1295         (WebCore::ContextMenu::populate): Don't add SearchSpotlightItem, SearchWebItem,
1296         or LookInDictionaryItem if selectionContainsPossibleWord returns false.
1297
1298 2007-01-30  Nikolas Zimmermann  <zimmermann@kde.org>
1299
1300         Reviewed by Oliver.
1301
1302         Respect stroke-width in absolute repaint rect calculations for SVG text.
1303         Added test: svg/custom/text-repaint-including-stroke.svg
1304
1305         * rendering/RenderSVGText.cpp:
1306         (WebCore::RenderSVGText::relativeBBox):
1307
1308 2007-01-30  Steve Falkenburg  <sfalken@apple.com>
1309
1310         Reviewed by Oliver.
1311
1312         Add missing includes.
1313
1314         * ksvg2/svg/SVGElementInstance.cpp:
1315
1316 2007-01-30  Alexey Proskuryakov  <ap@webkit.org>
1317
1318         Reviewed by Darin.
1319
1320         http://bugs.webkit.org/show_bug.cgi?id=12452
1321         XPath id() function is not supported
1322
1323         * xml/XPathFunctions.cpp:
1324         (WebCore::XPath::isWhitespace): A helper to detect XML whitespace.
1325
1326         (WebCore::XPath::FunId::isConstant):
1327         (WebCore::XPath::FunId::doEvaluate):
1328         (WebCore::XPath::FunctionMapping::):
1329         Implemented id().
1330
1331 2007-01-30  Zack Rusin  <zrusin@trolltech.com>
1332
1333         Reviewed by Sam.
1334
1335         Make the gradients work on the Qt platform.
1336
1337         * platform/graphics/svg/SVGPaintServerGradient.h:
1338         * platform/graphics/svg/SVGPaintServerLinearGradient.h:
1339         * platform/graphics/svg/SVGPaintServerRadialGradient.h:
1340         * platform/graphics/svg/qt/SVGPaintServerGradientQt.cpp:
1341         (WebCore::SVGPaintServerGradient::fillColorArray):
1342         (WebCore::SVGPaintServerGradient::setup):
1343         * platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp:
1344         (WebCore::SVGPaintServerLinearGradient::setupGradient):
1345         * platform/graphics/svg/qt/SVGPaintServerRadialGradientQt.cpp:
1346         (WebCore::SVGPaintServerRadialGradient::setupGradient):
1347
1348 2007-01-30  Nikolas Zimmermann  <zimmermann@kde.org>
1349
1350         Reviewed by Eric & Oliver. Leak related fixes reviewed by Mark.
1351
1352         Finally make the SVG <use> implementation use the proper "shadow tree" concept,
1353         which is also used by the HTML forms implementation. It's the first time in ksvg
1354         history that <use> is not implement as a crude hack, but proper & sane.
1355
1356         Implement deep expansion of use trees both for the instance & shadow tree.
1357         (<use> on a <symbol> containing a <g> containg a <use> element referencing a <rect>)
1358  
1359         The shadow tree is free of any symbol/use tags, but is properly expanded to the
1360         actual referenced content. The instance tree (SVGElementInstance objects) now exactly
1361         exposes the "expanded" shadow tree, as required by the specification. Previously
1362         we cloned referenced <use> elements, so our faked use shadow tree itself contained
1363         <use> elements. That lead to very nasty bugs - finally these dirty pieces are gone.
1364
1365         Checked twice that the updating logic works for all weird "deep expansions" cases. Example:
1366         <rect id="someRect"/> <g id="g"> <symbol> <use xlink:href="#someRect"/> </g> <use xlink:href="#g" id="use"/>
1367  
1368         If you walk through the instanceRoot using JavasScript, and explicitely modify some propertties of "someRect"
1369         -> all instances get updated correctly. For such simple cases it doesn't even involve recloning the shadow tree!
1370
1371         SVGElementInstance is now an EventTarget, as demanded by the specification - sending events to <use> instances
1372         will be implemented in a follow-up patch - as well as the "share event listeners with referenced target" logic.
1373
1374         Fixes all updating/stability issues with svg/carto.net/window.svg.
1375         Fixes: http://bugs.webkit.org/show_bug.cgi?id=6000 (<use> does not handle recursion safely)
1376
1377         Added test: svg/custom/use-on-use.svg (deep use referencing)
1378         Added test: svg/custom/use-on-g-containing-use.svg (nested deep use referencing)
1379         Added test: svg/custom/use-modify-target-container.svg (instanceRoot scripting, modifying <g> target)
1380         Added test: svg/custom/use-modify-target-symbol.svg (instanceRoot scripting, modfiying <symbol> target)
1381         Added test: svg/custom/use-modify-container-in-target.svg (modify <g> within referenced use target -> needs to update instances)
1382         Added test: svg/custom/use-recursion-1.svg (referencing container, whose children reference itself)
1383         Added test: svg/custom/use-recursion-2.svg (<use> self referencing)
1384         Added test: svg/custom/use-recursion-3.svg (<use> self rerencing, within <use> target)
1385         Added test: svg/custom/use-recursion-4.svg (cyclic referencing, within <use> target)
1386
1387         * bindings/scripts/CodeGeneratorJS.pm:
1388         * css/cssstyleselector.cpp:
1389         (WebCore::CSSStyleSelector::initForStyleResolve):
1390         (WebCore::CSSStyleSelector::adjustRenderStyle):
1391         * ksvg2/misc/SVGDocumentExtensions.cpp:
1392         (WebCore::SVGDocumentExtensions::removeTimeContainer):
1393         * ksvg2/svg/SVGElement.cpp:
1394         (WebCore::SVGElement::SVGElement):
1395         (WebCore::SVGElement::viewportElement):
1396         * ksvg2/svg/SVGElement.h:
1397         (WebCore::SVGElement::isShadowNode):
1398         (WebCore::SVGElement::shadowParentNode):
1399         (WebCore::SVGElement::setShadowParentNode):
1400         * ksvg2/svg/SVGElementInstance.cpp:
1401         (WebCore::SVGElementInstance::SVGElementInstance):
1402         (WebCore::SVGElementInstance::correspondingUseElement):
1403         (WebCore::SVGElementInstance::shadowTreeElement):
1404         (WebCore::SVGElementInstance::setShadowTreeElement):
1405         (WebCore::containsUseChildNode):
1406         (WebCore::SVGElementInstance::updateInstance):
1407         (WebCore::SVGElementInstance::addEventListener):
1408         (WebCore::SVGElementInstance::removeEventListener):
1409         (WebCore::SVGElementInstance::dispatchEvent):
1410         * ksvg2/svg/SVGElementInstance.h:
1411         (WebCore::SVGElementInstance::refEventTarget):
1412         (WebCore::SVGElementInstance::derefEventTarget):
1413         (WebCore::SVGElementInstance::hasOneRef):
1414         (WebCore::SVGElementInstance::refCount):
1415         (WebCore::SVGElementInstance::setParent):
1416         (WebCore::SVGElementInstance::parent):
1417         * ksvg2/svg/SVGElementInstance.idl:
1418         * ksvg2/svg/SVGGElement.cpp:
1419         (WebCore::SVGGElement::localMatrix):
1420         * ksvg2/svg/SVGGElement.h:
1421         * ksvg2/svg/SVGHiddenElement.h: Removed.
1422         * ksvg2/svg/SVGSVGElement.cpp:
1423         (WebCore::SVGSVGElement::~SVGSVGElement):
1424         * ksvg2/svg/SVGStyledElement.cpp:
1425         (WebCore::SVGStyledElement::updateElementInstance):
1426         * ksvg2/svg/SVGUseElement.cpp:
1427         (WebCore::SVGUseElement::removedFromDocument):
1428         (WebCore::SVGUseElement::notifyAttributeChange):
1429         (WebCore::dumpInstanceTree):
1430         (WebCore::SVGUseElement::buildPendingResource):
1431         (WebCore::SVGUseElement::attach):
1432         (WebCore::SVGUseElement::buildInstanceTree):
1433         (WebCore::SVGUseElement::handleDeepUseReferencing):
1434         (WebCore::SVGUseElement::buildShadowTree):
1435         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
1436         (WebCore::SVGUseElement::attachShadowTree):
1437         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
1438         (WebCore::SVGUseElement::transferUseAttributesToReplacedElement):
1439         * ksvg2/svg/SVGUseElement.h:
1440
1441 2007-01-30  Maciej Stachowiak  <mjs@apple.com>
1442
1443         Reviewed by Eric.
1444
1445         <rdar://problem/4928646> REGRESSION: manual-tests/remove-input-file-onchange.html crashes
1446         
1447         * platform/FileChooser.h:
1448         (WebCore::FileChooser::disconnected): New method, so the RenderFileControl can tell when it's
1449         gotten disconected.
1450         * rendering/RenderFileUploadControl.cpp:
1451         (WebCore::RenderFileUploadControl::valueChanged): Avoid calling repainted() when onChange()
1452         handler destroyed us.
1453
1454 2007-01-30  Simon Hausmann  <hausmann@kde.org>
1455
1456         Reviewed by Zack.
1457
1458         Combine libJavaScriptCore into libWebKitQt.
1459         Build with ELF visibility if possible.
1460
1461         * WebCore.pro:
1462
1463 2007-01-30  Zack Rusin  <zack@kde.org>
1464
1465         The method has been removed from the header
1466         (make it compile)
1467
1468         * platform/network/qt/ResourceHandleQt.cpp:
1469
1470 2007-01-30  Zack Rusin  <zrusin@trolltech.com>
1471
1472         Reviewed by aroben
1473
1474         Compile fix. 
1475
1476         * loader/ResourceLoader.cpp:
1477         (WebCore::ResourceLoader::releaseResources):
1478         (WebCore::ResourceLoader::setDefersLoading):
1479
1480 2007-01-29  Zack Rusin  <zack@kde.org>
1481
1482         Reviewed by Lars
1483
1484         Propagate the allows-scrolling property on the frames
1485         correctly. If the frame has been constructed as non-
1486         scrolling, respect that and don't show scrollbars.
1487
1488         * platform/ScrollView.h:
1489         * platform/qt/ScrollViewQt.cpp:
1490         (WebCore::ScrollView::ScrollView):
1491         (WebCore::ScrollView::setHScrollbarMode):
1492         (WebCore::ScrollView::setVScrollbarMode):
1493         (WebCore::ScrollView::setAllowsScrolling):
1494
1495 2007-01-29  Geoffrey Garen  <ggaren@apple.com>
1496
1497         I am the chosen one! I have seen the faces of the final five! I will
1498         save the WebKit build!
1499         
1500         * loader/ResourceLoader.cpp:
1501         (WebCore::ResourceLoader::load):
1502
1503 2007-01-30  Graham Dennis  <graham.dennis@gmail.com>
1504
1505         Reviewed by Maciej.
1506
1507         Part of fix for http://bugs.webkit.org/show_bug.cgi?id=10725
1508         Image data in from RTFD clipboard data thrown away
1509         
1510         ResourceHandles no longer need to be able to defer loading as that is
1511         now handled by the ResourceLoader.
1512
1513         * loader/MainResourceLoader.cpp:
1514         (WebCore::MainResourceLoader::loadNow): updated to remove defersLoading argument.
1515         * loader/ResourceLoader.cpp:
1516         (WebCore::ResourceLoader::releaseResources): release the deferred request.
1517         (WebCore::ResourceLoader::load): defer creating the ResourceHandle instead of
1518         asking the ResourceHandle to defer loading.
1519         (WebCore::ResourceLoader::setDefersLoading): create the ResourceHandle if we have deferred creating it.
1520         * loader/ResourceLoader.h:
1521         * platform/network/ResourceHandle.cpp: ResourceHandle's don't need to know about deferLoading.
1522         (WebCore::ResourceHandle::ResourceHandle):
1523         (WebCore::ResourceHandle::create):
1524         * platform/network/ResourceHandle.h: ditto.
1525         * platform/network/ResourceHandleInternal.h: ditto.
1526         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1527         * platform/network/mac/ResourceHandleMac.mm: ditto.
1528         (WebCore::ResourceHandle::start):
1529
1530 2007-01-29  Brady Eidson  <beidson@apple.com>
1531
1532         Reviewed by Alice
1533
1534         Lets use smart pointers, shall we?
1535
1536         * platform/network/ResourceHandleInternal.h:
1537
1538 2007-01-29  Justin Garcia  <justin.garcia@apple.com>
1539
1540         Reviewed by harrison
1541         
1542         <rdar://problem/4960137>
1543         ASSERTION FAILURE calling SelectionController::setBaseAndExtent (11833)
1544
1545         * editing/SelectionController.cpp:
1546         (WebCore::SelectionController::setSelection): Hand off the selection
1547         to the selectionController responsible for it, instead of asserting.
1548         A selection object can't be constructed with endpoints in different 
1549         documents, so this code is only necessary for one endpoint.
1550
1551 2007-01-29  Ada Chan  <adachan@apple.com>
1552
1553         Reviewed by Brady.
1554         
1555         Moved the update of the title of the current entry in the backforward list to WebCore.
1556
1557         * loader/FrameLoader.cpp:
1558         (WebCore::FrameLoader::didChangeTitle):
1559
1560 2007-01-29  Adele Peterson  <adele@apple.com>
1561
1562         Reviewed by Darin.
1563
1564         More preparation for event handling fixes.
1565
1566         * bridge/EditorClient.h: Removed EventTargetNode parameter from handleKeyPress since we can just get that from the event.
1567         * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::defaultEventHandler): ditto.
1568         * page/EventHandler.cpp: (WebCore::EventHandler::defaultKeyboardEventHandler): ditto.
1569         * page/EventHandler.h: ditto.
1570         * platform/graphics/svg/SVGImageEmptyClients.h: (WebCore::SVGEmptyEditorClient::handleKeyPress): ditto.
1571
1572         * editing/Editor.h:
1573         * editing/Editor.cpp:
1574         (WebCore::Editor::handleKeyPress): Removed EventTargetNode parameter.
1575         (WebCore::Editor::execCommand): Made commandMap use AtomicStringImpls instead of Strings.
1576         (WebCore::Editor::insertText): Moved from the bridge.
1577
1578         * page/mac/WebCoreFrameBridge.h: Moved insertText method to Editor.
1579         * page/mac/WebCoreFrameBridge.mm:
1580
1581         * WebCore.exp: Updated exports.
1582
1583 2007-01-29  Anders Carlsson  <acarlsson@apple.com>
1584
1585         Reviewed by Geoff.
1586
1587         <rdar://problem/4960097>
1588         http://bugs.webkit.org/show_bug.cgi?id=12444
1589         Assertion failure in -[WebCoreFrameBridge installInFrame:]
1590         
1591         The problem was that the XML tokenizer didn't create elements with 
1592         createdByParser set to true.
1593         
1594         * dom/Document.cpp:
1595         (WebCore::Document::createElement):
1596         New method which takes a QName. This is used by both the XML tokenizer and createElementNS.
1597         
1598         (WebCore::Document::createElementNS):
1599         Call new createElement method.
1600         
1601         * dom/XMLTokenizer.h:        
1602         * dom/XMLTokenizer.cpp:
1603         (WebCore::XMLTokenizer::XMLTokenizer):
1604         (WebCore::XMLTokenizer::~XMLTokenizer):
1605         Use an OwnPtr for the pending callbacks object. Also, use String instead of StringImpl in the hash map.
1606         
1607         (WebCore::toString):
1608         (WebCore::XMLTokenizer::startElementNs):
1609         Call createElement.
1610         
1611 2007-01-29  Brady Eidson  <beidson@apple.com>
1612
1613         Reviewed by Oliver
1614
1615         http://bugs.webkit.org/show_bug.cgi?id=12465
1616         Only set the iconURL port for non-zero ports
1617
1618         * loader/FrameLoader.cpp:
1619         (WebCore::FrameLoader::iconURL):
1620
1621 2007-01-29  John Sullivan  <sullivan@apple.com>
1622
1623         * platform/network/mac/ResourceRequestMac.mm:
1624         Build fix -- removed #import of no-longer-extant WebDataProtocol.h (and also one of the
1625         two #imports for WebCoreSystemInterface.h, while I was at it)
1626
1627 2007-01-29  Anders Carlsson  <acarlsson@apple.com>
1628
1629         Reviewed by Oliver.
1630
1631         * page/DragController.cpp:
1632         (WebCore::DragController::dragEnteredOrUpdated):
1633         Only try a drag operation if the drag client explicitly specified that it is OK
1634
1635 2007-01-29  Oliver Hunt  <oliver@apple.com>
1636
1637         Reviewed by Adam.
1638
1639         Migrated more drag logic and state to WebCore
1640                                               
1641         * page/DragClient.h:       
1642
1643         * page/DragController.cpp:
1644         (WebCore::DragController::delegateDragSourceAction):
1645           New forwarding method for the UI delegate
1646         * page/DragController.h:
1647         (WebCore::DragController::dragOffset):
1648           Now store the drag offset -- the offset of the cursor relative to the drag image)
1649           in DragController
1650         * page/EventHandler.cpp:
1651         (WebCore::EventHandler::allowDHTMLDrag):
1652           Moved from WebFrameBridge
1653         * page/EventHandler.h:
1654         * page/mac/EventHandlerMac.mm:
1655         (WebCore::EventHandler::eventMayStartDrag):
1656         (WebCore::EventHandler::handleDrag):                  
1657           EventHandlerMac now uses EventHandler::allowDHTMLDrag rather than the 
1658           implementation in WebFrameBridge
1659         * page/mac/WebCoreFrameBridge.h:
1660           removed definition of allowDHTMLDrag from WebFrameBridge
1661         * platform/graphics/svg/SVGImageEmptyClients.h:
1662         (WebCore::SVGEmptyDragClient::dragSourceActionMaskForPoint):
1663           Updated empty DragClient
1664
1665 2007-01-29  Alexey Proskuryakov  <ap@webkit.org>
1666
1667         Reviewed by Darin.
1668
1669         http://bugs.webkit.org/show_bug.cgi?id=12359
1670         XPathEvaluator may return some nodes more than once in a result set
1671
1672         Test: fast/xpath/nodeset-duplicates.html
1673
1674         * xml/XPathPath.cpp:
1675         (WebCore::XPath::LocationPath::doEvaluate): Ensure uniqueness of elements
1676         in the node-set.
1677
1678         * xml/XPathPredicate.cpp:
1679         (WebCore::XPath::Union::doEvaluate): Fixed a uniqueness algorithm that was
1680         already present here. Added a FIXME about incorrect result ordering.
1681
1682 2007-01-29  Alexey Proskuryakov  <ap@webkit.org>
1683
1684         Reviewed by Darin.
1685
1686         http://bugs.webkit.org/show_bug.cgi?id=12340
1687         XPathEvaluator behavior does not match Firefox - name() and attribute nodes
1688
1689         * xml/XPathFunctions.cpp:
1690         (WebCore::XPath::FunName::doEvaluate): Do not try to append a prefix if it doesn't exist.
1691
1692 2007-01-29  Alexey Proskuryakov  <ap@webkit.org>
1693
1694         Reviewed by Darin.
1695
1696         http://bugs.webkit.org/show_bug.cgi?id=11815
1697         XPathEvaluator behavior does not match Firefox - substring() and empty element
1698
1699         Test: fast/xpath/empty-string-substring.html
1700
1701         * xml/XPathValue.cpp:
1702         (WebCore::XPath::Value::Value):
1703         * xml/XPathValue.h:
1704         Added a constructor taking const char*, so that string literals and arrays don't 
1705         get converted to boolean values.
1706
1707 2007-01-29  Zack Rusin  <zrusin@trolltech.com>
1708
1709         Cosmetic fixes - don't resize the widget in the constructor
1710         (it was a hack from the initial port) and fix the paint
1711         signature.
1712
1713         * platform/qt/ScrollViewCanvasQt.cpp:
1714         (WebCore::ScrollViewCanvasQt::ScrollViewCanvasQt):
1715         * platform/qt/WidgetQt.cpp:
1716         (WebCore::Widget::paint):
1717
1718 2007-01-29  Maciej Stachowiak  <mjs@apple.com>
1719
1720         - change from struct to class to make picky compilers happy
1721
1722         * loader/SubstituteData.h:
1723
1724 2007-01-30  Mark Rowe  <mrowe@apple.com>
1725
1726         Reviewed by Maciej.
1727
1728         http://bugs.webkit.org/show_bug.cgi?id=12458
1729         Bug 12458: Crash in W3C-SVG-1.1/animate-elem-09-t.svg running layout tests under guard malloc
1730
1731         * ksvg2/svg/SVGAnimationElement.cpp: 
1732         (WebCore::parseValues): ptr either points to a ';' or off the end of the buffer.  We're
1733         interested in what comes before the ';', so start there instead.
1734
1735 2007-01-29  Zack Rusin  <zrusin@trolltech.com>
1736
1737         Reviewed by Lars.
1738
1739         Take the scrollbars into considation when computing
1740         the contents size of the main frame.
1741
1742         * platform/qt/PlatformScrollBarQt.cpp:
1743         (WebCore::PlatformScrollbar::paint):
1744         * platform/qt/ScrollViewQt.cpp:
1745         (WebCore::ScrollView::visibleWidth):
1746         (WebCore::ScrollView::visibleHeight):
1747         (WebCore::ScrollView::visibleContentRect):
1748         * platform/qt/WidgetQt.cpp:
1749         (WebCore::Widget::invalidate):
1750         (WebCore::Widget::invalidateRect):
1751
1752 2007-01-29  Maciej Stachowiak  <mjs@apple.com>
1753
1754         - fix includes
1755
1756         * loader/SubstituteData.h:
1757
1758 2007-01-29  Maciej Stachowiak  <mjs@apple.com>
1759
1760         - added new file that I forgot in the last commit
1761
1762         * loader/SubstituteData.h: Added.
1763         (WebCore::SubstituteData::SubstituteData):
1764         (WebCore::SubstituteData::isValid):
1765         (WebCore::SubstituteData::content):
1766         (WebCore::SubstituteData::mimeType):
1767         (WebCore::SubstituteData::textEncoding):
1768         (WebCore::SubstituteData::failingURL):
1769
1770 2007-01-29  Maciej Stachowiak  <mjs@apple.com>
1771
1772         Reviewed by Mark.
1773
1774         - made data loading cross-platform
1775         - fixed <rdar://problem/4910106>
1776
1777         * WebCore.exp:
1778         * WebCore.xcodeproj/project.pbxproj:
1779         * loader/CachedResource.cpp:
1780         * loader/CachedResource.h:
1781         * loader/DocLoader.cpp:
1782         (WebCore::DocLoader::requestResource):
1783         * loader/DocumentLoader.cpp:
1784         (WebCore::DocumentLoader::DocumentLoader):
1785         (WebCore::DocumentLoader::setRequest):
1786         (WebCore::DocumentLoader::urlForHistory):
1787         (WebCore::DocumentLoader::unreachableURL):
1788         * loader/DocumentLoader.h:
1789         (WebCore::DocumentLoader::substituteData):
1790         * loader/FrameLoader.cpp:
1791         (WebCore::FrameLoader::load):
1792         (WebCore::FrameLoader::shouldReloadToHandleUnreachableURL):
1793         (WebCore::FrameLoader::reloadAllowingStaleData):
1794         (WebCore::FrameLoader::reload):
1795         (WebCore::FrameLoader::commitProvisionalLoad):
1796         (WebCore::FrameLoader::startLoadingMainResource):
1797         (WebCore::FrameLoader::startLoading):
1798         (WebCore::FrameLoader::checkNavigationPolicy):
1799         * loader/FrameLoader.h:
1800         * loader/FrameLoaderClient.h:
1801         * loader/MainResourceLoader.cpp:
1802         (WebCore::MainResourceLoader::willSendRequest):
1803         (WebCore::MainResourceLoader::continueAfterContentPolicy):
1804         (WebCore::MainResourceLoader::handleEmptyLoad):
1805         (WebCore::MainResourceLoader::handleDataLoad):
1806         (WebCore::MainResourceLoader::loadNow):
1807         (WebCore::MainResourceLoader::load):
1808         * loader/MainResourceLoader.h:
1809         * loader/mac/DocumentLoaderMac.mm:
1810         * loader/mac/WebDataProtocol.h: Removed.
1811         * loader/mac/WebDataProtocol.mm: Removed.
1812         * loader/qt/DocumentLoaderQt.cpp:
1813         * platform/graphics/svg/SVGImageEmptyClients.h:
1814         (WebCore::SVGEmptyFrameLoaderClient::createDocumentLoader):
1815
1816 2007-01-29  Zack Rusin  <zrusin@trolltech.com>
1817
1818         Order the build files alphabetically instead of
1819         the random mess we had before.
1820
1821         * WebCore.pro:
1822
1823 2007-01-29  Zack Rusin  <zack@kde.org>
1824
1825         Reviewed by Lars
1826
1827         Use the platform independent scrollbar code.
1828         Remove the redundant empty stubs and forward
1829         few missing platform scrollbar calls.
1830
1831         * WebCore.pro:
1832         * platform/qt/PlatformScrollBarQt.cpp:
1833         (WebCore::PlatformScrollbar::paint):
1834         (WebCore::PlatformScrollbar::setRect):
1835
1836 2007-01-29  Lars Knoll <lars@trolltech.com>
1837
1838         Reviewed by Zack
1839
1840         Fix the way we handle native widgets (QWidget) inside
1841         WebCore. Now WebCore::Widget owns the QWidget in all
1842         cases. This is the only way to get well defined semantics
1843         for all teh native widgets we have (currently ScrollView
1844         and ScrollBar, but plugins will follow).
1845
1846         This has the side effect that one cannot rely on a defined 
1847         lifetime of a QWebFrame when using the API. 
1848
1849         * platform/Widget.h:
1850         * platform/qt/PlatformScrollBarQt.cpp:
1851         (WebCore::PlatformScrollbar::PlatformScrollbar):
1852         * platform/qt/ScrollViewQt.cpp:
1853         (WebCore::ScrollView::addChild):
1854         (WebCore::ScrollView::removeChild):
1855         * platform/qt/WidgetQt.cpp:
1856         (WebCore::WidgetPrivate::WidgetPrivate):
1857         (WebCore::WidgetPrivate::~WidgetPrivate):
1858         (WebCore::Widget::qwidget):
1859
1860 2007-01-28  George Staikos  <staikos@kde.org>
1861
1862         Reviewed by Maciej.
1863
1864         Don't send data during a redirect -> causes assert failure.
1865
1866         * platform/network/qt/ResourceHandleManagerQt.cpp:
1867         (WebCore::ResourceHandleManager::receivedData):
1868
1869 2007-01-29  Mark Rowe  <mrowe@apple.com>
1870
1871         Reviewed by Brady.
1872
1873         http://bugs.webkit.org/show_bug.cgi?id=11085
1874         Bug 11085: REGRESSION: favicon.ico always looked for on port 80
1875
1876         * loader/FrameLoader.cpp:
1877         (WebCore::FrameLoader::iconURL): Copy the port over to the favicon URL.
1878
1879 2007-01-28  Adam Roben  <aroben@apple.com>
1880
1881         Reviewed by Adele.
1882
1883         Fix http://bugs.webkit.org/show_bug.cgi?id=12453
1884         REGRESSION(r19197): Tabbing into web page requires two key presses
1885
1886         All layout tests pass.
1887
1888         * page/FocusController.cpp:
1889         (WebCore::FocusController::advanceFocus): If there's no focused frame,
1890         actually go ahead and find a focusable node instead of just focusing
1891         the main frame and quitting. This behavior was a holdover from a
1892         previous desired tabbing behavior with respect to frames.
1893
1894 2007-01-28  David Kilzer  <ddkilzer@webkit.org>
1895
1896         Reviewed by Darin and David Hyatt.
1897
1898         - fix http://bugs.webkit.org/show_bug.cgi?id=12423
1899           Mixing white-space:pre text with non white-space:pre text does not wrap properly
1900
1901         Test: fast/block/basic/white-space-pre-wraps.html
1902
1903         * rendering/bidi.cpp:
1904         (WebCore::RenderBlock::findNextLineBreak): Wrap a non-wrapping text run if it
1905         appears on a line with previous text runs that do wrap.
1906
1907 2007-01-28  Mitz Pettel  <mitz@webkit.org>
1908
1909         Reviewed by Darin.
1910
1911         - fix http://bugs.webkit.org/show_bug.cgi?id=8360
1912           Repro crash when onscroll handler deletes the scrolled object
1913
1914         Test: fast/layers/removed-by-scroll-handler.html
1915
1916         * page/FrameView.cpp:
1917         (WebCore::FrameViewPrivate::FrameViewPrivate): Added a m_enqueueEvents count.
1918         (WebCore::FrameView::layout): Raise the enqueue count before starting layout and
1919         until after enqueued events are dispatched.
1920         (WebCore::FrameView::scheduleEvent): Made this function dispatch the event
1921         immediately unless the enqueue count is positive.
1922         * rendering/RenderLayer.cpp:
1923         (WebCore::RenderLayer::scrollToOffset): Schedule the scroll event through the
1924         FrameView.
1925         (WebCore::RenderLayer::scrollRectToVisible):
1926         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1927         (WebCore::Marquee::start):
1928
1929 2007-01-28  Charles Ying  <charles_ying@yahoo.com>
1930
1931         Reviewed by eseidel.  Landed by eseidel.
1932
1933         Fix http://bugs.webkit.org/show_bug.cgi?id=12429
1934             animateTransform rotate, with cx/cy is broken
1935             
1936         SVGTransform now contains a float point to store the rotation center, needed
1937             to track rotation center for interpolation by animateTransform.
1938             
1939         SVGTransform now has an additional constructor:
1940             SVGTransform(type) to make empty base value transforms that match their
1941             distanced values.
1942             
1943         Removed m_colorDistance and m_transformDistance from their respective classes
1944             as they are now computed at update time.
1945
1946         Fix a case where animateTransform did not parse transform values correctly
1947             according to BNF in W3C spec:
1948
1949         Test case in:
1950         * manual-tests/animation/animateTransform-toanimation.svg: Added.
1951
1952         Fix a case where animateTransform only specified a to animation only.
1953
1954         Test case in:
1955         * manual-tests/animation/animateTransform-parser.svg: Added.
1956
1957         * ksvg2/svg/SVGAnimateColorElement.cpp:
1958         (WebCore::SVGAnimateColorElement::updateAnimationBaseValueFromElement):
1959         (WebCore::SVGAnimateColorElement::updateAnimatedValue):
1960         (WebCore::SVGAnimateColorElement::calculateFromAndToValues):
1961         * ksvg2/svg/SVGAnimateColorElement.h:
1962         * ksvg2/svg/SVGAnimateTransformElement.cpp:
1963         (WebCore::SVGAnimateTransformElement::updateAnimatedValue):
1964         (WebCore::SVGAnimateTransformElement::updateAnimationBaseValueFromElement):
1965         (WebCore::SVGAnimateTransformElement::calculateFromAndToValues):
1966         (WebCore::SVGAnimateTransformElement::parseTransformValue):
1967         * ksvg2/svg/SVGAnimateTransformElement.h:
1968         * ksvg2/svg/SVGTransform.cpp:
1969         (SVGTransform::SVGTransform):
1970         (SVGTransform::angle):
1971         (SVGTransform::rotationCenter):
1972         (SVGTransform::setTranslate):
1973         (SVGTransform::setScale):
1974         (SVGTransform::setRotate):
1975         (SVGTransform::setSkewX):
1976         (SVGTransform::setSkewY):
1977         * ksvg2/svg/SVGTransform.h:
1978         * ksvg2/svg/SVGTransformDistance.cpp:
1979         (WebCore::SVGTransformDistance::SVGTransformDistance):
1980         (WebCore::SVGTransformDistance::scaledDistance):
1981         (WebCore::SVGTransformDistance::addSVGTransforms):
1982         (WebCore::SVGTransformDistance::addSVGTransform):
1983         (WebCore::SVGTransformDistance::addToSVGTransform):
1984         (WebCore::SVGTransformDistance::distance):
1985         * ksvg2/svg/SVGTransformDistance.h:
1986         * manual-tests/animation/animateTransform-parser.svg: Added.
1987         * manual-tests/animation/animateTransform-toanimation.svg: Added.
1988
1989 2007-01-27  Adam Roben  <aroben@apple.com>
1990
1991         Reviewed by Ada.
1992
1993         Fix <rdar://problem/4957184> REGRESSION: After creating a new mail
1994         message, the caret is automatically in message body
1995
1996         -[WebHTMLView _updateActiveState] was calling
1997         FocusController::focusedOrMainFrame, which had the surprising
1998         side-effect of setting the focused frame if there was none. The fix
1999         was to remove this side-effect.
2000
2001         No tests possible, as this bug involves focus outside the WebView,
2002         which we have no support for in DRT.
2003
2004         Change inspired by Dave Harrison.
2005
2006         * page/FocusController.cpp:
2007         (WebCore::FocusController::focusedOrMainFrame): Removed this method's
2008         non-obvious side-effect of setting the focused frame.
2009         * WebCore.xcodeproj/project.pbxproj: Version wars.
2010
2011 2007-01-27  Don Gibson  <dgibson77@gmail.com>
2012
2013         Reviewed by Maciej.
2014
2015         http://bugs.webkit.org/show_bug.cgi?id=11880: Improve some egregious
2016         Windows form control drawing issues:
2017         Provide Classic mode fallbacks for the button/textfield drawing
2018         routines.
2019         Provide some basic drawing of menulists (still relatively broken).
2020         Some cleanup.
2021
2022         * platform/win/TemporaryLinkStubs.cpp:
2023         (WebCore::RenderThemeWin::systemFont):
2024         * rendering/RenderThemeWin.cpp:
2025         (WebCore::m_menuListTheme):
2026         (WebCore::RenderThemeWin::close):
2027         (WebCore::RenderThemeWin::determineClassicState):
2028         (WebCore::RenderThemeWin::getThemeData):
2029         (WebCore::RenderThemeWin::paintButton):
2030         (WebCore::RenderThemeWin::paintTextField):
2031         (WebCore::RenderThemeWin::paintMenuList):
2032         (WebCore::RenderThemeWin::paintMenuListButton):
2033         * rendering/RenderThemeWin.h:
2034         (WebCore::ThemeData::m_classicState):
2035         (WebCore::RenderThemeWin::setRadioSize):
2036         (WebCore::RenderThemeWin::paintTextArea):
2037
2038 2007-01-27  David Kilzer  <ddkilzer@webkit.org>
2039
2040         Reviewed by Adam.
2041
2042         - fix http://bugs.webkit.org/show_bug.cgi?id=12260
2043           Windows platform build is not maintained
2044
2045         * loader/win/FrameLoaderWin.cpp:
2046         * platform/network/win/ResourceHandleWin.cpp:
2047         * platform/win/TemporaryLinkStubs.cpp:
2048         (WebCore::contextMenuItemTagOpenLinkInNewWindow):
2049         (WebCore::contextMenuItemTagDownloadLinkToDisk):
2050         (WebCore::contextMenuItemTagCopyLinkToClipboard):
2051         (WebCore::contextMenuItemTagOpenImageInNewWindow):
2052         (WebCore::contextMenuItemTagDownloadImageToDisk):
2053         (WebCore::contextMenuItemTagCopyImageToClipboard):
2054         (WebCore::contextMenuItemTagOpenFrameInNewWindow):
2055         (WebCore::contextMenuItemTagCopy):
2056         (WebCore::contextMenuItemTagGoBack):
2057         (WebCore::contextMenuItemTagGoForward):
2058         (WebCore::contextMenuItemTagStop):
2059         (WebCore::contextMenuItemTagReload):
2060         (WebCore::contextMenuItemTagCut):
2061         (WebCore::contextMenuItemTagPaste):
2062         (WebCore::contextMenuItemTagNoGuessesFound):
2063         (WebCore::contextMenuItemTagIgnoreSpelling):
2064         (WebCore::contextMenuItemTagLearnSpelling):
2065         (WebCore::contextMenuItemTagSearchWeb):
2066         (WebCore::contextMenuItemTagLookUpInDictionary):
2067         (WebCore::contextMenuItemTagOpenLink):
2068         (WebCore::contextMenuItemTagIgnoreGrammar):
2069         (WebCore::contextMenuItemTagSpellingMenu):
2070         (WebCore::contextMenuItemTagShowSpellingPanel):
2071         (WebCore::contextMenuItemTagCheckSpelling):
2072         (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
2073         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
2074         (WebCore::contextMenuItemTagFontMenu):
2075         (WebCore::contextMenuItemTagBold):
2076         (WebCore::contextMenuItemTagItalic):
2077         (WebCore::contextMenuItemTagUnderline):
2078         (WebCore::contextMenuItemTagOutline):
2079         (WebCore::contextMenuItemTagWritingDirectionMenu):
2080         (WebCore::contextMenuItemTagDefaultDirection):
2081         (WebCore::contextMenuItemTagLeftToRight):
2082         (WebCore::contextMenuItemTagRightToLeft):
2083         (WebCore::DocumentLoader::unreachableURL):
2084         (WebCore::FrameLoader::redirectDataToPlugin):
2085         (WebCore::FrameLoader::partClearedInBegin):
2086         (WebCore::FrameLoader::createPlugin):
2087
2088 2007-01-27  Sam Weinig  <sam@webkit.org>
2089
2090         Reviewed by Mitz.
2091
2092         - Patch for http://bugs.webkit.org/show_bug.cgi?id=11957
2093           REGRESSION: Unordered List Bullets too big and changing from size
2094
2095         * rendering/RenderListMarker.cpp:
2096         (WebCore::RenderListMarker::paint): Explicitly set the stroke size to 1.0f.
2097
2098 2007-01-27  Lars Knoll <lars@trolltech.com>
2099
2100         Fix the Qt build and disable the usage
2101         of QScrollbars for PlatformScrollBar for 
2102         now as it causes crashes in the layout tests.
2103
2104         * WebCore.pro:
2105         * ksvg2/svg/SVGTransformDistance.cpp:
2106         * page/qt/FrameQt.cpp:
2107         (WebCore::FrameQt::FrameQt):
2108         (WebCore::FrameQt::bindingRootObject):
2109         (WebCore::FrameQt::createRootObject):
2110         * page/qt/FrameQt.h:
2111         * platform/qt/PlatformScrollBarQt.cpp:
2112         (WebCore::PlatformScrollbar::PlatformScrollbar):
2113         * platform/qt/ScrollViewQt.cpp:
2114         (WebCore::ScrollView::addChild):
2115
2116 2007-01-27  David Kilzer  <ddkilzer@kilzer.net>
2117
2118         Reviewed by NOBODY (buildbot build fix).
2119
2120         * ksvg2/svg/ColorDistance.cpp:
2121         (WebCore::ColorDistance::scaledDistance): Added static cast of arguments to int.
2122
2123 2007-01-27  Rob Buis  <buis@kde.org>
2124
2125         Reviewed by NOBODY (typo in method name fix).
2126
2127         * ksvg2/svg/SVGSVGElement.cpp:
2128         (WebCore::SVGSVGElement::addSVGWindowEventListener):
2129         (WebCore::SVGSVGElement::parseMappedAttribute):
2130         * ksvg2/svg/SVGSVGElement.h:
2131
2132 2007-01-27  Eric Seidel  <eric@webkit.org>
2133
2134         Reviewed by olliej.
2135
2136         Fix support for SVG's <set> element.
2137
2138         Manual test added.
2139
2140         * ksvg2/svg/SVGSetElement.cpp:
2141         (WebCore::SVGSetElement::updateAnimatedValue):
2142         (WebCore::SVGSetElement::calculateFromAndToValues):
2143         * ksvg2/svg/SVGSetElement.h:
2144         * manual-tests/animation/set-to.svg: Added.
2145
2146 2007-01-27  Alexey Proskuryakov  <ap@webkit.org>
2147
2148         Release build fix.
2149
2150         * loader/TextResourceDecoder.cpp:
2151         (WebCore::TextResourceDecoder::checkForHeadCharset):
2152
2153 2007-01-27  Alexey Proskuryakov  <ap@webkit.org>
2154
2155         Reviewed by Darin.
2156
2157         http://bugs.webkit.org/show_bug.cgi?id=12389
2158         Chinese decoding error at hk.antispam.yahoo.com
2159
2160         Test: fast/encoding/noscript-in-head.html
2161
2162         * loader/TextResourceDecoder.cpp:
2163         (WebCore::TextResourceDecoder::checkForHeadCharset): We were already allowing 
2164         NOSCRIPT tags in head, let's actually skip over their content.
2165
2166 2007-01-26  Geoffrey Garen  <ggaren@apple.com>
2167
2168         Reviewed by Maciej Stachowiak.
2169         
2170         Fixed <rdar://problem/4608404> WebScriptObject's _executionContext lack 
2171         of ownership policy causes crashes (e.g., in Dashcode)
2172
2173         Added RootObject ref-counting goodness.
2174
2175         * page/mac/FrameMac.h:
2176         * page/mac/FrameMac.mm:
2177         (WebCore::FrameMac::cleanupPluginObjects): Invalidate our RootObjects 
2178         instead of detroying them. Track _bindingRootObject separately from the
2179         rest of our RootObjects, since it has its own variable.
2180
2181         * page/mac/WebCoreFrameBridge.mm:
2182         (createRootObject): Use the Frame's new, more encapsulated function to
2183         create a RootObject.
2184
2185         * bindings/objc/WebScriptObject.mm: Nixed rootObject setters, since they
2186         were unused and they complicated reference-counting.
2187
2188 2007-01-26  David Kilzer  <ddkilzer@webkit.org>
2189
2190         Reviewed by Eric.
2191
2192         Release build fix.
2193
2194         * ksvg2/svg/SVGAnimationElement.cpp:
2195         (WebCore::SVGAnimationElement::calculateValueIndexAndPercentagePast): Added static cast
2196         to unsigned when calculating flooredValueIndex.
2197
2198 2007-01-26  Darin Adler  <darin@apple.com>
2199
2200         - checked in slightly newer revision of the patch below
2201
2202         * css/CSSComputedStyleDeclaration.cpp:
2203         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2204         Grouped all the unimplemented values at the bottom. Fixed the ifdef for
2205         CSS_PROP__WEBKIT_DASHBOARD_REGION so that it compiles on all platforms.
2206
2207         * css/cssparser.cpp: (WebCore::CSSParser::parseValue): Removed default
2208         case and added type so that the compiler warns about missing properties.
2209         * css/cssstyleselector.cpp: (WebCore::CSSStyleSelector::applyProperty): Ditto.
2210
2211 2007-01-26  Darin Adler  <darin@apple.com>
2212
2213         Reviewed by Beth.
2214
2215         - fix http://bugs.webkit.org/show_bug.cgi?id=12412
2216           "unimplemented propertyID: 46" seen at dojotoolkit.org
2217
2218         Covered by fast/css/computed-style.html
2219
2220         * css/CSSPropertyNames.in: Sorted the file into two separate sections, one
2221         for properties without the -webkit- prefix and another for properties with.
2222
2223         * css/makeprop: Generate a CSSPropertyID enum instead of a set of #defines.
2224         Removed unused CSS_PROP_MIN and CSS_PROP_MAX. Renamed CSS_PROP_TOTAL to
2225         numCSSProperties and changed it to a const int instead of #define.
2226         Added a declaration of getPropertyName in the header. Changed the return
2227         type of getPropertyName to const char* and the parameter type to CSSPropertyID.
2228
2229         * css/CSSComputedStyleDeclaration.cpp: Sort the lists of properties in
2230         an easier to maintain order -- properties without a WebKit prefix first.
2231         (WebCore::valueForLength): Changed return value to PassRefPtr.
2232         (WebCore::valueForMaxLength): Ditto.
2233         (WebCore::valueForBorderStyle): Ditto.
2234         (WebCore::valueForTextAlign): Ditto.
2235         (WebCore::valueForAppearance): Added.
2236         (WebCore::valueForMarginCollapse): Added.
2237         (WebCore::valueForShadow): Changed return value to PassRefPtr.
2238         (WebCore::getPositionOffsetValue): Ditto.
2239         (WebCore::currentColorOrValidColor): Ditto.
2240         (WebCore::CSSComputedStyleDeclaration::cssText): Added cast since
2241         getPropertyName now takes an enum value.
2242         (WebCore::primitiveValueFromLength): Changed return value to PassRefPtr.
2243         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2244         Added cast to CSSPropertyID so that gcc will detect missing enums in the
2245         switch statement. Simplified the background-size and border-spacing
2246         implementations so they don't have local variables. Added lots of cases
2247         to the switch statement for unimplemented properties. Implemented the
2248         outline-width, box-sizing, -webkit-appearance, -webkit-rtl-ordering,
2249         -webkit-user-drag, and -webkit-user-select properties.
2250         (WebCore::CSSComputedStyleDeclaration::item): Added cast since
2251         getPropertyName now takes an enum value.
2252
2253         * css/CSSMutableStyleDeclaration.cpp: Removed declaration of getPropertyName.
2254         (WebCore::CSSMutableStyleDeclaration::item): Added cast since
2255         getPropertyName now takes an enum value.
2256
2257         * css/CSSProperty.cpp: Removed declaration of getPropertyName.
2258         (WebCore::CSSProperty::cssText): Added cast since
2259         getPropertyName now takes an enum value and returns a const char*.
2260
2261         * css/CSSStyleDeclaration.cpp: Removed declaration of getPropertyName.
2262         (WebCore::CSSStyleDeclaration::getPropertyShorthand): Added cast since
2263         getPropertyName now takes an enum value and returns a const char*.
2264
2265 2007-01-26  Alice Liu  <alice.liu@apple.com>
2266
2267         Reviewed by Brady.
2268
2269         Fixed <rdar://problem/4838076> CrashTracer: 10 crashes in Mail at com.apple.WebCore: WTF::HashMap<WebCore::String
2270
2271         * loader/DocLoader.cpp:
2272         (WebCore::DocLoader::requestResource):
2273         Added nil check around resource from cache.
2274
2275 2007-01-26  Adam Roben  <aroben@apple.com>
2276
2277         Reviewed by Oliver.
2278
2279         Build fix.
2280
2281         * ksvg2/svg/SVGAnimationElement.cpp:
2282         (WebCore::SVGAnimationElement::calculateValueIndexAndPercentagePast):
2283         Keep index variables as unsigned until we need to convert to float.
2284
2285 2007-01-26  Alice Liu  <alice.liu@apple.com>
2286
2287         Reviewed by Ada.
2288
2289         Fixed <rdar://problem/4919097> REGRESSION: Ctrl-Y fails to yank (11076)
2290
2291         * editing/Editor.cpp:
2292         (WebCore::Editor::deleteWithDirection):
2293         If there's no selection, locally create a range that is to the end of the granularity unit and pass that to deleteRange(). 
2294
2295 2007-01-26  Sam Weinig  <sam@webkit.org>
2296
2297         Reviewed by Maciej.
2298
2299         Qt build fix.
2300
2301         * page/qt/EventHandlerQt.cpp:
2302
2303 2007-01-26  Dex Deacon  <occupant4@gmail.com>
2304
2305         Reviewed by Hyatt.
2306
2307         Fix so that we only relayout frameset children on calls to layout.
2308
2309         * page/FrameView.cpp:
2310         (WebCore::FrameView::layout):
2311
2312 2007-01-26  Oliver Hunt  <oliver@apple.com>
2313
2314         Build Fix
2315
2316         * ksvg2/svg/ColorDistance.cpp:
2317         * ksvg2/svg/SVGAnimationElement.cpp:
2318         (WebCore::SVGAnimationElement::handleTimerEvent):
2319
2320 2007-01-26  Eric Seidel  <eric@webkit.org>
2321
2322         Reviewed by olliej.
2323
2324         Add support for calcMode, keyTimes and (nearly) keySplines.
2325         http://bugs.webkit.org/show_bug.cgi?id=12350
2326         Re-architect much of the animation system to remove huge sections of code.
2327         Added new ColorDistance, SVGTransformDistance to simplify animateColor, animateTransform calculations.
2328         I also added basic <animateMotion> support since it was so easy w/ the new architecture.
2329         
2330         Adding manual animation tests until bug 12074 is fixed.
2331
2332         * WebCore.xcodeproj/project.pbxproj:
2333         * ksvg2/misc/SVGTimer.cpp:
2334         (WebCore::SVGTimer::applyAnimations):
2335         * ksvg2/svg/ColorDistance.cpp: Added.
2336         (WebCore::ColorDistance::ColorDistance):
2337         (WebCore::clampColorValue):
2338         (WebCore::ColorDistance::scaledDistance):
2339         (WebCore::ColorDistance::addColorsAndClamp):
2340         (WebCore::ColorDistance::addToColorAndClamp):
2341         (WebCore::ColorDistance::isZero):
2342         (WebCore::ColorDistance::distance):
2343         * ksvg2/svg/ColorDistance.h: Added.
2344         * ksvg2/svg/SVGAnimateColorElement.cpp:
2345         (WebCore::SVGAnimateColorElement::SVGAnimateColorElement):
2346         (WebCore::SVGAnimateColorElement::updateAnimationBaseValueFromElement):
2347         (WebCore::SVGAnimateColorElement::applyAnimatedValueToElement):
2348         (WebCore::SVGAnimateColorElement::updateAnimatedValue):
2349         (WebCore::SVGAnimateColorElement::calculateFromAndToValues):
2350         * ksvg2/svg/SVGAnimateColorElement.h:
2351         (WebCore::SVGAnimateColorElement::contextElement):
2352         * ksvg2/svg/SVGAnimateElement.h:
2353         (WebCore::SVGAnimateElement::updateAnimatedValue):
2354         (WebCore::SVGAnimateElement::calculateFromAndToValues):
2355         * ksvg2/svg/SVGAnimateMotionElement.cpp:
2356         (WebCore::SVGAnimateMotionElement::hasValidTarget):
2357         (WebCore::SVGAnimateMotionElement::updateAnimatedValue):
2358         (WebCore::parsePoint):
2359         (WebCore::SVGAnimateMotionElement::calculateFromAndToValues):
2360         (WebCore::SVGAnimateMotionElement::updateAnimationBaseValueFromElement):
2361         (WebCore::SVGAnimateMotionElement::applyAnimatedValueToElement):
2362         * ksvg2/svg/SVGAnimateMotionElement.h:
2363         * ksvg2/svg/SVGAnimateTransformElement.cpp:
2364         (WebCore::SVGAnimateTransformElement::SVGAnimateTransformElement):
2365         (WebCore::SVGAnimateTransformElement::updateAnimatedValue):
2366         (WebCore::SVGAnimateTransformElement::updateAnimationBaseValueFromElement):
2367         (WebCore::SVGAnimateTransformElement::applyAnimatedValueToElement):
2368         (WebCore::SVGAnimateTransformElement::calculateFromAndToValues):
2369         (WebCore::SVGAnimateTransformElement::parseTransformValue):
2370         * ksvg2/svg/SVGAnimateTransformElement.h:
2371         (WebCore::SVGAnimateTransformElement::contextElement):
2372         * ksvg2/svg/SVGAnimationElement.cpp:
2373         (WebCore::SVGAnimationElement::parseKeyNumbers):
2374         (WebCore::parseValues):
2375         (WebCore::parseKeySplines):
2376         (WebCore::SVGAnimationElement::parseMappedAttribute):
2377         (WebCore::SVGAnimationElement::targetAttributeAnimatedValue):
2378         (WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue):
2379         (WebCore::SVGAnimationElement::detectAnimationMode):
2380         (WebCore::adjustPercentagePastForKeySplines):
2381         (WebCore::SVGAnimationElement::valueIndexAndPercentagePastForDistance):
2382         (WebCore::SVGAnimationElement::calculateTotalDistance):
2383         (WebCore::caculateValueIndexForKeyTimes):
2384         (WebCore::SVGAnimationElement::isValidAnimation):
2385         (WebCore::SVGAnimationElement::calculateValueIndexAndPercentagePast):
2386         (WebCore::SVGAnimationElement::updateAnimationBaseValueFromElement):
2387         (WebCore::SVGAnimationElement::applyAnimatedValueToElement):
2388         (WebCore::SVGAnimationElement::handleTimerEvent):
2389         (WebCore::SVGAnimationElement::updateAnimatedValueForElapsedSeconds):
2390         * ksvg2/svg/SVGAnimationElement.h:
2391         * ksvg2/svg/SVGParserUtilities.cpp:
2392         (WebCore::SVGPolyParser::parsePoints):
2393         * ksvg2/svg/SVGParserUtilities.h:
2394         * ksvg2/svg/SVGSetElement.cpp:
2395         * ksvg2/svg/SVGSetElement.h:
2396         (WebCore::SVGSetElement::updateAnimatedValue):
2397         (WebCore::SVGSetElement::calculateFromAndToValues):
2398         * ksvg2/svg/SVGTransform.cpp:
2399         (SVGTransform::type):
2400         (SVGTransform::translate):
2401         (SVGTransform::scale):
2402         (SVGTransform::setSkewX):
2403         (SVGTransform::setSkewY):
2404         * ksvg2/svg/SVGTransform.h:
2405         (WebCore::operator==):
2406         (WebCore::operator!=):
2407         * ksvg2/svg/SVGTransformDistance.cpp: Added.
2408         (WebCore::SVGTransformDistance::SVGTransformDistance):
2409         (WebCore::SVGTransformDistance::scaledDistance):
2410         (WebCore::SVGTransformDistance::addSVGTransforms):
2411         (WebCore::SVGTransformDistance::addSVGTransform):
2412         (WebCore::SVGTransformDistance::addToSVGTransform):
2413         (WebCore::SVGTransformDistance::isZero):
2414         (WebCore::SVGTransformDistance::distance):
2415         * ksvg2/svg/SVGTransformDistance.h: Added.
2416         * ksvg2/svg/SVGTransformList.cpp:
2417         (SVGTransformList::concatenateForType):
2418         * ksvg2/svg/SVGTransformList.h:
2419         * manual-tests/animation/animateColor-by.svg: Added.
2420         * manual-tests/animation/animateColor-from-by.svg: Added.
2421         * manual-tests/animation/animateColor-repeat-indefinite.svg: Added.
2422         * manual-tests/animation/animateColor-to-from.svg: Added.
2423         * manual-tests/animation/animateColor-to.svg: Added.
2424         * manual-tests/animation/animateColor-values-simple.svg: Added.
2425         * manual-tests/animation/animateMotion-to.svg: Added.
2426         * manual-tests/animation/animateTransform-keyTimes.svg: Added.
2427         * manual-tests/animation/animateTransform-repeat-once.svg: Added.
2428
2429 2007-01-26  Beth Dakin  <bdakin@apple.com>
2430
2431         Reviewed by Darin.
2432
2433         Fix for <rdar://problem/4956565> REGRESSION: After scrolling frame, 
2434         hovering over link in this frame doesn't change cursor to pointing 
2435         hand
2436
2437         The mouseMove event was not being propagated correctly after using 
2438         the mouse to scroll the frame because m_mousePressed was never 
2439         getting set to false.
2440
2441         * page/EventHandler.cpp:
2442         (WebCore::EventHandler::handleMousePressEvent): This code does not 
2443         belong here.
2444         * page/EventHandler.h: lastEventIsMouseUp() is only ever relevant 
2445         in EventHandlerMac, so it can just be a static function there.
2446         * page/mac/EventHandlerMac.mm:
2447         (WebCore::lastEventIsMouseUp): Make this static.
2448         (WebCore::EventHandler::passMouseDownEventToWidget): Here is where 
2449         we need to set m_mousePressed to false if lastEventIsMouseUp() is 
2450         true.
2451
2452 2007-01-26  David Hyatt  <hyatt@apple.com>
2453
2454         Fix for style regression caused by strictness checking of the number of properties.  This caused code like:
2455         "width: 20 px" to fail, because we interpreted it as two values and rejected it.  Our old code allowed 20 to be
2456         used like a pixel value and then ignored the orphaned unit.
2457
2458         This patch actually scans the list of values looking for orphaned units and reattaches them to the numeric
2459         values that they should correspond to.  This means rules like "width: 5 em" will now work in quirks mdoe and
2460         the "em" unit type will be honored.
2461
2462         Reviewed by beth
2463
2464         * WebCore.xcodeproj/project.pbxproj:
2465         * css/cssparser.cpp:
2466         (WebCore::unitFromString):
2467         (WebCore::CSSParser::checkForOrphanedUnits):
2468         (WebCore::CSSParser::parseValue):
2469         * css/cssparser.h:
2470         (WebCore::ValueList::valueAt):
2471         (WebCore::ValueList::deleteValueAt):
2472
2473 2007-01-26  George Staikos  <staikos@kde.org>
2474
2475         Reviewed by Zack.
2476
2477         Qt implementation.
2478
2479         * WebCore.pro:
2480         * platform/qt/FontPlatformDataQt.cpp:
2481         (WebCore::FontPlatformData::FontPlatformData):
2482         * platform/qt/ScrollViewQt.cpp:
2483         (WebCore::ScrollView::scrollbarUnderMouse):
2484
2485 2007-01-26  Brady Eidson  <beidson@apple.com>
2486
2487         Reviewed by Anders' rubberstamp
2488         
2489         Warning about unreferenced formal parameter caused compile to fail
2490
2491         * platform/cf/RetainPtr.h:
2492         (WebCore::adoptCFReference):
2493
2494 2007-01-26  Darin Adler  <darin@apple.com>
2495
2496         Reviewed by Brady.
2497
2498         - fix <rdar://problem/4956688> move Mac-specific part of icon code into IconMac
2499         - fix a GC-compatibility problem in the icon code I noticed by code inspection
2500
2501         * platform/FileChooser.cpp: (WebCore::FileChooser::chooseIcon): Removed Mac-specific
2502         path check -- that's in newIconForFile now.
2503
2504         * platform/graphics/Icon.h: Changed the image to be a RetainPtr. The old code was
2505         using -[NSObject retain] which is not good enough for a pointer in a C++ object.
2506         * platform/graphics/mac/IconMac.mm:
2507         (WebCore::Icon::Icon): Got rid of unneeded code to do what RetainPtr does for us.
2508         (WebCore::Icon::~Icon): Ditto.
2509         (WebCore::Icon::newIconForFile): Added check for non-absolute file names. Updated
2510         for use of RetainPtr. Use constructor that takes NSImage.
2511         (WebCore::Icon::paint): Add get() calls needed now that we are using a RetainPtr.
2512
2513         * WebCore.xcodeproj/project.pbxproj: Let Xcode do its thing.
2514
2515 2007-01-26  Alexey Proskuryakov  <ap@webkit.org>
2516
2517         Reviewed by Maciej.
2518
2519         http://bugs.webkit.org/show_bug.cgi?id=12385
2520         Assertion failure when loading subresources from "data:" frames
2521
2522         Test: fast/loader/opaque-base-url.html
2523
2524         * platform/KURL.cpp:
2525         (WebCore::KURL::init): Make the URL invalid if it's relative, but has an opaque or empty base.
2526
2527 2007-01-26  Dex Deacon  <occupant4@gmail.com>
2528
2529         Reviewed by Darin.
2530
2531         * page/EventHandler.cpp:
2532         (WebCore::EventHandler::handleMouseMoveEvent):
2533         Removed a call to invalidateClick(), since we don't want to cancel a
2534         click if the mouse moves.
2535
2536 2007-01-26  Darin Adler  <darin@apple.com>
2537
2538         * css/MediaQueryEvaluator.cpp:
2539         (WebCore::MediaQueryEvaluator::mediaTypeMatchSpecific):
2540         Oops, forgot a !.
2541
2542 2007-01-26  Darin Adler  <darin@apple.com>
2543
2544         Patch by Nate Begeman.
2545         Reviewed by Darin and Maciej.
2546
2547         - <rdar://problem/4946877> Avoid unnecessary allocations in CSS, patch attached (12401)
2548           http://bugs.webkit.org/show_bug.cgi?id=12401
2549
2550         * css/MediaQueryEvaluator.h: Add mediaTypeMatchSpecific, a function that
2551         takes a char* to avoid creating and destroying a String for simple media
2552         type queries.
2553         * css/MediaQueryEvaluator.cpp:
2554         (WebCore::MediaQueryEvaluator::mediaTypeMatchSpecific): Added. Besides
2555         avoiding the conversion to String, this also doesn't have the special
2556         case code to handle "" and "all".
2557
2558         * css/cssstyleselector.cpp: (WebCore::CSSStyleSelector::matchUARules):
2559         Call mediaTypeMatchSpecific here when deciding whether to use the
2560         print version of the user agent style sheet.
2561
2562         * loader/Cache.cpp: (WebCore::Cache::requestResource): Don't convert to
2563         a string and back to a KURL when calling createResource. Avoids reparsing
2564         the URL string.
2565
2566 2007-01-26  Zack Rusin  <zrusin@trolltech.com>
2567
2568         Reviewed by Lars
2569
2570         Add history related classes to the project file.
2571
2572         * WebCore.pro:
2573
2574 2007-01-26  Zack Rusin  <zack@kde.org>
2575
2576         Reviewed by Lars
2577
2578         Introduce PlatformScrollBar and try to make 
2579         the scrollbar behavior a little more sane.
2580
2581         * WebCore.pro:
2582         * platform/qt/PlatformScrollBarQt.cpp: Added.
2583         (WebCore::Scrollbar::Scrollbar):
2584         (WebCore::Scrollbar::setSteps):
2585         (WebCore::Scrollbar::scroll):
2586         (WebCore::Scrollbar::setValue):
2587         (WebCore::Scrollbar::setProportion):
2588         (WebCore::PlatformScrollbar::PlatformScrollbar):
2589         (WebCore::PlatformScrollbar::~PlatformScrollbar):
2590         (WebCore::PlatformScrollbar::width):
2591         (WebCore::PlatformScrollbar::height):
2592         (WebCore::PlatformScrollbar::setEnabled):
2593         (WebCore::PlatformScrollbar::paint):
2594         (WebCore::PlatformScrollbar::updateThumbPosition):
2595         (WebCore::PlatformScrollbar::updateThumbProportion):
2596         (WebCore::PlatformScrollbar::setRect):
2597         * platform/qt/ScrollViewQt.cpp:
2598         (WebCore::ScrollView::addChild):
2599         * platform/qt/TemporaryLinkStubs.cpp:
2600         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2601
2602 2007-01-26  Mitz Pettel  <mitz@webkit.org>
2603
2604         Reviewed by Darin.
2605
2606         - fix http://bugs.webkit.org/show_bug.cgi?id=11109
2607           REGRESSION (r15471): menus are offset on eink.com
2608           <rdar://problem/4824760>
2609
2610         Changed offset{Left,Top} to match Firefox. If the body element is statically
2611         positioned, it is still returned as the offsetParent of elements whose containing
2612         block is the initial containing block (the root), but their offset{Left,Top} are
2613         relative to the root. If the body element is positioned, then offsets are relative
2614         to it. The body's own offset{Left,Top} are always 0. 
2615
2616         Test: fast/dom/Element/offsetLeft-offsetTop-body-quirk.html
2617
2618         * rendering/RenderObject.cpp:
2619         (WebCore::RenderObject::offsetLeft):
2620         (WebCore::RenderObject::offsetTop):
2621
2622 2007-01-26  Mitz Pettel  <mitz@webkit.org>
2623
2624         Reviewed by Darin and Maciej.
2625
2626         - fix http://bugs.webkit.org/show_bug.cgi?id=10983
2627           REGRESSION (r12290): Drop shadow of flickr photo note is positioned incorrectly the second time it's shown
2628
2629         Test: fast/dynamic/staticY.html
2630
2631         * rendering/RenderBlock.cpp:
2632         (WebCore::RenderBlock::layoutPositionedObjects): Avoid marking the object's
2633         parents, since they have already been laid out.
2634         * rendering/RenderBox.cpp:
2635         (WebCore::RenderBox::setStaticY): Added a call to setChildNeedsLayout() to
2636         ensure relayout by this box's container (third and fourth cases in the
2637         layout test).
2638         * rendering/RenderBox.h:
2639         * rendering/RenderObject.cpp:
2640         (WebCore::RenderObject::markContainingBlocksForLayout): For positioned objects
2641         with static y, also mark the object's parent to ensure that it recomputes
2642         the static y value (first case in the layout test).
2643
2644 2007-01-26  Lars Knoll <lars@trolltech.com>
2645
2646         Reviewed by Zack
2647
2648         Get rid of FrameQtClient. It's unused since we moved over
2649         to the loader.
2650
2651         * WebCore.pro:
2652         * page/qt/FrameQt.cpp:
2653         (WebCore::FrameQt::FrameQt):
2654         * page/qt/FrameQt.h:
2655         * page/qt/FrameQtClient.cpp: Removed.
2656         * page/qt/FrameQtClient.h: Removed.
2657         * platform/network/ResourceHandleInternal.h:
2658         * platform/network/qt/ResourceHandleManagerQt.cpp:
2659         (WebCore::RequestQt::RequestQt):
2660         (WebCore::ResourceHandleManager::add):
2661         * platform/network/qt/ResourceHandleManagerQt.h:
2662         * platform/network/qt/ResourceHandleQt.cpp:
2663         (WebCore::ResourceHandle::start):
2664
2665 2007-01-26  Zack Rusin  <zack@kde.org>
2666
2667         Fix the compile
2668
2669         * WebCore.pro:
2670
2671 2007-01-26  Adam Roben  <aroben@apple.com>
2672
2673         Reviewed by Maciej.
2674
2675         Fixed <rdar://problem/4946499>, which made it impossible to tab
2676         forward into the left frame of tivofaq.com after tabbing out of the
2677         document.
2678
2679         * page/FocusController.cpp:
2680         (WebCore::FocusController::advanceFocus): Clear the focused frame
2681         before passing off focus to Chrome so that when we re-enter the
2682         document we start at the main frame instead of the last focused frame.
2683
2684 2007-01-25  Rob Buis  <buis@kde.org>
2685
2686         Reviewed by olliej.
2687
2688         http://bugs.webkit.org/show_bug.cgi?id=11911
2689         SVG exhibits double-text-selection behavior
2690
2691         Fix selection height of the inline text boxes for svg.
2692
2693         * WebCore.xcodeproj/project.pbxproj:
2694         * rendering/InlineTextBox.cpp:
2695         (WebCore::InlineTextBox::selectionTop):
2696         (WebCore::InlineTextBox::selectionHeight):
2697         (WebCore::InlineTextBox::selectionRect):
2698         (WebCore::InlineTextBox::paintSelection):
2699         (WebCore::InlineTextBox::paintMarkedTextBackground):
2700         (WebCore::InlineTextBox::paintCustomHighlight):
2701         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
2702         (WebCore::InlineTextBox::paintTextMatchMarker):
2703         * rendering/InlineTextBox.h:
2704         * rendering/RenderSVGInlineText.cpp:
2705         (WebCore::RenderSVGInlineText::createInlineTextBox):
2706         * rendering/RenderSVGInlineText.h:
2707         * rendering/RenderText.cpp:
2708         (WebCore::RenderText::createInlineTextBox):
2709         (WebCore::RenderText::createInlineBox):
2710         * rendering/RenderText.h:
2711         * rendering/SVGInlineTextBox.cpp: Added.
2712         (WebCore::SVGInlineTextBox::selectionTop):
2713         (WebCore::SVGInlineTextBox::selectionHeight):
2714         * rendering/SVGInlineTextBox.h: Added.
2715         (WebCore::SVGInlineTextBox::SVGInlineTextBox):
2716
2717 2007-01-26  Zack Rusin  <zack@kde.org>
2718
2719         Reviewed by Lars
2720
2721         Fix drawing of tiled images.
2722
2723         * WebCore.pro:
2724         * platform/graphics/qt/ImageQt.cpp:
2725         (WebCore::BitmapImage::drawPattern):
2726
2727 2007-01-26  Zack Rusin  <zack@kde.org>
2728
2729         Reviewed by Lars
2730
2731         Fixing image loading - we decode QImages
2732         but render QPixmaps now. Implement Icon
2733         class
2734
2735         * platform/graphics/BitmapImage.h:
2736         * platform/graphics/Icon.h:
2737         * platform/graphics/Image.h:
2738         (WebCore::Image::getPixmap):
2739         * platform/graphics/qt/IconQt.cpp:
2740         (WebCore::Icon::Icon):
2741         (WebCore::Icon::~Icon):
2742         (WebCore::Icon::newIconForFile):
2743         (WebCore::Icon::paint):
2744         * platform/graphics/qt/ImageDecoderQt.cpp:
2745         (WebCore::ImageDecoderQt::ImageData::ImageData):
2746         (WebCore::ImageDecoderQt::ReadContext::read):
2747         (WebCore::ImageDecoderQt::ReadContext::readImageLines):
2748         (WebCore::ImageDecoderQt::reset):
2749         (WebCore::ImageDecoderQt::imageAtIndex):
2750         * platform/graphics/qt/ImageDecoderQt.h:
2751         * platform/graphics/qt/ImageQt.cpp:
2752         (WebCore::BitmapImage::drawPattern):
2753         (WebCore::BitmapImage::getPixmap):
2754         * platform/graphics/qt/ImageSourceQt.cpp:
2755         (WebCore::ImageSource::createFrameAtIndex):
2756
2757 2007-01-25  Justin Garcia  <justin.garcia@apple.com>
2758
2759         Reviewed by oliver
2760         
2761         <http://bugs.webkit.org/show_bug.cgi?id=12409>
2762         REGRESSION (r19039): Drag caret isn't cleared after a drop
2763
2764         No new layout tests because the regression was
2765         caught by current layout tests.
2766
2767         * page/DragController.cpp:
2768         (WebCore::DragController::concludeDrag): Clear the drag caret.
2769
2770 2007-01-25  Darin Adler  <darin@apple.com>
2771
2772         Reviewed and landed by Geoffrey Garen.
2773
2774         - fix http://bugs.webkit.org/show_bug.cgi?id=12342
2775           REGRESSION: destroying a frame from its own script causes various crashes
2776
2777         * bindings/js/kjs_window.cpp: (KJS::ScheduledAction::execute):
2778         Use RefPtr for the frame and the interpreter object so they don't get deleted
2779         out from underneath us.
2780
2781         * bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::evaluate):
2782         Add a check for a page of 0. This was the only call site for the
2783         addMessageToConsole function that did not have a check for a page of 0.
2784
2785 2007-01-25 Dirk Mueller  <mueller@kde.org>
2786
2787         Reviewed and merged by Beth.
2788
2789         Fix for <rdar://problem/4921692> not processing comments inside a 
2790         title element leads to XSS (for at least BlogSpot)
2791
2792         This is equivalent to commit 626791 in the KDE tree. Basically, the 
2793         patch allows comment parsing in titles to avoid capturing a 
2794         <script> tag by accident.
2795
2796         * html/HTMLTokenizer.cpp:
2797         (WebCore::HTMLTokenizer::parseSpecial):
2798         (WebCore::HTMLTokenizer::parseComment):
2799
2800 2007-01-25  Darin Adler  <darin@apple.com>
2801
2802         * ksvg2/svg/SVGPreserveAspectRatio.cpp: Add a couple of comments.
2803
2804 2007-01-25  Darin Adler  <darin@apple.com>
2805
2806         Reviewed by Maciej.
2807
2808         - fix http://bugs.webkit.org/show_bug.cgi?id=12365
2809           Reproducible crash in WebCore::SVGPreserveAspectRatio::parsePreserveAspectRatio
2810           in svg/W3C-SVG-1.1/animate-elem-40-t.svg under guard malloc
2811         - fix bug where the parser accepts "meet" or "slice" as an entire string
2812         - fix bug where "slice" is ignored if the old alignment was "none"
2813           even if the newly-parsed alignment is something other than "none", and
2814           "slice" is not ignored if the old alignment was not "none", but the
2815           newly-parsed alignment is "none"
2816         - optimize to only call notifyAttributeChange if the attribute actually changed
2817
2818         Test: svg/dom/preserve-aspect-ratio-parser-test.html
2819
2820         * ksvg2/svg/SVGPreserveAspectRatio.cpp:
2821         (WebCore::checkString): Added an overload for using char* constants which is
2822         much simpler than the old one, and almost as fast.
2823         (WebCore::SVGPreserveAspectRatio::parsePreserveAspectRatio): Fail if there's no
2824         more text after "defer". Fail if there's neither "none" nor an x/y specified.
2825         Check that there's more text before looking at the "m" and "s" for "meet" and
2826         "slice". Merged the failure and success cases. Only call notifyAttributeChange
2827         if something changed.
2828
2829         I think all the "optimized" code where we check the first character before
2830         calling checkString isn't really helpful, but I decided to leave it as-is
2831         for now.
2832
2833 2007-01-25  Lars Knoll <lars@trolltech.com>
2834
2835         Reviewed by Zack
2836
2837         Trivial implementation of getMIMETypeForExtension.
2838         Use the above method in the ResourceHandleManager to set
2839         a mimetype on Resources that don't have one set (which
2840         includes everything loaded from local disk).
2841
2842         Should fix quite a few test cases :)
2843
2844         * platform/network/qt/ResourceHandleManagerQt.cpp:
2845         (WebCore::ResourceHandleManager::receivedResponse):
2846         * platform/qt/MimeTypeRegistryQt.cpp:
2847         (WebCore::):
2848         (WebCore::MimeTypeRegistry::getMIMETypeForExtension):
2849
2850 2007-01-25 Harald Fernengel <harald@trolltech.com>
2851
2852         Reviewed by zack
2853
2854         Compile on platforms where qreal is not a double.
2855
2856         * platform/graphics/qt/AffineTransformQt.cpp:
2857         (WebCore::AffineTransform::map):
2858
2859 2007-01-25  Zack Rusin  <zack@kde.org>
2860
2861         Reviewed by Lars.
2862
2863         Add wheel event handling and make explicit usage
2864         of the EventHandler.
2865
2866         * WebCore.pro:
2867         * page/qt/EventHandlerQt.cpp:
2868         (WebCore::EventHandler::focusDocumentView):
2869         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2870         (WebCore::EventHandler::passMouseDownEventToWidget):
2871         (WebCore::EventHandler::lastEventIsMouseUp):
2872         (WebCore::EventHandler::handleMouseUp):
2873         * platform/PlatformWheelEvent.h:
2874         * platform/qt/ScrollViewCanvasQt.cpp:
2875         (WebCore::ScrollViewCanvasQt::ScrollViewCanvasQt):
2876         (WebCore::ScrollViewCanvasQt::mousePressEvent):
2877         (WebCore::ScrollViewCanvasQt::wheelEvent):
2878         (WebCore::ScrollViewCanvasQt::dragEnterEvent):
2879         (WebCore::ScrollViewCanvasQt::dragLeaveEvent):
2880         (WebCore::ScrollViewCanvasQt::dragMoveEvent):
2881         * platform/qt/ScrollViewCanvasQt.h:
2882         * platform/qt/ScrollViewQt.cpp:
2883         (WebCore::ScrollView::wheelEvent):
2884         * platform/qt/WheelEventQt.cpp: Added.
2885         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2886
2887 2007-01-25  Rob Buis  <buis@kde.org>
2888
2889         Reviewed by Maciej.
2890
2891         http://bugs.webkit.org/show_bug.cgi?id=12391
2892         SVG containers with viewports should respect overflow when hit testing
2893
2894         Take into account the overflow property when hit testing <svg>.
2895
2896         * rendering/RenderSVGContainer.cpp:
2897         (WebCore::RenderSVGContainer::nodeAtPoint):
2898
2899 2007-01-23  Alice Liu  <alice.liu@apple.com>
2900
2901         Reviewed by Maciej.
2902
2903         fixed <rdar://problem/4808039> REGRESSION: eBay ID check never completes
2904         Also known as http://bugs.webkit.org/show_bug.cgi?id=11230
2905
2906         * bindings/js/kjs_window.cpp:
2907         It's not necessary to check safeScript when doing a location.replace, .reload, or .assign
2908         (KJS::Location::getOwnPropertySlot):
2909         (KJS::LocationFunc::callAsFunction):
2910
2911 2007-01-25  Alice Liu  <alice.liu@apple.com>
2912
2913         Reviewed by Geoff and Adele.
2914
2915         fixed <rdar://problem/4866655> REGRESSION: Copying out of Calculator & CIFIlterWidget is broken on 9A320
2916
2917         * editing/Editor.cpp:
2918         (WebCore::Editor::canDHTMLCut):
2919         (WebCore::Editor::canDHTMLCopy):
2920         (WebCore::Editor::tryDHTMLCopy):
2921         (WebCore::Editor::tryDHTMLCut):
2922         Reverting some mistakes made in r17504:
2923         Anything in r17503 that used to call mayDHTML* still calls canDHTML* as it was changed in r17504, where canDHTML* now calls !selectionController::isInPasswordField instead of editor::canCopy
2924         Anything else in r17503 that used to call mayCopy now calls (!)selectionController::isInPasswordField.
2925
2926         * editing/JSEditor.cpp:
2927         copy via JS should be enabled as long as selection is not in a password field.  a range selection shouldn't be required. 
2928
2929 2007-01-24  Adele Peterson  <adele@apple.com>
2930
2931         Reviewed by Brady and Oliver.
2932
2933         Fix for <rdar://problem/4953504> When the keydown event changes focus, the keypress event should go to the new focused node
2934
2935         Test: fast/events/keydown-keypress-focus-change.html
2936
2937         * page/EventHandler.cpp:
2938         (WebCore::eventTargetNodeForDocument): Added for convenience.
2939         (WebCore::EventHandler::keyEvent): Moved from EventHandlerMac.mm.  After dispatching the keyDown event,
2940          recheck the target node for the keyPress event in case its changed.
2941         * page/EventHandler.h:
2942         * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::keyEvent):
2943           Moved the bulk of this code to EventHandler.cpp.
2944
2945 2007-01-24  Geoffrey Garen  <ggaren@apple.com>
2946
2947         New forwarding header. No review necessary.
2948
2949         * ForwardingHeaders/kjs/ustring.h: Added.
2950
2951 2007-01-24  Oliver Hunt  <oliver@apple.com>
2952
2953         Reviewed by Maciej.
2954
2955         Migrating more drag state information to WebCore
2956
2957         * page/DragController.cpp:
2958         * page/DragController.h:
2959         (WebCore::DragController::dragOperation):
2960         (WebCore::DragController::setDraggingImageURL):
2961         (WebCore::DragController::draggingImageURL):
2962         (WebCore::DragController::setDragOffset):
2963         (WebCore::DragController::dragOffset):
2964
2965 2007-01-24  Darin Adler  <darin@apple.com>
2966
2967         Reviewed by Adele.
2968
2969         - fix http://bugs.webkit.org/show_bug.cgi?id=12331
2970           REGRESSION(r18951): Selecting text in a textarea makes the page scroll
2971
2972         Test: fast/events/autoscroll.html
2973
2974         * rendering/RenderLayer.cpp: (WebCore::RenderLayer::autoscroll):
2975         Adjust position to be relative to the object's corner for the hit test, but not for the
2976         scrollRectToVisible call. The previous version accidentally re-used the version that was
2977         adjusted for the hit test.
2978
2979 2007-01-24  Beth Dakin  <bdakin@apple.com>
2980
2981         Reviewed by Geoff.
2982
2983         Fix for <rdar://problem/4948128> REGRESSION: A crash occurs at 
2984         WebCore::Frame::view() after completing a query at mapquest.com 
2985         then switching to Bookmarks view
2986
2987         This is just a null-check. If you are in strict mode and ask for 
2988         the clientWidth or clientHeight after the document was removed from 
2989         it's parent, we no longer have a frameView, so we have to null-
2990         check it. I added null checks for the FrameView in some other 
2991         places where it seems like we could potentially run into this 
2992         issue.
2993
2994         * bindings/objc/DOMHTML.mm:
2995         (-[DOMHTMLInputElement _rectOnScreen]):
2996         * bridge/mac/WebCoreAXObject.mm:
2997         (-[WebCoreAXObject accessibilityAttributeValue:]):
2998         * dom/ContainerNode.cpp:
2999         (WebCore::ContainerNode::getUpperLeftCorner):
3000         * dom/Element.cpp:
3001         (WebCore::Element::clientWidth): Actual bug fix here!
3002         (WebCore::Element::clientHeight): And here!
3003         * ksvg2/svg/SVGLength.cpp:
3004         (WebCore::SVGLength::PercentageOfViewport):
3005         * loader/FrameLoader.cpp:
3006         (WebCore::FrameLoader::createJavaAppletWidget):
3007         * page/mac/WebCoreFrameBridge.mm:
3008         (-[WebCoreFrameBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
3009         * rendering/RenderLayer.cpp:
3010         (WebCore::RenderLayer::windowClipRect):
3011         (WebCore::RenderLayer::updateOverflowStatus):
3012         (WebCore::frameVisibleRect):
3013         * rendering/RenderListBox.cpp:
3014         (WebCore::RenderListBox::windowClipRect):
3015         * rendering/RenderTable.cpp:
3016         (WebCore::RenderTable::layout):
3017
3018 2007-01-24  Maciej Stachowiak  <mjs@apple.com>
3019
3020         Not reviewed, just removing accidentally committed file.
3021
3022         - removed file that shouldn't be there
3023
3024         * Image Viewer/Image Viewer.aps: Removed.
3025
3026 2007-01-24  Anders Carlsson  <acarlsson@apple.com>
3027
3028         Reviewed by Geoff and Adam.
3029
3030         <rdar://problem/4922655>
3031         http://galeri.milliyet.com.tr/ reproducibly crashes Safari
3032         
3033         * loader/FrameLoader.cpp:
3034         (WebCore::FrameLoader::requestFrame):
3035         If the frame already exists, defer the navigation so that we won't end up replacing the document
3036         while we're parsing it. This is similar to what setting window.location ends up doing.
3037
3038 2007-01-25  Mark Rowe  <mrowe@apple.com>
3039
3040         Reviewed by Darin.
3041
3042         * Info.plist: Update copyright string.
3043
3044 2007-01-24  Justin Garcia  <justin.garcia@apple.com>
3045
3046         Reviewed by harrison
3047
3048         <rdar://problem/4916235>
3049         eBay Editor: Crash occurs at WebCore::Range::startPosition() after applying ordered list styling to selected text
3050         <rdar://problem/4857269>
3051         REGRESSION: editing/execCommand/create-list-from-range-selection.html no longer works as intended
3052         <rdar://problem/4916583>
3053         eBay Editor: Removing a indent from a list item actually deletes the list item instead
3054         <rdar://problem/4928635>
3055         designMode outdent causes crash (11750)
3056
3057         * editing/CompositeEditCommand.cpp:
3058         (WebCore::CompositeEditCommand::moveParagraphs): Fixed br insertion
3059         after the pruning of empty containers left over after the paragraph
3060         to move is removed.
3061         * editing/DeleteSelectionCommand.cpp:
3062         (WebCore::DeleteSelectionCommand::DeleteSelectionCommand): There are
3063         bugs that leave the wrong number of line breaks after a deletion 
3064         that expands to include special elements (lists/tables).  Added 
3065         a workaround so that moveParagraphs can avoid these until they 
3066         are fixed.
3067         (WebCore::DeleteSelectionCommand::initializeStartEnd): Ditto.
3068         (WebCore::DeleteSelectionCommand::initializePositionData): Ditto.
3069         * editing/DeleteSelectionCommand.h:
3070         * editing/TextIterator.cpp:
3071         (WebCore::TextIterator::advance): We used to not call exitNode for
3072         ancestors of a node where the next node in a pre-order traversal is 
3073         the ranges's pastEndNode().  This is only correct for ancestors that
3074         contain the end of the range.
3075         (WebCore::shouldEmitNewlineAfterNode): Added, we should only emit newlines
3076         after blocks that have VisiblePositions after them.  VisiblePosition creation
3077         though is too expensive to do here, what I added here is an OK substitute.
3078         (WebCore::shouldEmitNewlineBeforeNode): Added.  No special logic yet.
3079         (WebCore::TextIterator::handleNonTextNode): Call shouldEmitNewlineBeforeNode.
3080         (WebCore::TextIterator::exitNode): Call shouldEmitNewlineAfterNode.
3081         (WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode): Call
3082         shouldEmitNewlineAfterNode.
3083
3084 2007-01-24  Darin Adler  <darin@apple.com>
3085
3086         Reviewed by Mark Rowe.
3087
3088         * WebCore.xcodeproj/project.pbxproj: Changed to /usr/sbin/sysctl
3089         so we don't rely on people's paths.
3090
3091 2007-01-24  Darin Adler  <darin@apple.com>
3092
3093         Reviewed by Adele.
3094
3095         - a couple minor tweaks to recently-changed things
3096
3097         * dom/Document.h: Use HTMLHeadElement as type for the head function.
3098         * dom/Document.cpp: (WebCore::Document::head):
3099
3100         * ksvg2/svg/SVGElementInstance.cpp:
3101         (WebCore::SVGElementInstance::~SVGElementInstance): Change loop to
3102         a for loop and use a local variable for document.
3103
3104 2007-01-24  Oliver Hunt  <oliver@apple.com>
3105
3106         Reviewed by Adele.
3107
3108         Fixes DragController to allow a null target Document.
3109         This is encountered in new tabs/windows that have not 
3110         loaded any page
3111
3112         * page/DragController.cpp:
3113         (WebCore::documentAtPoint):
3114         (WebCore::DragController::tryDocumentDrag):
3115         (WebCore::DragController::operationForLoad):
3116         (WebCore::DragController::concludeDrag):
3117         * page/mac/DragControllerMac.mm:
3118         (WebCore::DragController::dragOperation):
3119
3120 2007-01-24  Sam Weinig  <sam@webkit.org>
3121
3122         Reviewed by Mitz.
3123
3124         Patch for http://bugs.webkit.org/show_bug.cgi?id=12394
3125         Cleanup RenderBox
3126
3127         No functionality changes, just a good old fashion cleanup,
3128         thus no tests.
3129
3130         * rendering/RenderBox.cpp:
3131         (WebCore::RenderBox::RenderBox):
3132         (WebCore::RenderBox::setStyle):
3133         (WebCore::RenderBox::destroy):
3134         (WebCore::RenderBox::setPos):
3135         (WebCore::RenderBox::calcBorderBoxWidth):
3136         (WebCore::RenderBox::calcBorderBoxHeight):
3137         (WebCore::RenderBox::calcContentBoxWidth):
3138         (WebCore::RenderBox::calcContentBoxHeight):
3139         (WebCore::RenderBox::nodeAtPoint):
3140         (WebCore::RenderBox::paintRootBoxDecorations):
3141         (WebCore::RenderBox::paintBoxDecorations):
3142         (WebCore::RenderBox::paintBackgrounds):
3143         (WebCore::RenderBox::paintBackground):
3144         (WebCore::cacluateBackgroundSize):
3145         (WebCore::RenderBox::paintBackgroundExtended):
3146         (WebCore::RenderBox::getOverflowClipRect):
3147         (WebCore::RenderBox::getClipRect):
3148         (WebCore::RenderBox::containingBlockWidth):
3149         (WebCore::RenderBox::absolutePosition):
3150         (WebCore::RenderBox::dirtyLineBoxes):
3151         (WebCore::RenderBox::position):
3152         (WebCore::RenderBox::getAbsoluteRepaintRect):
3153         (WebCore::RenderBox::computeAbsoluteRepaintRect):
3154         (WebCore::RenderBox::repaintDuringLayoutIfMoved):
3155         (WebCore::RenderBox::relativePositionOffsetX):
3156         (WebCore::RenderBox::relativePositionOffsetY):
3157         (WebCore::RenderBox::calcWidth):
3158         (WebCore::RenderBox::calcWidthUsing):
3159         (WebCore::RenderBox::sizesToIntrinsicWidth):
3160         (WebCore::RenderBox::calcHorizontalMargins):
3161         (WebCore::RenderBox::calcHeight):
3162         (WebCore::RenderBox::calcPercentageHeight):
3163         (WebCore::RenderBox::calcReplacedWidthUsing):
3164         (WebCore::RenderBox::calcReplacedHeightUsing):
3165         (WebCore::RenderBox::availableHeightUsing):
3166         (WebCore::RenderBox::calcVerticalMargins):
3167         (WebCore::RenderBox::containingBlockWidthForPositioned):
3168         (WebCore::RenderBox::calcAbsoluteHorizontal):
3169         (WebCore::RenderBox::calcAbsoluteHorizontalValues):
3170         (WebCore::RenderBox::calcAbsoluteVertical):
3171         (WebCore::RenderBox::calcAbsoluteVerticalValues):
3172         (WebCore::RenderBox::calcAbsoluteHorizontalReplaced):
3173         (WebCore::RenderBox::caretRect):
3174         * rendering/RenderBox.h:
3175         (WebCore::RenderBox::setOverrideSize):
3176         (WebCore::RenderBox::width):
3177         (WebCore::RenderBox::height):
3178         (WebCore::RenderBox::setWidth):
3179         (WebCore::RenderBox::setHeight):
3180         (WebCore::RenderBox::inlineBoxWrapper):
3181         (WebCore::RenderBox::setInlineBoxWrapper):
3182         (WebCore::RenderBox::stretchesToViewHeight):
3183         (WebCore::RenderBox::setStaticX):
3184         (WebCore::RenderBox::setStaticY):
3185
3186 2007-01-24  Eric Seidel  <eric@webkit.org>
3187
3188         Reviewed by ap.
3189
3190         Converted SVGTransform from being Shared<T> to a POD type.
3191
3192         No functional changes, thus no tests.
3193
3194         * bindings/scripts/CodeGenerator.pm:
3195         * bindings/scripts/CodeGeneratorJS.pm:
3196         * ksvg2/misc/SVGTimer.cpp:
3197         (WebCore::baseValueTransformList):
3198         * ksvg2/svg/SVGAnimateTransformElement.cpp:
3199         (WebCore::SVGAnimateTransformElement::storeInitialValue):
3200         (WebCore::SVGAnimateTransformElement::resetValues):
3201         (WebCore::SVGAnimateTransformElement::updateCurrentValue):
3202         (WebCore::SVGAnimateTransformElement::handleStartCondition):
3203         (WebCore::SVGAnimateTransformElement::applyAnimationToValue):
3204         (WebCore::SVGAnimateTransformElement::parseTransformValue):
3205         * ksvg2/svg/SVGAnimateTransformElement.h:
3206         * ksvg2/svg/SVGLinearGradientElement.cpp:
3207         (WebCore::SVGLinearGradientElement::collectGradientProperties):
3208         * ksvg2/svg/SVGPatternElement.cpp:
3209         (WebCore::SVGPatternElement::collectPatternProperties):
3210         * ksvg2/svg/SVGRadialGradientElement.cpp:
3211         (WebCore::SVGRadialGradientElement::collectGradientProperties):
3212         * ksvg2/svg/SVGSVGElement.cpp:
3213         (WebCore::SVGSVGElement::createSVGTransform):
3214         (WebCore::SVGSVGElement::createSVGTransformFromMatrix):
3215         * ksvg2/svg/SVGSVGElement.h:
3216         * ksvg2/svg/SVGStyledTransformableElement.cpp:
3217         (WebCore::SVGStyledTransformableElement::updateLocalTransform):
3218         * ksvg2/svg/SVGTextElement.cpp:
3219         (WebCore::SVGTextElement::updateLocalTransform):
3220         * ksvg2/svg/SVGTransform.cpp:
3221         (SVGTransform::SVGTransform):
3222         (SVGTransform::isValid):
3223         * ksvg2/svg/SVGTransform.h:
3224         * ksvg2/svg/SVGTransform.idl:
3225         * ksvg2/svg/SVGTransformList.cpp:
3226         (SVGTransformList::SVGTransformList):
3227         (SVGTransformList::createSVGTransformFromMatrix):
3228         (SVGTransformList::consolidate):
3229         (SVGTransformList::concatenate):
3230         * ksvg2/svg/SVGTransformList.h:
3231         * ksvg2/svg/SVGTransformable.cpp:
3232         (WebCore::SVGTransformable::parseTransformAttribute):
3233
3234 2007-01-24  Mark Rowe  <mrowe@apple.com>
3235
3236         Reviewed by Eric.
3237
3238         Plug another bunch of SVG memory leaks.
3239
3240         * ksvg2/misc/SVGDocumentExtensions.cpp:
3241         (WebCore::SVGDocumentExtensions::~SVGDocumentExtensions): Delete memory we have allocated.
3242         (WebCore::SVGDocumentExtensions::removePendingResource): Return an auto_ptr to show that we are transferring ownership.
3243         * ksvg2/misc/SVGDocumentExtensions.h:
3244         * ksvg2/svg/SVGElement.cpp:
3245         (WebCore::SVGElement::insertedIntoDocument): Update for use of auto_ptr.
3246
3247 2007-01-23  Mark Rowe  <mrowe@apple.com>
3248
3249         Reviewed by Brady.
3250
3251         Plug thousands of node leaks seen running layout tests.
3252
3253         * ksvg2/svg/SVGElementInstance.cpp:
3254         (WebCore::SVGElementInstance::~SVGElementInstance): Disassociate ourselves from our children so they will
3255         be destroyed if we were the only thing referencing them.
3256         * ksvg2/svg/SVGUseElement.cpp:
3257         (WebCore::SVGUseElement::removedFromDocument):
3258         * ksvg2/svg/SVGUseElement.h:
3259
3260 2007-01-23  Alice Liu  <alice.liu@apple.com>
3261
3262         Reviewed by Brady.
3263
3264         * editing/Editor.cpp:
3265         (WebCore::Editor::appliedEditing):
3266         minor change.  removing unnecessary call to frame to fetch editor
3267
3268 2007-01-23  Mark Rowe  <mrowe@apple.com>
3269
3270         Reviewed by Adele.
3271
3272         http://bugs.webkit.org/show_bug.cgi?id=12375
3273         Bug 12375: REGRESSION(r19038): fast/dom/title-text-property-2.html failing
3274
3275         Fix regression by making setTitle/updateTitle/removeTitle logic match document.title
3276         specification at http://whatwg.org/specs/web-apps/current-work/#the-title1.
3277
3278         * dom/Document.cpp:
3279         (WebCore::Document::setTitle): Materialize a title element into the head if one doesn't exist when setting
3280         document.title.  Also update the contents of the title element when the title is set via document.title.
3281         (WebCore::Document::removeTitle): Update the title based on first title element in the head, if one exists.
3282         (WebCore::Document::head): Convenience method to retrieve the head element in an HTML document.
3283         * dom/Document.h:
3284
3285 2007-01-23  Beth Dakin  <bdakin@apple.com>
3286
3287         Reviewed by Hyatt.
3288
3289         Follow-up to the fix below for 4843226.
3290
3291         * rendering/RenderLayer.cpp:
3292         (WebCore::transparencyClipBox): Has to be recursive or we will miss 
3293         out on grandchildren!
3294
3295 2007-01-23  Oliver Hunt  <oliver@apple.com>
3296
3297         Reviewed by Adam.
3298
3299         Fixes dropping of files into safari
3300
3301         * page/DragController.cpp:
3302         (WebCore::DragController::performDrag):
3303
3304 2007-01-23  Brady Eidson  <beidson@apple.com>
3305
3306         Reviewed by Darin
3307
3308         Added a couple of CF things previously missed
3309
3310         * platform/network/ResourceError.h:
3311         * platform/network/ResourceHandle.h:
3312
3313 2007-01-23  Nikolas Zimmermann  <zimmermann@kde.org>
3314
3315         Reviewed by Maciej.
3316
3317         Fix evil genericContext() assertion, which occours sometimes when running DRT.
3318         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12379
3319
3320         * bindings/scripts/CodeGeneratorJS.pm:
3321         * ksvg2/misc/SVGDocumentExtensions.h:
3322         (WebCore::SVGDocumentExtensions::genericContextMap):
3323         (WebCore::SVGDocumentExtensions::forgetGenericContext):
3324
3325 2007-01-23  Beth Dakin  <bdakin@apple.com>
3326
3327         Reviewed by Hyatt.
3328
3329         Fix for <rdar://problem/4843226> REGRESSION: Pull down menu appears 
3330         clipped at http://istweb.apple.com/
3331
3332         * rendering/RenderLayer.cpp:
3333         (WebCore::transparencyClipBox): Always unite with sibling rects.
3334
3335 2007-01-22  Justin Garcia  <justin.garcia@apple.com>
3336
3337         Reviewed by john
3338
3339         <rdar://problem/4920742>
3340         REGRESSION: GMail Editor: Attempting to remove formatting from selection results in a crash at WebCore::Range::checkDeleteExtract()
3341
3342         * dom/Range.cpp:
3343         (WebCore::Range::checkDeleteExtract): Return if there is no
3344         commonAncestor container or if commonAncestorContainer() throws
3345         an exception.
3346         * editing/Editor.cpp:
3347         (WebCore::Editor::removeFormattingAndStyle): Fixed a bug that reversed
3348         the order of the selected paragraphs.
3349
3350 2007-01-23  Nikolas Zimmermann  <zimmermann@kde.org>
3351
3352         Reviewed by Sam.
3353
3354         Fix dynamic creation/updates of markers, masks, clipPaths, and several tiny pattern issues.
3355         Added 16 (!) new layout tests covering quite some weird scenerios - Batik & Opera do have problems, we don't.
3356
3357         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12380
3358         Fixes: svg/custom/image-with-transform-clip-filter.svg (filter shows up again)
3359
3360         Added: svg/custom/clip-path-child-changes.svg
3361         Added: svg/custom/clip-path-href-changes.svg
3362         Added: svg/custom/clip-path-units-changes.svg
3363         Added: svg/custom/deep-dynamic-updates.svg
3364         Added: svg/custom/js-late-clipPath-and-object-creation.svg
3365         Added: svg/custom/js-late-clipPath-creation.svg
3366         Added: svg/custom/js-late-marker-and-object-creation.svg
3367         Added: svg/custom/js-late-marker-creation.svg
3368         Added: svg/custom/js-late-mask-and-object-creation.svg
3369         Added: svg/custom/js-late-mask-creation.svg
3370         Added: svg/custom/js-update-pattern-child.svg
3371         Added: svg/custom/marker-changes.svg
3372         Added: svg/custom/marker-child-changes.svg
3373         Added: svg/custom/marker-viewBox-changes.svg
3374         Added: svg/custom/mask-changes.svg
3375         Added: svg/custom/mask-child-changes.svg
3376
3377         * ksvg2/misc/KCanvasRenderingStyle.cpp:
3378         (WebCore::KSVGPainterFactory::fillPaintServer):
3379         (WebCore::KSVGPainterFactory::strokePaintServer):
3380         * ksvg2/svg/SVGClipPathElement.cpp:
3381         (WebCore::SVGClipPathElement::notifyAttributeChange):
3382         * ksvg2/svg/SVGClipPathElement.h:
3383         * ksvg2/svg/SVGGradientElement.cpp:
3384         * ksvg2/svg/SVGGradientElement.h:
3385         * ksvg2/svg/SVGMarkerElement.cpp:
3386         (WebCore::SVGMarkerElement::canvasResource):
3387         (WebCore::SVGMarkerElement::notifyAttributeChange):
3388         * ksvg2/svg/SVGMarkerElement.h:
3389         * ksvg2/svg/SVGMaskElement.cpp:
3390         (WebCore::SVGMaskElement::notifyAttributeChange):
3391         * ksvg2/svg/SVGMaskElement.h:
3392         * ksvg2/svg/SVGStopElement.cpp:
3393         (WebCore::SVGStopElement::notifyAttributeChange):
3394         * ksvg2/svg/SVGStyledElement.cpp:
3395         (WebCore::SVGStyledElement::notifyAttributeChange):
3396         (WebCore::SVGStyledElement::notifyResourceParentIfExistant):
3397         (WebCore::SVGStyledElement::rebuildRenderer):
3398         * ksvg2/svg/SVGStyledElement.h:
3399         * ksvg2/svg/SVGUseElement.cpp:
3400         (WebCore::SVGUseElement::notifyAttributeChange):
3401         * platform/graphics/svg/SVGResource.cpp:
3402         (WebCore::SVGResource::invalidate):
3403         (WebCore::SVGResource::addClient):
3404         (WebCore::SVGResource::repaintClients):
3405         * platform/graphics/svg/SVGResource.h:
3406         * platform/graphics/svg/SVGResourceMarker.cpp:
3407         (WebCore::SVGResourceMarker::draw):
3408         (WebCore::SVGResourceMarker::cachedBounds):
3409         * platform/graphics/svg/SVGResourceMarker.h:
3410         * rendering/RenderPath.cpp:
3411         (WebCore::RenderPath::layout):
3412         (WebCore::RenderPath::getAbsoluteRepaintRect):
3413         (WebCore::RenderPath::paint):
3414         (WebCore::drawMarkerWithData):
3415         (WebCore::RenderPath::drawMarkersIfNeeded):
3416         * rendering/RenderPath.h:
3417         * rendering/RenderSVGContainer.cpp:
3418         (WebCore::RenderSVGContainer::paint):
3419         (WebCore::RenderSVGContainer::getAbsoluteRepaintRect):
3420         * rendering/RenderSVGImage.cpp:
3421         (WebCore::RenderSVGImage::paint):
3422         (WebCore::RenderSVGImage::getAbsoluteRepaintRect):
3423         * rendering/SVGInlineFlowBox.cpp:
3424         (WebCore::paintSVGInlineFlow):
3425
3426 2007-01-23  Adele Peterson  <adele@apple.com>
3427
3428         Reviewed by Darin.
3429         
3430         WebCore part of fix for <rdar://problem/4946753>REGRESSION: Inserting tabs is broken in Mail
3431
3432         In addition to this fix, I also reorganized some event handling code for keyPress events to
3433         prepare for another fix.  There's also just a little bit of unrelated cleanup.
3434         
3435         * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::defaultEventHandler):
3436           Move tab focus behavior into new defaultKeyboardEventHandler method.
3437         
3438         * bridge/EditorClient.h: Added handleKeyPress.
3439         * editing/Editor.cpp:
3440         (WebCore::Editor::handleKeyPress): Added. Calls over to the client method.
3441         (WebCore::Editor::deleteRange): Removed unnecessary propogateDOMException.
3442         * editing/Editor.h: Added handleKeyPress.
3443         (WebCore::Editor::addToKillRing): Formatting cleanup.
3444         * editing/mac/EditorMac.mm: Removed unnecessary propogateDOMException.
3445         
3446         * page/EventHandler.cpp: (WebCore::EventHandler::defaultKeyboardEventHandler): Added. Checks
3447           the tabKeyCyclesThroughElements setting before advancing focus for tab key events.  Calls handleKeyPress.
3448         * page/EventHandler.h: Added defaultKeyboardEventHandler.
3449         
3450         * page/Page.cpp: (WebCore::Page::Page): Initialize m_tabKeyCyclesThroughElements to true.
3451         * page/Page.h: Added m_tabKeyCyclesThroughElements.
3452         (WebCore::Page::setTabKeyCyclesThroughElements): Added.
3453         (WebCore::Page::tabKeyCyclesThroughElements): Added.
3454         
3455         * platform/PlatformKeyboardEvent.h: Added ability to get NSEvent from PlatformKeyboardEvent.
3456         * platform/mac/KeyEventMac.mm: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3457           Initialize m_macEvent to the NSEvent.
3458         
3459         * platform/graphics/svg/SVGImageEmptyClients.h: (WebCore::SVGEmptyEditorClient::handleKeyPress): Added.
3460
3461 2007-01-23  George Staikos  <staikos@kde.org>
3462
3463         Compile with a released Qt.
3464
3465         * platform/graphics/qt/ImageQt.cpp:
3466
3467 2007-01-23  Lars Knoll <lars@trolltech.com>
3468
3469         Reviewed by Zack
3470
3471         Widget and ScrollView do not own the Qt widgets
3472         anymore. Make sure they can handle the case of
3473         a null QWidget and never delete them.
3474
3475         * platform/qt/ScrollViewQt.cpp:
3476         (WebCore::ScrollView::setScrollArea):
3477         (WebCore::ScrollView::updateContents):
3478         (WebCore::ScrollView::visibleWidth):
3479         (WebCore::ScrollView::visibleHeight):
3480         (WebCore::ScrollView::visibleContentRect):
3481         (WebCore::ScrollView::setContentsPos):
3482         (WebCore::ScrollView::resizeContents):
3483         (WebCore::ScrollView::contentsX):
3484         (WebCore::ScrollView::contentsY):
3485         (WebCore::ScrollView::contentsWidth):
3486         (WebCore::ScrollView::contentsHeight):
3487         (WebCore::ScrollView::scrollOffset):
3488         (WebCore::ScrollView::scrollBy):
3489         (WebCore::ScrollView::hScrollbarMode):
3490         (WebCore::ScrollView::vScrollbarMode):
3491         (WebCore::ScrollView::setHScrollbarMode):
3492         (WebCore::ScrollView::setVScrollbarMode):
3493         * platform/qt/WidgetQt.cpp:
3494         (WebCore::WidgetPrivate::~WidgetPrivate):
3495         (WebCore::Widget::setQWidget):
3496
3497 2007-01-23  Zack Rusin  <zack@kde.org>
3498
3499         Forgot to add one new file to the build.
3500
3501         * WebCore.pro: Add dom/clipboard.cpp
3502
3503 2007-01-23  Zack Rusin  <zack@kde.org>
3504
3505         Fix the Qt build
3506
3507         * page/DragActions.h:
3508         * page/DragController.cpp:
3509         * platform/qt/DragDataQt.cpp:
3510         (WebCore::DragData::canSmartReplace):
3511         (WebCore::DragData::containsColor):
3512         (WebCore::DragData::containsPlainText):
3513         (WebCore::DragData::asPlainText):
3514         (WebCore::DragData::asColor):
3515         (WebCore::DragData::createClipboard):
3516         (WebCore::DragData::containsCompatibleContent):
3517         (WebCore::DragData::containsURL):
3518         (WebCore::DragData::asURL):
3519         (WebCore::DragData::asFragment):
3520         * platform/qt/FileChooserQt.cpp:
3521
3522 2007-01-23  Lars Knoll <lars@trolltech.com>
3523
3524         Reviewed by Maciej
3525
3526         Make the last remaining pieces of the FrameLoader platform 
3527         independent. Move most of the code over to WebFrameLoaderClient.
3528         Some smaller cleanups in the WebFrameBridge, and moved some
3529         platform independent functionality over to the shared code
3530         in WebCore.
3531         
3532         * WebCore.exp:
3533         * WebCore.pro:
3534         * WebCore.xcodeproj/project.pbxproj:
3535         * loader/FrameLoader.cpp:
3536         (WebCore::FrameLoader::loadSubframe):
3537         (WebCore::FrameLoader::shouldUsePlugin):
3538         (WebCore::FrameLoader::loadPlugin):
3539         (WebCore::FrameLoader::detachFromParent):
3540         (WebCore::FrameLoader::partClearedInBegin):
3541         (WebCore::FrameLoader::createJavaAppletWidget):
3542         (WebCore::FrameLoader::didChangeTitle):
3543         * loader/FrameLoader.h:
3544         * loader/FrameLoaderClient.h:
3545         * loader/FrameLoaderTypes.h:
3546         (WebCore::):
3547         * loader/PluginDocument.cpp:
3548         (WebCore::PluginTokenizer::writeRawData):
3549         * loader/mac/FrameLoaderMac.mm: Removed.
3550         * loader/qt/FrameLoaderQt.cpp: Removed.
3551         * page/Frame.cpp:
3552         (WebCore::Frame::Frame):
3553         * page/FrameView.cpp:
3554         (WebCore::FrameView::mediaType):
3555         * page/qt/FrameQt.cpp:
3556         (WebCore::FrameQt::FrameQt):
3557         * platform/graphics/svg/SVGImageEmptyClients.h:
3558         (WebCore::SVGEmptyFrameLoaderClient::makeRepresentation):
3559         (WebCore::SVGEmptyFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
3560         (WebCore::SVGEmptyFrameLoaderClient::dispatchDidCommitLoad):
3561         (WebCore::SVGEmptyFrameLoaderClient::dispatchDidFailLoad):
3562         (WebCore::SVGEmptyFrameLoaderClient::dispatchCreatePage):
3563         (WebCore::SVGEmptyFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3564         (WebCore::SVGEmptyFrameLoaderClient::dispatchUnableToImplementPolicy):
3565         (WebCore::SVGEmptyFrameLoaderClient::revertToProvisionalState):
3566         (WebCore::SVGEmptyFrameLoaderClient::setMainDocumentError):
3567         (WebCore::SVGEmptyFrameLoaderClient::startDownload):
3568         (WebCore::SVGEmptyFrameLoaderClient::committedLoad):
3569         (WebCore::SVGEmptyFrameLoaderClient::shouldFallBack):
3570         (WebCore::SVGEmptyFrameLoaderClient::willUseArchive):
3571         (WebCore::SVGEmptyFrameLoaderClient::createDocumentLoader):
3572         (WebCore::SVGEmptyFrameLoaderClient::createFrame):
3573         (WebCore::SVGEmptyFrameLoaderClient::createPlugin):
3574         (WebCore::SVGEmptyFrameLoaderClient::createJavaAppletWidget):
3575         (WebCore::SVGEmptyFrameLoaderClient::objectContentType):
3576         (WebCore::SVGEmptyFrameLoaderClient::overrideMediaType):
3577         (WebCore::SVGEmptyFrameLoaderClient::redirectDataToPlugin):
3578         (WebCore::SVGEmptyFrameLoaderClient::windowObjectCleared):
3579
3580 2007-01-23  Oliver Hunt  <oliver@apple.com>
3581
3582         Reviewed by Adam.
3583
3584         Added DragController to handled drag and drop state and control logic.
3585         Currently this only handles logic for Dragging and Dropping, and is 
3586         unable to initialise a drag itself.
3587
3588         platform/DragData encapsulate the paltform Drag data (NSDraggingInfo on Mac, 
3589         QMimeType in Qt).  This provides methods to pull data out the drag data as a String, 
3590         a URL, a DocumentFragment (for rich content), or a Colour.
3591
3592         * WebCore.exp:
3593         * WebCore.pro:
3594         * WebCore.xcodeproj/project.pbxproj:
3595         * dom/Clipboard.cpp: Added.
3596         (WebCore::Clipboard::setAccessPolicy):
3597         (WebCore::dragOpFromIEOp):
3598         (WebCore::IEOpFromDragOp):
3599         (WebCore::C