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