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