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