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