Reviewed by Darin.
[WebKit-https.git] / WebCore / ChangeLog
1 2006-12-14  Alexey Proskuryakov  <ap@webkit.org>
2
3         Reviewed by Darin.
4
5         http://bugs.webkit.org/show_bug.cgi?id=11828
6         Fix a leak of NSURLRequest on each update - RetainPtr retains the object itself.
7
8         * platform/network/mac/ResourceRequestMac.mm:
9         (WebCore::ResourceRequest::doUpdatePlatformRequest):
10
11 2006-12-14  Simon Hausmann  <hausmann@kde.org>
12
13         Reviewed by Zack Rusin.
14
15         * WebCore.pro: Clean up the xpath grammar generation rule.
16
17 2006-12-14  Zack Rusin  <zack@kde.org>
18
19         Make it link with temporary stubs.
20
21         * loader/qt/DocumentLoaderQt.cpp:
22         (WebCore::DocumentLoader::originalRequest):
23         (WebCore::DocumentLoader::originalRequestCopy):
24         (WebCore::DocumentLoader::request):
25         (WebCore::DocumentLoader::initialRequest):
26         (WebCore::DocumentLoader::actualRequest):
27         (WebCore::DocumentLoader::URL):
28
29 2006-12-14  Zack Rusin  <zack@kde.org>
30
31         Compilation fixes for the Qt port after last nights
32         changes.
33
34         * loader/qt/DocumentLoaderQt.cpp:
35         (WebCore::DocumentLoader::URL):
36         (WebCore::DocumentLoader::unreachableURL):
37         * loader/qt/FrameLoaderQt.cpp:
38         (WebCore::PolicyCheck::call):
39         * platform/network/ResourceRequest.h:
40         (WebCore::ResourceRequest::setHTTPReferrer):
41
42 2006-12-14  Rob Buis  <buis@kde.org>
43
44         Reviewed by Oliver.
45
46         http://bugs.webkit.org/show_bug.cgi?id=11726
47         SVG Image do not take into account clip/overflow when hit testing
48
49         Take into account the overflowRect when hit-testing <svg> container.
50
51         * rendering/RenderSVGContainer.cpp:
52         (WebCore::RenderSVGContainer::viewportTransform):
53         (WebCore::RenderSVGContainer::nodeAtPoint):
54         * rendering/RenderSVGContainer.h:
55
56 2006-12-13  David Hyatt  <hyatt@apple.com>
57
58         Fix for bug 11825, dragging elements via -khtml-user-drag is broken (affects Dashboard).  Make sure
59         to clear the paintingRoot properly when recurring into children.  It would be nice to find a design
60         that prevented this mistake from being made and didn't require explicit clearing of the root.
61
62         Reviewed by olliej
63
64         * rendering/InlineFlowBox.cpp:
65         (WebCore::InlineFlowBox::paint):
66         * rendering/RenderBlock.cpp:
67         (WebCore::RenderBlock::paintChildren):
68         * rendering/RenderBox.cpp:
69         (WebCore::RenderBox::paint):
70         * rendering/RenderTable.cpp:
71         (WebCore::RenderTable::paint):
72
73 2006-12-13  Anders Carlsson  <acarlsson@apple.com>
74
75         * loader/FrameLoader.h:
76         id is mac-only.
77         
78 2006-12-13  Brady Eidson  <beidson@apple.com>
79
80         Implicitly reviewed by Darin, Hyatt, Maciej, and others!
81
82         Fixes a document tear down crash.
83         Changes a few long standing assertions to our new style
84
85         * dom/Document.cpp:
86         (WebCore::Document::~Document):
87         (WebCore::Document::topDocument):
88
89 2006-12-13  Maciej Stachowiak  <mjs@apple.com>
90
91         Reviewed by Anders.
92
93         - converted many places to use ResourceRequest instead of NSURLRequest
94
95         * WebCore.exp:
96         * loader/DocumentLoader.h:
97         * loader/FrameLoader.cpp:
98         (WebCore::FrameLoader::stopPolicyCheck):
99         * loader/FrameLoader.h:
100         (WebCore::PolicyCheck::request):
101         * loader/FrameLoaderClient.h:
102         * loader/MainResourceLoader.h:
103         * loader/mac/DocumentLoaderMac.mm:
104         (WebCore::DocumentLoader::DocumentLoader):
105         (WebCore::DocumentLoader::originalRequest):
106         (WebCore::DocumentLoader::originalRequestCopy):
107         (WebCore::DocumentLoader::request):
108         (WebCore::DocumentLoader::initialRequest):
109         (WebCore::DocumentLoader::actualRequest):
110         (WebCore::DocumentLoader::URL):
111         (WebCore::DocumentLoader::unreachableURL):
112         (WebCore::DocumentLoader::replaceRequestURLForAnchorScroll):
113         (WebCore::DocumentLoader::setRequest):
114         (WebCore::DocumentLoader::stopLoading):
115         (WebCore::DocumentLoader::setLastCheckedRequest):
116         (WebCore::DocumentLoader::lastCheckedRequest):
117         (WebCore::DocumentLoader::URLForHistory):
118         * loader/mac/FrameLoaderMac.mm:
119         (WebCore::FrameLoader::load):
120         (WebCore::FrameLoader::startLoadingMainResource):
121         (WebCore::FrameLoader::applyUserAgent):
122         (WebCore::FrameLoader::originalRequest):
123         (WebCore::FrameLoader::receivedMainResourceError):
124         (WebCore::FrameLoader::callContinueFragmentScrollAfterNavigationPolicy):
125         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
126         (WebCore::FrameLoader::commitProvisionalLoad):
127         (WebCore::FrameLoader::initialRequest):
128         (WebCore::FrameLoader::setRequest):
129         (WebCore::FrameLoader::checkNavigationPolicy):
130         (WebCore::FrameLoader::shouldReloadToHandleUnreachableURL):
131         (WebCore::FrameLoader::reloadAllowingStaleData):
132         (WebCore::FrameLoader::reload):
133         (WebCore::FrameLoader::checkNewWindowPolicy):
134         (WebCore::FrameLoader::continueAfterNewWindowPolicy):
135         (WebCore::FrameLoader::continueAfterNavigationPolicy):
136         (WebCore::FrameLoader::callContinueLoadAfterNavigationPolicy):
137         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
138         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
139         (WebCore::FrameLoader::callContinueLoadAfterNewWindowPolicy):
140         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
141         (WebCore::FrameLoader::post):
142         (WebCore::FrameLoader::addExtraFieldsToRequest):
143         (WebCore::FrameLoader::isReloading):
144         (WebCore::FrameLoader::referrer):
145         (WebCore::FrameLoader::loadEmptyDocumentSynchronously):
146         (WebCore::FrameLoader::loadResourceSynchronously):
147         (WebCore::FrameLoader::originalRequestURL):
148         (WebCore::PolicyCheck::set):
149         (WebCore::PolicyCheck::call):
150         (WebCore::PolicyCheck::clearRequest):
151         * loader/mac/MainResourceLoaderMac.mm:
152         (WebCore::MainResourceLoader::callContinueAfterNavigationPolicy):
153         (WebCore::MainResourceLoader::continueAfterNavigationPolicy):
154         (WebCore::MainResourceLoader::isPostOrRedirectAfterPost):
155         * loader/mac/SubresourceLoaderMac.mm:
156         (WebCore::SubresourceLoader::create):
157         * loader/mac/WebDataProtocol.h:
158         * loader/mac/WebDataProtocol.mm:
159         * platform/KURL.cpp:
160         (WebCore::operator!=):
161         * platform/KURL.h:
162         * platform/mac/KURLMac.mm:
163         (WebCore::KURL::getNSURL):
164         * platform/network/FormData.h:
165         (WebCore::operator==):
166         (WebCore::operator!=):
167         * platform/network/ResourceRequest.cpp:
168         (WebCore::operator==):
169         * platform/network/ResourceRequest.h:
170         * platform/network/mac/ResourceRequestMac.mm:
171         (WebCore::ResourceRequest::doUpdatePlatformRequest):
172
173 2006-12-13  Geoffrey Garen  <ggaren@apple.com>
174
175         Reviewed by Darin Adler, Dave Hyatt.
176         
177         Beefed up FocusController to handle frame focus. Changed implementors to
178         use FocusController, rather than the widget hierarchy, to focus frames.
179
180         (WebCore::FocusController::focusedNode): Made a minor change to focus a frame
181         before focusing the element inside of it. This matches FF.
182         (WebCore::FocusController::focusedFrame):
183         * platform/Widget.h:
184
185 2006-12-13  Justin Garcia  <justin.garcia@apple.com>
186
187         Reviewed by adele
188
189         <rdar://problem/4818145>
190         Cannot setSelectedDOMRange to non-editable island unless it has editable content on both sides
191         
192         There are editable positions before/after a "non-editable island" if its 
193         a table, but the code in canonicalPosition was not using 
194         editableRootForPosition to find root editable elements.
195         
196         * editing/VisiblePosition.cpp:
197         (WebCore::VisiblePosition::canonicalPosition): Use editableRootForPosition
198         to fix the table case.
199
200 2006-12-13  Steve Falkenburg  <sfalken@apple.com>
201
202         Reviewed by Adam.
203
204         Added missing forwarding headers.        
205
206         * ForwardingHeaders/kjs/value.h: Added.
207         * ForwardingHeaders/wtf/HashTable.h: Added.
208
209 2006-12-13  Lars Knoll <lars@trolltech.com>
210
211         Reviewed by Maciej, Zack.
212
213         Make the Qt cbuild compile again.
214
215         * WebCore.pro:
216         * loader/qt/ResourceLoaderQt.cpp:
217         * platform/network/qt/ResourceHandleQt.cpp:
218         (WebCore::ResourceHandle::start):
219         (WebCore::ResourceHandle::loadsBlocked):
220         * platform/qt/FrameQtClient.cpp:
221         (WebCore::FrameQtClient::openURL):
222         (WebCore::FrameQtClient::submitForm):
223
224 2006-12-12  Adam Roben  <aroben@apple.com>
225
226         Reviewed by Anders.
227
228         Changed #import to #include to match the rest of our ForwardingHeaders.
229
230         * ForwardingHeaders/wtf/StringExtras.h:
231
232 2006-12-12  Justin Garcia  <justin.garcia@apple.com>
233
234         Reviewed by harrison
235         
236         <rdar://problem/4757667>
237         GoogleDocs: Style menu does not open
238
239         * bindings/js/kjs_window.cpp:
240         (KJS::Selection::getValueProperty): Added rangeCount.
241         * bindings/js/kjs_window.h:
242         (KJS::Selection::):
243         * editing/SelectionController.h:
244         (WebCore::SelectionController::rangeCount): Added.
245
246 2006-12-12  Alice Liu  <alice.liu@apple.com>
247
248         Reviewed by Oliver.
249
250         * bindings/js/JSSVGMatrixCustom.cpp:
251         added #ifdef SVG_SUPPORT
252
253 2006-12-12  Anders Carlsson  <acarlsson@apple.com>
254
255         Suggested by Darin.
256
257         * loader/ResourceLoader.cpp:
258         Move down include of ResourceHandle.h.
259
260 2006-12-12  Geoffrey Garen  <ggaren@apple.com>
261
262         Reviewed by Adam Roben, Dave Hyatt, Darin Adler.
263         
264         Factored focus control into a FocusController class. I inted to use this
265         class for handling window active state and the focused frame, as well.
266
267         Layout tests pass.
268
269         * WebCore.xcodeproj/project.pbxproj:
270         * dom/Document.cpp:
271         (WebCore::Document::view):
272         (WebCore::Document::page): New helper function.
273         * dom/Document.h: Moved setters before getters.
274         (WebCore::Document::hoverNode):
275         (WebCore::Document::activeNode):
276         * dom/Node.cpp:
277         (WebCore::Node::detach): Use the FocusController.
278         * page/FocusController.cpp: Added.
279         (WebCore::shouldFocus): renamed and refactored this helper function.
280         (WebCore::shouldUnfocus): ditto.
281         * page/FocusController.h: Added.
282
283 2006-12-12  Anders Carlsson  <acarlsson@apple.com>
284
285         Rubber Stamped by Geoff.
286
287         * platform/Base64.cpp:
288         * platform/Base64.h:
289         Put functions inside of the WebCore namespace.
290
291 2006-12-12  Anders Carlsson  <acarlsson@apple.com>
292
293         Try fixing the non-Mac builds.
294         
295         * loader/ResourceLoader.cpp:
296         (WebCore::ResourceLoader::willSendRequest):
297         (WebCore::ResourceLoader::didReceiveResponse):
298         (WebCore::ResourceLoader::didReceiveData):
299         (WebCore::ResourceLoader::didFinishLoading):
300         (WebCore::ResourceLoader::didFail):
301         * loader/SubresourceLoader.cpp:
302         (WebCore::SubresourceLoader::create):
303         * loader/SubresourceLoader.h:
304
305 2006-12-12  Anders Carlsson  <acarlsson@apple.com>
306
307         Reviewed by Darin.
308
309         Turn ResourceLoader into a ResourceHandleClient and stop using NSURLConnection in the loader.
310
311         * WebCore.exp:
312         Add new methods needed by WebKit.
313         
314         * WebCore.xcodeproj/project.pbxproj:
315         Make ResourceHandle.h a private header.
316         
317         * loader/FrameLoaderClient.h:
318         Change the download method to take a ResourceHandle instead of an NSURLConnection.
319         
320         * loader/MainResourceLoader.h:
321         Get rid of the proxy instance variable, that's handled by ResourceHandlw now.
322         
323         * loader/ResourceLoader.h:
324         (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
325         (WebCore::ResourceLoader::didCancelAuthenticationChallenge):
326         (WebCore::ResourceLoader::willStopBufferingData):
327         (WebCore::ResourceLoader::willCacheResponse):
328         (WebCore::ResourceLoader::receivedCredential):
329         (WebCore::ResourceLoader::receivedRequestToContinueWithoutCredential):
330         (WebCore::ResourceLoader::receivedCancellation):
331         (WebCore::ResourceLoader::handle):
332         * loader/SubresourceLoader.h:
333         Make ResourceLoader a ResourceHandleClient, moving the methods from SubresourceLoader.
334         
335         * loader/mac/MainResourceLoaderMac.mm:
336         (WebCore::MainResourceLoader::MainResourceLoader):
337         (WebCore::MainResourceLoader::continueAfterContentPolicy):
338         (WebCore::MainResourceLoader::loadNow):
339         (WebCore::MainResourceLoader::load):
340         Use a ResourceHandle instead of an NSURLConnection.
341         
342         * loader/mac/ResourceLoaderMac.mm:
343         (WebCore::ResourceLoader::~ResourceLoader):
344         (WebCore::ResourceLoader::releaseResources):
345         (WebCore::ResourceLoader::load):
346         (WebCore::ResourceLoader::setDefersLoading):
347         (WebCore::ResourceLoader::resourceData):
348         (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
349         (WebCore::ResourceLoader::didCancel):
350         (WebCore::ResourceLoader::willSendRequest):
351         (WebCore::ResourceLoader::didReceiveResponse):
352         (WebCore::ResourceLoader::didReceiveData):
353         (WebCore::ResourceLoader::didFinishLoading):
354         (WebCore::ResourceLoader::didFail):
355         Remove the WebCoreResourceLoaderAsDelegate class, use a ResourceHandle instead of an NSURLConnection.
356         
357         * loader/mac/SubresourceLoaderMac.mm:
358         Remove ResourceHandleClient methods.
359         
360         * platform/network/ResourceHandle.cpp:
361         (WebCore::ResourceHandle::ResourceHandle):
362         (WebCore::ResourceHandle::create):
363         * platform/network/ResourceHandle.h:
364         * platform/network/ResourceHandleInternal.h:
365         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
366         Add an extra argument denoting whether this ResourceHandle can possibly be "converted" into one used for downloads.
367         
368         * platform/network/mac/ResourceHandleMac.mm:
369         (WebCore::ResourceHandle::~ResourceHandle):
370         (WebCore::ResourceHandle::start):
371         (WebCore::ResourceHandle::releaseProxy):
372         (WebCore::ResourceHandle::connection):
373         New methods for creating a NSURLConnectionDelegateProxy which is used when creating a NSURLDownload from an existing
374         connection.
375
376 2006-12-12  Anders Carlsson  <acarlsson@apple.com>
377
378         Reviewed by Geoff.
379
380         * loader/mac/SubresourceLoaderMac.mm:
381         (WebCore::SubresourceLoader::load):
382         * platform/network/mac/ResourceHandleMac.mm:
383         (WebCore::ResourceHandle::start):
384         Move the didTellBridgeAboutLoad call to SubresourceLoader in preparation for getting rid of
385         the DocLoader parameter to ResourceHandle::create.
386
387 2006-12-12  George Staikos  <staikos@kde.org>
388
389         Make the last checkin compile.
390
391         * WebCore.pro:
392         * ksvg2/svg/SVGTransform.cpp:
393
394 2006-12-12  Nikolas Zimmermann  <zimmermann@kde.org>
395
396         Reviewed by Sam Weinig & Rob Buis.
397
398         Fixes: http://bugs.webkit.org/show_bug.cgi?id=11797
399
400         Remove SVGMatrix, replace it by AffineTransform usage everywhere.
401         Changed AffineTransform API to be able to be used within generation
402         (m11() -> a(), m12() -> b(), ...). Add some methods needed for SVG.
403
404         The actual SVGMatrix -> AffineTransformation patch has been created
405         by Rob - I just adapted it to the autogenerated POD style.
406
407         * WebCore.xcodeproj/project.pbxproj:
408         * bindings/js/JSSVGMatrixCustom.cpp: Added.
409         (WebCore::JSSVGMatrix::inverse):
410         (WebCore::JSSVGMatrix::rotateFromVector):
411         * bindings/objc/DOMInternal.h:
412         * bindings/scripts/CodeGeneratorJS.pm:
413         * bindings/scripts/CodeGeneratorObjC.pm:
414         * ksvg2/misc/KSVGTimeScheduler.cpp:
415         * ksvg2/misc/SVGImageLoader.cpp:
416         * ksvg2/svg/SVGAnimateTransformElement.cpp:
417         (WebCore::SVGAnimateTransformElement::handleTimerEvent):
418         (WebCore::SVGAnimateTransformElement::calculateRotationFromMatrix):
419         (WebCore::SVGAnimateTransformElement::initialMatrix):
420         (WebCore::SVGAnimateTransformElement::transformMatrix):
421         * ksvg2/svg/SVGAnimateTransformElement.h:
422         * ksvg2/svg/SVGClipPathElement.cpp:
423         (WebCore::SVGClipPathElement::canvasResource):
424         * ksvg2/svg/SVGFitToViewBox.cpp:
425         (WebCore::SVGFitToViewBox::viewBoxToViewTransform):
426         * ksvg2/svg/SVGFitToViewBox.h:
427         * ksvg2/svg/SVGLengthList.cpp:
428         * ksvg2/svg/SVGLinearGradientElement.cpp:
429         (WebCore::SVGLinearGradientElement::buildGradient):
430         * ksvg2/svg/SVGLocatable.cpp:
431         (WebCore::SVGLocatable::getCTM):
432         (WebCore::SVGLocatable::getScreenCTM):
433         (WebCore::SVGLocatable::getTransformToElement):
434         * ksvg2/svg/SVGLocatable.h:
435         * ksvg2/svg/SVGMarkerElement.cpp:
436         * ksvg2/svg/SVGMatrix.cpp: Removed.
437         * ksvg2/svg/SVGMatrix.h: Removed.
438         * ksvg2/svg/SVGMatrix.idl:
439         * ksvg2/svg/SVGNumberList.cpp:
440         * ksvg2/svg/SVGPatternElement.cpp:
441         (WebCore::SVGPatternElement::notifyAttributeChange):
442         (WebCore::SVGPatternElement::getCTM):
443         * ksvg2/svg/SVGPatternElement.h:
444         * ksvg2/svg/SVGPoint.idl:
445         * ksvg2/svg/SVGPreserveAspectRatio.cpp:
446         (WebCore::SVGPreserveAspectRatio::getCTM):
447         * ksvg2/svg/SVGPreserveAspectRatio.h:
448         * ksvg2/svg/SVGRadialGradientElement.cpp:
449         (WebCore::SVGRadialGradientElement::buildGradient):
450         * ksvg2/svg/SVGSVGElement.cpp:
451         (WebCore::SVGSVGElement::viewport):
452         (WebCore::SVGSVGElement::createSVGMatrix):
453         (WebCore::SVGSVGElement::createSVGTransformFromMatrix):
454         (WebCore::SVGSVGElement::getCTM):
455         (WebCore::SVGSVGElement::getScreenCTM):
456         * ksvg2/svg/SVGSVGElement.h:
457         * ksvg2/svg/SVGStyledElement.cpp:
458         * ksvg2/svg/SVGStyledLocatableElement.cpp:
459         (WebCore::SVGStyledLocatableElement::getCTM):
460         (WebCore::SVGStyledLocatableElement::getScreenCTM):
461         * ksvg2/svg/SVGStyledLocatableElement.h:
462         * ksvg2/svg/SVGStyledTransformableElement.cpp:
463         (WebCore::SVGStyledTransformableElement::localMatrix):
464         (WebCore::SVGStyledTransformableElement::getCTM):
465         (WebCore::SVGStyledTransformableElement::getScreenCTM):
466         (WebCore::SVGStyledTransformableElement::updateLocalTransform):
467         (WebCore::SVGStyledTransformableElement::attach):
468         * ksvg2/svg/SVGStyledTransformableElement.h:
469         * ksvg2/svg/SVGTextElement.cpp:
470         (WebCore::SVGTextElement::localMatrix):
471         (WebCore::SVGTextElement::updateLocalTransform):
472         (WebCore::SVGTextElement::attach):
473         (WebCore::SVGTextElement::getScreenCTM):
474         (WebCore::SVGTextElement::getCTM):
475         * ksvg2/svg/SVGTextElement.h:
476         * ksvg2/svg/SVGTransform.cpp:
477         (SVGTransform::SVGTransform):
478         (SVGTransform::matrix):
479         (SVGTransform::setMatrix):
480         (SVGTransform::setTranslate):
481         (SVGTransform::setScale):
482         (SVGTransform::setRotate):
483         (SVGTransform::setSkewX):
484         (SVGTransform::setSkewY):
485         * ksvg2/svg/SVGTransform.h:
486         * ksvg2/svg/SVGTransformList.cpp:
487         (SVGTransformList::createSVGTransformFromMatrix):
488         (SVGTransformList::concatenate):
489         * ksvg2/svg/SVGTransformList.h:
490         * ksvg2/svg/SVGTransformable.cpp:
491         (WebCore::SVGTransformable::getCTM):
492         (WebCore::SVGTransformable::getScreenCTM):
493         (WebCore::SVGTransformable::parseTransformAttribute):
494         * ksvg2/svg/SVGTransformable.h:
495         * platform/graphics/AffineTransform.cpp:
496         (WebCore::AffineTransform::multiply):
497         (WebCore::AffineTransform::scale):
498         (WebCore::AffineTransform::scaleNonUniform):
499         (WebCore::AffineTransform::rotateFromVector):
500         (WebCore::AffineTransform::flipX):
501         (WebCore::AffineTransform::flipY):
502         (WebCore::AffineTransform::skewX):
503         (WebCore::AffineTransform::skewY):
504         * platform/graphics/AffineTransform.h:
505         * platform/graphics/cairo/AffineTransformCairo.cpp:
506         (WebCore::AffineTransform::a):
507         (WebCore::AffineTransform::setA):
508         (WebCore::AffineTransform::b):
509         (WebCore::AffineTransform::setB):
510         (WebCore::AffineTransform::c):
511         (WebCore::AffineTransform::setC):
512         (WebCore::AffineTransform::d):
513         (WebCore::AffineTransform::setD):
514         (WebCore::AffineTransform::e):
515         (WebCore::AffineTransform::setE):
516         (WebCore::AffineTransform::f):
517         (WebCore::AffineTransform::setF):
518         (WebCore::AffineTransform::inverse):
519         * platform/graphics/cg/AffineTransformCG.cpp:
520         (WebCore::AffineTransform::a):
521         (WebCore::AffineTransform::setA):
522         (WebCore::AffineTransform::b):
523         (WebCore::AffineTransform::setB):
524         (WebCore::AffineTransform::c):
525         (WebCore::AffineTransform::setC):
526         (WebCore::AffineTransform::d):
527         (WebCore::AffineTransform::setD):
528         (WebCore::AffineTransform::e):
529         (WebCore::AffineTransform::setE):
530         (WebCore::AffineTransform::f):
531         (WebCore::AffineTransform::setF):
532         (WebCore::AffineTransform::inverse):
533         * platform/graphics/qt/AffineTransformQt.cpp:
534         (WebCore::AffineTransform::a):
535         (WebCore::AffineTransform::setA):
536         (WebCore::AffineTransform::b):
537         (WebCore::AffineTransform::setB):
538         (WebCore::AffineTransform::c):
539         (WebCore::AffineTransform::setC):
540         (WebCore::AffineTransform::d):
541         (WebCore::AffineTransform::setD):
542         (WebCore::AffineTransform::e):
543         (WebCore::AffineTransform::setE):
544         (WebCore::AffineTransform::f):
545         (WebCore::AffineTransform::setF):
546         (WebCore::AffineTransform::inverse):
547         * rendering/RenderForeignObject.cpp:
548         (WebCore::RenderForeignObject::paint):
549         (WebCore::RenderForeignObject::nodeAtPoint):
550         * rendering/RenderPath.cpp:
551         (WebCore::RenderPath::mapAbsolutePointToLocal):
552         * rendering/RenderSVGImage.cpp:
553         (WebCore::RenderSVGImage::paint):
554         (WebCore::RenderSVGImage::nodeAtPoint):
555         * rendering/RenderSVGText.cpp:
556         (WebCore::RenderSVGText::computeAbsoluteRepaintRect):
557         (WebCore::RenderSVGText::nodeAtPoint):
558         (WebCore::RenderSVGText::paint):
559         * rendering/SVGInlineFlowBox.cpp:
560         (WebCore::paintSVGInlineFlow):
561         * rendering/SVGRenderTreeAsText.cpp:
562         (WebCore::operator<<):
563
564 2006-12-12  George Staikos  <staikos@kde.org>
565
566         Reviewed by Alexey.
567
568         Fix the Qt build again.
569
570         * WebCore.pro:
571         * loader/qt/FrameLoaderQt.cpp:
572         (WebCore::FrameLoader::createFrame):
573         (WebCore::FrameLoader::load):
574         * platform/qt/PasteboardQt.cpp:
575         (WebCore::Pasteboard::writeSelection):
576         (WebCore::Pasteboard::writeURL):
577         (WebCore::Pasteboard::clear):
578
579 2006-12-12  Geoffrey Garen  <ggaren@apple.com>
580
581         Reviewed by Beth Dakin.
582         
583         Moved focus control to the page level. Fixed a minor bug where a node
584         would retain keyboard focus even when removed from the document.
585         
586         We should probably move this, along with hover and active, into a separate
587         FocusController. But I'm too tired right now.
588
589         * dom/Document.cpp: Migrated code to Page
590         (WebCore::Document::removedLastRef):
591         (WebCore::Document::detach):
592         (WebCore::Document::setFocusedNode):
593         (WebCore::Document::focusedNode):
594         * dom/Document.h:
595         * dom/Node.cpp:
596         (WebCore::Node::detach): Clear ourselves from keyboard focus. This fixes
597         the minor bug and was also necessary to prevent regressions caused by hanging
598         on to a focused node after the document was replaced.
599         * dom/Node.h:
600         (WebCore::Node::inDetach):
601         * page/Page.cpp: Migrated code from Document
602         (WebCore::shouldAcquireEditingFocus):
603         (WebCore::shouldRelinquishEditingFocus):
604         (WebCore::clearSelectionIfNeeded):
605         (WebCore::widgetForNode):
606         (WebCore::Page::setFocusedNode):
607         * page/Page.h:
608         (WebCore::Page::focusedNode):
609
610 2006-12-11  Alexey Proskuryakov  <ap@webkit.org>
611
612         Reviewed by Darin.
613
614         http://bugs.webkit.org/show_bug.cgi?id=11053
615         XMLHttpRequest should be an EventTarget
616
617         Test: http/tests/xmlhttprequest/event-target.html
618
619         * bindings/js/JSXMLHttpRequest.cpp:
620         (KJS::JSXMLHttpRequest::mark):
621         (KJS::JSXMLHttpRequest::~JSXMLHttpRequest):
622         (KJS::JSXMLHttpRequestProtoFunc::callAsFunction):
623         * bindings/js/JSXMLHttpRequest.h:
624         (KJS::JSXMLHttpRequest::):
625         * xml/xmlhttprequest.cpp:
626         (WebCore::XMLHttpRequest::addEventListener):
627         (WebCore::XMLHttpRequest::removeEventListener):
628         (WebCore::XMLHttpRequest::dispatchEvent):
629         (WebCore::XMLHttpRequest::callReadyStateChangeListener):
630         * xml/xmlhttprequest.h:
631         (WebCore::XMLHttpRequest::eventListeners):
632         Implement EventTarget methods (except for NS variations, which Firefox doesn't have either).
633
634 2006-12-11  Darin Adler  <darin@apple.com>
635
636         Reviewed by Geoff.
637
638         - fix http://bugs.webkit.org/show_bug.cgi?id=11809
639           fast/dom/gc-8.html crash in alternate-thread marking code in ScriptInterpreter
640
641         DocumentType objects were getting filed under the wrong document in the
642         DOM objects structure.
643
644         * bindings/js/kjs_binding.h: Added a destructor for debugging purposes only.
645         * bindings/js/kjs_binding.cpp:
646         (KJS::wrapperSet): Added. Set of outstanding wrappers for debugging.
647         (KJS::addWrapper): Added.
648         (KJS::removeWrapper): Added.
649         (KJS::removeWrappers): Added.
650         (KJS::DOMObject::~DOMObject): Added. Asserts that there is no outstanding reference
651         to this wrapper since it's being destroyed.
652         (KJS::ScriptInterpreter::putDOMObject): Added a call to ADD_WRAPPER.
653         (KJS::ScriptInterpreter::forgetDOMObject): Added a call to REMOVE_WRAPPER.
654         (KJS::ScriptInterpreter::forgetDOMNodeForDocument): Added a call to REMOVE_WRAPPER.
655         (KJS::ScriptInterpreter::putDOMNodeForDocument): Added a call to ADD_WRAPPER.
656         (KJS::ScriptInterpreter::forgetAllDOMNodesForDocument): Added a call to REMOVE_WRAPPERS.
657         (KJS::ScriptInterpreter::updateDOMNodeDocument): Added calls to REMOVE_WRAPPER and
658         ADD_WRAPPER so the out-of-order transaction doesn't upset the assertions in the functions
659         we're calling. Another solution would be to reorder the two, but I think that would
660         create a race where another thread could garbage collect after the forget but before the put.
661         (KJS::ScriptInterpreter::wasRunByUserGesture): Tweaked formatting.
662
663         * dom/Document.cpp: (WebCore::Document::adoptNode): Removed call to updateDOMNodeDocument
664         since setDocument now takes care of that.
665         * dom/Node.cpp:
666         (WebCore::Node::setDocument): Added call to updateDOMNodeDocument here.
667         (WebCore::Node::checkAddChild): Removed call to updateDOMNodeDocument since setDocument
668         now takes care of that.
669
670 2006-12-11  Alexey Proskuryakov  <ap@nypop.com>
671
672         Reviewed by Darin.
673
674         http://bugs.webkit.org/show_bug.cgi?id=9673
675         Add support for window.atob() and window.btoa()
676
677         * WebCore.xcodeproj/project.pbxproj: Added Base64.{h,cpp}
678         * bindings/js/kjs_window.cpp:
679         (KJS::WindowFunc::callAsFunction):
680         * bindings/js/kjs_window.h:
681         (KJS::Window::):
682         * platform/Base64.cpp: Added.
683         (base64Encode):
684         (base64Decode):
685         * platform/Base64.h: Added.
686         * ForwardingHeaders/wtf/StringExtras.h: Added.
687         * platform/DeprecatedString.cpp: Use strncasecmp from StringExtras.
688
689 2006-12-11  Darin Adler  <darin@apple.com>
690
691         Reviewed by Brady.
692
693         - did some of the Mac-specific file moves mentioned in my recent mail to the WebKit list
694
695         * WebCore.xcodeproj/project.pbxproj: Updated project for file moves.
696
697         * bridge/mac/FrameMac.h: Moved to page/mac.
698         * bridge/mac/FrameMac.mm: Ditto.
699         * bridge/mac/WebCoreFrameBridge.h: Ditto.
700         * bridge/mac/WebCoreFrameBridge.mm: Ditto.
701         * bridge/mac/WebCoreFrameView.h: Ditto.
702         * bridge/mac/WebCoreViewFactory.h: Ditto.
703         * bridge/mac/WebCoreViewFactory.m: Ditto.
704         * bridge/mac/WebDashboardRegion.h: Ditto.
705         * bridge/mac/WebDashboardRegion.m: Ditto.
706
707         * bridge/mac/WebCoreKeyboardAccess.h: Moved to page/mac,
708         renamed WebCoreKeyboardUIMode.h, and made a C++ header.
709
710         * page/EventHandler.h: Updated for change to WebCoreKeyboardAccess.
711         * page/mac/EventHandlerMac.mm:
712         (WebCore::EventHandler::tabsToLinks): Ditto.
713         (WebCore::EventHandler::tabsToAllControls): Ditto.
714         (WebCore::EventHandler::keyboardUIMode): Ditto.
715
716 2006-12-11  Beth Dakin  <bdakin@apple.com>
717
718         Reviewed by Adam.
719
720         Primarily, this patch implements/hooks-up actions for the sub-menu
721         items in WebCore context menus. I fixed a few other things along
722         the way too:
723                 -Made BUILDING_ON_TIGER ifdef work within C++ as well as
724                  Obj-C
725                 -Fixed bug where we would throw and Obj-C exception and
726                  fail to pop up menus with more than one separator item.
727                 -Re-named some of the spelling/grammar tags since Tiger and
728                  Leopard share more of the actions than initially
729                  anticipated.
730
731         * WebCorePrefix.h: Make BUILDING_ON_TIGER available to C++
732         * bridge/EditorClient.h: New functions to toggle
733         spelling/grammar checking.
734         * editing/Editor.cpp:
735         (WebCore::Editor::toggleContinuousSpellChecking): Call into client.
736         (WebCore::Editor::toggleGrammarChecking): Same.
737         (WebCore::Editor::toggleBold): call execToggleBold()
738         (WebCore::Editor::toggleUnderline): Create appropriate underline
739         style and apply to selection.
740         (WebCore::Editor::setBaseWritingDirection): Create appropriate
741         writing direction and apply to selection.
742         * editing/Editor.h:
743         * editing/mac/EditorMac.mm: New functions to show spelling guesses,
744         fonts, styles, and color panels.
745         * page/ContextMenuClient.h: New functions for the speech sub-menu.
746         * page/ContextMenuController.cpp:
747         (WebCore::ContextMenuController::contextMenuItemSelected): Fill in
748         editing sub-menu actions.
749         * platform/ContextMenu.cpp:
750         (WebCore::separatorItem): Helper function to create a separator 
751         item.
752         (WebCore::createFontSubMenu): Put very mac-specific things within a
753         platform ifdef.
754         (WebCore::createSpellingAndGrammarSubMenu): Re-named some of the
755         spelling sub-menu tags.
756         (WebCore::createSpellingSubMenu): Same.
757         (WebCore::ContextMenu::populate): We can't share the separator
758         item. When we do, menus with more than one separator throw and obj-
759         c exception and fail to pop-up.
760         * platform/ContextMenuItem.h:
761         (WebCore::): Re-named some of the spelling sub-menu tags.
762
763 2006-12-11  Alice Liu  <alice.liu@apple.com>
764
765         Reviewed by Geoff, Adam.
766
767         Switch to use the Editor for copying URLs.  Also some Pasteboard and PlatformMouseEvent cleanup.
768
769         All layout tests pass as they would without this patch. 
770
771         * WebCore.exp:
772         added Editor::copyURL to be called from WebKit
773         
774         * editing/Editor.cpp:
775         (WebCore::Editor::tryDHTMLCopy):
776         (WebCore::Editor::tryDHTMLCut):
777         Pasteboard::clearTypes() changed to clear()
778
779         (WebCore::Editor::writeSelectionToPasteboard):        
780         (WebCore::Editor::cut):
781         (WebCore::Editor::copy):
782         Changed signature of writeSelection to take raw pointer instead of PassRefPtr
783
784         (WebCore::Editor::copyURL):
785         * editing/Editor.h:
786         Added copyURL.
787         
788         * page/ContextMenuClient.h:
789         * page/ContextMenuController.cpp:
790         (WebCore::ContextMenuController::contextMenuItemSelected):
791         Removed copyLinkToClipboard
792         
793         * platform/KURL.cpp:
794         (WebCore::KURL::lastPathComponent):
795         * platform/KURL.h:
796         Added lastPathComponent. 
797         
798         * platform/Pasteboard.h:
799         Changed some function names.
800         Moved some functions out of class to static.
801         
802         * platform/PlatformMouseEvent.h:
803         (WebCore::):
804         Removed MouseEventType enum, added NoButton to MouseButton without disturbing other button values.
805         
806         * platform/mac/PasteboardMac.mm:
807         Added writeURL, and moved some things around
808         
809         * platform/mac/WebCoreSystemInterface.h:
810         * platform/mac/WebCoreSystemInterface.mm:
811         Add some calls necessary for Pasteboard::writeURL to work
812
813 2006-12-11  Darin Adler  <darin@apple.com>
814
815         Reviewed by Brady.
816
817         - http://bugs.webkit.org/show_bug.cgi?id=11794
818           fix lifetime problems affecting Frame's ownerElement pointer
819
820         * CMakeLists.txt:
821         * WebCore.vcproj/WebCore/WebCore.vcproj:
822         * WebCore.xcodeproj/project.pbxproj:
823         * WebCoreSources.bkl:
824         Updated for new source files.
825
826         * WebCore.exp: Updated for changes to entry point names.
827
828         * bridge/mac/FrameMac.h:
829         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::FrameMac):
830         * bridge/win/FrameWin.h:
831         * bridge/win/FrameWin.cpp: (WebCore::FrameWin::FrameWin):
832         * platform/qt/FrameQt.h:
833         * platform/qt/FrameQt.cpp: (WebCore::FrameQt::FrameQt):
834         Updated owner element type to HTMLFrameOwnerElement.
835
836         * bridge/mac/WebCoreFrameBridge.h: Removed non-C++ case since we don't
837         use that any more. Updated owner element type to HTMLFrameOwnerElement.
838
839         * dom/Document.cpp: Added include so that the ownerElement function can
840         compile (since it downcasts an HTMLFrameOwnerElement to an Element).
841
842         * html/HTMLFrameElement.cpp:
843         (WebCore::containingFrameSetElement): Moved this function in here; it
844         doesn't need to be a member function.
845         (WebCore::HTMLFrameElement::attach): Updated to call this.
846
847         * html/HTMLFrameElementBase.h:
848         * html/HTMLFrameElementBase.cpp:
849         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase): Inherit from
850         HTMLFrameOwnerElement. Removed contentFrame, contentDocument, and
851         containingFrameSetElement. Removed friend classes.
852
853         * html/HTMLFrameOwnerElement.h: Added.
854         * html/HTMLFrameOwnerElement.cpp: Added.
855
856         * html/HTMLEmbedElement.h:
857         * html/HTMLEmbedElement.cpp:
858         * html/HTMLObjectElement.h:
859         * html/HTMLObjectElement.cpp:
860         Remove now-unneeded contentDocument functions.
861
862         * html/HTMLPlugInElement.h:
863         * html/HTMLPlugInElement.cpp:
864         (WebCore::HTMLPlugInElement::HTMLPlugInElement): Inherit from
865         HTMLFrameOwnerElement.
866
867         * loader/FormState.h:
868         * loader/FormState.cpp: Use HTMLFormElement instead of just Element.
869
870         * loader/FrameLoader.h:
871         * loader/FrameLoader.cpp:
872         (WebCore::FrameLoader::requestFrame): Use HTMLFormElement.
873         (WebCore::FrameLoader::loadSubframe): Ditto.
874         (WebCore::FrameLoader::requestObject): Don't pass an element parameter
875         to shouldUsePlugin, and remove now-unneeded type casts.
876         (WebCore::FrameLoader::shouldUsePlugin): Removed unneeded element parameter.
877         (WebCore::FrameLoader::handleFallbackContent): Use HTMLFrameOwnerElement.
878         (WebCore::FrameLoader::updateBaseURLForEmptyDocument): Ditto.
879         (WebCore::FrameLoader::isHostedByObjectElement): Ditto.
880         * loader/mac/FrameLoaderMac.mm:
881         (WebCore::FrameLoader::load): Use HTMLFormElement.
882         (WebCore::FrameLoader::post): Ditto.
883         (WebCore::FrameLoader::createFrame): Use HTMLFrameOwnerElement.
884
885         * page/Frame.h:
886         * page/FramePrivate.h:
887         * page/Frame.cpp:
888         (WebCore::parentFromOwnerElement): Use HTMLFrameOwnerElement.
889         (WebCore::Frame::Frame): Ditto. Also set m_contentFrame on the owner element.
890         (WebCore::Frame::ownerElement): Ditto.
891         (WebCore::Frame::ownerRenderer): Ditto.
892         (WebCore::Frame::disconnectOwnerElement): Clear m_contentFrame on the owner
893         element before disconnecting it.
894         (WebCore::FramePrivate::FramePrivate): Use HTMLFrameOwnerElement.
895
896         * page/mac/EventHandlerMac.mm: Include HTMLFrameOwnerElement.h so that
897         the code here will compile (no code changes needed).
898
899         * rendering/RenderFrame.cpp: (WebCore::RenderFrame::viewCleared):
900         Updated so that RenderFrame doesn't need to be a friend of HTMLFrameElementBase.
901
902         * rendering/RenderPart.h:
903         * rendering/RenderPart.cpp: (WebCore::RenderPart::RenderPart):
904         Use HTMLFrameOwnerElement.
905
906         * rendering/RenderPartObject.h:
907         * rendering/RenderPartObject.cpp:
908         (WebCore::RenderPartObject::RenderPartObject): Use HTMLFrameOwnerElement.
909         (WebCore::RenderPartObject::viewCleared): Updated so that RenderFrame doesn't
910         need to be a friend of HTMLFrameElementBase.
911
912         - other changes
913
914         * platform/network/ResourceHandleInternal.h: Added Noncopyable and
915         fixed indentation.
916
917 2006-12-11  David Hyatt  <hyatt@apple.com>
918
919         Fix failing layout test.  Remove WTF::Unicode::isSpace and just revert
920         the caller to the old behavior.
921
922         Reviewed by darin
923
924         * platform/StringImpl.cpp:
925         (WebCore::isSpace):
926
927 2006-12-11  Alexey Proskuryakov  <ap@webkit.org>
928
929         Reviewed by Adam.
930
931         http://bugs.webkit.org/show_bug.cgi?id=11807
932         Merge EventHandler::m_bMousePressed and EventHandler::m_mousePressed
933
934         * page/EventHandler.cpp:
935         (WebCore::EventHandler::EventHandler):
936         (WebCore::EventHandler::handleMousePressEvent):
937         (WebCore::EventHandler::handleMouseMoveEvent):
938         (WebCore::EventHandler::handleMouseReleaseEvent):
939         (WebCore::EventHandler::autoscrollTimerFired):
940         * page/EventHandler.h:
941         * page/mac/EventHandlerMac.mm:
942         (WebCore::EventHandler::handleDrag):
943         (WebCore::EventHandler::mouseMoved):
944         Merge EventHandler::m_bMousePressed and EventHandler::m_mousePressed
945
946         (WebCore::EventHandler::lastEventIsMouseUp):
947         Check that the "new" event is newer than the "old" one - that's not always the case 
948         when running in DRT, as [NSApp currentEvent] isn't updated by eventSender.
949
950 2006-12-11  Nikolas Zimmermann  <zimmermann@kde.org>
951
952         Reviewed by Sam Weinig.
953
954         Fixes: http://bugs.webkit.org/show_bug.cgi?id=11801
955
956         Autogenerate POD types for ObjC/JS.
957
958         This removes the need for the hand-written JSSVG*, DOMSVG* wrappers
959         in bindings/js, bindings/objc. Makes it much easier to convert more
960         SVG types to POD types (ie. SVGMatrix* -> AffineTransform etc.)
961
962         Affected test: svg/custom/SVGPoint-matrixTransform.svg
963
964         It's failing with this patch, as the SVGPoint matrixTransform() function
965         got disabled, until the SVGMatrix -> AffineTransform transition patch
966         is landed. Otherwhise we'd need to add special cases to both CodeGeneratorJS/ObjC.pm
967         which would be a waste of time, as SVGMatrix is about to die.
968
969         Temporarily updating layout test result, as suggested by John Sullivan, so
970         no-one notices that SVGPoint-matrixTransform.svg actually fails right now.
971
972         Expect that to be fixed again in the next hour(s).
973
974         * DerivedSources.make:
975         * WebCore.xcodeproj/project.pbxproj:
976         * bindings/js/JSSVGNumber.cpp: Removed.
977         * bindings/js/JSSVGNumber.h: Removed.
978         * bindings/js/JSSVGPoint.cpp: Removed.
979         * bindings/js/JSSVGPoint.h: Removed.
980         * bindings/js/JSSVGRect.cpp: Removed.
981         * bindings/js/JSSVGRect.h: Removed.
982         * bindings/objc/DOMSVGNumber.mm: Removed.
983         * bindings/objc/DOMSVGPoint.mm: Removed.
984         * bindings/objc/DOMSVGRect.mm: Removed.
985         * bindings/scripts/CodeGeneratorJS.pm:
986         * bindings/scripts/CodeGeneratorObjC.pm:
987         * ksvg2/svg/SVGNumber.idl:
988         * ksvg2/svg/SVGPoint.idl:
989         * ksvg2/svg/SVGRect.idl:
990
991 2006-12-10  Lars Knoll <lars@trolltech.com>
992
993         Reviewed by Zack
994
995         Fix another issue with frame loading
996
997         * platform/network/qt/ResourceHandleManagerQt.cpp:
998         (WebCore::ResourceHandleManager::cancel):
999         (WebCore::ResourceHandleManager::receivedData):
1000         (WebCore::ResourceHandleManager::receivedFinished):
1001         (WebCore::FileLoader::request):
1002         * platform/qt/FrameQtClient.cpp:
1003         (WebCore::FrameQtClient::openURL):
1004
1005 2006-12-10  George Staikos  <staikos@kde.org.
1006
1007         Reviewed by Zack.
1008
1009         Make the xpath grammar hack more specific (and work on OS X) until
1010         it's cleaned up.
1011
1012         * WebCore.pro:
1013
1014 2006-12-10  Zack Rusin  <zack@kde.org>
1015
1016         Set the widgetclient correctly. This code
1017         should be platform independent!
1018
1019         * platform/qt/WidgetQt.cpp:
1020         (WebCore::WidgetPrivate::WidgetPrivate):
1021         (WebCore::Widget::setClient):
1022         (WebCore::Widget::client):
1023         (WebCore::Widget::focusPolicy):
1024
1025 2006-12-11  Lars Knoll <lars@trolltech.com>
1026
1027         Reviewed by Zack
1028
1029         Fix loading of local files.
1030
1031         * platform/network/qt/ResourceHandleManagerQt.cpp:
1032         (WebCore::FileLoader::request):
1033
1034 2006-12-10  Zack Rusin  <zack@kde.org>
1035
1036        Don't use my QTransform magic, affine QMatrix is fine for
1037        SVG so use setMatrix.
1038
1039         * platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp:
1040         (WebCore::SVGPaintServerLinearGradient::setup):
1041         * platform/graphics/svg/qt/SVGPaintServerRadialGradientQt.cpp:
1042         (WebCore::setup):
1043
1044 2006-12-10  Lars Knoll <lars@trolltech.com>
1045
1046         Reviewed by Zack
1047
1048         Make sure we call checkCompleted() on the FrameLoader
1049         to get the regression tests running.
1050
1051         * WebCore.pro:
1052         * loader/qt/FrameLoaderQt.cpp:
1053         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
1054         (WebCore::FrameLoader::saveDocumentState):
1055         * page/qt/EventHandlerQt.cpp:
1056         (WebCore::EventHandler::handleDrag):
1057         * platform/qt/FrameQtClient.cpp:
1058         (WebCore::FrameQtClient::openURL):
1059         (WebCore::FrameQtClient::didReceiveResponse):
1060         (WebCore::FrameQtClient::didFinishLoading):
1061         (WebCore::FrameQtClient::didFail):
1062         * platform/qt/FrameQtClient.h:
1063
1064 2006-12-10  Zack Rusin  <zack@kde.org>
1065
1066         Enable the SVG build by default and make it build.
1067
1068         * WebCore.pro:
1069         * loader/qt/FrameLoaderQt.cpp: Output the method name
1070
1071 2006-12-10  Zack Rusin  <zack@kde.org>
1072
1073         Move the client classes to WebKitQt/WebCoreSupport.
1074
1075         * WebCore.pro:
1076         * loader/qt/FrameLoaderClientQt.cpp: Removed.
1077         * loader/qt/FrameLoaderClientQt.h: Removed.
1078         * platform/qt/ChromeClientQt.cpp: Removed.
1079         * platform/qt/ChromeClientQt.h: Removed.
1080         * platform/qt/ContextMenuClientQt.cpp: Removed.
1081         * platform/qt/ContextMenuClientQt.h: Removed.
1082         * platform/qt/EditorClientQt.cpp: Removed.
1083         * platform/qt/EditorClientQt.h: Removed.
1084
1085 2006-12-10  Lars Knoll <lars@trolltech.com>
1086
1087         Reviewed by Zack.
1088
1089         Add some stubs required to link.
1090
1091         * platform/qt/FrameQt.cpp:
1092         (WebCore::FrameQt::runJavaScriptAlert):
1093         (WebCore::FrameQt::runJavaScriptConfirm):
1094         (WebCore::FrameQt::runJavaScriptPrompt):
1095         (WebCore::FrameQt::bindingRootObject):
1096
1097 2006-12-10  Rob Buis  <buis@kde.org>
1098
1099         Reviewed by Darin.
1100
1101         http://bugs.webkit.org/show_bug.cgi?id=10996
1102         WebKit needs (possibly private) XML/SVG innerText support (for DumpRenderTree)
1103
1104         Create an internal method to create innerText functionality for non-HTML
1105         nodes. When called from DRT this omits CDATA nodes.
1106
1107         * dom/Element.cpp:
1108         (WebCore::Element::innerText):
1109         (WebCore::Element::outerText):
1110         * dom/Element.h:
1111         * dom/Element.idl:
1112         * html/HTMLElement.cpp:
1113         * html/HTMLElement.h:
1114
1115 2006-12-10  MorganL  <morganl.webkit@yahoo.com>
1116
1117         Reviewed by Maciej.
1118
1119         Fixes http://bugs.webkit.org/show_bug.cgi?id=11790
1120         No way to initialize ResourceResponse::m_httpHeaderFields
1121
1122         * platform/network/ResourceResponse.cpp: impl setHTTPHeaderField
1123         (WebCore::ResourceResponse::setHTTPHeaderField):
1124         * platform/network/ResourceResponse.h: decl setHTTPHeaderField
1125
1126 2006-12-10  Zack Rusin  <zack@kde.org>
1127
1128         Cleaning up the code after removals.
1129
1130         * platform/qt/FrameQt.cpp:
1131         * platform/qt/FrameQt.h: Remove virtual methods
1132         which have been moved to different objects
1133
1134 2006-12-10  Zack Rusin  <zack@kde.org>
1135
1136         Cleanup the FrameQtClient a little bit more. Remove
1137         unused methods.
1138
1139         * platform/qt/FrameQtClient.cpp:
1140         * platform/qt/FrameQtClient.h:
1141
1142 2006-12-09  Adam Roben  <aroben@apple.com>
1143
1144         Build fix.
1145
1146         * xml/XPathParser.cpp:
1147         (WebCore::XPath::charCat): Use C++ unsigned instead of uint.
1148
1149 2006-12-09  George Staikos  <staikos@kde.org>
1150
1151         Reviewed by Zack.
1152
1153         Make it not crash, and make it set the title on Qt platform.
1154
1155         * loader/qt/FrameLoaderClientQt.cpp:
1156         (WebCore::FrameLoaderClientQt::hasWebView):
1157         (WebCore::FrameLoaderClientQt::hasFrameView):
1158         (WebCore::FrameLoaderClientQt::didChangeTitle):
1159         * loader/qt/FrameLoaderQt.cpp:
1160         (WebCore::FrameLoader::setTitle):
1161         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
1162
1163 2006-12-10  Zack Rusin  <zack@kde.org>
1164
1165         Renaming FrameQtClientDefault to FrameQtClient.
1166         Removing FrameQtClient. Adding FrameLoaderClient
1167         as an argument. Clenaing up the code a bit.
1168
1169         * platform/qt/FrameQt.cpp:
1170         (WebCore::FrameQt::FrameQt):
1171         * platform/qt/FrameQt.h:
1172         * platform/qt/FrameQtClient.cpp:
1173         (WebCore::FrameQtClient::FrameQtClient):
1174         (WebCore::FrameQtClient::~FrameQtClient):
1175         (WebCore::FrameQtClient::setFrame):
1176         (WebCore::FrameQtClient::openURL):
1177         (WebCore::FrameQtClient::submitForm):
1178         (WebCore::FrameQtClient::checkLoaded):
1179         (WebCore::FrameQtClient::runJavaScriptAlert):
1180         (WebCore::FrameQtClient::runJavaScriptConfirm):
1181         (WebCore::FrameQtClient::runJavaScriptPrompt):
1182         (WebCore::FrameQtClient::menubarVisible):
1183         (WebCore::FrameQtClient::toolbarVisible):
1184         (WebCore::FrameQtClient::statusbarVisible):
1185         (WebCore::FrameQtClient::personalbarVisible):
1186         (WebCore::FrameQtClient::locationbarVisible):
1187         (WebCore::FrameQtClient::loadFinished):
1188         (WebCore::FrameQtClient::didReceiveResponse):
1189         (WebCore::FrameQtClient::didFinishLoading):
1190         (WebCore::FrameQtClient::didFail):
1191         (WebCore::FrameQtClient::didReceiveData):
1192         (WebCore::FrameQtClient::traverseNextFrameStayWithin):
1193         (WebCore::FrameQtClient::numPendingOrLoadingRequests):
1194         (WebCore::FrameQtClient::receivedAllData):
1195         (WebCore::FrameQtClient::setTitle):
1196         * platform/qt/FrameQtClient.h:
1197
1198 2006-12-10  Zack Rusin  <zack@kde.org>
1199
1200         Fixes compilation after the last removals.
1201
1202         * WebCore.pro:
1203
1204 2006-12-10  Lars Knoll <lars@trolltech.com>
1205
1206         Reviewed by Zack.
1207
1208         Implement a decent network loader using QHttp.
1209
1210         * loader/qt/FrameLoaderQt.cpp:
1211         (WebCore::FrameLoader::load):
1212         * platform/network/ResourceHandle.cpp:
1213         (WebCore::ResourceHandle::request):
1214         * platform/network/ResourceHandle.h:
1215         * platform/network/ResourceHandleInternal.h:
1216         * platform/network/qt/ResourceHandleManager.cpp: Removed.
1217         * platform/network/qt/ResourceHandleManager.h: Removed.
1218         * platform/network/qt/ResourceHandleManagerKDE.cpp: Added.
1219         (WebCore::ResourceHandleManager::self):
1220         (WebCore::ResourceHandleManager::ResourceHandleManager):
1221         (WebCore::ResourceHandleManager::~ResourceHandleManager):
1222         (WebCore::ResourceHandleManager::slotData):
1223         (WebCore::ResourceHandleManager::slotMimetype):
1224         (WebCore::ResourceHandleManager::slotResult):
1225         (WebCore::ResourceHandleManager::remove):
1226         (WebCore::ResourceHandleManager::add):
1227         (WebCore::ResourceHandleManager::cancel):
1228         * platform/network/qt/ResourceHandleManagerKDE.h: Added.
1229         * platform/network/qt/ResourceHandleManagerQt.cpp: Added.
1230         (WebCore::ResourceHandleManager::ResourceHandleManager):
1231         (WebCore::ResourceHandleManager::~ResourceHandleManager):
1232         (WebCore::ResourceHandleManager::self):
1233         (WebCore::RequestQt::RequestQt):
1234         (WebCore::ResourceHandleManager::add):
1235         (WebCore::ResourceHandleManager::cancel):
1236         (WebCore::ResourceHandleManager::receivedResponse):
1237         (WebCore::ResourceHandleManager::receivedData):
1238         (WebCore::ResourceHandleManager::receivedFinished):
1239         (WebCore::LoaderThread::LoaderThread):
1240         (WebCore::LoaderThread::run):
1241         (WebCore::FileLoader::FileLoader):
1242         (WebCore::FileLoader::request):
1243         (WebCore::FileLoader::cancel):
1244         (WebCore::WebCoreHttp::WebCoreHttp):
1245         (WebCore::WebCoreHttp::~WebCoreHttp):
1246         (WebCore::WebCoreHttp::request):
1247         (WebCore::WebCoreHttp::scheduleNextRequest):
1248         (WebCore::WebCoreHttp::getConnection):
1249         (WebCore::WebCoreHttp::onResponseHeaderReceived):
1250         (WebCore::WebCoreHttp::onReadyRead):
1251         (WebCore::WebCoreHttp::onRequestFinished):
1252         (WebCore::WebCoreHttp::onStateChanged):
1253         (WebCore::WebCoreHttp::cancel):
1254         (WebCore::qHash):
1255         (WebCore::operator==):
1256         (WebCore::HostInfo::HostInfo):
1257         (WebCore::NetworkLoader::NetworkLoader):
1258         (WebCore::NetworkLoader::~NetworkLoader):
1259         (WebCore::NetworkLoader::request):
1260         (WebCore::NetworkLoader::connectionClosed):
1261         (WebCore::NetworkLoader::cancel):
1262         * platform/network/qt/ResourceHandleManagerQt.h: Added.
1263         (WebCore::LoaderThread::):
1264         (WebCore::LoaderThread::waitForSetup):
1265         * platform/network/qt/ResourceHandleQt.cpp:
1266         (WebCore::ResourceHandle::start):
1267         * platform/qt/FrameQt.cpp:
1268         (WebCore::FrameQt::FrameQt):
1269         (WebCore::FrameQt::keyEvent):
1270         * platform/qt/FrameQt.h:
1271         * platform/qt/FrameQtClient.cpp:
1272         (WebCore::FrameQtClientDefault::FrameQtClientDefault):
1273         (WebCore::FrameQtClientDefault::openURL):
1274         (WebCore::FrameQtClientDefault::submitForm):
1275         (WebCore::FrameQtClientDefault::didReceiveResponse):
1276         (WebCore::FrameQtClientDefault::didFinishLoading):
1277         (WebCore::FrameQtClientDefault::didFail):
1278         (WebCore::FrameQtClientDefault::didReceiveData):
1279         (WebCore::FrameQtClientDefault::receivedAllData):
1280         (WebCore::FrameQtClientDefault::setTitle):
1281         * platform/qt/FrameQtClient.h:
1282
1283 2006-12-09  George Staikos  <staikos@kde.org>
1284
1285         Reviewed by Zack.
1286
1287         Fix bison again on qmake build.
1288
1289         * WebCore.pro:
1290
1291 2006-12-09  Zack Rusin  <zack@kde.org>
1292
1293         Reviewed by Zack.
1294
1295         Use the correct filename.
1296
1297         * WebCore.pro: it's PasteboardQt.cpp
1298
1299 2006-12-09  Zack Rusin  <zack@kde.org>
1300
1301         Reviewed by Lars.
1302
1303         Correctly set the font on widgets.
1304
1305         * platform/qt/WidgetQt.cpp:
1306         (WebCore::Widget::setFont):
1307
1308 2006-12-09  Adam Treat  <treat@kde.org>
1309
1310         Reviewed by Zack
1311
1312         No more nil renderer warnings
1313
1314         * platform/qt/ScrollViewCanvasQt.cpp:
1315         (WebCore::ScrollViewCanvasQt::paintEvent):
1316
1317 2006-12-09  Friedemann Kleint  <fkleint@trolltech.com>
1318
1319         Reviewed by Zack
1320
1321         Removed compiler warnings about rounding issues
1322
1323         * platform/qt/FontPlatformDataQt.cpp:
1324         (WebCore::FontPlatformData::FontPlatformData):
1325         * platform/qt/FontQt.cpp:
1326         (WebCore::Font::drawComplexText):
1327
1328 2006-12-09  George Staikos <staikos@kde.org>
1329
1330         Reviewed by Zack.
1331
1332         Qt 4.1 (especially Qtopia) build fixes
1333
1334         * platform/qt/FrameQtClient.cpp:
1335         * platform/qt/GraphicsContextQt.cpp:
1336         * platform/qt/PlatformKeyboardEventQt.cpp:
1337         * platform/qt/CursorQt.cpp:
1338         * platform/qt/WidgetQt.cpp:
1339         * platform/Cursor.h:
1340         * platform/Arena.h:
1341
1342 2006-12-09  Lars Knoll <lars@trolltech.com>
1343
1344         Reviewed by Zack
1345
1346         Make it possible to build WebKit with qmake.
1347
1348         * WebCore.pro: Added.
1349         * platform/graphics/qt/GraphicsContextQt.cpp:
1350
1351 2006-12-10  Lars Knoll <lars@trolltech.com>
1352
1353         Reviewed by Zack.
1354
1355         Compile after latest WebKit changes and don't depend
1356         on deprecated methods in Qt.
1357
1358         * platform/network/qt/ResourceHandleManager.cpp:
1359         (WebCore::ResourceHandleManager::remove):
1360         (WebCore::ResourceHandleManager::deliverJobData):
1361         * platform/network/qt/ResourceHandleQt.cpp:
1362         (WebCore::ResourceHandle::extractCharsetFromHeaders):
1363         * platform/qt/PlatformKeyboardEventQt.cpp:
1364         (WebCore::windowsKeyCodeForKeyEvent):
1365
1366 2006-12-10  Lars Knoll <lars@trolltech.com>
1367
1368         Reviewed by Zack.
1369
1370         Use the Qt image loading framework.
1371
1372         * CMakeLists.txt:
1373         * platform/graphics/ImageSource.h:
1374         * platform/graphics/qt/GraphicsContextQt.cpp:
1375         * platform/graphics/qt/ImageDecoderQt.cpp: Added.
1376         (WebCore::ImageDecoderQt::ImageData::ImageData):
1377         (WebCore::ImageDecoderQt::ReadContext::):
1378         (WebCore::ImageDecoderQt::ReadContext::ReadContext):
1379         (WebCore::ImageDecoderQt::ReadContext::read):
1380         (WebCore::ImageDecoderQt::ReadContext::readImageLines):
1381         (WebCore::ImageDecoderQt::ImageDecoderQt):
1382         (WebCore::ImageDecoderQt::~ImageDecoderQt):
1383         (WebCore::ImageDecoderQt::hasFirstImageHeader):
1384         (WebCore::ImageDecoderQt::reset):
1385         (WebCore::ImageDecoderQt::setData):
1386         (WebCore::ImageDecoderQt::isSizeAvailable):
1387         (WebCore::ImageDecoderQt::frameCount):
1388         (WebCore::ImageDecoderQt::repetitionCount):
1389         (WebCore::ImageDecoderQt::ImageDecoderQt::supportsAlpha):
1390         (WebCore::ImageDecoderQt::duration):
1391         (WebCore::ImageDecoderQt::frameBufferAtIndex):
1392         (WebCore::ImageDecoderQt::imageAtIndex):
1393         * platform/graphics/qt/ImageDecoderQt.h: Added.
1394         (WebCore::ImageDecoderQt::):
1395         * platform/graphics/qt/ImageSourceQt.cpp:
1396         (WebCore::):
1397         (WebCore::detectImageFormat):
1398         (WebCore::createDecoder):
1399         (WebCore::ImageSource::setData):
1400         (WebCore::ImageSource::createFrameAtIndex):
1401         (WebCore::ImageSource::frameDurationAtIndex):
1402         (WebCore::ImageSource::frameHasAlphaAtIndex):
1403
1404 2006-12-09  Lars Knoll  <lars@trolltech.com>
1405
1406         Reviewed by Maciej.
1407
1408         Remove an explicit ICU dependency.
1409
1410         * xml/XPathParser.cpp:
1411         (WebCore::XPath::charCat):
1412
1413 2006-12-09  Zack Rusin  <zack@kde.org>
1414
1415         Adjusting the build after the icu changes.
1416
1417         * CMakeLists.txt:
1418
1419 2006-12-09  Adam Roben  <aroben@apple.com>
1420
1421         Reviewed by Darin.
1422
1423         Changed all ForwardingHeaders to use #include instead of #import.
1424
1425         * ForwardingHeaders/kjs/JSLock.h:
1426         * ForwardingHeaders/kjs/SavedBuiltins.h:
1427         * ForwardingHeaders/kjs/collector.h:
1428         * ForwardingHeaders/kjs/dtoa.h:
1429         * ForwardingHeaders/kjs/internal.h:
1430         * ForwardingHeaders/kjs/interpreter.h:
1431         * ForwardingHeaders/kjs/lookup.h:
1432         * ForwardingHeaders/kjs/object.h:
1433         * ForwardingHeaders/kjs/property_map.h:
1434         * ForwardingHeaders/kjs/protect.h:
1435         * ForwardingHeaders/wtf/AlwaysInline.h:
1436         * ForwardingHeaders/wtf/Assertions.h:
1437         * ForwardingHeaders/wtf/FastMalloc.h:
1438         * ForwardingHeaders/wtf/GetPtr.h:
1439         * ForwardingHeaders/wtf/HashCountedSet.h:
1440         * ForwardingHeaders/wtf/HashMap.h:
1441         * ForwardingHeaders/wtf/HashSet.h:
1442         * ForwardingHeaders/wtf/HashTraits.h:
1443         * ForwardingHeaders/wtf/MathExtras.h:
1444         * ForwardingHeaders/wtf/Noncopyable.h:
1445         * ForwardingHeaders/wtf/OwnArrayPtr.h:
1446         * ForwardingHeaders/wtf/OwnPtr.h:
1447         * ForwardingHeaders/wtf/PassRefPtr.h:
1448         * ForwardingHeaders/wtf/Platform.h:
1449         * ForwardingHeaders/wtf/RefPtr.h:
1450         * ForwardingHeaders/wtf/Vector.h:
1451
1452 2006-12-09  Rob Buis  <buis@kde.org>
1453
1454         Reviewed by Darin.
1455
1456         http://bugs.webkit.org/show_bug.cgi?id=11625
1457         Investigate possibility to share code between HTMLStyleElement and SVGStyleElement
1458
1459         Add a class shared by both HTMLStyleElement and SVGStyleElement that
1460         encapsulates the common logic.
1461
1462         * CMakeLists.txt:
1463         * WebCore.xcodeproj/project.pbxproj:
1464         * dom/Document.cpp:
1465         (WebCore::Document::recalcStyleSelector):
1466         Generalize stylesheet processing of svg and html.
1467
1468         * dom/StyleElement.cpp: Added.
1469         (WebCore::StyleElement::StyleElement):
1470         (WebCore::StyleElement::sheet):
1471         (WebCore::StyleElement::insertedIntoDocument):
1472         (WebCore::StyleElement::removedFromDocument):
1473         (WebCore::StyleElement::childrenChanged):
1474         * dom/StyleElement.h: Added.
1475         (WebCore::StyleElement::~StyleElement):
1476         (WebCore::StyleElement::isLoading):
1477         Common base class for SVGStyleElement and HTMLStyleElement.
1478
1479         * html/HTMLStyleElement.cpp:
1480         (WebCore::HTMLStyleElement::HTMLStyleElement):
1481         (WebCore::HTMLStyleElement::parseMappedAttribute):
1482         (WebCore::HTMLStyleElement::insertedIntoDocument):
1483         (WebCore::HTMLStyleElement::removedFromDocument):
1484         (WebCore::HTMLStyleElement::childrenChanged):
1485         (WebCore::HTMLStyleElement::media):
1486         (WebCore::HTMLStyleElement::setMedia):
1487         (WebCore::HTMLStyleElement::type):
1488         (WebCore::HTMLStyleElement::setType):
1489         * html/HTMLStyleElement.h:
1490         Use new common class.
1491
1492         * ksvg2/svg/SVGElement.cpp:
1493         * ksvg2/svg/SVGElement.h:
1494         * ksvg2/svg/SVGSVGElement.cpp:
1495         (WebCore::SVGSVGElement::contentScriptType):
1496         (WebCore::SVGSVGElement::contentStyleType):
1497         * ksvg2/svg/SVGSVGElement.h:
1498         Do not use tryGetAttribute(NS) anymore.
1499
1500         * ksvg2/svg/SVGStyleElement.cpp:
1501         (WebCore::SVGStyleElement::SVGStyleElement):
1502         (WebCore::SVGStyleElement::xmlspace):
1503         (WebCore::SVGStyleElement::type):
1504         (WebCore::SVGStyleElement::media):
1505         (WebCore::SVGStyleElement::title):
1506         (WebCore::SVGStyleElement::insertedIntoDocument):
1507         (WebCore::SVGStyleElement::removedFromDocument):
1508         (WebCore::SVGStyleElement::childrenChanged):
1509         * ksvg2/svg/SVGStyleElement.h:
1510         Use new common class.
1511
1512 2006-12-08  David Hyatt  <hyatt@apple.com>
1513
1514         Land the new ICU abstraction layer (WTF::Unicode).  Patch
1515         by Lars with a couple of fixes thrown in by me.
1516
1517         Reviewed by hyatt
1518
1519         * ForwardingHeaders/wtf/icu/UnicodeIcu.h: Added.
1520         * ForwardingHeaders/wtf/unicode/Unicode.h: Added.
1521         * WebCore.xcodeproj/project.pbxproj:
1522         * css/cssparser.cpp:
1523         (WebCore::ParseString::lower):
1524         * dom/Document.cpp:
1525         (WebCore::isValidNameStart):
1526         (WebCore::isValidNamePart):
1527         * editing/TextIterator.cpp:
1528         (WebCore::CircularSearchBuffer::append):
1529         * html/HTMLFontElement.cpp:
1530         (WebCore::parseFontSizeNumber):
1531         * html/HTMLInputElement.cpp:
1532         (WebCore::numGraphemeClusters):
1533         (WebCore::numCharactersInGraphemeClusters):
1534         * html/HTMLSelectElement.cpp:
1535         (WebCore::stripLeadingWhiteSpace):
1536         * page/Frame.h:
1537         * platform/DeprecatedString.h:
1538         (WebCore::DeprecatedChar::isSpace):
1539         (WebCore::DeprecatedChar::lower):
1540         (WebCore::DeprecatedChar::upper):
1541         * platform/Font.cpp:
1542         (WebCore::WidthIterator::advance):
1543         (WebCore::WidthIterator::normalizeVoicingMarks):
1544         * platform/FontCache.h:
1545         * platform/FontData.h:
1546         * platform/GlyphMap.cpp:
1547         * platform/GlyphMap.h:
1548         * platform/GlyphWidthMap.h:
1549         * platform/KURL.cpp:
1550         (WebCore::encodeHostname):
1551         * platform/StringHash.h:
1552         (WTF::):
1553         * platform/StringImpl.cpp:
1554         (WebCore::isSpace):
1555         (WebCore::parseLength):
1556         (WebCore::StringImpl::isLower):
1557         (WebCore::StringImpl::lower):
1558         (WebCore::StringImpl::upper):
1559         (WebCore::StringImpl::secure):
1560         (WebCore::StringImpl::foldCase):
1561         (WebCore::StringImpl::capitalize):
1562         (WebCore::StringImpl::toInt):
1563         (WebCore::equalIgnoringCase):
1564         (WebCore::StringImpl::find):
1565         * platform/StringImpl.h:
1566         * platform/TextBoundaries.h:
1567         * platform/TextBreakIterator.h: Added.
1568         (WebCore::):
1569         * platform/TextBreakIteratorICU.cpp: Added.
1570         (WebCore::wordBreakIterator):
1571         (WebCore::characterBreakIterator):
1572         (WebCore::textBreakFirst):
1573         (WebCore::textBreakNext):
1574         (WebCore::textBreakPreceding):
1575         (WebCore::textBreakFollowing):
1576         (WebCore::textBreakCurrent):
1577         * platform/TextCodec.h:
1578         * platform/TextCodecLatin1.cpp:
1579         * platform/TextEncoding.cpp:
1580         (WebCore::TextEncoding::encode):
1581         * platform/TextEncoding.h:
1582         * platform/TextEncodingRegistry.cpp:
1583         (WebCore::buildTextEncodingNameMap):
1584         (WebCore::buildTextCodecMap):
1585         * platform/TextEncodingRegistry.h:
1586         * platform/UChar.h: Removed.
1587         * platform/graphics/GraphicsContext.h:
1588         * platform/qt/GlyphMapQt.cpp:
1589         * platform/qt/TextBreakIteratorQt.cpp: Added.
1590         (WebCore::TextBreakIterator::following):
1591         (WebCore::TextBreakIterator::preceding):
1592         (WebCore::WordBreakIteratorQt::first):
1593         (WebCore::WordBreakIteratorQt::next):
1594         (WebCore::WordBreakIteratorQt::previous):
1595         (WebCore::CharBreakIteratorQt::first):
1596         (WebCore::CharBreakIteratorQt::next):
1597         (WebCore::CharBreakIteratorQt::previous):
1598         (WebCore::wordBreakIterator):
1599         (WebCore::characterBreakIterator):
1600         (WebCore::textBreakFirst):
1601         (WebCore::textBreakNext):
1602         (WebCore::textBreakPreceding):
1603         (WebCore::textBreakFollowing):
1604         (WebCore::textBreakCurrent):
1605         * platform/qt/TextCodecQt.cpp: Added.
1606         (WebCore::getAtomicName):
1607         (WebCore::TextCodecQt::registerEncodingNames):
1608         (WebCore::newTextCodecQt):
1609         (WebCore::TextCodecQt::registerCodecs):
1610         (WebCore::TextCodecQt::TextCodecQt):
1611         (WebCore::TextCodecQt::~TextCodecQt):
1612         (WebCore::TextCodecQt::decode):
1613         (WebCore::TextCodecQt::encode):
1614         * platform/qt/TextCodecQt.h: Added.
1615         * rendering/RenderBlock.cpp:
1616         (WebCore::RenderBlock::updateFirstLetter):
1617         * rendering/RenderText.cpp:
1618         (WebCore::RenderText::previousOffset):
1619         (WebCore::RenderText::nextOffset):
1620         (WebCore::RenderText::widthFromCache):
1621         * rendering/RenderText.h:
1622         * rendering/bidi.cpp:
1623         (WebCore::BidiState::BidiState):
1624         (WebCore::BidiContext::BidiContext):
1625         (WebCore::bidiNext):
1626         (WebCore::bidiFirst):
1627         (WebCore::BidiIterator::direction):
1628         (WebCore::appendRun):
1629         (WebCore::embed):
1630         (WebCore::RenderBlock::computeHorizontalPositionsForLine):
1631         (WebCore::RenderBlock::bidiReorderLine):
1632         (WebCore::RenderBlock::layoutInlineChildren):
1633         * rendering/bidi.h:
1634         (WebCore::BidiStatus::BidiStatus):
1635         (WebCore::BidiContext::dir):
1636         (WebCore::BidiContext::basicDir):
1637         (WebCore::BidiRun::BidiRun):
1638         * rendering/break_lines.h:
1639
1640 2006-12-08  Adam Roben  <aroben@apple.com>
1641
1642         Rolling out r17865 because it caused a performance regression.
1643
1644         * loader/TextResourceDecoder.cpp:
1645         (WebCore::findXMLEncoding):
1646         * platform/CString.cpp:
1647         (WebCore::CString::data):
1648         * platform/CString.h:
1649         * platform/TextStream.cpp:
1650         (WebCore::TextStream::operator<<):
1651         * platform/TextStream.h:
1652
1653 2006-12-08  Zack Rusin  <zack@kde.org>
1654
1655         Reviewed by Maciej.
1656
1657         Fix the Qt/KDE build after all the API changes.
1658
1659         * CMakeLists.txt:
1660         * editing/qt/EditorQt.cpp: Added.
1661         (WebCore::Editor::newGeneralClipboard):
1662         (WebCore::Editor::ignoreSpelling):
1663         (WebCore::Editor::learnSpelling):
1664         (WebCore::Editor::advanceToNextMisspelling):
1665         (WebCore::Editor::isSelectionMisspelled):
1666         (WebCore::Editor::isSelectionUngrammatical):
1667         (WebCore::Editor::guessesForUngrammaticalSelection):
1668         (WebCore::Editor::guessesForMisspelledSelection):
1669         (WebCore::Editor::markMisspellingsInAdjacentWords):
1670         (WebCore::Editor::markMisspellings):
1671         * loader/NavigationAction.h:
1672         * loader/qt/FrameLoaderClientQt.cpp:
1673         (WebCore::FrameLoaderClientQt::frameLoaderDestroyed):
1674         (WebCore::FrameLoaderClientQt::canHandleRequest):
1675         * loader/qt/FrameLoaderClientQt.h:
1676         * loader/qt/FrameLoaderQt.cpp:
1677         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
1678         (WebCore::FrameLoader::load):
1679         * loader/qt/ResourceLoaderQt.cpp:
1680         * platform/ContextMenu.h:
1681         * platform/graphics/qt/GraphicsContextQt.cpp:
1682         * platform/graphics/qt/PathQt.cpp:
1683         (WebCore::Path::addArc):
1684         * platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp:
1685         (WebCore::SVGPaintServerLinearGradient::setup):
1686         * platform/graphics/svg/qt/SVGPaintServerRadialGradientQt.cpp:
1687         (WebCore::setup):
1688         * platform/network/ResourceHandle.h:
1689         (WebCore::ResourceHandle::getInternal):
1690         * platform/network/ResourceHandleInternal.h:
1691         * platform/network/qt/ResourceHandleManager.cpp:
1692         (WebCore::ResourceHandleManager::slotData):
1693         (WebCore::ResourceHandleManager::remove):
1694         * platform/network/qt/ResourceHandleQt.cpp:
1695         (WebCore::ResourceHandle::~ResourceHandle):
1696         (WebCore::ResourceHandle::start):
1697         * platform/qt/ChromeClientQt.cpp:
1698         (WebCore::ChromeClientQt::addMessageToConsole):
1699         (WebCore::ChromeClientQt::chromeDestroyed):
1700         * platform/qt/ChromeClientQt.h:
1701         * platform/qt/ContextMenuClientQt.cpp:
1702         (WebCore::ContextMenuClientQt::copyLinkToClipboard):
1703         (WebCore::ContextMenuClientQt::downloadURL):
1704         (WebCore::ContextMenuClientQt::copyImageToClipboard):
1705         (WebCore::ContextMenuClientQt::contextMenuDestroyed):
1706         (WebCore::ContextMenuClientQt::contextMenuItemSelected):
1707         * platform/qt/ContextMenuClientQt.h:
1708         * platform/qt/ContextMenuItemQt.cpp: Added.
1709         (WebCore::ContextMenuItem::ContextMenuItem):
1710         (WebCore::ContextMenuItem::~ContextMenuItem):
1711         (WebCore::ContextMenuItem::platformDescription):
1712         (WebCore::ContextMenuItem::action):
1713         (WebCore::ContextMenuItem::title):
1714         (WebCore::ContextMenuItem::setAction):
1715         (WebCore::ContextMenuItem::setTitle):
1716         (WebCore::ContextMenuItem::setSubMenu):
1717         * platform/qt/ContextMenuQt.cpp:
1718         (WebCore::ContextMenu::ContextMenu):
1719         (WebCore::ContextMenu::~ContextMenu):
1720         (WebCore::ContextMenu::appendItem):
1721         (WebCore::ContextMenu::itemCount):
1722         (WebCore::ContextMenu::insertItem):
1723         (WebCore::ContextMenu::setPlatformDescription):
1724         * platform/qt/CursorQt.cpp:
1725         (WebCore::copyCursor):
1726         * platform/qt/EditorClientQt.cpp:
1727         (WebCore::EditorClientQt::shouldInsertNode):
1728         (WebCore::WebCore::EditorClientQt::pageDestroyed):
1729         (WebCore::EditorClientQt::smartInsertDeleteEnabled):
1730         * platform/qt/EditorClientQt.h:
1731         * platform/qt/FrameQt.cpp:
1732         (WebCore::FrameQt::FrameQt):
1733         (WebCore::FrameQt::keyEvent):
1734         * platform/qt/FrameQt.h:
1735         * platform/qt/FrameQtClient.cpp:
1736         (WebCore::FrameQtClientDefault::openURL):
1737         (WebCore::FrameQtClientDefault::submitForm):
1738         * platform/qt/LoaderFunctionsQt.cpp:
1739         * platform/qt/PasteboardQt.cpp: Added.
1740         (WebCore::Pasteboard::Pasteboard):
1741         (WebCore::Pasteboard::generalPasteboard):
1742         (WebCore::Pasteboard::clearTypes):
1743         (WebCore::Pasteboard::writeSelection):
1744         (WebCore::Pasteboard::canSmartReplace):
1745         (WebCore::Pasteboard::plainText):
1746         (WebCore::Pasteboard::documentFragment):
1747
1748 === Safari-521.32 ===
1749
1750 2006-12-08  Rob Buis  <buis@kde.org>
1751
1752         Reviewed by Maciej.
1753
1754         http://bugs.webkit.org/show_bug.cgi?id=10188
1755         Form elements added via appendChild() are not accessible via form.element
1756
1757         Make sure looking up form elements works when the form is not appended
1758         to the document.
1759
1760         * html/HTMLFormElement.cpp:
1761         (WebCore::HTMLFormElement::registerFormElement):
1762
1763 2006-12-08  Rob Buis  <buis@kde.org>
1764
1765         Reviewed by Adele.
1766
1767         http://bugs.webkit.org/show_bug.cgi?id=11765
1768         REGRESSION: Clicking on a select with size other than 1 and no children results in a crash
1769
1770         Make sure returned value is -1 for selects without children.
1771
1772         * rendering/RenderListBox.cpp:
1773         (WebCore::RenderListBox::listIndexAtOffset):
1774
1775 2006-12-08  Adam Roben  <aroben@apple.com>
1776
1777         Reviewed by Anders.
1778
1779         This is a mo' better fix for ensuring we don't use macro definitions
1780         of min/max.
1781
1782         * config.h:
1783
1784 2006-12-08  Don Gibson  <dgibson77@gmail.com>
1785
1786         Reviewed and landed by Alexey.
1787
1788         http://bugs.webkit.org/show_bug.cgi?id=11759:
1789         Windows build bustage
1790
1791         * WebCore.vcproj/WebCore/WebCore.vcproj:
1792         * bridge/win/ContextMenuClientWin.h:
1793         * bridge/win/FrameWin.h:
1794         * loader/win/FrameLoaderWin.cpp:
1795         (WebCore::FrameLoader::submitForm):
1796         * platform/network/win/ResourceHandleWin.cpp:
1797         (WebCore::ResourceHandle::onRequestComplete):
1798         (WebCore::ResourceHandle::fileLoadTimer):
1799         (WebCore::ResourceHandle::cancel):
1800         * platform/win/MouseEventWin.cpp:
1801         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1802         * platform/win/TemporaryLinkStubs.cpp:
1803         (WebCore::fileButtonChooseFileLabel):
1804         (WebCore::inputElementAltText):
1805         (WebCore::copyCursor):
1806         (WebCore::resetButtonDefaultLabel):
1807         (WebCore::ContextMenuClientWin::contextMenuItemSelected):
1808         (WebCore::ContextMenuClientWin::copyLinkToClipboard):
1809         (WebCore::ContextMenuClientWin::downloadURL):
1810         (WebCore::ContextMenuClientWin::copyImageToClipboard):
1811         (WebCore::Editor::ignoreSpelling):
1812         (WebCore::Editor::learnSpelling):
1813         (WebCore::Editor::isSelectionUngrammatical):
1814         (WebCore::Editor::isSelectionMisspelled):
1815         (WebCore::Editor::guessesForMisspelledSelection):
1816         (WebCore::Editor::guessesForUngrammaticalSelection):
1817         (WebCore::Editor::markMisspellingsInAdjacentWords):
1818         (WebCore::FrameLoader::load):
1819         (WebCore::FrameWin::scheduleClose):
1820         (WebCore::FrameWin::respondToChangedSelection):
1821
1822 2006-12-08  Sam Weinig  <sam@webkit.org>
1823
1824         Reviewed by Geoff.
1825
1826         Fix for http://bugs.webkit.org/show_bug.cgi?id=11777
1827         Crash when using XMLSerializer.serializeToString() on
1828         documentless, DocumentType nodes.
1829
1830         Test: fast/dom/XMLSerializer-doctype.html
1831         Test: fast/dom/XMLSerializer-doctype2.html
1832
1833         * dom/DOMImplementation.cpp:
1834         (WebCore::DOMImplementation::createDocument): set the document of the 
1835         DocumentType node to the new document.
1836         * xml/XMLSerializer.cpp: Cleanup.
1837         (WebCore::XMLSerializer::serializeToString): now throws an exception
1838         for documentless nodes. 
1839         * xml/XMLSerializer.h: cleanup
1840         * xml/XMLSerializer.idl: add exception
1841
1842 2006-12-07  Justin Garcia  <justin.garcia@apple.com>
1843
1844         Reviewed by john
1845
1846         <rdar://problem/4836287>
1847         Cannot expand selection out of editable element when containing element is non-editable.
1848
1849         * editing/Selection.cpp:
1850         (WebCore::Selection::adjustForEditableContent): Restrict the selection endpoints
1851         to the same *highest* editable root.  This bug only happened when creating selections
1852         based in an editable region and extending into a higher editable root, so this change 
1853         doesn't expose any new kinds of deletions, but we should start thinking about how
1854         those deletions should behave.
1855         * editing/SelectionController.cpp:
1856         (WebCore::SelectionController::selectAll): Ditto.
1857
1858 2006-12-08  Beth Dakin  <bdakin@apple.com>
1859
1860         Reviewed by Maciej.
1861
1862         Add a new member variable to ContextMenuItem to hold on to the sub-
1863         menu. The new member variable is an OwnPtr<ContextMenu>
1864
1865         * platform/ContextMenu.cpp: Because of the OwnPtr in
1866         ContextMenuItem, we have to separate the declaration of
1867         ContextMenuItems away from the calls to appendItem(). Not doing so
1868         causes a build failure because OwnPtr inherits from Noncopyable.
1869         (WebCore::createFontSubMenu): Same.
1870         (WebCore::createSpellingAndGrammarSubMenu): Same.
1871         (WebCore::createSpellingSubMenu): Same.
1872         (WebCore::createSpeechSubMenu): Same.
1873         (WebCore::createWritingDirectionSubMenu): Same.
1874         (WebCore::ContextMenu::populate): Same.
1875         * platform/ContextMenuItem.h:  New member variable m_subMenu.
1876         * platform/mac/ContextMenuItemMac.mm: Take care of setting
1877         m_subMenu in addition to setting the submenu of the NSMenuItem when
1878         we have a sub-menu.
1879         (WebCore::menuToArray):
1880         (WebCore::ContextMenuItem::ContextMenuItem): Same.
1881         (WebCore::ContextMenuItem::platformSubMenu): Same.
1882         (WebCore::ContextMenuItem::setSubMenu): Same.
1883
1884 2006-12-08  MorganL  <morganl.webkit@yahoo.com>
1885
1886         Reviewed by Darin.
1887
1888         http://bugs.webkit.org/show_bug.cgi?id=11778
1889         CString::data() should be documented as returning a null terminated char array
1890
1891         * platform/CString.h:
1892         Add some basic documentation to CString.h
1893
1894 2006-12-08  Alexey Proskuryakov  <ap@webkit.org>
1895
1896         Reviewed by Geoff.
1897
1898         http://bugs.webkit.org/show_bug.cgi?id=11718
1899         REGRESSION: When I mouse up after dragging a selection outside of a iframe, the iframe
1900         continues to scroll automatically.
1901
1902         Test: manual-tests/autoscroll.html
1903
1904         * manual-tests/autoscroll.html: Added.
1905
1906         * page/EventHandler.cpp:
1907         (WebCore::EventHandler::handleMousePressEvent):
1908         Assign to m_mousePressNode earlier, so that it is available in the superframe as well.
1909         Reset m_mouseDownWasInSubframe to false when starting to handle a mousedown - previously, its value
1910         was only defined if the event was passed down to a widget or a subframe.
1911
1912         (WebCore::EventHandler::stopAutoscrollTimer):
1913         If the mouse down event was in a subframe, stop the subframe's timer.
1914
1915 2006-12-08  Alexey Proskuryakov  <ap@webkit.org>
1916
1917         Reviewed by Geoff.
1918
1919         http://bugs.webkit.org/show_bug.cgi?id=6275
1920         XMLHttpRequest.getResponseHeader should return a null string for non-existent headers
1921
1922         * bindings/js/JSXMLHttpRequest.cpp:
1923         (KJS::JSXMLHttpRequestProtoFunc::callAsFunction):
1924         Convert null getResponseHeader strings to JS null, rather than undefined.
1925
1926 2006-12-08  Alexey Proskuryakov  <ap@webkit.org>
1927
1928         Reviewed by Darin.
1929
1930         http://bugs.webkit.org/show_bug.cgi?id=9854
1931         HTTP Refresh header with quotes is parsed incorrectly
1932
1933         Test: http/tests/misc/redirect-with-quotes.php
1934
1935         * WebCore.xcodeproj/project.pbxproj:
1936         Added HTTPParsers.{h,cpp}. I intend to move Content-Type parsing here, as well.
1937
1938         * dom/Document.cpp:
1939         (WebCore::Document::processHttpEquiv):
1940         * loader/FrameLoader.cpp:
1941         (WebCore::FrameLoader::receivedFirstData):
1942         Use the new implementation in HTTPHeaders.
1943
1944         * platform/network/HTTPParsers.cpp: Added.
1945         (WebCore::skipWhiteSpace):
1946         (WebCore::parseHTTPRefresh):
1947         * platform/network/HTTPParsers.h: Added.
1948         Merged and rewrote existing implementations for better Firefox compatibility.
1949
1950 2006-12-08  Alexey Proskuryakov  <ap@webkit.org>
1951
1952         Reviewed by Tim H.
1953
1954         http://bugs.webkit.org/show_bug.cgi?id=11772
1955         REGRESSION: XMLSerializer.serializeToString incorrect value for CDATA nodes
1956
1957         Test: fast/dom/serialize-cdata.html
1958
1959         * editing/markup.cpp:
1960         (WebCore::startMarkup): Dump CDATA sections, too.
1961
1962 2006-12-08  Mitz Pettel  <mitz@webkit.org>
1963
1964         Reviewed by hyatt.
1965
1966         Deleted misplaced comment.
1967
1968         * rendering/RenderWidget.cpp:
1969
1970 2006-12-08  Rob Buis  <buis@kde.org>
1971
1972         Reviewed by Darin.
1973
1974         http://bugs.webkit.org/show_bug.cgi?id=6074
1975         WebKit+SVG and FireFox disagree on invalid "transform" handling
1976
1977         Test for parsing failure on transform attribute and clear the transform
1978         list upon failure to match FF behaviour.
1979
1980         * ksvg2/svg/SVGGradientElement.cpp:
1981         (WebCore::SVGGradientElement::parseMappedAttribute):
1982         * ksvg2/svg/SVGPatternElement.cpp:
1983         (WebCore::SVGPatternElement::parseMappedAttribute):
1984         * ksvg2/svg/SVGStyledTransformableElement.cpp:
1985         (WebCore::SVGStyledTransformableElement::parseMappedAttribute):
1986         * ksvg2/svg/SVGTextElement.cpp:
1987         (WebCore::SVGTextElement::parseMappedAttribute):
1988         * ksvg2/svg/SVGTransformable.cpp:
1989         (WebCore::SVGTransformable::parseTransformAttribute):
1990         * ksvg2/svg/SVGTransformable.h:
1991
1992 2006-12-07  Geoffrey Garen  <ggaren@apple.com>
1993
1994         Reviewed by Beth Dakin.
1995
1996         Fixed <rdar://problem/4870551> 9A320: <input type="text"> no longer 
1997         dispatches onchange event in response to enter key
1998         
1999         To match our old behavior and FF, we need to dispatch onchange in response to the
2000         ENTER key. The strategy here is just to dispatch a blur event, since that's how
2001         the search field always worked, and the DOM spec says onchange only fires
2002         as a precursor to blur.
2003
2004         * ChangeLog:
2005         * html/HTMLInputElement.cpp:
2006         (WebCore::HTMLInputElement::defaultEventHandler):
2007
2008 2006-12-07  Adam Roben  <aroben@apple.com>
2009
2010         Reviewed by Oliver.
2011
2012         Some small context menu-related fixes.
2013
2014         * html/HTMLFrameSetElement.cpp:
2015         (WebCore::HTMLFrameSetElement::defaultEventHandler): Don't try to
2016         resize on a contextmenuEvent.
2017         * html/HTMLInputElement.cpp:
2018         (WebCore::HTMLInputElement::defaultEventHandler): Only pass the event
2019         off to HTMLGenericFormElement if we haven't handled it.
2020
2021 2006-12-07  Anders Carlsson  <acarlsson@apple.com>
2022
2023         Reviewed by Darin.
2024
2025         <rdar://problem/4838778>
2026         Title: DashboardClient crashing in WebCore::SubresourceLoader::didFail
2027         
2028         * loader/SubresourceLoader.cpp:
2029         (WebCore::SubresourceLoader::stopLoading):
2030         * loader/SubresourceLoader.h:
2031         Add stopLoading method which currently just clears the client. This isn't the ideal fix,
2032         since it doesn't actually stop the load.
2033         
2034         * loader/mac/SubresourceLoaderMac.mm:
2035         (WebCore::SubresourceLoader::willSendRequest):
2036         (WebCore::SubresourceLoader::didReceiveResponse):
2037         (WebCore::SubresourceLoader::didReceiveData):
2038         (WebCore::SubresourceLoader::didFinishLoading):
2039         (WebCore::SubresourceLoader::didFail):
2040         (WebCore::SubresourceLoader::didCancel):
2041         Add null-checks.
2042         
2043         * xml/xmlhttprequest.cpp:
2044         (WebCore::XMLHttpRequest::abort):
2045         Call stopLoading.
2046
2047 2006-12-07  Kevin McCullough  <kmccullough@apple.com>
2048
2049         Reviewed by Geof.
2050
2051         - added the ability to set the auto repeating variable to force a keyPressed
2052         event from a keyDown event.
2053
2054         * platform/PlatformKeyboardEvent.h:
2055         (WebCore::PlatformKeyboardEvent::setIsAutoRepeat):
2056
2057 2006-12-07  Don Gibson  <dgibson77@gmail.com>
2058
2059         Reviewed by Darin.
2060
2061         http://bugs.webkit.org/show_bug.cgi?id=11749
2062         Don't call updateThumbProportion() unnecessarily.
2063
2064         * platform/ScrollBar.cpp:
2065         (WebCore::Scrollbar::setProportion):
2066
2067 2006-12-07  Beth Dakin  <bdakin@apple.com>
2068
2069         Reviewed by Brady.
2070
2071         Fixes "Open in new Window" item in WebCore ContextMenus. It wasn't 
2072         doing anything before, and now it works! Also some formatting 
2073         changes, etc.
2074
2075         * page/ContextMenuClient.h: Several of the parameters to several of 
2076         the functions here should be const or const references. And now 
2077         they are!
2078         * page/ContextMenuController.cpp:
2079         (WebCore::openNewWindow): Moved the open new window functionality 
2080         into a helper function since it is used by several menu item tags. 
2081         Now after calling chrome()->createWindow() we call chrome()->show() 
2082         on the new window, and so it appears!
2083         (WebCore::ContextMenuController::contextMenuItemSelected): Call new 
2084         openNewWindow function to do the right thing. Shift some 
2085         formatting, use local variable for HitTestResult. Implement action 
2086         for ContextMenuItemTagOpenLink.
2087
2088 2006-12-06  Kevin McCullough  <KMcCullough@apple.com>
2089
2090         Reviewed by.
2091
2092         - Removed a conflict marker
2093
2094         * ChangeLog:
2095
2096 2006-12-06  Justin Garcia  <justin.garcia@apple.com>
2097
2098         Reviewed by darin
2099         
2100         <rdar://problem/4818134>
2101         Crash in WebCore::selectRange when invoking WebView:insertNewLine in any empty content editable DIV.
2102
2103         * WebCore.vcproj/WebCore/WebCore.vcproj: Removed RebalanceWhitespaceCommand.*.
2104         * editing/visible_units.cpp:
2105         (WebCore::startOfLine): There are VisiblePositions at offset 0 in blocks without
2106         RootInlineBoxes, like empty editable blocks and bordered blocks.
2107         (WebCore::endOfLine): Ditto.
2108         
2109 2006-12-06  Kevin McCullough  <KMcCullough@apple.com>
2110
2111         Reviewed by.
2112
2113         - Removed a conflict marker
2114
2115         * ChangeLog:
2116
2117 2006-12-06  Justin Garcia  <justin.garcia@apple.com>
2118
2119         Reviewed by john
2120         
2121         <rdar://problem/4854869>
2122         Inserting a new line in a contenteditable=true SPAN whose parent is a DIV asserts
2123
2124         * editing/htmlediting.cpp:
2125         (WebCore::enclosingBlock): Use enclosingNodeWithType to prevent escape
2126         from editable content.
2127         * editing/markup.cpp:
2128         (WebCore::createMarkup): A null commonAncestorBlock will happen
2129         if commonAncestor is inside an inline editable root that doesn't
2130         contain any blocks.  Removed an early return for this case: the 
2131         code below the early return can and must handle it.
2132
2133 2006-12-06  Timothy Hatcher  <timothy@apple.com>
2134
2135         Reviewed by Mark Rowe.
2136
2137         <rdar://problem/4843505> Fix cross-library ivar use for 64-bit Objective-C
2138
2139         Adds a new WebCore.LP64.exp file that gets appended to the normal export file.
2140         This new file will have 64-bit only symbols we need to export.
2141
2142         * WebCore.LP64.exp: Added.
2143         * WebCore.xcodeproj/project.pbxproj:
2144
2145 2006-12-06  Anders Carlsson  <acarlsson@apple.com>
2146
2147         Reviewed by Maciej.
2148         
2149         Change SubresourceLoader to use a ResourceHandle, and change ResourceHandle to use a NSURLConnection.
2150         
2151         * loader/ResourceLoader.h:
2152         * loader/SubresourceLoader.cpp:
2153         (WebCore::SubresourceLoader::create):
2154         (WebCore::SubresourceLoader::didReceiveData):
2155         (WebCore::SubresourceLoader::didFinishLoading):
2156         (WebCore::SubresourceLoader::didFail):
2157         * loader/SubresourceLoader.h:
2158         (WebCore::SubresourceLoader::didReceiveAuthenticationChallenge):
2159         (WebCore::SubresourceLoader::didCancelAuthenticationChallenge):
2160         (WebCore::SubresourceLoader::willStopBufferingData):
2161         (WebCore::SubresourceLoader::willCacheResponse):
2162         (WebCore::SubresourceLoader::receivedCredential):
2163         (WebCore::SubresourceLoader::receivedRequestToContinueWithoutCredential):
2164         (WebCore::SubresourceLoader::receivedCancellation):
2165         * loader/SubresourceLoaderClient.h:
2166         (WebCore::SubresourceLoaderClient::didFail):
2167         * loader/icon/IconLoader.cpp:
2168         (WebCore::IconLoader::didFail):
2169         * loader/icon/IconLoader.h:
2170         * loader/loader.cpp:
2171         (WebCore::Loader::didFail):
2172         * loader/loader.h:
2173         * loader/mac/ResourceLoaderMac.mm:
2174         (WebCore::ResourceLoader::ResourceLoader):
2175         (WebCore::ResourceLoader::addData):
2176         (WebCore::ResourceLoader::resourceData):
2177         * loader/mac/SubresourceLoaderMac.mm:
2178         (WebCore::SubresourceLoader::SubresourceLoader):
2179         (WebCore::SubresourceLoader::setDefersLoading):
2180         (WebCore::SubresourceLoader::resourceData):
2181         (WebCore::SubresourceLoader::load):
2182         (WebCore::SubresourceLoader::create):
2183         (WebCore::SubresourceLoader::willSendRequest):
2184         (WebCore::SubresourceLoader::didReceiveResponse):
2185         (WebCore::SubresourceLoader::didReceiveData):
2186         (WebCore::SubresourceLoader::didFinishLoading):
2187         (WebCore::SubresourceLoader::didFail):
2188         (WebCore::SubresourceLoader::didCancel):
2189         * platform/network/ResourceHandle.cpp:
2190         (WebCore::ResourceHandle::ResourceHandle):
2191         (WebCore::ResourceHandle::create):
2192         * platform/network/ResourceHandle.h:
2193         * platform/network/ResourceHandleClient.h:
2194         (WebCore::ResourceHandleClient::didReceiveData):
2195         (WebCore::ResourceHandleClient::didFail):
2196         (WebCore::ResourceHandleClient::didReceiveAuthenticationChallenge):
2197         (WebCore::ResourceHandleClient::didCancelAuthenticationChallenge):
2198         (WebCore::ResourceHandleClient::willStopBufferingData):
2199         (WebCore::ResourceHandleClient::willCacheResponse):
2200         (WebCore::ResourceHandleClient::receivedCredential):
2201         (WebCore::ResourceHandleClient::receivedRequestToContinueWithoutCredential):
2202         (WebCore::ResourceHandleClient::receivedCancellation):
2203         * platform/network/ResourceHandleInternal.h:
2204         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2205         * platform/network/mac/ResourceHandleMac.mm:
2206         (WebCore::ResourceHandle::~ResourceHandle):
2207         (WebCore::ResourceHandle::start):
2208         (WebCore::ResourceHandle::cancel):
2209         (WebCore::ResourceHandle::setDefersLoading):
2210         (WebCore::ResourceHandle::delegate):
2211         (WebCore::ResourceHandle::releaseDelegate):
2212         (WebCore::ResourceHandle::supportsBufferedData):
2213         (WebCore::ResourceHandle::bufferedData):
2214         (-[WebCoreResourceHandleAsDelegate initWithHandle:]):
2215         (-[WebCoreResourceHandleAsDelegate detachHandle]):
2216         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
2217         (-[WebCoreResourceHandleAsDelegate connection:didReceiveAuthenticationChallenge:]):
2218         (-[WebCoreResourceHandleAsDelegate connection:didCancelAuthenticationChallenge:]):
2219         (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
2220         (-[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:]):
2221         (-[WebCoreResourceHandleAsDelegate connection:willStopBufferingData:]):
2222         (-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]):
2223         (-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]):
2224         (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]):
2225         (-[WebCoreResourceHandleAsDelegate useCredential:forAuthenticationChallenge:]):
2226         (-[WebCoreResourceHandleAsDelegate continueWithoutCredentialForAuthenticationChallenge:]):
2227         (-[WebCoreResourceHandleAsDelegate cancelAuthenticationChallenge:]):
2228         * xml/xmlhttprequest.cpp:
2229         (WebCore::XMLHttpRequest::didFail):
2230         * xml/xmlhttprequest.h:
2231
2232 2006-12-06  Beth Dakin  <bdakin@apple.com>
2233
2234         Reviewed by Adam.
2235
2236         There are two bugs with WebCore ContextMenus due to the static 
2237         ContextMenuItems. One bug is that we often crashed in 
2238         NSAutoreleasePool upon quitting the browser. The other bug is that 
2239         we were adding static NSMenuItems to multiple NSMenus, which is 
2240         disallowed. To fix these bugs, the MenuItems are no longer static. 
2241         This is in line with the current design in WebKit anyway. I made 
2242         some re-arrangements in the code because I also removed the macro 
2243         that was used to create the menu items since it was a bit 
2244         confusing.
2245
2246         * platform/ContextMenu.cpp:
2247         (WebCore::createFontSubMenu):
2248         (WebCore::createSpellingAndGrammarSubMenu):
2249         (WebCore::createSpellingSubMenu):
2250         (WebCore::createSpeechSubMenu):
2251         (WebCore::createWritingDirectionSubMenu):
2252         (WebCore::ContextMenu::populate):
2253         * platform/ContextMenuItem.h:
2254         * platform/mac/ContextMenuItemMac.mm:
2255         (WebCore::ContextMenuItem::ContextMenuItem): Use the NSMenuItem 
2256         global separator item if we have SeparatorType.
2257         * platform/mac/ContextMenuMac.mm:
2258         (WebCore::setMenuItemTarget):  Change name of getNSMenuItem since 
2259         that is no longer accurate.
2260         (WebCore::ContextMenu::appendItem): Above name change.
2261         (WebCore::ContextMenu::insertItem): Same.
2262
2263 2006-12-06  Kevin McCullough  <kmccullough@apple.com>
2264
2265         Reviewed by Geof.
2266
2267         - Returned the semantic meaning of the mask to be the actual repeat count,
2268         and changed auto_repeat to correctly differnetiate between keypressed and keydown.
2269
2270         * platform/win/KeyEventWin.cpp:
2271         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2272
2273 2006-12-06  Justin Garcia  <justin.garcia@apple.com>
2274
2275         Reviewed by harrison
2276         
2277         <rdar://problem/4753545>
2278         REGRESSION: Edited whitespace sequences are all nbsps (10636)
2279
2280         * WebCore.xcodeproj/project.pbxproj: Removed RebalanceWhitespaceCommand.* from the project.
2281         * editing/CompositeEditCommand.cpp:
2282         (WebCore::isWhitespace): Moved from htmlediting.
2283         (WebCore::CompositeEditCommand::rebalanceWhitespaceAt): Moved the work that was
2284         once done in its own command here.  
2285         (WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit): Prevents
2286         whitespace around a position from collapsing when it's pushed apart during Paste.
2287         This function can eventually be deployed to eliminate the need for leading/trailing 
2288         whitespace handling in InsertParagraphSeparator, InsertLineBreak, Delete, and BreakBlockquote.
2289         (WebCore::CompositeEditCommand::rebalanceWhitespace): Cleaned up.
2290         * editing/CompositeEditCommand.h:
2291         * editing/DeleteSelectionCommand.cpp:
2292         (WebCore::DeleteSelectionCommand::doApply): Do rebalanceWhitespaceAt *before*
2293         saving the typing style, because whitespace rebalancing is no longer it's own
2294         command that claims to preserve the typing style.
2295         * editing/RebalanceWhitespaceCommand.cpp: Removed.
2296         * editing/RebalanceWhitespaceCommand.h: Removed.
2297         * editing/ReplaceSelectionCommand.cpp:
2298         (WebCore::ReplaceSelectionCommand::doApply): Moved the code to prepare whitespace
2299         arond a position for being pushed aparat to its own method.
2300         * editing/htmlediting.cpp:
2301         (WebCore::stringWithRebalancedWhitespace): Added.  Returns a rebalanced string.
2302         Takes in whether or not the beginning of that string will be at the start of
2303         a paragraph, because a space at such a position must have be nbsp, even if
2304         that doesn't follow the nbsp/space pattern used.  Similar stuff for the end 
2305         of a paragraph.
2306         * editing/htmlediting.h:
2307         * editing/markup.cpp:
2308         (WebCore::fillContainerFromString): Call stringWithRelabacedWhitespace.  Pass 
2309         it the startOfParagraph/endOfParagraph bools.
2310
2311 2006-12-05  John Sullivan  <sullivan@apple.com>
2312
2313         Reviewed by Beth
2314
2315         Moved spelling and grammar code from Frame to Editor
2316
2317         * WebCore.exp:
2318         updated for these changes
2319
2320         * page/Frame.h:
2321         removed declarations of spelling and grammar functions
2322
2323         * bridge/mac/FrameMac.h:
2324         removed declarations of spelling and grammar functions
2325
2326         * bridge/mac/FrameMac.mm:
2327         moved implementation of spelling and grammar functions from here
2328         (WebCore::FrameMac::respondToChangedSelection):
2329         updated for moved functions
2330
2331         * editing/Editor.h:
2332         moved declarations of spelling and grammar functions to here
2333
2334         * editing/mac/EditorMac.mm:
2335         moved implementation of spelling and grammar functions to here; changed
2336         only to make it compile (e.g. removing "editor()->" and adding "frame()->"
2337         where appropraite.
2338         (WebCore::findFirstMisspellingInRange):
2339         (WebCore::paragraphAlignedRangeForRange):
2340         (WebCore::findFirstGrammarDetailInRange):
2341         (WebCore::findFirstBadGrammarInRange):
2342         (WebCore::Editor::advanceToNextMisspelling):
2343         (WebCore::Editor::isSelectionMisspelled):
2344         (WebCore::isRangeUngrammatical):
2345         (WebCore::Editor::isSelectionUngrammatical):
2346         (WebCore::Editor::guessesForUngrammaticalSelection):
2347         (WebCore::core):
2348         (WebCore::Editor::guessesForMisspelledSelection):
2349         (WebCore::Editor::markMisspellingsInAdjacentWords):
2350         (WebCore::markAllMisspellingsInRange):
2351         (WebCore::markAllBadGrammarInRange):
2352         (WebCore::Editor::markMisspellings):
2353
2354         * platform/ContextMenu.cpp:
2355         (WebCore::ContextMenu::populate):
2356         updated for moved functions
2357
2358         * editing/TypingCommand.cpp:
2359         (WebCore::TypingCommand::markMisspellingsAfterTyping):
2360         updated for moved functions
2361
2362 2006-12-05  Anders Carlsson  <acarlsson@apple.com>
2363
2364         Reviewed by Maciej.
2365
2366         General cleanup, get rid of PlatformResponse (we have ResourceResponse now)
2367         and remove a couple of functions that were unused.
2368
2369         * loader/CachedResource.h:
2370         * loader/LoaderFunctions.h:
2371         * loader/mac/LoaderFunctionsMac.mm:
2372         * platform/network/ResourceHandle.h:
2373         * platform/network/ResourceHandleClient.h:
2374         * platform/network/mac/ResourceHandleMac.mm:
2375         (WebCore::ResourceHandle::~ResourceHandle):
2376
2377 2006-12-05  Kevin McCullough  <kmccullough@apple.com>
2378
2379         Reviewed by John.
2380
2381         - keydown is now a keydown event instead of a keypress event.
2382           Fixes some form submission oddities.
2383
2384         * platform/win/KeyEventWin.cpp:
2385
2386 2006-12-05  John Sullivan  <sullivan@apple.com>
2387
2388         Tiger build fix
2389
2390         * editing/mac/EditorMac.mm:
2391         declare -[NSSpellChecker learnWord:], on Tiger only (it's API on Leopard)
2392
2393 2006-12-05  John Sullivan  <sullivan@apple.com>
2394
2395         Reviewed by Geoff Garen
2396
2397         * page/Frame.h:
2398         remove declarations of ignoreSpelling() and learnSpelling()
2399
2400         * bridge/mac/FrameMac.h:
2401         remove declarations of ignoreSpelling() and learnSpelling()
2402         * bridge/mac/FrameMac.mm:
2403         moved implementations of ignoreSpelling() and learnSpelling() from here
2404
2405         * editing/Editor.h:
2406         added declarations of ignoreSpelling() and learnSpelling()
2407
2408         * editing/mac/EditorMac.mm:
2409         (WebCore::Editor::ignoreSpelling):
2410         moved here from FrameMac.mm
2411         (WebCore::Editor::learnSpelling):
2412         ditto
2413
2414         * page/ContextMenuController.cpp:
2415         (WebCore::ContextMenuController::contextMenuItemSelected):
2416         updated callers to use frame()->editor() rather than frame()
2417
2418 2006-12-05  John Sullivan  <sullivan@apple.com>
2419
2420         Reviewed by Adam
2421
2422         New context-menu mechanism fix for:
2423         <rdar://problem/4864351> Should leave out "No Guesses Found" from context menu for bad grammar
2424
2425         * platform/ContextMenu.cpp:
2426         (WebCore::ContextMenu::populate):
2427         Leave out "No Guesses Found" and separator for grammar-checking case.
2428
2429 2006-12-05  Rob Buis  <buis@kde.org>
2430
2431         Reviewed by Mitz.
2432
2433         http://bugs.webkit.org/show_bug.cgi?id=11686
2434         WebKit draws Carto.net tabgroup example completely incorrectly (ff does fine)
2435
2436         Make sure the SVG render objects are laid out before measuring their 
2437         dimensions using relativeBBox.
2438
2439         * ksvg2/svg/SVGLocatable.cpp:
2440         (WebCore::SVGLocatable::getBBox):
2441
2442 2006-12-05  John Sullivan  <sullivan@apple.com>
2443
2444         Reviewed by Darin
2445
2446         Grammar/Spelling code re-homing, baby step one: put isGrammarCheckingEnabled in Editor
2447         since that's where isContinousSpellCheckingEnabled lives.
2448
2449         * editing/Editor.h:
2450         * editing/Editor.cpp:
2451         (WebCore::Editor::isGrammarCheckingEnabled):
2452         new method, calls through to client a la isContinuousSpellCheckingEnabled
2453
2454         * bridge/mac/FrameMac.mm:
2455         (WebCore::FrameMac::advanceToNextMisspelling):
2456         call editor() rather than editor()->client()
2457         (WebCore::FrameMac::markMisspellings):
2458         ditto
2459
2460         * platform/ContextMenu.cpp:
2461         (WebCore::ContextMenu::populate):
2462         ditto
2463
2464 2006-12-05  Darin Adler  <darin@apple.com>
2465
2466         Reviewed by Geoff.
2467
2468         - a little cleanup
2469
2470         * html/HTMLInputElement.h: Removed unneeded includes of RenderObject.h
2471         and RenderStyle.h.
2472         * html/HTMLSelectElement.h: Removed unneeded include of RenderStyle.h.
2473         * ksvg2/svg/SVGStyledElement.h: Removed unneeded include of RenderStyle.h.
2474
2475         * ksvg2/svg/SVGSVGElement.h: Remove unneeded parameter to createSVGPoint.
2476         * ksvg2/svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::createSVGPoint):
2477         Ditto.
2478
2479         * ksvg2/scripts/generateJSBindings.pl: Removed unused script.
2480
2481 2006-12-05  Darin Adler  <darin@apple.com>
2482
2483         * doc: Removed empty directory. It's not clear this is a good place for
2484         documentation, so lets add it back later if we actually start using it.
2485
2486 2006-12-05  Anders Carlsson  <acarlsson@apple.com>
2487
2488         Reviewed by Brady, Darin.
2489
2490         * loader/loader.cpp:
2491         (WebCore::Loader::receivedAllData):
2492         Remove ref() call that was left around by mistake.
2493
2494 2006-12-05  Sam Weinig  <sam@webkit.org>
2495
2496         Reviewed by Tim H.
2497
2498         Fix for http://bugs.webkit.org/show_bug.cgi?id=11758
2499         Don't compile custom SVG and XSLT bindings in non-svg build
2500
2501         * bindings/js/JSSVGNumber.cpp:
2502         * bindings/js/JSSVGNumber.h:
2503         * bindings/js/JSSVGPoint.cpp:
2504         * bindings/js/JSSVGPoint.h:
2505         * bindings/js/JSSVGRect.cpp:
2506         * bindings/js/JSSVGRect.h:
2507         * bindings/js/JSXSLTProcessor.cpp:
2508         * bindings/js/JSXSLTProcessor.h:
2509
2510 2006-12-04  John Sullivan  <sullivan@apple.com>
2511
2512         Reviewed by Darin
2513
2514         WebCore part of fix for:
2515         <rdar://problem/4817188> Context menu for bad grammar should include suggestions and "Ignore Grammar"
2516
2517         The context menu mechanism is currently in flux; the old mechanism is still in place, but an
2518         up-and-coming new mechanism is waiting in the wings. I updated both of them, but couldn't
2519         test the new mechanism because it doesn't work well enough yet. Also, some of this code 
2520         should move from Frame to Editor, but that will wait for another checkin.
2521
2522         * page/Frame.h:
2523         added pure virtual function declarations for isSelectionUngrammatical() and guessesForUngrammaticalSelection()
2524
2525         * bridge/mac/FrameMac.h:
2526         added virtual functions declarations for isSelectionUngrammatical() and guessesForUngrammaticalSelection()
2527
2528         * bridge/mac/FrameMac.mm:
2529         (WebCore::FrameMac::isSelectionMisspelled):
2530         now updates spelling panel (whether or not it's showing), since this is now needed to make -[NSSSpellChecker
2531         ignoreWord:inSpellDocumentWithTag:] work correctly
2532         (WebCore::isRangeUngrammatical):
2533         new function, helper used by both isSelectionUngrammatical() and guessesForUngrammaticalSelection()
2534         (WebCore::FrameMac::isSelectionUngrammatical):
2535         new function, calls isRangeUngrammatical
2536         (WebCore::FrameMac::guessesForUngrammaticalSelection):
2537         ditto
2538
2539         * platform/ContextMenu.cpp:
2540         (WebCore::ContextMenu::populate):
2541         now considers bad grammar as well as misspellings
2542         
2543         * platform/ContextMenuItem.h:
2544         added ContextMenuItemTagIgnoreGrammar
2545         
2546 2006-12-05  Kirby White  <KWhiteRight@gmail.com>
2547
2548         Reviewed, tweaked and landed by Alexey.
2549
2550         <http://bugs.webkit.org/show_bug.cgi?id=11639> Form buttons don't look different when clicked
2551
2552         * rendering/RenderThemeWin.cpp:
2553         (WebCore::RenderThemeWin::determineState): Moved test for active 
2554         state before test for hover state, since active should override hover 
2555         when both are true.
2556
2557         * platform/gdk/RenderThemeGdk.cpp: 
2558         (WebCore::RenderThemeGdk::determineState): Same fix.
2559
2560 2006-12-05  Kirby White  <KWhiteRight@gmail.com>
2561
2562         Reviewed and landed by Alexey.
2563
2564         http://bugs.webkit.org/show_bug.cgi?id=11681
2565         Don't select the first option when resetting a listbox-style form 
2566         control (i.e., a multi-select control or one with size > 1) that
2567         has no default selection.
2568
2569         Test: fast/dom/HTMLSelectElement/listbox-select-reset.html
2570
2571         * html/HTMLSelectElement.cpp:
2572         (WebCore::HTMLSelectElement::reset):
2573
2574 2006-12-05  Lars Naesbye Christensen  <larsnaesbye@stud.ku.dk>
2575
2576         Reviewed and landed by Alexey.
2577
2578         http://bugs.webkit.org/show_bug.cgi?id=11752
2579         [CSS 3] missing support for cursor selector 'copy'
2580
2581         * Resources/copyCursor.png: Added.
2582         * WebCore.xcodeproj/project.pbxproj:
2583         * css/CSSComputedStyleDeclaration.cpp:
2584         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2585         * css/CSSValueKeywords.in:
2586         * manual-tests/cursor.html:
2587         * page/EventHandler.cpp:
2588         (WebCore::selectCursor):
2589         * platform/Cursor.h:
2590         * platform/mac/CursorMac.mm:
2591         (WebCore::copyCursor):
2592         * rendering/RenderStyle.h:
2593         (WebCore::):
2594
2595 2006-12-04  Beth Dakin  <bdakin@apple.com>
2596
2597         Reviewed by Geoff.
2598
2599         Fix from last check-in. This line was badbad.
2600
2601         * platform/mac/ContextMenuMac.mm:
2602         (WebCore::ContextMenu::~ContextMenu):
2603
2604 2006-12-04  Beth Dakin  <bdakin@apple.com>
2605
2606         Reviewed by Geoff.
2607
2608         With the new changes to ContextMenuItems, WebCore context menus 
2609         stopped appearing at all. And then when I got them to appear, they 
2610         crashed. This fixes both of these problems.
2611
2612         * platform/mac/ContextMenuItemMac.mm:
2613         (WebCore::ContextMenuItem::ContextMenuItem): keyEquivalent cannot 
2614         be nil. This was causing Obj-C to throw an exception preventing the 
2615         menus from popping up at all. 
2616         * platform/mac/ContextMenuMac.mm:
2617         (+[WebCoreMenuTarget sharedMenuTarget]): Re-name our static 
2618         MenuTarget so that it is more clear that it is a static and shared 
2619         WebCoreMenuTarget.
2620         (WebCore::ContextMenu::ContextMenu): Initialize the 
2621         WebCoreMenuTarget's controller in the ContextMenu constructor 
2622         instead of in getNSMenuItem since the controller will only possibly 
2623         change when a new ContextMenu has been created.
2624         (WebCore::ContextMenu::~ContextMenu): Set the target's controller 
2625         to 0.
2626         (WebCore::getNSMenuItem): A lot of this work is being done other 
2627         places now. Call new class method on WebCoreMenuTarget to get the 
2628         shared target.
2629         (WebCore::ContextMenu::appendItem): We should not be releasing the 
2630         menuItem here! This caused the crashes I saw.
2631         (WebCore::ContextMenu::insertItem): Same.
2632
2633 2006-12-04  Anders Carlsson  <acarlsson@apple.com>
2634
2635         Fix the build.
2636         
2637         * loader/mac/SubresourceLoaderMac.mm:
2638         (WebCore::SubresourceLoader::~SubresourceLoader):
2639         Add back the destructor.
2640
2641 2006-12-04  Anders Carlsson  <acarlsson@apple.com>
2642
2643         Reviewed by Darin.
2644         
2645         Change all ResourceHandleClients to be SubresourceLoaderClients instead. Also,
2646         make SubresourceLoader a ResourceHandleClient. This is a first step towards turning ResourceHandle into a 
2647         standalone class which doesn't need to know about SubresourceLoader.
2648
2649         * WebCore.xcodeproj/project.pbxproj:
2650         * loader/ResourceLoader.cpp:
2651         (WebCore::ResourceLoader::~ResourceLoader):
2652         (WebCore::ResourceLoader::ResourceLoader):
2653         (WebCore::ResourceLoader::setDefersLoading):
2654         * loader/SubresourceLoader.cpp:
2655         (WebCore::SubresourceLoader::SubresourceLoader):
2656         (WebCore::SubresourceLoader::~SubresourceLoader):
2657         (WebCore::SubresourceLoader::create):
2658         (WebCore::SubresourceLoader::willSendRequest):
2659         (WebCore::SubresourceLoader::didReceiveResponse):
2660         (WebCore::SubresourceLoader::didReceiveData):
2661         (WebCore::SubresourceLoader::didFinishLoading):
2662         (WebCore::SubresourceLoader::didFailWithError):
2663         (WebCore::SubresourceLoader::receivedAllData):
2664         * loader/SubresourceLoader.h:
2665         (WebCore::SubresourceLoader::loaderAsResourceHandleClient):
2666         (WebCore::SubresourceLoader::handle):
2667         * loader/SubresourceLoaderClient.h: Added.
2668         (WebCore::SubresourceLoaderClient::~SubresourceLoaderClient):
2669         (WebCore::SubresourceLoaderClient::willSendRequest):
2670         (WebCore::SubresourceLoaderClient::didReceiveResponse):
2671         (WebCore::SubresourceLoaderClient::didReceiveData):
2672         (WebCore::SubresourceLoaderClient::didFinishLoading):
2673         (WebCore::SubresourceLoaderClient::didFailWithError):
2674         (WebCore::SubresourceLoaderClient::receivedAllData):
2675         * loader/icon/IconLoader.cpp:
2676         (WebCore::IconLoader::startLoading):
2677         (WebCore::IconLoader::stopLoading):
2678         (WebCore::IconLoader::didReceiveResponse):
2679         (WebCore::IconLoader::didReceiveData):
2680         (WebCore::IconLoader::didFailWithError):
2681         (WebCore::IconLoader::didFinishLoading):
2682         (WebCore::IconLoader::clearLoadingState):
2683         * loader/icon/IconLoader.h:
2684         * loader/loader.cpp:
2685         (WebCore::Loader::servePendingRequests):
2686         (WebCore::Loader::receivedAllData):
2687         (WebCore::Loader::didFailWithError):
2688         (WebCore::Loader::didReceiveResponse):
2689         (WebCore::Loader::didReceiveData):
2690         (WebCore::Loader::cancelRequests):
2691         * loader/loader.h:
2692         * loader/mac/SubresourceLoaderMac.mm:
2693         (WebCore::SubresourceLoader::SubresourceLoader):
2694         (WebCore::SubresourceLoader::create):
2695         (WebCore::SubresourceLoader::willSendRequest):
2696         (WebCore::SubresourceLoader::didReceiveResponse):
2697         (WebCore::SubresourceLoader::didReceiveData):
2698         (WebCore::SubresourceLoader::didFinishLoading):
2699         (WebCore::SubresourceLoader::didFail):
2700         (WebCore::SubresourceLoader::didCancel):
2701         * platform/network/ResourceHandle.cpp:
2702         (WebCore::ResourceHandle::ResourceHandle):
2703         (WebCore::ResourceHandle::create):
2704         * platform/network/ResourceHandle.h:
2705         * platform/network/ResourceHandleClient.h:
2706         * platform/network/ResourceHandleInternal.h:
2707         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2708         * platform/network/mac/ResourceHandleMac.mm:
2709         (WebCore::ResourceHandle::start):
2710         (WebCore::ResourceHandle::finishJobAndHandle):
2711         (WebCore::ResourceHandle::loader):
2712         * xml/xmlhttprequest.cpp:
2713         (WebCore::XMLHttpRequest::send):
2714         (WebCore::XMLHttpRequest::didFailWithError):
2715         (WebCore::XMLHttpRequest::didFinishLoading):
2716         (WebCore::XMLHttpRequest::willSendRequest):
2717         (WebCore::XMLHttpRequest::didReceiveResponse):
2718         (WebCore::XMLHttpRequest::didReceiveData):
2719         * xml/xmlhttprequest.h:
2720
2721 2006-12-04  Darin Adler  <darin@apple.com>
2722
2723         Reviewed by Adele.
2724
2725         - fix another part of http://bugs.webkit.org/show_bug.cgi?id=11628
2726           REGRESSION (r17597): Command-return in text fields doesn't open a new tab or window
2727
2728         This fixes command-return when the focus is on a link.
2729         Despite the title of the bug, Mitz wanted me to fix both, and I will not
2730         say no to him!
2731
2732         Test: fast/events/simulated-key-state.html
2733
2734         * dom/EventTargetNode.cpp:
2735         (WebCore::EventTargetNode::dispatchSimulatedMouseEvent): Instead of always passing
2736         false for all the key state in simulated mouse events, pass the state from the
2737         first underlying event in the chain that has key state; in the case in the bug,
2738         the keyboard event will be the underlying event itself and we'll propagate the
2739         alt key modifier to the mouse event, resulting in the effect we want. It's nice
2740         that JavaScript also gets to see the proper modifiers in the mouse event.
2741
2742         * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::defaultEventHandler):
2743         Added code to pass in an underlying event to dispatchSimulatedClick. After looking
2744         at all the other callers, this seems to be the only one that needs to pass an
2745         event that is currently passing 0. Also removed the code that only simulated a
2746         click when the event has a PlatformKeyboardEvent -- no reason for that and it
2747         prevented me from writing a layout test for the fix. 
2748
2749         * dom/UIEventWithKeyState.h: Added findEventWithKeyState function that walks the
2750         underlyingEvent chain to find the first event that has key state. This already
2751         existed in WebKit, but I wanted to use it in dispatchSimulatedMouseEvent.
2752         * dom/UIEventWithKeyState.cpp: Added.
2753
2754         * CMakeLists.txt: Added UIEventWithKeyState.cpp.
2755         * WebCore.vcproj/WebCore/WebCore.vcproj: Added UIEventWithKeyState.cpp.
2756         * WebCore.xcodeproj/project.pbxproj: Added UIEventWithKeyState.cpp.
2757         * WebCoreSources.bkl: Added UIEventWithKeyState.cpp.
2758
2759         * WebCore.exp: Added findEventWithKeyState, used by WebKit.
2760
2761 2006-12-04  Kevin McCullough  <KMcCullough@apple.com>
2762
2763         Reviewed by Darin.
2764
2765         - removed the guards for the "multiple forms submission" issue, which may not be
2766           an issue anymore and the guards prevent perfectly legitimate websites from
2767           working correctly.
2768
2769         * bridge/mac/FrameMac.mm:
2770         (WebCore::FrameMac::setView):
2771         * bridge/mac/WebCoreAXObject.mm:
2772         (-[WebCoreAXObject accessibilityPerformAction:]):
2773         * bridge/win/FrameWin.cpp:
2774         (WebCore::FrameWin::keyPress):
2775         * config.h:
2776         * loader/FrameLoader.cpp:
2777         (WebCore::FrameLoader::submitForm):
2778         * loader/FrameLoader.h:
2779         * loader/mac/FrameLoaderMac.mm:
2780         (WebCore::FrameLoader::receivedMainResourceError):
2781         * loader/qt/FrameLoaderQt.cpp:
2782         (WebCore::FrameLoader::submitForm):
2783         * page/Frame.cpp:
2784         (WebCore::Frame::setView):
2785         * page/mac/EventHandlerMac.mm:
2786         (WebCore::EventHandler::keyEvent):
2787         (WebCore::EventHandler::mouseDown):
2788         * platform/qt/FrameQt.cpp:
2789         (WebCore::FrameQt::keyEvent):
2790
2791 2006-12-02  Geoffrey Garen  <ggaren@apple.com>
2792
2793         Reviewed by Darin Adler.
2794         
2795         Added support for Dashboard backward compatibility mode.
2796         
2797         * html/CanvasRenderingContext2D.cpp:
2798         (WebCore::CanvasRenderingContext2D::stroke): Added support for old behavior
2799         of automatically clearing the stroke path buffer after a call to stroke().
2800         * html/HTMLCanvasElement.cpp: Added supoprt for old behavior of the canvas
2801         tag being self-closing.
2802         (WebCore::HTMLCanvasElement::endTagRequirement):
2803         (WebCore::HTMLCanvasElement::tagPriority):
2804         * html/HTMLCanvasElement.h:
2805         * html/HTMLParser.cpp: Ditto.
2806         (WebCore::HTMLParser::canvasCreateErrorCheck):
2807         * xml/xmlhttprequest.cpp: Added support for old behavior of silently ignoring
2808         a call to setRequestHeader() if it preceded a call to open() or followed a call
2809         to send().
2810         (WebCore::XMLHttpRequest::setRequestHeader):
2811
2812 2006-12-04  Darin Adler  <darin@apple.com>
2813
2814         Reviewed by Alice.
2815
2816         * bridge/EditorClient.h: Removed "_web_" prefix from
2817         C++ userVisibleString member function. Alice will probably change
2818         this so it's not on the editor client any more later.
2819
2820         * editing/Editor.h: Removed "_web_" prefix from
2821         C++ userVisibleString member function.
2822         * editing/Editor.cpp: Tweaked formatting a bit. Removed Mac-specific
2823         code from this file.
2824
2825         * editing/mac/EditorMac.mm:
2826         (WebCore::Editor::newGeneralClipboard): Removed unnneded local variable.
2827         (WebCore::Editor::userVisibleString): Moved this function here.
2828
2829         * platform/Pasteboard.h: Added some FIXMEs. Removed unneeded includes.
2830         Made Pasteboard noncopyable. Removed use of "protected" where we should
2831         be using "private". Removed s_generalPasteboard.
2832         * platform/mac/PasteboardMac.mm: Added some FIXMEs. Removed the
2833         s_generalPasteboard global. Removed the unused destructor. Updated call
2834         to userVisibleString for name change. Tweaked formatting.
2835
2836 2006-12-04  Alice Liu  <alice.liu@apple.com>
2837
2838         Reviewed by Oliver.
2839
2840         Moved some constants from EventHandlerMac.mm to EventHandler.cpp
2841         Added some platform-specific data members and functions.
2842
2843         * page/EventHandler.cpp:
2844         * page/EventHandler.h:
2845         * page/mac/EventHandlerMac.mm:
2846         * platform/PlatformMouseEvent.h:
2847         (WebCore::):
2848         (WebCore::PlatformMouseEvent::timestamp):
2849         (WebCore::PlatformMouseEvent::activatedWebView):
2850         (WebCore::PlatformMouseEvent::type):
2851
2852 2006-12-04  Anders Carlsson  <acarlsson@apple.com>
2853
2854         Reviewed by Darin, Geoff.
2855
2856         Get rid of ResourceHandle::kill(), all it did was to balance out a ref() in ResourceHandle::start().
2857         We use RefPtrs to ResourceHandle instead.
2858
2859         * loader/icon/IconLoader.cpp:
2860         (WebCore::IconLoader::~IconLoader):
2861         (WebCore::IconLoader::stopLoading):
2862         (WebCore::IconLoader::didReceiveResponse):
2863         * loader/loader.cpp:
2864         (WebCore::Loader::servePendingRequests):
2865         (WebCore::Loader::cancelRequests):
2866         (WebCore::Loader::jobForRequest):
2867         * loader/loader.h:
2868         * platform/network/ResourceHandle.cpp:
2869         * platform/network/ResourceHandle.h:
2870         * platform/network/mac/ResourceHandleMac.mm:
2871         (WebCore::ResourceHandle::start):
2872         (WebCore::ResourceHandle::finishJobAndHandle):
2873         (WebCore::ResourceHandle::reportError):
2874         * xml/xmlhttprequest.cpp:
2875         (WebCore::XMLHttpRequest::abort):
2876         (WebCore::XMLHttpRequest::didFinishLoading):
2877
2878 2006-12-04  Oliver Hunt  <oliver@apple.com>
2879
2880         Build fix for non-SVG builds
2881
2882         * bindings/js/JSSVGPoint.cpp:
2883         (WebCore::JSSVGPointProtoFunc::callAsFunction):
2884
2885 2006-12-04  Darin Adler  <darin@apple.com>
2886
2887         Reviewed by Beth.
2888
2889         - fix http://bugs.webkit.org/show_bug.cgi?id=11632
2890           AKA <rdar://problem/4858866> REGRESSION (r17770): Overflow areas' scrollbars don't work
2891
2892         No test case added at the moment, but Beth said she'd investigate
2893         adding one after the fact.
2894
2895         * page/mac/EventHandlerMac.mm:
2896         (WebCore::EventHandler::passMousePressEventToScrollbar):
2897         Fix obvious-in-retrospect copy and paste error -- call
2898         passMouseDownEventToWidget instead of passWheelEventToWidget.
2899
2900 2006-12-04  Don Gibson  <dgibson77@gmail.com>
2901
2902         Reviewed and landed by Alexey.
2903
2904         http://bugs.webkit.org/show_bug.cgi?id=11738:
2905         Make link clicking work again on Windows.
2906
2907         This re-implements a few functions that used to be part of FrameWin in
2908         their new loader-based locations, and copies a few things from the Mac
2909         and Qt event handling code that aren't strictly necessary but are
2910         pretty simple.
2911
2912         * WebCore.vcproj/WebCore/WebCore.vcproj:
2913         * bridge/win/ChromeClientWin.h:
2914         * bridge/win/ContextMenuClientWin.h:
2915         * bridge/win/EditorClientWin.h:
2916         * bridge/win/FrameWin.cpp:
2917         (WebCore::FrameWin::client):
2918         * bridge/win/FrameWin.h:
2919         * loader/win/DocumentLoaderWin.cpp: Added.
2920         (WebCore::DocumentLoader::setTitle):
2921         * loader/win/FrameLoaderClientWin.cpp: Added.
2922         (WebCore::FrameLoaderClientWin::userAgent):
2923         * loader/win/FrameLoaderClientWin.h:
2924         * loader/win/FrameLoaderWin.cpp: Added.
2925         (WebCore::FrameLoader::urlSelected):
2926         (WebCore::FrameLoader::submitForm):
2927         (WebCore::FrameLoader::setTitle):
2928         * page/win/EventHandlerWin.cpp: Added.
2929         (WebCore::EventHandler::passMousePressEventToSubframe):
2930         (WebCore::EventHandler::passMouseMoveEventToSubframe):
2931         (WebCore::EventHandler::passMouseReleaseEventToSubframe):
2932         (WebCore::EventHandler::passWheelEventToSubframe):
2933         (WebCore::EventHandler::passMousePressEventToScrollbar):
2934         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2935         * platform/win/TemporaryLinkStubs.cpp:
2936         (WebCore::EventHandler::tabsToLinks):
2937         (WebCore::EventHandler::tabsToAllControls):
2938         (WebCore::EventHandler::lastEventIsMouseUp):
2939         (WebCore::EventHandler::passSubframeEventToSubframe):
2940         (WebCore::EventHandler::passMouseDownEventToWidget):
2941         (WebCore::EventHandler::passWheelEventToWidget):
2942         (WebCore::FrameLoader::getHistoryLength):
2943         (WebCore::FrameLoader::historyURL):
2944         (WebCore::FrameLoader::createFrame):
2945         (WebCore::FrameLoaderClientWin::setTitle):
2946
2947 2006-12-04  Don Gibson  <dgibson77@gmail.com>
2948
2949         Reviewed by Mitz.
2950
2951         http://bugs.webkit.org/show_bug.cgi?id=11748:
2952         Windows build bustage.
2953
2954         * WebCore.vcproj/WebCore/WebCore.vcproj:
2955         * platform/ContextMenuItem.h:
2956         * platform/win/TemporaryLinkStubs.cpp:
2957         (WebCore::ContextMenuItem::ContextMenuItem):
2958         (WebCore::ContextMenuItem::platformDescription):
2959         (WebCore::ContextMenuItem::action):
2960         (WebCore::ContextMenuItem::setAction):
2961         (WebCore::ContextMenuItem::title):
2962         (WebCore::ContextMenuItem::setTitle):
2963         (WebCore::ContextMenuItem::platformSubMenu):
2964         (WebCore::ContextMenuItem::setSubMenu):
2965
2966 2006-12-04  John Sullivan  <sullivan@apple.com>
2967
2968         Reviewed by Anders
2969
2970         Moved EditorMac.mm to its appropriate location
2971
2972         * platform/mac/EditorMac.mm: Removed.
2973         * editing/mac/EditorMac.mm: Added
2974
2975         * WebCore.xcodeproj/project.pbxproj:
2976         updated for this change
2977
2978 2006-12-04  Rob Buis  <buis@kde.org>
2979
2980         Reviewed by dhyatt.
2981
2982         Patch by pmax.
2983
2984         http://bugs.webkit.org/show_bug.cgi?id=3280
2985         With LEGEND element, align=right value is not supported
2986         http://bugs.webkit.org/show_bug.cgi?id=11544
2987         <legend> rendering doesn't take align into account
2988
2989         Allow aligning for legends in both RTL and LTR mode.
2990
2991         * rendering/RenderFieldset.cpp:
2992         (WebCore::RenderFieldset::layoutLegend):
2993
2994 2006-12-03  Mark Rowe  <bdash@webkit.org>
2995
2996         Reviewed by Alexey.
2997
2998         http://bugs.webkit.org/show_bug.cgi?id=11730
2999         Bug 11730: Meta HTTP Refresh that contains a fraction / decimal get ignored.
3000
3001         * dom/Document.cpp:
3002         (WebCore::Document::processHttpEquiv): Parse the refresh interval as a double rather than an integer.
3003
3004 2006-12-03  Nikolas Zimmermann  <zimmermann@kde.org>
3005
3006         Reviewed by Oliver.
3007
3008         Fix following bugs:
3009         http://bugs.webkit.org/show_bug.cgi?id=11734
3010         http://bugs.webkit.org/show_bug.cgi?id=11685
3011
3012         SVGPoint/SVGRect/SVGNumber were missing put() support.
3013         SVGPoint.matrixTransform() was missing.
3014
3015         In SVG DOM there are no cases where a readwrite property
3016         exists of type SVGRect/SVGNumber/SVGPoint. Only function
3017         calls returns instances of these objects. It would make
3018         no sense to be able to write "someObj.getBbox().x = 100", and
3019         modify the actual stored internal value of "someObj".
3020
3021         The only cases where these modification makes sense, is
3022         when these SVGPoint/SVGRect/SVGNumber objects are created
3023         via document.rootElement.createSVGPoint/Rect/Number (SVGSVGElement interface).
3024
3025         Result: The current implementation, where we just modify the stored FloatPoint/FloatRect/double
3026         values in the JSSVGPoint/Rect/Number wrappers directly, is sufficient.
3027
3028         Patch created by Rob & me - co production.
3029         Long live the great carto.next examples! :-)
3030
3031         * CMakeLists.txt:
3032         * DerivedSources.make:
3033         * bindings/js/JSSVGNumber.cpp:
3034         (WebCore::):
3035         (WebCore::JSSVGNumber::getOwnPropertySlot):
3036         (WebCore::JSSVGNumber::getValueProperty):
3037         (WebCore::JSSVGNumber::put):
3038         (WebCore::JSSVGNumber::putValueProperty):
3039         * bindings/js/JSSVGNumber.h:
3040         (WebCore::JSSVGNumber::):
3041         (WebCore::JSSVGNumber::impl):
3042         * bindings/js/JSSVGPoint.cpp:
3043         (WebCore::JSSVGPoint::JSSVGPoint):
3044         (WebCore::JSSVGPoint::put):
3045         (WebCore::JSSVGPoint::putValueProperty):
3046         (WebCore::JSSVGPointProtoFunc::callAsFunction):
3047         * bindings/js/JSSVGPoint.h:
3048         (WebCore::JSSVGPoint::):
3049         * bindings/js/JSSVGRect.cpp:
3050         (WebCore::JSSVGRect::put):
3051         (WebCore::JSSVGRect::putValueProperty):
3052         * bindings/js/JSSVGRect.h:
3053         * bindings/objc/DOMSVGPoint.mm:
3054         (-[DOMSVGPoint matrixTransform:]):
3055         * platform/graphics/FloatPoint.cpp:
3056         (WebCore::FloatPoint::matrixTransform):
3057         * platform/graphics/FloatPoint.h:
3058
3059 2006-12-03  Nikolas Zimmermann  <zimmermann@kde.org>
3060
3061         Reviewed by Dave.
3062
3063         Another missing piece in the platform/graphics move.
3064
3065         * WebCore.xcodeproj/project.pbxproj:
3066         * platform/ImageAnimationObserver.h: Moved to platform/graphics.
3067
3068 2006-12-03  Rob Buis  <buis@kde.org>
3069
3070         Reviewed by Oliver.
3071
3072         http://bugs.webkit.org/show_bug.cgi?id=11667
3073         SVG: method .getTransformToElement(elt) in SVGLocatable not implemented
3074
3075         Implement getTransformToElement functionality. Introduce virtual
3076         baseclass SVGLocatable to allow one implementation of the functionality.
3077         Finally cleanup some code.
3078
3079         * ksvg2/svg/SVGLocatable.cpp:
3080         (WebCore::SVGLocatable::getTransformToElement):
3081         * ksvg2/svg/SVGLocatable.h:
3082         * ksvg2/svg/SVGStyledLocatableElement.cpp:
3083         (WebCore::SVGStyledLocatableElement::SVGStyledLocatableElement):
3084         (WebCore::SVGStyledLocatableElement::nearestViewportElement):
3085         (WebCore::SVGStyledLocatableElement::farthestViewportElement):
3086         (WebCore::SVGStyledLocatableElement::getCTM):
3087         (WebCore::SVGStyledLocatableElement::getScreenCTM):
3088         * ksvg2/svg/SVGStyledLocatableElement.h:
3089         * ksvg2/svg/SVGStyledTransformableElement.cpp:
3090         (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement):
3091         (WebCore::SVGStyledTransformableElement::localMatrix):
3092         (WebCore::SVGStyledTransformableElement::getCTM):
3093         (WebCore::SVGStyledTransformableElement::getScreenCTM):
3094         (WebCore::SVGStyledTransformableElement::updateLocalTransform):
3095         (WebCore::SVGStyledTransformableElement::parseMappedAttribute):
3096         (WebCore::SVGStyledTransformableElement::nearestViewportElement):
3097         (WebCore::SVGStyledTransformableElement::farthestViewportElement):
3098         * ksvg2/svg/SVGStyledTransformableElement.h:
3099         * ksvg2/svg/SVGTextElement.h:
3100         * ksvg2/svg/SVGTransformable.h:
3101
3102 2006-12-03  Nikolas Zimmermann  <zimmermann@kde.org>
3103
3104         Reviewed by Rob.
3105
3106         Move some files around, which have been forgotton in the platform/graphics move.
3107
3108         * CMakeLists.txt:
3109         * WebCore.xcodeproj/project.pbxproj:
3110         * platform/mac/GraphicsContextMac.mm: Moved to platform/graphics/mac.
3111         * platform/qt/GraphicsContextQt.cpp: Moved to platform/grahpics/qt.
3112
3113 2006-12-03  Nikolas Zimmermann  <zimmermann@kde.org>
3114
3115         Reviewed by Mitz.
3116
3117         Fix non-svg build.
3118
3119         * platform/graphics/GraphicsContext.h:
3120         * platform/mac/GraphicsContextMac.mm:
3121
3122 2006-12-02  John Sullivan  <sullivan@apple.com>
3123
3124         Reviewed by Tim Omernick
3125
3126         Removed a couple of big chunks of duplicated code from the spelling and grammar stuff by merging
3127         the find-next-instance functions with the mark-all-instances functions.
3128
3129         * bridge/mac/FrameMac.mm:
3130         (WebCore::findFirstMisspellingInRange):
3131         added markAll parameter, and reworked loop so that if markAll parameter is true, this function loops
3132         through the entire range and marks each misspelling
3133         (WebCore::findFirstGrammarDetailInRange):
3134         extracted from findFirstBadGrammarInRange; loops through the potentially-multiple details in a given
3135         ungrammatical phrase (e.g., multiple grammar errors in one sentence). Has a markAll parameter akin
3136         to the one in findFirstMisspellingInRange.
3137         (WebCore::findFirstBadGrammarInRange):
3138         added markAll parameter like the one in findFirstMisspellingInRange, and extracted findFirstGrammarDetailInRange
3139         (WebCore::FrameMac::advanceToNextMisspelling):
3140         pass "false" for new markAll parameters
3141         (WebCore::markAllMisspellingsInRange):
3142         now just calls findFirstMisspellingInRange with markAll = true, thus removing a big hunk of duplicated code
3143         (WebCore::markAllBadGrammarInRange):
3144         now just calls findFirstBadGrammarInRange with markAll = true, thus removing a big hunk of duplicated code
3145
3146 2006-12-02  Mitz Pettel  <mitz@webkit.org>
3147
3148         Reviewed by Hyatt.
3149
3150         - fix http://bugs.webkit.org/show_bug.cgi?id=11672
3151           REGRESSION (r17068): Repro crash due to painting without layout
3152
3153         Test: fast/dynamic/containing-block-change.html
3154
3155         * rendering/RenderObject.cpp:
3156         (WebCore::RenderObject::setStyle): Changed the logic used
3157         to find absolutely positioned descendant's current containing block to
3158         match the changes made to containingBlock() in the fix for bug 9347.
3159
3160 2006-12-02  MorganL  <morganl.webkit@yahoo.com>
3161
3162         Reviewed by Darin.
3163
3164         http://bugs.webkit.org/show_bug.cgi?id=11709
3165         DeprecatedString::format is broken on Windows
3166
3167         Use _vscprintf on Windows to compute the length of the buffer that
3168         vsnprintf would need.
3169
3170         * platform/DeprecatedString.cpp:
3171         (WebCore::DeprecatedString::format):
3172         * platform/String.cpp:
3173         (WebCore::String::format):
3174
3175 2006-12-01  Beth Dakin  <bdakin@apple.com>
3176
3177         Reviewed by Adam.
3178
3179         Support for sub-menus in WebCore context menus. This also re-
3180         architects the ContextMenuItem class so that it is more like
3181         ContextMenu in that the class is now really just a wrapper for the
3182         platformDescription
3183
3184         * WebCore.exp:
3185         * WebCore.xcodeproj/project.pbxproj:
3186         * page/ContextMenuController.cpp:
3187         (WebCore::ContextMenuController::contextMenuItemSelected): Add
3188         place-holders for new tags for the sub-menu items. I will flesh
3189         these out in a separate check-in.
3190         * platform/ContextMenu.cpp:
3191         (WebCore::createFontSubMenu):
3192         (WebCore::createSpellingAndGrammarSubMenu):
3193         (WebCore::createSpellingSubMenu):
3194         (WebCore::createSpeechSubMenu):
3195         (WebCore::createWritingDirectionSubMenu):
3196         (WebCore::ContextMenu::populate): Call the above functions to add
3197         the appropriate sub-menus to editing context menus.
3198         * platform/ContextMenu.h:
3199         * platform/ContextMenuItem.h:
3200         (WebCore::): New tags in the ContextMenuAction enumeration.
3201         (WebCore::ContextMenuItem::parentMenu):
3202         (WebCore::ContextMenuItem::setType):
3203         * platform/PlatformMenuDescription.h: Added. This defines
3204         PlatformMenuDesciption. It needs to be its own header because we
3205        have to include it from ContextMenu.h and ContextMenuItem.h
3206         * platform/mac/ContextMenuItemMac.mm: Lots of adjustments here to
3207         make this class basically just be a wrapper for NSMenuItem.
3208         (WebCore::ContextMenuItem::ContextMenuItem):
3209         (WebCore::ContextMenuItem::~ContextMenuItem):
3210         (WebCore::ContextMenuItem::platformDescription):
3211         (WebCore::ContextMenuItem::action):
3212         (WebCore::ContextMenuItem::title):
3213         (WebCore::ContextMenuItem::platformSubMenu):
3214         (WebCore::ContextMenuItem::setAction):
3215         (WebCore::ContextMenuItem::setTitle):
3216         (WebCore::ContextMenuItem::setSubMenu):
3217         * platform/mac/ContextMenuMac.mm:
3218         (WebCore::ContextMenu::ContextMenu):
3219         (WebCore::getNSMenuItem): Now we only have to get the
3220         platformDescription of the ContextMenuItem and then set its target
3221         and action.
3222         (WebCore::ContextMenu::itemCount):
3223
3224 2006-12-01  Kevin McCullough  <KMcCullough@apple.com>
3225
3226         Reviewed by .
3227
3228         - accidentally checked in with previous checkin
3229
3230         * platform/qt/FrameQt.cpp:
3231         (WebCore::FrameQt::keyEvent):
3232
3233 2006-12-01  Kevin McCullough  <KMcCullough@apple.com>
3234
3235         Reviewed by Adam.
3236
3237         - better solution to the ambiguous reference
3238
3239         * platform/Widget.h:
3240         (WebCore::Widget::handleMouseMoveEvent):
3241         (WebCore::Widget::handleMouseReleaseEvent):
3242         * platform/qt/FrameQt.cpp:
3243         (WebCore::FrameQt::keyEvent):
3244         * platform/win/PlatformScrollBar.h:
3245         * platform/win/TemporaryLinkStubs.cpp:
3246         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
3247         (WebCore::PlatformScrollbar::handleMouseReleaseEvent):
3248
3249 2006-12-01  Justin Garcia  <justin.garcia@apple.com>
3250
3251         Reviewed by john
3252         
3253         <rdar://problem/4826940>
3254         Selection change performed even when delete delegate replies NO (11415)
3255
3256         No layout test for the bug fix, because there's no way to register a custom
3257         editing delegate from a layout test.  Layout tests are effected by the change
3258         to avoid sending unnecessary shouldChangeSelections, however. 
3259
3260         * editing/Editor.cpp:
3261         (WebCore::Editor::appliedEditing): Don't bother sending shouldChangeSelection
3262         if the editing operation didn't change the selection.  Still call
3263         setSelection though, because it does work in this case that's necessary,
3264         like clearing the typing style.
3265         (WebCore::Editor::unappliedEditing): Ditto.
3266         (WebCore::Editor::reappliedEditing): Ditto.
3267         * editing/TypingCommand.cpp:
3268         (WebCore::TypingCommand::deleteKeyPressed): Don't set the starting
3269         selection if the editing delegate returns NO from shouldDeleteRange.
3270         Notice we now call setStartingSelection in the case where
3271         the current selection was a range selection.  This is fine because
3272         it's a no-op (the starting selection is already the current selection).
3273         (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
3274
3275 2006-12-01  John Sullivan  <sullivan@apple.com>
3276
3277         Reviewed by Darin
3278         
3279         Move subrange helper function from spellchecking code to TextIterator
3280
3281         * editing/TextIterator.h:
3282         added TextIterator::subrange
3283         * editing/TextIterator.cpp:
3284         (WebCore::CharacterIterator::advance):
3285         early return if count is <= 0; assert that it's not < 0
3286         (WebCore::TextIterator::subrange):
3287         new function, moved from FrameMac.mmm
3288
3289         * bridge/mac/FrameMac.mm:
3290         moved subrange() function to TextIterator
3291         (WebCore::FrameMac::advanceToNextMisspelling):
3292         use TextIterator::subrange
3293         (WebCore::markAllMisspellingsInRange):
3294         ditto
3295         (WebCore::markAllBadGrammarInRange):
3296         ditto
3297
3298 2006-12-01  Darin Adler  <darin@apple.com>
3299
3300         Reviewed by Mitz.
3301
3302         - fix http://bugs.webkit.org/show_bug.cgi?id=11628
3303           REGRESSION (r17597): Command-return in native text fields doesn't open a new tab or window
3304
3305         I couldn't think of an easy way to make a regression test for this, but maybe
3306         I'll get an idea later about how to do it.
3307
3308         The main thing I did was add a concept of a DOM event having an "underlying event".
3309         That allows the DOM activate event to contain inside it the original keyboard event
3310         that triggered the form submission, and thus allows WebKit to see the modifier keys
3311         from that original event. The code that uses the underlying event is in WebKit, but
3312         the code to set it up is here in WebCore.
3313
3314         - also do some clean-up to related event handling code
3315
3316         * bindings/js/kjs_events.cpp: (KJS::DOMEvent::getValueProperty): Updated for the
3317         name change of cancelBubble.
3318
3319         * dom/Event.h: Removed a useless comment. Fixed some whitespace and formatting.
3320         Renamed getCancelBubble to cancelBubble to match the DOM -- I suspect the old
3321         name predated the use of the m_ prefix on data members. Added the underlying event,
3322         and a getter and setter.
3323         * dom/Event.cpp:
3324         (WebCore::Event::setTarget): Updated to take a PassRefPtr.
3325         (WebCore::Event::setUnderlyingEvent): Added.
3326
3327         * dom/EventTargetNode.h: Added an optional underlyingEvent parameter to
3328         dispatchUIEvent, one of the overloads of dispatchMouseEvent, and
3329         dispatchSimulatedMouseEvent. Added a new dispatchSimulatedClick function here that
3330         mostly replaces the click function in HTMLElement.
3331         * dom/EventTargetNode.cpp:
3332         (WebCore::EventTargetNode::dispatchGenericEvent): Updated for the name change
3333         of cancelBubble.
3334         (WebCore::EventTargetNode::dispatchUIEvent): Added an underlying event parameter,
3335         which gets attached to the UIEvent object after it's created.
3336         (WebCore::EventTargetNode::dispatchMouseEvent): Tweaked formatting and parameter
3337         name for the version that creates a mouse event for a real platform mouse event.
3338         Added an underlying event parameter to the main version, and attached it to all
3339         three of the events that can be dispatched.
3340         (WebCore::EventTargetNode::dispatchSimulatedMouseEvent): Added an underlying
3341         event parameter, passed it along to dispatchMouseEvent.
3342         (WebCore::EventTargetNode::dispatchSimulatedClick): Moved this here from HTMLElement
3343         and renamed it from click. Added an underlyingEvent parameter, and passed that along
3344         in all three of the calls to dispatchSimulatedMouseEvent.
3345
3346         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::shouldClose): Updated call to
3347         setTarget that no longer needs a get().
3348         * ksvg2/svg/SVGElement.cpp: (WebCore::SVGElement::sendSVGLoadEventIfPossible): Ditto.
3349
3350         * html/HTMLAnchorElement.cpp:
3351         (WebCore::HTMLAnchorElement::defaultEventHandler): Converted a call to click
3352         to a call to dispatchSimulatedClick.
3353         (WebCore::HTMLAnchorElement::accessKeyAction): Ditto.
3354         * html/HTMLButtonElement.cpp:
3355         (WebCore::HTMLButtonElement::accessKeyAction): Ditto.
3356         * html/HTMLElement.h: Removed the parameters to click and made it non-virtual.
3357         We could move it down to the input and button elements, now that it's just
3358         a single function call, but it's also OK to just leave it here.
3359         * html/HTMLElement.cpp:
3360         (WebCore::HTMLElement::click): Removed the parameters and changed this to just
3361         call dispatchSimulatedClick. The real work is now in dispatchSimulatedClick.
3362         (WebCore::HTMLElement::accessKeyAction): Converted a call to click to a call to
3363         dispatchSimulatedClick.
3364         * html/HTMLFormElement.cpp:
3365         (WebCore::HTMLFormElement::submitClick): Ditto. But unlike accessKeyAction callers,
3366         pass the event along as the underlying event.
3367         * html/HTMLInputElement.h:
3368         * html/HTMLInputElement.cpp: Removed override of virtual click function. The
3369         special cases for the file control and hidden input elements aren't needed.
3370         (WebCore::HTMLInputElement::accessKeyAction): Converted a call to click to a call to
3371         dispatchSimulatedClick.
3372         (WebCore::HTMLInputElement::defaultEventHandler): Converted calls to click to calls to
3373         dispatchSimulatedClick, passing along the event as the underlying event.
3374         * html/HTMLLabelElement.cpp:
3375         (WebCore::HTMLLabelElement::defaultEventHandler): Converted a call to click to a call
3376         to dispatchSimulatedClick, passing the event along as the underlying event. Also
3377         changed the local variable for the element to a RefPtr since the code assumes it's
3378         still around after calling arbitrary JavaScript code.
3379         * html/HTMLSelectElement.cpp:
3380         (WebCore::HTMLSelectElement::accessKeyAction): Converted a call to click to a call to
3381         dispatchSimulatedClick.
3382
3383         * rendering/RenderFileUploadControl.h:
3384         * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::click):
3385         Removed unneeded ignored parameter to the click function, and also made it non-virtual.
3386
3387         * loader/NavigationAction.h: Removed unneeded includes.
3388         * loader/NavigationAction.cpp: Moved all the code here from NavigationActionMac.mm,
3389         since none of it is Mac-specific any more.
3390         * loader/mac/NavigationActionMac.mm: Removed.
3391         * WebCore.xcodeproj/project.pbxproj: Updated for removed file.
3392
3393         * ksvg2/svg/SVGAElement.cpp: Removed an unnecessary include.
3394
3395         * loader/FrameLoader.cpp: Added a newly-needed incluude.
3396         * loader/mac/DocumentLoaderMac.mm: Ditto.
3397         * loader/mac/FrameLoaderMac.mm: Ditto.
3398         * rendering/RenderWidget.cpp: Ditto.
3399
3400 2006-12-01  John Sullivan  <sullivan@apple.com>
3401
3402         Reviewed by Darin
3403
3404         - fixed <rdar://problem/4811175> Many false reports of bad grammar appear, caused by 
3405           insufficient context passed to grammar checker
3406
3407         * bridge/mac/FrameMac.mm:
3408         (WebCore::markAllMisspellingsInRange):
3409         new function, extracted from markMisspellings -- ignores grammar
3410         (WebCore::markAllBadGrammarInRange):
3411         new function, extracted from markMisspellings -- ignores spelling, and operates on
3412         appropriately-sized chunks of text
3413         (WebCore::FrameMac::markMisspellings):
3414         now calls markAllMisspellingsInRange and (optionally) markAllBadGrammarInRange rather
3415         than trying to interweave the spelling and grammar logic
3416
3417 2006-12-01  John Sullivan  <sullivan@apple.com>
3418
3419         Reviewed by Darin
3420
3421         With these changes, grammar checking works correctly for the one-by-one case.
3422         It still doesn't work correctly for the check-as-you-type case; I need to make these
3423         same kinds of changes in markMisspellings, and refactor to share more code between
3424         the two cases, but I wanted to get this working code in before modifying it further.
3425
3426         The major change here is that advanceToNextMisspelling used to look at small chunks of
3427         text at a time, checking each one for both misspellings and questionable grammar. But
3428         grammar checking needs at least paragraph-sized chunks of text to have enough context
3429         to work correctly, so the old mechanism was causing many spurious complaints of bad
3430         grammar (e.g., almost every word seemed to be at the start of a sentence so the checker
3431         would complain about missing capitalization). So now the spell checker runs in the
3432         specified range first. Then the grammar checker runs on the same range (stopping at the
3433         next misspelling, if any), but expanded to paragraph-aligned boundaries.
3434
3435         * bridge/mac/FrameMac.mm:
3436         (WebCore::findFirstMisspellingInRange):
3437         new function, extracted from advanceToNextMisspelling, and ignores grammar
3438         (WebCore::paragraphAlignedRangeForRange):
3439         new function, used by findNextBadGrammarInRange
3440         (WebCore::findFirstBadGrammarInRange):
3441         new function, extracted from advanceToNextMisspelling, and rewritten to use paragraph-aligned
3442         chunks, and ignores spelling
3443         (WebCore::subrange):
3444         new helper function, used by advanceToNextMisspelling
3445         (WebCore::FrameMac::advanceToNextMisspelling):
3446         now calls out to both findFirstMisspellingInRange and findFirstBadGrammarInRange separately
3447         instead of trying to interweave the spelling and grammar logic
3448
3449 2006-12-01  Don Gibson  <dgibson77@gmail.com>
3450
3451         Reviewed by Mitz.
3452
3453         http://bugs.webkit.org/show_bug.cgi?id=11732:
3454         Windows build bustage.
3455
3456         * WebCore.vcproj/WebCore/WebCore.vcproj:
3457         * bridge/win/ChromeClientWin.h:
3458         * bridge/win/ContextMenuClientWin.h:
3459         * bridge/win/EditorClientWin.h:
3460         * bridge/win/FrameWin.cpp:
3461         (WebCore::FrameWin::FrameWin):
3462         (WebCore::FrameWin::keyPress):
3463         * bridge/win/FrameWin.h:
3464         * loader/win/FrameLoaderClientWin.h:
3465         * platform/ContextMenu.h:
3466         * platform/Widget.h:
3467         * platform/win/PlatformScrollBar.h:
3468         * platform/win/TemporaryLinkStubs.cpp:
3469         (WebCore::ChromeClientWin::chromeDestroyed):
3470         (WebCore::ChromeClientWin::addMessageToConsole):
3471         (WebCore::ContextMenu::ContextMenu):
3472         (WebCore::ContextMenu::~ContextMenu):
3473         (WebCore::ContextMenu::appendItem):
3474         (WebCore::ContextMenuClientWin::contextMenuDestroyed):
3475         (WebCore::ContextMenuClientWin::contextMenuItemSelected):
3476         (WebCore::ContextMenuItem::~ContextMenuItem):
3477         (WebCore::Editor::newGeneralClipboard):
3478         (WebCore::EditorClientWin::pageDestroyed):
3479         (WebCore::EditorClientWin::smartInsertDeleteEnabled):
3480         (WebCore::EditorClientWin::shouldInsertNode):
3481         (WebCore::FrameLoader::createPlugin):
3482         (WebCore::FrameLoaderClientWin::frameLoaderDestroyed):
3483         (WebCore::FrameLoaderClientWin::hasWebView):
3484         (WebCore::FrameLoaderClientWin::canHandleRequest):
3485         (WebCore::FrameWin::unfocusWindow):
3486         (WebCore::FrameWin::bindingRootObject):
3487         (WebCore::FrameWin::issueCopyCommand):
3488         (WebCore::FrameWin::markMisspellings):
3489         (WebCore::FrameWin::issueTransposeCommand):
3490         (WebCore::FrameWin::markedTextRange):
3491         (WebCore::FrameWin::respondToChangedSelection):
3492         (WebCore::FrameWin::markMisspellingsInAdjacentWords):
3493         (WebCore::FrameWin::isSelectionMisspelled):
3494         (WebCore::FrameWin::guessesForMisspelledSelection):
3495         (WebCore::Pasteboard::generalPasteboard):
3496         (WebCore::Pasteboard::writeSelection):
3497         (WebCore::Pasteboard::clearTypes):
3498         (WebCore::Pasteboard::canSmartReplace):
3499         (WebCore::Pasteboard::documentFragment):
3500         (WebCore::Pasteboard::plainText):
3501         (WebCore::Pasteboard::Pasteboard):
3502         (WebCore::Pasteboard::~Pasteboard):
3503         (WebCore::Pasteboard::registerSelectionPasteboardTypes):
3504         (WebCore::Pasteboard::replaceNBSP):
3505         (WebCore::Pasteboard::createHandle):
3506         (WebCore::Pasteboard::createCF_HTMLFromRange):
3507
3508 2006-11-30  Geoffrey Garen  <ggaren@apple.com>
3509
3510         Rubber Stamped by Anders Carlsson.
3511
3512         Global rename of Document::focusNode to Document::focusedNode. 'focusNode'
3513         suggested a command, and conflicted with a different meaning for 'focusNode'
3514         in the Mozilla selection API.
3515
3516 2006-11-30  John Sullivan  <sullivan@apple.com>
3517
3518         Reviewed by Justin
3519
3520         With Darin, fixed a problem in the Range constructors found while implementing grammar checking.
3521         That revealed another problem in the layout tests involving bad parameters passed to the Range
3522         constructors.
3523         
3524         With these fixes in place, one layout test (editing/execCommand/create-list-from-range-selection.html)
3525         no longer works as intended. This is apparently due to yet another bug being flushed out somewhere.
3526         I'm going to update the results for that test and file a separate radar about it, which Justin will
3527         investigate.
3528
3529         * dom/Position.h:
3530         removed equivalentRangeCompliantPosition(), which was declared but not implemented or called.
3531         
3532         * dom/Range.cpp:
3533         (WebCore::Range::Range):
3534         Call setStart and setEnd in the two Range constructors that take parameters, rather than just 
3535         directly setting the instance variables. This makes Range perform the boundary checks and
3536         compensations that the DOM spec requires.
3537         
3538         * editing/CompositeEditCommand.cpp:
3539         (WebCore::CompositeEditCommand::moveParagraphs):
3540         Use rangeCompliantEquivalent() on "editing-style" Positions before creating Ranges from them.
3541         
3542         * editing/TextIterator.cpp:
3543         (WebCore::TextIterator::TextIterator):
3544         Assert that the boundary points of the range are valid.
3545
3546 2006-11-30  Lou Amadio  <lamadio@apple.com>
3547
3548         Reviewed by Dave Hyatt
3549         Cleaned up generated files.
3550
3551         * html/HTMLElement.cpp:
3552         (WebCore::HTMLElement::isRecognizedTagName):
3553                 Uses the new method for retrieving the list of supported tags
3554         * ksvg2/scripts/make_names.pl:
3555                 Generates tag lists without using macros.
3556
3557 2006-11-30  Adam Roben  <aroben@apple.com>
3558
3559         Reviewed by Beth.
3560
3561         Store ContextMenu's NSMutableArray inside a RetainPtr so that we
3562         will retain/release it correctly.
3563
3564         * WebCore.exp:
3565         * platform/ContextMenu.cpp:
3566         (WebCore::ContextMenu::populate): Added a FIXME.
3567         * platform/ContextMenu.h:
3568         * platform/mac/ContextMenuMac.mm: 
3569         (WebCore::ContextMenu::ContextMenu):
3570         (WebCore::ContextMenu::~ContextMenu):
3571         (WebCore::getNSMenuItem):
3572         (WebCore::ContextMenu::appendItem):
3573         (WebCore::ContextMenu::itemCount):
3574         (WebCore::ContextMenu::insertItem):
3575         (WebCore::ContextMenu::setPlatformDescription):
3576         (WebCore::ContextMenu::platformDescription):
3577
3578 2006-11-30  Nikolas Zimmermann  <zimmermann@kde.org>
3579
3580         Reviewed by Eric. Rubber stamped by Oliver.
3581
3582         Fixes: http://bugs.webkit.org/show_bug.cgi?id=10383
3583      
3584         This is the final patch after the long "die kcanvas" journey.
3585
3586         All old kcanvas code is gone now, and properly integrated within
3587         WebCore (stuff like GraphicsContext changes etc.). It shares
3588         the platform/ design concept: no subclassing, but instead
3589         implementing parts of the classes/methods per-platform.
3590