7cf27a89fe2d3de5ce9b5ec9706889f68e2b016c
[WebKit-https.git] / WebCore / ChangeLog
1 2006-10-30  Darin Adler  <darin@apple.com>
2
3         - fix build
4
5         * loader/ResourceLoader.h: Added header guard.
6
7 2006-10-31  Darin Adler  <darin@apple.com>
8
9         Reviewed by Adam.
10
11         - fix FrameLoader files so they can be built on non-Mac platforms
12
13         * page/FramePrivate.h:
14         (WebCore::FramePrivate::FramePrivate): Added code to create the frame loader.
15         (WebCore::FramePrivate::~FramePrivate): Added code to delete the frame loader.
16
17         * page/Page.h:
18         * page/Page.cpp: (WebCore::Page::setDefersLoading): Removed the
19         #if PLATFORM(MAC) that Adam added as a stop-gap when I did this wrong
20         the other day.
21
22         * bridge/mac/FrameMac.mm:
23         (WebCore::FrameMac::FrameMac): Removed code to create the frame loader.
24         (WebCore::FrameMac::~FrameMac): Removed code to delete the frame loader.
25
26         * loader/FrameLoader.h: Changed import to include, added #if PLATFORM(MAC)
27         around the PolicyCheck definition.
28
29         * loader/FormState.cpp: Changed import to include.
30         * loader/FrameLoader.cpp: Ditto.
31         * loader/MainResourceLoader.h: Ditto.
32
33         * loader/FrameLoaderTypes.h: Added a header guard.
34
35         * loader/NetscapePlugInStreamLoader.h: Changed import to include.
36         Added #if PLATFORM(MAC) around Mac-specific details.
37         * loader/SubresourceLoader.h: Ditto.
38
39         * page/Frame.cpp: (WebCore::Frame::loader): Updated name of loader to
40         m_loader from m_frameLoader.
41
42         * CMakeLists.txt: Updated.
43         * WebCoreSources.bkl: Updated.
44
45 2006-10-30  Nikolas Zimmermann  <zimmermann@kde.org>
46
47         Reviewed and landed by Anders.
48
49         Patch by Zack rusin to fix: 
50         http://bugs.webkit.org/show_bug.cgi?id=11429
51
52         Fix startup crash.
53
54         * platform/qt/FrameQtClient.cpp:
55         (WebCore::FrameQtClientDefault::openURL):
56
57 2006-10-30  Zach Rusin  <zack@kde.org>
58
59         Reviewed and landed by Anders.
60
61         * platform/network/qt/ResourceHandleQt.cpp:
62         (WebCore::ResourceHandle::receivedResponse):
63         * platform/qt/FrameQtClient.cpp:
64         (WebCore::FrameQtClientDefault::FrameQtClientDefault):
65         * platform/qt/LoaderFunctionsQt.cpp:
66         (WebCore::ServeSynchronousRequest):
67         More build fixes.
68
69 2006-10-30  Simon Hausmann  <hausmann@kde.org>
70
71         Reviewed and landed by Anders.
72         
73         - fix Qt build
74         * platform/qt/FrameQtClient.cpp: ResourceLoaderClient ->
75         ResourceHandleClient
76
77 2006-10-30  Darin Adler  <darin@apple.com>
78
79         Reviewed by John Sullivan.
80
81         - work toward removing Objective-C data types from FrameLoader.h:
82           removed NSDate, NSString, WebCorePageState, WebCoreResourceLoader,
83           and WebCoreResourceHandle
84         - moved bodyBackgroundColor function from Frame to WebFrame in WebKit
85
86         * page/PageState.h:
87         * page/PageState.cpp: Added, C++ class with much of what WebCorePageState had.
88
89         * bridge/mac/FrameMac.h: Removed uneeeded declarations and bodyBackgroundColor().
90         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::startRedirectionTimer): Use a
91         double for the date instead of an NSDate.
92
93         * bridge/mac/WebCoreFrameBridge.h:
94         * bridge/mac/WebCoreFrameBridge.mm: Removed invalidatePageCache and
95         saveDocumentToPageCache methods.
96
97         * bridge/mac/WebCorePageState.h:
98         * bridge/mac/WebCorePageState.mm: Removed most of the class and turned it into
99         an Objective-C wrapper for PageState.
100
101         * loader/FrameLoader.h: Removed unused Objective-C types, eliminated use of
102         NSDate and WebCorePageState.
103         * loader/FrameLoaderClient.h: Changed NSDate to double.
104         * loader/mac/FrameLoaderMac.mm:
105         (WebCore::FrameLoader::receivedMainResourceError): Moved call to setInPageCache
106         here that used to be in invalidateCurrentItemPageCache on the WebKit side.
107         (WebCore::FrameLoader::clientRedirected): Changed NSDate to double for date.
108         (WebCore::FrameLoader::open): Moved one of the open functions that was part of
109         commitProvisionalLoad inside the commitProvisionalLoad function, so that it can
110         extract the parameters from the response. Changed the open function that takes
111         a PageState to use the new C++ PageState.
112         (WebCore::FrameLoader::commitProvisionalLoad): Added the code from the open
113         function; tightened up logic, removing a few cases that could never happen, as
114         well as the unused reload boolean.
115
116         * ForwardingHeaders/kjs/property_map.h: Added.
117
118         * WebCore.exp: Updated.
119         * WebCore.xcodeproj/project.pbxproj: Updated.
120
121 2006-10-29  Maciej Stachowiak  <mjs@apple.com>
122
123         Reviewed by Anders.
124
125         - added ResourceResponse class and didReceiveResponse delegate call
126         
127         * WebCore.xcodeproj/project.pbxproj: Added new files.
128         * bridge/mac/WebCoreFrameBridge.h: Removed no longer needed
129         expiresTimeForResponse: method.
130         * dom/XMLTokenizer.cpp:
131         (WebCore::openFunc): Updated to use ResourceResponse.
132         * loader/FrameLoader.h: Update loadResourceSynchronously to
133         use ResourceResponse.
134         * loader/LoaderFunctions.h:
135         * loader/icon/IconLoader.cpp:
136         (IconLoader::didReceiveResponse): Updated from receivedResponse
137         and made cross-platform.
138         * loader/icon/IconLoader.h: updated for above change
139         * loader/loader.cpp:
140         (WebCore::Loader::receivedResponse): reduced to just saving
141         the PlatformResponse (ideally we'd phase out use of this).
142         (WebCore::Loader::didReceivedResponse): most of the ReceivedResponse 
143         logic.
144         * loader/loader.h:
145         * loader/mac/FrameLoaderMac.mm:
146         (WebCore::FrameLoader::loadResourceSynchronously): Return results
147         as ResourceResponse.
148         * loader/mac/IconLoaderMac.mm: remove receivedResponse.
149         * loader/mac/LoaderFunctionsMac.mm:
150         (WebCore::ServeSynchronousRequest): take ResourceResponse as
151         argument.
152         * platform/network/ResourceHandle.cpp:
153         * platform/network/ResourceHandle.h: Remove calls for
154         broken out response pieces.
155         * platform/network/ResourceHandleClient.h:
156         (WebCore::ResourceHandleClient::didReceiveResponse): New
157         delegate method.
158         * platform/network/ResourceHandleInternal.h:
159         (WebCore::ResourceHandleInternal::ResourceHandleInternal): Remove
160         storage of response bits, we're not gonna return them
161         seprately any more.
162         * platform/network/ResourceResponse.h: Added.
163         (WebCore::ResourceResponse::ResourceResponse): Freshly
164         implemented. Same for below.
165         (WebCore::ResourceResponse::url):
166         (WebCore::ResourceResponse::mimeType):
167         (WebCore::ResourceResponse::expectedContentLength):
168         (WebCore::ResourceResponse::textEncodingName):
169         (WebCore::ResourceResponse::suggestedFilename):
170         (WebCore::ResourceResponse::httpStatusCode):
171         (WebCore::ResourceResponse::setHTTPStatusCode):
172         (WebCore::ResourceResponse::httpHeaderField):
173         (WebCore::ResourceResponse::httpHeaderFields):
174         (WebCore::ResourceResponse::isMultipart):
175         (WebCore::ResourceResponse::setExpirationDate):
176         (WebCore::ResourceResponse::expirationDate):
177         * platform/network/cf/ResourceHandleCFNet.cpp:
178         (WebCore::didReceiveResponse): Send didReceiveResponse
179         client method.
180         * platform/network/cf/ResourceResponseCFNet.h: Added.
181         * platform/network/cf/ResourceResponseCFNet.mm: Added.
182         (getResourceResponse): Helper function to get a ResourceResponse 
183         from CFURLResponseRef.
184         * platform/network/mac/ResourceHandleMac.mm:
185         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
186         Don't bother cleaning up fields we no longer have.
187         (WebCore::ResourceHandle::receivedResponse): Send
188         didReceiveResponse client method.
189         * platform/network/mac/ResourceResponseMac.h: Added.
190         * platform/network/mac/ResourceResponseMac.mm: Added.
191         (getResourceResponse): Helper function to get a ResourceResponse 
192         from an NSURLResponse*.
193         * rendering/HitTestResult.cpp:
194         * xml/XSLTProcessor.cpp:
195         (WebCore::docLoaderFunc): Prepare for use of ResourceResponse.
196         * xml/xmlhttprequest.cpp:
197         (WebCore::XMLHttpRequest::getResponseText): Store http response
198         info in the form of a ResourceResponse, change all methods to
199         account for this.
200         (WebCore::XMLHttpRequest::getResponseXML):
201         (WebCore::XMLHttpRequest::XMLHttpRequest):
202         (WebCore::XMLHttpRequest::open):
203         (WebCore::XMLHttpRequest::send):
204         (WebCore::XMLHttpRequest::getAllResponseHeaders):
205         (WebCore::XMLHttpRequest::getResponseHeader):
206         (WebCore::XMLHttpRequest::getStatus):
207         (WebCore::XMLHttpRequest::getStatusText):
208         (WebCore::XMLHttpRequest::processSyncLoadResults):
209         (WebCore::XMLHttpRequest::didFinishLoading):
210         (WebCore::XMLHttpRequest::didReceiveResponse):
211         (WebCore::XMLHttpRequest::didReceiveData):
212         * xml/xmlhttprequest.h:
213
214 2006-10-29  Darin Adler  <darin@apple.com>
215
216         - fix build
217
218         * loader/DocumentLoader.h: Add declarations so this compiles without ObjC.
219         * loader/NetscapePlugInStreamLoader.h: Ditto.
220         * loader/ResourceLoader.h: Ditto.
221
222 2006-10-29  Darin Adler  <darin@apple.com>
223
224         - one last name change -- WebFormState.h to FormState.h
225         - added more empty placeholder platform-independent files
226           for currently-Mac-specific loader classes
227
228         * loader/FormState.cpp: Updated include.
229         * loader/FrameLoader.cpp: Updated include.
230         * loader/mac/FrameLoaderMac.mm: Updated include.
231
232         * loader/WebFormState.h: Removed.
233         * loader/FormState.h: Added.
234
235         * loader/DocumentLoader.cpp: Added.
236         * loader/MainResourceLoader.cpp: Added.
237         * loader/NetscapePlugInStreamLoader.cpp: Added.
238         * loader/ResourceLoader.cpp: Added.
239         * loader/SubresourceLoader.cpp: Added.
240
241         * WebCore.xcodeproj/project.pbxproj: Updated for changes above.
242
243 2006-10-29  Darin Adler  <darin@apple.com>
244
245         - did the do-webcore-rename renames, including a number of changes
246           to the names of loader files (and WebResourceLoader -> ResourceLoader),
247           jScript() to scriptProxy(), jScriptEnabled() to javaScriptEnabled(),
248           and improvements to the names of decoder classes and their source
249           files (Decoder -> TextResourceDecoder, StreamingTextDecoder -> TextCodec)
250
251         * CMakeLists.txt:
252         * WebCore.exp:
253         * WebCore.vcproj/WebCore/WebCore.vcproj:
254         * WebCore.xcodeproj/project.pbxproj:
255         * WebCoreSources.bkl:
256         * bindings/js/kjs_binding.cpp:
257         (KJS::ScriptInterpreter::updateDOMNodeDocument):
258         * bindings/js/kjs_events.cpp:
259         (KJS::JSAbstractEventListener::handleEvent):
260         (KJS::JSLazyEventListener::parseCode):
261         * bindings/js/kjs_html.cpp:
262         (KJS::JSHTMLElement::implementsCall):
263         * bindings/js/kjs_traversal.cpp:
264         (KJS::JSNodeFilterCondition::acceptNode):
265         * bindings/js/kjs_window.cpp:
266         (KJS::Window::interpreter):
267         (KJS::Window::retrieveWindow):
268         (KJS::Window::retrieve):
269         (KJS::ScheduledAction::execute):
270         * bindings/objc/DOMInternal.mm:
271         (-[WebScriptObject _initializeScriptDOMNodeImp]):
272         * bridge/mac/FrameMac.mm:
273         (WebCore::FrameMac::executionContextForDOM):
274         (WebCore::FrameMac::bindingRootObject):
275         (WebCore::FrameMac::windowScriptObject):
276         (WebCore::FrameMac::windowScriptNPObject):
277         (WebCore::FrameMac::partClearedInBegin):
278         * bridge/mac/WebCoreEncodings.mm:
279         * bridge/mac/WebCoreFrameBridge.mm:
280         (-[WebCoreFrameBridge aeDescByEvaluatingJavaScriptFromString:]):
281         (-[WebCoreFrameBridge stringWithData:]):
282         (-[WebCoreFrameBridge executionContextForView:]):
283         * bridge/win/FrameWin.cpp:
284         * dom/Document.cpp:
285         (WebCore::Document::inputEncoding):
286         (WebCore::Document::setCharset):
287         (WebCore::Document::createHTMLEventListener):
288         (WebCore::Document::setDecoder):
289         * dom/Document.h:
290         (WebCore::Document::decoder):
291         * dom/EventTargetNode.cpp:
292         (WebCore::EventTargetNode::dispatchGenericEvent):
293         * html/HTMLParser.cpp:
294         (WebCore::HTMLParser::noscriptCreateErrorCheck):
295         (WebCore::HTMLParser::canvasCreateErrorCheck):
296         (WebCore::HTMLParser::isInline):
297         * html/HTMLPlugInElement.cpp:
298         (WebCore::HTMLPlugInElement::createNPObject):
299         * html/HTMLScriptElement.cpp:
300         (WebCore::HTMLScriptElement::evaluateScript):
301         * html/HTMLTokenizer.cpp:
302         (WebCore::HTMLTokenizer::parseTag):
303         (WebCore::HTMLTokenizer::processToken):
304         * ksvg2/misc/SVGDocumentExtensions.cpp:
305         (WebCore::SVGDocumentExtensions::createSVGEventListener):
306         * loader/CachedCSSStyleSheet.cpp:
307         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
308         (WebCore::CachedCSSStyleSheet::setEncoding):
309         * loader/CachedCSSStyleSheet.h:
310         * loader/CachedXBLDocument.cpp:
311         (WebCore::CachedXBLDocument::CachedXBLDocument):
312         (WebCore::CachedXBLDocument::setEncoding):
313         * loader/CachedXBLDocument.h:
314         * loader/CachedXSLStyleSheet.cpp:
315         (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
316         (WebCore::CachedXSLStyleSheet::setEncoding):
317         * loader/CachedXSLStyleSheet.h:
318         * loader/Decoder.cpp: Removed.
319         * loader/Decoder.h: Removed.
320         * loader/FrameLoader.cpp:
321         * loader/FrameLoader.h:
322         * loader/FrameLoaderClient.h:
323         * loader/MainResourceLoader.h: Added.
324         * loader/NetscapePlugInStreamLoader.h: Added.
325         * loader/Request.h:
326         (WebCore::Request::cachedResource):
327         * loader/ResourceLoader.h: Added.
328         * loader/SubresourceLoader.h: Added.
329         * loader/TextResourceDecoder.cpp: Added.
330         (WebCore::TextResourceDecoder::determineContentType):
331         (WebCore::TextResourceDecoder::defaultEncoding):
332         (WebCore::TextResourceDecoder::TextResourceDecoder):
333         (WebCore::TextResourceDecoder::~TextResourceDecoder):
334         (WebCore::TextResourceDecoder::setEncoding):
335         (WebCore::TextResourceDecoder::checkForBOM):
336         (WebCore::TextResourceDecoder::checkForCSSCharset):
337         (WebCore::TextResourceDecoder::checkForHeadCharset):
338         (WebCore::TextResourceDecoder::detectJapaneseEncoding):
339         (WebCore::TextResourceDecoder::decode):
340         (WebCore::TextResourceDecoder::flush):
341         * loader/TextResourceDecoder.h: Added.
342         * loader/WebDocumentLoader.h: Removed.
343         * loader/WebLoader.h: Removed.
344         * loader/WebMainResourceLoader.h: Removed.
345         * loader/WebNetscapePlugInStreamLoader.h: Removed.
346         * loader/WebSubresourceLoader.h: Removed.
347         * loader/loader.cpp:
348         (WebCore::Loader::servePendingRequests):
349         (WebCore::Loader::receivedAllData):
350         (WebCore::Loader::receivedResponse):
351         (WebCore::Loader::didReceiveData):
352         (WebCore::Loader::cancelRequests):
353         (WebCore::Loader::jobForRequest):
354         * loader/mac/DocumentLoaderMac.mm:
355         * loader/mac/FormDataStream.m: Added.
356         * loader/mac/FrameLoaderMac.mm:
357         (WebCore::FrameLoader::cancelPendingArchiveLoad):
358         (WebCore::FrameLoader::addPlugInStreamLoader):
359         (WebCore::FrameLoader::removePlugInStreamLoader):
360         (WebCore::FrameLoader::addSubresourceLoader):
361         (WebCore::FrameLoader::removeSubresourceLoader):
362         (WebCore::FrameLoader::willSendRequest):
363         (WebCore::FrameLoader::didReceiveAuthenticationChallenge):
364         (WebCore::FrameLoader::didCancelAuthenticationChallenge):
365         (WebCore::FrameLoader::didReceiveResponse):
366         (WebCore::FrameLoader::didReceiveData):
367         (WebCore::FrameLoader::didFinishLoad):
368         (WebCore::FrameLoader::didFailToLoad):
369         (WebCore::FrameLoader::open):
370         (WebCore::FrameLoader::willUseArchive):
371         (WebCore::FrameLoader::isArchiveLoadPending):
372         * loader/mac/ImageDocumentMac.mm:
373         * loader/mac/LoaderFunctionsMac.mm:
374         (WebCore::CheckCacheObjectStatus):
375         * loader/mac/MainResourceLoaderMac.mm:
376         (WebCore::MainResourceLoader::MainResourceLoader):
377         (WebCore::MainResourceLoader::releaseDelegate):
378         (WebCore::MainResourceLoader::didCancel):
379         (WebCore::MainResourceLoader::addData):
380         (WebCore::MainResourceLoader::willSendRequest):
381         (WebCore::MainResourceLoader::continueAfterContentPolicy):
382         (WebCore::MainResourceLoader::didReceiveData):
383         (WebCore::MainResourceLoader::didFinishLoading):
384         (WebCore::MainResourceLoader::setDefersLoading):
385         * loader/mac/NetscapePlugInStreamLoaderMac.mm:
386         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
387         (WebCore::NetscapePlugInStreamLoader::releaseResources):
388         (WebCore::NetscapePlugInStreamLoader::didReceiveResponse):
389         (WebCore::NetscapePlugInStreamLoader::didReceiveData):
390         (WebCore::NetscapePlugInStreamLoader::didFinishLoading):
391         (WebCore::NetscapePlugInStreamLoader::didFail):
392         (WebCore::NetscapePlugInStreamLoader::didCancel):
393         * loader/mac/ResourceLoaderMac.mm:
394         (WebCore::ResourceLoader::ResourceLoader):
395         (WebCore::ResourceLoader::~ResourceLoader):
396         (WebCore::ResourceLoader::releaseResources):
397         (WebCore::ResourceLoader::load):
398         (WebCore::ResourceLoader::setDefersLoading):
399         (WebCore::ResourceLoader::frameLoader):
400         (WebCore::ResourceLoader::addData):
401         (WebCore::ResourceLoader::resourceData):
402         (WebCore::ResourceLoader::clearResourceData):
403         (WebCore::ResourceLoader::willSendRequest):
404         (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
405         (WebCore::ResourceLoader::didCancelAuthenticationChallenge):
406         (WebCore::ResourceLoader::didReceiveResponse):
407         (WebCore::ResourceLoader::didReceiveData):
408         (WebCore::ResourceLoader::willStopBufferingData):
409         (WebCore::ResourceLoader::didFinishLoading):
410         (WebCore::ResourceLoader::didFinishLoadingOnePart):
411         (WebCore::ResourceLoader::didFail):
412         (WebCore::ResourceLoader::willCacheResponse):
413         (WebCore::ResourceLoader::didCancel):
414         (WebCore::ResourceLoader::cancel):
415         (WebCore::ResourceLoader::setIdentifier):
416         (WebCore::ResourceLoader::response):
417         (WebCore::ResourceLoader::inConnectionCallback):
418         (WebCore::ResourceLoader::cancelledError):
419         (WebCore::ResourceLoader::receivedCredential):
420         (WebCore::ResourceLoader::receivedRequestToContinueWithoutCredential):
421         (WebCore::ResourceLoader::receivedCancellation):
422         (WebCore::ResourceLoader::delegate):
423         (WebCore::ResourceLoader::releaseDelegate):
424         (-[WebCoreResourceLoaderAsDelegate initWithLoader:]):
425         * loader/mac/SubresourceLoaderMac.mm:
426         (WebCore::SubresourceLoader::SubresourceLoader):
427         (WebCore::SubresourceLoader::willSendRequest):
428         (WebCore::SubresourceLoader::didReceiveResponse):
429         (WebCore::SubresourceLoader::didReceiveData):
430         (WebCore::SubresourceLoader::didFinishLoading):
431         (WebCore::SubresourceLoader::didFail):
432         (WebCore::SubresourceLoader::didCancel):
433         * loader/mac/WebFormDataStream.h: Removed.
434         * loader/mac/WebFormDataStream.m: Removed.
435         * page/Frame.cpp:
436         (WebCore::Frame::javaScriptEnabled):
437         (WebCore::Frame::scriptProxy):
438         (WebCore::Frame::executeScript):
439         (WebCore::Frame::write):
440         (WebCore::Frame::userGestureHint):
441         (WebCore::Frame::saveInterpreterBuiltins):
442         (WebCore::Frame::restoreInterpreterBuiltins):
443         (WebCore::Frame::backslashAsCurrencySymbol):
444         * page/Frame.h:
445         * page/FramePrivate.h:
446         * platform/StreamingTextDecoder.cpp: Removed.
447         * platform/StreamingTextDecoder.h: Removed.
448         * platform/StreamingTextDecoderICU.cpp: Removed.
449         * platform/StreamingTextDecoderICU.h: Removed.
450         * platform/TextCodec.cpp: Added.
451         * platform/TextCodec.h: Added.
452         * platform/TextCodecICU.cpp: Added.
453         * platform/TextCodecICU.h: Added.
454         * platform/TextCodecLatin1.h:
455         * platform/TextCodecUTF16.h:
456         * platform/TextDecoder.h:
457         * platform/TextEncoding.cpp:
458         * platform/TextEncodingRegistry.cpp:
459         * platform/image-decoders/jpeg/jmorecfg.h:
460         * platform/mac/StreamingTextDecoderMac.cpp: Removed.
461         * platform/mac/StreamingTextDecoderMac.h: Removed.
462         * platform/mac/TextCodecMac.cpp: Added.
463         * platform/mac/TextCodecMac.h: Added.
464         * platform/network/ResourceHandleInternal.h:
465         * platform/network/mac/ResourceHandleMac.mm:
466         * platform/qt/FrameQt.cpp:
467         (WebCore::FrameQt::bindingRootObject):
468         * platform/qt/LoaderFunctionsQt.cpp:
469         (WebCore::CheckCacheObjectStatus):
470         * rendering/RenderObject.cpp:
471         (WebCore::RenderObject::backslashAsCurrencySymbol):
472         * xml/XSLTProcessor.cpp:
473         (WebCore::XSLTProcessor::createDocumentFromSource):
474         * xml/xmlhttprequest.cpp:
475         (WebCore::XMLHttpRequest::didReceiveData):
476         * xml/xmlhttprequest.h:
477
478 2006-10-29  Darin Adler  <darin@apple.com>
479
480         Rubber stamped by Adam (kinda).
481
482         - add Mac suffixes and correct filenames inside loader/mac
483
484         * WebCore.xcodeproj/project.pbxproj: Updated for changes below.
485
486         * loader/mac/FrameLoader.mm: Removed.
487         * loader/mac/WebDocumentLoader.mm: Removed.
488         * loader/mac/WebLoader.mm: Removed.
489         * loader/mac/WebMainResourceLoader.mm: Removed.
490         * loader/mac/WebNetscapePlugInStreamLoader.mm: Removed.
491         * loader/mac/WebSubresourceLoader.mm: Removed.
492
493         * loader/mac/FrameLoaderMac.mm: Added.
494         * loader/mac/DocumentLoaderMac.mm: Added.
495         * loader/mac/ResourceLoaderMac.mm: Added.
496         * loader/mac/MainResourceLoaderMac.mm: Added.
497         * loader/mac/WebNetscapePlugInStreamLoaderMac.mm: Added.
498         * loader/mac/SubresourceLoaderMac.mm: Removed.
499
500 2006-10-29  Darin Adler  <darin@apple.com>
501
502         Reviewed by Adam.
503
504         - moving towards use of FrameLoader cross-platform; get FrameLoader.h
505           and FrameLoader.cpp mostly ready
506
507         * WebCore.xcodeproj/project.pbxproj: Added FrameLoader.cpp and
508         FormState.cpp. Removed WebFormState.mm.
509
510         * loader/FrameLoader.h: Put in lots of #if statements to see if we can
511         get this header compiling on non-Mac.
512         * loader/FrameLoader.cpp: Added. Has non-Mac-specific bits of FrameLoader.
513         * loader/mac/FrameLoader.mm: Moved some non-Mac-specific bits out.
514
515         * loader/FrameLoaderClient.h: Added some ifdefs.
516         * loader/WebDocumentLoader.h: Ditto.
517         * loader/WebLoader.h: Ditto.
518         * loader/WebMainResourceLoader.h: Ditto.
519
520         * loader/mac/WebDocumentLoader.mm:
521         (WebCore::DocumentLoader::isLoadingInAPISense):
522         Rewrote to work without bridge, partly to remove the need for ObjC
523         bridge type in the header, and also because we're tearing down the bridge.
524
525         * loader/mac/WebMainResourceLoader.mm:
526         (WebCore::MainResourceLoader::MainResourceLoader): Removed unused
527         m_contentLength and m_bytesReceived.
528         (WebCore::MainResourceLoader::didReceiveResponse): Ditto.
529         (WebCore::MainResourceLoader::didReceiveData): Ditto.
530
531         * bridge/mac/WebCoreFrameBridge.h: Removed doneProcessingData.
532         * bridge/mac/WebCoreFrameBridge.mm: Ditto.
533
534         * loader/mac/FormState.mm: Removed.
535         * loader/FormState.cpp: Added.
536
537 2006-10-29  Darin Adler  <darin@apple.com>
538
539         Rubber stamped by Adam.
540
541         - moving towards use of FrameLoader cross-platform; move the headers
542           for the Mac loader from loader/mac into loader, in preparation for
543           making them useful on non-Mac
544
545         * WebCore.xcodeproj/project.pbxproj:
546
547         * loader/mac/FrameLoader.h: Removed.
548         * loader/mac/WebDocumentLoader.h: Removed.
549         * loader/mac/WebFormState.h: Removed.
550         * loader/mac/WebLoader.h: Removed.
551         * loader/mac/WebMainResourceLoader.h: Removed.
552         * loader/mac/WebNetscapePlugInStreamLoader.h: Removed.
553         * loader/mac/WebSubresourceLoader.h: Removed.
554
555         * loader/FrameLoader.h: Added.
556         * loader/WebDocumentLoader.h: Added.
557         * loader/WebFormState.h: Added.
558         * loader/WebLoader.h: Added.
559         * loader/WebMainResourceLoader.h: Added.
560         * loader/WebNetscapePlugInStreamLoader.h: Added.
561         * loader/WebSubresourceLoader.h: Added.
562
563 2006-10-29  Adam Roben  <aroben@apple.com>
564
565         Reviewed by Geoff.
566
567         Finish Darin's clean up of the use of __APPLE__ in WebCore, begun in
568         r17405.
569
570         * platform/DeprecatedString.h:
571
572 2006-10-29  Beth Dakin  <bdakin@apple.com>
573
574         Rubber stamped by Geoff.
575
576         This is a followup to my HitTestResult checkin. Most of the 
577         HitTestResult local variables in the code were named i or info for 
578         when the class was named NodeInfo. This patch renames all of these 
579         local variables to result.
580
581         * dom/Document.cpp:
582         (WebCore::Document::prepareMouseEvent):
583         * html/HTMLAreaElement.cpp:
584         (WebCore::HTMLAreaElement::mapMouseEvent):
585         * html/HTMLMapElement.cpp:
586         (WebCore::HTMLMapElement::mapMouseEvent):
587         * rendering/EllipsisBox.cpp:
588         (WebCore::EllipsisBox::nodeAtPoint):
589         * rendering/EllipsisBox.h:
590         * rendering/InlineBox.cpp:
591         (WebCore::InlineBox::nodeAtPoint):
592         * rendering/InlineFlowBox.cpp:
593         (WebCore::InlineFlowBox::nodeAtPoint):
594         * rendering/InlineTextBox.cpp:
595         (WebCore::InlineTextBox::nodeAtPoint):
596         * rendering/RenderBlock.cpp:
597         (WebCore::RenderBlock::isPointInScrollbar):
598         (WebCore::RenderBlock::nodeAtPoint):
599         * rendering/RenderBlock.h:
600         * rendering/RenderBox.cpp:
601         (WebCore::RenderBox::nodeAtPoint):
602         * rendering/RenderBox.h:
603         * rendering/RenderFlow.cpp:
604         (WebCore::RenderFlow::hitTestLines):
605         * rendering/RenderFlow.h:
606         * rendering/RenderForeignObject.cpp:
607         (WebCore::RenderForeignObject::nodeAtPoint):
608         * rendering/RenderFrameSet.cpp:
609         (WebCore::RenderFrameSet::nodeAtPoint):
610         * rendering/RenderImage.cpp:
611         (WebCore::RenderImage::nodeAtPoint):
612         * rendering/RenderInline.cpp:
613         (WebCore::RenderInline::nodeAtPoint):
614         * rendering/RenderInline.h:
615         * rendering/RenderLayer.cpp:
616         (WebCore::RenderLayer::autoscroll):
617         (WebCore::RenderLayer::hitTest):
618         (WebCore::RenderLayer::hitTestLayer):
619         (WebCore::RenderLayer::updateHoverActiveState):
620         * rendering/RenderListBox.cpp:
621         (WebCore::RenderListBox::isPointInScrollbar):
622         * rendering/RenderObject.cpp:
623         (WebCore::RenderObject::hitTest):
624         (WebCore::RenderObject::setInnerNode):
625         (WebCore::RenderObject::nodeAtPoint):
626         * rendering/RenderObject.h:
627         * rendering/RenderPath.cpp:
628         (WebCore::RenderPath::nodeAtPoint):
629         * rendering/RenderSVGImage.cpp:
630         (WebCore::RenderSVGImage::nodeAtPoint):
631         * rendering/RenderSVGText.cpp:
632         (WebCore::RenderSVGText::nodeAtPoint):
633         * rendering/RenderTableRow.cpp:
634         (WebCore::RenderTableRow::nodeAtPoint):
635         * rendering/RenderTableRow.h:
636         * rendering/RenderTableSection.cpp:
637         (WebCore::RenderTableSection::nodeAtPoint):
638         * rendering/RenderTableSection.h:
639         * rendering/RenderTextControl.cpp:
640         (WebCore::RenderTextControl::nodeAtPoint):
641         * rendering/RootInlineBox.cpp:
642         (WebCore::RootInlineBox::nodeAtPoint):
643         * rendering/RootInlineBox.h:
644
645 2006-10-29  Adam Roben  <aroben@apple.com>
646
647         More semi-fixes.
648
649         * page/Page.cpp: Forgot to wrap the actual definition of
650         setDefersLoading() in PLATFORM(MAC).
651         * platform/PlatformWheelEvent.h: Fix up preprocessor directives.
652
653 2006-10-29  Adam Roben  <aroben@apple.com>
654
655         Build semi-fix.
656
657         Move all FrameLoader-related code in Page.{cpp,h} within #if
658         PLATFORM(MAC), since this class currently only exists on Mac.
659
660         * page/Page.cpp:
661         * page/Page.h:
662
663 2006-10-29  Geoffrey Garen  <ggaren@apple.com>
664
665         build fix.
666         
667         * platform/PlatformString.h:
668         (WebCore::String::operator NSString*):
669
670 2006-10-29  Geoffrey Garen  <ggaren@apple.com>
671
672         Rolled out accidental commit.
673         
674         * platform/AtomicString.h:
675         (WebCore::AtomicString::AtomicString):
676         (WebCore::AtomicString::operator NSString*):
677
678 2006-10-29  Geoffrey Garen  <ggaren@apple.com>
679
680         RS by Darin.
681
682         Rolled out change to map NULL Strings to nil NSStrings because it caused
683         even more AppKit crashes. Maybe we should remove the NSString * operator
684         entirely, since its use is not straight-forward, and require callers to
685         specify explicitly whether they tolerate NULL.
686         
687         * platform/AtomicString.h:
688         * platform/PlatformString.h:
689         (WebCore::String::operator NSString*):
690         * platform/mac/TextFieldMac.mm:
691         (-[NSSearchFieldCell _addStringToRecentSearches:]):
692
693 2006-10-29  Darin Adler  <darin@apple.com>
694
695         Reviewed by Geoff.
696
697         - fixed storage leak showing up on the buildbot
698
699         * loader/mac/WebSubresourceLoader.mm: (WebCore::SubresourceLoader::create):
700         Release the NSURLRequest after passing it to load. Also clean up logic a bit.
701
702 2006-10-29  Darin Adler  <darin@apple.com>
703
704         Rubber stamped by Adam.
705
706         - renamed WebFrameLoaderClient to match the class name inside it
707
708         * loader/mac/WebFrameLoaderClient.h: Removed.
709         * loader/FrameLoaderClient.h: Moved it here.
710
711         * WebCore.xcodeproj/project.pbxproj: Updated project.
712
713         * bridge/mac/FrameMac.mm: Updated includes.
714         * bridge/mac/WebCoreFrameBridge.mm: Ditto.
715         * loader/mac/FrameLoader.mm: Ditto.
716         * loader/mac/WebLoader.h: Ditto.
717
718 2006-10-29  Darin Adler  <darin@apple.com>
719
720         Reviewed by Mitz.
721
722         - fix crash visible on buildbot and also when running the test
723           anchor-image-scrolled-x-y.html under libgmalloc
724
725         * loader/mac/WebSubresourceLoader.h: Renamed m_loader to m_handle
726         now that the class is named ResourceHandle.
727         * loader/mac/WebSubresourceLoader.mm: Renaming, plus:
728         (WebCore::SubresourceLoader::didFinishLoading): Get the handle into
729         a local RefPtr before calling finishJobAndHandle, since we might get
730         cancelled inside that function, so we should not rely on m_handle to
731         keep the ResourceHandle alive.
732         (WebCore::SubresourceLoader::didFail): Ditto.
733         (WebCore::SubresourceLoader::didCancel): Ditto.
734
735 2006-10-29  Maciej Stachowiak  <mjs@apple.com>
736
737         - build fix
738
739         * platform/network/mac/ResourceHandleMac.mm:
740
741 2006-10-29  Maciej Stachowiak  <mjs@apple.com>
742
743         Rubber stamped by Darin.
744
745         - renamed ResourceLoader to ResourceHandle (and same for related classes)
746
747         * CMakeLists.txt:
748         * Projects/gdk/webcore-gdk.bkl:
749         * WebCore.vcproj/WebCore/WebCore.vcproj:
750         * WebCore.xcodeproj/project.pbxproj:
751         * WebCoreSources.bkl:
752         * bridge/mac/FrameMac.mm:
753         * bridge/win/FrameWin.cpp:
754         * dom/XMLTokenizer.cpp:
755         * loader/Cache.cpp:
756         * loader/CachedResource.h:
757         * loader/LoaderFunctions.h:
758         * loader/icon/IconLoader.cpp:
759         (IconLoader::startLoading):
760         (IconLoader::didReceiveData):
761         (IconLoader::didFinishLoading):
762         * loader/icon/IconLoader.h:
763         * loader/loader.cpp:
764         (WebCore::Loader::servePendingRequests):
765         (WebCore::Loader::receivedAllData):
766         (WebCore::Loader::receivedResponse):
767         (WebCore::Loader::didReceiveData):
768         (WebCore::Loader::cancelRequests):
769         (WebCore::Loader::jobForRequest):
770         * loader/loader.h:
771         * loader/mac/IconLoaderMac.mm:
772         (IconLoader::receivedResponse):
773         * loader/mac/LoaderFunctionsMac.mm:
774         * loader/mac/WebLoader.h:
775         * loader/mac/WebSubresourceLoader.h:
776         * loader/mac/WebSubresourceLoader.mm:
777         (WebCore::SubresourceLoader::SubresourceLoader):
778         (WebCore::SubresourceLoader::create):
779         * platform/gdk/FrameGdk.cpp:
780         (WebCore::FrameGdkClientDefault::FrameGdkClientDefault):
781         (WebCore::FrameGdkClientDefault::openURL):
782         (WebCore::FrameGdkClientDefault::submitForm):
783         (WebCore::FrameGdkClientDefault::receivedResponse):
784         (WebCore::FrameGdkClientDefault::didReceiveData):
785         (WebCore::FrameGdkClientDefault::receivedAllData):
786         * platform/gdk/FrameGdk.h:
787         * platform/gdk/TemporaryLinkStubs.cpp:
788         (WebCore::ServeSynchronousRequest):
789         (WebCore::ResourceHandle::assembleResponseHeaders):
790         (WebCore::ResourceHandle::retrieveCharset):
791         * platform/network/ResourceHandle.cpp: Added.
792         (WebCore::ResourceHandle::ResourceHandle):
793         (WebCore::ResourceHandle::create):
794         (WebCore::ResourceHandle::isErrorPage):
795         (WebCore::ResourceHandle::error):
796         (WebCore::ResourceHandle::setError):
797         (WebCore::ResourceHandle::responseEncoding):
798         (WebCore::ResourceHandle::responseHTTPHeadersAsString):
799         (WebCore::ResourceHandle::kill):
800         (WebCore::ResourceHandle::requestHeaders):
801         (WebCore::ResourceHandle::url):
802         (WebCore::ResourceHandle::postData):
803         (WebCore::ResourceHandle::method):
804         (WebCore::ResourceHandle::client):
805         * platform/network/ResourceHandle.h: Added.
806         (WebCore::ResourceHandle::getInternal):
807         * platform/network/ResourceHandleClient.h: Added.
808         (WebCore::ResourceHandleClient::~ResourceHandleClient):
809         (WebCore::ResourceHandleClient::didReceiveData):
810         (WebCore::ResourceHandleClient::didFinishLoading):
811         (WebCore::ResourceHandleClient::receivedRedirect):
812         (WebCore::ResourceHandleClient::receivedResponse):
813         (WebCore::ResourceHandleClient::receivedAllData):
814         * platform/network/ResourceHandleInternal.h: Added.
815         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
816         * platform/network/ResourceLoader.cpp: Removed.
817         * platform/network/ResourceLoader.h: Removed.
818         * platform/network/ResourceLoaderClient.h: Removed.
819         * platform/network/ResourceLoaderInternal.h: Removed.
820         * platform/network/cf/ResourceHandleCFNet.cpp: Added.
821         (WebCore::willSendRequest):
822         (WebCore::didReceiveResponse):
823         (WebCore::didReceiveData):
824         (WebCore::didFinishLoading):
825         (WebCore::didFail):
826         (WebCore::willCacheResponse):
827         (WebCore::didReceiveChallenge):
828         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
829         (WebCore::ResourceHandle::~ResourceHandle):
830         (WebCore::ResourceHandle::start):
831         (WebCore::ResourceHandle::cancel):
832         * platform/network/cf/ResourceLoaderCFNet.cpp: Removed.
833         * platform/network/gdk/ResourceHandleCurl.cpp: Added.
834         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
835         (WebCore::ResourceHandle::~ResourceHandle):
836         (WebCore::ResourceHandle::start):
837         (WebCore::ResourceHandle::cancel):
838         * platform/network/gdk/ResourceHandleManager.cpp: Added.
839         (WebCore::ResourceHandleManager::ResourceHandleManager):
840         (WebCore::ResourceHandleManager::get):
841         (WebCore::ResourceHandleManager::useSimpleTransfer):
842         (WebCore::writeCallback):
843         (WebCore::ResourceHandleManager::downloadTimerCallback):
844         (WebCore::ResourceHandleManager::remove):
845         (WebCore::ResourceHandleManager::add):
846         (WebCore::ResourceHandleManager::cancel):
847         * platform/network/gdk/ResourceHandleManager.h: Added.
848         * platform/network/gdk/ResourceLoaderCurl.cpp: Removed.
849         * platform/network/gdk/ResourceLoaderManager.cpp: Removed.
850         * platform/network/gdk/ResourceLoaderManager.h: Removed.
851         * platform/network/mac/ResourceHandleMac.mm: Added.
852         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
853         (WebCore::ResourceHandle::~ResourceHandle):
854         (WebCore::ResourceHandle::start):
855         (WebCore::ResourceHandle::assembleResponseHeaders):
856         (WebCore::ResourceHandle::retrieveResponseEncoding):
857         (WebCore::ResourceHandle::receivedResponse):
858         (WebCore::ResourceHandle::cancel):
859         (WebCore::ResourceHandle::redirectedToURL):
860         (WebCore::ResourceHandle::addData):
861         (WebCore::ResourceHandle::finishJobAndHandle):
862         (WebCore::ResourceHandle::reportError):
863         * platform/network/mac/ResourceLoaderMac.mm: Removed.
864         * platform/network/qt/ResourceHandleManager.cpp: Added.
865         (WebCore::ResourceHandleManager::ResourceHandleManager):
866         (WebCore::ResourceHandleManager::~ResourceHandleManager):
867         (WebCore::ResourceHandleManager::self):
868         (WebCore::ResourceHandleManager::slotData):
869         (WebCore::ResourceHandleManager::slotMimetype):
870         (WebCore::ResourceHandleManager::slotResult):
871         (WebCore::ResourceHandleManager::remove):
872         (WebCore::ResourceHandleManager::add):
873         (WebCore::ResourceHandleManager::cancel):
874         * platform/network/qt/ResourceHandleManager.h: Added.
875         * platform/network/qt/ResourceHandleQt.cpp: Added.
876         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
877         (WebCore::ResourceHandle::~ResourceHandle):
878         (WebCore::ResourceHandle::start):
879         (WebCore::ResourceHandle::cancel):
880         (WebCore::ResourceHandle::assembleResponseHeaders):
881         (WebCore::ResourceHandle::retrieveResponseEncoding):
882         (WebCore::ResourceHandle::receivedResponse):
883         (WebCore::ResourceHandle::extractCharsetFromHeaders):
884         * platform/network/qt/ResourceLoaderManager.cpp: Removed.
885         * platform/network/qt/ResourceLoaderManager.h: Removed.
886         * platform/network/qt/ResourceLoaderQt.cpp: Removed.
887         * platform/network/win/ResourceHandleWin.cpp: Added.
888         (WebCore::):
889         (WebCore::addToOutstandingJobs):
890         (WebCore::lookupResourceHandle):
891         (WebCore::ResourceHandleWndProc):
892         (WebCore::initializeOffScreenResourceHandleWindow):
893         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
894         (WebCore::ResourceHandle::~ResourceHandle):
895         (WebCore::ResourceHandle::onHandleCreated):
896         (WebCore::ResourceHandle::onRequestRedirected):
897         (WebCore::ResourceHandle::onRequestComplete):
898         (WebCore::ResourceHandle::start):
899         (WebCore::ResourceHandle::fileLoadTimer):
900         (WebCore::ResourceHandle::cancel):
901         (WebCore::ResourceHandle::setHasReceivedResponse):
902         (WebCore::ResourceHandle::hasReceivedResponse):
903         * platform/network/win/ResourceHandleWin.h: Added.
904         * platform/network/win/ResourceLoaderWin.cpp: Removed.
905         * platform/network/win/ResourceLoaderWin.h: Removed.
906         * platform/qt/FrameQt.cpp:
907         * platform/qt/FrameQtClient.cpp:
908         (WebCore::FrameQtClientDefault::openURL):
909         (WebCore::FrameQtClientDefault::submitForm):
910         (WebCore::FrameQtClientDefault::receivedResponse):
911         (WebCore::FrameQtClientDefault::didReceiveData):
912         (WebCore::FrameQtClientDefault::receivedAllData):
913         * platform/qt/FrameQtClient.h:
914         * platform/win/TemporaryLinkStubs.cpp:
915         (WebCore::ResourceHandle::assembleResponseHeaders):
916         (WebCore::ResourceHandle::retrieveResponseEncoding):
917         (WebCore::ServeSynchronousRequest):
918         * xml/XSLTProcessor.cpp:
919         * xml/xmlhttprequest.cpp:
920         (WebCore::XMLHttpRequest::send):
921         (WebCore::XMLHttpRequest::didFinishLoading):
922         (WebCore::XMLHttpRequest::receivedRedirect):
923         (WebCore::XMLHttpRequest::didReceiveData):
924         * xml/xmlhttprequest.h:
925
926 t2006-10-29  Darin Adler  <darin@apple.com>
927
928         Reviewed by Maciej.
929
930         - eliminate use of NSArray to carry form data around
931
932         * WebCore.exp:
933         * WebCore.xcodeproj/project.pbxproj:
934         * bridge/mac/FormDataMac.h: Removed.
935         * bridge/mac/FormDataMac.mm: Removed.
936         * bridge/mac/FrameMac.h:
937         * bridge/mac/WebCoreFrameBridge.h:
938         * bridge/mac/WebCoreFrameBridge.mm:
939         * html/HTMLFormElement.cpp:
940         (WebCore::HTMLFormElement::submit):
941         * loader/FormData.h:
942         (WebCore::FormData::isEmpty):
943         * loader/mac/FrameLoader.h:
944         * loader/mac/FrameLoader.mm:
945         (WebCore::FrameLoader::load):
946         (WebCore::FrameLoader::post):
947         (WebCore::FrameLoader::loadEmptyDocumentSynchronously):
948         (WebCore::FrameLoader::loadResourceSynchronously):
949         * loader/mac/LoaderFunctionsMac.mm:
950         (WebCore::ServeSynchronousRequest):
951         * loader/mac/WebFormDataStream.h:
952         * loader/mac/WebFormDataStream.m:
953         (WebCore::pairRetain):
954         (WebCore::pairRelease):
955         (WebCore::pairEqual):
956         (WebCore::pairHash):
957         (WebCore::closeCurrentStream):
958         (WebCore::scheduleWithPair):
959         (WebCore::advanceCurrentStream):
960         (WebCore::openNextStream):
961         (WebCore::formCreate):
962         (WebCore::formFinalize):
963         (WebCore::formOpen):
964         (WebCore::formRead):
965         (WebCore::formCanRead):
966         (WebCore::formClose):
967         (WebCore::formSchedule):
968         (WebCore::formUnschedule):
969         (WebCore::formEventCallback):
970         (WebCore::setHTTPBody):
971         * loader/mac/WebSubresourceLoader.h:
972         * loader/mac/WebSubresourceLoader.mm:
973         (WebCore::SubresourceLoader::create):
974         * platform/network/mac/ResourceLoaderMac.mm:
975
976 2006-10-29  Maciej Stachowiak  <mjs@apple.com>
977
978         Reviewed by Darin.
979
980         - create SubresourceLoader with a ResourceRequest, not broken out request bits
981
982         * loader/mac/WebSubresourceLoader.h:
983         * loader/mac/WebSubresourceLoader.mm:
984         (WebCore::SubresourceLoader::create):
985         * platform/network/mac/ResourceLoaderMac.mm:
986         (WebCore::ResourceLoader::start):
987
988 2006-10-29  Maciej Stachowiak  <mjs@apple.com>
989
990         Reviewed by Darin.
991
992         - removed ObjC glue between ResourceLoader and SubresourceLoader, then now talk to each other directly
993
994         Removed WebCoreResourceLoader, WebCoreResourceHandle and WebCoreResourceLoaderImp
995         
996         * WebCore.xcodeproj/project.pbxproj:
997         * bridge/mac/WebCoreFrameBridge.h:
998         * loader/mac/FrameLoader.h:
999         * loader/mac/FrameLoader.mm:
1000         * loader/mac/LoaderFunctionsMac.mm:
1001         * loader/mac/WebLoader.h:
1002         * loader/mac/WebSubresourceLoader.h:
1003         * loader/mac/WebSubresourceLoader.mm:
1004         (WebCore::SubresourceLoader::SubresourceLoader):
1005         (WebCore::SubresourceLoader::create):
1006         (WebCore::SubresourceLoader::willSendRequest):
1007         (WebCore::SubresourceLoader::didReceiveResponse):
1008         (WebCore::SubresourceLoader::didReceiveData):
1009         (WebCore::SubresourceLoader::didFinishLoading):
1010         (WebCore::SubresourceLoader::didFail):
1011         (WebCore::SubresourceLoader::didCancel):
1012         * platform/network/ResourceLoader.h:
1013         * platform/network/ResourceLoaderInternal.h:
1014         * platform/network/mac/ResourceLoaderMac.mm:
1015         (WebCore::ResourceLoader::~ResourceLoader):
1016         (WebCore::ResourceLoader::start):
1017         (WebCore::ResourceLoader::receivedResponse):
1018         (WebCore::ResourceLoader::cancel):
1019         (WebCore::ResourceLoader::redirectedToURL):
1020         (WebCore::ResourceLoader::addData):
1021         (WebCore::ResourceLoader::finishJobAndHandle):
1022         (WebCore::ResourceLoader::reportError):
1023         * platform/network/mac/WebCoreResourceLoader.h: Removed.
1024         * platform/network/mac/WebCoreResourceLoaderImp.h: Removed.
1025         * platform/network/mac/WebCoreResourceLoaderImp.mm: Removed.
1026
1027 2006-10-28  Darin Adler  <darin@apple.com>
1028
1029         Reviewed by Maciej.
1030
1031         - eliminated the use of Objective-C for the policy decider
1032           machinery, obviating the need for WebPolicyDecider,
1033           WebCoreFrameLoaderAsDelegate, and
1034           WebCoreMainResourceLoaderAsPolicyDelegate
1035
1036         - grouped the state related to policy decisions into a PolicyCheck
1037           class to simplify the FrameLoader logic
1038
1039         - removed six methods from the bridge, reducing FrameLoader's use of
1040           the bridge to a single method
1041
1042         - changed form state to always use HashMap instead of NSDictionary
1043
1044         - moved the defersLoading flag from WebView to WebCore::Page
1045           and changed code to consistently call it defersLoading rather
1046           than defersCallbacks
1047
1048         - updated for rename of PassRefPtr::release to releaseRef
1049         - replaced all uses of __APPLE__ with appropriate PLATFORM defines
1050         - cleaned up kjs_binding.h a bit
1051         - cleaned up FrameMac.h a bit
1052
1053         * loader/mac/WebPolicyDecider.h: Removed.
1054         * loader/mac/WebPolicyDecider.mm: Removed.
1055         * WebCore.xcodeproj/project.pbxproj: Updated for removal.
1056
1057         * WebCore.exp:
1058         * bindings/js/kjs_binding.cpp:
1059         (KJS::ScriptInterpreter::ScriptInterpreter):
1060         (KJS::ScriptInterpreter::wasRunByUserGesture):
1061         * bindings/js/kjs_binding.h:
1062         (KJS::ScriptInterpreter::setCurrentEvent):
1063         (KJS::ScriptInterpreter::setInlineCode):
1064         (KJS::ScriptInterpreter::setProcessingTimerCallback):
1065         (KJS::ScriptInterpreter::getCurrentEvent):
1066         (KJS::cacheDOMObject):
1067         (KJS::DOMExceptionTranslator::DOMExceptionTranslator):
1068         * bridge/AXObjectCache.h:
1069         * bridge/mac/BrowserExtensionMac.mm:
1070         (WebCore::BrowserExtensionMac::createNewWindow):
1071         * bridge/mac/FrameMac.h:
1072         * bridge/mac/FrameMac.mm:
1073         (WebCore::FrameMac::loadRequest):
1074         (WebCore::FrameMac::submitForm):
1075         (WebCore::FrameMac::urlSelected):
1076         (WebCore::FrameMac::userAgent):
1077         (WebCore::FrameMac::passMouseDownEventToWidget):
1078         (WebCore::FrameMac::handleMouseMoveEvent):
1079         * bridge/mac/PageMac.mm:
1080         (WebCore::Page::Page):
1081         * bridge/mac/WebCoreEditCommand.mm:
1082         * bridge/mac/WebCoreFrameBridge.h:
1083         * bridge/mac/WebCoreFrameBridge.mm:
1084         (-[WebCoreFrameBridge dragOperationForDraggingInfo:]):
1085         (-[WebCoreFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
1086         * css/CSSComputedStyleDeclaration.cpp:
1087         (WebCore::):
1088         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1089         * css/CSSPrimitiveValue.cpp:
1090         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1091         (WebCore::CSSPrimitiveValue::cleanup):
1092         (WebCore::CSSPrimitiveValue::cssText):
1093         * css/CSSPrimitiveValue.h:
1094         (WebCore::CSSPrimitiveValue::):
1095         * css/CSSValueList.cpp:
1096         (WebCore::CSSValueList::append):
1097         * css/cssparser.cpp:
1098         (WebCore::CSSParser::parseValue):
1099         * css/cssparser.h:
1100         * css/cssstyleselector.cpp:
1101         (WebCore::CSSStyleSelector::applyProperty):
1102         * dom/Document.cpp:
1103         (WebCore::Document::Document):
1104         (WebCore::Document::updateSelection):
1105         (WebCore::Document::implicitClose):
1106         (WebCore::Document::setFocusNode):
1107         * dom/Document.h:
1108         * editing/ReplaceSelectionCommand.h:
1109         * html/HTMLParser.cpp:
1110         (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
1111         * loader/mac/FrameLoader.h:
1112         (WebCore::PolicyCheck::request):
1113         * loader/mac/FrameLoader.mm:
1114         (WebCore::FrameLoader::~FrameLoader):
1115         (WebCore::FrameLoader::safeLoad):
1116         (WebCore::FrameLoader::load):
1117         (WebCore::FrameLoader::open):
1118         (WebCore::FrameLoader::stopLoading):
1119         (WebCore::setAllDefersLoading):
1120         (WebCore::FrameLoader::setDefersLoading):
1121         (WebCore::FrameLoader::willSendRequest):
1122         (WebCore::FrameLoader::receivedMainResourceError):
1123         (WebCore::FrameLoader::callContinueFragmentScrollAfterNavigationPolicy):
1124         (WebCore::FrameLoader::commitProvisionalLoad):
1125         (WebCore::FrameLoader::checkNavigationPolicy):
1126         (WebCore::FrameLoader::checkContentPolicy):
1127         (WebCore::FrameLoader::cancelContentPolicyCheck):
1128         (WebCore::FrameLoader::stopPolicyCheck):
1129         (WebCore::FrameLoader::checkNewWindowPolicy):
1130         (WebCore::FrameLoader::continueAfterNewWindowPolicy):
1131         (WebCore::FrameLoader::continueAfterNavigationPolicy):
1132         (WebCore::FrameLoader::continueAfterContentPolicy):
1133         (WebCore::FrameLoader::continueAfterWillSubmitForm):
1134         (WebCore::FrameLoader::callContinueLoadAfterNavigationPolicy):
1135         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
1136         (WebCore::FrameLoader::closeDocument):
1137         (WebCore::FrameLoader::transitionToCommitted):
1138         (WebCore::FrameLoader::callContinueLoadAfterNewWindowPolicy):
1139         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
1140         (WebCore::FrameLoader::post):
1141         (WebCore::FrameLoader::detachFromParent):
1142         (WebCore::FrameLoader::addExtraFieldsToRequest):
1143         (WebCore::PolicyCheck::PolicyCheck):
1144         (WebCore::PolicyCheck::clear):
1145         (WebCore::PolicyCheck::set):
1146         (WebCore::PolicyCheck::call):
1147         (WebCore::PolicyCheck::dropRequest):
1148         (WebCore::FrameLoaderClient::~FrameLoaderClient):
1149         * loader/mac/WebFormState.h:
1150         * loader/mac/WebFormState.mm:
1151         * loader/mac/WebFrameLoaderClient.h:
1152         * loader/mac/WebLoader.h:
1153         (WebCore::WebResourceLoader::defersLoading):
1154         * loader/mac/WebLoader.mm:
1155         (WebCore::WebResourceLoader::WebResourceLoader):
1156         (WebCore::WebResourceLoader::load):
1157         (WebCore::WebResourceLoader::setDefersLoading):
1158         * loader/mac/WebMainResourceLoader.h:
1159         * loader/mac/WebMainResourceLoader.mm:
1160         (WebCore::MainResourceLoader::MainResourceLoader):
1161         (WebCore::MainResourceLoader::releaseDelegate):
1162         (WebCore::MainResourceLoader::didCancel):
1163         (WebCore::MainResourceLoader::callContinueAfterNavigationPolicy):
1164         (WebCore::MainResourceLoader::continueAfterNavigationPolicy):
1165         (WebCore::MainResourceLoader::willSendRequest):
1166         (WebCore::MainResourceLoader::callContinueAfterContentPolicy):
1167         (WebCore::MainResourceLoader::continueAfterContentPolicy):
1168         (WebCore::MainResourceLoader::didReceiveResponse):
1169         (WebCore::MainResourceLoader::didReceiveData):
1170         (WebCore::MainResourceLoader::didFinishLoading):
1171         (WebCore::MainResourceLoader::didFail):
1172         (WebCore::MainResourceLoader::loadNow):
1173         (WebCore::MainResourceLoader::load):
1174         (WebCore::MainResourceLoader::setDefersLoading):
1175         * page/Frame.cpp:
1176         (WebCore::Frame::paint):
1177         * page/FrameView.cpp:
1178         (WebCore::FrameView::layout):
1179         * page/FrameView.h:
1180         * page/Page.cpp:
1181         (WebCore::Page::setDefersLoading):
1182         * page/Page.h:
1183         (WebCore::Page::defersLoading):
1184         * platform/DeprecatedString.h:
1185         * platform/DeprecatedStringList.h:
1186         * platform/FontFallbackList.h:
1187         * platform/PlatformKeyboardEvent.h:
1188         * platform/PlatformMouseEvent.h:
1189         * platform/PlatformWheelEvent.h:
1190         * platform/mac/ClipboardMac.h:
1191         * platform/mac/ClipboardMac.mm:
1192         (WebCore::ClipboardMac::setDragImage):
1193         (WebCore::ClipboardMac::dragNSImage):
1194         (WebCore::ClipboardMac::sourceOperation):
1195         (WebCore::ClipboardMac::destinationOperation):
1196         * rendering/RenderObject.cpp:
1197         (WebCore::RenderObject::setStyle):
1198         * rendering/break_lines.cpp:
1199         (WebCore::nextBreakablePosition):
1200
1201 2006-10-28  Adam Roben  <aroben@apple.com>
1202
1203         Reviewed by Maciej.
1204
1205         Fix layout tests that broke after r17399. Mitz discovered that the
1206         failures were caused by HitTestResult::m_point being uninitialized
1207         much of the time. HitTestResults are now always constructed with a
1208         point, and RenderLayer::hitTest and RenderLayer::hitTestLayer use that
1209         point instead of being passed one explicitly.
1210
1211         * WebCore.exp: Change constructor symbol.
1212         * bridge/mac/FrameMac.mm:
1213         (WebCore::FrameMac::eventMayStartDrag): Update to new constructor and
1214         hitTest().
1215         (WebCore::FrameMac::handleMouseMoveEvent): Ditto.
1216         * bridge/mac/WebCoreAXObject.mm:
1217         (-[WebCoreAXObject doAXTextMarkerForPosition:]): Ditto.
1218         (-[WebCoreAXObject accessibilityHitTest:]): Ditto.
1219         * dom/Document.cpp:
1220         (WebCore::Document::elementFromPoint): Ditto.
1221         (WebCore::Document::prepareMouseEvent): Ditto.
1222         * page/Frame.cpp:
1223         (WebCore::Frame::isPointInsideSelection): Ditto.
1224         (WebCore::Frame::hitTestResultAtPoint): Ditto.
1225         * page/FrameView.cpp:
1226         (WebCore::FrameView::handleWheelEvent): Ditto.
1227         * rendering/HitTestResult.cpp:
1228         (WebCore::HitTestResult::HitTestResult): Initalize m_point with the
1229         passed point.
1230         * rendering/HitTestResult.h: Update constructor declaration.
1231         * rendering/RenderLayer.cpp:
1232         (WebCore::RenderLayer::autoscroll): Update to new constructor and
1233         hitTest().
1234         (WebCore::RenderLayer::hitTest): Use the IntPoint stored in the
1235         HitTestResult instead of being passed one.
1236         (WebCore::RenderLayer::hitTestLayer): Ditto.
1237         * rendering/RenderLayer.h: Update declarations.
1238
1239 2006-10-28  Nikolas Zimmermann  <zimmermann@kde.org>
1240
1241         Reviewed by Anders.
1242
1243         Fix Qt/Linux build.
1244
1245         * CMakeLists.txt:
1246         * platform/qt/FrameQtClient.cpp:
1247         (WebCore::numRequests):
1248         (WebCore::FrameQtClientDefault::numPendingOrLoadingRequests):
1249         * platform/qt/PopupMenuQt.cpp:
1250         (WebCore::PopupMenu::updateFromElement):
1251
1252 2006-10-28  David Carson  <dacarson@gmail.com>
1253
1254         Tweaked by Sam. Reviewed by Brady.
1255
1256         Fix for: http://bugs.webkit.org/show_bug.cgi?id=11437
1257         Initialize m_modifyBiasSet to false, as it sometimes gets 
1258         used before it has been initalized.
1259
1260         * editing/SelectionController.cpp:
1261         (WebCore::SelectionController::SelectionController):
1262
1263 2006-10-28  Beth Dakin  <bdakin@apple.com>
1264
1265         Reviewed by Darin.
1266
1267         This is the WebCore half of pushing elementAtPoint and the backend 
1268         of WebElementDictionary into WebCore. Most of the changes below are 
1269         to accommodate one of the following:
1270                 
1271         -NodeInfo is now a stand-alone class called HitTestResult. 
1272                 Previously it was defined in RenderObject.h, but not for 
1273                 any particular reason. The WebElementDictionary 
1274                 functionality that was pushed into WebCore has been pushed 
1275                 specifically into the this class. In fact, 
1276                 WebElementDictionary now keeps a HitTestResult as a member 
1277                 varibale.
1278                 
1279         -The enumeration AccessPolicy is now called 
1280                 ClipboardAccessPolicy and is defined in its own header. It 
1281                 was previously defined in ClipboardMac.h, but is now 
1282                 defined independently to avoid including ClipboardMac.h 
1283                 from within FrameMac.h since FrameMac.h is now included in 
1284                 WebElementDictionary.m in WebKit.
1285                 
1286         -Element now has a virtual target() for the sake of 
1287                 NodeInfo::targetFrame() 
1288
1289         * WebCore.exp: Several WebCore functions are newly called from 
1290         WebKit, so they have been added here. 
1291         * WebCore.xcodeproj/project.pbxproj:
1292         * bindings/objc/DOM.mm: Must include Image.h because of adjustments 
1293         to ClipboardMac.
1294         * bridge/mac/FrameMac.h: Adjust to HitTestResult changes.
1295         * bridge/mac/FrameMac.mm:
1296         (WebCore::FrameMac::freeClipboard): Adjust to ClipboardAccessPolicy 
1297         and HitTestResult changes.
1298         (WebCore::FrameMac::eventMayStartDrag): Same.
1299         (WebCore::FrameMac::handleMouseMoveEvent): Same.
1300         (WebCore::FrameMac::dispatchCPPEvent): Same.
1301         (WebCore::FrameMac::mayDHTMLCut): Same.
1302         (WebCore::FrameMac::mayDHTMLCopy): Same.
1303         (WebCore::FrameMac::mayDHTMLPaste): Same.
1304         (WebCore::FrameMac::tryDHTMLCut): Same
1305         (WebCore::FrameMac::tryDHTMLCopy): Same.
1306         (WebCore::FrameMac::tryDHTMLPaste): Same.
1307         * bridge/mac/WebCoreAXObject.mm:
1308         (-[WebCoreAXObject doAXTextMarkerForPosition:]): Adjust to 
1309         HitTestResult changes.
1310         (-[WebCoreAXObject accessibilityHitTest:]): Same.
1311         * bridge/mac/WebCoreFrameBridge.h: Same.
1312         * bridge/mac/WebCoreFrameBridge.mm:
1313         (-[WebCoreFrameBridge dragOperationForDraggingInfo:]): Adjust for 
1314         ClipboardAccessPolicy changes.
1315         (-[WebCoreFrameBridge dragExitedWithDraggingInfo:]): Same.
1316         (-[WebCoreFrameBridge concludeDragForDraggingInfo:]): Same.
1317         * dom/Document.cpp:
1318         (WebCore::Document::elementFromPoint): Adjust for HitTestResult 
1319         changes.
1320         (WebCore::Document::prepareMouseEvent): Same.
1321         * dom/Element.h:
1322         (WebCore::Element::target): Now has a virtual target()
1323         * html/HTMLAnchorElement.h: Same.
1324         * html/HTMLAreaElement.cpp:
1325         (WebCore::HTMLAreaElement::mapMouseEvent): Adjust for HitTestResult 
1326         changes.
1327         * html/HTMLAreaElement.h: Virtual target()
1328         * html/HTMLBaseElement.h:
1329         (WebCore::HTMLBaseElement::target): Same.
1330         * html/HTMLFormElement.h: Same.
1331         * html/HTMLLinkElement.h: Same.
1332         * html/HTMLMapElement.cpp:
1333         (WebCore::HTMLMapElement::mapMouseEvent): Adjust for HitTestResult 
1334         changes.
1335         * html/HTMLMapElement.h: Same.
1336         * page/Frame.cpp:
1337         (WebCore::Frame::isPointInsideSelection): Same.
1338         (WebCore::Frame::hitTestResultAtPoint): Same. 
1339         * page/Frame.h: Same.
1340         * page/FrameView.cpp:
1341         (WebCore::FrameView::handleWheelEvent): Same.
1342         * platform/mac/ClipboardAccessPolicy.h: Added.
1343         (WebCore::):
1344         * platform/mac/ClipboardMac.h: Remove definition of AccessPolicy, 
1345         include ClipboardAccessPolicy.h, and rename AccessPolicy to 
1346         ClipboardAccessPolicy.
1347         * platform/mac/ClipboardMac.mm: Rename ClipboardAccessPolicy.
1348         (WebCore::ClipboardMac::ClipboardMac):
1349         (WebCore::ClipboardMac::setAccessPolicy):
1350         (WebCore::ClipboardMac::clearData):
1351         (WebCore::ClipboardMac::clearAllData):
1352         (WebCore::ClipboardMac::getData):
1353         (WebCore::ClipboardMac::setData):
1354         (WebCore::ClipboardMac::types):
1355         (WebCore::ClipboardMac::setDragImage):
1356         (WebCore::ClipboardMac::setDropEffect):
1357         (WebCore::ClipboardMac::setEffectAllowed):
1358         * rendering/EllipsisBox.cpp:
1359         (WebCore::EllipsisBox::nodeAtPoint): Adjust for HitTestResult 
1360         changes.
1361         * rendering/EllipsisBox.h:
1362         * rendering/HitTestResult.cpp: Added.
1363         (WebCore::HitTestResult::HitTestResult):
1364         (WebCore::HitTestResult::~HitTestResult):
1365         (WebCore::HitTestResult::operator=):
1366         (WebCore::HitTestResult::setInnerNode):
1367         (WebCore::HitTestResult::setInnerNonSharedNode):
1368         (WebCore::HitTestResult::setURLElement):
1369         (WebCore::HitTestResult::setScrollbar):
1370         (WebCore::HitTestResult::targetFrame):
1371         (WebCore::HitTestResult::boundingBox):
1372         (WebCore::HitTestResult::isSelected):
1373         (WebCore::HitTestResult::title):
1374         * rendering/HitTestResult.h: Added.
1375         (WebCore::HitTestResult::readonly):
1376         (WebCore::HitTestResult::active):
1377         (WebCore::HitTestResult::mouseMove):
1378         (WebCore::HitTestResult::innerNode):
1379         (WebCore::HitTestResult::innerNonSharedNode):
1380         (WebCore::HitTestResult::point):
1381         (WebCore::HitTestResult::URLElement):
1382         (WebCore::HitTestResult::scrollbar):
1383         (WebCore::HitTestResult::setPoint):
1384         (WebCore::HitTestResult::setReadonly):
1385         (WebCore::HitTestResult::setActive):
1386         (WebCore::HitTestResult::setMouseMove):
1387         * rendering/InlineBox.cpp:
1388         (WebCore::InlineBox::nodeAtPoint): Adjust to HitTestResult changes.
1389         * rendering/InlineBox.h: Same.
1390         * rendering/InlineFlowBox.cpp:
1391         (WebCore::InlineFlowBox::nodeAtPoint): Same.
1392         * rendering/InlineFlowBox.h: Same.
1393         * rendering/InlineTextBox.cpp: 
1394         (WebCore::InlineTextBox::nodeAtPoint): Same.
1395         * rendering/InlineTextBox.h: Same.
1396         * rendering/RenderBlock.cpp:
1397         (WebCore::RenderBlock::isPointInScrollbar): Same.
1398         (WebCore::RenderBlock::nodeAtPoint): Same.
1399         * rendering/RenderBlock.h: Same.
1400         * rendering/RenderBox.cpp:
1401         (WebCore::RenderBox::nodeAtPoint): Same.
1402         * rendering/RenderBox.h: Same.
1403         * rendering/RenderFlow.cpp:
1404         (WebCore::RenderFlow::hitTestLines): Same.
1405         * rendering/RenderFlow.h: Same.
1406         * rendering/RenderForeignObject.cpp:
1407         (WebCore::RenderForeignObject::nodeAtPoint): Same.
1408         * rendering/RenderForeignObject.h: Same.
1409         * rendering/RenderFrameSet.cpp:
1410         (WebCore::RenderFrameSet::nodeAtPoint): Same.
1411         * rendering/RenderFrameSet.h: Same.
1412         * rendering/RenderImage.cpp:
1413         (WebCore::RenderImage::nodeAtPoint): Same.
1414         * rendering/RenderImage.h: Same.
1415         * rendering/RenderInline.cpp:
1416         (WebCore::RenderInline::nodeAtPoint): Same.
1417         * rendering/RenderInline.h: Same.
1418         * rendering/RenderLayer.cpp:
1419         (WebCore::RenderLayer::autoscroll): Same.
1420         (WebCore::RenderLayer::hitTest): Same.
1421         (WebCore::RenderLayer::hitTestLayer): Same.
1422         (WebCore::RenderLayer::updateHoverActiveState): Same.
1423         * rendering/RenderLayer.h: Same.
1424         * rendering/RenderListBox.cpp:
1425         (WebCore::RenderListBox::isPointInScrollbar): Same.
1426         * rendering/RenderListBox.h: Same.
1427         * rendering/RenderObject.cpp:
1428         (WebCore::RenderObject::hitTest): Same.
1429         (WebCore::RenderObject::setInnerNode): Same.
1430         (WebCore::RenderObject::nodeAtPoint): Same.
1431         * rendering/RenderObject.h: Remove NodeInfo class and forward 
1432         declare HitTestResult.
1433         * rendering/RenderPath.cpp:
1434         (WebCore::RenderPath::nodeAtPoint): Adjust to HitTestResult 
1435         changes.
1436         * rendering/RenderPath.h: Same.
1437         * rendering/RenderSVGImage.cpp:
1438         (WebCore::RenderSVGImage::nodeAtPoint): Same.
1439         * rendering/RenderSVGImage.h: Same
1440         * rendering/RenderSVGText.cpp:
1441         (WebCore::RenderSVGText::nodeAtPoint): Same.
1442         * rendering/RenderSVGText.h: Same.
1443         * rendering/RenderTableRow.cpp:
1444         (WebCore::RenderTableRow::nodeAtPoint): Same.
1445         * rendering/RenderTableRow.h: Same.
1446         * rendering/RenderTableSection.cpp:
1447         (WebCore::RenderTableSection::nodeAtPoint): Same.
1448         * rendering/RenderTableSection.h: Same.
1449         * rendering/RenderText.h: Same.
1450         (WebCore::RenderText::nodeAtPoint): Same.
1451         * rendering/RenderTextControl.cpp:
1452         (WebCore::RenderTextControl::nodeAtPoint): Same.
1453         * rendering/RenderTextControl.h: Same.
1454         * rendering/RootInlineBox.cpp:
1455         (WebCore::RootInlineBox::nodeAtPoint): Same.
1456         * rendering/RootInlineBox.h: Same.
1457
1458 2006-10-27  Maciej Stachowiak  <mjs@apple.com>
1459
1460         Reviewed by Anders.
1461
1462         - reverted fix for http://bugs.webkit.org/show_bug.cgi?id=11212, later we will address the performance
1463         impact of fixing it again.
1464
1465         * bridge/mac/FrameMac.mm:
1466         (WebCore::FrameMac::clear):
1467
1468 2006-10-27  Maciej Stachowiak  <mjs@apple.com>
1469
1470         Reviewed by John & Adam.
1471
1472         - assorted speedups to fix perf regression from fixing correctness regression
1473
1474         * WebCore.exp: exported new methods.
1475         * WebCore.xcodeproj/project.pbxproj: Added CachedResourceMac.mm
1476         * bridge/mac/WebCoreFrameBridge.h:
1477         * bridge/mac/WebCoreFrameBridge.mm:
1478         * loader/CachedResource.cpp: Removed now obsolete getCFURL.
1479         * loader/CachedResource.h:
1480         * loader/mac/CachedResourceMac.mm: Added.
1481         (WebCore::CachedResource::getNSURLRequest): New method; the NSURLRequest is
1482         now cached in the CachedObject.
1483         * loader/mac/FrameLoader.h:
1484         * loader/mac/FrameLoader.mm:
1485         (WebCore::FrameLoader::loadedResourceFromMemoryCache): New method - lets
1486         the WebKit side do faster dispatch for clients that implement the fast path delegate. 
1487         * loader/mac/LoaderFunctionsMac.mm:
1488         (WebCore::CheckCacheObjectStatus): Instead of calling several FrameLoader methods,
1489         just call loadedResourceFromMemoryCache.
1490         * loader/mac/WebFrameLoaderClient.h:
1491
1492 2006-10-27  Oliver Hunt  <oliver@apple.com>
1493
1494         Reviewed by Maciej.
1495
1496         build fix
1497
1498         * dom/Document.cpp:
1499         (WebCore::Document::referrer):
1500
1501 2006-10-27  Geoffrey Garen  <ggaren@apple.com>
1502
1503         Reviewed by Maciej.
1504
1505         Moved some WebCoreFrameBridge functions into FrameLoader.
1506         
1507         I had to make FrameLoader.h capable of compiling in C++-only source files
1508         by adding some forward declarations and __OBJC__ #ifdefs.
1509
1510         * WebCore.exp:
1511         * bridge/mac/FrameMac.h:
1512         * bridge/mac/FrameMac.mm:
1513         (WebCore::FrameMac::createEmptyDocument):
1514         (WebCore::FrameMac::tokenizerProcessedData):
1515         * bridge/mac/WebCoreFrameBridge.h:
1516         * bridge/mac/WebCoreFrameBridge.mm:
1517         * dom/Document.cpp:
1518         (WebCore::Document::processHttpEquiv):
1519         (WebCore::Document::referrer):
1520         * loader/LoaderFunctions.h:
1521         * loader/mac/FrameLoader.h:
1522         * loader/mac/FrameLoader.mm:
1523         (WebCore::numRequests):
1524         (WebCore::FrameLoader::numPendingOrLoadingRequests):
1525         (WebCore::FrameLoader::isReloading):
1526         (WebCore::FrameLoader::referrer):
1527         (WebCore::FrameLoader::loadEmptyDocumentSynchronously):
1528         (WebCore::FrameLoader::startLoadingResource):
1529         * loader/mac/LoaderFunctionsMac.mm:
1530         (WebCore::CheckIfReloading):
1531         * page/Frame.h:
1532         * page/FrameTree.cpp:
1533         (WebCore::FrameTree::isDescendantOf):
1534         (WebCore::FrameTree::traverseNext):
1535         * page/FrameTree.h:
1536         * platform/network/mac/ResourceLoaderMac.mm:
1537         (WebCore::ResourceLoader::start):
1538
1539 2006-10-27  Timothy Hatcher  <timothy@apple.com>
1540
1541         Reviewed by Darin.
1542
1543         <rdar://problem/4478625> HTML Editing: Basic table editing and culling
1544
1545         Expanded the Deletion UI to lists, positioned block element and block elementss with borders.
1546
1547         * editing/DeleteButtonController.cpp:
1548         (WebCore::isDeletableElement):
1549         (WebCore::enclosingDeletableElement):
1550         (WebCore::DeleteButtonController::respondToChangedSelection):
1551
1552 2006-10-27  John Sullivan  <sullivan@apple.com>
1553
1554         Reviewed by Kevin Decker
1555         
1556         Some more grammar-checking plumbing. No additional grammar jokes will have been made by the time
1557         you haven't not finished reading this.
1558
1559         * rendering/InlineTextBox.h:
1560         * rendering/InlineTextBox.cpp:
1561         (WebCore::InlineTextBox::paint):
1562         Updated for changed signature of paintDocumentMarkers, which causes grammar markers to be
1563         considered also.
1564         (WebCore::InlineTextBox::paintDocumentMarkers):
1565         Renamed from paintAllMarkersOfType; now takes a bool for whether background or foreground
1566         markers should be painted, instead of a marker type. This avoids walking the collection of
1567         markers multiple times back to back. Now handles grammar markers.
1568
1569 2006-10-27  Timothy Hatcher  <timothy@apple.com>
1570
1571         Reviewed by Beth.
1572
1573         Renamed Copy Files to Copy Generated Headers.
1574         Copy 4 DOM*Internal.h headers.
1575
1576         * WebCore.xcodeproj/project.pbxproj:
1577         * bindings/scripts/CodeGeneratorObjC.pm:
1578
1579 2006-10-27  John Sullivan  <sullivan@apple.com>
1580
1581         Reviewed by Anders
1582
1583         * WebCore.exp:
1584         exported symbol for FrameMac->advanceToNextSpelling()
1585         
1586         * bridge/mac/WebCoreFrameBridge.h:
1587         * bridge/mac/WebCoreFrameBridge.mm:
1588         removed advanceToNextMisspelling callers. Clients in WebKit must now call FrameMac directly.
1589
1590 2006-10-27  Justin Garcia  <justin.garcia@apple.com>
1591
1592         Reviewed by harrison
1593         
1594         <http://bugs.webkit.org/show_bug.cgi?id=11423>
1595         REGRESSION: First newline missing from textarea's value
1596         
1597         The regression is that foo, return, bar in a textarea serializes as 'foobar'.
1598         
1599         Before my change in r17223, return (an InsertLineBreak) would insert a '\n' 
1600         (the line break) then a br to prevent the '\n' from collapsing, since the 
1601         insertion is being done at the end of a block (the textarea's shadow div).  Then, 
1602         inserting "bar" would displace the br, and "foo\nbar" would serialize as "foo\nbar".  
1603         After my change in r17223, InsertLineBreak would insert a br then a '\n' (reversed 
1604         the order).  Then inserting "bar" would displace the '\n' and "foo"<br>"bar" would 
1605         serialize as "foobar" because when serializing RenderTextControl intentionally asks 
1606         textContent to not convert brs to newlines.  It seems to think that the only brs in 
1607         the shadow div will be placeholders or collapsed.
1608         
1609         We could remove this assumption, but, for consistancy's sake, I changed InsertLineBreak 
1610         to insert two '\n's when at the end of a block in white-space:pre text.  This alone 
1611         would have fixed the bug, but introduced a new one, because foo, return, bar would 
1612         produce "foo\nbar\n" which would serialize as "foo\nbar\n" (even though the second 
1613         '\n' is collapsed, because of 9661).  So, then I changed placeholder displacement to 
1614         displace a '\n' if it's acting as a placeholder.  A "placeholder" is now defined as 
1615         a br or '\n' that will collapse (become superfluous) when content is inserted just 
1616         before it.
1617         
1618         * editing/CompositeEditCommand.cpp:
1619         (WebCore::CompositeEditCommand::removePlaceholderAt): Renamed.  Remove
1620         a br or '\n' if content inserted just before it will cause it to collapse.
1621         * editing/CompositeEditCommand.h:
1622         * editing/InsertLineBreakCommand.cpp:
1623         (WebCore::InsertLineBreakCommand::doApply): Insert the same type of node
1624         to prevent a collapse as was used for the line break.  Fixed comments.
1625         * editing/InsertTextCommand.cpp:
1626         (WebCore::InsertTextCommand::input): Call the renamed function.
1627         
1628 2006-10-27  Geoffrey Garen  <ggaren@apple.com>
1629
1630         Reviewed by Brady.
1631
1632         Fixed semantic inaccuracy in String::operator NSString *(), where a NULL
1633         String became an empty NSString *, instead of nil. This will become important
1634         as we start using this conversion more.
1635         
1636         Added work-around for AppKit crash that semantic accuracy revealed.
1637         
1638         No testcase because I don't think there's a way to reflect this change
1639         in a webpage yet.
1640
1641         * platform/PlatformString.h:
1642         (WebCore::String::operator NSString*):
1643         * platform/mac/TextFieldMac.mm:
1644         (-[NSSearchFieldCell _addStringToRecentSearches:]):
1645
1646 2006-10-27  David Harrison  <harrison@apple.com>
1647
1648         Reviewed by Maciej,
1649
1650         <rdar://problem/4003820> Expose blockquotes in AXAttributedStringForTextMarkerRange
1651
1652         * bridge/mac/WebCoreAXObject.mm:
1653         (blockquoteLevel):
1654         Calculate and return the blockquote level of the element.
1655         
1656         (AXAttributeStringSetBlockquoteLevel):
1657         Add, if non-zero, or clear the block quote level attribute.
1658         
1659         (AXAttributedStringAppendText):
1660         Send AXAttributeStringSetBlockquoteLevel.
1661
1662 2006-10-27  Darin Adler  <darin@apple.com>
1663
1664         - fix one error in the Qt build
1665
1666         * platform/qt/GraphicsContextQt.cpp:
1667         (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
1668         Updated.
1669
1670 2006-10-27  Darin Adler  <darin@apple.com>
1671
1672         Reviewed by Maciej.
1673
1674         * WebCore.exp: Export more symbols needed by WebKit.
1675
1676 2006-10-26  Geoffrey Garen  <ggaren@apple.com>
1677
1678         Reviewed by the Baroness Esmeralda Von Scratch N' Purr XIV.
1679
1680         Fixed layout test crash. Oops.
1681         
1682         * loader/mac/WebDocumentLoader.mm:
1683         (WebCore::canonicalizedTitle):
1684
1685 2006-10-26  John Sullivan  <sullivan@apple.com>
1686
1687         Reviewed by Brady
1688         
1689         - fixed <rdar://problem/4806064> Repro crash in FrameMac::loadRequest following iTunes music store link from salon.com
1690         
1691         This restores some of the nil-handling that was implicit before some of the code was converted from
1692         Objective-C to C++.
1693
1694         * bridge/mac/FrameMac.mm:
1695         (WebCore::FrameMac::loadRequest):
1696         handle nil FrameMac
1697         
1698         * bridge/mac/WebCoreFrameBridge.mm:
1699         (-[WebCoreFrameBridge canTargetLoadInFrame:]):
1700         handle nil Frame
1701
1702 2006-10-26  Geoffrey Garen  <ggaren@apple.com>
1703
1704         Reviewed by Darin, Maciej.
1705
1706         Removed many uses of NSString *.
1707         Moved a few methods from WebCoreFrameBridge to FrameLoader, replacing 
1708         stringByCollapsingNonPrintingCharacters with a c++ equivalent.
1709         
1710         PLT says no performance regression.
1711         
1712         * WebCore.exp:
1713         * bridge/mac/WebCoreFrameBridge.mm:
1714         (-[WebCoreFrameBridge receivedData:textEncodingName:]):
1715         * loader/mac/FrameLoader.h:
1716         * loader/mac/FrameLoader.mm:
1717         (WebCore::FrameLoader::setupForReplaceByMIMEType):
1718         (WebCore::FrameLoader::load):
1719         (WebCore::FrameLoader::canShowMIMEType):
1720         (WebCore::FrameLoader::representationExistsForURLScheme):
1721         (WebCore::FrameLoader::generatedMIMETypeForURLScheme):
1722         (WebCore::FrameLoader::checkContentPolicy):
1723         (WebCore::FrameLoader::reloadAllowingStaleData):
1724         (WebCore::FrameLoader::invalidatePendingPolicyDecision):
1725         (WebCore::FrameLoader::checkNewWindowPolicy):
1726         (WebCore::FrameLoader::continueAfterNewWindowPolicy):
1727         (WebCore::FrameLoader::transitionToCommitted):
1728         (WebCore::FrameLoader::continueLoadRequestAfterNewWindowPolicy):
1729         (WebCore::FrameLoader::post):
1730         * loader/mac/WebDocumentLoader.h:
1731         * loader/mac/WebDocumentLoader.mm:
1732         (WebCore::DocumentLoader::doesProgressiveLoad):
1733         (WebCore::DocumentLoader::setupForReplaceByMIMEType):
1734         (WebCore::DocumentLoader::title):
1735         (WebCore::DocumentLoader::setOverrideEncoding):
1736         (WebCore::DocumentLoader::overrideEncoding):
1737         (WebCore::DocumentLoader::setTitle):
1738         * loader/mac/WebFrameLoaderClient.h:
1739         * loader/mac/WebMainResourceLoader.mm:
1740         (WebCore::MainResourceLoader::continueAfterContentPolicy):
1741
1742 2006-10-26  Timothy Hatcher  <timothy@apple.com>
1743
1744         Reviewed by Adam.
1745
1746         <rdar://problem/4796941> Table deletion outline is misplaced at nytimes.com
1747
1748         The main table at nytimes.com has a fixed width of 874px, but the table ends
1749         up overflowing to 963px. We now use overflowWidth() and overflowHeight() to correct
1750         this. The other bug was a missing top and left of 0px on the container element,
1751         causing the deletion UI to sometimes be offset below the table.
1752
1753         Now check for the element's renderer at the beginning of show() and
1754         return early if it is null.
1755
1756         * editing/DeleteButtonController.cpp:
1757         (WebCore::DeleteButtonController::updateOutlineStyle):
1758         (WebCore::DeleteButtonController::show):
1759
1760 2006-10-26  Anders Carlsson  <acarlsson@apple.com>
1761
1762         Build fix.
1763
1764         * html/CanvasRenderingContext2D.cpp:
1765         Include MathExtras.h
1766         
1767 2006-10-26  John Sullivan  <sullivan@apple.com>
1768
1769         Reviewed by Anders.
1770
1771         Some changes to support new grammar checking code in WebKit.
1772
1773         * WebCore.exp:
1774         added mangled symbol for Document->removeMarkers() so I can call it from WebKit
1775         
1776         * WebCore.xcodeproj/project.pbxproj:
1777         Made Document.h and DocumentMarker.h private so I can include them from WebKit.
1778         Made HTMLCollection.h private because Document.h uses it.
1779         
1780         * bridge/mac/WebCoreFrameBridge.h:
1781         * bridge/mac/WebCoreFrameBridge.mm:
1782         removed unmarkAllMisspellings(); WebKit now calls through to the Document directly
1783
1784 2006-10-26  Anders Carlsson  <acarlsson@apple.com>
1785
1786         Reviewed by Brady.
1787
1788         Add reverseFind to String and use it instead of findRev.
1789         Use CString instead of DeprecatedCString in one place.
1790         
1791         * html/HTMLFormElement.cpp:
1792         (WebCore::HTMLFormElement::formData):
1793         * ksvg2/svg/SVGURIReference.cpp:
1794         (WebCore::SVGURIReference::getTarget):
1795         * loader/Decoder.cpp:
1796         (WebCore::Decoder::checkForCSSCharset):
1797         * platform/PlatformString.h:
1798         (WebCore::String::reverseFind):
1799         * platform/StringImpl.cpp:
1800         (WebCore::StringImpl::reverseFind):
1801         * platform/StringImpl.h:
1802
1803 2006-10-26  John Sullivan  <sullivan@apple.com>
1804
1805         Reviewed by Darin
1806         
1807         More plumbing for grammar checking. Still no grammars is checked.
1808
1809         * dom/DocumentMarker.h:
1810         (WebCore::DocumentMarker::):
1811         added Grammar to enum of marker types; removed explicit enum values; removed unnecessary "enum"
1812         
1813         * platform/GraphicsContext.h:
1814         renamed method drawLineForMisspelling to drawLineForMisspellingOrBadGrammar;
1815         now takes a bool parameter for whether it represents bad grammar or a misspelling 
1816         
1817         * platform/mac/GraphicsContextMac.mm:
1818         (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
1819         Renamed from drawLineForMisspelling; uses green dot instead of red dot for grammar case. Changed
1820         an existing "assert" to "ASSERT".
1821         
1822         * rendering/InlineTextBox.h:
1823         renamed function paintSpellingMarker to paintSpellingOrGrammarMarker;
1824
1825         * rendering/InlineTextBox.cpp:
1826         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
1827         Renamed from paintSpellingMarker; now takes a bool parameter for whether it represents
1828         bad grammar or a misspelling
1829         (WebCore::InlineTextBox::paintAllMarkersOfType):
1830         now handles markers of type Grammar
1831
1832 === Safari-521.29 ===
1833         
1834 2006-10-26  Sam Weinig  <sam.weinig@gmail.com>
1835
1836         Reviewed by Mitz.
1837
1838         Fix for http://bugs.webkit.org/show_bug.cgi?id=11424
1839         Cleanup rendering code
1840
1841         - Assorted code cleanup.
1842
1843         * rendering/AutoTableLayout.cpp:
1844         * rendering/AutoTableLayout.h:
1845         (WebCore::AutoTableLayout::totalPercent):
1846         * rendering/CounterListItem.h:
1847         * rendering/CounterNode.cpp:
1848         * rendering/CounterNode.h:
1849         (WebCore::CounterNode::~CounterNode):
1850         (WebCore::CounterNode::isReset):
1851         * rendering/CounterResetNode.cpp:
1852         * rendering/CounterResetNode.h:
1853         * rendering/DataRef.h:
1854         (WebCore::DataRef::DataRef):
1855         * rendering/DeprecatedRenderSelect.h:
1856         * rendering/DeprecatedSlider.cpp:
1857         * rendering/DeprecatedSlider.h:
1858         * rendering/EllipsisBox.cpp:
1859         * rendering/EllipsisBox.h:
1860         (WebCore::EllipsisBox::EllipsisBox):
1861         * rendering/FixedTableLayout.cpp:
1862         * rendering/FixedTableLayout.h:
1863         * rendering/GapRects.h:
1864         * rendering/InlineBox.cpp:
1865         * rendering/InlineBox.h:
1866         (WebCore::InlineBox::InlineBox):
1867         (WebCore::InlineBox::setConstructed):
1868         (WebCore::InlineBox::clearTruncation):
1869         (WebCore::InlineBox::markDirty):
1870         * rendering/InlineFlowBox.cpp:
1871         * rendering/InlineFlowBox.h:
1872         (WebCore::InlineFlowBox::InlineFlowBox):
1873         (WebCore::InlineFlowBox::setConstructed):
1874         (WebCore::InlineFlowBox::setEdges):
1875         (WebCore::InlineFlowBox::setVerticalOverflowPositions):
1876         (WebCore::InlineFlowBox::setVerticalSelectionPositions):
1877         * rendering/InlineRunBox.h:
1878         (WebCore::InlineRunBox::paintBackgroundAndBorder):
1879         (WebCore::InlineRunBox::paintDecorations):
1880         * rendering/InlineTextBox.cpp:
1881         * rendering/InlineTextBox.h:
1882         (WebCore::InlineTextBox::InlineTextBox):
1883         (WebCore::InlineTextBox::end):
1884         (WebCore::InlineTextBox::textObject):
1885         * rendering/Length.h:
1886         (WebCore::Length::Length):
1887         * rendering/ListMarkerBox.cpp:
1888         * rendering/ListMarkerBox.h:
1889         * rendering/RenderPartObject.h:
1890         * rendering/RootInlineBox.cpp:
1891         * rendering/RootInlineBox.h:
1892         * rendering/SVGInlineFlowBox.cpp:
1893         * rendering/SVGInlineFlowBox.h:
1894         (WebCore::SVGInlineFlowBox::SVGInlineFlowBox):
1895         * rendering/SVGRootInlineBox.cpp:
1896         * rendering/SVGRootInlineBox.h:
1897         (WebCore::SVGRootInlineBox::SVGRootInlineBox):
1898         * rendering/TableLayout.h:
1899         (WebCore::TableLayout::TableLayout):
1900         (WebCore::TableLayout::~TableLayout):
1901         * rendering/bidi.h:
1902         (WebCore::BidiStatus::BidiStatus):
1903         (WebCore::BidiRun::BidiRun):
1904         * rendering/break_lines.h:
1905
1906 2006-10-26  Justin Garcia  <justin.garcia@apple.com>
1907
1908         Reviewed by john
1909
1910         <http://bugs.webkit.org/show_bug.cgi?id=11329>
1911         Gmail Editor: Can't remove styling applied to selection after clicking "Remove Formatting" toolbar icon.
1912         
1913         * editing/Editor.cpp:
1914         (WebCore::Editor::removeFormattingAndStyle): Moved from JSEditor.
1915         Wrapped the plain text fragment in a style span with the document 
1916         default style so that it will appear unstyled regardless of where
1917         it is inserted.  Could have also inserted the plain text fragment 
1918         and then applied the document default style to it, but there is not 
1919         yet any redundant style prevention in ApplyStyleCommand, so this
1920         is cleaner.
1921         * editing/Editor.h:
1922         * editing/JSEditor.cpp:
1923
1924 2006-10-26  Oliver Hunt  <oliver@apple.com>
1925
1926         Reviewed by Anders.
1927         Fixes <rdar://problem/4800518> -- needed to update existing
1928         canvas path elements when transforms are performed on the
1929         context.
1930
1931         * html/CanvasRenderingContext2D.cpp:
1932         (WebCore::CanvasRenderingContext2D::scale):
1933         (WebCore::CanvasRenderingContext2D::rotate):
1934         (WebCore::CanvasRenderingContext2D::translate):
1935
1936 2006-10-26  Nikolas Zimmermann  <zimmermann@kde.org>
1937
1938         Reviewed by Darin.
1939
1940         Fix Qt/Linux build.
1941
1942         * platform/network/qt/ResourceLoaderManager.cpp:
1943         (WebCore::ResourceLoaderManager::slotData):
1944         (WebCore::ResourceLoaderManager::slotMimetype):
1945         (WebCore::ResourceLoaderManager::remove):
1946         (WebCore::ResourceLoaderManager::add):
1947         * platform/network/qt/ResourceLoaderQt.cpp:
1948         (WebCore::ResourceLoader::receivedResponse):
1949         * platform/qt/FrameQtClient.cpp:
1950         (WebCore::FrameQtClientDefault::openURL):
1951         * platform/qt/LoaderFunctionsQt.cpp:
1952         (WebCore::ServeSynchronousRequest):
1953
1954 2006-10-26  Adam Roben  <aroben@apple.com>
1955
1956         Reviewed by Adele.
1957
1958         Fix: <rdar://problem/3951815> add "type-to-select" feature for list
1959         boxes (<select> elements)
1960         Fix: http://bugs.webkit.org/show_bug.cgi?id=9764 New popup menus
1961         should have type-ahead selection without popping up menu
1962
1963         * WebCore.xcodeproj/project.pbxproj: Version wars.
1964         * html/HTMLSelectElement.h: Add new instance variables for type-ahead
1965         find.
1966         * html/HTMLSelectElement.cpp:
1967         (WebCore::HTMLSelectElement::HTMLSelectElement): Initialize new
1968         instance variables.
1969         (WebCore::HTMLSelectElement::defaultEventHandler): Perform type-ahead
1970         find on printable character presses.
1971         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Remove
1972         redundant check that the listIndex has changed (setSelectedIndex does
1973         this for us), and fix indentation.
1974         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Change an if
1975         to an else-if.
1976         (WebCore::stripLeadingWhiteSpace): Helper function for typeAheadFind()
1977         to strip leading whitespace (including non-breaking spaces) from a
1978         string.
1979         (WebCore::HTMLSelectElement::typeAheadFind): New method to perform
1980         type-ahead find.
1981         * platform/PopupMenu.h: Added new updateFromElement() method to be
1982         called from RenderMenuList::updateFromElement().
1983         * platform/mac/PopupMenuMac.mm:
1984         (WebCore::PopupMenu::updateFromElement): While we are using
1985         NSPopUpButtonCell for our popups, this method can stay empty.
1986         * rendering/RenderListBox.cpp:
1987         (WebCore::RenderListBox::updateFromElement): Scroll to reveal the first
1988         selected element.
1989         * rendering/RenderMenuList.cpp:
1990         (WebCore::RenderMenuList::updateFromElement): Tell the popup to update
1991         if it's visible.
1992
1993 2006-10-26  Darin Adler  <darin@apple.com>
1994
1995         Reviewed by Anders.
1996
1997         - fix http://bugs.webkit.org/show_bug.cgi?id=11360
1998           editing/pasteboard/copy-paste-bidi intermittently fails due to disappearance of anonymous RenderBlock
1999
2000         * editing/ReplaceSelectionCommand.cpp:
2001         (WebCore::ReplaceSelectionCommand::removeRedundantStyles):
2002         Use two vectors instead of a hash map: more efficient, deterministic. There was no
2003         reason to use a hash table.
2004
2005 2006-10-26  Maciej Stachowiak  <mjs@apple.com>
2006
2007         Reviewed by Anders.
2008
2009         - .5% speed improvement by avoiding excess CFURLRef allocation
2010
2011         * loader/CachedResource.cpp:
2012         (WebCore::CachedResource::getCFURL): New method. For Mac only (for now), cache the CFURL
2013         here for later reuse.
2014         * loader/CachedResource.h:
2015         * loader/mac/LoaderFunctionsMac.mm:
2016         (WebCore::CheckCacheObjectStatus): Use the cached CFURL, don't make a whole new one.
2017
2018 2006-10-25  Darin Adler  <darin@apple.com>
2019
2020         Reviewed by Anders.
2021
2022         - removed 55 methods from WebCoreFrameBridge
2023         - changed callers to use Frame directly instead
2024         - put FrameLoaderTypes.h types into the WebCore namespace
2025         - first steps to get FrameLoader.h ready for cross-platform duty
2026
2027         * WebCore.exp:
2028         * WebCore.xcodeproj/project.pbxproj:
2029         * bridge/mac/BrowserExtensionMac.mm:
2030         (WebCore::BrowserExtensionMac::createNewWindow):
2031         * bridge/mac/FrameMac.h:
2032         * bridge/mac/FrameMac.mm:
2033         (WebCore::FrameMac::loadRequest):
2034         (WebCore::FrameMac::startRedirectionTimer):
2035         (WebCore::FrameMac::stopRedirectionTimer):
2036         (WebCore::FrameMac::passSubframeEventToSubframe):
2037         (WebCore::FrameMac::handledOnloadEvents):
2038         (WebCore::FrameMac::isLoadTypeReload):
2039         * bridge/mac/WebCoreFrameBridge.h:
2040         * bridge/mac/WebCoreFrameBridge.mm:
2041         (-[WebCoreFrameBridge executionContextForView:]):
2042         (updateRenderingForBindings):
2043         (-[WebCoreFrameBridge canTargetLoadInFrame:]):
2044         (-[WebCoreFrameBridge forceLayoutAdjustingViewSize:]):
2045         (-[WebCoreFrameBridge forceLayoutWithMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
2046         (-[WebCoreFrameBridge installInFrame:]):
2047         (-[WebCoreFrameBridge numPendingOrLoadingRequests]):
2048         (-[WebCoreFrameBridge replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]):
2049         (-[WebCoreFrameBridge baseWritingDirectionForSelectionStart]):
2050         (-[WebCoreFrameBridge dragOperationForDraggingInfo:]):
2051         (stringByCollapsingNonPrintingCharacters):
2052         (-[WebCoreFrameBridge startLoadingResource:withMethod:URL:customHeaders:]):
2053         (-[WebCoreFrameBridge startLoadingResource:withMethod:URL:customHeaders:postData:]):
2054         (-[WebCoreFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
2055         * loader/FrameLoaderTypes.h:
2056         * loader/mac/FrameLoader.h:
2057         * loader/mac/FrameLoader.mm:
2058         (WebCore::FrameLoader::FrameLoader):
2059         (WebCore::FrameLoader::setupForReplace):
2060         (WebCore::FrameLoader::load):
2061         (WebCore::FrameLoader::activeDocumentLoader):
2062         (WebCore::FrameLoader::state):
2063         (WebCore::FrameLoader::setState):
2064         (WebCore::FrameLoader::clearProvisionalLoad):
2065         (WebCore::FrameLoader::markLoadComplete):
2066         (WebCore::FrameLoader::commitProvisionalLoad):
2067         (WebCore::FrameLoader::receivedMainResourceError):
2068         (WebCore::FrameLoader::handleFallbackContent):
2069         (WebCore::FrameLoader::isLoadingMainFrame):
2070         (WebCore::FrameLoader::continueAfterNewWindowPolicy):
2071         (WebCore::FrameLoader::continueAfterNavigationPolicy):
2072         (WebCore::FrameLoader::continueAfterWillSubmitForm):
2073         (WebCore::FrameLoader::continueLoadRequestAfterNavigationPolicy):
2074         (WebCore::FrameLoader::transitionToCommitted):
2075         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2076         (WebCore::FrameLoader::continueLoadRequestAfterNewWindowPolicy):
2077         (-[WebCoreFrameLoaderAsDelegate continueAfterNewWindowPolicy:]):
2078         (-[WebCoreFrameLoaderAsDelegate continueAfterNavigationPolicy:]):
2079         (-[WebCoreFrameLoaderAsDelegate continueAfterWillSubmitForm:]):
2080         * loader/mac/ImageDocumentMac.mm:
2081         (WebCore::finishImageLoad):
2082         * loader/mac/WebDocumentLoader.mm:
2083         (WebCore::DocumentLoader::isLoadingInAPISense):
2084         * loader/mac/WebMainResourceLoader.h:
2085         * loader/mac/WebMainResourceLoader.mm:
2086         (WebCore::MainResourceLoader::continueAfterContentPolicy):
2087         (-[WebCoreMainResourceLoaderAsPolicyDelegate continueAfterContentPolicy:]):
2088         * loader/mac/WebSubresourceLoader.mm:
2089         (-[WebCoreSubresourceHandle initWithLoader:]):
2090         * platform/mac/ListBoxMac.mm:
2091         (-[WebCoreTableView keyDown:]):
2092         (-[WebCoreTableView keyUp:]):
2093         * platform/mac/WebCoreTextField.mm:
2094         (-[WebCoreTextFieldController textView:shouldHandleEvent:]):
2095
2096 2006-10-25  Steve Falkenburg  <sfalken@apple.com>
2097
2098         Reviewed by Darin.
2099
2100         Printing fixes
2101
2102         * page/Frame.cpp:
2103         (WebCore::Frame::adjustPageHeight):
2104         * page/Frame.h:
2105         (WebCore::Frame::setupRootForPrinting):
2106         (WebCore::Frame::computePageRects):
2107
2108 2006-10-25  Anders Carlsson  <acarlsson@apple.com>
2109
2110         Reviewed by Geoff.
2111
2112         <rdar://problem/4799088>
2113         REGRESSION: Translation widget fails to convert data and reports a "Data unavailable" error.
2114
2115         * loader/mac/WebSubresourceLoader.h:
2116         * loader/mac/WebSubresourceLoader.mm:
2117         (-[WebCoreSubresourceHandle initWithLoader:]):
2118         Set the HTTP method before the HTTP body.
2119
2120 2006-10-25  Geoffrey Garen  <ggaren@apple.com>
2121
2122         Reviewed by Adam.
2123
2124         Renamed WebFrameLoader to FrameLoader, to match class name.
2125
2126         * WebCore.xcodeproj/project.pbxproj:
2127         * bridge/mac/FrameMac.mm:
2128         * bridge/mac/WebCoreFrameBridge.mm:
2129         * loader/mac/FrameLoader.mm: Added.
2130         * loader/mac/IconLoaderMac.mm:
2131         * loader/mac/WebDocumentLoader.mm:
2132         * loader/mac/WebFrameLoader.h: Removed.
2133         * loader/mac/WebFrameLoader.mm: Removed.
2134         * loader/mac/WebLoader.mm:
2135         * loader/mac/WebMainResourceLoader.mm:
2136         * loader/mac/WebNetscapePlugInStreamLoader.mm:
2137         * loader/mac/WebSubresourceLoader.mm:
2138
2139 2006-10-25  Darin Adler  <darin@apple.com>
2140
2141         - fix full builds
2142
2143         * WebCore.xcodeproj/project.pbxproj: Mark bridge/mac/WebCoreResourceLoader.h as private.
2144
2145 2006-10-25  David Smith  <catfish.man@gmail.com>
2146
2147         Reviewed by Mitz.
2148
2149         Fixed REGRESSION (r17280): Repro crash when clicking a link with target="_blank"
2150         http://bugs.webkit.org/show_bug.cgi?id=11411
2151
2152         * bridge/mac/WebCoreFrameBridge.mm:
2153         (-[WebCoreFrameBridge canTargetLoadInFrame:]): Check that the target has a frame before using it.
2154
2155 2006-10-25  Maciej Stachowiak  <mjs@apple.com>
2156
2157         Rubber stamped by Mitz.
2158
2159         - moved some files that are essentially part of the ResourceLoader implementation to platform/network/mac
2160
2161         * WebCore.xcodeproj/project.pbxproj:
2162         * bridge/mac/WebCoreResourceLoader.h: Moved to platform/network/mac.
2163         * bridge/mac/WebCoreResourceLoaderImp.h: Moved to platform/network/mac.
2164         * bridge/mac/WebCoreResourceLoaderImp.mm: Moved to platform/network/mac.
2165
2166 2006-10-25  Maciej Stachowiak  <mjs@apple.com>
2167
2168         Rubber stamped by Mark.
2169
2170         - remove no longer existing symbol that was breaking linking
2171
2172         * WebCore.exp:
2173
2174 2006-10-25  Maciej Stachowiak  <mjs@apple.com>
2175
2176         Reviewed by Mitz.
2177         
2178         - fixed "REGRESSION: Activity window doesn't always list all files until refresh"
2179         http://bugs.webkit.org/show_bug.cgi?id=11212
2180
2181         I couldn't figure out how to write a test case.
2182
2183         * bindings/js/kjs_window.cpp:
2184         (KJS::Window::clear): Avoid crashing if already detached.
2185         * bridge/mac/FrameMac.h:
2186         * bridge/mac/FrameMac.mm:
2187         (WebCore::FrameMac::clear): Change prototype to make this a proper
2188         overload for Frame::clear once again(!).
2189
2190 2006-10-24  Darin Adler  <darin@apple.com>
2191
2192         Reviewed by Anders.
2193
2194         - converted WebFrameLoaderClient to C++
2195         - renamed frame->frameLoader() function to frame->loader()
2196         - renamed [bridge impl] to [bridge _frame]
2197         - removed some bridge methods
2198
2199         * WebCore.exp: Added more exports.
2200         * WebCore.xcodeproj/project.pbxproj: Made FrameTree.h private instead of project-internal
2201         so it can be used in WebKit.
2202
2203         * bridge/mac/BrowserExtensionMac.mm:
2204         (WebCore::BrowserExtensionMac::createNewWindow):
2205         * bridge/mac/FrameMac.mm:
2206         (WebCore::FrameMac::createFrame):
2207         (WebCore::FrameMac::didFirstLayout):
2208         * bridge/mac/WebCoreAXObject.mm:
2209         (-[WebCoreAXObject rendererForView:]):
2210         * bridge/mac/WebCoreFrameBridge.h:
2211         * bridge/mac/WebCoreFrameBridge.mm:
2212         (-[WebCoreFrameBridge _shouldAllowAccessFrom:]):
2213         (-[WebCoreFrameBridge canTargetLoadInFrame:]):
2214         (-[WebCoreFrameBridge setOpener:]):
2215         (-[WebCoreFrameBridge getData:andResponse:forURL:]):
2216         (-[WebCoreFrameBridge getAllResourceDatas:andResponses:]):
2217         (-[WebCoreFrameBridge setTitle:]):
2218         (-[WebCoreFrameBridge originalRequestURL]):
2219         (-[WebCoreFrameBridge isLoadTypeReload]):
2220         (-[WebCoreFrameBridge frameDetached]):
2221         (-[WebCoreFrameBridge tokenizerProcessedData]):
2222         (-[WebCoreFrameBridge receivedData:textEncodingName:]):
2223         (-[WebCoreFrameBridge objectLoadedFromCacheWithURL:response:data:]):
2224         (-[WebCoreFrameBridge reportClientRedirectToURL:delay:fireDate:lockHistory:isJavaScriptFormAction:]):
2225         (-[WebCoreFrameBridge reportClientRedirectCancelled:]):
2226         (-[WebCoreFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
2227         (-[WebCoreFrameBridge incomingReferrer]):
2228         (-[WebCoreFrameBridge isReloading]):
2229         (-[WebCoreFrameBridge handledOnloadEvents]):
2230         (-[WebCoreFrameBridge mainResourceURLResponse]):
2231         (-[WebCoreFrameBridge loadEmptyDocumentSynchronously]):
2232         (-[WebCoreFrameBridge _frame]):
2233         (-[WebCoreFrameBridge executionContextForView:]):
2234         * bridge/mac/WebCorePageBridge.mm:
2235         (-[WebCorePageBridge setMainFrame:]):
2236         * dom/Position.cpp:
2237         (WebCore::Position::upstream):
2238         * loader/mac/IconLoaderMac.mm:
2239         (IconLoader::notifyIconChanged):
2240         * loader/mac/WebDocumentLoader.mm:
2241         (WebCore::DocumentLoader::frameLoader):
2242         (WebCore::DocumentLoader::stopLoading):
2243         (WebCore::DocumentLoader::finishedLoading):
2244         (WebCore::DocumentLoader::setupForReplaceByMIMEType):
2245         * loader/mac/WebFormState.mm:
2246         (WebCore::FormState::FormState):
2247         * loader/mac/WebFrameLoader.h:
2248         * loader/mac/WebFrameLoader.mm:
2249         (WebCore::FrameLoader::~FrameLoader):
2250         (WebCore::FrameLoader::prepareForLoadStart):
2251         (WebCore::FrameLoader::finalSetupForReplace):
2252         (WebCore::FrameLoader::safeLoad):
2253         (WebCore::FrameLoader::load):
2254         (WebCore::FrameLoader::startLoading):
2255         (WebCore::FrameLoader::stopLoadingSubframes):
2256         (WebCore::FrameLoader::stopLoading):
2257         (WebCore::FrameLoader::cancelPendingArchiveLoad):
2258         (WebCore::FrameLoader::defersCallbacksChanged):
2259         (WebCore::FrameLoader::setDefersCallbacks):
2260         (WebCore::FrameLoader::setDocumentLoader):
2261         (WebCore::FrameLoader::provisionalLoadStarted):
2262         (WebCore::FrameLoader::clearProvisionalLoad):
2263         (WebCore::FrameLoader::identifierForInitialRequest):
2264         (WebCore::FrameLoader::willSendRequest):
2265         (WebCore::FrameLoader::didReceiveAuthenticationChallenge):
2266         (WebCore::FrameLoader::didCancelAuthenticationChallenge):
2267         (WebCore::FrameLoader::didReceiveResponse):
2268         (WebCore::FrameLoader::didReceiveData):
2269         (WebCore::FrameLoader::didFinishLoad):
2270         (WebCore::FrameLoader::didFailToLoad):
2271         (WebCore::FrameLoader::privateBrowsingEnabled):
2272         (WebCore::FrameLoader::receivedMainResourceError):
2273         (WebCore::FrameLoader::clientRedirectCancelledOrFinished):
2274         (WebCore::FrameLoader::clientRedirected):
2275         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
2276         (WebCore::FrameLoader::closeOldDataSources):
2277         (WebCore::FrameLoader::opened):
2278         (WebCore::FrameLoader::commitProvisionalLoad):
2279         (WebCore::FrameLoader::download):
2280         (WebCore::FrameLoader::finishedLoading):
2281         (WebCore::FrameLoader::notifyIconChanged):
2282         (WebCore::FrameLoader::cancelledError):
2283         (WebCore::FrameLoader::fileDoesNotExistError):
2284         (WebCore::FrameLoader::willUseArchive):
2285         (WebCore::FrameLoader::isArchiveLoadPending):
2286         (WebCore::FrameLoader::handleUnimplementablePolicy):
2287         (WebCore::FrameLoader::cannotShowMIMEType):
2288         (WebCore::FrameLoader::interruptionForPolicyChangeError):
2289         (WebCore::FrameLoader::canShowMIMEType):
2290         (WebCore::FrameLoader::representationExistsForURLScheme):
2291         (WebCore::FrameLoader::generatedMIMETypeForURLScheme):
2292         (WebCore::FrameLoader::checkContentPolicy):
2293         (WebCore::FrameLoader::reloadAllowingStaleData):
2294         (WebCore::FrameLoader::reload):
2295         (WebCore::FrameLoader::didReceiveServerRedirectForProvisionalLoadForFrame):
2296         (WebCore::FrameLoader::finishedLoadingDocument):
2297         (WebCore::FrameLoader::committedLoad):
2298         (WebCore::FrameLoader::revertToProvisional):
2299         (WebCore::FrameLoader::setMainDocumentError):
2300         (WebCore::FrameLoader::mainReceivedCompleteError):
2301         (WebCore::FrameLoader::subframeIsLoading):
2302         (WebCore::FrameLoader::willChangeTitle):
2303         (WebCore::FrameLoader::didChangeTitle):
2304         (WebCore::FrameLoader::checkNewWindowPolicy):
2305         (WebCore::FrameLoader::continueAfterNewWindowPolicy):
2306         (WebCore::FrameLoader::checkNavigationPolicy):
2307         (WebCore::FrameLoader::continueAfterNavigationPolicy):
2308         (WebCore::FrameLoader::continueLoadRequestAfterNavigationPolicy):
2309         (WebCore::FrameLoader::didFirstLayout):
2310         (WebCore::FrameLoader::frameLoadCompleted):
2311         (WebCore::FrameLoader::transitionToCommitted):
2312         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2313         (WebCore::FrameLoader::continueLoadRequestAfterNewWindowPolicy):
2314         (WebCore::FrameLoader::sendRemainingDelegateMessages):
2315         (WebCore::FrameLoader::requestFromDelegate):
2316         (WebCore::FrameLoader::post):
2317         (WebCore::FrameLoader::detachChildren):
2318         (WebCore::FrameLoader::detachFromParent):
2319         (WebCore::FrameLoader::addExtraFieldsToRequest):
2320         (WebCore::FrameLoader::actionInformation):
2321         (WebCore::FrameLoader::checkLoadComplete):
2322         (WebCore::FrameLoader::setClient):
2323         (WebCore::FrameLoader::client):
2324         (WebCore::FrameLoaderClient::~FrameLoaderClient):
2325         * loader/mac/WebFrameLoaderClient.h:
2326         * loader/mac/WebLoader.mm:
2327         (WebCore::WebResourceLoader::frameLoader):
2328         * loader/mac/WebSubresourceLoader.mm:
2329         (-[WebCoreSubresourceHandle initWithLoader:]):
2330         * page/Frame.cpp:
2331         (WebCore::Frame::loader):
2332         * page/Frame.h:
2333         * platform/mac/SliderMac.mm:
2334         (Slider::focusPolicy):
2335
2336 2006-10-24  Darin Adler  <darin@apple.com>
2337
2338         Rubber stamped by Anders.
2339
2340         - get rid of the assertion firing while running the layout tests
2341
2342         This does not fix the real problem, which is that we need to map offsets within
2343         possibly-text-transformed text in the render tree to DOM tree offsets and vice
2344         versa -- but it gets the tests running again.
2345
2346         * dom/Position.cpp: (WebCore::Position::upstream): Commented out the assertion.
2347
2348 2006-10-24  Maciej Stachowiak  <mjs@apple.com>
2349
2350         Reviewed by Oliver.
2351
2352         - more ResourceLoader cleanup
2353             - moved HTTPHeaderMap out of ResourceRequest class, so ResourceResponse will be able to use it too
2354             - took out attempts to suppress setting of "HEAD" and "GET" methods, since underlying bugs are now fixed
2355         
2356         * loader/LoaderFunctions.h:
2357         * loader/mac/LoaderFunctionsMac.mm:
2358         (WebCore::ServeSynchronousRequest):
2359         * loader/mac/WebSubresourceLoader.mm:
2360         (-[WebCoreSubresourceHandle initWithLoader:]):
2361         * platform/network/HTTPHeaderMap.h: Added.
2362         * platform/network/ResourceLoader.cpp:
2363         (WebCore::ResourceLoader::requestHeaders):
2364         * platform/network/ResourceLoader.h:
2365         * platform/network/ResourceRequest.h:
2366         * platform/network/cf/ResourceLoaderCFNet.cpp:
2367         (WebCore::addHeadersFromHashMap):
2368         * xml/xmlhttprequest.cpp:
2369         (WebCore::XMLHttpRequest::send):
2370         * xml/xmlhttprequest.h:
2371
2372 2006-10-24  Justin Garcia  <justin.garcia@apple.com>
2373
2374         Reviewed by darin
2375
2376         <http://bugs.webkit.org/show_bug.cgi?id=10993>
2377         GMail Editor: Caret doesn't always position itself after list marker
2378         
2379         List creation uses moveParagraphs to push content into list items.  
2380         moveParagraphs uses a TextIterator to restore selections after moves.
2381         Some characters emitted by the TextIterator had bad ranges associated
2382         with them.  rangeFromLocationAndLength would skip past the range it
2383         should have used when asked for ranges of length 0.
2384
2385         * editing/TextIterator.cpp:
2386         (WebCore::TextIterator::TextIterator): No longer need to initialize a
2387         removed member variable.
2388         (WebCore::TextIterator::advance): An extra newline is emitted when leaving
2389         some blocks.  Use the same range for this newline as for the first newline.
2390         We should remove this code and just emit two '\n's.
2391         (WebCore::TextIterator::handleTextNode): Setup m_range.
2392         (WebCore::TextIterator::handleTextBox): Ditto.
2393         (WebCore::TextIterator::handleReplacedElement): Ditto.
2394         (WebCore::TextIterator::handleNonTextNode): Ditto.
2395         (WebCore::TextIterator::exitNode): Use an m_range from the last VisiblePosition
2396         in the block we're leaving to that VP after that one.
2397         (WebCore::TextIterator::emitCharacter): This function now takes in the start
2398         and the end of the range associated with the emited character, and sets up m_range.
2399         (WebCore::TextIterator::range): Return m_range.  If it is null (we are atEnd), 
2400         return the end of the range used to create the iterator, as a convenience to
2401         callers that use call range() on an iterator that is atEnd.
2402         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
2403         Same as the changes made to TextIterator's constructor.
2404         (WebCore::SimplifiedBackwardsTextIterator::advance): Use a null m_range instead of
2405         a null m_positionNode to signal that we're finished.
2406         (WebCore::SimplifiedBackwardsTextIterator::handleTextNode): Ditto.
2407         (WebCore::SimplifiedBackwardsTextIterator::handleReplacedElement): Similar to changes
2408         made to TextIterator.
2409         (WebCore::SimplifiedBackwardsTextIterator::emitCharacter): Ditto.
2410         (WebCore::SimplifiedBackwardsTextIterator::emitNewline): Simplified.
2411         (WebCore::SimplifiedBackwardsTextIterator::range): Similar to the changes made to
2412         TextIterator::range.
2413         (WebCore::CharacterIterator::range): This function assumed that an iterator's
2414         range() was safe to modify.
2415         (WebCore::TextIterator::rangeFromLocationAndLength):
2416         If the range we're looking for starts in the current chunk, this function assumed
2417         that if the chunk started in a text node, it would end in the same text node.  This
2418         is no longer the case.
2419         If the range we're looking for starts in the middle of the current chunk, I assume
2420         that the chunk is inside a text node, because those are the only chunks with length
2421         greater than one at the moment.
2422         If the range we're looking for is a zero length range that starts/ends at the end of the
2423         current chunk, we used to return the start of the next chunk, but that's wrong and
2424         is what caused this bug.
2425         * editing/TextIterator.h:
2426         (WebCore::TextIterator::atEnd): The iterator is atEnd when m_range is null.
2427         (WebCore::SimplifiedBackwardsTextIterator::atEnd):
2428         * editing/visible_units.cpp:
2429         (WebCore::previousBoundary): Cleaned up by using a convenience function.
2430         (WebCore::nextBoundary): Ditto.
2431
2432 2006-10-24  Anders Carlsson  <acarlsson@apple.com>
2433
2434         Reviewed by Maciej.
2435
2436         * platform/network/mac/ResourceLoaderMac.mm:
2437         (WebCore::ResourceLoader::start):
2438         Don't retain the header dictionary.
2439
2440 2006-10-24  Geoffrey Garen  <ggaren@apple.com>
2441
2442         Reviewed by Anders.
2443
2444         Fixed http://bugs.webkit.org/show_bug.cgi?id=11404
2445         REGRESSION: Reproducible assertion failure in Shared<WebCore::StringImpl>::ref() 
2446         running svg/custom/svg/custom/gradient-attr-update.svg
2447         
2448         SVGRenderStyle wasn't ref-ing the shared objects it held onto. Oops.
2449
2450         * ksvg2/css/SVGRenderStyle.h:
2451         * ksvg2/css/SVGRenderStyleDefs.h:
2452
2453 2006-10-24  Anders Carlsson  <acarlsson@apple.com>
2454
2455         Reviewed by Mitz.
2456
2457         * platform/network/ResourceRequest.h:
2458         (WebCore::ResourceRequest::ResourceRequest):
2459         Set the http method to "GET" in the constructor that takes a String.
2460
2461 2006-10-24  Sam Weinig  <sam.weinig@gmail.com>
2462
2463         Reviewed by Tim H.
2464
2465         Move kcanvas/Render* and kcanvas/SVG* to rendering/Render*
2466         and rendering/SVG* respectively.  Fix Xcode project and
2467         CMakeLists.txt to account for the moves.
2468
2469         * CMakeLists.txt:
2470         * WebCore.xcodeproj/project.pbxproj:
2471         * kcanvas/RenderForeignObject.cpp: Removed.
2472         * kcanvas/RenderForeignObject.h: Removed.
2473         * kcanvas/RenderPath.cpp: Removed.
2474         * kcanvas/RenderPath.h: Removed.
2475         * kcanvas/RenderSVGContainer.cpp: Removed.
2476         * kcanvas/RenderSVGContainer.h: Removed.
2477         * kcanvas/RenderSVGImage.cpp: Removed.
2478         * kcanvas/RenderSVGImage.h: Removed.
2479         * kcanvas/RenderSVGInline.cpp: Removed.
2480         * kcanvas/RenderSVGInline.h: Removed.
2481         * kcanvas/RenderSVGInlineText.cpp: Removed.
2482         * kcanvas/RenderSVGInlineText.h: Removed.
2483         * kcanvas/RenderSVGTSpan.cpp: Removed.
2484         * kcanvas/RenderSVGTSpan.h: Removed.
2485         * kcanvas/RenderSVGText.cpp: Removed.
2486         * kcanvas/RenderSVGText.h: Removed.
2487         * kcanvas/SVGInlineFlowBox.cpp: Removed.
2488         * kcanvas/SVGInlineFlowBox.h: Removed.
2489         * kcanvas/SVGRootInlineBox.cpp: Removed.
2490         * kcanvas/SVGRootInlineBox.h: Removed.
2491
2492 2006-10-24  Geoffrey Garen  <ggaren@apple.com>
2493
2494         Rolling back in, now fixed:
2495         
2496         Nixed a few more redundant loading functions in Frame. Did my best to update
2497         the non-Mac builds.
2498
2499         * bridge/mac/FrameMac.h:
2500         * bridge/mac/FrameMac.mm:
2501         (WebCore::FrameMac::urlSelected): Kept always 'true' argument for userGesture
2502         always 'true', because changing it broke the world, and testing seems to
2503         indicate that the one caller that might have passed 'false' didn't need to.
2504         * page/Frame.cpp:
2505         (WebCore::Frame::requestFrame):
2506         (WebCore::Frame::frameLoader):
2507         (WebCore::Frame::redirectionTimerFired):
2508         * page/Frame.h:
2509         * platform/gdk/FrameGdk.cpp:
2510         * platform/gdk/FrameGdk.h:
2511         * platform/gdk/TemporaryLinkStubs.cpp:
2512         (FrameGdk::issueCopyCommand):
2513         * platform/qt/FrameQt.cpp:
2514         * platform/qt/FrameQt.h:
2515         * platform/win/TemporaryLinkStubs.cpp:
2516         (WebCore::FrameWin::shouldInterruptJavaScript):
2517         (WebCore::FrameWin::issueCopyCommand):
2518
2519 2006-10-24  Anders Carlsson  <acarlsson@apple.com>
2520
2521         Fix the build (Update for changes to ResourceLoader)
2522         
2523         * platform/network/cf/ResourceLoaderCFNet.cpp:
2524         (WebCore::addHeadersFromHashMap):
2525         (WebCore::ResourceLoader::start):
2526         (WebCore::ResourceLoader::cancel):
2527
2528 2006-10-24  Sam Weinig  <sam.weinig@gmail.com>
2529
2530         Reviewed by Mitz.
2531
2532         Change #includes using <kcanvas/*.h> to use "*.h" instead
2533         to prepare for moving the kcanvas files.
2534
2535         * kcanvas/RenderSVGContainer.h:
2536         * ksvg2/svg/SVGAElement.cpp:
2537         * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
2538         * ksvg2/svg/SVGFETileElement.cpp:
2539         * ksvg2/svg/SVGStyledLocatableElement.cpp:
2540         * ksvg2/svg/SVGStyledTransformableElement.cpp:
2541
2542 2006-10-24  Maciej Stachowiak  <mjs@apple.com>
2543
2544         Reviewed by Darin.
2545
2546         - More movement towards the final network API.
2547         
2548         Changed ResourceLoader::create to take a ResurceRequest and start
2549         the load. Removed methods relating to setting request
2550         headers. Removed methods relating to metaData. Added some more
2551         convenience methods to ResourceRequest.
2552
2553         * dom/XMLTokenizer.cpp:
2554         (WebCore::openFunc):
2555         * loader/LoaderFunctions.h:
2556         * loader/icon/IconLoader.cpp:
2557         (IconLoader::startLoading):
2558         (IconLoader::didFinishLoading):
2559         * loader/icon/IconLoader.h:
2560         * loader/loader.cpp:
2561         (WebCore::Loader::servePendingRequests):
2562         * loader/mac/LoaderFunctionsMac.mm:
2563         (WebCore::ServeSynchronousRequest):
2564         * platform/gdk/FrameGdk.cpp:
2565         (WebCore::FrameGdkClientDefault::openURL):
2566         (WebCore::FrameGdkClientDefault::submitForm):
2567         * platform/network/ResourceLoader.cpp:
2568         (WebCore::ResourceLoader::ResourceLoader):
2569         (WebCore::ResourceLoader::create):
2570         (WebCore::ResourceLoader::responseHTTPHeadersAsString):
2571         (WebCore::ResourceLoader::url):
2572         (WebCore::ResourceLoader::postData):
2573         (WebCore::ResourceLoader::method):
2574         (WebCore::ResourceLoader::client):
2575         * platform/network/ResourceLoader.h:
2576         * platform/network/ResourceLoaderInternal.h:
2577         (WebCore::ResourceLoaderInternal::ResourceLoaderInternal):
2578         * platform/network/ResourceRequest.h:
2579         (WebCore::ResourceRequest::ResourceRequest):
2580         (WebCore::ResourceRequest::httpAccept):
2581         (WebCore::ResourceRequest::setHTTPAccept):
2582         (WebCore::ResourceRequest::addHTTPHeaderFields):
2583         * platform/network/mac/ResourceLoaderMac.mm:
2584         (WebCore::ResourceLoader::start):
2585         (WebCore::ResourceLoader::receivedResponse):
2586         * platform/qt/FrameQtClient.cpp:
2587         (WebCore::FrameQtClientDefault::openURL):
2588         (WebCore::FrameQtClientDefault::submitForm):
2589         * platform/win/TemporaryLinkStubs.cpp:
2590         (WebCore::ResourceLoader::retrieveResponseEncoding):
2591         * xml/XSLTProcessor.cpp:
2592         (WebCore::docLoaderFunc):
2593         * xml/xmlhttprequest.cpp:
2594         (WebCore::XMLHttpRequest::send):
2595         (WebCore::XMLHttpRequest::didFinishLoading):
2596         (WebCore::XMLHttpRequest::didReceiveData):
2597         * xml/xmlhttprequest.h:
2598
2599 2006-10-24  Anders Carlsson  <acarlsson@apple.com>
2600
2601         Reviewed by Geoff.
2602
2603         * loader/FormData.cpp:
2604         (WebCore::FormData::FormData):
2605         * loader/FormData.h:
2606         (WebCore::FormData::FormData):
2607         Add new constructor that takes a void* and a size.
2608
2609 2006-10-24  Geoffrey Garen  <ggaren@apple.com>
2610
2611         Rolling out my last change because it broke the world.
2612
2613         * bridge/mac/FrameMac.h:
2614         * bridge/mac/FrameMac.mm:
2615         (WebCore::FrameMac::openURL):
2616         (WebCore::FrameMac::openURLRequest):
2617         (WebCore::FrameMac::urlSelected):
2618         * page/Frame.cpp:
2619         (WebCore::Frame::openURL):
2620         (WebCore::Frame::frameLoader):
2621         (WebCore::Frame::requestFrame):
2622         (WebCore::Frame::redirectionTimerFired):
2623         * page/Frame.h:
2624         * platform/gdk/FrameGdk.cpp:
2625         (WebCore::FrameGdk::openURL):
2626         * platform/gdk/FrameGdk.h:
2627         * platform/gdk/TemporaryLinkStubs.cpp:
2628         * platform/qt/FrameQt.cpp:
2629         (WebCore::FrameQt::openURL):
2630         (WebCore::FrameQt::openURLRequest):
2631         * platform/qt/FrameQt.h:
2632         * platform/win/TemporaryLinkStubs.cpp:
2633         (WebCore::FrameWin::openURL):
2634         (WebCore::FrameWin::openURLRequest):
2635
2636 2006-10-24  Nikolas Zimmermann  <zimmermann@kde.org>
2637
2638         Reviewed by Adam.
2639
2640         Fixes: http://bugs.webkit.org/show_bug.cgi?id=11396
2641
2642         Kill KRenderingFillPainter/KRenderingStrokePainter. Those are not needed
2643         anymore, since kcanvas/ksvg2 are tightly integrated. No LayoutTests fixed
2644         or broken.
2645
2646         * CMakeLists.txt:
2647         * WebCore.xcodeproj/project.pbxproj:
2648         * kcanvas/KCanvasTreeDebug.cpp:
2649         (WebCore::operator<<):
2650         (WebCore::writeStyle):
2651         * kcanvas/RenderPath.cpp:
2652         (WebCore::RenderPath::fillContains):
2653         * kcanvas/device/KRenderingFillPainter.cpp:
2654         * kcanvas/device/KRenderingFillPainter.h:
2655         * kcanvas/device/KRenderingStrokePainter.cpp:
2656         * kcanvas/device/KRenderingStrokePainter.h:
2657         * kcanvas/device/qt/KRenderingPaintServerGradientQt.cpp:
2658         (WebCore::KRenderingPaintServerLinearGradientQt::setup):
2659         (WebCore::KRenderingPaintServerRadialGradientQt::setup):
2660         * kcanvas/device/qt/KRenderingPaintServerPatternQt.cpp:
2661         * kcanvas/device/qt/KRenderingPaintServerQt.cpp:
2662         (WebCore::KRenderingPaintServerQt::setPenProperties):
2663         * kcanvas/device/qt/KRenderingPaintServerQt.h:
2664         * kcanvas/device/qt/KRenderingPaintServerSolidQt.cpp:
2665         (WebCore::KRenderingPaintServerSolidQt::setup):
2666         * kcanvas/device/qt/RenderPathQt.cpp:
2667         (WebCore::getPathStroke):
2668         (WebCore::RenderPath::strokeBBox):
2669         * kcanvas/device/quartz/KCanvasItemQuartz.mm:
2670         (WebCore::RenderPath::strokeBBox):
2671         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
2672         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
2673         * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
2674         (WebCore::KRenderingPaintServerQuartzHelper::fillPath):
2675         (WebCore::KRenderingPaintServerQuartzHelper::clipToFillPath):
2676         * kcanvas/device/quartz/QuartzSupport.h:
2677         (WebCore::CGLineCapFromKC):
2678         (WebCore::CGLineJoinFromKC):
2679         * kcanvas/device/quartz/QuartzSupport.mm:
2680         (WebCore::applyStrokeStyleToContext):
2681         (WebCore::strokeBoundingBox):
2682         * ksvg2/css/SVGCSSStyleSelector.cpp:
2683         (WebCore::CSSStyleSelector::applySVGProperty):
2684         * ksvg2/css/SVGRenderStyle.h:
2685         (WebCore::SVGRenderStyle::InheritedFlags::):
2686         * ksvg2/css/SVGRenderStyleDefs.h:
2687         * ksvg2/misc/KCanvasRenderingStyle.cpp:
2688         (WebCore::KSVGPainterFactory::dashArrayFromRenderingStyle):
2689         * ksvg2/misc/KCanvasRenderingStyle.h:
2690         * ksvg2/svg/SVGFEImageElement.cpp:
2691
2692 2006-10-24  Geoffrey Garen  <ggaren@apple.com>
2693
2694         Reviewed by Anders.
2695
2696         Nixed a few more redundant loading functions in Frame. Did my best to update
2697         the non-Mac builds.
2698
2699         * bridge/mac/FrameMac.h:
2700         * bridge/mac/FrameMac.mm:
2701         (WebCore::FrameMac::urlSelected): Changed always 'true' argument for userGesture
2702         to actually check for a user gesture. New callers rely on this behavior,
2703         and it seems like the previous behavior must have been a bug.
2704         * page/Frame.cpp:
2705         (WebCore::Frame::requestFrame):
2706         (WebCore::Frame::frameLoader):
2707         (WebCore::Frame::redirectionTimerFired):
2708         * page/Frame.h:
2709         * platform/gdk/FrameGdk.cpp:
2710         * platform/gdk/FrameGdk.h:
2711         * platform/gdk/TemporaryLinkStubs.cpp:
2712         (FrameGdk::issueCopyCommand):
2713         * platform/qt/FrameQt.cpp:
2714         * platform/qt/FrameQt.h:
2715         * platform/win/TemporaryLinkStubs.cpp:
2716         (WebCore::FrameWin::shouldInterruptJavaScript):
2717         (WebCore::FrameWin::issueCopyCommand):
2718
2719 2006-10-24  Nikolas Zimmermann  <zimmermann@kde.org>
2720
2721         Reviewed by Maciej.
2722
2723         Fix Qt/Linux build.
2724
2725         - Remove BrowserExtensionQt, move it's methods to Page/FrameQt.
2726         - Fix CMakeLists.txt to include platform/network.
2727
2728         * CMakeLists.txt:
2729         * platform/qt/BrowserExtensionQt.cpp: Removed.
2730         * platform/qt/BrowserExtensionQt.h: Removed.
2731         * platform/qt/FrameQt.cpp:
2732         (WebCore::FrameQt::FrameQt):
2733         (WebCore::FrameQt::createNewWindow):
2734         (WebCore::FrameQt::goBackOrForward):
2735         (WebCore::FrameQt::historyURL):
2736         (WebCore::FrameQt::getHistoryLength):
2737         * platform/qt/FrameQt.h:
2738         * platform/qt/PageQt.cpp:
2739         (WebCore::Page::canRunModal):
2740         (WebCore::Page::canRunModalNow):
2741         (WebCore::Page::runModal):
2742
2743 2006-10-24  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
2744
2745         Reviewed by Tim H.
2746
2747         Fix for http://bugs.webkit.org/show_bug.cgi?id=11314
2748         Fix build when XSLT_SUPPORT is not defined
2749
2750         Fix unconditional use of XSLT support.
2751
2752         * dom/XMLTokenizer.cpp:
2753         (WebCore::XMLTokenizer::end):
2754
2755 2006-10-24  Simon Hausmann  <hausmann@kde.org>
2756
2757         Reviewed by Darin.
2758
2759         * CMakeLists.txt: Added project name to kde4_automoc macro, as
2760           required by the latest KDE4 cmake module.
2761
2762 2006-10-24  Mitz Pettel  <mitz@webkit.org>
2763
2764         Reviewed by Tim H.
2765
2766         - fix http://bugs.webkit.org/show_bug.cgi?id=11394
2767           HTMLViewSourceDocuments are leaking
2768
2769         * html/HTMLViewSourceDocument.h: Changed RefPtr to plain pointer to avoid
2770         ref cycle.
2771
2772 2006-10-23  Geoffrey Garen  <ggaren@apple.com>
2773
2774         Reviewed by Darin.
2775
2776         Removed one of Frame's redundant urlSelected methods.
2777
2778         * bridge/mac/FrameMac.h:
2779         * bridge/mac/FrameMac.mm:
2780         (WebCore::FrameMac::urlSelected):
2781         since it's unused.
2782         * html/HTMLAnchorElement.cpp:
2783         (WebCore::HTMLAnchorElement::defaultEventHandler): Changed DeprecatedString
2784         to String because the former is deprecated and its performance is irrelevant
2785         here. Added call to completeURL because Frame no longer does it for us.
2786         Having the call here also improves clarity about the element's behavior.
2787         * ksvg2/svg/SVGAElement.cpp:
2788         (WebCore::SVGAElement::defaultEventHandler): ditto. Also removed bizarre
2789         irrelevent NULL checks on ownerDocument() because I couldn't help myself.
2790         * page/Frame.cpp:
2791         (WebCore::Frame::changeLocation):
2792         (WebCore::Frame::urlSelected):
2793         * page/Frame.h:
2794         * platform/network/ResourceRequest.h: Removed explicit keyword on constructor
2795         because we want to be able to use these constructors instead of helper functions
2796         mimicking their behavior sprinkled across different classes.
2797         (WebCore::ResourceRequest::ResourceRequest):
2798
2799 2006-10-24  Brady Eidson  <beidson@apple.com>
2800
2801         Reviewed by Maciej
2802
2803         Moved FrameLoader from WebCoreFrameBridge to Frame.  Frame.h/cpp have generic accessors to the FrameLoader itself
2804         and creation/deletion is currently managed in FrameMac.mm
2805
2806         Besides explicitly commented-upon methods, most of the touched code simply changes to get the FrameLoader from the 
2807         frame instead of the bridge.
2808
2809         The method [WebCoreFrameBridge frameLoader] remains but only for WebKit's use - No new WebCore code should make 
2810         use of it as its days are numbered!
2811
2812         * bridge/mac/FrameMac.mm:
2813         (WebCore::FrameMac::FrameMac): Create the FrameLoader
2814         (WebCore::FrameMac::~FrameMac): Nuke it
2815         (WebCore::FrameMac::loadRequest):
2816
2817         * bridge/mac/WebCoreFrameBridge.h: No longer holds an m_frameLoader
2818         * bridge/mac/WebCoreFrameBridge.mm:
2819         (-[WebCoreFrameBridge initMainFrameWithPage:withEditorClient:]): No longer creates the FrameLoader
2820         (-[WebCoreFrameBridge initSubframeWithOwnerElement:withEditorClient:]): Ditto
2821         (-[WebCoreFrameBridge clearFrame]): No longer tears down the FrameLoader
2822         (-[WebCoreFrameBridge setFrameLoaderClient:]):
2823         (-[WebCoreFrameBridge frameLoader]):
2824         (-[WebCoreFrameBridge setTitle:]):
2825         (-[WebCoreFrameBridge didFirstLayout]):
2826         (-[WebCoreFrameBridge notifyIconChanged:]):
2827         (-[WebCoreFrameBridge originalRequestURL]):
2828         (-[WebCoreFrameBridge isLoadTypeReload]):
2829         (-[WebCoreFrameBridge frameDetached]):
2830         (-[WebCoreFrameBridge tokenizerProcessedData]):
2831         (-[WebCoreFrameBridge receivedData:textEncodingName:]):
2832         (-[WebCoreFrameBridge objectLoadedFromCacheWithURL:response:data:]):
2833         (-[WebCoreFrameBridge reportClientRedirectToURL:delay:fireDate:lockHistory:isJavaScriptFormAction:]):
2834         (-[WebCoreFrameBridge reportClientRedirectCancelled:]):
2835         (-[WebCoreFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
2836         (-[WebCoreFrameBridge incomingReferrer]):
2837         (-[WebCoreFrameBridge isReloading]):
2838         (-[WebCoreFrameBridge handledOnloadEvents]):
2839         (-[WebCoreFrameBridge mainResourceURLResponse]):
2840         (-[WebCoreFrameBridge loadEmptyDocumentSynchronously]):
2841
2842         * loader/mac/WebDocumentLoader.mm:
2843         (WebCore::DocumentLoader::frameLoader):
2844
2845         * loader/mac/WebFrameLoader.mm:
2846         (WebCore::FrameLoader::load):
2847         (WebCore::FrameLoader::stopLoadingSubframes):
2848         (WebCore::FrameLoader::defersCallbacksChanged):
2849         (WebCore::FrameLoader::setState):
2850         (WebCore::FrameLoader::closeOldDataSources):
2851         (WebCore::FrameLoader::subframeIsLoading):
2852         (WebCore::FrameLoader::continueLoadRequestAfterNewWindowPolicy):
2853         (WebCore::FrameLoader::post):
2854         (WebCore::FrameLoader::detachChildren):
2855         (WebCore::FrameLoader::checkLoadComplete):
2856
2857         * loader/mac/WebLoader.mm:
2858         (WebCore::WebResourceLoader::frameLoader):
2859
2860         * loader/mac/WebSubresourceLoader.mm:
2861         (-[WebCoreSubresourceHandle initWithLoader:]):
2862
2863         * page/Frame.cpp:
2864         (WebCore::Frame::frameLoader):
2865         * page/Frame.h:
2866         * page/FramePrivate.h:
2867         (WebCore::FramePrivate::FramePrivate):
2868
2869 2006-10-24  Darin Adler  <darin@apple.com>
2870
2871         Reviewed by Maciej.
2872
2873         - fixed two crashes in layout tests I just introduced
2874
2875         * loader/mac/WebFrameLoader.mm:
2876         (WebCore::FrameLoader::load): Add null check.
2877         (WebCore::FrameLoader::setState): Ditto.
2878
2879 2006-10-23  Darin Adler  <darin@apple.com>
2880
2881         Reviewed by Geoff.
2882
2883         - converted WebDocumentLoader to C++
2884
2885         * WebCore.exp:
2886         * bridge/mac/WebCoreFrameBridge.mm:
2887         (-[WebCoreFrameBridge setTitle:]):
2888         (-[WebCoreFrameBridge originalRequestURL]):
2889         (-[WebCoreFrameBridge receivedData:textEncodingName:]):
2890         (-[WebCoreFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
2891         (-[WebCoreFrameBridge incomingReferrer]):
2892         (-[WebCoreFrameBridge isReloading]):
2893         (-[WebCoreFrameBridge mainResourceURLResponse]):
2894         * loader/mac/WebDocumentLoader.h:
2895         * loader/mac/WebDocumentLoader.mm:
2896         (WebCore::DocumentLoader::DocumentLoader):
2897         (WebCore::DocumentLoader::frameLoader):
2898         (WebCore::DocumentLoader::~DocumentLoader):
2899         (WebCore::DocumentLoader::setMainResourceData):
2900         (WebCore::DocumentLoader::mainResourceData):
2901         (WebCore::DocumentLoader::originalRequest):
2902         (WebCore::DocumentLoader::originalRequestCopy):
2903         (WebCore::DocumentLoader::request):
2904         (WebCore::DocumentLoader::initialRequest):
2905         (WebCore::DocumentLoader::actualRequest):
2906         (WebCore::DocumentLoader::URL):
2907         (WebCore::DocumentLoader::unreachableURL):
2908         (WebCore::DocumentLoader::replaceRequestURLForAnchorScroll):
2909         (WebCore::DocumentLoader::setRequest):
2910         (WebCore::DocumentLoader::setResponse):
2911         (WebCore::DocumentLoader::isStopping):
2912         (WebCore::DocumentLoader::bridge):
2913         (WebCore::DocumentLoader::setMainDocumentError):
2914         (WebCore::DocumentLoader::mainDocumentError):
2915         (WebCore::DocumentLoader::clearErrors):
2916         (WebCore::DocumentLoader::mainReceivedError):
2917         (WebCore::DocumentLoader::stopLoading):
2918         (WebCore::DocumentLoader::setupForReplace):
2919         (WebCore::DocumentLoader::commitIfReady):
2920         (WebCore::DocumentLoader::finishedLoading):
2921         (WebCore::DocumentLoader::setCommitted):
2922         (WebCore::DocumentLoader::isCommitted):
2923         (WebCore::DocumentLoader::setLoading):
2924         (WebCore::DocumentLoader::isLoading):
2925         (WebCore::DocumentLoader::commitLoad):
2926         (WebCore::DocumentLoader::doesProgressiveLoad):
2927         (WebCore::DocumentLoader::receivedData):
2928         (WebCore::DocumentLoader::setupForReplaceByMIMEType):
2929         (WebCore::DocumentLoader::updateLoading):
2930         (WebCore::DocumentLoader::response):
2931         (WebCore::DocumentLoader::setFrame):
2932         (WebCore::DocumentLoader::attachToFrame):
2933         (WebCore::DocumentLoader::detachFromFrame):
2934         (WebCore::DocumentLoader::prepareForLoadStart):
2935         (WebCore::DocumentLoader::loadingStartedTime):
2936         (WebCore::DocumentLoader::setIsClientRedirect):
2937         (WebCore::DocumentLoader::isClientRedirect):
2938         (WebCore::DocumentLoader::setPrimaryLoadComplete):
2939         (WebCore::DocumentLoader::isLoadingInAPISense):
2940         (WebCore::DocumentLoader::addResponse):
2941         (WebCore::DocumentLoader::stopRecordingResponses):
2942         (WebCore::DocumentLoader::title):
2943         (WebCore::DocumentLoader::setLastCheckedRequest):
2944         (WebCore::DocumentLoader::lastCheckedRequest):
2945         (WebCore::DocumentLoader::triggeringAction):
2946         (WebCore::DocumentLoader::setTriggeringAction):
2947         (WebCore::DocumentLoader::responses):
2948         (WebCore::DocumentLoader::setOverrideEncoding):
2949         (WebCore::DocumentLoader::overrideEncoding):
2950         (WebCore::DocumentLoader::setTitle):
2951         (WebCore::DocumentLoader::URLForHistory):
2952         * loader/mac/WebFrameLoader.h:
2953         * loader/mac/WebFrameLoader.mm:
2954         (WebCore::FrameLoader::setupForReplaceByMIMEType):
2955         (WebCore::FrameLoader::finalSetupForReplace):
2956         (WebCore::FrameLoader::safeLoad):
2957         (WebCore::FrameLoader::load):
2958         (WebCore::FrameLoader::startLoading):
2959         (WebCore::FrameLoader::stopLoading):
2960         (WebCore::FrameLoader::activeDocumentLoader):
2961         (WebCore::FrameLoader::addPlugInStreamLoader):
2962         (WebCore::FrameLoader::removePlugInStreamLoader):
2963         (WebCore::FrameLoader::addSubresourceLoader):
2964         (WebCore::FrameLoader::removeSubresourceLoader):
2965         (WebCore::FrameLoader::setDocumentLoader):
2966         (WebCore::FrameLoader::documentLoader):
2967         (WebCore::FrameLoader::setPolicyDocumentLoader):
2968         (WebCore::FrameLoader::provisionalDocumentLoader):
2969         (WebCore::FrameLoader::setProvisionalDocumentLoader):
2970         (WebCore::FrameLoader::setState):
2971         (WebCore::FrameLoader::clearProvisionalLoad):
2972         (WebCore::FrameLoader::commitProvisionalLoad):
2973         (WebCore::FrameLoader::didReceiveResponse):
2974         (WebCore::FrameLoader::originalRequest):
2975         (WebCore::FrameLoader::receivedMainResourceError):
2976         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
2977         (WebCore::FrameLoader::opened):
2978         (WebCore::FrameLoader::initialRequest):
2979         (WebCore::FrameLoader::receivedData):
2980         (WebCore::FrameLoader::setRequest):
2981         (WebCore::FrameLoader::isStopping):
2982         (WebCore::FrameLoader::setResponse):
2983         (WebCore::FrameLoader::mainReceivedError):
2984         (WebCore::FrameLoader::finishedLoading):
2985         (WebCore::FrameLoader::notifyIconChanged):
2986         (WebCore::FrameLoader::URL):
2987         (WebCore::FrameLoader::checkContentPolicy):
2988         (WebCore::FrameLoader::shouldReloadToHandleUnreachableURL):
2989         (WebCore::FrameLoader::reloadAllowingStaleData):
2990         (WebCore::FrameLoader::reload):
2991         (WebCore::FrameLoader::finishedLoadingDocument):
2992         (WebCore::FrameLoader::committedLoad):
2993         (WebCore::FrameLoader::revertToProvisional):
2994         (WebCore::FrameLoader::setMainDocumentError):
2995         (WebCore::FrameLoader::mainReceivedCompleteError):
2996         (WebCore::FrameLoader::subframeIsLoading):
2997         (WebCore::FrameLoader::willChangeTitle):
2998         (WebCore::FrameLoader::didChangeTitle):
2999         (WebCore::FrameLoader::checkNavigationPolicy):
3000         (WebCore::FrameLoader::continueLoadRequestAfterNavigationPolicy):
3001         (WebCore::FrameLoader::transitionToCommitted):
3002         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
3003         (WebCore::FrameLoader::detachFromParent):
3004         * loader/mac/WebFrameLoaderClient.h:
3005
3006 2006-10-23  Brady Eidson  <beidson@apple.com>
3007
3008         Lovingly reviewed by Maciej
3009
3010         Moved loadURL and postURL logic out of WebCoreFrameBridge to FrameMac::loadRequest
3011         This is a big step towards moving FrameLoader out of the Bridge into Frame/Mac itself
3012
3013         * bridge/mac/BrowserExtensionMac.mm:
3014         (WebCore::BrowserExtensionMac::createNewWindow): Use FrameMac::loadRequest
3015
3016         * bridge/mac/FrameMac.mm:
3017         (WebCore::FrameMac::loadRequest): loadURL and postURL logic moved from WebCoreFrameBridge to here
3018
3019         * bridge/mac/WebCoreFrameBridge.h: Nuked loadURL and postURL
3020         * bridge/mac/WebCoreFrameBridge.mm: Ditto
3021         * loader/mac/WebFrameLoader.mm:
3022         (-[WebFrameLoader safeLoadURL:]): Use FrameMac::loadRequest
3023
3024 2006-10-23  Geoffrey Garen  <ggaren@apple.com>
3025
3026         RS by Maciej.
3027
3028         Inside Frame, moved the plethora of load() and stopLoading() functions next 
3029         to each other to facilitate merging and crying.
3030
3031         * bridge/mac/FrameMac.h:
3032         * bridge/mac/FrameMac.mm:
3033         (WebCore::FrameMac::loadRequest):
3034         (WebCore::FrameMac::submitForm):
3035         (WebCore::FrameMac::openURL):
3036         (WebCore::FrameMac::openURLRequest):
3037         (WebCore::FrameMac::urlSelected):
3038         (WebCore::FrameMac::openURLFromPageCache):
3039         (WebCore::FrameMac::createFrame):
3040         * page/Frame.cpp:
3041         (WebCore::Frame::openURL):
3042         (WebCore::Frame::changeLocation):
3043         (WebCore::Frame::urlSelected):
3044         (WebCore::Frame::requestFrame):
3045         (WebCore::Frame::loadSubframe):
3046         (WebCore::Frame::submitFormAgain):
3047         (WebCore::Frame::submitForm):
3048         (WebCore::Frame::stop):
3049         (WebCore::Frame::closeURL):
3050         (WebCore::Frame::cancelRedirection):
3051         (WebCore::Frame::iconURL):
3052         (WebCore::Frame::didOpenURL):
3053         (WebCore::Frame::didExplicitOpen):
3054         * page/Frame.h:
3055
3056 2006-10-23  Geoffrey Garen  <ggaren@apple.com>
3057
3058         RS by Maciej.
3059
3060         Moved our plethora of load() and stopLoading() functions next to each other
3061         to facilitate merging and laughter.
3062
3063         * loader/mac/WebFrameLoader.h:
3064         * loader/mac/WebFrameLoader.mm:
3065         (WebCore::cancelAll):
3066         (WebCore::FrameLoader::prepareForLoadStart):
3067         (WebCore::FrameLoader::setupForReplace):
3068         (WebCore::FrameLoader::setupForReplaceByMIMEType):
3069         (WebCore::FrameLoader::finalSetupForReplace):
3070         (WebCore::FrameLoader::safeLoad):
3071         (WebCore::FrameLoader::load):
3072         (WebCore::FrameLoader::startLoadingMainResource):
3073         (WebCore::FrameLoader::startLoading):
3074         (WebCore::FrameLoader::stopLoadingPlugIns):
3075         (WebCore::FrameLoader::stopLoadingSubresources):
3076         (WebCore::FrameLoader::stopLoading):
3077         (WebCore::FrameLoader::stopLoadingSubframes):
3078         (WebCore::FrameLoader::cancelMainResourceLoad):
3079         (WebCore::FrameLoader::cancelPendingArchiveLoad):
3080         (WebCore::FrameLoader::removeSubresourceLoader):
3081         (WebCore::FrameLoader::mainResourceData):
3082         (WebCore::FrameLoader::releaseMainResourceLoader):
3083
3084 2006-10-23  Darin Adler  <darin@apple.com>
3085
3086         Reviewed by Maciej.
3087
3088         - converted WebFrameLoader to C++
3089
3090         * WebCore.exp: Added many new entry points for WebKit.
3091         * WebCore.xcodeproj/project.pbxproj: Made more files private (SPI).
3092
3093         * bridge/mac/WebCoreFrameBridge.h:
3094         * bridge/mac/WebCoreFrameBridge.mm:
3095         (-[WebCoreFrameBridge initMainFrameWithPage:withEditorClient:]):
3096         (-[WebCoreFrameBridge initSubframeWithOwnerElement:withEditorClient:]):
3097         (-[WebCoreFrameBridge dealloc]):
3098         (-[WebCoreFrameBridge close]):
3099         (-[WebCoreFrameBridge clearFrame]):
3100         (-[WebCoreFrameBridge setFrameLoaderClient:]):
3101         (-[WebCoreFrameBridge frameLoader]):
3102         (-[WebCoreFrameBridge setTitle:]):
3103         (-[WebCoreFrameBridge didFirstLayout]):
3104         (-[WebCoreFrameBridge notifyIconChanged:]):
3105         (-[WebCoreFrameBridge originalRequestURL]):
3106         (-[WebCoreFrameBridge isLoadTypeReload]):
3107         (-[WebCoreFrameBridge frameDetached]):
3108         (-[WebCoreFrameBridge tokenizerProcessedData]):
3109         (-[WebCoreFrameBridge receivedData:textEncodingName:]):
3110         (-[WebCoreFrameBridge startLoadingResource:withMethod:URL:customHeaders:]):
3111         (-[WebCoreFrameBridge objectLoadedFromCacheWithURL:response:data:]):
3112         (-[WebCoreFrameBridge startLoadingResource:withMethod:URL:customHeaders:postData:]):
3113         (-[WebCoreFrameBridge reportClientRedirectToURL:delay:fireDate:lockHistory:isJavaScriptFormAction:]):
3114         (-[WebCoreFrameBridge reportClientRedirectCancelled:]):
3115         (-[WebCoreFrameBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:]):
3116         (-[WebCoreFrameBridge postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
3117         (-[WebCoreFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
3118         (-[WebCoreFrameBridge incomingReferrer]):
3119         (-[WebCoreFrameBridge isReloading]):
3120         (-[WebCoreFrameBridge handledOnloadEvents]):
3121         (-[WebCoreFrameBridge mainResourceURLResponse]):
3122         (-[WebCoreFrameBridge loadEmptyDocumentSynchronously]):
3123         * loader/mac/WebDocumentLoader.h:
3124         * loader/mac/WebDocumentLoader.mm:
3125         (-[WebDocumentLoader frameLoader]):
3126         (-[WebDocumentLoader dealloc]):
3127         (-[WebDocumentLoader mainResourceData]):
3128         (-[WebDocumentLoader setRequest:]):
3129         (-[WebDocumentLoader bridge]):
3130         (-[WebDocumentLoader setMainDocumentError:]):
3131         (-[WebDocumentLoader mainReceivedError:complete:]):
3132         (-[WebDocumentLoader stopLoading]):
3133         (-[WebDocumentLoader setupForReplace]):
3134         (-[WebDocumentLoader commitIfReady]):
3135         (-[WebDocumentLoader finishedLoading]):
3136         (-[WebDocumentLoader commitLoadWithData:]):
3137         (-[WebDocumentLoader doesProgressiveLoadWithMIMEType:]):
3138         (-[WebDocumentLoader setupForReplaceByMIMEType:]):
3139         (-[WebDocumentLoader updateLoading]):
3140         (-[WebDocumentLoader setFrame:]):
3141         (-[WebDocumentLoader attachToFrame]):
3142         (-[WebDocumentLoader detachFromFrame]):
3143         (-[WebDocumentLoader prepareForLoadStart]):
3144         (-[WebDocumentLoader setPrimaryLoadComplete:]):
3145         (-[WebDocumentLoader isLoadingInAPISense]):
3146         (-[WebDocumentLoader setTitle:]):
3147         * loader/mac/WebFrameLoader.h:
3148         (WebCore::FrameLoader::frame):
3149         * loader/mac/WebFrameLoader.mm:
3150         (WebCore::FrameLoader::FrameLoader):
3151         (WebCore::FrameLoader::~FrameLoader):
3152         (WebCore::FrameLoader::activeDocumentLoader):
3153         (WebCore::FrameLoader::addPlugInStreamLoader):
3154         (WebCore::FrameLoader::removePlugInStreamLoader):
3155         (WebCore::FrameLoader::defersCallbacksChanged):
3156         (WebCore::FrameLoader::defersCallbacks):
3157         (WebCore::setAllDefersCallbacks):
3158         (WebCore::FrameLoader::setDefersCallbacks):
3159         (WebCore::cancelAll):
3160         (WebCore::FrameLoader::stopLoadingPlugIns):
3161         (WebCore::FrameLoader::isLoadingMainResource):
3162         (WebCore::FrameLoader::isLoadingSubresources):
3163         (WebCore::FrameLoader::isLoadingPlugIns):
3164         (WebCore::FrameLoader::isLoading):
3165         (WebCore::FrameLoader::stopLoadingSubresources):
3166         (WebCore::FrameLoader::addSubresourceLoader):
3167         (WebCore::FrameLoader::removeSubresourceLoader):
3168         (WebCore::FrameLoader::mainResourceData):
3169         (WebCore::FrameLoader::releaseMainResourceLoader):
3170         (WebCore::FrameLoader::cancelMainResourceLoad):
3171         (WebCore::FrameLoader::startLoadingMainResource):
3172         (WebCore::FrameLoader::stopLoading):
3173         (WebCore::FrameLoader::setDocumentLoader):
3174         (WebCore::FrameLoader::documentLoader):
3175         (WebCore::FrameLoader::setPolicyDocumentLoader):
3176         (WebCore::FrameLoader::provisionalDocumentLoader):
3177         (WebCore::FrameLoader::setProvisionalDocumentLoader):
3178         (WebCore::FrameLoader::state):
3179         (WebCore::FrameLoader::timeOfLastCompletedLoad):
3180         (WebCore::FrameLoader::provisionalLoadStarted):
3181         (WebCore::FrameLoader::setState):
3182         (WebCore::FrameLoader::clearProvisionalLoad):
3183         (WebCore::FrameLoader::markLoadComplete):
3184         (WebCore::FrameLoader::commitProvisionalLoad):
3185         (WebCore::FrameLoader::stopLoadingSubframes):
3186         (WebCore::FrameLoader::startLoading):
3187         (WebCore::FrameLoader::setupForReplace):
3188         (WebCore::FrameLoader::identifierForInitialRequest):
3189         (WebCore::FrameLoader::willSendRequest):
3190         (WebCore::FrameLoader::didReceiveAuthenticationChallenge):
3191         (WebCore::FrameLoader::didCancelAuthenticationChallenge):
3192         (WebCore::FrameLoader::didReceiveResponse):
3193         (WebCore::FrameLoader::didReceiveData):
3194         (WebCore::FrameLoader::didFinishLoad):
3195         (WebCore::FrameLoader::didFailToLoad):
3196         (WebCore::FrameLoader::privateBrowsingEnabled):
3197         (WebCore::FrameLoader::originalRequest):
3198         (WebCore::FrameLoader::receivedMainResourceError):
3199         (WebCore::FrameLoader::clientRedirectCancelledOrFinished):
3200         (WebCore::FrameLoader::clientRedirected):
3201         (WebCore::FrameLoader::shouldReload):
3202         (WebCore::FrameLoader::load):
3203         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
3204         (WebCore::FrameLoader::closeOldDataSources):
3205         (WebCore::FrameLoader::opened):
3206         (WebCore::FrameLoader::initialRequest):
3207         (WebCore::FrameLoader::receivedData):
3208         (WebCore::FrameLoader::setRequest):
3209         (WebCore::FrameLoader::download):
3210         (WebCore::FrameLoader::bridge):
3211         (WebCore::FrameLoader::handleFallbackContent):
3212         (WebCore::FrameLoader::isStopping):
3213         (WebCore::FrameLoader::setupForReplaceByMIMEType):
3214         (WebCore::FrameLoader::setResponse):
3215         (WebCore::FrameLoader::mainReceivedError):
3216         (WebCore::FrameLoader::finishedLoading):
3217         (WebCore::FrameLoader::notifyIconChanged):
3218         (WebCore::FrameLoader::URL):
3219         (WebCore::FrameLoader::cancelledError):
3220         (WebCore::FrameLoader::fileDoesNotExistError):
3221         (WebCore::FrameLoader::willUseArchive):
3222         (WebCore::FrameLoader::isArchiveLoadPending):
3223         (WebCore::FrameLoader::cancelPendingArchiveLoad):
3224         (WebCore::FrameLoader::handleUnimplementablePolicy):
3225         (WebCore::FrameLoader::cannotShowMIMEType):
3226         (WebCore::FrameLoader::interruptionForPolicyChangeError):
3227         (WebCore::FrameLoader::isHostedByObjectElement):
3228         (WebCore::FrameLoader::isLoadingMainFrame):
3229         (WebCore::FrameLoader::canShowMIMEType):
3230         (WebCore::FrameLoader::representationExistsForURLScheme):
3231         (WebCore::FrameLoader::generatedMIMETypeForURLScheme):
3232         (WebCore::FrameLoader::checkNavigationPolicy):
3233         (WebCore::FrameLoader::checkContentPolicy):
3234         (WebCore::FrameLoader::cancelContentPolicyCheck):
3235         (WebCore::FrameLoader::shouldReloadToHandleUnreachableURL):
3236         (WebCore::FrameLoader::reloadAllowingStaleData):
3237         (WebCore::FrameLoader::reload):
3238         (WebCore::FrameLoader::didReceiveServerRedirectForProvisionalLoadForFrame):
3239         (WebCore::FrameLoader::finishedLoadingDocument):
3240         (WebCore::FrameLoader::committedLoad):
3241         (WebCore::FrameLoader::isReplacing):
3242         (WebCore::FrameLoader::setReplacing):
3243         (WebCore::FrameLoader::revertToProvisional):
3244         (WebCore::FrameLoader::setMainDocumentError):
3245         (WebCore::FrameLoader::mainReceivedCompleteError):
3246         (WebCore::FrameLoader::finalSetupForReplace):
3247         (WebCore::FrameLoader::prepareForLoadStart):
3248         (WebCore::FrameLoader::subframeIsLoading):
3249         (WebCore::FrameLoader::willChangeTitle):
3250         (WebCore::FrameLoader::didChangeTitle):
3251         (WebCore::FrameLoader::loadType):
3252         (WebCore::FrameLoader::invalidatePendingPolicyDecision):
3253         (WebCore::FrameLoader::checkNewWindowPolicy):
3254         (WebCore::FrameLoader::continueAfterNewWindowPolicy):
3255         (WebCore::FrameLoader::continueAfterNavigationPolicy):
3256         (WebCore::FrameLoader::continueAfterWillSubmitForm):
3257         (WebCore::FrameLoader::continueLoadRequestAfterNavigationPolicy):
3258         (WebCore::FrameLoader::didFirstLayout):
3259         (WebCore::FrameLoader::frameLoadCompleted):
3260         (WebCore::FrameLoader::firstLayoutDone):
3261         (WebCore::FrameLoader::isQuickRedirectComing):
3262         (WebCore::FrameLoader::transitionToCommitted):
3263         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
3264         (WebCore::FrameLoader::continueLoadRequestAfterNewWindowPolicy):
3265         (WebCore::FrameLoader::sendRemainingDelegateMessages):
3266         (WebCore::FrameLoader::requestFromDelegate):
3267         (WebCore::FrameLoader::post):
3268         (WebCore::FrameLoader::detachChildren):
3269         (WebCore::FrameLoader::detachFromParent):
3270         (WebCore::FrameLoader::addExtraFieldsToRequest):
3271         (WebCore::FrameLoader::safeLoad):
3272         (WebCore::FrameLoader::actionInformation):
3273         (WebCore::FrameLoader::checkLoadComplete):
3274         (WebCore::FrameLoader::setFrameLoaderClient):
3275         (WebCore::FrameLoader::client):
3276         (WebCore::FrameLoader::asDelegate):
3277         (-[WebCoreFrameLoaderAsDelegate initWithLoader:]):
3278         (-[WebCoreFrameLoaderAsDelegate detachFromLoader]):
3279         (-[WebCoreFrameLoaderAsDelegate continueFragmentScrollAfterNavigationPolicy:formState:]):
3280         (-[WebCoreFrameLoaderAsDelegate continueAfterNewWindowPolicy:]):
3281         (-[WebCoreFrameLoaderAsDelegate continueAfterNavigationPolicy:]):
3282         (-[WebCoreFrameLoaderAsDelegate continueAfterWillSubmitForm:]):
3283         (-[WebCoreFrameLoaderAsDelegate continueLoadRequestAfterNavigationPolicy:formState:]):
3284         (-[WebCoreFrameLoaderAsDelegate continueLoadRequestAfterNewWindowPolicy:frameName:formState:]):
3285         * loader/mac/WebLoader.h:
3286         (WebCore::WebResourceLoader::identifier):
3287         (WebCore::WebResourceLoader::reachedTerminalState):
3288         (WebCore::WebResourceLoader::cancelled):
3289         * loader/mac/WebLoader.mm:
3290         (WebCore::WebResourceLoader::WebResourceLoader):
3291         (WebCore::WebResourceLoader::releaseResources):
3292         (WebCore::WebResourceLoader::load):
3293         (WebCore::WebResourceLoader::frameLoader):
3294         (WebCore::WebResourceLoader::willSendRequest):
3295         (WebCore::WebResourceLoader::didReceiveAuthenticationChallenge):
3296         (WebCore::WebResourceLoader::didCancelAuthenticationChallenge):
3297         (WebCore::WebResourceLoader::didReceiveResponse):
3298         (WebCore::WebResourceLoader::didReceiveData):
3299         (WebCore::WebResourceLoader::didFinishLoading):
3300         (WebCore::WebResourceLoader::didFinishLoadingOnePart):
3301         (WebCore::WebResourceLoader::didFail):
3302         (WebCore::WebResourceLoader::willCacheResponse):
3303         (WebCore::WebResourceLoader::didCancel):
3304         (WebCore::WebResourceLoader::cancel):
3305         (WebCore::WebResourceLoader::cancelledError):
3306         (WebCore::WebResourceLoader::delegate):
3307         * loader/mac/WebMainResourceLoader.h:
3308         * loader/mac/WebMainResourceLoader.mm:
3309         (WebCore::MainResourceLoader::MainResourceLoader):
3310         (WebCore::MainResourceLoader::create):
3311         (WebCore::MainResourceLoader::receivedError):
3312         (WebCore::MainResourceLoader::didCancel):
3313         (WebCore::MainResourceLoader::interruptionForPolicyChangeError):
3314         (WebCore::MainResourceLoader::isPostOrRedirectAfterPost):
3315         (WebCore::MainResourceLoader::addData):
3316         (WebCore::MainResourceLoader::willSendRequest):
3317         (WebCore::MainResourceLoader::continueAfterContentPolicy):
3318         (WebCore::MainResourceLoader::didReceiveResponse):
3319         (WebCore::MainResourceLoader::didReceiveData):
3320         (WebCore::MainResourceLoader::didFinishLoading):
3321         (WebCore::MainResourceLoader::didFail):
3322         (WebCore::MainResourceLoader::loadNow):
3323         (WebCore::MainResourceLoader::policyDelegate):
3324         * loader/mac/WebNetscapePlugInStreamLoader.h:
3325         * loader/mac/WebNetscapePlugInStreamLoader.mm:
3326         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
3327         (WebCore::NetscapePlugInStreamLoader::create):
3328         (WebCore::NetscapePlugInStreamLoader::didReceiveResponse):
3329         (WebCore::NetscapePlugInStreamLoader::didFinishLoading):
3330         (WebCore::NetscapePlugInStreamLoader::didFail):
3331         (WebCore::NetscapePlugInStreamLoader::didCancel):
3332         * loader/mac/WebSubresourceLoader.h:
3333         * loader/mac/WebSubresourceLoader.mm:
3334         (-[WebCoreSubresourceHandle initWithLoader:]):
3335
3336 2006-10-23  Geoffrey Garen  <ggaren@apple.com>
3337
3338         Reviewed by Bradee.
3339
3340         Shrunk BrowserExtension in preparation for its imminent death, moving page-
3341         level operations to Page and frame-level operations to Frame.
3342         
3343         Removed bizarre Mac(this) syntax inside virtual FrameMac member functions, 
3344         because 'this' is guaranteed by the compiler to be a FrameMac*.
3345         
3346         * bindings/js/kjs_window.cpp: Added NULL checks for m_frame in places
3347         where it can be NULL.
3348         * bindings/js/kjs_window.cpp:
3349         (KJS::canShowModalDialog):
3350         (KJS::canShowModalDialogNow):
3351         (KJS::showModalDialog):
3352         (KJS::History::getValueProperty):
3353         (KJS::HistoryFunc::callAsFunction):
3354         * bridge/BrowserExtension.h:
3355         (WebCore::BrowserExtension::~BrowserExtension):
3356         * bridge/mac/BrowserExtensionMac.h:
3357         * bridge/mac/BrowserExtensionMac.mm:
3358         (WebCore::BrowserExtensionMac::createNewWindow):
3359         * bridge/mac/FrameMac.h:
3360         * bridge/mac/FrameMac.mm:
3361         (WebCore::FrameMac::frameDetached):
3362         (WebCore::FrameMac::unfocusWindow):
3363         (WebCore::FrameMac::bridgeForWidget):
3364         (WebCore::FrameMac::documentViewForNode):
3365         (WebCore::FrameMac::passSubframeEventToSubframe):
3366         (WebCore::Frame::setNeedsReapplyStyles):
3367         (WebCore::FrameMac::customHighlightLineRect):
3368         (WebCore::FrameMac::paintCustomHighlight):
3369         (WebCore::FrameMac::getHistoryLength):
3370         (WebCore::FrameMac::goBackOrForward):
3371         (WebCore::FrameMac::historyURL):
3372         * bridge/mac/PageMac.mm:
3373         (WebCore::Page::canRunModal):
3374         (WebCore::Page::canRunModalNow):
3375         (WebCore::Page::runModal):
3376         * bridge/mac/WebCoreFrameBridge.h:
3377         * bridge/mac/WebCorePageBridge.h:
3378         * bridge/win/BrowserExtensionWin.h:
3379         * page/Frame.cpp:
3380         (WebCore::Frame::scheduleHistoryNavigation):
3381         (WebCore::Frame::redirectionTimerFired):
3382         * page/Frame.h:
3383         * page/Page.h:
3384
3385 2006-10-23  Justin Garcia  <justin.garcia@apple.com>
3386
3387         Reviewed by mjs
3388
3389         <http://bugs.webkit.org/show_bug.cgi?id=11334>
3390         Writely Editor: Placing caret in a list "highlights" both Numbered List and Bulleted List toolbar icons
3391
3392         * WebCore.xcodeproj/project.pbxproj:
3393         * editing/Editor.cpp:
3394         (WebCore::Editor::selectionUnorderedListState): Added.
3395         (WebCore::Editor::selectionOrderedListState): Added.
3396         * editing/Editor.h:
3397         * editing/JSEditor.cpp:
3398         * page/Frame.cpp:
3399         * page/Frame.h:
3400
3401 2006-10-23  John Sullivan  <sullivan@apple.com>
3402
3403         Reviewed by Tim H
3404
3405         * WebCore.xcodeproj/project.pbxproj:
3406         Include WebCorePrefix.h in Xcode project for convenience and for consistency with WebKit
3407
3408 2006-10-23  Sam Weinig  <sam.weinig@gmail.com>
3409
3410         Reviewed by Tim H.
3411
3412         Patch for http://bugs.webkit.org/show_bug.cgi?id=11291
3413         PNG as cursor image format instead of TIFF
3414
3415         Original patch by Lars Naesbye Christensen (larsnaesbye@stud.ku.dk)
3416
3417         - Convert cursor images from TIFF to PNG.
3418
3419         * Resources/eastResizeCursor.png: Added.
3420         * Resources/eastResizeCursor.tiff: Removed.
3421         * Resources/eastWestResizeCursor.png: Added.
3422         * Resources/eastWestResizeCursor.tiff: Removed.
3423         * Resources/helpCursor.png: Added.
3424         * Resources/helpCursor.tiff: Removed.
3425         * Resources/linkCursor.png: Added.
3426         * Resources/linkCursor.tiff: Removed.
3427         * Resources/moveCursor.png: Added.
3428         * Resources/moveCursor.tiff: Removed.
3429         * Resources/northEastResizeCursor.png: Added.
3430         * Resources/northEastResizeCursor.tiff: Removed.
3431         * Resources/northEastSouthWestResizeCursor.png: Added.
3432         * Resources/northEastSouthWestResizeCursor.tiff: Removed.
3433         * Resources/northResizeCursor.png: Added.
3434         * Resources/northResizeCursor.tiff: Removed.
3435         * Resources/northSouthResizeCursor.png: Added.
3436         * Resources/northSouthResizeCursor.tiff: Removed.
3437         * Resources/northWestResizeCursor.png: Added.
3438         * Resources/northWestResizeCursor.tiff: Removed.
3439         * Resources/northWestSouthEastResizeCursor.png: Added.
3440         * Resources/northWestSouthEastResizeCursor.tiff: Removed.
3441         * Resources/southEastResizeCursor.png: Added.
3442         * Resources/southEastResizeCursor.tiff: Removed.
3443         * Resources/southResizeCursor.png: Added.
3444         * Resources/southResizeCursor.tiff: Removed.
3445         * Resources/southWestResizeCursor.png: Added.
3446         * Resources/southWestResizeCursor.tiff: Removed.
3447         * Resources/waitCursor.png: Added.
3448         * Resources/waitCursor.tiff: Removed.
3449         * Resources/westResizeCursor.png: Added.
3450         * Resources/westResizeCursor.tiff: Removed.
3451         * WebCore.xcodeproj/project.pbxproj:
3452         * platform/mac/CursorMac.mm:
3453         (WebCore::leakNamedCursor):
3454
3455 2006-10-23  Maciej Stachowiak  <mjs@apple.com>
3456
3457         - fixed build from last change.
3458
3459         * bridge/mac/FrameMac.h:
3460         * bridge/mac/FrameMac.mm:
3461         (WebCore::FrameMac::loadRequest):
3462         (WebCore::FrameMac::openURL):
3463
3464 2006-10-23  Adam Roben  <aroben@apple.com>
3465
3466         Reviewed by Adele.
3467
3468         Move border-radius rule for <select>s into RenderThemeMac, as this is
3469         really a platform-specific look.
3470
3471         * css/html4.css:
3472         * rendering/RenderThemeMac.mm:
3473         (WebCore::RenderThemeMac::adjustMenuListButtonStyle):
3474
3475 2006-10-23  Maciej Stachowiak  <mjs@apple.com>
3476
3477         Reviewed by Brady.
3478
3479         - moved things around so loadURL:... is only called from one place
3480
3481         * bridge/mac/FrameMac.h:
3482         * bridge/mac/FrameMac.mm:
3483         (WebCore::FrameMac::frameDetached):
3484         (WebCore::FrameMac::loadRequest):
3485         (WebCore::FrameMac::submitForm):
3486         (WebCore::FrameMac::openURL):
3487         (WebCore::FrameMac::openURLRequest):
3488         (WebCore::FrameMac::urlSelected):
3489
3490 2006-10-23  Justin Garcia  <justin.garcia@apple.com>
3491
3492         Reviewed by john
3493         
3494         <http://bugs.webkit.org/show_bug.cgi?id=11333>
3495         Writely Editor: After inserting a HR element, pressing return key creates a copy of this HR element in the document
3496         
3497         Added special cases in InsertLineBreakCommand for inserting before
3498         and after tables and horizontal rules.  Also, perform InsertLineBreak
3499         instead of InsertParagraphSeparator at these positions.
3500
3501         * editing/InsertLineBreakCommand.cpp:
3502         (WebCore::InsertLineBreakCommand::doApply):  Use the canonical form
3503         of the caret position when we check for the new special cases because 
3504         we know that we canonicalize VisiblePositions to those positions.
3505         Added code to handle inserting before/after tables and horizontal rules.  
3506         Fixed a bug when inserting at the end of a block (it checked for a collapse
3507         of the inserted br by looking for the absence of a br, but the line break 
3508         might have been a '\n' in white-space:pre text).  Removed unused LOGs.
3509         * editing/InsertParagraphSeparatorCommand.cpp:
3510         (WebCore::InsertParagraphSeparatorCommand::doApply): Perform an 
3511         InsertLineBreakCommand when before/after a table or a horizontal rule
3512         so that we don't have to maintain two pieces of special case code.
3513         Migrated to enclosingBlock.
3514         * editing/htmlediting.cpp: Added a FIXME.
3515         * editing/visible_units.cpp:
3516         (WebCore::startOfParagraph): Added a workaround for 8622.
3517         
3518 2006-10-23  Adam Roben  <aroben@apple.com>
3519
3520         Reviewed by Adele.
3521
3522         Make popups a little more flexible.
3523
3524         * platform/PopupMenu.h:
3525
3526 2006-10-23  Sam Weinig  <sam.weinig@gmail.com>
3527
3528         Reviewed by Tim H.
3529
3530         Cleanup CodeGeneratorJS.pm
3531
3532         * bindings/scripts/CodeGeneratorJS.pm:
3533
3534 2006-10-23  Adam Roben  <aroben@apple.com>
3535
3536         Rubberstamped by Brady.
3537
3538         * loader/icon/IconLoader.h: Changed angle-brackets to quotes for
3539         #include of ResourceLoader.h, since it's a WebCore header.
3540
3541 2006-10-23  Darin Adler  <darin@apple.com>
3542
3543         - fixed mistake that was preventing any loading from happening
3544
3545         * platform/network/ResourceLoaderClient.h: (WebCore::ResourceLoaderClient::didReceiveData):
3546         Changed parameter back to int. Perhaps we want to move to "long long" consistently, but
3547         I'll leave that up to Maciej.
3548
3549 2006-10-23  Maciej Stachowiak  <mjs@apple.com>
3550
3551         Reviewed by Anders.
3552
3553         - start converting ResourceLoaderClient to new API
3554
3555         Did the bits I could do without introducing new types:
3556         
3557         - renamed receivedData to didReceiveData
3558         - renamed version of receivedAllData that doesn't pass any data to didFinishLoading
3559
3560         * bridge/mac/WebCoreResourceLoaderImp.mm:
3561         (-[WebCoreResourceLoaderImp addData:]):
3562         (-[WebCoreResourceLoaderImp finishJobAndHandle:]):
3563         * loader/icon/IconLoader.cpp:
3564         (IconLoader::didReceiveData):
3565         (IconLoader::didFinishLoading):
3566         * loader/icon/IconLoader.h:
3567         * loader/loader.cpp:
3568         (WebCore::Loader::didReceiveData):
3569         * loader/loader.h:
3570         * platform/gdk/FrameGdk.cpp:
3571         (WebCore::FrameGdkClientDefault::didReceiveData):
3572         * platform/gdk/FrameGdk.h:
3573         * platform/network/ResourceLoaderClient.h:
3574         (WebCore::ResourceLoaderClient::didReceiveData):
3575         (WebCore::ResourceLoaderClient::didFinishLoading):
3576         (WebCore::ResourceLoaderClient::receivedResponse):
3577         * platform/network/cf/ResourceLoaderCFNet.cpp:
3578         (WebCore::didReceiveData):
3579         (WebCore::didFinishLoading):
3580         (WebCore::didFail):
3581         (WebCore::ResourceLoader::cancel):
3582         * platform/network/gdk/ResourceLoaderManager.cpp:
3583         (WebCore::writeCallback):
3584         (WebCore::ResourceLoaderManager::downloadTimerCallback):
3585         (WebCore::ResourceLoaderManager::remove):
3586         * platform/network/qt/ResourceLoaderManager.cpp:
3587         (WebCore::ResourceLoaderManager::slotData):
3588         (WebCore::ResourceLoaderManager::remove):
3589         * platform/network/win/ResourceLoaderWin.cpp:
3590         (WebCore::ResourceLoader::onRequestComplete):
3591         (WebCore::ResourceLoader::fileLoadTimer):
3592         (WebCore::ResourceLoader::cancel):
3593         * platform/qt/FrameQtClient.cpp:
3594         (WebCore::FrameQtClientDefault::didReceiveData):
3595         * platform/qt/FrameQtClient.h:
3596         * xml/xmlhttprequest.cpp:
3597         (WebCore::XMLHttpRequest::processSyncLoadResults):
3598         (WebCore::XMLHttpRequest::didFinishLoading):
3599         (WebCore::XMLHttpRequest::didReceiveData):
3600         * xml/xmlhttprequest.h:
3601
3602 2006-10-23  Maciej Stachowiak  <mjs@apple.com>
3603
3604         Rubber stamped by Anders.
3605
3606         - marked files executable
3607         
3608         * ksvg2/scripts/csscssmakeprops:
3609         * ksvg2/scripts/csscssmakevalues:
3610
3611 2006-10-22  Maciej Stachowiak  <mjs@apple.com>
3612
3613         Reviewed by Anders.
3614
3615         - moved ResourceLoader and related files to platform/network
3616         in preparation for building out this API.
3617
3618         I tried to update all the build systems but I'm not sure they are
3619         all fixed properly
3620
3621         * page/ResourceRequest.h: Moved to platform/network.
3622         * platform/ResourceLoader.cpp: Moved to platform/network.
3623         * platform/ResourceLoader.h: Moved to platform/network.
3624         * platform/ResourceLoaderClient.h: Moved to platform/network.
3625         * platform/ResourceLoaderInternal.h: Moved to platform/network.
3626         * platform/cf/ResourceLoaderCFNet.cpp: Moved to platform/network/cf.
3627         * platform/gdk/ResourceLoaderCurl.cpp: Moved to platform/network/gdk.
3628         * platform/gdk/ResourceLoaderManager.cpp: Moved to platform/network/gdk.
3629         * platform/gdk/ResourceLoaderManager.h: Moved to platform/network/gdk.
3630         * platform/mac/ResourceLoaderMac.mm: Moved to platform/network/mac.
3631         * platform/qt/ResourceLoaderManager.cpp: Moved to platform/network/qt.
3632         * platform/qt/ResourceLoaderManager.h: Moved to platform/network/qt.
3633         * platform/qt/ResourceLoaderQt.cpp: Moved to platform/network/qt.
3634         * platform/win/ResourceLoaderWin.cpp: Moved to platform/network/win.
3635         * platform/win/ResourceLoaderWin.h: Moved to platform/network/win.
3636         * webcore-base.bkl: Updated for new paths.
3637         * CMakeLists.txt: ditto
3638         * Projects/gdk/webcore-gdk.bkl: ditto
3639         * WebCore.xcodeproj/project.pbxproj: ditto
3640         * WebCoreSources.bkl: ditto
3641
3642 2006-10-22  Sam Weinig  <sam.weinig@gmail.com>
3643
3644         Reviewed by Tim H.
3645
3646         - Add DOMHTMLFormElementPrivate.h to the project.
3647
3648         * WebCore.xcodeproj/project.pbxproj:
3649         * bindings/objc/DOMPrivate.h:
3650
3651 2006-10-22  Darin Adler  <darin@apple.com>
3652
3653         - another try at fixing Qt
3654
3655         * CMakeLists.txt: Added DeleteButton.cpp and DeleteButtonController.cpp.
3656
3657         - and fix a couple warnings while I'm at it
3658
3659         * platform/image-decoders/ImageDecoder.h: (WebCore::RGBA32Buffer::setRGBA):
3660         Don't do unsigned *= float.
3661
3662         * rendering/break_lines.cpp: (WebCore::nextBreakablePosition): Move unused variable
3663         inside #if so it's consistent.
3664
3665 2006-10-21  Darin Adler  <darin@apple.com>
3666
3667         - fix the Qt build
3668
3669         * platform/qt/EditorClientQt.cpp:
3670         (WebCore::EditorClientQt::shouldShowDeleteInterface):
3671         * platform/qt/EditorClientQt.h:
3672         * platform/qt/FrameQt.cpp:
3673
3674 2006-10-21  Darin Adler  <darin@apple.com>
3675
3676         Reviewed by Adele.
3677
3678         - convert WebLoader and its 3 subclasses to C++ (this time with a leak fixed)
3679
3680         Renamed WebLoader to WebCore::WebResourceLoader (should be ResourceLoader, but
3681         there's currently another class with that name).
3682         Renamed WebMainResourceLoader to WebCore::MainResourceLoader.
3683         Renamed WebSubresourceLoader to WebCore::SubresourceLoader.
3684         Renamed WebNetscapePlugInStreamLoader to WebCore::NetscapePlugInStreamLoader.
3685
3686         Converted the classes to C++ and added Objective-C delegates to forward from
3687         API that still requires Objective-C.
3688
3689         Did not yet rename the source files.
3690
3691         * WebCore.exp: Removed WebLoader, WebNetscapePlugInStreamLoader, and WebSubresourceLoader
3692         classes. Added 5 functions from the WebResourceLoader and NetscapePlugInStreamLoader
3693         classes.
3694
3695         * WebCore.xcodeproj/project.pbxproj: Made RetainPtr.h a private header instead of project.
3696
3697         * platform/cf/RetainPtr.h: Put into the WebCore namespace rather than the WTF namespace.
3698
3699         * loader/mac/WebLoader.h:
3700         * loader/mac/WebLoader.mm:
3701         * loader/mac/WebMainResourceLoader.h:
3702         * loader/mac/WebMainResourceLoader.mm:
3703         * loader/mac/WebNetscapePlugInStreamLoader.h:
3704         * loader/mac/WebNetscapePlugInStreamLoader.mm:
3705         * loader/mac/WebSubresourceLoader.h:
3706         * loader/mac/WebSubresourceLoader.mm:
3707         Translate to C++.
3708
3709         * bridge/mac/WebCoreFrameBridge.mm:
3710         (-[WebCoreFrameBridge startLoadingResource:withMethod:URL:customHeaders:]):
3711         (-[WebCoreFrameBridge startLoadingResource:withMethod:URL:customHeaders:postData:]):
3712         * loader/mac/WebFrameLoader.h:
3713         * loader/mac/WebFrameLoader.mm:
3714         (isCaseInsensitiveEqual):
3715         (isBackForwardLoadType):
3716         (-[WebFrameLoader dealloc]):
3717         (-[WebFrameLoader addPlugInStreamLoader:]):
3718         (-[WebFrameLoader removePlugInStreamLoader:]):
3719         (-[WebFrameLoader setDefersCallbacks:]):
3720         (-[WebFrameLoader stopLoadingPlugIns]):
3721         (-[WebFrameLoader isLoadingMainResource]):
3722         (-[WebFrameLoader isLoadingSubresources]):
3723         (-[WebFrameLoader isLoadingPlugIns]):
3724         (-[WebFrameLoader stopLoadingSubresources]):
3725         (-[WebFrameLoader addSubresourceLoader:]):
3726         (-[WebFrameLoader removeSubresourceLoader:]):
3727         (-[WebFrameLoader mainResourceData]):
3728         (-[WebFrameLoader releaseMainResourceLoader]):
3729         (-[WebFrameLoader cancelMainResourceLoad]):
3730         (-[WebFrameLoader startLoadingMainResourceWithRequest:identifier:]):
3731         (-[WebFrameLoader stopLoadingWithError:]):
3732         (-[WebFrameLoader willUseArchiveForRequest:originalURL:loader:]):
3733         (-[WebFrameLoader archiveLoadPendingForLoader:]):
3734         (-[WebFrameLoader cancelPendingArchiveLoadForLoader:]):
3735         * loader/mac/WebFrameLoaderClient.h:
3736         Call the new C++ API.
3737
3738 2006-10-21  Adam Roben  <aroben@apple.com>
3739
3740         Reviewed by Anders.
3741
3742         Popup tweaks.
3743
3744         * platform/PopupMenu.h:
3745
3746 2006-10-21  Darin Adler  <darin@apple.com>
3747
3748         * editing/DeleteButtonController.cpp: (WebCore::enclosingDeletableTable):
3749         Oops, edited this before landing it and introduced a null-deref! This fixes it.
3750
3751 2006-10-21  Darin Adler  <darin@apple.com>
3752
3753         Reviewed by Anders.
3754
3755         - fix http://bugs.webkit.org/show_bug.cgi?id=11379
3756           assertion failure seen in editing tests (in new DeleteButtonController)
3757
3758         I cleaned up the relationship between the Frame, Editor, EditorClient, and
3759         DeleteButtonController a bit while also making the simple change to fix the
3760         assertion failure.
3761
3762         * bridge/mac/FrameMac.h: Change EditorClient parameter to a PassRefPtr since we take ownership.
3763         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::FrameMac):
3764
3765         * page/Frame.h: Change EditorClient parameter to a PassRefPtr since we take ownership.
3766         * page/Frame.cpp:
3767         (WebCore::Frame::Frame): Ditto.
3768         (WebCore::Frame::appliedEditing): Removed unneeded parameter to the respondToChangedContents
3769         function, and moved it to Editor rather than right on the DeleteButtonController.
3770         (WebCore::Frame::unappliedEditing): Ditto.
3771         (WebCore::Frame::reappliedEditing): Ditto.
3772         * page/FramePrivate.h: (WebCore::FramePrivate::FramePrivate): More of the same.
3773
3774         * editing/DeleteButtonController.h:
3775         * editing/DeleteButtonController.cpp:
3776         (WebCore::DeleteButtonController::DeleteButtonController): Replaced Editor* with a Frame*.
3777         The general pattern is that we always use the Frame* as the frame identifier. See FrameTree,
3778         for example.
3779         (WebCore::enclosingDeletableTable): Added. Helper function used by the respondToChangedSelection
3780         function. Includes an additional check for whether the container is contentEditable, which
3781         was missing from the old version. This prevents the assertion failure. Also added a check that
3782         the table itself is editable.
3783         (WebCore::DeleteButtonController::respondToChangedSelection): Rewrote to use the helper.
3784         (WebCore::DeleteButtonController::respondToChangedContents): Removed the unnecessary
3785         selection parameter. No need to pass in the state of the frame since we can get it if we need it.
3786         (WebCore::DeleteButtonController::show): Updated to use frame pointer rather than editor pointer.
3787
3788         * editing/Editor.cpp: Fixed formatting. Even the temporary placeholder functions should be
3789         formatted on multiple lines as usual.
3790         (WebCore::Editor::respondToChangedSelection): Added. Forwards to the delete button controller.
3791         (WebCore::Editor::respondToChangedContents): Ditto.
3792         (WebCore::Editor::Editor): Changed EditorClient parameter to a PassRefPtr since we take ownership.
3793
3794         * editing/Editor.h: Changed the DeleteButtonController to use an OwnPtr instead of being
3795         defined inline to decouple so that we don't have to include DeleteButtonController.h. That way
3796         changes to DeleteButtonController.h cause very little to recompile.
3797
3798         * editing/SelectionController.cpp: (WebCore::SelectionController::setSelection):
3799         Updated to call the editor instead of the delete button controller for the selection change.
3800
3801 2006-10-21  Anders Carlsson  <acarlsson@apple.com>
3802
3803         Reviewed by Darin.
3804
3805         * loader/mac/LoaderFunctionsMac.mm:
3806         (WebCore::ServeSynchronousRequest):
3807         * platform/mac/ResourceLoaderMac.mm:
3808         (WebCore::ResourceLoader::start):
3809         Don't leak the header dictionary.
3810
3811 2006-10-21  Darin Adler  <darin@apple.com>
3812
3813         Reviewed by Adam.
3814
3815         - http://bugs.webkit.org/show_bug.cgi?id=11376
3816           build scripts should invoke make with "-j" option for multiple processors
3817
3818         * WebCore.xcodeproj/project.pbxproj: Pass -j `sysctl -n hw.ncpu` to make.
3819
3820 2006-10-21  Timothy Hatcher  <timothy@apple.com>
3821
3822         Reviewed by Geoff.
3823
3824         <rdar://problem/4478625> HTML Editing: Basic table editing and culling
3825
3826         Initial implementaltion of table deletion user interface:
3827         * Interface shows up on the nearest table containing the entire selection.
3828         * Shows a Dashboard style close button in the top left corner.
3829         * Shows a 60% opaque black outline around the table.
3830         * Adds a new EditorClient function shouldShowDeleteInterface.
3831
3832         Also adds a new constructor CachedImage and setter functions on
3833         HTMLImageElement and HTMLImageLoader allowing an Image object to be set
3834         and image element in the page. This change also paves the way to allow an
3835         NSImage setter on DOMHTMLImageElement. 
3836
3837         * Resources/deleteButton.tiff: Added.
3838         * Resources/deleteButtonPressed.tiff: Added.
3839         * WebCore.xcodeproj/project.pbxproj:
3840         * bridge/EditorClient.h:
3841         * editing/DeleteButton.cpp: Added.
3842         (WebCore::DeleteButton::DeleteButton):
3843         (WebCore::DeleteButton::defaultEventHandler): notify the controller to delete on click
3844         * editing/DeleteButton.h: Added.
3845         * editing/DeleteButtonController.cpp: Added.
3846         (WebCore::DeleteButtonController::DeleteButtonController):
3847         (WebCore::DeleteButtonController::respondToChangedSelection): move the interface to the new element, or hide
3848         (WebCore::DeleteButtonController::respondToChangedContents): call updateOutlineStyle
3849         (WebCore::DeleteButtonController::updateOutlineStyle): resize the outline if the table changed size
3850         (WebCore::DeleteButtonController::show): shows the interface on a new element
3851         (WebCore::DeleteButtonController::hide): hides the existing interface
3852         (WebCore::DeleteButtonController::deleteTarget): deletes the targeted element
3853         * editing/DeleteButtonController.h: Added.
3854         (WebCore::DeleteButtonController::target): getter for the current target
3855         * editing/Editor.cpp:
3856         (WebCore::Editor::shouldShowDeleteInterface): call the new shouldShowDeleteInterface client function
3857         (WebCore::Editor::Editor): remove the manual ref now that we use RefPtr for m_client
3858         (WebCore::Editor::~Editor): remove the manual deref now that we use RefPtr for m_client
3859         * editing/Editor.h:
3860         (WebCore::Editor::frame): new getter
3861         (WebCore::Editor::deleteButtonController): ditto
3862         * editing/SelectionController.cpp:
3863         (WebCore::SelectionController::setSelection): notify the DeleteButtonController about the new selection
3864         * html/HTMLImageElement.h:
3865         (WebCore::HTMLImageElement::setCachedImage): new setter that replaces the CachedImage
3866         * html/HTMLImageLoader.cpp:
3867         (WebCore::HTMLImageLoader::setImage): ditto
3868         * html/HTMLImageLoader.h:
3869         * loader/CachedImage.cpp:
3870         (WebCore::CachedImage::CachedImage): new constructor that takes an Image
3871         * loader/CachedImage.h: ditto
3872         * page/Frame.cpp:
3873         (WebCore::Frame::selectionController): cleanup coding style
3874         (WebCore::Frame::editor): ditto
3875         (WebCore::Frame::command): ditto
3876         (WebCore::Frame::appliedEditing): tell the delete button outline to update
3877         (WebCore::Frame::unappliedEditing): ditto
3878         (WebCore::Frame::reappliedEditing): ditto
3879         * rendering/RenderTable.cpp:
3880         (WebCore::RenderTable::addChild): workaround until bug 11363 is fixed
3881
3882 2006-10-21  Sam Weinig  <sam.weinig@gmail.com>
3883
3884         Reviewed by Tim H.
3885
3886         Cleanup bindings generation a little through re-factoring 
3887         and general style cleanup.
3888
3889         * bindings/scripts/CodeGenerator.pm:
3890         * bindings/scripts/CodeGeneratorJS.pm:
3891         * bindings/scripts/CodeGeneratorObjC.pm:
3892
3893 2006-10-21  Nikolas Zimmermann  <zimmermann@kde.org>
3894
3895         Reviewed by Mitz.
3896
3897         Fix crashes on Qt/Linux. Offer a default EditorClient and pass it down to Frame ctor.
3898
3899         * CMakeLists.txt:
3900         * platform/qt/EditorClientQt.cpp: Added.
3901         (WebCore::EditorClientQt::shouldDeleteRange):
3902         * platform/qt/EditorClientQt.h: Added.
3903         (WebCore::EditorClientQt::~EditorClientQt):
3904         * platform/qt/FrameQt.cpp:
3905         (WebCore::FrameQt::FrameQt):
3906         * platform/qt/FrameQt.h:
3907
3908 2006-10-21  Sam Weinig  <sam.weinig@gmail.com>
3909
3910         Reviewed by Tim H.
3911
3912         Fix for http://bugs.webkit.org/show_bug.cgi?id=11372
3913         Auto-generate a few more Objective-C DOM methods.
3914
3915         - Auto-generate getMatchedCSSRules and getComputedStyle methods.
3916
3917         * bindings/objc/DOMCSS.h:
3918         * bindings/objc/DOMCSS.mm:
3919         * bindings/objc/DOMExtensions.h:
3920         * bindings/objc/PublicDOMInterfaces.h:
3921         * bindings/scripts/CodeGeneratorObjC.pm:
3922         * dom/Document.idl:
3923         * page/DOMWindow.idl:
3924
3925 2006-10-21  Nikolas Zimmermann  <zimmermann@kde.org>
3926
3927         Reviewed by aliu, landed by aliu.
3928
3929         Fix Qt/Linux build.
3930
3931         * CMakeLists.txt:
3932         * platform/qt/FrameQt.cpp:
3933         (WebCore::FrameQt::FrameQt):
3934         * platform/qt/SoundQt.cpp: Added.
3935         (WebCore::systemBeep):
3936
3937 2006-10-21  Nikolas Zimmermann  <zimmermann@kde.org>
3938
3939         Reviewed by Mitz, landed by ap.
3940
3941         Fix obscure crashes in RenderTableSection on Rob's musicdb file.
3942         The problem was a missing layout() call on the frame view.
3943         Thanks go to Mitz Pettel for the initial hint!
3944
3945         * platform/qt/ScrollViewCanvasQt.cpp:
3946         (WebCore::ScrollViewCanvasQt::paintEvent):
3947
3948 2006-10-20  Steve Falkenburg  <sfalken@apple.com>
3949
3950         Reviewed by Anders.
3951
3952         Send User-Agent on requests.
3953         Send custom request headers properly.
3954
3955         * platform/cf/ResourceLoaderCFNet.cpp:
3956         (WebCore::addHeadersFromHashMap): Switch over to HashMap iteration from string parsing
3957         (WebCore::ResourceLoader::start): Send proper User-Agent, change call to add headers
3958
3959 2006-10-20  Timothy Hatcher  <timothy@apple.com>
3960
3961         Reviewed by Hyatt.
3962
3963         Fix some bad formatting.
3964
3965         * css/cssstyleselector.cpp:
3966         (WebCore::CSSStyleSelector::checkOneSelector):
3967
3968 2006-10-20  Darin Adler  <darin@apple.com>
3969
3970         Reviewed by John.
3971
3972         - fixed <rdar://problem/4795716> REGRESSION: User names and passwords aren't being saved (.Mac, etc.) -- WebKit formState passing empty strings
3973
3974         * loader/mac/WebFormState.mm: (WebCore::FormState::FormState): Fix typo -- need to pass "key"
3975         as the key, not the dictionary itself.
3976
3977 2006-10-20  Alice Liu  <alice.liu@apple.com>
3978
3979         Reviewed by Maciej.
3980
3981         This is the initial foundation for the EditingController class and
3982         everything else it needs to work.  The idea is that the Frame has an
3983         EditingController object that it calls to handle editing commands, the
3984         most simple examples being copy/paste.  This controller will handle
3985         these editing commands in WebCore, and only hand off to WebKit to call
3986         editing delegates (to the let the app intercept editing actions if it
3987         wants to).  Thus we need a platform-specific client to which the
3988         EditingController hands off the delegate calls, 
3989         WebCoreEditingControllerClient.  On the WebCore side this is an 
3990         abstract base class, and on the WebKit(Mac) side this is an ObjC++
3991         subclass, WebEditingControllerClient.  How does the EditingController
3992         get a handle to its platform-specific client?  In WebKit, the creator
3993         of a platform-specific Frame creates the client (which is ref-counted)
3994         and passes it down the chain of constructors until it gets back to the
3995         EditingController, which then refs it in its constructor and derefs in
3996         its destructor.
3997         
3998         No Layout tests needed.
3999         
4000         * WebCore.xcodeproj/project.pbxproj:
4001         Added files and made DomRangeInternal.h and EditingClient.h private headers, necessary for WebKit to compile
4002
4003         * bridge/EditorClient.h: Added.
4004         (WebCore::EditorClient::~EditorClient):
4005
4006         * bridge/mac/FrameMac.h:
4007         Added an EditingClient to the constructor, to pass down to Frame constructor
4008
4009         * bridge/mac/FrameMac.mm:
4010         (WebCore::FrameMac::FrameMac):
4011         Passed client down to Frame constructor
4012         
4013         * bridge/mac/WebCoreFrameBridge.h:
4014         Added an EditingClient to the constructor, to pass down to FrameMac constructor
4015         
4016         * bridge/mac/WebCoreFrameBridge.mm:
4017         (-[WebCoreFrameBridge initMainFrameWithPage:withEditorClient:]):
4018         (-[WebCoreFrameBridge initSubframeWithOwnerElement:withEditorClient:]):
4019         Passed client down to FrameMac constructor
4020         
4021         * editing/Editor.cpp: Added.
4022         Mostly stuf implementations of the following functions, except for a couple.  These are all needed by cut, copy, paste, delete.
4023         (WebCore::generalPasteboard):
4024         (WebCore::Editor::canCopy):
4025         (WebCore::Editor::canCut):
4026         (WebCore::Editor::canDelete):
4027         (WebCore::Editor::canDeleteRange):
4028         (WebCore::Editor::canPaste):
4029         (WebCore::Editor::canSmartCopyOrDelete):
4030         (WebCore::Editor::deleteSelection):
4031         (WebCore::Editor::deleteSelectionWithSmartDelete):
4032         (WebCore::Editor::isSelectionRichlyEditable):
4033         (WebCore::Editor::pasteAsPlainTextWithPasteboard):
4034         (WebCore::Editor::pasteWithPasteboard):
4035         (WebCore::Editor::selectedRange):
4036         (WebCore::Editor::shouldDeleteRange):
4037         (WebCore::Editor::tryDHTMLCopy):
4038         (WebCore::Editor::tryDHTMLCut):
4039         (WebCore::Editor::tryDHTMLPaste):
4040         (WebCore::Editor::writeSelectionToPasteboard):
4041         (WebCore::Editor::Editor):
4042         (WebCore::Editor::~Editor):
4043         (WebCore::Editor::cut):
4044         (WebCore::Editor::copy):
4045         (WebCore::Editor::paste):
4046         (WebCore::Editor::performDelete):
4047         
4048         * editing/Editor.h: Added.
4049         
4050         * page/Frame.h:
4051         Added an EditingClient to the constructor, to pass down to Editor constructor
4052
4053         * page/Frame.cpp:
4054         (WebCore::Frame::Frame):
4055         Passed down to Editor constructor
4056         (WebCore::Frame::editor):
4057         Accessor for Editor stored in FramePrivate
4058         
4059         * page/FramePrivate.h:
4060         (WebCore::FramePrivate::FramePrivate):
4061         Added an Editor object to the FramePrivate data
4062         
4063         * platform/Sound.h: Added.
4064         Made a platform-independent accessor to a beep function
4065         
4066         * platform/mac/SoundMac.mm: Added.
4067         (WebCore::systemBeep):
4068         calls mac system beep
4069         
4070 2006-10-20  David Hyatt  <hyatt@apple.com>
4071
4072         Make sure to support the "encoding" property on form elements for
4073         legacy compatibility.
4074
4075         Reviewed by darin/john
4076
4077         No test cases added.  Not sure how to do a form submission of
4078         various encodings as a layout test.
4079
4080         * html/HTMLFormElement.h:
4081         (WebCore::HTMLFormElement::encoding):
4082         (WebCore::HTMLFormElement::setEncoding):
4083         * html/HTMLFormElement.idl:
4084
4085 2006-10-20  Nikolas Zimmermann  <zimmermann@kde.org>
4086
4087         Reviewed and by Anders.
4088
4089         Fix warnings in JS generation by killing the whole isRefPtr logic,
4090         and just using WTF::getPtr as Sam Weinig suggested. Also kill some
4091         places using get() where getPtr() is cleaner - not for m_impl.get().
4092
4093         * CMakeLists.txt: Tiny cleanup + add deps for CodeGenerator(JS).pm on all IDLs.
4094         * bindings/scripts/CodeGeneratorJS.pm:
4095
4096 2006-10-20  Darin Adler  <darin@apple.com>
4097
4098         - rolled out my loader change; caused world leak and possibly a plug-in crash
4099
4100 2006-10-20  Anders Carlsson  <acarlsson@apple.com>
4101
4102         Reviewed by Tim H
4103
4104         * loader/mac/LoaderFunctionsMac.mm:
4105         Autorelease the header NSDictionary.
4106         
4107 2006-10-20  Anders Carlsson  <acarlsson@apple.com>
4108
4109         Reviewed by Geoff.
4110
4111         * bindings/js/kjs_window.cpp:
4112         (KJS::Window::timerFired):
4113         Check if the timeout id is still in the table before trying to access it. If it isn't in the table
4114         it has been deleted inside of the execute method.
4115
4116 2006-10-20  Anders Carlsson  <acarlsson@apple.com>
4117
4118         Reviewed by Darin and Geoff.
4119
4120         Remove debugging output.
4121         * xml/xmlhttprequest.cpp:
4122         (WebCore::XMLHttpRequest::send):
4123
4124 2006-10-20  David Harrison  <harrison@apple.com>
4125
4126         Reviewed by John.
4127
4128         <rdar://problem/4792755> REGRESSON: Drag selecting is erratic
4129
4130         No test because it would require autoscrolling, which is not available to layout tests.
4131
4132         * rendering/RenderLayer.cpp:
4133         (WebCore::RenderLayer::autoscroll):
4134         Use hitTest() to find the correct node.
4135         
4136         (WebCore::RenderLayer::hitTest):
4137         Trivial source formatting.
4138
4139 2006-10-20  Nikolas Zimmermann  <zimmermann@kde.org>
4140
4141         Reviewed and landed by Anders.
4142
4143         Fix regression introduced during the ResourceLoader transition (Maciej's rewrite).
4144
4145         * platform/qt/ResourceLoaderManager.cpp:
4146         (WebCore::ResourceLoaderManager::add):
4147
4148 2006-10-20  Darin Adler  <darin@apple.com>
4149
4150         Reviewed by Adele.
4151
4152         - convert WebLoader and its 3 subclasses to C++
4153
4154         Renamed WebLoader to WebCore::WebResourceLoader (should be ResourceLoader, but
4155         there's currently another class with that name).
4156         Renamed WebMainResourceLoader to WebCore::MainResourceLoader.
4157         Renamed WebSubresourceLoader to WebCore::SubresourceLoader.
4158         Renamed WebNetscapePlugInStreamLoader to WebCore::NetscapePlugInStreamLoader.
4159
4160         Converted the classes to C++ and added Objective-C delegates to forward from
4161         API that still requires Objective-C.
4162
4163         Did not yet rename the source files.
4164
4165         * WebCore.exp: Removed WebLoader, WebNetscapePlugInStreamLoader, and WebSubresourceLoader
4166         classes. Added 5 functions from the WebResourceLoader and NetscapePlugInStreamLoader
4167         classes.
4168
4169         * WebCore.xcodeproj/project.pbxproj: Made RetainPtr.h a private header instead of project.
4170