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