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