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