0330eb1bbbfa87e0980aa6c16bfe919206994a11
[WebKit-https.git] / WebCore / ChangeLog
1 2006-11-10  Zalan Bujtas <zalan.bujtas@nokia.com>
2
3         Reviewed by Maciej.
4
5         Added basic types for symbian platform.
6         http://bugs.webkit.org/show_bug.cgi?id=11540
7
8         * config.h:
9         * platform/AtomicString.h:
10         (WebCore::AtomicString::AtomicString):
11         (WebCore::AtomicString::operator TPtrC):
12         * platform/DeprecatedString.cpp:
13         (WebCore::initializeHandleNodeBlock):
14         * platform/DeprecatedString.h: char _internalBuffer has to be in front of
15           the bitfields as Codewarrior (3.2.5 build 461) compiler cannot cope with
16           bitfields and breaks byte aligment
17         * platform/FloatPoint.h:
18         * platform/FloatRect.h:
19         * platform/IntPoint.h:
20         * platform/IntRect.h:
21         * platform/IntSize.h:
22         * platform/PlatformString.h:
23         (WebCore::String::operator TPtrC):
24         (WebCore::String::des):
25         * platform/StringImpl.h:
26         * platform/symbian/DeprecatedStringSymbian.cpp: Added.
27         (WebCore::DeprecatedString::setBufferFromDes):
28         (WebCore::DeprecatedString::fromDes):
29         (WebCore::DeprecatedString::des):
30         (WebCore::DeprecatedString::des8):
31         * platform/symbian/FloatPointSymbian.cpp: Added.
32         (WebCore::FloatPoint::FloatPoint):
33         (WebCore::FloatPoint::operator TPoint):
34         * platform/symbian/FloatRectSymbian.cpp: Added.
35         (WebCore::FloatRect::FloatRect):
36         (WebCore::FloatRect::operator TRect):
37         (WebCore::FloatRect::rect):
38         * platform/symbian/IntPointSymbian.cpp: Added.
39         (WebCore::IntPoint::IntPoint):
40         (WebCore::IntPoint::operator TPoint):
41         * platform/symbian/IntRectSymbian.cpp: Added.
42         (WebCore::IntRect::IntRect):
43         (WebCore::IntRect::operator TRect):
44         (WebCore::IntRect::Rect):
45         * platform/symbian/IntSizeSymbian.cpp: Added.
46         (WebCore::IntSize::IntSize):
47         (WebCore::IntSize::operator TSize):
48         * platform/symbian/StringImplSymbian.cpp: Added.
49         (WebCore::StringImpl::StringImpl):
50         (WebCore::StringImpl::des):
51         * platform/symbian/StringSymbian.cpp: Added.
52         (WebCore::String::String):
53
54 2006-11-10  Zack Rusin  <zack@kde.org>
55
56         Reviewed by Anders.
57
58         Adjust to the changes Brady made in the Qt code.
59
60         * loader/qt/FrameLoaderClientQt.cpp:
61         (WebCore::FrameLoaderClientQt::dispatchDidReceiveIcon):
62         * loader/qt/FrameLoaderClientQt.h:
63
64 2006-11-10  Justin Garcia  <justin.garcia@apple.com>
65
66         Reviewed by harrison
67         
68         <rdar://problem/4069359>
69         Deleting hyperlink text, then typing uses link typing style but loses the link itself
70         
71         The removed anchor element needs to stick around temporarily, in the same way
72         that the typing style hangs off the caret until the user moves it.  Also text
73         insertion around anchors didn't match TextEdit.
74
75         * editing/DeleteSelectionCommand.cpp:
76         (WebCore::DeleteSelectionCommand::saveFullySelectedAnchor): Added.
77         (WebCore::DeleteSelectionCommand::doApply): Call saveFullySelectedAnchor.
78         * editing/DeleteSelectionCommand.h:
79         * editing/EditCommand.cpp:
80         (WebCore::EditCommand::apply): Clear the removed anchor after any top level
81         editing command that doesn't preserve the typing style (matches TextEdit).
82         * editing/Editor.cpp:
83         (WebCore::Editor::appliedEditing): Added a fixme: we shouldn't call 
84         setSelection with a message telling it to clear the typing style 
85         (and the saved anchor) here.  Save/restore the saved anchor because of this.
86         * editing/Editor.h:
87         (WebCore::Editor::removedAnchor): Getter.
88         (WebCore::Editor::setRemovedAnchor): Setter.
89         * editing/InsertTextCommand.cpp:
90         (WebCore::InsertTextCommand::prepareForTextInsertion): Insert the saved anchor
91         if one exists.
92         * editing/SelectionController.cpp:
93         (WebCore::SelectionController::setSelection): Clear the removed anchor whenever
94         we make a selection change that clears the typing style.
95         (WebCore::SelectionController::nodeWillBeRemoved): Removed an old outdated FIXME.
96         * editing/htmlediting.cpp:
97         (WebCore::positionAvoidingSpecialElementBoundary): Cleaned up and
98         made some changes to match TextEdit's behavior.  First, insert content
99         inside the anchor when the caret is after it, unless the caret is at the
100         end of the document, or if the caret is before it and at the start of a 
101         paragraph.
102
103 === Safari-521.30 ===
104
105 2006-11-10  Timothy Hatcher  <timothy@apple.com>
106
107         Reviewed by Hyatt.
108
109         Check for BHIDDEN in isVisible() also.
110
111         * rendering/RenderStyle.h:
112         (WebCore::BorderValue::isVisible):
113
114 2006-11-10  Timothy Hatcher  <timothy@apple.com>
115
116         Reviewed by Adam.
117
118         <rdar://problem/4821423> element deletion UI appears for Mail blockquote and others with less than three visible borders
119
120         Added a new function to BorderValue called isVisible(). This checks nonZero() and !isTransparent().
121
122         * editing/DeleteButtonController.cpp:
123         (WebCore::isDeletableElement):
124         * rendering/RenderStyle.h:
125         (WebCore::BorderValue::isVisible):
126
127 2006-11-10  Adam Roben  <aroben@apple.com>
128
129         Rubberstamped by Anders.
130
131         Back out some accidentally-committed changes from r17711.
132
133         * page/Frame.cpp:
134         (WebCore::Frame::command):
135         (WebCore::FramePrivate::FramePrivate):
136         * page/Frame.h:
137         * page/FramePrivate.h:
138
139 2006-11-10  Anders Carlsson  <acarlsson@apple.com>
140
141         Reviewed by Geoff.
142
143         Add more commands, make toggleBold and toggleItalic executable commands.
144
145         * WebCore.exp:
146         * editing/Editor.cpp:
147         (WebCore::execCopy):
148         (WebCore::execCut):
149         (WebCore::execDelete):
150         (WebCore::execForwardDelete):
151         (WebCore::execPaste):
152         (WebCore::execSelectAll):
153         (WebCore::execToggleBold):
154         (WebCore::execToggleItalic):
155         (WebCore::enabled):
156         (WebCore::canPaste):
157         (WebCore::hasEditableSelection):
158         (WebCore::hasEditableRangeSelection):
159         (WebCore::hasRangeSelection):
160         (WebCore::hasRichlyEditableSelection):
161         (WebCore::CommandEntry::):
162         * editing/Editor.h:
163
164 2006-11-10  Anders Carlsson  <acarlsson@apple.com>
165
166         Reviewed by Maciej, Geoff.
167
168         Added an execCommand method to Editor. The idea is that this should replace the CommandByName object. Get rid of
169         the alterCurrentSelection method in the bridge. WebKit can just call execCommand directly.
170
171         * WebCore.exp:
172         * bridge/mac/WebCoreFrameBridge.h:
173         * bridge/mac/WebCoreFrameBridge.mm:
174         * editing/Editor.cpp:
175         (WebCore::execMoveBackward):
176         (WebCore::execMoveBackwardAndModifySelection):
177         (WebCore::execMoveDown):
178         (WebCore::execMoveDownAndModifySelection):
179         (WebCore::execMoveForward):
180         (WebCore::execMoveForwardAndModifySelection):
181         (WebCore::execMoveLeft):
182         (WebCore::execMoveLeftAndModifySelection):
183         (WebCore::execMoveRight):
184         (WebCore::execMoveRightAndModifySelection):
185         (WebCore::execMoveToBeginningOfDocument):
186         (WebCore::execMoveToBeginningOfDocumentAndModifySelection):
187         (WebCore::execMoveToBeginningOfSentence):
188         (WebCore::execMoveToBeginningOfSentenceAndModifySelection):
189         (WebCore::execMoveToBeginningOfLine):
190         (WebCore::execMoveToBeginningOfLineAndModifySelection):
191         (WebCore::execMoveToBeginningOfParagraph):
192         (WebCore::execMoveToBeginningOfParagraphAndModifySelection):
193         (WebCore::execMoveToEndOfDocument):
194         (WebCore::execMoveToEndOfDocumentAndModifySelection):
195         (WebCore::execMoveToEndOfSentence):
196         (WebCore::execMoveToEndOfSentenceAndModifySelection):
197         (WebCore::execMoveToEndOfLine):
198         (WebCore::execMoveToEndOfLineAndModifySelection):
199         (WebCore::execMoveToEndOfParagraph):
200         (WebCore::execMoveToEndOfParagraphAndModifySelection):
201         (WebCore::execMoveParagraphBackwardAndModifySelection):
202         (WebCore::execMoveParagraphForwardAndModifySelection):
203         (WebCore::execMoveUp):
204         (WebCore::execMoveUpAndModifySelection):
205         (WebCore::execMoveWordBackward):
206         (WebCore::execMoveWordBackwardAndModifySelection):
207         (WebCore::execMoveWordForward):
208         (WebCore::execMoveWordForwardAndModifySelection):
209         (WebCore::execMoveWordLeft):
210         (WebCore::execMoveWordLeftAndModifySelection):
211         (WebCore::execMoveWordRight):
212         (WebCore::execMoveWordRightAndModifySelection):
213         (WebCore::enabledAnySelection):
214         (WebCore::createCommandMap):
215         (WebCore::CommandEntry::):
216         (WebCore::Editor::execCommand):
217         * editing/Editor.h:
218
219 2006-11-10  Brady Eidson  <beidson@apple.com>
220
221         Reviewed by Darin
222
223         Took out WebIconDatabaseBridge and made WebKit call IconDatabase directly
224
225         * WebCore.exp:
226         * WebCore.xcodeproj/project.pbxproj:
227         * bridge/mac/WebCoreIconDatabaseBridge.h: Removed.
228         * bridge/mac/WebCoreIconDatabaseBridge.mm: Removed.
229         * loader/FrameLoaderClient.h:
230         * loader/icon/IconDatabase.cpp:
231         (WebCore::IconDatabase::sharedIconDatabase):
232         (WebCore::IconDatabase::~IconDatabase):
233         * loader/icon/IconDatabase.h:
234         (WebCore::IconDatabase::isPrivateBrowsingEnabled):
235         (WebCore::IconDatabase::enabled):
236         * loader/icon/IconLoader.cpp:
237         (WebCore::IconLoader::finishLoading):
238         * loader/mac/FrameLoaderMac.mm:
239
240 2006-11-10  Zack Rusin  <zack@kde.org>
241
242         Reviewed and landed by Anders.
243
244         Adjust platform Qt/KDE code to the recent loader
245         changes. 
246
247         * CMakeLists.txt:
248         * loader/DocumentLoader.h:
249         * loader/FrameLoader.cpp:
250         (WebCore::FrameLoader::createEmptyDocument):
251         * loader/FrameLoader.h:
252         * loader/FrameLoaderClient.h:
253         * loader/qt/DocumentLoaderQt.cpp: Added.
254         (WebCore::canonicalizedTitle):
255         (WebCore::DocumentLoader::DocumentLoader):
256         (WebCore::DocumentLoader::frameLoader):
257         (WebCore::DocumentLoader::~DocumentLoader):
258         (WebCore::DocumentLoader::URL):
259         (WebCore::DocumentLoader::unreachableURL):
260         (WebCore::DocumentLoader::replaceRequestURLForAnchorScroll):
261         (WebCore::DocumentLoader::isStopping):
262         (WebCore::DocumentLoader::clearErrors):
263         (WebCore::DocumentLoader::stopLoading):
264         (WebCore::DocumentLoader::setupForReplace):
265         (WebCore::DocumentLoader::commitIfReady):
266         (WebCore::DocumentLoader::finishedLoading):
267         (WebCore::DocumentLoader::setCommitted):
268         (WebCore::DocumentLoader::isCommitted):
269         (WebCore::DocumentLoader::setLoading):
270         (WebCore::DocumentLoader::isLoading):
271         (WebCore::DocumentLoader::doesProgressiveLoad):
272         (WebCore::DocumentLoader::setupForReplaceByMIMEType):
273         (WebCore::DocumentLoader::updateLoading):
274         (WebCore::DocumentLoader::setFrame):
275         (WebCore::DocumentLoader::attachToFrame):
276         (WebCore::DocumentLoader::detachFromFrame):
277         (WebCore::DocumentLoader::prepareForLoadStart):
278         (WebCore::DocumentLoader::loadingStartedTime):
279         (WebCore::DocumentLoader::setIsClientRedirect):
280         (WebCore::DocumentLoader::isClientRedirect):
281         (WebCore::DocumentLoader::setPrimaryLoadComplete):
282         (WebCore::DocumentLoader::isLoadingInAPISense):
283         (WebCore::DocumentLoader::stopRecordingResponses):
284         (WebCore::DocumentLoader::title):
285         (WebCore::DocumentLoader::triggeringAction):
286         (WebCore::DocumentLoader::setTriggeringAction):
287         (WebCore::DocumentLoader::setOverrideEncoding):
288         (WebCore::DocumentLoader::overrideEncoding):
289         (WebCore::DocumentLoader::setTitle):
290         (WebCore::DocumentLoader::URLForHistory):
291         * loader/qt/FrameLoaderClientQt.cpp: Added.
292         (WebCore::FrameLoaderClientQt::FrameLoaderClientQt):
293         (WebCore::FrameLoaderClientQt::~FrameLoaderClientQt):
294         (WebCore::FrameLoaderClientQt::detachFrameLoader):
295         (WebCore::FrameLoaderClientQt::hasWebView):
296         (WebCore::FrameLoaderClientQt::hasFrameView):
297         (WebCore::FrameLoaderClientQt::hasBackForwardList):
298         (WebCore::FrameLoaderClientQt::resetBackForwardList):
299         (WebCore::FrameLoaderClientQt::provisionalItemIsTarget):
300         (WebCore::FrameLoaderClientQt::loadProvisionalItemFromPageCache):
301         (WebCore::FrameLoaderClientQt::invalidateCurrentItemPageCache):
302         (WebCore::FrameLoaderClientQt::privateBrowsingEnabled):
303         (WebCore::FrameLoaderClientQt::makeDocumentView):
304         (WebCore::FrameLoaderClientQt::makeRepresentation):
305         (WebCore::FrameLoaderClientQt::forceLayout):
306         (WebCore::FrameLoaderClientQt::forceLayoutForNonHTML):
307         (WebCore::FrameLoaderClientQt::updateHistoryForCommit):
308         (WebCore::FrameLoaderClientQt::updateHistoryForBackForwardNavigation):
309         (WebCore::FrameLoaderClientQt::updateHistoryForReload):
310         (WebCore::FrameLoaderClientQt::updateHistoryForStandardLoad):
311         (WebCore::FrameLoaderClientQt::updateHistoryForInternalLoad):
312         (WebCore::FrameLoaderClientQt::updateHistoryAfterClientRedirect):
313         (WebCore::FrameLoaderClientQt::setCopiesOnScroll):
314         (WebCore::FrameLoaderClientQt::tokenForLoadErrorReset):
315         (WebCore::FrameLoaderClientQt::resetAfterLoadError):
316         (WebCore::FrameLoaderClientQt::doNotResetAfterLoadError):
317         (WebCore::FrameLoaderClientQt::willCloseDocument):
318         (WebCore::FrameLoaderClientQt::detachedFromParent1):
319         (WebCore::FrameLoaderClientQt::detachedFromParent2):
320         (WebCore::FrameLoaderClientQt::detachedFromParent3):
321         (WebCore::FrameLoaderClientQt::detachedFromParent4):
322         (WebCore::FrameLoaderClientQt::loadedFromPageCache):
323         (WebCore::FrameLoaderClientQt::dispatchDidHandleOnloadEvents):
324         (WebCore::FrameLoaderClientQt::dispatchDidReceiveServerRedirectForProvisionalLoad):
325         (WebCore::FrameLoaderClientQt::dispatchDidCancelClientRedirect):
326         (WebCore::FrameLoaderClientQt::dispatchWillPerformClientRedirect):
327         (WebCore::FrameLoaderClientQt::dispatchDidChangeLocationWithinPage):
328         (WebCore::FrameLoaderClientQt::dispatchWillClose):
329         (WebCore::FrameLoaderClientQt::dispatchDidStartProvisionalLoad):
330         (WebCore::FrameLoaderClientQt::dispatchDidReceiveTitle):
331         (WebCore::FrameLoaderClientQt::dispatchDidCommitLoad):
332         (WebCore::FrameLoaderClientQt::dispatchDidFinishLoad):
333         (WebCore::FrameLoaderClientQt::dispatchDidFirstLayout):
334         (WebCore::FrameLoaderClientQt::dispatchShow):
335         (WebCore::FrameLoaderClientQt::cancelPolicyCheck):
336         (WebCore::FrameLoaderClientQt::dispatchWillSubmitForm):
337         (WebCore::FrameLoaderClientQt::dispatchDidLoadMainResource):
338         (WebCore::FrameLoaderClientQt::clearLoadingFromPageCache):
339         (WebCore::FrameLoaderClientQt::isLoadingFromPageCache):
340         (WebCore::FrameLoaderClientQt::revertToProvisionalState):
341         (WebCore::FrameLoaderClientQt::clearUnarchivingState):
342         (WebCore::FrameLoaderClientQt::progressStarted):
343         (WebCore::FrameLoaderClientQt::progressCompleted):
344         (WebCore::FrameLoaderClientQt::setMainFrameDocumentReady):
345         (WebCore::FrameLoaderClientQt::willChangeTitle):
346         (WebCore::FrameLoaderClientQt::didChangeTitle):
347         (WebCore::FrameLoaderClientQt::finishedLoading):
348         (WebCore::FrameLoaderClientQt::finalSetupForReplace):
349         (WebCore::FrameLoaderClientQt::setDefersLoading):
350         (WebCore::FrameLoaderClientQt::isArchiveLoadPending):
351         (WebCore::FrameLoaderClientQt::cancelPendingArchiveLoad):
352         (WebCore::FrameLoaderClientQt::clearArchivedResources):
353         (WebCore::FrameLoaderClientQt::canShowMIMEType):
354         (WebCore::FrameLoaderClientQt::representationExistsForURLScheme):
355         (WebCore::FrameLoaderClientQt::generatedMIMETypeForURLScheme):
356         (WebCore::FrameLoaderClientQt::frameLoadCompleted):
357         (WebCore::FrameLoaderClientQt::restoreScrollPositionAndViewState):
358         (WebCore::FrameLoaderClientQt::provisionalLoadStarted):
359         (WebCore::FrameLoaderClientQt::shouldTreatURLAsSameAsCurrent):
360         (WebCore::FrameLoaderClientQt::addHistoryItemForFragmentScroll):
361         (WebCore::FrameLoaderClientQt::didFinishLoad):
362         (WebCore::FrameLoaderClientQt::prepareForDataSourceReplacement):
363         (WebCore::FrameLoaderClientQt::setTitle):
364         (WebCore::FrameLoaderClientQt::userAgent):
365         * loader/qt/FrameLoaderClientQt.h: Added.
366         * loader/qt/FrameLoaderQt.cpp:
367         (WebCore::FrameLoader::submitForm):
368         (WebCore::FrameLoader::overrideMediaType):
369         (WebCore::FrameLoader::getHistoryLength):
370         (WebCore::FrameLoader::referrer):
371         (WebCore::FrameLoader::detachFromParent):
372         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
373         (WebCore::FrameLoader::goBackOrForward):
374         (WebCore::FrameLoader::historyURL):
375         (WebCore::FrameLoader::didFirstLayout):
376         (WebCore::FrameLoader::canGoBackOrForward):
377         (WebCore::FrameLoader::partClearedInBegin):
378         (WebCore::FrameLoader::saveDocumentState):
379         (WebCore::FrameLoader::restoreDocumentState):
380         (WebCore::FrameLoader::didChangeTitle):
381         (WebCore::FrameLoader::redirectDataToPlugin):
382         (WebCore::PolicyCheck::PolicyCheck):
383         (WebCore::PolicyCheck::clear):
384         (WebCore::PolicyCheck::set):
385         (WebCore::PolicyCheck::call):
386         (WebCore::PolicyCheck::clearRequest):
387         * loader/qt/NavigationActionQt.cpp: Added.
388         (WebCore::navigationType):
389         (WebCore::NavigationAction::NavigationAction):
390         * loader/qt/ResourceLoaderQt.cpp: Added.
391         (WebCore::ResourceLoader::ResourceLoader):
392         (WebCore::ResourceLoader::~ResourceLoader):
393         (WebCore::ResourceLoader::setDefersLoading):
394         (WebCore::ResourceLoader::cancel):
395         (WebCore::ResourceLoader::loadsBlocked):
396         * platform/MimeTypeRegistry.cpp:
397         (WebCore::initialiseSupportedImageMIMETypes):
398         * platform/network/qt/ResourceHandleManager.cpp:
399         (WebCore::ResourceHandleManager::slotResult):
400         (WebCore::ResourceHandleManager::cancel):
401         * platform/qt/ChromeClientQt.cpp: Added.
402         (WebCore::rootWindowForFrame):
403         (WebCore::ChromeClientQt::ChromeClientQt):
404         (WebCore::ChromeClientQt::~ChromeClientQt):
405         (WebCore::ChromeClientQt::setWindowRect):
406         (WebCore::ChromeClientQt::windowRect):
407         (WebCore::ChromeClientQt::pageRect):
408         (WebCore::ChromeClientQt::scaleFactor):
409         (WebCore::ChromeClientQt::focus):
410         (WebCore::ChromeClientQt::unfocus):
411         (WebCore::ChromeClientQt::createWindow):
412         (WebCore::ChromeClientQt::createModalDialog):
413         (WebCore::ChromeClientQt::show):
414         (WebCore::ChromeClientQt::canRunModal):
415         (WebCore::ChromeClientQt::runModal):
416         (WebCore::ChromeClientQt::setToolbarsVisible):
417         (WebCore::ChromeClientQt::toolbarsVisible):
418         (WebCore::ChromeClientQt::setStatusbarVisible):
419         (WebCore::ChromeClientQt::statusbarVisible):
420         (WebCore::ChromeClientQt::setScrollbarsVisible):
421         (WebCore::ChromeClientQt::scrollbarsVisible):
422         (WebCore::ChromeClientQt::setMenubarVisible):
423         (WebCore::ChromeClientQt::menubarVisible):
424         (WebCore::ChromeClientQt::setResizable):
425         * platform/qt/ChromeClientQt.h: Added.
426         * platform/qt/EditorClientQt.cpp:
427         (WebCore::EditorClientQt::shouldBeginEditing):
428         (WebCore::EditorClientQt::shouldEndEditing):
429         (WebCore::EditorClientQt::shouldApplyStyle):
430         (WebCore::EditorClientQt::didBeginEditing):
431         (WebCore::EditorClientQt::respondToChangedContents):
432         (WebCore::EditorClientQt::didEndEditing):
433         * platform/qt/EditorClientQt.h:
434         * platform/qt/FrameQt.cpp:
435         (WebCore::FrameQt::FrameQt):
436         (WebCore::FrameQt::~FrameQt):
437         (WebCore::FrameQt::keyEvent):
438         * platform/qt/FrameQt.h:
439         * platform/qt/FrameQtClient.cpp:
440         (WebCore::FrameQtClientDefault::openURL):
441         (WebCore::FrameQtClientDefault::didReceiveData):
442         (WebCore::FrameQtClientDefault::receivedAllData):
443         * platform/qt/ImageQt.cpp:
444         * platform/qt/MimeTypeRegistryQt.cpp: Added.
445         (WebCore::getMIMETypeForUTI):
446         (WebCore::MimeTypeRegistry::getMIMETypeForExtension):
447         * platform/qt/PageQt.cpp:
448         * platform/qt/PlatformKeyboardEventQt.cpp:
449         (WebCore::keyIdentifierForQtKeyCode):
450         * platform/qt/ScreenQt.cpp:
451         * platform/qt/TemporaryLinkStubs.cpp:
452         (WebCore::TextField::TextField):
453         (WebCore::screenDepth):
454         (WebCore::screenDepthPerComponent):
455         (WebCore::screenIsMonochrome):
456         (WebCore::screenRect):
457         (WebCore::screenAvailableRect):
458
459 2006-11-10  Brady Eidson <beidson@apple.com>
460
461         Reviewed by Mitz
462
463         http://bugs.webkit.org/show_bug.cgi?id=11554
464         Fix the above bug (in didFinishLoading) and also another potential bug in didFailWithError
465         in case the icon load fails after some data has been received. 
466
467         * loader/icon/IconLoader.cpp:
468         (WebCore::IconLoader::didFailWithError): Clear the buffer so half-an-image isn't commited to the DB
469         on error.  Also, as a loader re-factoring sanity check, added an assertion
470         (WebCore::IconLoader::didFinishLoading): If an icon loader resulted in an error-response, the icon 
471         is already committed to the DB.  Skip doing that step twice.
472
473 2006-11-09  Oliver Hunt  <oliver@apple.com>
474
475         Reviewed by Brady.
476
477         Pulled MIME type handling out of WebFrameBridge and added
478         a general C++ class to store/query MIME info
479         Added an Obj-C bridge to provide WebKit with access to the
480         MimeTypeRegistry for non-Obj-C++ classes.
481         
482         * WebCore.exp:
483         * WebCore.xcodeproj/project.pbxproj:
484         * bridge/mac/WebCoreFrameBridge.h:
485         * bridge/mac/WebCoreFrameBridge.mm:
486         * bridge/mac/WebMimeTypeRegistryBridge.h: Added.
487         * bridge/mac/WebMimeTypeRegistryBridge.mm: Added.
488         (+[WebMimeTypeRegistryBridge supportsImageWithMIMEType:]):
489         (+[WebMimeTypeRegistryBridge supportsNonImageWithMIMEType:]):
490         (+[WebMimeTypeRegistryBridge supportedNonImageMIMETypes]):
491         (+[WebMimeTypeRegistryBridge supportedImageMIMETypes]):
492         (+[WebMimeTypeRegistryBridge supportedImageResourceMIMETypes]):
493         * platform/Image.cpp:
494         (WebCore::Image::supportsType):
495         * platform/Image.h:
496         * platform/MimeTypeRegistry.cpp: Added.
497         (WebCore::initialiseSupportedImageMIMETypes):
498         (WebCore::initialiseSupportedNonImageMimeTypes):
499         (WebCore::initialiseMimeTypeRegistry):
500         (WebCore::MimeTypeRegistry::isSupportedImageMIMEType):
501         (WebCore::MimeTypeRegistry::isSupportedImageResourceMIMEType):
502         (WebCore::MimeTypeRegistry::isSupportedNonImageMIMEType):
503         (WebCore::MimeTypeRegistry::getSupportedImageMIMETypes):
504         (WebCore::MimeTypeRegistry::getSupportedImageResourceMIMETypes):
505         (WebCore::MimeTypeRegistry::getSupportedNonImageMIMETypes):
506         * platform/MimeTypeRegistry.h: Added.
507         * platform/mac/ImageMac.mm:
508         * platform/mac/MimeTypeRegistryMac.mm: Added.
509         (WebCore::getMIMETypeForUTI):
510         (WebCore::MimeTypeRegistry::getMIMETypeForExtension):
511
512 2006-11-09  Maciej Stachowiak  <mjs@apple.com>
513
514         Reviewed by Oliver.
515
516         - rename String::sprintf and DeprecatedString::sprintf to ...::format to avoid needlessly tweaking a search
517         for insecure functions. Neither of these has risk of buffer overruns since they calculate the buffer size
518         for you and use vsnprintf.
519
520         * bindings/js/kjs_window.cpp:
521         (KJS::Window::isSafeScript):
522         * css/cssparser.cpp:
523         (WebCore::CSSParser::parseColorFromValue):
524         * dom/StyledElement.cpp:
525         (WebCore::StyledElement::addCSSColor):
526         * dom/XMLTokenizer.cpp:
527         (WebCore::XMLTokenizer::handleError):
528         * ksvg2/css/SVGCSSParser.cpp:
529         (WebCore::CSSParser::parseSVGPaint):
530         (WebCore::CSSParser::parseSVGColor):
531         * ksvg2/svg/SVGPathSegArc.h:
532         (WebCore::SVGPathSegArcAbs::toString):
533         (WebCore::SVGPathSegArcRel::toString):
534         * ksvg2/svg/SVGPathSegCurvetoCubic.h:
535         (WebCore::SVGPathSegCurvetoCubicAbs::toString):
536         (WebCore::SVGPathSegCurvetoCubicRel::toString):
537         * ksvg2/svg/SVGPathSegCurvetoCubicSmooth.h:
538         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::toString):
539         (WebCore::SVGPathSegCurvetoCubicSmoothRel::toString):
540         * ksvg2/svg/SVGPathSegCurvetoQuadratic.h:
541         (WebCore::SVGPathSegCurvetoQuadraticAbs::toString):
542         (WebCore::SVGPathSegCurvetoQuadraticRel::toString):
543         * ksvg2/svg/SVGPathSegCurvetoQuadraticSmooth.h:
544         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::toString):
545         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::toString):
546         * ksvg2/svg/SVGPathSegLineto.h:
547         (WebCore::SVGPathSegLinetoAbs::toString):
548         (WebCore::SVGPathSegLinetoRel::toString):
549         * ksvg2/svg/SVGPathSegLinetoHorizontal.h:
550         (WebCore::SVGPathSegLinetoHorizontalAbs::toString):
551         (WebCore::SVGPathSegLinetoHorizontalRel::toString):
552         * ksvg2/svg/SVGPathSegLinetoVertical.h:
553         (WebCore::SVGPathSegLinetoVerticalAbs::toString):
554         (WebCore::SVGPathSegLinetoVerticalRel::toString):
555         * ksvg2/svg/SVGPathSegMoveto.h:
556         (WebCore::SVGPathSegMovetoAbs::toString):
557         (WebCore::SVGPathSegMovetoRel::toString):
558         * ksvg2/svg/SVGPolyElement.cpp:
559         (WebCore::SVGPolyElement::notifyAttributeChange):
560         * ksvg2/svg/SVGUseElement.cpp:
561         (WebCore::SVGUseElement::closeRenderer):
562         * loader/icon/IconDatabase.cpp:
563         (WebCore::IconDatabase::forgetIconForIconURLFromDatabase):
564         * loader/icon/SQLDatabase.cpp:
565         (WebCore::SQLDatabase::setSynchronous):
566         * platform/Color.cpp:
567         (WebCore::Color::name):
568         * platform/DeprecatedString.cpp:
569         (WebCore::DeprecatedString::setNum):
570         (WebCore::DeprecatedString::format):
571         * platform/DeprecatedString.h:
572         * platform/PlatformString.h:
573         * platform/String.cpp:
574         (WebCore::String::format):
575         (WebCore::String::number):
576         * platform/mac/KeyEventMac.mm:
577         (WebCore::keyIdentifierForKeyEvent):
578         * platform/win/KeyEventWin.cpp:
579         (WebCore::keyIdentifierForWindowsKeyCode):
580         * rendering/RenderListMarker.cpp:
581         (WebCore::RenderListMarker::calcMinMaxWidth):
582
583 2006-11-09  Maciej Stachowiak  <mjs@apple.com>
584
585         Reviewed by Anders.
586
587         - fixed "Regression: Can't log into gmail.com"
588         - fixed "iBench doesn't report results - tests run but no number is recorded"
589         
590         * platform/network/cf/FormDataStreamCFNet.cpp:
591         (WebCore::setHTTPBody): Removed extra ! character.
592
593 2006-11-09  Beth Dakin  <bdakin@apple.com>
594
595         Reviewed by Hyatt.
596
597         Fix for <rdar://problem/4805409> REGRESSION: Reproducible crash in 
598         WebCore::RenderBlock::skipWhitespace
599
600         Note that this will still crash on Debug builds because it will hit 
601         an assertion failure in editing. (One of the reasons there is no 
602         layout test along with this fix.) There is definitely some editing 
603         wackiness happening. See http://bugs.webkit.org/show_bug.cgi?
604         id=10144 for updates on the assertion failure bug.
605
606         * rendering/RootInlineBox.cpp:
607         (WebCore::RootInlineBox::childRemoved): It is possible for a 
608         prevRootBox and its prevRootBox to share a lineBreakObj. So instead 
609         of just clearing the lineBreakObj of the prevRootBox, cycle through 
610         all prevRootBoxs with the same lineBreakObj. 
611
612 2006-11-09  Adam Roben  <aroben@apple.com>
613
614         Reviewed by Geoff.
615
616         Fix the change in behavior I caused in r17680 with my build fix.
617
618         * rendering/RenderObject.cpp:
619         (WebCore::RenderObject::maxTopMargin):
620         (WebCore::RenderObject::maxBottomMargin):
621
622 2006-11-09  Anders Carlsson  <acarlsson@apple.com>
623
624         Reviewed by Adam, Oliver.
625
626         Move more functions to Editor.
627
628         * bridge/EditorClient.h:
629         * bridge/mac/FrameMac.h:
630         * bridge/mac/FrameMac.mm:
631         * bridge/mac/WebCoreFrameBridge.h:
632         * editing/EditCommand.cpp:
633         (WebCore::EditCommand::apply):
634         (WebCore::EditCommand::unapply):
635         (WebCore::EditCommand::reapply):
636         * editing/Editor.cpp:
637         (WebCore::Editor::respondToChangedContents):
638         (WebCore::dispatchEditableContentChangedEvents):
639         (WebCore::Editor::appliedEditing):
640         (WebCore::Editor::unappliedEditing):
641         (WebCore::Editor::reappliedEditing):
642         * editing/Editor.h:
643         * editing/TypingCommand.cpp:
644         (WebCore::TypingCommand::typingAddedToOpenCommand):
645         * page/Frame.cpp:
646         * page/Frame.h:
647
648 2006-11-09  Darin Adler  <darin@apple.com>
649
650         * rendering/RenderObject.h: Oops! Fixed accidentally checked-in ifdef.
651
652 2006-11-09  Alice Liu  <alice.liu@apple.com>
653
654         Reviewed by Beth Dakin.
655
656         Fixed <rdar://problem/4808720> Hamachi test tool crashes Safari in WebCore::HTMLTableSectionElement::deleteRow
657         All existing layout tests pass
658
659         * html/HTMLTableElement.cpp:
660         (WebCore::HTMLTableElement::deleteRow):
661         check lastSection before deleting row
662
663 2006-11-09  Darin Adler  <darin@apple.com>
664
665         - improved version of last night's build fix (should not do using namespace in a header)
666
667         * rendering/RenderObject.h:
668         * rendering/RenderObject.cpp:
669         (WebCore::RenderObject::maxTopMargin):
670         (WebCore::RenderObject::maxBottomMargin):
671
672 2006-11-08  Maciej Stachowiak  <mjs@apple.com>
673
674         Reviewed by Geoff.
675         
676         - added ResourceError class and didFailWithError client method
677
678         * WebCore.xcodeproj/project.pbxproj:
679         * loader/icon/IconLoader.cpp:
680         (WebCore::IconLoader::didFailWithError):
681         (WebCore::IconLoader::didFinishLoading):
682         * loader/icon/IconLoader.h:
683         * loader/loader.cpp:
684         (WebCore::Loader::receivedAllData):
685         (WebCore::Loader::didFailWithError):
686         * loader/loader.h:
687         * loader/mac/SubresourceLoaderMac.mm:
688         (WebCore::SubresourceLoader::didFail):
689         (WebCore::SubresourceLoader::didCancel):
690         * platform/cf/RetainPtr.h:
691         (WebCore::):
692         (WebCore::adoptCFReference):
693         (WebCore::RetainPtr::RetainPtr):
694         (WebCore::::adopt):
695         * platform/network/ResourceError.cpp: Added.
696         * platform/network/ResourceError.h: Added.
697         (WebCore::ResourceError::ResourceError):
698         (WebCore::ResourceError::domain):
699         (WebCore::ResourceError::errorCode):
700         (WebCore::ResourceError::failingURL):
701         (WebCore::ResourceError::localizedDescription):
702         (WebCore::ResourceError::unpackPlatformErrorIfNeeded):
703         * platform/network/ResourceHandle.cpp:
704         * platform/network/ResourceHandle.h:
705         * platform/network/ResourceHandleClient.h:
706         (WebCore::ResourceHandleClient::didFailWithError):
707         * platform/network/cf/ResourceHandleCFNet.cpp:
708         (WebCore::didFail):
709         (WebCore::ResourceHandle::cancel):
710         * platform/network/mac/ResourceErrorMac.mm: Added.
711         (-[NSError WebCore]):
712         * platform/network/mac/ResourceHandleMac.mm:
713         (WebCore::ResourceHandle::reportError):
714         * xml/xmlhttprequest.cpp:
715         (WebCore::XMLHttpRequest::didFailWithError):
716         (WebCore::XMLHttpRequest::didFinishLoading):
717         * xml/xmlhttprequest.h:
718
719 2006-11-08  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
720
721         Reviewed by Maciej.
722
723         Linux\Gdk fixes.
724
725         * platform/gdk/ChromeClientGdk.h:
726         (WebCore::ChromeClientGdk::~ChromeClientGdk):
727         * platform/gdk/CursorGdk.cpp:
728         (WebCore::Cursor::Cursor):
729         (WebCore::moveCursor):
730         * platform/gdk/FrameGdk.cpp:
731         (WebCore::FrameGdk::FrameGdk):
732         (WebCore::FrameGdk::submitForm):
733         (WebCore::FrameGdk::urlSelected):
734         * platform/gdk/PageGdk.cpp:
735         * platform/gdk/ScreenClientGdk.h: Added.
736         (WebCore::ScreenClientGdk::~ScreenClientGdk):
737         * platform/gdk/ScreenGdk.cpp:
738         (WebCore::ScreenClientGdk::depth):
739         (WebCore::ScreenClientGdk::depthPerComponent):
740         (WebCore::ScreenClientGdk::isMonochrome):
741         (WebCore::ScreenClientGdk::rect):
742         (WebCore::ScreenClientGdk::usableRect):
743         * platform/gdk/TemporaryLinkStubs.cpp:
744         (FrameGdk::historyURL):
745         (ChromeClientGdk::windowRect):
746         (ChromeClientGdk::setWindowRect):
747         (ChromeClientGdk::pageRect):
748         (ChromeClientGdk::scaleFactor):
749         (ChromeClientGdk::focus):
750         (ChromeClientGdk::unfocus):
751         (ChromeClientGdk::createWindow):
752         (ChromeClientGdk::createModalDialog):
753         (ChromeClientGdk::show):
754         (ChromeClientGdk::canRunModal):
755         (ChromeClientGdk::runModal):
756         (ChromeClientGdk::setToolbarsVisible):
757         (ChromeClientGdk::toolbarsVisible):
758         (ChromeClientGdk::setStatusbarVisible):
759         (ChromeClientGdk::statusbarVisible):
760         (ChromeClientGdk::setScrollbarsVisible):
761         (ChromeClientGdk::scrollbarsVisible):
762         (ChromeClientGdk::setMenubarVisible):
763         (ChromeClientGdk::menubarVisible):
764         (ChromeClientGdk::setResizable):
765         * platform/network/ResourceHandleInternal.h:
766         (WebCore::ResourceHandleInternal::client):
767         * platform/network/gdk/ResourceHandleManager.cpp:
768         (WebCore::writeCallback):
769         (WebCore::ResourceHandleManager::downloadTimerCallback):
770         (WebCore::ResourceHandleManager::remove):
771
772 2006-11-08  Adam Roben  <aroben@apple.com>
773
774         Build fix.
775
776         * rendering/RenderObject.h:
777         (WebCore::RenderObject::maxTopMargin):
778         (WebCore::RenderObject::maxBottomMargin):
779
780 2006-11-08  Geoffrey Garen  <ggaren@apple.com>
781
782         Reviewed by Anders Carlsson.
783
784         Made Screen a good platform citizen by removing its reference to Page. This
785         made a class unnecessary, so all screen fuctions are stand-alone now.
786
787         * bindings/js/kjs_window.cpp: Removed unnecessary subtractions
788         when computing the screen's available dimensions.
789
790 2006-11-08  Sam Weinig  <sam.weinig@gmail.com>
791
792         Reviewed by Mitz.
793
794         Fix for http://bugs.webkit.org/show_bug.cgi?id=11506
795         Cleanup RenderObject
796
797         * rendering/RenderObject.cpp:
798         (WebCore::RenderObject::operator delete):
799         (WebCore::RenderObject::createObject):
800         (WebCore::RenderObjectCounter::~RenderObjectCounter):
801         (WebCore::RenderObject::RenderObject):
802         (WebCore::RenderObject::isDescendantOf):
803         (WebCore::RenderObject::isRoot):
804         (WebCore::RenderObject::addChild):
805         (WebCore::RenderObject::removeChildNode):
806         (WebCore::RenderObject::removeChild):
807         (WebCore::RenderObject::appendChildNode):
808         (WebCore::RenderObject::insertChildNode):
809         (WebCore::RenderObject::nextInPreOrder):
810         (WebCore::RenderObject::nextInPreOrderAfterChildren):
811         (WebCore::RenderObject::previousInPreOrder):
812         (WebCore::RenderObject::isEditable):
813         (WebCore::RenderObject::nextEditable):
814         (WebCore::RenderObject::previousEditable):
815         (WebCore::RenderObject::firstLeafChild):
816         (WebCore::RenderObject::lastLeafChild):
817         (WebCore::RenderObject::addLayers):
818         (WebCore::RenderObject::removeLayers):
819         (WebCore::RenderObject::moveLayers):
820         (WebCore::RenderObject::findNextLayer):
821         (WebCore::RenderObject::enclosingLayer):
822         (WebCore::RenderObject::updateFirstLetter):
823         (WebCore::RenderObject::offsetParent):
824         (WebCore::RenderObject::scroll):
825         (WebCore::RenderObject::hasStaticX):
826         (WebCore::RenderObject::setNeedsLayout):
827         (WebCore::RenderObject::setChildNeedsLayout):
828         (WebCore::RenderObject::markContainingBlocksForLayout):
829         (WebCore::RenderObject::containingBlock):
830         (WebCore::RenderObject::containingBlockWidth):
831         (WebCore::RenderObject::containingBlockHeight):
832         (WebCore::RenderObject::mustRepaintBackgroundOrBorder):
833         (WebCore::RenderObject::drawBorderArc):
834         (WebCore::RenderObject::drawBorder):
835         (WebCore::RenderObject::paintBorderImage):
836         (WebCore::RenderObject::paintBorder):
837         (WebCore::RenderObject::absoluteRects):
838         (WebCore::RenderObject::addPDFURLRect):
839         (WebCore::RenderObject::addFocusRingRects):
840         (WebCore::RenderObject::paintOutline):
841         (WebCore::RenderObject::repaint):
842         (WebCore::RenderObject::repaintRectangle):
843         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
844         (WebCore::RenderObject::repaintObjectsBeforeLayout):
845         (WebCore::RenderObject::getAbsoluteRepaintRectWithOutline):
846         (WebCore::RenderObject::information):
847         (WebCore::RenderObject::dump):
848         (WebCore::selectStartNode):
849         (WebCore::RenderObject::shouldSelect):
850         (WebCore::RenderObject::draggableNode):
851         (WebCore::RenderObject::createAnonymousBlock):
852         (WebCore::RenderObject::handleDynamicFloatPositionChange):
853         (WebCore::RenderObject::setStyle):
854         (WebCore::RenderObject::setStyleInternal):
855         (WebCore::RenderObject::updateBackgroundImages):
856         (WebCore::RenderObject::absolutePosition):
857         (WebCore::RenderObject::caretRect):
858         (WebCore::RenderObject::paddingTop):
859         (WebCore::RenderObject::paddingBottom):
860         (WebCore::RenderObject::paddingLeft):
861         (WebCore::RenderObject::paddingRight):
862         (WebCore::RenderObject::tabWidth):
863         (WebCore::RenderObject::container):
864         (WebCore::RenderObject::removeFromObjectLists):
865         (WebCore::RenderObject::destroy):
866         (WebCore::RenderObject::arenaDelete):
867         (WebCore::RenderObject::hitTest):
868         (WebCore::RenderObject::setInnerNode):
869         (WebCore::RenderObject::nodeAtPoint):
870         (WebCore::RenderObject::verticalPositionHint):
871         (WebCore::RenderObject::getVerticalPosition):
872         (WebCore::RenderObject::lineHeight):
873         (WebCore::RenderObject::invalidateVerticalPositions):
874         (WebCore::RenderObject::recalcMinMaxWidths):
875         (WebCore::RenderObject::scheduleRelayout):
876         (WebCore::RenderObject::setInlineBoxWrapper):
877         (WebCore::RenderObject::firstLineStyle):
878         (WebCore::RenderObject::getPseudoStyle):
879         (WebCore::RenderObject::getTextDecorationColors):
880         (WebCore::RenderObject::addDashboardRegions):
881         (WebCore::RenderObject::collectDashboardRegions):
882         (WebCore::RenderObject::avoidsFloats):
883         (WebCore::RenderObject::findCounter):
884         (WebCore::RenderObject::backslashAsCurrencySymbol):
885         (WebCore::RenderObject::imageChanged):
886         (WebCore::RenderObject::previousOffset):
887         (WebCore::RenderObject::nextOffset):
888         (WebCore::RenderObject::inlineBox):
889         * rendering/RenderObject.h:
890         (WebCore::):
891         (WebCore::RenderObject::renderName):
892         (WebCore::RenderObject::parent):
893         (WebCore::RenderObject::previousSibling):
894         (WebCore::RenderObject::nextSibling):
895         (WebCore::RenderObject::firstChild):
896         (WebCore::RenderObject::lastChild):
897         (WebCore::RenderObject::getOverflowClipRect):
898         (WebCore::RenderObject::getClipRect):
899         (WebCore::RenderObject::getBaselineOfFirstLineBox):
900         (WebCore::RenderObject::setEdited):
901         (WebCore::RenderObject::setStaticX):
902         (WebCore::RenderObject::setStaticY):
903         (WebCore::RenderObject::setPreviousSibling):
904         (WebCore::RenderObject::setNextSibling):
905         (WebCore::RenderObject::setParent):
906         (WebCore::RenderObject::isInlineBlockOrInlineTable):
907         (WebCore::RenderObject::isRenderView):
908         (WebCore::RenderObject::childrenInline):
909         (WebCore::RenderObject::setChildrenInline):
910         (WebCore::RenderObject::isAnonymousBlock):
911         (WebCore::RenderObject::isDragging):
912         (WebCore::RenderObject::needsLayout):
913         (WebCore::RenderObject::setMinMaxKnown):
914         (WebCore::RenderObject::setNeedsLayoutAndMinMaxRecalc):
915         (WebCore::RenderObject::setPositioned):
916         (WebCore::RenderObject::setRelPositioned):
917         (WebCore::RenderObject::setFloating):
918         (WebCore::RenderObject::setInline):
919         (WebCore::RenderObject::setShouldPaintBackgroundOrBorder):
920         (WebCore::RenderObject::setReplaced):
921         (WebCore::RenderObject::PaintInfo::PaintInfo):
922         (WebCore::RenderObject::paintBackgroundExtended):
923         (WebCore::RenderObject::calcWidth):
924         (WebCore::RenderObject::updateFromElement):
925         (WebCore::RenderObject::RepaintInfo::RepaintInfo):
926         (WebCore::RenderObject::setOverrideSize):
927         (WebCore::RenderObject::setPos):
928         (WebCore::RenderObject::setWidth):
929         (WebCore::RenderObject::setHeight):
930         (WebCore::RenderObject::absolutePositionForContent):
931         (WebCore::RenderObject::overflowHeight):
932         (WebCore::RenderObject::overflowWidth):
933         (WebCore::RenderObject::setOverflowHeight):
934         (WebCore::RenderObject::setOverflowWidth):
935         (WebCore::RenderObject::overflowLeft):
936         (WebCore::RenderObject::overflowTop):
937         (WebCore::RenderObject::overflowRect):
938         (WebCore::RenderObject::stopAutoscroll):
939         (WebCore::RenderObject::collapsedMarginTop):
940         (WebCore::RenderObject::collapsedMarginBottom):
941         (WebCore::RenderObject::maxTopMargin):
942         (WebCore::RenderObject::maxBottomMargin):
943         (WebCore::RenderObject::):
944         (WebCore::RenderObject::setTable):
945         (WebCore::RenderObject::isFloatingOrPositioned):
946         (WebCore::RenderObject::containsFloat):
947         (WebCore::RenderObject::setSelectionState):
948         (WebCore::RenderObject::SelectionInfo::SelectionInfo):
949         (WebCore::RenderObject::lowestPosition):
950         (WebCore::RenderObject::rightmostPosition):
951         (WebCore::RenderObject::leftmostPosition):
952         (WebCore::RenderObject::calcVerticalMargins):
953         (WebCore::RenderObject::font):
954
955 2006-11-08  Darin Adler  <darin@apple.com>
956
957         Reviewed by Anders.
958
959         - added event parameters to focus-related functions so we can
960           implement the "option-tab to all links" behavior without relying
961           on a global "current event" -- also makes it work with DOM events
962
963         * page/Frame.h: Removed unneeded includes. Moved some functions
964         that were misplaced into the appropriate sections.
965         * page/Frame.cpp:
966         (WebCore::Frame::doTextFieldCommandFromEvent): Changed parameter from
967         PlatformKeyboardEvent to the DOM keyboard event class.
968         (WebCore::Frame::tabsToLinks): Added event parameter.
969         (WebCore::Frame::tabsToAllControls): Ditto.
970         (WebCore::scanForForm): Fixed code that incorrectly assumes
971         that an iframe is an HTMLFrameElement (no longer true since Geoff
972         changed the class hierarchy a bit).
973         (WebCore::Frame::hitTestResultAtPoint): Ditto.
974
975         * bridge/mac/FrameMac.h: Removed unneeded includes. Moved some functions
976         that were misplaced into the appropriate sections.
977         * bridge/mac/FrameMac.mm:
978         (WebCore::selectorForKeyEvent): Changed to use a DOM event instead of
979         a PlatformKeyboardEvent.
980         (WebCore::FrameMac::nextKeyViewInFrame): Changed to use currentKeyboardEvent()
981         and pass event into next/previousFocusNode.
982         (WebCore::FrameMac::currentKeyboardEvent): Added. Creates a DOM event from
983         the AppKit current event, if it's a keyboard event. Really just a hack that's
984         needed to preserve some code we can remove once we deal with the last NSView-
985         based form control.
986         (WebCore::isKeyboardOptionTab): Added.
987         (WebCore::FrameMac::tabsToLinks): Added event parameter, used to check if the
988         option (alt) key is down.
989         (WebCore::FrameMac::tabsToAllControls): Ditto.
990         (WebCore::FrameMac::keyEvent): Changed call to prepareForUserAction() to just
991         call resetMultipleFormSubmissionProtection() explicitly instead.
992         (WebCore::FrameMac::mouseDown): Ditto.
993
994         * bridge/mac/WebCoreAXObject.mm:
995         (-[WebCoreAXObject accessibilityDescription]): Fixed code that incorrectly
996         assumes that an iframe is an HTMLFrameElement (no longer true since Geoff
997         changed the class hierarchy a bit).
998         (-[WebCoreAXObject accessibilityPerformAction:]): Changed call to
999         prepareForUserAction() to call resetMultipleFormSubmissionProtection()
1000         explicitly instead.
1001
1002         * page/FrameView.h:
1003         * page/FrameView.cpp:
1004         (WebCore::FrameView::advanceFocus): Changed function to take an
1005         event parameter, and decide the direction based on the shift key
1006         modifier instead of a passed-in boolean.
1007
1008         * dom/Document.h:
1009         * dom/Document.cpp:
1010         (WebCore::Document::nextFocusNode): Added event parameter.
1011         (WebCore::Document::previousFocusNode): Ditto.
1012         * dom/Node.h:
1013         * dom/Node.cpp:
1014         (WebCore::Node::isKeyboardFocusable): Ditto.
1015         * html/HTMLAnchorElement.h:
1016         * html/HTMLAnchorElement.cpp:
1017         (WebCore::HTMLAnchorElement::isKeyboardFocusable): Ditto.
1018         * html/HTMLGenericFormElement.h:
1019         * html/HTMLGenericFormElement.cpp:
1020         (WebCore::HTMLGenericFormElement::isKeyboardFocusable): Ditto.
1021         * html/HTMLInputElement.h:
1022         * html/HTMLInputElement.cpp:
1023         (WebCore::HTMLInputElement::isKeyboardFocusable): Ditto.
1024         (WebCore::HTMLInputElement::defaultEventHandler): Ditto.
1025         * html/HTMLSelectElement.h:
1026         * html/HTMLSelectElement.cpp:
1027         (WebCore::HTMLSelectElement::isKeyboardFocusable): Ditto.
1028         * html/HTMLTextAreaElement.h:
1029         * html/HTMLTextAreaElement.cpp:
1030         (WebCore::HTMLTextAreaElement::isKeyboardFocusable): Ditto.
1031
1032         * dom/EventTargetNode.cpp:
1033         (WebCore::EventTargetNode::defaultEventHandler): Pass event to the
1034         advanceFocus function.
1035
1036         * platform/TextField.h:
1037         * platform/mac/TextFieldMac.mm: Removed the non-search field code.
1038
1039         * platform/mac/WebCoreTextField.h:
1040         * platform/mac/WebCoreTextField.mm: Removed the non-search field code.
1041         (-[WebCoreTextFieldController controlTextDidChange:]): Removed the
1042         call to FrameMac::handleKeyboardOptionTabInView, which is no longer
1043         needed since the default handler in HTMLInputElement takes care of
1044         option-tab.
1045
1046         * platform/mac/SliderMac.mm:
1047         (-[WebCoreSlider canBecomeKeyView]): Changed to use currentKeyboardEvent()
1048         and pass event into tabsToAllControls.
1049         (Slider::focusPolicy): Ditto.
1050
1051         * rendering/RenderLineEdit.cpp:
1052         (WebCore::RenderLineEdit::RenderLineEdit): Removed the non-search field code.
1053         (WebCore::RenderLineEdit::updateFromElement): Ditto.
1054
1055 2006-11-08  Brady Eidson  <beidson@apple.com>
1056
1057         Reviewed by Dave Harrison, Oliver, and Darin 
1058         (oh my!  where was superkevin on this one?)
1059
1060         <rdar://problem/4816196> "Xcode Help" crashes in WebCore::DocumentLoader::setPrimaryLoadComplete(bool)
1061
1062         More "free nil checking" we lost in the transition from ObjC to C++
1063
1064         * loader/mac/FrameLoaderMac.mm:
1065         (WebCore::FrameLoader::startLoading): Null check m_provisionalDocumentLoader and bail early.
1066         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Ditto
1067
1068 2006-11-08  Anders Carlsson  <acarlsson@apple.com>
1069
1070         Reviewed by Adam.
1071
1072         Move more code into editor.
1073         
1074         * WebCore.exp:
1075         * bridge/EditorClient.h:
1076         * bridge/mac/FrameMac.h:
1077         * bridge/mac/FrameMac.mm:
1078         * bridge/mac/WebCoreFrameBridge.h:
1079         * dom/Document.cpp:
1080         (WebCore::Document::relinquishesEditingFocus):
1081         (WebCore::Document::acceptsEditingFocus):
1082         (WebCore::Document::didBeginEditing):
1083         (WebCore::Document::didEndEditing):
1084         * editing/Editor.cpp:
1085         (WebCore::Editor::indent):
1086         (WebCore::Editor::outdent):
1087         * editing/Editor.h:
1088         * page/Frame.cpp:
1089         * page/Frame.h:
1090
1091 2006-11-08  Beth Dakin  <bdakin@apple.com>
1092
1093         Reviewed by Adam.
1094
1095         Add ability to HitTestResult to ask if the inner non-shared node is 
1096         content editable.
1097
1098         * WebCore.exp: Export HitTestResult::isContentEditable()
1099         * rendering/HitTestResult.cpp:
1100         (WebCore::HitTestResult::isContentEditable):
1101         * rendering/HitTestResult.h:
1102
1103 2006-11-08  Anders Carlsson  <acarlsson@apple.com>
1104
1105         Build fix.
1106         
1107         * WebCore.xcodeproj/project.pbxproj:
1108         Add DOMCSSStyleDeclarationInternal.h to the "Copy Generated Headers" build phase.
1109
1110 2006-11-08  Timothy Hatcher  <timothy@apple.com>
1111
1112         Reviewed by Darin.
1113
1114         <rdar://problem/4713280> Would like to get an array of bounding rects rather than just the union of them for a DOMRange
1115         <rdar://problem/4804317> Would like SPI to get bounding box for a DOM range without having to change the selection
1116
1117         Added lineBoxRects and boundingBox to Range and DOMRange. These methods correspond to the DOMNode methods.
1118
1119         * bindings/objc/DOM.mm:
1120         (WebCore::kit):
1121         (-[DOMNode lineBoxRects]):
1122         (-[DOMRange boundingBox]):
1123         (-[DOMRange lineBoxRects]):
1124         * bindings/objc/DOMPrivate.h:
1125         * dom/Range.cpp:
1126         (WebCore::Range::boundingBox):
1127         (WebCore::Range::addLineBoxRects):
1128         * dom/Range.h:
1129         * rendering/RenderContainer.cpp:
1130         (WebCore::RenderContainer::addLineBoxRects):
1131         * rendering/RenderContainer.h:
1132         * rendering/RenderObject.cpp:
1133         (WebCore::RenderObject::addLineBoxRects):
1134         * rendering/RenderObject.h:
1135         * rendering/RenderText.cpp:
1136         (WebCore::RenderText::addLineBoxRects):
1137         * rendering/RenderText.h:
1138
1139 2006-11-08  Anders Carlsson  <acarlsson@apple.com>
1140
1141         Reviewed by Oliver.
1142         
1143         Move methods from the bridge and frame into editor.
1144         
1145         * WebCore.exp:
1146         * bridge/EditorClient.h:
1147         * bridge/mac/WebCoreFrameBridge.h:
1148         * bridge/mac/WebCoreFrameBridge.mm:
1149         * editing/Editor.cpp:
1150         (WebCore::Editor::removeFormattingAndStyle):
1151         (WebCore::Editor::applyStyle):
1152         (WebCore::Editor::applyParagraphStyle):
1153         (WebCore::Editor::applyStyleToSelection):
1154         (WebCore::Editor::applyParagraphStyleToSelection):
1155         (WebCore::Editor::toggleBold):
1156         (WebCore::Editor::toggleItalic):
1157         (WebCore::Editor::selectionStartHasStyle):
1158         * editing/Editor.h:
1159         * editing/JSEditor.cpp:
1160         * page/Frame.cpp:
1161         * page/Frame.h:
1162
1163 2006-11-08  Geoffrey Garen  <ggaren@apple.com>
1164
1165         Reviewed by Beth.
1166         
1167         Fixed regression in fast/events/objc-event-api. DumpRenderTree expects to
1168         be able to dispatch user events even when off-screen, so we have to support
1169         off-screen windows when handling mouse events.
1170
1171         * platform/Screen.h:
1172         * platform/mac/PlatformMouseEventMac.mm:
1173         (WebCore::globalPoint): Grab the best screen instead of the screen you're
1174         on, since you might be off-screen.
1175         * platform/mac/ScreenMac.mm:
1176         (WebCore::screenForWindow):
1177
1178 2006-11-08  Darin Adler  <darin@apple.com>
1179
1180         - fix bug caused by last-minute change to my check-in last night
1181           that is causing layout tests to hang
1182
1183         * dom/Document.cpp: (WebCore::Document::completeURL): Added comments.
1184         * loader/FrameLoader.cpp: (WebCore::FrameLoader::submitForm): Turn
1185         a null string into an empty string before calling completeURL.
1186
1187 2006-11-08  Brady Eidson <beidson@apple.com>
1188
1189         Reviewed by Maciej
1190
1191         If the request has already been aborted, bail out of didFinishLoading()
1192         immediately.  This prevents state change notifications that aren't
1193         needed.
1194
1195         * xml/xmlhttprequest.cpp:
1196         (WebCore::XMLHttpRequest::didFinishLoading):
1197
1198 2006-11-08  Darin Adler  <darin@apple.com>
1199
1200         - another attempt to fix Qt build
1201
1202         * loader/qt/FrameLoaderQt.cpp: Added missing include of FrameLoader.h.
1203
1204 2006-11-08  Darin Adler  <darin@apple.com>
1205
1206         Reviewed by Geoff.
1207
1208         - stray bits of my FrameLoader patch that I left out by accident
1209
1210         * loader/FrameLoader.cpp:
1211         (WebCore::FrameLoader::createWindow): Use m_outgoingReferrer instead of outgoingReferrer()
1212         inside the FrameLoader class.
1213         (WebCore::FrameLoader::requestFrame): Use less DeprecatedString.
1214         (WebCore::FrameLoader::clear): Stop the redirection timer.
1215         (WebCore::FrameLoader::receivedFirstData): Added an early return instead of nesting the
1216         entire function in an if statement. Use less DeprecatedString.
1217         (WebCore::FrameLoader::scheduleLocationChange): Fix backwards ? : operator.
1218         (WebCore::FrameLoader::scheduleRefresh): Ditto.
1219         (WebCore::FrameLoader::urlSelected): Use m_outgoingReferrer instead of outgoingReferrer()
1220         inside the FrameLoader class.
1221         * loader/mac/FrameLoaderMac.mm:
1222         (WebCore::FrameLoader::load): Ditto.
1223         (WebCore::FrameLoader::loadResourceSynchronously): Ditto.
1224
1225 2006-11-07  Beth Dakin  <bdakin@apple.com>
1226
1227         Reviewed by Hyatt.
1228
1229         Another go at fix for <rdar://problem/4820814> A crash occurs at 
1230         WebCore::HitTestResult::spellingToolTip() when mousing down on 
1231         iframe at www.macsurfer.com
1232
1233         The fix from yesterday caused a layout test regression which 
1234         exposed an existing bug. The existing bug was that we allowed text 
1235         nodes to stay in the head tag, but other browsers move them to the 
1236         body. The previous fix also caused a performance regression, which 
1237         was seemingly easy to fix by moving the new clause in 
1238         HTMLParser::handleError() to be below the HTMLElement case.
1239
1240         * html/HTMLDocument.cpp:
1241         (WebCore::HTMLDocument::childAllowed): Don't allow comment nodes to 
1242         be the child of the document.
1243         * html/HTMLHeadElement.cpp:
1244         (WebCore::HTMLHeadElement::childAllowed): Do not allow non-
1245         whitespace text nodes to be children of the head.
1246         * html/HTMLHeadElement.h:
1247         * html/HTMLParser.cpp:
1248         (WebCore::HTMLParser::handleError): Error case for comment nodes.
1249         * page/FrameView.cpp:
1250         (WebCore::FrameView::handleMousePressEvent): Safety-net null check 
1251         for the original crash. 
1252
1253 2006-11-07  Darin Adler  <darin@apple.com>
1254
1255         - another attempt to fix Qt build
1256
1257         * loader/icon/IconLoader.h: Added missing include.
1258
1259 2006-11-06  Geoffrey Garen  <ggaren@apple.com>
1260
1261         Reviewed by Tim Hatcher.
1262         
1263         Removed ScreenClient. It was highly unpopular, risking my midterm re-election.
1264         
1265         None of Screen's responsibilities require up-calls to WebKit or delegates, 
1266         so WebCore can handle it all.
1267         
1268         Moved Screen back from page/ to platform/ because it's a platform
1269         abstraction again.
1270
1271         Merged scaling and flipping functions into 'toUserSpace' and 'toDeviceSpace',
1272         since the two were always used together.
1273         
1274         Changed pixel depth queries to query the deepest screen. Darin mentioned
1275         that it might have been a feature, not a bug, to use the main/menubar screen
1276         regardless of the screen you were on. For scaling and flipping that's not
1277         the case, but for querying pixel depth I think it is. You want to know
1278         about the highest pixel depth your content may display on.
1279         
1280         Tests still pass.
1281
1282         * WebCore.exp:
1283         * WebCore.xcodeproj/project.pbxproj:
1284         * page/Page.cpp:
1285         (WebCore::Page::Page):
1286         * page/Page.h:
1287         * page/Screen.cpp: Removed.
1288         * page/Screen.h: Removed.
1289         * page/ScreenClient.h: Removed.
1290         * platform/mac/PlatformMouseEventMac.mm:
1291         (WebCore::globalPoint):
1292         * platform/mac/ScreenMac.mm:
1293         (WebCore::window):
1294         (WebCore::bestScreen):
1295         (WebCore::Screen::depth):
1296         (WebCore::Screen::depthPerComponent):
1297         (WebCore::Screen::isMonochrome):
1298         (WebCore::Screen::rect):
1299         (WebCore::Screen::usableRect):
1300         (WebCore::toUserSpace):
1301         (WebCore::toDeviceSpace):
1302
1303 2006-11-07  Darin Adler  <darin@apple.com>
1304
1305         - try to fix Qt build
1306
1307         * CMakeLists.txt: Updated for some file changes.
1308         * WebCoreSources.bkl: Ditto.
1309
1310 2006-11-07  Darin Adler  <darin@apple.com>
1311
1312         Reviewed by Geoff.
1313
1314         - moved loader code from Frame/FrameMac to FrameLoader
1315
1316         * WebCore.exp:
1317         * WebCore.xcodeproj/project.pbxproj:
1318         * bindings/js/JSXSLTProcessor.h:
1319         * bindings/js/kjs_events.cpp:
1320         (KJS::JSLazyEventListener::parseCode):
1321         * bindings/js/kjs_html.cpp:
1322         (KJS::JSHTMLDocument::putValueProperty):
1323         * bindings/js/kjs_navigator.cpp:
1324         (KJS::Navigator::getValueProperty):
1325         * bindings/js/kjs_proxy.cpp:
1326         (WebCore::KJSProxy::initScriptIfNeeded):
1327         * bindings/js/kjs_window.cpp:
1328         (KJS::Screen::Screen):
1329         (KJS::createNewWindow):
1330         (KJS::Window::getValueProperty):
1331         (KJS::Window::put):
1332         (KJS::Window::isSafeScript):
1333         (KJS::WindowFunc::callAsFunction):
1334         (KJS::ScheduledAction::execute):
1335         (KJS::Location::getValueProperty):
1336         (KJS::Location::put):
1337         (KJS::Location::toString):
1338         (KJS::LocationFunc::callAsFunction):
1339         (KJS::History::getValueProperty):
1340         (KJS::HistoryFunc::callAsFunction):
1341         * bindings/objc/DOM.mm:
1342         (+[DOMNode _nodeWith:WebCore::]):
1343         * bridge/mac/FrameMac.h:
1344         * bridge/mac/FrameMac.mm:
1345         (WebCore::FrameMac::~FrameMac):
1346         (WebCore::FrameMac::setView):
1347         (WebCore::FrameMac::setStatusBarText):
1348         * bridge/mac/WebCoreFrameBridge.h:
1349         * bridge/mac/WebCoreFrameBridge.mm:
1350         (-[WebCoreFrameBridge close]):
1351         (-[WebCoreFrameBridge addData:]):
1352         (-[WebCoreFrameBridge createFrameViewWithNSView:marginWidth:marginHeight:]):
1353         (-[WebCoreFrameBridge reapplyStylesForDeviceType:]):
1354         (-[WebCoreFrameBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
1355         (-[WebCoreFrameBridge aeDescByEvaluatingJavaScriptFromString:]):
1356         (-[WebCoreFrameBridge baseURL]):
1357         (-[WebCoreFrameBridge dragOperationForDraggingInfo:]):
1358         (-[WebCoreFrameBridge dragExitedWithDraggingInfo:]):
1359         (-[WebCoreFrameBridge canProvideDocumentSource]):
1360         (-[WebCoreFrameBridge receivedData:textEncodingName:]):
1361         * css/cssparser.cpp:
1362         (WebCore::CSSParser::parseContent):
1363         * dom/DOMImplementation.cpp:
1364         (WebCore::DOMImplementation::createDocument):
1365         (WebCore::DOMImplementation::createHTMLDocument):
1366         * dom/DOMImplementation.h:
1367         * dom/Document.cpp:
1368         (WebCore::Document::readyState):
1369         (WebCore::Document::updateTitle):
1370         (WebCore::Document::open):
1371         (WebCore::Document::close):
1372         (WebCore::Document::implicitClose):
1373         (WebCore::Document::processHttpEquiv):
1374         (WebCore::Document::referrer):
1375         (WebCore::Document::finishedParsing):
1376         * dom/ProcessingInstruction.cpp:
1377         (WebCore::ProcessingInstruction::checkStyleSheet):
1378         * dom/XMLTokenizer.cpp:
1379         (WebCore::XMLTokenizer::endElementNs):
1380         (WebCore::ignorableWhitespaceHandler):
1381         (WebCore::XMLTokenizer::notifyFinished):
1382         * editing/TextIterator.cpp:
1383         (WebCore::TextIterator::rangeFromLocationAndLength):
1384         * html/HTMLAnchorElement.cpp:
1385         (WebCore::HTMLAnchorElement::defaultEventHandler):
1386         * html/HTMLBaseElement.cpp:
1387         (WebCore::HTMLBaseElement::process):
1388         * html/HTMLDocument.cpp:
1389         (WebCore::HTMLDocument::lastModified):
1390         * html/HTMLFormElement.cpp:
1391         (WebCore::HTMLFormElement::formData):
1392         (WebCore::HTMLFormElement::submit):
1393         * html/HTMLFrameElementBase.cpp:
1394         (WebCore::HTMLFrameElementBase::isURLAllowed):
1395         (WebCore::HTMLFrameElementBase::openURL):
1396         (WebCore::HTMLFrameElementBase::willRemove):
1397         * html/HTMLInputElement.cpp:
1398         (WebCore::HTMLInputElement::setValueFromRenderer):
1399         * html/HTMLLinkElement.cpp:
1400         (WebCore::HTMLLinkElement::process):
1401         * html/HTMLParser.cpp:
1402         (WebCore::HTMLParser::handleError):
1403         (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
1404         * html/HTMLPreElement.idl:
1405         * html/HTMLScriptElement.cpp:
1406         (WebCore::HTMLScriptElement::parseMappedAttribute):
1407         (WebCore::HTMLScriptElement::insertedIntoDocument):
1408         * html/HTMLTokenizer.cpp:
1409         (WebCore::HTMLTokenizer::scriptExecution):
1410         (WebCore::HTMLTokenizer::parseTag):
1411         (WebCore::HTMLTokenizer::write):
1412         (WebCore::HTMLTokenizer::stopParsing):
1413         (WebCore::HTMLTokenizer::timerFired):
1414         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
1415         (WebCore::KCanvasFilterQuartz::prepareFilter):
1416         * ksvg2/svg/SVGAElement.cpp:
1417         (WebCore::SVGAElement::defaultEventHandler):
1418         * ksvg2/svg/SVGElement.cpp:
1419         (WebCore::SVGElement::sendSVGLoadEventIfPossible):
1420         * loader/DocLoader.cpp:
1421         (WebCore::DocLoader::setLoadInProgress):
1422         * loader/FrameLoader.cpp:
1423         (WebCore::FormSubmission::FormSubmission):
1424         (WebCore::ScheduledRedirection::):
1425         (WebCore::ScheduledRedirection::ScheduledRedirection):
1426         (WebCore::cancelAll):
1427         (WebCore::getString):
1428         (WebCore::isBackForwardLoadType):
1429         (WebCore::numRequests):
1430         (WebCore::FrameLoader::FrameLoader):
1431         (WebCore::FrameLoader::~FrameLoader):
1432         (WebCore::FrameLoader::createWindow):
1433         (WebCore::FrameLoader::changeLocation):
1434         (WebCore::FrameLoader::urlSelected):
1435         (WebCore::FrameLoader::requestFrame):
1436         (WebCore::FrameLoader::loadSubframe):
1437         (WebCore::FrameLoader::submitFormAgain):
1438         (WebCore::FrameLoader::submitForm):
1439         (WebCore::FrameLoader::stopLoading):
1440         (WebCore::FrameLoader::stop):
1441         (WebCore::FrameLoader::closeURL):
1442         (WebCore::FrameLoader::cancelRedirection):
1443         (WebCore::FrameLoader::iconURL):
1444         (WebCore::FrameLoader::didOpenURL):
1445         (WebCore::FrameLoader::didExplicitOpen):
1446         (WebCore::FrameLoader::replaceContentsWithScriptResult):
1447         (WebCore::FrameLoader::executeScript):
1448         (WebCore::FrameLoader::cancelAndClear):
1449         (WebCore::FrameLoader::clear):
1450         (WebCore::FrameLoader::receivedFirstData):
1451         (WebCore::FrameLoader::responseMIMEType):
1452         (WebCore::FrameLoader::setResponseMIMEType):
1453         (WebCore::FrameLoader::begin):
1454         (WebCore::FrameLoader::write):
1455         (WebCore::FrameLoader::end):
1456         (WebCore::FrameLoader::endIfNotLoading):
1457         (WebCore::FrameLoader::startIconLoader):
1458         (WebCore::FrameLoader::commitIconURLToIconDatabase):
1459         (WebCore::FrameLoader::gotoAnchor):
1460         (WebCore::FrameLoader::finishedParsing):
1461         (WebCore::FrameLoader::loadDone):
1462         (WebCore::FrameLoader::checkCompleted):
1463         (WebCore::FrameLoader::checkEmitLoadEvent):
1464         (WebCore::FrameLoader::baseURL):
1465         (WebCore::FrameLoader::baseTarget):
1466         (WebCore::FrameLoader::completeURL):
1467         (WebCore::FrameLoader::scheduleRedirection):
1468         (WebCore::FrameLoader::scheduleLocationChange):
1469         (WebCore::FrameLoader::scheduleRefresh):
1470         (WebCore::FrameLoader::isScheduledLocationChangePending):
1471         (WebCore::FrameLoader::scheduleHistoryNavigation):
1472         (WebCore::FrameLoader::redirectionTimerFired):
1473         (WebCore::FrameLoader::encoding):
1474         (WebCore::FrameLoader::requestObject):
1475         (WebCore::FrameLoader::shouldUsePlugin):
1476         (WebCore::FrameLoader::loadPlugin):
1477         (WebCore::FrameLoader::clearRecordedFormValues):
1478         (WebCore::FrameLoader::recordFormValue):
1479         (WebCore::FrameLoader::parentCompleted):
1480         (WebCore::FrameLoader::outgoingReferrer):
1481         (WebCore::FrameLoader::lastModified):
1482         (WebCore::FrameLoader::opener):
1483         (WebCore::FrameLoader::setOpener):
1484         (WebCore::FrameLoader::openedByJavaScript):
1485         (WebCore::FrameLoader::setOpenedByJavaScript):
1486         (WebCore::FrameLoader::handleFallbackContent):
1487         (WebCore::FrameLoader::provisionalLoadStarted):
1488         (WebCore::FrameLoader::userGestureHint):
1489         (WebCore::FrameLoader::didNotOpenURL):
1490         (WebCore::FrameLoader::resetMultipleFormSubmissionProtection):
1491         (WebCore::FrameLoader::setEncoding):
1492         (WebCore::FrameLoader::addData):
1493         (WebCore::FrameLoader::canCachePage):
1494         (WebCore::FrameLoader::updatePolicyBaseURL):
1495         (WebCore::FrameLoader::setPolicyBaseURL):
1496         (WebCore::FrameLoader::scrollToAnchor):
1497         (WebCore::FrameLoader::isComplete):
1498         (WebCore::FrameLoader::isLoadingMainResource):
1499         (WebCore::FrameLoader::url):
1500         (WebCore::FrameLoader::startRedirectionTimer):
1501         (WebCore::FrameLoader::stopRedirectionTimer):
1502         (WebCore::FrameLoader::updateBaseURLForEmptyDocument):
1503         (WebCore::FrameLoader::completed):
1504         (WebCore::FrameLoader::started):
1505         (WebCore::FrameLoader::containsPlugins):
1506         (WebCore::FrameLoader::prepareForLoadStart):
1507         (WebCore::FrameLoader::setupForReplace):
1508         (WebCore::FrameLoader::setupForReplaceByMIMEType):
1509         (WebCore::FrameLoader::finalSetupForReplace):
1510         (WebCore::FrameLoader::load):
1511         (WebCore::FrameLoader::canTarget):
1512         (WebCore::FrameLoader::stopLoadingPlugIns):
1513         (WebCore::FrameLoader::stopLoadingSubresources):
1514         (WebCore::FrameLoader::stopLoadingSubframes):
1515         (WebCore::FrameLoader::stopAllLoaders):
1516         (WebCore::FrameLoader::cancelMainResourceLoad):
1517         (WebCore::FrameLoader::cancelPendingArchiveLoad):
1518         (WebCore::FrameLoader::activeDocumentLoader):
1519         (WebCore::FrameLoader::addPlugInStreamLoader):
1520         (WebCore::FrameLoader::removePlugInStreamLoader):
1521         (WebCore::FrameLoader::hasMainResourceLoader):
1522         (WebCore::FrameLoader::isLoadingSubresources):
1523         (WebCore::FrameLoader::isLoadingPlugIns):
1524         (WebCore::FrameLoader::isLoading):
1525         (WebCore::FrameLoader::addSubresourceLoader):
1526         (WebCore::FrameLoader::removeSubresourceLoader):
1527         (WebCore::FrameLoader::releaseMainResourceLoader):
1528         (WebCore::FrameLoader::setDocumentLoader):
1529         (WebCore::FrameLoader::documentLoader):
1530         (WebCore::FrameLoader::setPolicyDocumentLoader):
1531         (WebCore::FrameLoader::provisionalDocumentLoader):
1532         (WebCore::FrameLoader::setProvisionalDocumentLoader):
1533         (WebCore::FrameLoader::state):
1534         (WebCore::FrameLoader::timeOfLastCompletedLoad):
1535         (WebCore::FrameLoader::setState):
1536         (WebCore::FrameLoader::clearProvisionalLoad):
1537         (WebCore::FrameLoader::markLoadComplete):
1538         (WebCore::FrameLoader::commitProvisionalLoad):
1539         (WebCore::FrameLoader::privateBrowsingEnabled):
1540         (WebCore::FrameLoader::clientRedirectCancelledOrFinished):
1541         (WebCore::FrameLoader::clientRedirected):
1542         (WebCore::FrameLoader::shouldReload):
1543         (WebCore::FrameLoader::closeOldDataSources):
1544         (WebCore::FrameLoader::open):
1545         (WebCore::FrameLoader::isStopping):
1546         (WebCore::FrameLoader::finishedLoading):
1547         (WebCore::FrameLoader::URL):
1548         (WebCore::FrameLoader::isArchiveLoadPending):
1549         (WebCore::FrameLoader::isHostedByObjectElement):
1550         (WebCore::FrameLoader::isLoadingMainFrame):
1551         (WebCore::FrameLoader::canShowMIMEType):
1552         (WebCore::FrameLoader::representationExistsForURLScheme):
1553         (WebCore::FrameLoader::generatedMIMETypeForURLScheme):
1554         (WebCore::FrameLoader::cancelContentPolicyCheck):
1555         (WebCore::FrameLoader::didReceiveServerRedirectForProvisionalLoadForFrame):
1556         (WebCore::FrameLoader::finishedLoadingDocument):
1557         (WebCore::FrameLoader::isReplacing):
1558         (WebCore::FrameLoader::setReplacing):
1559         (WebCore::FrameLoader::revertToProvisional):
1560         (WebCore::FrameLoader::subframeIsLoading):
1561         (WebCore::FrameLoader::willChangeTitle):
1562         (WebCore::FrameLoader::loadType):
1563         (WebCore::FrameLoader::stopPolicyCheck):
1564         (WebCore::FrameLoader::continueAfterContentPolicy):
1565         (WebCore::FrameLoader::continueAfterWillSubmitForm):
1566         (WebCore::FrameLoader::didFirstLayout):
1567         (WebCore::FrameLoader::frameLoadCompleted):
1568         (WebCore::FrameLoader::firstLayoutDone):
1569         (WebCore::FrameLoader::isQuickRedirectComing):
1570         (WebCore::FrameLoader::closeDocument):
1571         (WebCore::FrameLoader::detachChildren):
1572         (WebCore::FrameLoader::checkLoadComplete):
1573         (WebCore::FrameLoader::numPendingOrLoadingRequests):
1574         (WebCore::FrameLoader::setClient):
1575         (WebCore::FrameLoader::client):
1576         (WebCore::FrameLoader::userAgent):
1577         (WebCore::FrameLoader::createEmptyDocument):
1578         (WebCore::FrameLoader::tokenizerProcessedData):
1579         (WebCore::FrameLoader::didTellBridgeAboutLoad):
1580         (WebCore::FrameLoader::haveToldBridgeAboutLoad):
1581         (WebCore::FrameLoader::handledOnloadEvents):
1582         (WebCore::FrameLoader::frameDetached):
1583         (WebCore::FrameLoader::setTitle):
1584         (WebCore::FrameLoaderClient::~FrameLoaderClient):
1585         * loader/FrameLoader.h:
1586         (WebCore::):
1587         * loader/FrameLoaderClient.h:
1588         * loader/PluginDocument.cpp:
1589         (WebCore::PluginTokenizer::createDocumentStructure):
1590         (WebCore::PluginTokenizer::writeRawData):
1591         * loader/ResourceLoader.h:
1592         * loader/TextResourceDecoder.cpp:
1593         (WebCore::TextResourceDecoder::checkForHeadCharset):
1594         * loader/icon/IconLoader.cpp:
1595         (WebCore::IconLoader::startLoading):
1596         (WebCore::IconLoader::finishLoading):
1597         * loader/loader.cpp:
1598         (WebCore::Loader::didReceiveResponse):
1599         * loader/mac/DocumentLoaderMac.mm:
1600         (WebCore::DocumentLoader::~DocumentLoader):
1601         (WebCore::DocumentLoader::stopLoading):
1602         (WebCore::DocumentLoader::finishedLoading):
1603         (WebCore::DocumentLoader::setupForReplaceByMIMEType):
1604         (WebCore::DocumentLoader::setPrimaryLoadComplete):
1605         * loader/mac/FrameLoaderMac.mm:
1606         (WebCore::FrameLoader::load):
1607         (WebCore::FrameLoader::startLoading):
1608         (WebCore::FrameLoader::cancelMainResourceLoad):
1609         (WebCore::FrameLoader::receivedMainResourceError):
1610         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
1611         (WebCore::FrameLoader::commitProvisionalLoad):
1612         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
1613         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
1614         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
1615         (WebCore::FrameLoader::detachFromParent):
1616         (WebCore::FrameLoader::addExtraFieldsToRequest):
1617         (WebCore::FrameLoader::loadResourceSynchronously):
1618         (WebCore::FrameLoader::createFrame):
1619         (WebCore::FrameLoader::objectContentType):
1620         (WebCore::nsArray):
1621         (WebCore::FrameLoader::createPlugin):
1622         (WebCore::FrameLoader::redirectDataToPlugin):
1623         (WebCore::FrameLoader::createJavaAppletWidget):
1624         (WebCore::FrameLoader::partClearedInBegin):
1625         (WebCore::FrameLoader::saveDocumentState):
1626         (WebCore::FrameLoader::restoreDocumentState):
1627         (WebCore::FrameLoader::overrideMediaType):
1628         (WebCore::FrameLoader::mainResourceData):
1629         (WebCore::FrameLoader::canGoBackOrForward):
1630         (WebCore::FrameLoader::originalRequestURL):
1631         (WebCore::FrameLoader::getHistoryLength):
1632         (WebCore::FrameLoader::goBackOrForward):
1633         (WebCore::FrameLoader::historyURL):
1634         (WebCore::FrameLoader::didFinishLoad):
1635         * loader/mac/LoaderFunctionsMac.mm:
1636         (WebCore::ServeSynchronousRequest):
1637         (WebCore::CheckCacheObjectStatus):
1638         * loader/mac/ResourceLoaderMac.mm:
1639         (WebCore::ResourceLoader::cancel):
1640         * loader/mac/SubresourceLoaderMac.mm:
1641         (WebCore::SubresourceLoader::create):
1642         * loader/qt/FrameLoaderQt.cpp: Added.
1643         (WebCore::FrameLoader::submitForm):
1644         (WebCore::FrameLoader::urlSelected):
1645         (WebCore::FrameLoader::setTitle):
1646         (WebCore::FrameLoader::createFrame):
1647         (WebCore::FrameLoader::objectContentType):
1648         (WebCore::FrameLoader::createPlugin):
1649         (WebCore::FrameLoader::createJavaAppletWidget):
1650         (WebCore::FrameLoader::originalRequestURL):
1651         * page/DOMWindow.cpp:
1652         (WebCore::DOMWindow::document):
1653         * page/Frame.cpp:
1654         (WebCore::Frame::~Frame):
1655         (WebCore::Frame::reparseConfiguration):
1656         (WebCore::Frame::shouldDragAutoNode):
1657         (WebCore::Frame::prepareForUserAction):
1658         (WebCore::FramePrivate::FramePrivate):
1659         (WebCore::FramePrivate::~FramePrivate):
1660         * page/Frame.h:
1661         * page/FramePrivate.h:
1662         * page/FrameView.cpp:
1663         (WebCore::FrameView::layout):
1664         (WebCore::FrameView::mediaType):
1665         * page/FrameView.h:
1666         * page/PageState.cpp:
1667         (WebCore::PageState::PageState):
1668         (WebCore::PageState::restoreJavaScriptState):
1669         * platform/mac/CookieJar.mm:
1670         (WebCore::setCookies):
1671         * platform/mac/TextCodecMac.cpp:
1672         * platform/mac/WebFontCache.mm:
1673         (+[WebFontCache fontWithFamily:traits:size:]):
1674         * platform/network/cf/ResourceHandleCFNet.cpp:
1675         (WebCore::ResourceHandle::start):
1676         * platform/network/mac/ResourceHandleMac.mm:
1677         (WebCore::ResourceHandle::start):
1678         * platform/qt/FrameQt.cpp:
1679         * platform/qt/FrameQt.h:
1680         * rendering/RenderApplet.cpp:
1681         (WebCore::RenderApplet::createWidgetIfNecessary):
1682         * rendering/RenderBlock.h:
1683         * rendering/RenderPartObject.cpp:
1684         (WebCore::isURLAllowed):
1685         (WebCore::RenderPartObject::updateWidget):
1686         * xml/DOMParser.cpp:
1687         (WebCore::DOMParser::parseFromString):
1688         * xml/XSLTProcessor.cpp:
1689         (WebCore::XSLTProcessor::createDocumentFromSource):
1690         * xml/xmlhttprequest.cpp:
1691         (WebCore::XMLHttpRequest::getResponseXML):
1692
1693 2006-11-07  Anders Carlsson  <acarlsson@apple.com>
1694
1695         Reviewed by Geoff.
1696
1697         Get rid of some duplicate editing enums. Also rename EAlter to EAlteration.
1698         
1699         * bridge/mac/FrameMac.mm:
1700         (WebCore::FrameMac::registerCommandForUndoOrRedo):
1701         * bridge/mac/WebCoreFrameBridge.h:
1702         * bridge/mac/WebCoreFrameBridge.mm:
1703         (-[WebCoreFrameBridge rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
1704         (-[WebCoreFrameBridge alterCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
1705         (-[WebCoreFrameBridge alterCurrentSelection:SelectionController::verticalDistance:]):
1706         (-[WebCoreFrameBridge selectionGranularity]):
1707         (-[WebCoreFrameBridge deleteKeyPressedWithSmartDelete:granularity:]):
1708         (-[WebCoreFrameBridge forwardDeleteKeyPressedWithSmartDelete:granularity:]):
1709         (-[WebCoreFrameBridge setTypingStyle:withUndoAction:]):
1710         (-[WebCoreFrameBridge applyStyle:withUndoAction:]):
1711         (-[WebCoreFrameBridge applyParagraphStyle:withUndoAction:]):
1712         * editing/SelectionController.cpp:
1713         (WebCore::SelectionController::setModifyBias):
1714         (WebCore::SelectionController::modify):
1715         * editing/SelectionController.h:
1716         (WebCore::SelectionController::):
1717         * editing/TextGranularity.h:
1718
1719 2006-11-07  Brady Eidson  <beidson@apple.com>
1720
1721         Reviewed by Maciej
1722
1723         Changed the check for "top level frame" to something much more valid
1724
1725         * page/Frame.cpp:
1726         (WebCore::Frame::endIfNotLoading):
1727
1728 2006-11-07  Beth Dakin  <bdakin@apple.com>
1729
1730         Reviewed by Hyatt (yesterday).
1731
1732         Here is part of my patch from yesterday that is safe to roll back 
1733         in. It will make the BuildBot happy.
1734
1735         * rendering/HitTestResult.cpp:
1736         (WebCore::HitTestResult::spellingToolTip): Null-check 
1737         m_innerNonSharedNode.
1738
1739 2006-11-07  Darin Adler  <darin@apple.com>
1740
1741         * loader/icon/IconLoader.cpp: (WebCore::IconLoader::didReceiveResponse):
1742         Comment grammar fix.
1743
1744 2006-11-07  Darin Adler  <darin@apple.com>
1745
1746         Rolled out change for <rdar://problem/4820814>.
1747
1748         Beth's planning on landing a new change for it soon, but in the mean time
1749         we need layout tests succeeding again.
1750
1751 2006-11-07  Darin Adler  <darin@apple.com>
1752
1753         Reviewed by Brady.
1754
1755         - fix <rdar://problem/4752069> 9A274: World of Warcraft Launcher
1756           crashes on launch in WebCore::ResourceLoader::start
1757
1758         No layout test, because this depends on cached icons, although there's
1759         perhaps a way to write a test for it with some further ingenuity.
1760
1761         * loader/icon/IconLoader.h: Make IconLoader inherit from Noncopyable
1762         to make explicit the fact that it can't be successfully copied.
1763         Remove notifyIconChanged function and put the contents in the caller.
1764         This eliminates the need for IconLoaderMac.mm. Added finishedLoading
1765         and clearLoadingState functions to share code. Removed m_url, since the
1766         resource handle already stores the URL. Renamed m_resourceLoader to
1767         m_handle to reflect the class's name change. Removed the 4096-byte
1768         inline buffer from m_data, since the malloc savings is not sufficient
1769         to offset the additional memory use. Removed m_httpStatusCode because
1770         we can instead cancel the load when we get a status code that reflects
1771         failure. Added m_loadIsInProgress boolean because we need to detect
1772         loads that complete during the ResourceHandle::create function call.
1773
1774         * loader/icon/IconLoader.cpp:
1775         (WebCore::IconLoader::IconLoader): Initialize m_loadIsInProgress.
1776         Don't initialize m_httpStatusCode.
1777         (WebCore::IconLoader::~IconLoader): Updated for name change.
1778         (WebCore::IconLoader::startLoading): Added code to use the
1779         m_loadIsInProgress flag to detect if the load completed while inside
1780         the ResourceHandle::create function. Removed code to set m_url.
1781         (WebCore::IconLoader::stopLoading): Call clearLoadingState to share
1782         more code.
1783         (WebCore::IconLoader::didReceiveResponse): Kill the ResourceHandle
1784         and finish loading if the HTTP status code indicates failure.
1785         (WebCore::IconLoader::didReceiveData): Removed assertion that checks
1786         the ResourceHandle, since we can't do that any more.
1787         (WebCore::IconLoader::didFinishLoading): Changed to call finishLoading
1788         so we can share code with the new didReceiveResponse code path.
1789         (WebCore::IconLoader::finishLoading): Moved code here from the
1790         didFinishLoading callback. Pass a URL when calling
1791         commitIconURLToIconDatabase. Call notifyIconChanged directly here
1792         instead of using a separate function. Call clearLoadingState to
1793         share more code with stopLoading.
1794         (WebCore::IconLoader::clearLoadingState): Added.
1795
1796         * loader/mac/IconLoaderMac.mm: Removed.
1797         * WebCore.xcodeproj/project.pbxproj: Removed IconLoaderMac.mm.
1798
1799 2006-11-06  David Harrison  <harrison@apple.com>
1800
1801         Reviewed by Darin.
1802
1803         <rdar://problem/4714993> REGRESSION: After replacing a misspelled word in a sentence, the selected word wraps down to next line (10428)
1804
1805         * editing/pasteboard/3976872-expected.txt:
1806         * editing/pasteboard/4076267-2-expected.txt:
1807         * editing/pasteboard/4076267-3-expected.txt:
1808         * editing/pasteboard/4076267-expected.txt:
1809         * editing/pasteboard/8145-1-expected.txt:
1810         * editing/pasteboard/paste-empty-startcontainer-expected.txt: Removed.
1811         * editing/pasteboard/paste-match-style-001-expected.txt:
1812         * editing/pasteboard/paste-match-style-002-expected.txt:
1813         * editing/pasteboard/paste-text-019-expected.txt:
1814         * editing/pasteboard/pasting-tabs-expected.txt:
1815         Updated because pasting text with no newlines does not use intermediate div.
1816         
1817         * editing/markup.cpp:
1818         (WebCore::fillContainerFromString):
1819         First parameter is now a Container so a fragment can be passed.
1820         
1821         (WebCore::createFragmentFromText):
1822         A string with no newlines gets added inline, rather than being put into a paragraph.
1823
1824 2006-11-06  Beth Dakin  <bdakin@apple.com>
1825
1826         Reviewed by Hyatt.
1827
1828         Fix for <rdar://problem/4820814> A crash occurs at 
1829         WebCore::HitTestResult::spellingToolTip() when mousing down on 
1830         iframe at www.macsurfer.com
1831
1832         The bug here is that the source of the iframe is only a comment, 
1833         and we were not properly constructing the frame because it was 
1834         sort-of empty but not.
1835
1836         * html/HTMLDocument.cpp:
1837         (WebCore::HTMLDocument::childAllowed): newChild is NOT allowed if 
1838         it is a comment node.
1839         * html/HTMLParser.cpp:
1840         (WebCore::HTMLParser::handleError): if n is a comment node and 
1841         there is no head, we create a head, insert in the document, and add 
1842         the comment node as a child. This is what Firefox does too. 
1843         * page/FrameView.cpp:
1844         (WebCore::FrameView::handleMousePressEvent): Safe-guard for the 
1845         fix. It is possible to get a mouse event without a target node, so 
1846         we null check it. (Of course, in the case of this bug, it should 
1847         not have been null, but it is a good thing to check for anyway.
1848         * rendering/HitTestResult.cpp:
1849         (WebCore::HitTestResult::spellingToolTip): Null-check 
1850         m_innerNonSharedNode.
1851
1852 2006-11-06  Justin Garcia  <justin.garcia@apple.com>
1853
1854         Reviewed by harrison
1855         
1856         <rdar://problem/4641880>
1857         Setting bullets to existing text grabs subsequent paragraph
1858         
1859         When a selection ends at the start of a paragraph, we rarely paint 
1860         the selection gap before that paragraph, because there often is no gap.  
1861         In a case like this, it's not obvious to the user that the selection 
1862         ends "inside" that paragraph, so it would be confusing if 
1863         InsertUn{Ordered}List and Indent/Outdent operated on that paragraph.
1864         
1865         * editing/FormatBlockCommand.cpp:
1866         (WebCore::FormatBlockCommand::doApply): Moved the check for editability of
1867         the selection to a more appropriate place.  Change the endingSelection
1868         if it ends at the start of a paragraph.
1869         * editing/IndentOutdentCommand.cpp:
1870         (WebCore::IndentOutdentCommand::doApply): Ditto.
1871         * editing/InsertListCommand.cpp:
1872         (WebCore::InsertListCommand::doApply): Ditto.
1873
1874 2006-11-06  Brady Eidson  <beidson@apple.com>
1875
1876         Reviewed by Sarge
1877
1878         <rdar://problem/4822911> - ASSERTION was a little overzealous.  
1879         Toned it down a bit.
1880
1881         * xml/xmlhttprequest.cpp:
1882         (WebCore::XMLHttpRequest::didFinishLoading):  Toned down assertion
1883
1884 2006-11-06  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1885
1886         Reviewed by Maciej.
1887
1888         Linux\Gdk build fixes.
1889
1890         * loader/icon/IconDatabase.cpp:
1891         * loader/icon/SQLStatement.h:
1892         * platform/gdk/ChromeClientGdk.h: Added.
1893         (WebCore::ChromeClientGdk::~ChromeClientGdk):
1894         * platform/gdk/CursorGdk.cpp:
1895         (WebCore::pointerCursor):
1896         * platform/gdk/FrameGdk.cpp:
1897         (WebCore::doScroll):
1898         (WebCore::FrameGdk::FrameGdk):
1899         (WebCore::FrameGdk::submitForm):
1900         (WebCore::FrameGdk::urlSelected):
1901         (WebCore::FrameGdk::openURL):
1902         (WebCore::FrameGdk::handleGdkEvent):
1903         * platform/gdk/FrameGdk.h:
1904         (WebCore::FrameGdk::client):
1905         * platform/gdk/RenderPopupMenuGdk.cpp:
1906         (WebCore::PopupMenu::updateFromElement):
1907         * platform/gdk/ScreenGdk.cpp:
1908         * platform/gdk/TemporaryLinkStubs.cpp:
1909         (Slider::focusPolicy):
1910         (WebCore::ServeSynchronousRequest):
1911         (FrameGdk::goBackOrForward):
1912         (FrameGdk::getHistoryLength):
1913         (FrameGdk::historyURL):
1914         (ChromeClientGdk::canRunModal):
1915         (ChromeClientGdk::runModal):
1916         (WebCore::systemBeep):
1917         (WebCore::CachedResource::setPlatformResponse):
1918         (Path::transform):
1919         (ResourceLoader::loadsBlocked):
1920         (IconLoader::notifyIconChanged):
1921         * platform/network/gdk/ResourceHandleManager.cpp:
1922         (WebCore::writeCallback):
1923         (WebCore::ResourceHandleManager::downloadTimerCallback):
1924         (WebCore::ResourceHandleManager::remove):
1925         (WebCore::ResourceHandleManager::add):
1926
1927 2006-11-06  Geoffrey Garen  <ggaren@apple.com>
1928
1929         build fix.
1930         
1931         * WebCore.xcodeproj/project.pbxproj:
1932
1933 2006-11-06  Geoffrey Garen  <ggaren@apple.com>
1934
1935         Reviewed by Maciej, Anders, Darin.
1936
1937         Removed the Page bridge. Beefed up Chrome. Added Screen and ScreenClient.
1938         Fixed a minor where WebCore would always assume it was displayed on the 
1939         monitor containing the menubar. window.open and window.showModalDialog 
1940         are now cross-platform. 
1941         
1942         Layout tests, manual-tests/show-modal-dialog, and manual-tests/
1943         window-open-features-parsing all pass. I verified the new screen functionality
1944         by running in DRT, and checking whether WebCore knew it was off-screen.
1945         
1946         Some refactoring remains, as all were not pleased by this design. I see
1947         in my future another patch.
1948
1949         * bindings/js/kjs_window.cpp: Screen is now a stand-alone object with a
1950         client, to encapsulate asking the platform questions about the screen occupied by
1951         the page. (Previously, we always assumed we were on screen 0, which was a bug.)
1952         * bridge/mac/WebCoreFrameBridge.mm:
1953         (createMouseEventFromDraggingInfo): Reversed argument order, to match other
1954         functions.
1955         (-[WebCoreFrameBridge dragSourceMovedTo:]): ditto
1956         (-[WebCoreFrameBridge dragSourceEndedAt:operation:]): ditto
1957         * bridge/mac/WebCoreFrameNamespaces.h: Removed. Dead Code.
1958         * bridge/mac/WebCoreFrameNamespaces.mm: Removed. Dead Code.
1959         * bridge/mac/WebCorePageBridge.h: Removed. Dead Code.
1960         * bridge/mac/WebCorePageBridge.mm: Removed. Dead Code.
1961         * manual-tests/window-open-features-parsing.html: Updated for accuracy.
1962         (In this case, neither size nor position is specified, so you should
1963         get the default window size and position.)
1964         * page/Screen.cpp: Added. Includes screen-related helper functions used
1965         in WebCore and WebKit.
1966         * platform/PlatformMouseEvent.h: Exported common code so it doesn't have
1967         to be duplicated. Renamed "position" to "point" since both were used,
1968         and "point" seemed clearer.
1969         * platform/Screen.h: Removed. Dead Code.
1970         * platform/mac/LoggingMac.mm: Added. Moved code here from WebCorePageBridge
1971         initialization.
1972
1973 2006-11-06  Graham Dennis  <graham.dennis@gmail.com>
1974
1975         Reviewed by Tim Hatcher.
1976
1977         Part of patch for http://bugs.webkit.org/show_bug.cgi?id=11323
1978         Link dragging behaviour does not obey WebKitEditableLinkBehavior WebPref
1979         
1980         No layout tests added as this must be tested manually by the test
1981         WebCore/manual-tests/contenteditable-link.html
1982
1983         * WebCore.exp: Exported HitTestResult::isLiveLink().
1984         * html/HTMLAnchorElement.cpp:
1985         (WebCore::HTMLAnchorElement::HTMLAnchorElement):
1986         (WebCore::HTMLAnchorElement::defaultEventHandler):
1987         (WebCore::HTMLAnchorElement::isLiveLink):
1988         * html/HTMLAnchorElement.h: added m_wasShiftKeyDownOnMouseDown variable
1989         to track shift key status.
1990         * manual-tests/contenteditable-link.html: Added description about link
1991         dragging behaviour.
1992         * rendering/HitTestResult.cpp:
1993         (WebCore::HitTestResult::isLiveLink): Added.
1994         * rendering/HitTestResult.h:
1995
1996 2006-11-06  Brady Eidson  <beidson@apple.com>
1997
1998         Reviewed by Oliver
1999
2000         Fixes <rdar://problem/4812674> and http://bugs.webkit.org/show_bug.cgi?id=11530
2001         For now, we have to not load favicons when we have no Document - linking directly 
2002         to PDFs being the common case
2003
2004         * loader/icon/IconLoader.cpp:
2005         (WebCore::IconLoader::startLoading): Check for the document and return if none
2006
2007 2006-11-06  Brady Eidson  <beidson@apple.com>
2008
2009         Reviewed by Dave Harrison
2010
2011         <rdar://problem/4801066>
2012         Added a critical null frameLoader() check
2013
2014         * loader/mac/MainResourceLoaderMac.mm:
2015         (WebCore::MainResourceLoader::loadNow):
2016
2017 2006-11-06  David Harrison  <harrison@apple.com>
2018
2019         Reviewed by Darin.
2020
2021         <rdar://problem/4813973> Pressing delete key to remove empty quoted line leaves cursor mis-positioned
2022
2023         Test:
2024         * editing/deleting/delete-br-012.html
2025         
2026         * editing/DeleteSelectionCommand.cpp:
2027         (WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete):
2028         Update m_endingPosition when preventing merge.
2029         Also removed setting of m_mergeBlocksAfterDelete when this function returns true, because is is not checked in this case.
2030
2031 2006-11-06  Mark Rowe  <bdash@webkit.org>
2032
2033         Reviewed by Maciej.
2034
2035         http://bugs.webkit.org/show_bug.cgi?id=11526
2036         Bug 11526: REGRESSION(r17610): Layout test failure in svg/custom/create-metadata-element.svg
2037
2038         Update DOMNode::toString to always use className rather than preferring nodeName.
2039
2040         * bindings/js/kjs_dom.cpp:
2041         (KJS::DOMNode::toString): Match the format returned by valueOf.
2042
2043 2006-11-06  Oliver Hunt  <oliver@apple.com>
2044
2045         Reviewed by Maciej.
2046
2047         Fix RTL text in SVG to have correct positioning
2048
2049         * rendering/SVGRootInlineBox.cpp:
2050         (WebCore::SVGRootInlineBox::placeBoxesHorizontally):
2051
2052 2006-11-06  Alexey Proskuryakov  <ap@webkit.org>
2053
2054         Reviewed by Maciej.
2055
2056         http://bugs.webkit.org/show_bug.cgi?id=11517
2057         REGRESSION: Flash clicks/interactivity not working properly
2058
2059         * bridge/mac/FrameMac.mm:
2060         (WebCore::FrameMac::handleMouseMoveEvent):
2061         (WebCore::FrameMac::handleMouseReleaseEvent):
2062         Restore parts of event dispatching that were removed when fixing
2063         bug 7323 - just bypass those for subframes.
2064
2065 2006-11-05  Darin Adler  <darin@apple.com>
2066
2067         - quick attempt to fix the no-SVG build
2068
2069         * platform/graphics/svg/SVGResource.cpp:
2070         * platform/graphics/svg/SVGResource.h:
2071         * platform/graphics/svg/SVGResourceClipper.cpp:
2072         * platform/graphics/svg/SVGResourceClipper.h:
2073         * platform/graphics/svg/SVGResourceImage.h:
2074         * platform/graphics/svg/SVGResourceMarker.cpp:
2075         * platform/graphics/svg/SVGResourceMarker.h:
2076         * platform/graphics/svg/SVGResourceMasker.cpp:
2077         * platform/graphics/svg/SVGResourceMasker.h:
2078         * platform/graphics/svg/cg/SVGResourceMaskerCg.h:
2079         * platform/graphics/svg/qt/SVGResourceClipperQt.cpp:
2080         * platform/graphics/svg/qt/SVGResourceImageQt.cpp:
2081         * platform/graphics/svg/qt/SVGResourceMaskerQt.cpp:
2082         Added #ifdef SVG_SUPPORT to these files.
2083
2084 2006-11-05  MorganL  <morganl.webkit@yahoo.com>
2085
2086         Reviewed & landed by Maciej.
2087
2088         Fixes http://bugs.webkit.org/show_bug.cgi?id=11265
2089
2090         * platform/win/ResourceLoaderWin.cpp:
2091         (WebCore::transferJobStatusCallback):
2092         (WebCore::ResourceLoader::start):
2093
2094 2006-11-04  Maciej Stachowiak  <mjs@apple.com>
2095
2096         Reviewed by Oliver.
2097
2098         - moved FormData and FormDataStream to platform/network directory
2099
2100         * WebCore.xcodeproj/project.pbxproj:
2101         * bridge/mac/WebCoreFrameBridge.mm:
2102         * loader/FormData.cpp: Removed.
2103         * loader/FormData.h: Removed.
2104         * loader/mac/FormDataStream.h: Removed.
2105         * loader/mac/FormDataStream.m: Removed.
2106         * loader/mac/FrameLoaderMac.mm:
2107         * loader/mac/SubresourceLoaderMac.mm:
2108         * platform/network/mac/FormDataStreamMac.h: Added.
2109         * platform/network/mac/FormDataStreamMac.mm: Added.
2110         * platform/network/mac/ResourceRequestMac.mm:
2111
2112 2006-11-05  Steve Falkenburg  <sfalken@apple.com>
2113
2114         Fix build breaks
2115
2116         * loader/DocumentLoader.h:
2117         * platform/win/ScreenWin.cpp:
2118
2119 2006-11-05  Darin Adler  <darin@apple.com>
2120
2121         Reviewed by Geoff.
2122
2123         - more preparation for splitting up Frame into sub-pieces
2124         - removed unnecessary includes from Frame.h
2125
2126         * page/Frame.h: Removed unneeded includes and forward declarations.
2127         Added additional forward declarations. Removed the constant
2128         NoXPosForVerticalArrowNavigation, now moved inside SelectionController.
2129         Created sections of functions to be moved into Chrome, Editor,
2130         EventHandler, FrameLoader, SelectionController, and the Platform
2131         directory, as well as marking one function for deletion.
2132
2133         * page/FramePrivate.h: Removed the definition of the constructor and
2134         destructor and removed unnecessary includes.
2135
2136         * page/FrameView.h: Removed unneeded forward declarations and friend
2137         declarations. Created a section of functions and data to be moved into
2138         EventHandler.
2139
2140         * bridge/mac/FrameMac.h: Removed unneeded forward declarations.
2141         Created sections of functions and data to be moved into Chrome,
2142         Editor, EventHandler, FrameLoader, and the Platform directory.
2143
2144         * bridge/mac/WebCoreFrameBridge.h: Removed obsolete comment.
2145         Removed unused methods areScrollbarsVisible,
2146         nextValidKeyViewOutsideWebFrameViews, and fileWrapperForURL:.
2147
2148         * page/Frame.cpp:
2149         (WebCore::Frame::begin): Added an overload, so Frame.h doesn't have
2150         to include KURL.h just for the KURL default constructor.
2151         (WebCore::FramePrivate::FramePrivate): Moved here from FramePrivate.h.
2152         (WebCore::FramePrivate::~FramePrivate): Ditto.
2153
2154         * page/FrameView.cpp: Removed unused scrollbarMoved and scrollingSelf
2155         booleans, scrollbarMoved and cleared funcitons.
2156         (WebCore::FrameView::clear): Moved the code from the cleared
2157         function in here.
2158         (WebCore::FrameView::scrollTo): Removed code to set scrollingSelf.
2159
2160         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::FrameMac): Updated
2161         for changes to header.
2162
2163         * editing/SelectionController.cpp:
2164         (WebCore::SelectionController::setSelection):
2165         (WebCore::SelectionController::xPosForVerticalArrowNavigation):
2166         Moved NoXPosForVerticalArrowNavigation into this file.
2167
2168         * bindings/js/kjs_events.cpp:
2169         * bindings/js/kjs_html.cpp:
2170         * bindings/js/kjs_window.cpp:
2171         * bridge/mac/WebCoreAXObject.mm:
2172         * bridge/mac/WebCoreFrameBridge.mm:
2173         * css/cssstyleselector.cpp:
2174         * dom/Document.cpp:
2175         * dom/Element.cpp:
2176         * dom/EventTargetNode.cpp:
2177         * dom/MouseRelatedEvent.cpp:
2178         * dom/XMLTokenizer.cpp:
2179         * html/HTMLBaseElement.cpp:
2180         * html/HTMLDocument.cpp:
2181         * html/HTMLEmbedElement.cpp:
2182         * html/HTMLFrameElementBase.cpp:
2183         * html/HTMLGenericFormElement.cpp:
2184         * html/HTMLObjectElement.cpp:
2185         * html/HTMLTokenizer.cpp:
2186         * loader/mac/FrameLoaderMac.mm:
2187         * page/PageState.cpp:
2188         * rendering/RenderApplet.cpp:
2189         * rendering/RenderBlock.cpp:
2190         * rendering/RenderLayer.cpp:
2191         * rendering/RenderObject.cpp:
2192         * rendering/RenderPartObject.cpp:
2193         * rendering/RenderTreeAsText.cpp:
2194         * xml/XSLTProcessor.cpp:
2195         Added includes as needed to keep compiling, since there are fewer
2196         includes in Frame.h.
2197
2198 2006-11-05  Alexey Proskuryakov  <ap@nypop.com>
2199
2200         Reviewed by Dave Harrison.
2201
2202         http://bugs.webkit.org/show_bug.cgi?id=11402
2203         REGRESSION: onChange does not work anymore for 1st item in popup
2204
2205         * html/HTMLSelectElement.cpp:
2206         (WebCore::HTMLSelectElement::HTMLSelectElement):
2207         (WebCore::HTMLSelectElement::reset):
2208         Set m_lastOnChangeIndex to -1.
2209
2210 2006-11-04  Darin Adler  <darin@apple.com>
2211
2212         Reviewed by Anders.
2213
2214         - fix http://bugs.webkit.org/show_bug.cgi?id=11453
2215           REGRESSION: Status bar always shows cancelled opening the page
2216
2217         * platform/network/mac/ResourceHandleMac.mm:
2218         (WebCore::ResourceHandle::~ResourceHandle): Removed call to cancel.
2219         Since the subresource owns the resource handle, there's no need to cancel.
2220         This arrangement is only temporary, anyway, since Maciej will soon change
2221         things so that the subresource loader uses the resource handle and the
2222         resource handle doesn't know anything about the subresource loader.
2223
2224 2006-11-04  Darin Adler  <darin@apple.com>
2225
2226         Reviewed by Maciej.
2227
2228         - converted more of the loader machinery to work with cross-platform
2229           data structures instead of Macintosh-specific ones
2230
2231           converted most uses of NSURL to KURL and NSEvent to DOM Event in
2232           loader classes
2233
2234           moved download function out of FrameLoader.h to avoid reference to
2235           NSURLConnection
2236
2237           added DOM Event parameters to various functions so that the handlers
2238           can use the DOM Event instead of the global "current NSEvent";
2239           includes Frame::submitForm, HTMLFormElement::prepareSubmit,
2240           HTMLFormElement::submit, FrameLoader::load
2241
2242           moved the setMainFrame call that hands ownership to the Page
2243           into one of the Frame constructors, and removed it from all
2244           the clients
2245
2246           removed const from Event parameter to the urlSelected function
2247           (we rarely use const with DOM elements)
2248
2249           removed some redundant includes and declarations from various
2250           header files
2251
2252           removed NSURL parameter from userAgent function -- if we need it we
2253           can add it back, but converting from NSURL to KURL and back is
2254           inefficient enough that it's best to have it out for now (since it's
2255           been unused for years) -- if we add it back, we can choose an
2256           appropriate parameter type that's always inexpensive to pass
2257
2258           did some basic cleanup in the IconLoader class, including removing
2259           an unnecessary loop that added icon data a byte at a time
2260
2261           renamed safeLoad to load, since it's no different from the other
2262           FrameLoader load functions, safety-wise
2263
2264           fixed some code that was trying to distinguish null frame name from
2265           empty string frame name -- both should be handled the same, but callers
2266           were doing it by checking for empty and turning it into null (in a way
2267           that was causing extra round trips between NSString and WebCore::String)
2268
2269           corrected all uses of "get" and "post" to be uppercase "GET" and "POST"
2270           and got rid of case-insensitive compares of methods
2271
2272         * WebCore.exp:
2273         * WebCore.xcodeproj/project.pbxproj:
2274         * bindings/js/kjs_navigator.cpp:
2275         (KJS::Navigator::getValueProperty):
2276         * bridge/mac/FrameMac.h:
2277         * bridge/mac/FrameMac.mm:
2278         (WebCore::FrameMac::submitForm):
2279         (WebCore::FrameMac::urlSelected):
2280         (WebCore::FrameMac::userAgent):
2281         * bridge/mac/FrameViewMac.mm:
2282         * bridge/mac/WebCoreAXObject.mm:
2283         (-[WebCoreAXObject rendererForView:]):
2284         * bridge/mac/WebCorePageBridge.h:
2285         * bridge/mac/WebCorePageBridge.mm:
2286         * bridge/mac/WebCoreSettings.mm:
2287         * bridge/win/FrameWin.cpp:
2288         (WebCore::FrameWin::urlSelected):
2289         (WebCore::FrameWin::submitForm):
2290         * bridge/win/FrameWin.h:
2291         * dom/MouseRelatedEvent.cpp:
2292         * dom/MouseRelatedEvent.h:
2293         * dom/UIEvent.cpp:
2294         (WebCore::UIEvent::~UIEvent):
2295         * dom/UIEvent.h:
2296         * dom/UIEventWithKeyState.h:
2297         * dom/XMLTokenizer.cpp:
2298         (WebCore::openFunc):
2299         * html/HTMLAnchorElement.cpp:
2300         (WebCore::HTMLAnchorElement::defaultEventHandler):
2301         * html/HTMLButtonElement.cpp:
2302         (WebCore::HTMLButtonElement::defaultEventHandler):
2303         * html/HTMLFormElement.cpp:
2304         (WebCore::HTMLFormElement::submitClick):
2305         (WebCore::HTMLFormElement::prepareSubmit):
2306         (WebCore::HTMLFormElement::submit):
2307         * html/HTMLFormElement.h:
2308         * html/HTMLInputElement.cpp:
2309         (WebCore::HTMLInputElement::defaultEventHandler):
2310         * html/HTMLSelectElement.cpp:
2311         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
2312         * loader/DocumentLoader.h:
2313         * loader/FrameLoader.h:
2314         * loader/FrameLoaderClient.h:
2315         * loader/NavigationAction.h:
2316         (WebCore::NavigationAction::event):
2317         * loader/icon/IconLoader.cpp:
2318         (WebCore::IconLoader::create):
2319         (WebCore::IconLoader::startLoading):
2320         (WebCore::IconLoader::didReceiveData):
2321         (WebCore::IconLoader::didFinishLoading):
2322         * loader/icon/IconLoader.h:
2323         * loader/loader.cpp:
2324         * loader/mac/DocumentLoaderMac.mm:
2325         (WebCore::DocumentLoader::URL):
2326         (WebCore::DocumentLoader::unreachableURL):
2327         (WebCore::DocumentLoader::replaceRequestURLForAnchorScroll):
2328         (WebCore::DocumentLoader::URLForHistory):
2329         * loader/mac/FrameLoaderMac.mm:
2330         (WebCore::FrameLoader::load):
2331         (WebCore::FrameLoader::willSendRequest):
2332         (WebCore::FrameLoader::clientRedirected):
2333         (WebCore::FrameLoader::shouldReload):
2334         (WebCore::FrameLoader::notifyIconChanged):
2335         (WebCore::FrameLoader::URL):
2336         (WebCore::FrameLoader::reloadAllowingStaleData):
2337         (WebCore::FrameLoader::reload):
2338         (WebCore::FrameLoader::didChangeTitle):
2339         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
2340         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2341         (WebCore::FrameLoader::post):
2342         (WebCore::FrameLoader::addExtraFieldsToRequest):
2343         (WebCore::FrameLoader::loadResourceSynchronously):
2344         * loader/mac/IconLoaderMac.mm:
2345         (WebCore::IconLoader::notifyIconChanged):
2346         * loader/mac/LoaderFunctionsMac.mm:
2347         * loader/mac/MainResourceLoaderMac.mm:
2348         (WebCore::shouldLoadAsEmptyDocument):
2349         (WebCore::MainResourceLoader::continueAfterContentPolicy):
2350         * loader/mac/NavigationActionMac.mm:
2351         (WebCore::navigationType):
2352         (WebCore::NavigationAction::NavigationAction):
2353         * loader/mac/ResourceLoaderMac.mm:
2354         * loader/mac/SubresourceLoaderMac.mm:
2355         * page/Frame.cpp:
2356         (WebCore::Frame::Frame):
2357         (WebCore::Frame::urlSelected):
2358         (WebCore::Frame::submitFormAgain):
2359         (WebCore::Frame::submitForm):
2360         (WebCore::Frame::endIfNotLoading):
2361         (WebCore::Frame::hitTestResultAtPoint):
2362         * page/Frame.h:
2363         * page/FramePrivate.h:
2364         * platform/gdk/FrameGdk.cpp:
2365         (WebCore::FrameGdk::FrameGdk):
2366         (WebCore::FrameGdk::submitForm):
2367         (WebCore::FrameGdk::urlSelected):
2368         * platform/gdk/FrameGdk.h:
2369         * platform/mac/TextFieldMac.mm:
2370         * platform/network/HTTPHeaderMap.h:
2371         * platform/network/ResourceHandle.h:
2372         * platform/network/ResourceHandleClient.h:
2373         * platform/network/ResourceHandleInternal.h:
2374         * platform/network/mac/ResourceHandleMac.mm:
2375         * platform/network/mac/ResourceResponseMac.h:
2376         * platform/network/mac/ResourceResponseMac.mm:
2377         (-[NSURLResponse WebCore]):
2378         * platform/network/win/ResourceHandleWin.cpp:
2379         * platform/qt/FrameQt.cpp:
2380         (WebCore::FrameQt::submitForm):
2381         (WebCore::FrameQt::urlSelected):
2382         * platform/qt/FrameQt.h:
2383         * rendering/RenderLineEdit.cpp:
2384         (WebCore::RenderLineEdit::returnPressed):
2385         * xml/XSLTProcessor.cpp:
2386         (WebCore::docLoaderFunc):
2387         * xml/xmlhttprequest.cpp:
2388
2389 2006-11-03  Maciej Stachowiak  <mjs@apple.com>
2390
2391         Reviewed by Adele.
2392
2393         - replaced receivedRedirect with new willSendRequest delegate
2394         - removed most mac-specific loader functions
2395         - use ResourceResponse more in loader code
2396
2397         * WebCore.xcodeproj/project.pbxproj: Add new files.
2398         * bridge/mac/WebCoreFrameBridge.mm:
2399         (-[WebCoreFrameBridge getData:andResponse:forURL:]): Adapted
2400         for CachedResource method renames.
2401         (-[WebCoreFrameBridge getAllResourceDatas:andResponses:]):
2402         Ditto.
2403         * loader/CachedCSSStyleSheet.cpp:
2404         (WebCore::CachedCSSStyleSheet::checkNotify): simplified
2405         based on ResourceResponse
2406         * loader/CachedImage.cpp:
2407         (WebCore::CachedImage::createImage): adapt for ResourceResponse
2408         * loader/CachedResource.cpp:
2409         (WebCore::CachedResource::CachedResource): store a ResourceResponse;
2410         platform response is now called platformResponse and expiration date
2411         is removed.
2412         (WebCore::CachedResource::~CachedResource): ditto
2413         (WebCore::CachedResource::isExpired): ditto
2414         * loader/CachedResource.h:
2415         (WebCore::CachedResource::platformResponse): ditto
2416         (WebCore::CachedResource::setResponse): ditto
2417         (WebCore::CachedResource::canDelete): ditto
2418         * loader/LoaderFunctions.h:
2419         * loader/loader.cpp:
2420         (WebCore::Loader::receivedResponse): Adjusted for renames.
2421         (WebCore::Loader::didReceiveResponse): Store whole ResourceResponse
2422         in the CachedResource.
2423         * loader/loader.h:
2424         * loader/mac/FormDataStream.h:
2425         * loader/mac/FormDataStream.m:
2426         (WebCore::getStreamFormDatas): Rearranged things so it's
2427         possible to get a FormData back out of a form data stream.
2428         (WebCore::formCreate): ditto
2429         (WebCore::formFinalize): ditto
2430         (WebCore::httpBodyFromStream): ditto
2431         * loader/mac/ImageDocumentMac.mm:
2432         (WebCore::finishImageLoad): s/response/platformResponse/
2433         * loader/mac/LoaderFunctionsMac.mm:
2434         (WebCore::CheckCacheObjectStatus): ditto
2435         (WebCore::CachedResource::setPlatformResponse): ditto
2436         * loader/mac/SubresourceLoaderMac.mm:
2437         (WebCore::SubresourceLoader::willSendRequest): send redirect
2438         to client appropriately
2439         * platform/network/ResourceHandle.h:
2440         * platform/network/ResourceHandleClient.h:
2441         (WebCore::ResourceHandleClient::willSendRequest): new entry
2442         point for SubresourceLoader, dispatch to client.
2443         * platform/network/ResourceRequest.h:
2444         (WebCore::ResourceRequest::allowHTTPCookies): implemented
2445         (WebCore::ResourceRequest::setAllowHTTPCookies): ditto
2446         * platform/network/ResourceResponse.h:
2447         (WebCore::ResourceResponse::ResourceResponse): initialize expiration
2448         date(!)
2449         * platform/network/cf/FormDataStreamCFNet.cpp: Added.
2450         (WebCore::getStreamFormDatas): Added this, ported from NSURL version.
2451         (WebCore::openNextStream): ditto
2452         (WebCore::formCreate): ditto
2453         (WebCore::formFinalize): ditto
2454         (WebCore::formCanRead): ditto
2455         (WebCore::formEventCallback): ditto
2456         (WebCore::setHTTPBody): ditto
2457         (WebCore::httpBodyFromStream): ditto
2458         * platform/network/cf/FormDataStreamCFNet.h: Added.
2459         * platform/network/cf/ResourceHandleCFNet.cpp:
2460         (WebCore::willSendRequest): implemented
2461         (WebCore::ResourceHandle::start): use new ResourceRequest stuff
2462         * platform/network/cf/ResourceResponseCFNet.cpp:
2463         (WebCore::getResourceResponse): do nothing for a null response
2464         * platform/network/mac/ResourceHandleMac.mm:
2465         (WebCore::ResourceHandle::willSendRequest): Implemented; dispatch to client.
2466         * platform/network/mac/ResourceRequestMac.h: Added.
2467         * platform/network/mac/ResourceRequestMac.mm: Added.
2468         (WebCore::getResourceRequest): Added way to convert an NSURLRequest
2469         to a ResourceRequest.
2470         (WebCore::nsURLRequest): Opposite of the above.
2471         * platform/network/cf/ResourceRequestCFNet.h: Added.
2472         * platform/network/cf/ResourceRequestCFNet.cpp: Added.
2473         (WebCore::getResourceRequest): Added way to convert an CFURLRequest
2474         to a ResourceRequest.
2475         (WebCore::cfURLRequest): Opposite of the above.
2476         * xml/xmlhttprequest.cpp:
2477         (WebCore::XMLHttpRequest::willSendRequest): Renamed from receivedRedirect,
2478         adjusted.
2479         * xml/xmlhttprequest.h:
2480
2481 2006-11-04  Darin Adler  <darin@apple.com>
2482
2483         Change suggested by Mitz.
2484
2485         - fix http://bugs.webkit.org/show_bug.cgi?id=11514
2486           REGRESSION (r17438): Repro crash when opening a web archive
2487
2488         * bridge/mac/WebCorePageState.mm:
2489         (-[WebCorePageState dealloc]): Add null check.
2490         (-[WebCorePageState finalize]): Ditto.
2491
2492 2006-11-04  Bertrand Guiheneuf <guiheneuf@gmail.com>
2493
2494         Reviewed by Maciej, tweaked and landed by Alexey (using a patch by Don Gibson).
2495
2496         http://bugs.webkit.org/show_bug.cgi?id=11433
2497         Fixes to get WebKit to run on Windows; implemented AffineTransformCairo.
2498
2499         * WebCore.vcproj/WebCore/WebCore.vcproj:
2500         Added platform/graphics platform/network and platform/network/win to headers search paths
2501         Created platform/graphics and platform/network filters in hierarchy
2502         Moved GraphicsContext and GraphicsTypes to their respective filters
2503         Added EditorClient.h
2504         Added FrameLoader* files in loader/
2505         Added HitTest* files in rendering/
2506         Added Editor.* files in editing/
2507         Added DeleteButton.* and DeleteButtonController.* in editing/
2508
2509         * bridge/win/ChromeClientWin.h: Added.
2510         (WebCore::ChromeClientWin::~ChromeClientWin):
2511         * bridge/win/EditorClientWin.h: Added.
2512         (WebCore::EditorClientWin::~EditorClientWin):
2513
2514         * bridge/win/FrameWin.cpp:
2515         (WebCore::FrameWin::FrameWin):
2516         (WebCore::FrameWin::urlSelected):
2517         (WebCore::FrameWin::submitForm):
2518         (WebCore::FrameWin::createNewWindow):
2519         * bridge/win/FrameWin.h:
2520         Added EditorClient parameter to constructor
2521         Replace usage of FrameLoadRequest::m_request with FrameLoadRequest::resourceRequest()
2522         Removed openURL() and openURLRequest from class definition
2523
2524         * bridge/win/PageWin.cpp:
2525         * platform/AffineTransform.h:
2526         * platform/cairo/AffineTransformCairo.cpp: Added.
2527         (WebCore::AffineTransform::AffineTransform):
2528         (WebCore::AffineTransform::setMatrix):
2529         (WebCore::AffineTransform::map):
2530         (WebCore::AffineTransform::mapRect):
2531         (WebCore::AffineTransform::isIdentity):
2532         (WebCore::AffineTransform::m11):
2533         (WebCore::AffineTransform::m12):
2534         (WebCore::AffineTransform::m21):
2535         (WebCore::AffineTransform::m22):
2536         (WebCore::AffineTransform::dx):
2537         (WebCore::AffineTransform::dy):
2538         (WebCore::AffineTransform::reset):
2539         (WebCore::AffineTransform::scale):
2540         (WebCore::AffineTransform::rotate):
2541         (WebCore::AffineTransform::translate):
2542         (WebCore::AffineTransform::shear):
2543         (WebCore::AffineTransform::det):
2544         (WebCore::AffineTransform::invert):
2545         (WebCore::AffineTransform::operator cairo_matrix_t):
2546         (WebCore::AffineTransform::operator== ):
2547         (WebCore::AffineTransform::operator*= ):
2548         (WebCore::AffineTransform::operator* ):
2549         * platform/cairo/GraphicsContextCairo.cpp:
2550         (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
2551         * platform/network/win/ResourceHandleWin.cpp:
2552         (WebCore::ResourceHandle::onHandleCreated):
2553         (WebCore::ResourceHandle::start):
2554         (WebCore::ResourceHandle::fileLoadTimer):
2555         (WebCore::ResourceHandle::cancel):
2556         * platform/win/TemporaryLinkStubs.cpp:
2557         (WebCore::FrameWin::goBackOrForward):
2558         (WebCore::FrameWin::getHistoryLength):
2559         (WebCore::FrameWin::historyURL):
2560         (WebCore::ServeSynchronousRequest):
2561         (WebCore::ChromeClientWin::canRunModal):
2562         (WebCore::ChromeClientWin::runModal):
2563         (WebCore::EditorClientWin::shouldDeleteRange):
2564         (WebCore::EditorClientWin::shouldShowDeleteInterface):
2565         (WebCore::EditorClientWin::isContinuousSpellCheckingEnabled):
2566         (WebCore::EditorClientWin::isGrammarCheckingEnabled):
2567         (WebCore::EditorClientWin::spellCheckerDocumentTag):
2568         (WebCore::Path::transform):
2569         (WebCore::PopupMenu::updateFromElement):
2570         (WebCore::ResourceLoader::loadsBlocked):
2571         (WebCore::systemBeep):
2572         * rendering/RenderThemeWin.cpp:
2573         (WebCore::RenderThemeWin::paintButton):
2574         (WebCore::RenderThemeWin::paintTextField):
2575
2576 2006-11-04  Alexey Proskuryakov  <ap@nypop.com>
2577
2578         Reviewed by Maciej.
2579
2580         http://bugs.webkit.org/show_bug.cgi?id=11448
2581         &lang; and &rang; entities are mapped to the incorrect Unicode codepoint
2582
2583         * html/HTMLEntityNames.gperf: Use canonical Unicode equivalents for these characters.
2584
2585 2006-11-03  Mark Rowe  <bdash@webkit.org>
2586
2587         Reviewed by Oliver.
2588
2589         Update Windows and Qt project files for file removals in r17585.
2590
2591         * CMakeLists.txt:
2592         * WebCore.vcproj/WebCore/WebCore.vcproj:
2593
2594 2006-11-03  Zack Rusin  <zack@kde.org>
2595
2596         Reviewed by Maciej.
2597
2598         The patch fixes text field drawing on the Qt platform.
2599
2600         * platform/qt/RenderThemeQt.cpp:
2601         (WebCore::RenderThemeQt::paintTextField): Use the style to correctly
2602         render the text field
2603
2604 2006-11-03  Oliver Hunt  <oliver@apple.com>
2605
2606         Reviewed by Tim.
2607
2608         Correct incorrect call to SetCursor
2609
2610         * rendering/RenderFrameSet.cpp:
2611         (WebCore::RenderFrameSet::userResize):
2612
2613 2006-11-03  Adele Peterson  <adele@apple.com>
2614
2615         Reviewed by Oliver.
2616
2617         Removed DeprecatedRenderSelect and ListBox classes.
2618
2619         * WebCore.xcodeproj/project.pbxproj:
2620         * css/html4.css:
2621         * html/HTMLOptionElement.h:
2622         * html/HTMLSelectElement.cpp:
2623         (WebCore::HTMLSelectElement::recalcStyle):
2624         (WebCore::HTMLSelectElement::isKeyboardFocusable):
2625         (WebCore::HTMLSelectElement::isMouseFocusable):
2626         (WebCore::HTMLSelectElement::createRenderer):
2627         (WebCore::HTMLSelectElement::setRecalcListItems):
2628         (WebCore::HTMLSelectElement::notifyOptionSelected):
2629         (WebCore::HTMLSelectElement::defaultEventHandler):
2630         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2631         (WebCore::HTMLSelectElement::updateListBoxSelection):
2632         * html/HTMLSelectElement.h:
2633         * platform/ListBox.h: Removed.
2634         * platform/mac/FontCacheMac.mm:
2635         * platform/mac/ListBoxMac.mm: Removed.
2636         * platform/win/TemporaryLinkStubs.cpp:
2637         * rendering/DeprecatedRenderSelect.cpp: Removed.
2638         * rendering/DeprecatedRenderSelect.h: Removed.
2639
2640 2006-11-03  Maciej Stachowiak  <mjs@apple.com>
2641
2642         Not reviewed, fix for accidental commit.
2643
2644         - rolled back more of the accidentall commit that I forgot.
2645
2646         * platform/network/mac/ResourceRequestMac.h: Removed.
2647         * platform/network/mac/ResourceRequestMac.mm: Removed.
2648
2649 2006-11-03  Maciej Stachowiak  <mjs@apple.com>
2650
2651         Not reviewed, fix for accidental commit.
2652
2653         - roll back some network changes accidentally committed with a previous patch.
2654
2655         * WebCore.xcodeproj/project.pbxproj:
2656         * bridge/mac/WebCoreFrameBridge.mm:
2657         (-[WebCoreFrameBridge getData:andResponse:forURL:]):
2658         (-[WebCoreFrameBridge getAllResourceDatas:andResponses:]):
2659         * loader/CachedCSSStyleSheet.cpp:
2660         (WebCore::CachedCSSStyleSheet::checkNotify):
2661         * loader/CachedImage.cpp:
2662         (WebCore::CachedImage::createImage):
2663         * loader/CachedResource.cpp:
2664         (WebCore::CachedResource::CachedResource):
2665         (WebCore::CachedResource::~CachedResource):
2666         (WebCore::CachedResource::setExpireDate):
2667         (WebCore::CachedResource::isExpired):
2668         * loader/CachedResource.h:
2669         (WebCore::CachedResource::response):
2670         * loader/LoaderFunctions.h:
2671         * loader/loader.cpp:
2672         (WebCore::Loader::receivedResponse):
2673         (WebCore::Loader::didReceivedResponse):
2674         * loader/loader.h:
2675         * loader/mac/FormDataStream.h:
2676         * loader/mac/FormDataStream.m:
2677         (WebCore::formCreate):
2678         (WebCore::formFinalize):
2679         * loader/mac/ImageDocumentMac.mm:
2680         (WebCore::finishImageLoad):
2681         * loader/mac/LoaderFunctionsMac.mm:
2682         (WebCore::CheckCacheObjectStatus):
2683         (WebCore::CachedResource::setResponse):
2684         * loader/mac/SubresourceLoaderMac.mm:
2685         (WebCore::SubresourceLoader::willSendRequest):
2686         * platform/network/ResourceHandle.h:
2687         * platform/network/ResourceHandleClient.h:
2688         (WebCore::ResourceHandleClient::receivedRedirect):
2689         * platform/network/ResourceRequest.h:
2690         * platform/network/ResourceResponse.h:
2691         (WebCore::ResourceResponse::ResourceResponse):
2692         * platform/network/mac/ResourceHandleMac.mm:
2693         (WebCore::ResourceHandle::redirectedToURL):
2694         * xml/xmlhttprequest.cpp:
2695         (WebCore::XMLHttpRequest::receivedRedirect):
2696         * xml/xmlhttprequest.h:
2697
2698 2006-11-03  Anders Carlsson  <acarlsson@apple.com>
2699
2700         Rubber-stamped by Oliver.
2701
2702         Remove these, they have been merged with SVGRenderTreeAsText.
2703         
2704         * rendering/SVGRenderAsText.cpp: Removed.
2705         * rendering/SVGRenderAsText.h: Removed.
2706
2707 2006-11-03  Anders Carlsson  <acarlsson@apple.com>
2708
2709         Build fix.
2710         
2711         * platform/network/cf/ResourceHandleCFNet.cpp:
2712         (WebCore::willSendRequest):
2713
2714 2006-11-02  Geoffrey Garen  <ggaren@apple.com>
2715
2716         Reviewed by Darin, Beth.
2717         
2718         First cut at factoring Page's UIDelegate-related functions into Chrome
2719         and ChromeClient.
2720
2721         Layout tests pass.
2722         
2723         * bridge/mac/PageMac.mm: Removed platform-specific constructor, added
2724         setBridge method to replace it.
2725         (WebCore::Page::setBridge):
2726
2727         * bridge/mac/WebCorePageBridge.h: Simplified some things based on the fact
2728         that WebCorePageBridge.h doesn't need to be included by ObjC-only files,
2729         and, now that it uses PassRefPtr, can't be.
2730         
2731         * page/Chrome.cpp: Added. Code copied and converted to c++ from WebCorePageBridge.mm.
2732
2733         * page/Page.h:
2734         (WebCore::Page::dragCaretController): Made this function non-const so that
2735         m_dragCaretController doesn't have to be mutable.
2736
2737 2006-11-03  Alexey Proskuryakov  <ap@nypop.com>
2738
2739         Reviewed by Adele.
2740
2741         http://bugs.webkit.org/show_bug.cgi?id=7323
2742         REGRESSION (10.4.4): ondrag* events don't fire on page in a frame
2743
2744         * bridge/mac/FrameMac.h: Moved drag source information to a static variable
2745         in FrameMac.mm. There can be only one drag active at any moment, and having 
2746         this information here was making sharing this information between 
2747         subframes hard.
2748
2749         * bridge/mac/FrameMac.mm:
2750         (WebCore::FrameMac::FrameMac): Initialize sharedDragInfo.
2751         (WebCore::FrameMac::freeClipboard):
2752         (WebCore::FrameMac::dragHysteresisExceeded):
2753         (WebCore::FrameMac::handleMouseMoveEvent):
2754         (WebCore::FrameMac::handleMouseReleaseEvent):
2755         (WebCore::FrameMac::mouseDown):
2756         (WebCore::FrameMac::dragSourceMovedTo):
2757         (WebCore::FrameMac::dragSourceEndedAt):
2758         (WebCore::FrameMac::dispatchDragSrcEvent):
2759         Access drag source info via sharedDragInfo - this fixes drag source even dispatching.
2760         Also removed some old code that was forwarding mouse events to subviews to make 
2761         HTML editing work in subframes.
2762
2763         * page/FrameView.cpp:
2764         (WebCore::FrameView::updateDragAndDrop):
2765         (WebCore::FrameView::cancelDragAndDrop):
2766         (WebCore::FrameView::performDragAndDrop):
2767         Forward events to subframes for dispatching - this fixes drag target events.
2768
2769 2006-11-03  Zack Rusin  <zack@kde.org>
2770
2771         Reviewed by Tim.
2772
2773         Fixing compile.
2774
2775         * platform/qt/LoaderFunctionsQt.cpp:
2776         (WebCore::CachedResource::setPlatformResponse): Renamed from setResponse
2777
2778 2006-11-01  Zack Rusin  <zack@kde.org>
2779
2780         Reviewed by Maciej.
2781
2782         Moving the word/sentence seperators into a file of their own
2783         and implementing findWordBoundary.
2784
2785         * CMakeLists.txt:
2786         * platform/qt/TemporaryLinkStubs.cpp:
2787         * platform/qt/TextBoundaries.cpp: Added.
2788         (WebCore::findNextSentenceFromIndex):
2789         (WebCore::findSentenceBoundary):
2790         (WebCore::findNextWordFromIndex):
2791         (WebCore::findWordBoundary):
2792
2793 2006-11-03  Zack Rusin  <zack@kde.org>
2794
2795         Reviewed by Maciej.
2796
2797         Compile on both KDE and Qt platforms
2798
2799         * CMakeLists.txt: add zlib explicitly
2800         * platform/network/qt/ResourceHandleManager.cpp:
2801         (WebCore::ResourceHandleManager::self):
2802         (WebCore::QtJob::QtJob):
2803         (WebCore::QtJob::timerEvent): Integrate both implementations
2804         so that moc can parse it
2805         (WebCore::ResourceHandleManager::deliverJobData):
2806         (WebCore::ResourceHandleManager::remove):
2807         * platform/network/qt/ResourceHandleManager.h:
2808
2809 2006-11-03  Maciej Stachowiak  <mjs@apple.com>
2810
2811         No review, suggested by Mitz.
2812
2813         - fix a #if to be #ifdef
2814
2815         * platform/graphics/svg/cg/SVGResourceImageCg.cpp:
2816
2817 2006-11-03  Zack Rusin  <zack@kde.org>
2818
2819         Reviewed and landed by Maciej.
2820         
2821         Compile on the Qt platform.
2822
2823         * ksvg2/misc/KCanvasRenderingStyle.h:
2824         * platform/qt/RenderThemeQt.cpp:
2825         (WebCore::RenderThemeQt::getStylePainterAndWidgetFromPaintInfo):
2826
2827 2006-11-03  Zack Rusin  <zack@kde.org>
2828
2829         Reviewed by Hyatt. Landed by Maciej.
2830
2831         Adding setPlatformPen/setPlatformFont/setPlatformFillColor
2832         to graphics context to be able to set consistant state
2833         on the platform specific painter without having to change
2834         fill/stroke/font on every operation. This fixes color/stroke/fill
2835         and font handling in the Qt port.
2836
2837         * platform/graphics/GraphicsContext.cpp:
2838         (WebCore::GraphicsContext::setFont):
2839         (WebCore::GraphicsContext::setPen):
2840         (WebCore::GraphicsContext::setFillColor):
2841         (WebCore::GraphicsContext::setPlatformPen):
2842         (WebCore::GraphicsContext::setPlatformFillColor):
2843         (WebCore::GraphicsContext::setPlatformFont):
2844         * platform/graphics/GraphicsContext.h:
2845         * platform/qt/GraphicsContextQt.cpp:
2846         (WebCore::toQtCompositionMode):
2847         (WebCore::toQtLineCap):
2848         (WebCore::toQtLineJoin):
2849         (WebCore::toQPenStyle):
2850         (WebCore::penToQPen):
2851         (WebCore::TransparencyLayer::TransparencyLayer):
2852         (WebCore::GraphicsContext::addRoundedRectClip):
2853         (WebCore::GraphicsContext::setPlatformFont):
2854         (WebCore::GraphicsContext::setPlatformPen):
2855         (WebCore::GraphicsContext::setPlatformFillColor):
2856         * platform/qt/ScrollViewCanvasQt.cpp:
2857         (WebCore::ScrollViewCanvasQt::ScrollViewCanvasQt):
2858         (WebCore::ScrollViewCanvasQt::paintEvent):
2859         (WebCore::ScrollViewCanvasQt::handleKeyEvent):
2860         * platform/qt/ScrollViewCanvasQt.h:
2861
2862 2006-11-02  Adele Peterson  <adele@apple.com>
2863
2864         Reviewed by Anders.
2865
2866         - Fix for http://bugs.webkit.org/show_bug.cgi?id=9581
2867         REGRESSION: The new NativeTextArea scrolls to the top when the control is unfocused.
2868
2869         Test: fast/forms/textarea-no-scroll-on-blur.html
2870
2871         * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::forwardEvent):
2872           On blur, only scroll back to the start for text fields.
2873
2874 2006-11-02  Anders Carlsson  <acarlsson@apple.com>
2875
2876         Another build fix.
2877         
2878         * rendering/RenderFileUploadControl.cpp:
2879         (WebCore::RenderFileUploadControl::paintObject):
2880
2881 2006-11-02  Anders Carlsson  <acarlsson@apple.com>
2882
2883         Build fix.
2884         
2885         * page/FramePrivate.h:
2886         (WebCore::FramePrivate::FramePrivate):
2887
2888 2006-11-02  Kevin Ollivier <kevino@theolliviers.com>
2889
2890         Reviewed by Geoff, landed by Anders.
2891         
2892         Fix dependency problems caused when running move-js-headers.sh
2893         
2894         * move-js-headers.sh:
2895         Use cp -p instead of just cp so that the modification time
2896         of the original files are used.
2897
2898 2006-11-02  Adam Roben  <aroben@apple.com>
2899
2900         Reviewed by Tim H, landed by Anders.
2901
2902         Fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=10840
2903         REGRESSION: Shadow of file upload button is clipped
2904
2905         * rendering/RenderFileUploadControl.cpp:
2906         (WebCore::RenderFileUploadControl::paintObject): Add 2px to the clip
2907         height to keep from clipping in the shadow
2908
2909 2006-11-02  Eike Preuss  <mail@eikepreuss.de>
2910
2911         Reviewed by Maciej, landed by Anders.
2912
2913         * platform/qt/ScrollViewQt.cpp: Fix translation of coordinates between
2914         content and window. ScrollViewQt already receives correct content
2915         coordinates from QScrollArea.
2916         (WebCore::ScrollView::contentsToWindow):
2917         (WebCore::ScrollView::windowToContents):
2918
2919 2006-11-02  Simon Hausmann  <hausmann@kde.org>
2920
2921         Reviewed by Maciej, landed by Anders
2922
2923         * CMakeLists.txt: Make linkage against KDE libraries conditional
2924         * platform/network/qt/ResourceHandleManager.cpp: Added a simple
2925           Qt base resource handler that supports only requests to the
2926           local filesystem. Used when compiling without KDE support.
2927           ResourceHandleManager.cpp/h are to be split up into ResourceHandleManagerKDE
2928           and ResourceHandleManagerQt in the future, as well as QtJob.cpp/h.
2929         (WebCore::QtJob::QtJob):
2930         (WebCore::QtJob::timerEvent):
2931         (WebCore::ResourceHandleManager::ResourceHandleManager):
2932         (WebCore::ResourceHandleManager::~ResourceHandleManager):
2933         (WebCore::ResourceHandleManager::self):
2934         (WebCore::ResourceHandleManager::remove):
2935         (WebCore::ResourceHandleManager::add):
2936         (WebCore::ResourceHandleManager::cancel):
2937         (WebCore::ResourceHandleManager::deliverJobData):
2938         * platform/network/qt/ResourceHandleManager.h:
2939         * platform/qt/FrameQtClient.cpp:
2940         (WebCore::FrameQtClientDefault::runJavaScriptAlert):
2941         (WebCore::FrameQtClientDefault::runJavaScriptConfirm):
2942         (WebCore::FrameQtClientDefault::runJavaScriptPrompt):
2943         * platform/qt/LoaderFunctionsQt.cpp: Use the Qt messagebox and
2944           input dialog functions when compiling without KDE support
2945         (WebCore::ServeSynchronousRequest):
2946
2947 2006-11-02  David Carson  <dacarson@gmail.com>
2948
2949         Reviewed by Geoff, landed by Anders.
2950
2951         Fix for: http://bugs.webkit.org/show_bug.cgi?id=11471
2952         Initializing variable in constructor.
2953
2954         * page/FramePrivate.h:
2955         (WebCore::FramePrivate::FramePrivate):
2956
2957 2006-11-02  Anders Carlsson  <acarlsson@apple.com>
2958
2959         Reviewed by Geoff.
2960
2961         Use CFMutableURLRequestRef instead of CFHTTPMessageRef since not all URL requests are http requests.
2962         
2963         * platform/network/cf/ResourceHandleCFNet.cpp:
2964         (WebCore::addHeadersFromHashMap):
2965         Don't set all headers at once since that clears any previous headers set.
2966         
2967         (WebCore::ResourceHandle::start):
2968
2969 2006-11-02  Adele Peterson  <adele@apple.com>
2970
2971         Reviewed by Mitz and Geoff.
2972
2973         - Fix for:
2974         <rdar://problem/4650271> REGRESSION(NativeTextArea): Textareas don't get scrollbars when text gets too big for content area (10105)
2975         <rdar://problem/4650813> REGRESSION(tiger-leopard): typing in a textarea in Safari is extremely slow (sample shows focus ring drawing)
2976         <rdar://problem/4658779> REGRESSION: Text selection is weird in textareas in Trac wiki editing pages
2977
2978         Test: fast/forms/textarea-scrollbar.html
2979
2980         To avoid some of our flexbox bugs for textareas, we're moving the text controls back to RenderBlock.  This should make them
2981         a lot more stable.  In the future, when we've worked out more of the flexbox kinks, we may want to consider moving them back.
2982
2983         * rendering/RenderTextControl.h: Convert text controls back to RenderBlock instead of RenderFlexibleBox.
2984         * rendering/RenderTextControl.cpp: 
2985         (WebCore::RenderTextControl::RenderTextControl):
2986         (WebCore::RenderTextControl::setStyle):
2987         (WebCore::RenderTextControl::createDivStyle):
2988         (WebCore::RenderTextControl::updateFromElement):
2989         (WebCore::RenderTextControl::calcHeight):
2990         (WebCore::RenderTextControl::baselinePosition):
2991         (WebCore::RenderTextControl::nodeAtPoint):
2992         (WebCore::RenderTextControl::layout): Set the inner div's height explicitly before doing a normal layout.
2993         (WebCore::RenderTextControl::scrollWidth):
2994         (WebCore::RenderTextControl::scrollHeight):
2995         (WebCore::RenderTextControl::scrollLeft):
2996         (WebCore::RenderTextControl::scrollTop):
2997
2998         * rendering/RenderObject.cpp: (WebCore::RenderObject::markContainingBlocksForLayout): Make subtree layout optimization work for textareas.
2999
3000 2006-11-02  John Sullivan  <sullivan@apple.com>
3001
3002         Reviewed by Geoff Garen
3003
3004         * editing/Selection.cpp:
3005         (WebCore::Selection::showTreeForThis):
3006         this debugging method now displays start offset and end offset, at Darin's suggestion
3007
3008 2006-11-01  Justin Garcia  <justin.garcia@apple.com>
3009
3010         Reviewed by darin
3011
3012         <rdar://problem/4062865>
3013         Copy/paste of a select element fails to include the options
3014         
3015         * editing/SelectionController.cpp:
3016         (WebCore::SelectionController::modify): Added paragraphBoundary.
3017         * editing/htmlediting.cpp:
3018         (WebCore::canHaveChildrenForEditing): Added checks for input elements
3019         and textareas.  Insertion operations would fail when performed just 
3020         before/after one of these elements b/c the content would be put inside 
3021         the element.
3022         (WebCore::enclosingNodeWithTag): Fixed a problem when calling these in non
3023         editable content, and made the code to stop at an root faster (don't check
3024         isDescendantOf on every iteration).
3025         (WebCore::enclosingNodeOfType): Ditto.
3026         (WebCore::enclosingList): Ditto.
3027         (WebCore::enclosingListChild): Ditto.  Added a FIXME, this function seems
3028         inappropriately named.
3029         * editing/markup.cpp:
3030         (WebCore::startMarkup): Use the text node's value instead of its rendered
3031         content for text nodes inside select elements.  One might also turn off
3032         annotation when createMarkup enters a select element, but createMarkup
3033         is iterative, not recursive, so doing so would be complicated.
3034         (WebCore::createMarkup): Add markup for unrendered nodes if they are 
3035         descendants of a select element.
3036         * editing/visible_units.cpp:
3037         (WebCore::startOfParagraph): Migrate to isBlock/enclosingBlock.  Fixes bug
3038         where various replaced elements can't be copied when they are the only
3039         thing selected.
3040         (WebCore::endOfParagraph): Ditto.
3041
3042 2006-11-01  Oliver Hunt  <oliver@apple.com>
3043
3044         Reviewed by Adam.
3045
3046         Converting more or kcanvas/quartz from Obj-C to C++
3047         Minor SVG updates
3048         compatibility fixes
3049
3050         * WebCore.xcodeproj/project.pbxproj:
3051         * kcanvas/device/KRenderingPaintServer.h:
3052         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.cpp: Added.
3053         (WebCore::KRenderingPaintServerGradientQuartz::updateQuartzGradientCache):
3054         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm: Removed.
3055         * kcanvas/device/quartz/KRenderingPaintServerQuartz.cpp: Added.
3056         * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm: Removed.
3057         * kcanvas/device/quartz/QuartzSupport.h:
3058         * ksvg2/css/SVGCSSStyleSelector.cpp:
3059         * ksvg2/misc/KCanvasRenderingStyle.h:
3060         * ksvg2/scripts/cssmakeprops:
3061         * ksvg2/scripts/cssmakevalues:
3062         * ksvg2/scripts/make_names.pl:
3063         * ksvg2/svg/SVGAnimateColorElement.cpp:
3064         * ksvg2/svg/SVGAnimateTransformElement.cpp:
3065         * ksvg2/svg/SVGAnimationElement.cpp:
3066         * ksvg2/svg/SVGMaskElement.cpp:
3067         * ksvg2/svg/SVGPatternElement.cpp:
3068         * ksvg2/svg/svgpathparser.cpp:
3069         * platform/Path.cpp:
3070         * platform/graphics/svg/SVGResourceImage.h:
3071         * rendering/RenderPath.cpp:
3072         * rendering/SVGRenderAsText.cpp:
3073
3074 2006-11-02  Mitz Pettel  <mitz@webkit.org>
3075
3076         Reviewed by Adele.
3077
3078         - Fix a regression from r17521: painting of and crash caused by tables
3079           with collapsed borders
3080
3081         * rendering/RenderTable.cpp:
3082         (WebCore::RenderTable::paint): Changed 'paintInfo' to 'info'. Prior to
3083         r17521, 'paintInfo' was the local variable. Now 'info' is the local variable
3084         and 'paintInfo' is the parameter, which we were accidently modifying.
3085
3086 2006-11-01  Adele Peterson  <adele@apple.com>
3087
3088         Reviewed by Mitz.
3089
3090         - Fix for http://bugs.webkit.org/show_bug.cgi?id=11277
3091         REGRESSION: Incomplete repaint of overflow areas when deleting
3092
3093         Restrict the repaint rect for overflow blocks after the height has been fully computed.
3094         Also, adjust the repaint rect coordinates for the scroll offset.
3095
3096         * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock):
3097         * rendering/bidi.cpp: (WebCore::RenderBlock::layoutInlineChildren):
3098
3099 2006-11-01  Sam Weinig  <sam.weinig@gmail.com>
3100
3101         Reviewed by Mitz.
3102
3103         Fix for http://bugs.webkit.org/show_bug.cgi?id=11474
3104         Rename the "p" member variable of the PaintInfo struct to "context"
3105
3106         - Renames the 'p' and 'r' member variables of the PaintInfo struct to
3107           'context' and 'rect' respectively.
3108
3109         - Assorted surrounding cleanups.
3110
3111         * rendering/EllipsisBox.cpp:
3112         (WebCore::EllipsisBox::paint):
3113         * rendering/EllipsisBox.h:
3114         * rendering/InlineBox.cpp:
3115         (WebCore::InlineBox::paint):
3116         * rendering/InlineFlowBox.cpp:
3117         (WebCore::InlineFlowBox::paint):
3118         (WebCore::InlineFlowBox::paintBackground):
3119         (WebCore::InlineFlowBox::paintBackgroundAndBorder):
3120         (WebCore::InlineFlowBox::paintDecorations):
3121         * rendering/InlineFlowBox.h:
3122         * rendering/InlineRunBox.h:
3123         * rendering/InlineTextBox.cpp:
3124         (WebCore::InlineTextBox::paint):
3125         * rendering/InlineTextBox.h:
3126         * rendering/RenderBlock.cpp:
3127         (WebCore::RenderBlock::paint):
3128         (WebCore::RenderBlock::paintChildren):
3129         (WebCore::RenderBlock::paintCaret):
3130         (WebCore::RenderBlock::paintObject):
3131         (WebCore::RenderBlock::paintFloats):
3132         (WebCore::RenderBlock::paintEllipsisBoxes):
3133         (WebCore::RenderBlock::paintSelection):
3134         (WebCore::RenderBlock::fillSelectionGaps):
3135         (WebCore::RenderBlock::fillInlineSelectionGaps):
3136         (WebCore::RenderBlock::fillBlockSelectionGaps):
3137         (WebCore::RenderBlock::fillHorizontalSelectionGap):
3138         (WebCore::RenderBlock::fillVerticalSelectionGap):
3139         (WebCore::RenderBlock::fillLeftSelectionGap):
3140         (WebCore::RenderBlock::fillRightSelectionGap):
3141         * rendering/RenderBox.cpp:
3142         (WebCore::RenderBox::paint):
3143         (WebCore::RenderBox::paintRootBoxDecorations):
3144         (WebCore::RenderBox::paintBoxDecorations):
3145         * rendering/RenderBox.h:
3146         * rendering/RenderButton.cpp:
3147         (WebCore::RenderButton::paintObject):
3148         * rendering/RenderFieldset.cpp:
3149         (WebCore::RenderFieldset::paintBoxDecorations):
3150         * rendering/RenderFileUploadControl.cpp:
3151         (WebCore::RenderFileUploadControl::paintObject):
3152         * rendering/RenderFlow.cpp:
3153         (WebCore::RenderFlow::continuationBefore):
3154         (WebCore::RenderFlow::addChildWithContinuation):
3155         (WebCore::RenderFlow::addChild):
3156         (WebCore::RenderFlow::attachLineBox):
3157         (WebCore::RenderFlow::destroy):
3158         (WebCore::RenderFlow::dirtyLinesFromChangedChild):
3159         (WebCore::RenderFlow::dirtyLineBoxes):
3160         (WebCore::RenderFlow::createInlineBox):
3161         (WebCore::RenderFlow::paintLines):
3162         (WebCore::RenderFlow::getAbsoluteRepaintRect):
3163         (WebCore::RenderFlow::lowestPosition):
3164         (WebCore::RenderFlow::rightmostPosition):
3165         (WebCore::RenderFlow::leftmostPosition):
3166         (WebCore::RenderFlow::caretRect):
3167         (WebCore::RenderFlow::addFocusRingRects):
3168         (WebCore::RenderFlow::paintOutline):
3169         (WebCore::RenderFlow::paintOutlineForLine):
3170         * rendering/RenderForeignObject.cpp:
3171         (WebCore::RenderForeignObject::paint):
3172         * rendering/RenderHTMLCanvas.cpp:
3173         (WebCore::RenderHTMLCanvas::paint):
3174         * rendering/RenderImage.cpp:
3175         (WebCore::RenderImage::paint):
3176         * rendering/RenderLayer.cpp:
3177         (WebCore::RenderLayer::paintLayer):
3178         * rendering/RenderListBox.cpp:
3179         (WebCore::RenderListBox::paintObject):
3180         (WebCore::RenderListBox::paintScrollbar):
3181         (WebCore::RenderListBox::paintItemForeground):
3182         (WebCore::RenderListBox::paintItemBackground):
3183         * rendering/RenderListMarker.cpp:
3184         (WebCore::RenderListMarker::paint):
3185         * rendering/RenderMenuList.cpp:
3186         (WebCore::RenderMenuList::paintObject):
3187         * rendering/RenderObject.cpp:
3188         (WebCore::RenderObject::paint):
3189         * rendering/RenderObject.h:
3190         (WebCore::RenderObject::PaintInfo::PaintInfo):
3191         (WebCore::RenderObject::paintBoxDecorations):
3192         (WebCore::RenderObject::paintingRootForChildren):
3193         (WebCore::RenderObject::shouldPaintWithinRoot):
3194         (WebCore::RenderObject::printBoxDecorations):
3195         * rendering/RenderPath.cpp:
3196         (WebCore::RenderPath::paint):
3197         * rendering/RenderReplaced.cpp:
3198         (WebCore::RenderReplaced::shouldPaint):
3199         * rendering/RenderSVGContainer.cpp:
3200         (WebCore::RenderSVGContainer::paint):
3201         * rendering/RenderSVGContainer.h:
3202         * rendering/RenderSVGImage.cpp:
3203         (WebCore::RenderSVGImage::paint):
3204         * rendering/RenderSVGText.cpp:
3205         (WebCore::RenderSVGText::paint):
3206         * rendering/RenderSVGText.h:
3207         (WebCore::RenderSVGText::renderName):
3208         * rendering/RenderTable.cpp:
3209         (WebCore::RenderTable::paint):
3210         (WebCore::RenderTable::paintBoxDecorations):
3211         * rendering/RenderTable.h:
3212         * rendering/RenderTableCell.cpp:
3213         (WebCore::RenderTableCell::paint):
3214         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
3215         (WebCore::RenderTableCell::paintBoxDecorations):
3216         * rendering/RenderTableCell.h:
3217         * rendering/RenderTableRow.cpp:
3218         (WebCore::RenderTableRow::paint):
3219         * rendering/RenderTableRow.h:
3220         * rendering/RenderTableSection.cpp:
3221         (WebCore::RenderTableSection::paint):
3222         * rendering/RenderTableSection.h:
3223         (WebCore::RenderTableSection::getBaseline):
3224         (WebCore::RenderTableSection::setNeedCellRecalc):
3225         * rendering/RenderText.h:
3226         (WebCore::RenderText::renderName):
3227         (WebCore::RenderText::paint):
3228         (WebCore::RenderText::element):
3229         * rendering/RenderTheme.cpp:
3230         (WebCore::RenderTheme::paint):
3231         (WebCore::RenderTheme::paintBorderOnly):
3232         (WebCore::RenderTheme::paintDecorations):
3233         * rendering/RenderTheme.h:
3234         (WebCore::RenderTheme::RenderTheme):
3235         (WebCore::RenderTheme::~RenderTheme):
3236         (WebCore::RenderTheme::controlSupportsTints):
3237         (WebCore::RenderTheme::adjustRepaintRect):
3238         (WebCore::RenderTheme::themeChanged):
3239         (WebCore::RenderTheme::supportsHover):
3240         (WebCore::RenderTheme::paintCheckbox):
3241         (WebCore::RenderTheme::setCheckboxSize):
3242         (WebCore::RenderTheme::paintRadio):
3243         (WebCore::RenderTheme::setRadioSize):
3244         (WebCore::RenderTheme::paintButton):
3245         (WebCore::RenderTheme::setButtonSize):
3246         (WebCore::RenderTheme::paintTextField):
3247         (WebCore::RenderTheme::paintTextArea):
3248         (WebCore::RenderTheme::paintMenuList):
3249         (WebCore::RenderTheme::paintMenuListButton):
3250         * rendering/RenderThemeMac.mm:
3251         (WebCore::RenderThemeMac::paintCheckbox):
3252         (WebCore::RenderThemeMac::paintRadio):
3253         (WebCore::RenderThemeMac::paintButton):
3254         (WebCore::RenderThemeMac::paintTextField):
3255         (WebCore::RenderThemeMac::paintTextArea):
3256         (WebCore::RenderThemeMac::paintMenuList):
3257         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
3258         (WebCore::RenderThemeMac::paintMenuListButton):
3259         * rendering/RenderView.cpp:
3260         (WebCore::RenderView::paint):
3261         (WebCore::RenderView::paintBoxDecorations):
3262         * rendering/RenderView.h:
3263         * rendering/RenderWidget.cpp:
3264         (WebCore::RenderWidget::paint):
3265         * rendering/RenderWidget.h:
3266         (WebCore::RenderWidget::isWidget):
3267         * rendering/RootInlineBox.cpp:
3268         (WebCore::RootInlineBox::paintEllipsisBox):
3269         (WebCore::RootInlineBox::paintCustomHighlight):
3270         (WebCore::RootInlineBox::paint):
3271         (WebCore::RootInlineBox::fillLineSelectionGap):
3272         * rendering/RootInlineBox.h:
3273         * rendering/SVGInlineFlowBox.cpp:
3274         (WebCore::paintSVGInlineFlow):
3275
3276 2006-11-01  Anders Carlsson  <acarlsson@apple.com>
3277
3278         Reviewed by Oliver, Brady.
3279
3280         * platform/network/ResourceResponse.h:
3281         (WebCore::ResourceResponse::setLastModifiedDate):
3282         (WebCore::ResourceResponse::lastModifiedDate):
3283         Add getters and setters for last modified dadte.
3284         
3285         * platform/network/cf/ResourceResponseCFNet.cpp:
3286         (WebCore::getResourceResponse):
3287         Fetch the last modified date. Add correct offset to expired date.
3288
3289 2006-11-01  David Kilzer  <ddkilzer@kilzer.net>
3290
3291         Reviewed by Mitz.
3292
3293         Added missing "break;" statement in switch statement from r17493.
3294
3295         Bug 11442: [CSS 3] support for cursor: all-scroll
3296         http://bugs.webkit.org/show_bug.cgi?id=11442
3297
3298         * css/CSSComputedStyleDeclaration.cpp:
3299         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3300
3301 2006-10-31  Mitz Pettel  <mitz@webkit.org>
3302
3303         Reviewed by Maciej.
3304
3305         - fix image dragging
3306
3307         This is covered by editing/selection/drag-to-contenteditable-iframe.html
3308
3309         * rendering/HitTestResult.cpp:
3310         (WebCore::HitTestResult::altDisplayString): Changed imageTag to imgTag, for
3311         HTML IMG elements.
3312         (WebCore::HitTestResult::absoluteImageURL): Ditto.
3313
3314 2006-10-31  Beth Dakin  <bdakin@apple.com>
3315
3316         Reviewed by Maciej.
3317
3318         This adds the back-end of the remaining WebElementDictionary 
3319         functions into HitTestResult.
3320
3321         * WebCore.exp:
3322         * rendering/HitTestResult.cpp:
3323         (WebCore::HitTestResult::title):
3324         (WebCore::displayString): This is nearly identical to the 
3325         displayString() defined in DOMInternal.mm except that it returns a 
3326         String instead of an NSString. The old code path used the 
3327         DOMInternal method, so I made a new one here for the new code path.
3328         (WebCore::HitTestResult::altDisplayString):
3329         (WebCore::HitTestResult::image):
3330         (WebCore::HitTestResult::absoluteImageURL):
3331         (WebCore::HitTestResult::absoluteLinkURL):
3332         (WebCore::HitTestResult::titleDisplayString):
3333         (WebCore::HitTestResult::textContent):
3334         * rendering/HitTestResult.h:
3335
3336 2006-10-31  John Sullivan  <sullivan@apple.com>
3337
3338         * bridge/mac/FrameMac.mm:
3339         (WebCore::FrameMac::markMisspellings):
3340         Tiger build fix: added an #ifndef BUILDING_ON_TIGER where one was needed.
3341
3342 2006-10-31  John Sullivan  <sullivan@apple.com>
3343
3344         Reviewed by Maciej
3345         
3346         - fixed <rdar://problem/4804627> ToolTips do not appear for grammar suggestions
3347         
3348         The foundation of this was in my last checkin. This checkin is all about displaying
3349         the correct string in the toolTip.
3350
3351         * dom/DocumentMarker.h:
3352         New description field in this struct.
3353
3354         * bridge/mac/FrameMac.mm:
3355         (WebCore::FrameMac::advanceToNextMisspelling):
3356         When adding a grammar marker, supply the appropriate description. Also, added a comment
3357         about the remaining work to make grammar checking return sensible answers.
3358         (WebCore::FrameMac::markMisspellings):
3359         ditto (yes, still needs some refactoring to minimize duplicated code)
3360         
3361         * dom/Document.h:
3362         * dom/Document.cpp:
3363         (WebCore::Document::addMarker):
3364         Now takes an optional description string
3365         (WebCore::Document::markerContainingPoint):
3366         New function, returns a pointer to the (first) marker of the specified type whose rect 
3367         contains the specified point, or 0 if none.
3368         
3369         * rendering/HitTestResult.cpp:
3370         (WebCore::HitTestResult::spellingToolTip):
3371         Replaced hardwired string placeholder implementation with code that uses markerContainingPoint
3372         and gets the description from the marker.
3373
3374 2006-10-31  Geoffrey Garen  <ggaren@apple.com>
3375
3376         Reviewed by Maciej.
3377         
3378         Fixed crash resulting from Darin's last patch to remove BrowserExtension.
3379
3380         * loader/mac/FrameLoaderMac.mm:
3381         (WebCore::FrameLoader::createWindow):
3382         * manual-tests/window-open-features-parsing.html: Updated for clarity.
3383
3384 2006-10-31  Geoffrey Garen  <ggaren@apple.com>
3385
3386         Reviewed by Alice.
3387
3388         Moved some Editing code from WebKit, the bridge, and WebCore::Frame down 
3389         to WebCore::Editor.
3390         
3391         Layout tests pass.
3392         
3393         Renamed "may*" to "can*" because "can" is more accurate (these functions
3394         aren't just about permission) and it matches WebKit.
3395
3396         (WebCore::FrameMac::handleMouseMoveEvent): Directly test for dragging in a 
3397         password field. Now that WebCore fully implements canCopy(), it doesn't just
3398         mean "the selection is not in a password field" anymore.
3399         (-[WebCoreFrameBridge _shouldAllowAccessFrom:]): Removed this #ifed-out code. 
3400         The fact that it's not called anymore may represent a security issue, but I
3401         don't see how commented-out code will help reveal the issue, and the
3402         bridge is going away, anyway.
3403         * editing/SelectionController.h: Changed selection() calls to references
3404         to m_sel, to match the rest of the file.
3405
3406 2006-10-31  Justin Garcia  <justin.garcia@apple.com>
3407
3408         Reviewed by harrison
3409         
3410         <rdar://problem/4711063>
3411         Pasting 10K lines into Mail/Blot takes ~7sec, in TextEdit it takes ~1.5sec
3412
3413         * editing/ReplaceSelectionCommand.cpp:
3414         (WebCore::ReplacementFragment::ReplacementFragment): Don't do the test
3415         insertion and plain text string creation unless we need the string
3416         for a BeforeTextInserted event handler or for a plain text only region.
3417         (WebCore::ReplacementFragment::removeInterchangeNodes): Added, moved
3418         code here from ReplacementFragment's constructor.
3419         (WebCore::ReplaceSelectionCommand::completeHTMLReplacement): Added a
3420         FIXME.
3421         * editing/ReplaceSelectionCommand.h:
3422
3423 2006-10-31  Ada Chan  <adachan@apple.com>
3424
3425         Reviewed by Adam
3426
3427         Correct forward declarations of the HitTestRequest struct.
3428
3429         * rendering/EllipsisBox.h:
3430         * rendering/InlineBox.h:
3431         * rendering/InlineFlowBox.h:
3432         * rendering/RenderLayer.h:
3433         * rendering/RenderObject.h:
3434
3435 2006-10-31  John Sullivan  <sullivan@apple.com>
3436
3437         Reviewed by Beth and Adam
3438
3439         Support for displaying tooltips for bad grammar. Currently this always displays the same tooltip; 
3440         next I'll make it use a string that's relevant for a specific grammar error.
3441
3442         * WebCore.exp:
3443         export symbol for spellingToolTip function
3444         
3445         * rendering/HitTestResult.h:
3446         * rendering/HitTestResult.cpp:
3447         (WebCore::HitTestResult::spellingToolTip):
3448         new function, returns the string to be used in a tool tip that describes the questionable grammar
3449         
3450         * rendering/InlineTextBox.h:
3451         * rendering/InlineTextBox.cpp:
3452         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
3453         now takes a style and font, needed to compute the rect representing the range containing
3454         questionable grammar. Computes the rect and associates it with the marker.
3455         (WebCore::InlineTextBox::paintDocumentMarkers):
3456         Pass in the style and font now needed by paintSpellingOrGrammarMarker
3457
3458 2006-10-31  Adele Peterson  <adele@apple.com>
3459
3460         Removed commented out variable from last checkin.
3461
3462         * html/HTMLSelectElement.cpp:
3463         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
3464
3465 2006-10-31  Brady Eidson  <beidson@apple.com>
3466
3467         Build fix (unused variable in release builds)
3468
3469         * html/HTMLSelectElement.cpp:
3470         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
3471
3472 2006-10-31  Adele Peterson  <adele@apple.com>
3473
3474         Reviewed by Adam.
3475
3476         - Fix for http://bugs.webkit.org/show_bug.cgi?id=11127 NativeListBox: arrow and drag selection should pivot around one list item
3477         and http://bugs.webkit.org/show_bug.cgi?id=11173 REGRESSION (NativeListBox): Shift-clicking items in list box doesn't expand the current selection
3478         and http://bugs.webkit.org/show_bug.cgi?id=11417 REGRESSION: onchange does not fire for list-style select elements
3479
3480         Tests: 
3481         * LayoutTests/fast/forms/listbox-selection.html
3482         * LayoutTests/fast/forms/listbox-onchange.html
3483
3484         * html/HTMLSelectElement.h: Added m_selectedListIndexBase and m_selectedListIndexExtent to track indices for the active selection in progress.
3485           Added 2 vectors to cache selection state.  One is kept so that the previous selection state can be restored as the active selection grows and shrinks.
3486           And one for onChange, that is updated after onChange is fired.
3487           Added m_activeSelectionState to keep track of whether the current drag selection is selecting or deselecting.
3488  
3489         * html/HTMLSelectElement.cpp:
3490         (WebCore::HTMLSelectElement::HTMLSelectElement): Initialized new variables.
3491         (WebCore::HTMLSelectElement::setSelectedIndex): If needed, initialize m_selectedListIndexBase and m_selectedListIndexExtent.
3492         (WebCore::HTMLSelectElement::dispatchBlurEvent): Only fire the onChange event here for menu lists.
3493         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Updates base and extent variables for mouse and key events.
3494         (WebCore::HTMLSelectElement::setBase): Added. Also caches the selection state.
3495         (WebCore::HTMLSelectElement::setExtent): Added.
3496         (WebCore::HTMLSelectElement::updateListBoxSelection): Added.
3497         (WebCore::HTMLSelectElement::listBoxOnChange): Added.
3498
3499         * rendering/RenderListBox.cpp:
3500         (WebCore::RenderListBox::updateFromElement): Only scroll to reveal the first index if both the first and last indices aren't visible.
3501         (WebCore::RenderListBox::listIndexAtOffset): Added.  Replaces optionAtPoint, which is no longer used.
3502         (WebCore::RenderListBox::autoscroll): Now sets the selection using the select's base and extent.
3503         (WebCore::RenderListBox::stopAutoscroll): Added.  Tells the select element to fire onChange.  This is needed because the autoscroll can end from a mouseUp
3504          outside of the list box, and the select element won't get a mouseUp event directly.  But the frame will stop the autoscroll at that point, and now we can
3505          notify the select element from here.
3506         (WebCore::RenderListBox::scrollToRevealElementAtListIndex): Checks new listIndexIsVisible method.
3507         (WebCore::RenderListBox::listIndexIsVisible): Added.
3508         (WebCore::RenderListBox::valueChanged): Removed unnecessary printf.
3509
3510         * page/Frame.cpp: (WebCore::Frame::stopAutoscrollTimer): Added rendererIsBeingDestroyed argument, so when the renderer calls this during destruction, 
3511         we don't try to use the pointer to that renderer to call stopAutoscroll.  This is done so a renderer that's still alive has a chance to do some cleanup after autoscroll.
3512         * rendering/RenderListBox.h: (WebCore::RenderListBox::shouldAutoscroll): Always returns true now, since we're also updating selection from the autoscroll timer.
3513         * rendering/RenderObject.h: (WebCore::RenderObject::stopAutoscroll): Added.
3514         * rendering/RenderObject.cpp: (WebCore::RenderObject::destroy): Calls stopAutoscrollTimer with rendererIsBeingDestroyed argument.
3515
3516 2006-10-31  Beth Dakin  <bdakin@apple.com>
3517
3518         Forgot to check this in a minute ago. Oops!! Thanks Mitz!
3519
3520         * rendering/HitTestRequest.h: Added.
3521         (WebCore::HitTestRequest::HitTestRequest):
3522
3523 2006-10-31  Beth Dakin  <bdakin@apple.com>
3524
3525         Reviewed by Maciej.
3526
3527         Fix for http://bugs.webkit.org/show_bug.cgi?id=11461 HitTestResult 
3528         should be split into HitTestRequest and HitTestResult
3529
3530         This patch creates a new struct called HitTestRequest that holds 
3531         the three boolean values (readonly, active, and mouseMove) that 
3532         were formerly a part of HitTestResult. All hitTest() and 
3533         nodeAtPoint() functions now take a HitTestRequest in addition to 
3534         the HitTestResult.
3535
3536         * WebCore.exp:
3537         * WebCore.xcodeproj/project.pbxproj:
3538         * bridge/mac/FrameMac.mm:
3539         (WebCore::FrameMac::eventMayStartDrag):
3540         (WebCore::FrameMac::handleMouseMoveEvent):
3541         * bridge/mac/WebCoreAXObject.mm:
3542         (-[WebCoreAXObject doAXTextMarkerForPosition:]):
3543         (-[WebCoreAXObject accessibilityHitTest:]):
3544         * dom/Document.cpp:
3545         (WebCore::Document::elementFromPoint):
3546         (WebCore::Document::prepareMouseEvent):
3547         * editing/SelectionController.cpp:
3548         (WebCore::SelectionController::contains):
3549         * page/Frame.cpp:
3550         (WebCore::Frame::hitTestResultAtPoint):
3551         * page/FrameView.cpp:
3552         (WebCore::FrameView::handleWheelEvent):
3553         * rendering/EllipsisBox.cpp:
3554         (WebCore::EllipsisBox::nodeAtPoint):
3555         * rendering/EllipsisBox.h:
3556         * rendering/HitTestResult.cpp:
3557         (WebCore::HitTestResult::HitTestResult):
3558         (WebCore::HitTestResult::operator=):
3559         * rendering/HitTestResult.h:
3560         * rendering/InlineBox.cpp:
3561         (WebCore::InlineBox::nodeAtPoint):
3562         * rendering/InlineBox.h:
3563         * rendering/InlineFlowBox.cpp:
3564         (WebCore::InlineFlowBox::nodeAtPoint):
3565         * rendering/InlineFlowBox.h:
3566         * rendering/InlineTextBox.cpp:
3567         (WebCore::InlineTextBox::nodeAtPoint):
3568         * rendering/InlineTextBox.h:
3569         * rendering/RenderBlock.cpp:
3570         (WebCore::RenderBlock::nodeAtPoint):
3571         * rendering/RenderBlock.h:
3572         * rendering/RenderBox.cpp:
3573         (WebCore::RenderBox::nodeAtPoint):
3574         * rendering/RenderBox.h:
3575         * rendering/RenderFlow.cpp:
3576         (WebCore::RenderFlow::hitTestLines):
3577         * rendering/RenderFlow.h:
3578         * rendering/RenderForeignObject.cpp:
3579         (WebCore::RenderForeignObject::nodeAtPoint):
3580         * rendering/RenderForeignObject.h:
3581         * rendering/RenderFrameSet.cpp:
3582         (WebCore::RenderFrameSet::nodeAtPoint):
3583         * rendering/RenderFrameSet.h:
3584         * rendering/RenderImage.cpp:
3585         (WebCore::RenderImage::nodeAtPoint):
3586         * rendering/RenderImage.h:
3587         * rendering/RenderInline.cpp:
3588         (WebCore::RenderInline::nodeAtPoint):
3589         * rendering/RenderInline.h:
3590         * rendering/RenderLayer.cpp:
3591         (WebCore::RenderLayer::autoscroll):
3592         (WebCore::RenderLayer::hitTest):
3593         (WebCore::RenderLayer::hitTestLayer):
3594         (WebCore::RenderLayer::updateHoverActiveState):
3595         * rendering/RenderLayer.h:
3596         * rendering/RenderObject.cpp:
3597         (WebCore::RenderObject::hitTest):
3598         (WebCore::RenderObject::nodeAtPoint):
3599         * rendering/RenderObject.h:
3600         * rendering/RenderPath.cpp:
3601         (WebCore::RenderPath::nodeAtPoint):
3602         * rendering/RenderPath.h:
3603         * rendering/RenderSVGImage.cpp:
3604         (WebCore::RenderSVGImage::nodeAtPoint):
3605         * rendering/RenderSVGImage.h:
3606         * rendering/RenderSVGText.cpp:
3607         (WebCore::RenderSVGText::nodeAtPoint):
3608         * rendering/RenderSVGText.h:
3609         * rendering/RenderTableRow.cpp:
3610         (WebCore::RenderTableRow::nodeAtPoint):
3611         * rendering/RenderTableRow.h:
3612         * rendering/RenderTableSection.cpp:
3613         (WebCore::RenderTableSection::nodeAtPoint):
3614         * rendering/RenderTableSection.h:
3615         * rendering/RenderText.h:
3616         (WebCore::RenderText::nodeAtPoint):
3617         * rendering/RenderTextControl.cpp:
3618         (WebCore::RenderTextControl::nodeAtPoint):
3619         * rendering/RenderTextControl.h:
3620         * rendering/RootInlineBox.cpp:
3621         (WebCore::RootInlineBox::nodeAtPoint):
3622         * rendering/RootInlineBox.h:
3623
3624 2006-10-31  Lars Naesbye Christensen <larsnaesbye@stud.ku.dk>
3625
3626         Reviewed by Maciej.
3627
3628         Bug 11442: [CSS 3] support for cursor: all-scroll
3629         http://bugs.webkit.org/show_bug.cgi?id=11442
3630
3631         * css/CSSComputedStyleDeclaration.cpp:
3632         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3633         * css/CSSValueKeywords.in:
3634         * css/cssparser.cpp:
3635         (WebCore::CSSParser::parseValue):
3636         * page/FrameView.cpp:
3637         (WebCore::selectCursor):
3638         * rendering/RenderStyle.h:
3639
3640 2006-10-31  Oliver Hunt  <oliver@apple.com>
3641
3642         Reviewed by Geoff.
3643
3644         Converting Obj-C++ to C++ in kcanvas
3645
3646         * WebCore.xcodeproj/project.pbxproj:
3647         * kcanvas/device/quartz/KCanvasFilterQuartz.h:
3648         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
3649         * kcanvas/device/quartz/KCanvasItemQuartz.cpp: Added.
3650         * kcanvas/device/quartz/KCanvasItemQuartz.mm: Removed.
3651         * kcanvas/device/quartz/KRenderingDeviceQuartz.cpp: Added.
3652         * kcanvas/device/quartz/KRenderingDeviceQuartz.h:
3653         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm: Removed.
3654         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
3655         * kcanvas/device/quartz/KRenderingPaintServerQuartz.h:
3656         * kcanvas/device/quartz/QuartzSupport.cpp: Added.
3657         * kcanvas/device/quartz/QuartzSupport.h:
3658         * kcanvas/device/quartz/QuartzSupport.mm: Removed.
3659         * platform/graphics/svg/cg/SVGResourceClipperCg.cpp: Added.
3660         (WebCore::SVGResourceClipper::applyClip):
3661         * platform/graphics/svg/cg/SVGResourceClipperCg.mm: Removed.
3662         * platform/graphics/svg/cg/SVGResourceImageCg.cpp: Added.
3663         * platform/graphics/svg/cg/SVGResourceImageCg.mm: Removed.
3664
3665 2006-10-31  Justin Garcia  <justin.garcia@apple.com>
3666
3667         Reviewed by harrison
3668         
3669         <rdar://problem/4808375>
3670         REGRESSION: TextIterator slowed down, affecting Find on Page & Copy (etc.) [11460}
3671         
3672         Completely back out r17276 because of performance issues.
3673
3674         * editing/TextIterator.cpp:
3675         (WebCore::TextIterator::TextIterator):
3676         (WebCore::TextIterator::advance):
3677         (WebCore::TextIterator::handleTextNode):
3678         (WebCore::TextIterator::handleTextBox):
3679         (WebCore::TextIterator::handleReplacedElement):
3680         (WebCore::TextIterator::handleNonTextNode):
3681         (WebCore::TextIterator::exitNode):
3682         (WebCore::TextIterator::emitCharacter):
3683         (WebCore::TextIterator::range):
3684         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
3685         (WebCore::SimplifiedBackwardsTextIterator::advance):
3686         (WebCore::SimplifiedBackwardsTextIterator::handleTextNode):
3687         (WebCore::SimplifiedBackwardsTextIterator::handleReplacedElement):
3688         (WebCore::SimplifiedBackwardsTextIterator::emitCharacter):
3689         (WebCore::SimplifiedBackwardsTextIterator::emitNewline):
3690         (WebCore::SimplifiedBackwardsTextIterator::range):
3691         (WebCore::CharacterIterator::range):
3692         (WebCore::TextIterator::rangeFromLocationAndLength):
3693         * editing/TextIterator.h:
3694         (WebCore::TextIterator::atEnd):
3695         (WebCore::SimplifiedBackwardsTextIterator::atEnd):
3696
3697 2006-10-31  Darin Adler  <darin@apple.com>
3698
3699         Reviewed by Brady.
3700
3701         - got "action dictionary" code out of FrameLoader,
3702           replacing with a class called NavigationAction
3703
3704         * loader/DocumentLoader.h: Changed m_triggeringAction to a NavigationAction.
3705         * loader/mac/DocumentLoaderMac.mm:
3706         (WebCore::DocumentLoader::triggeringAction): Ditto.
3707         (WebCore::DocumentLoader::setTriggeringAction): Ditto.
3708
3709         * loader/FrameLoader.h: Changed action parameters to NavigationAction.
3710
3711         * loader/FrameLoaderClient.h: Changed action parameters to NavigationAction.
3712         Removed elementForEvent.
3713         * loader/mac/FrameLoaderMac.mm:
3714         (WebCore::FrameLoader::load): Ditto.
3715         (WebCore::FrameLoader::reload): Ditto.
3716         (WebCore::FrameLoader::checkNewWindowPolicy): Ditto.
3717         (WebCore::FrameLoader::checkNavigationPolicy): Ditto.
3718         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): Ditto.
3719         (WebCore::FrameLoader::post): Ditto.
3720
3721         * loader/NavigationAction.h: Added.
3722         * loader/NavigationAction.cpp: Added.
3723         * loader/mac/NavigationActionMac.mm: Added.
3724
3725         * loader/mac/MainResourceLoaderMac.mm: Fixed copyright.
3726
3727         * WebCore.xcodeproj/project.pbxproj: Updated for new files.
3728         * WebCore.exp: Updated.
3729
3730 2006-10-31  Steve Falkenburg  <sfalken@apple.com>
3731
3732         Reviewed by Adam.
3733
3734         Build fix
3735
3736         * platform/win/CookieJarWin.cpp:
3737         (WebCore::cookies):
3738
3739 2006-10-31  Nikolas Zimmermann  <zimmermann@kde.org>
3740
3741         Reviewed by Maciej. Landed by Adam.
3742
3743         Fixes: http://bugs.webkit.org/show_bug.cgi?id=11463
3744
3745         Move KCanvasTreeDebug into rendering, named as SVGRenderTreeAsText.*,
3746         as dicussed with Dave. Also kill the outdated DESIGN document.
3747
3748         * CMakeLists.txt:
3749         * WebCore.xcodeproj/project.pbxproj:
3750         * kcanvas/DESIGN: Removed.
3751         * kcanvas/KCanvasFilters.cpp:
3752         * kcanvas/KCanvasTreeDebug.cpp: Moved to rendering/SVGRenderTreeAsText
3753         * kcanvas/KCanvasTreeDebug.h: Ditto.
3754         * kcanvas/device/KRenderingPaintServerGradient.cpp:
3755         * kcanvas/device/KRenderingPaintServerPattern.cpp:
3756         * kcanvas/device/KRenderingPaintServerSolid.cpp:
3757         * platform/graphics/svg/SVGResourceClipper.cpp:
3758         * rendering/RenderTreeAsText.cpp:
3759         * rendering/SVGRenderTreeAsText.cpp: Added.
3760         * rendering/SVGRenderTreeAsText.h: Added.
3761         (WebCore::operator<<):
3762
3763 2006-10-31  MorganL  <morganl.webkit@yahoo.com>
3764
3765         Reviewed by Maciej.
3766
3767         Fixes http://bugs.webkit.org/show_bug.cgi?id=11286
3768         Includes some CRLF -> LF fixups.
3769
3770         * platform/win/CookieJarWin.cpp:
3771         (WebCore::cookies):
3772
3773 2006-10-31  Adam Roben  <aroben@apple.com>
3774
3775         Reviewed by Steve.
3776
3777         Fix some incorrect forward declarations.
3778
3779         * loader/FrameLoader.h:
3780         * page/Frame.h:
3781
3782 2006-10-31  Darin Adler  <darin@apple.com>
3783
3784         * WebCore.xcodeproj/project.pbxproj: Change GraphicsTypes.h to a private header to
3785         try to fix the build on the buildbot.
3786
3787 2006-10-31  Darin Adler  <darin@apple.com>
3788
3789         * bridge/mac/FrameMac.mm:
3790         (WebCore::FrameMac::advanceToNextMisspelling): Build fix for release Tiger builds.
3791         (WebCore::FrameMac::markMisspellings): Ditto.
3792
3793 2006-10-31  John Sullivan  <sullivan@apple.com>
3794
3795         * bridge/mac/FrameMac.mm:
3796         (WebCore::FrameMac::advanceToNextMisspelling):
3797         build fix: needed #ifndef BUILDING_ON_TIGER in one more place
3798
3799 2006-10-30  John Sullivan  <sullivan@apple.com>
3800
3801         Reviewed by Adam Roben
3802         
3803         - fixes <rdar://problem/4804614> Bad grammar ranges are not visibly marked
3804         
3805         This patch introduces much of the guts of grammar checking, though still not enough to actually
3806         check grammar sensibly, due to:
3807           
3808         <rdar://problem/4811175> Many false reports of bad grammar appear, caused by insufficient 
3809         context passed to grammar checker
3810
3811         * platform/Logging.h:
3812         * platform/Logging.cpp:
3813         new log channel SpellingAndGrammar
3814
3815         * bridge/mac/WebCorePageBridge.mm:
3816         (initializeLoggingChannelsIfNecessary):
3817         initialize new log channel
3818
3819         * bridge/mac/FrameMac.mm:
3820         (WebCore::FrameMac::advanceToNextMisspelling):
3821         Compute bad grammar range when computing misspelling range. Find first detailed grammar range from the
3822         set NSSpellChecker determines. Compare it with misspelling range to see which is earliest (or shortest
3823         in the event of a tie), and do further processing with that one (select range; create marker that
3824         causes range to be visibly marked with a funky underline; update spelling panel appropriately).
3825         (WebCore::FrameMac::markMisspellings):
3826         More or less the same types of changes as in advanceToNextMisspelling The loops are structured just 
3827         differently enough to make sharing code between these two functions a little tricky, so I decided to 
3828         save that for a later patch.
3829         
3830         (WebCore::FrameMac::respondToChangedSelection):
3831         remove grammar markers when we remove spelling markers        
3832
3833 2006-10-31  Nikolas Zimmermann <zimmermann@kde.org>
3834
3835         Reviewed by Mitz.
3836
3837         Fix Qt/Linux build with older gcc3.3.4.
3838
3839         * bindings/js/kjs_window.cpp:
3840         (KJS::WindowFunc::callAsFunction):
3841
3842 2006-10-31  Zack Rusin  <zack@kde.org>
3843
3844         Reviewed by Mitz.
3845
3846         Fix the Qt build after last nights changes.
3847
3848         * WebCore/platform/qt/FrameQt.cpp:
3849         * WebCore/platform/qt/EditorClientQt.h:
3850         * WebCore/platform/qt/EditorClientQt.cpp:
3851         * WebCore/platform/graphics/svg/qt/SVGResourceImageQt.cpp:
3852         * WebCore/platform/graphics/svg/qt/SVGResourceClipperQt.cpp:
3853         * WebCore/CMakeLists.txt:
3854         * WebCore/kcanvas/device/qt/KRenderingDeviceQt.cpp:
3855         * WebKitQt/QtLauncher/CMakeLists.txt:
3856         * WebKitQt/WebKitPart/CMakeLists.txt:
3857
3858 2006-10-30  Darin Adler  <darin@apple.com>
3859
3860         Reviewed by Anders.
3861
3862         - remove BrowserExtension
3863
3864         * WebCore.vcproj/WebCore/WebCore.vcproj:
3865         * WebCore.xcodeproj/project.pbxproj:
3866         * bindings/js/kjs_window.cpp:
3867         (KJS::createNewWindow):
3868         (KJS::WindowFunc::callAsFunction):
3869         * bridge/BrowserExtension.h: Removed.
3870         * bridge/mac/BrowserExtensionMac.h: Removed.
3871         * bridge/mac/BrowserExtensionMac.mm: Removed.
3872         * bridge/mac/FrameMac.mm:
3873         (WebCore::FrameMac::FrameMac):
3874         (WebCore::FrameMac::submitForm):
3875         (WebCore::FrameMac::urlSelected):
3876         * bridge/win/BrowserExtensionWin.cpp: Removed.
3877         * bridge/win/BrowserExtensionWin.h: Removed.
3878         * bridge/win/FrameWin.cpp:
3879         (WebCore::FrameWin::FrameWin):
3880         * loader/FrameLoader.cpp:
3881         (WebCore::FrameLoader::createWindow):
3882         * loader/FrameLoader.h:
3883         * loader/icon/IconLoader.cpp:
3884         * loader/mac/FrameLoaderMac.mm:
3885         (WebCore::FrameLoader::safeLoad):
3886         (WebCore::FrameLoader::load):
3887         (WebCore::FrameLoader::createWindow):
3888         * page/Frame.cpp:
3889         (WebCore::Frame::urlSelected):
3890         (WebCore::Frame::requestFrame):
3891         (WebCore::Frame::submitForm):
3892         (WebCore::Frame::scheduleHistoryNavigation):
3893         (WebCore::Frame::redirectionTimerFired):
3894         * page/Frame.h:
3895         * page/FrameLoadRequest.h:
3896         (WebCore::FrameLoadRequest::FrameLoadRequest):
3897         (WebCore::FrameLoadRequest::isEmpty):
3898         (WebCore::FrameLoadRequest::resourceRequest):
3899         (WebCore::FrameLoadRequest::frameName):
3900         (WebCore::FrameLoadRequest::setFrameName):
3901         * page/FramePrivate.h:
3902         (WebCore::FramePrivate::FramePrivate):
3903         (WebCore::FramePrivate::~FramePrivate):
3904         * platform/gdk/BrowserExtensionGdk.h: Removed.
3905         * platform/gdk/FrameGdk.cpp:
3906         (WebCore::FrameGdk::FrameGdk):
3907         * platform/gdk/TemporaryLinkStubs.cpp:
3908         * platform/network/ResourceRequest.h:
3909         (WebCore::ResourceRequest::isEmpty):
3910
3911 2006-10-31  Nikolas Zimmermann  <zimmermann@kde.org>
3912
3913         Reviewed by Oliver.
3914
3915         Modified from original due to earlier reversion
3916
3917         Fixes: http://bugs.webkit.org/show_bug.cgi?id=11436
3918
3919         Better SVG integration in WebKit, Part I.
3920
3921         The patch is mostly about creating a new platform/graphics directory, and
3922         moving the kcanvas resources (clipper/masker/marker) there (in svg budir),
3923         with a new name (KCanvasClipper -> SVGResourceClipper). Also fix several ownership
3924         issues, by using ref counting (the SVG classes now store RefPtrs to the resources).
3925
3926         KCanvasFilters is still left in kcanvas/ subdirectory, to be converted in a next patch.
3927         All details of the patch, and upcoming patches can be found in the bug report.
3928
3929         * CMakeLists.txt:
3930         * WebCore.xcodeproj/project.pbxproj:
3931         * graphics/svg/SVGResource.cpp: Removed.
3932         * graphics/svg/SVGResourceClipper.cpp: Removed.
3933         * graphics/svg/SVGResourceClipper.h: Removed.
3934         * graphics/svg/SVGResourceImage.h: Removed.
3935         * graphics/svg/SVGResourceListener.h: Removed.
3936         * graphics/svg/SVGResourceMarker.cpp: Removed.
3937         * graphics/svg/SVGResourceMarker.h: Removed.
3938         * graphics/svg/SVGResourceMasker.cpp: Removed.
3939         * graphics/svg/SVGResourceMasker.h: Removed.
3940         * kcanvas/KCanvasClipper.cpp: Removed.
3941         * kcanvas/KCanvasClipper.h: Removed.
3942         * kcanvas/KCanvasCreator.cpp: Removed.
3943         * kcanvas/KCanvasCreator.h: Removed.
3944         * kcanvas/KCanvasFilters.cpp:
3945         (WebCore::getFilterById):
3946         * kcanvas/KCanvasFilters.h:
3947         * kcanvas/KCanvasImage.h: Removed.
3948         * kcanvas/KCanvasMarker.cpp: Removed.
3949         * kcanvas/KCanvasMarker.h: Removed.
3950         * kcanvas/KCanvasMasker.cpp: Removed.
3951         * kcanvas/KCanvasMasker.h: Removed.
3952         * kcanvas/KCanvasResource.cpp: Removed.
3953         * kcanvas/KCanvasResource.h: Removed.
3954         * kcanvas/KCanvasResourceListener.h: Removed.
3955         * kcanvas/KCanvasTreeDebug.cpp:
3956         (WebCore::writeRenderResources):
3957         * kcanvas/device/KRenderingDevice.h:
3958         * kcanvas/device/KRenderingPaintServer.h:
3959         (WebCore::KRenderingPaintServer::KRenderingPaintServer):
3960         * kcanvas/device/KRenderingPaintServerGradient.cpp:
3961         (WebCore::KRenderingPaintServerGradient::listener):
3962         (WebCore::KRenderingPaintServerGradient::setListener):
3963         * kcanvas/device/KRenderingPaintServerGradient.h:
3964         * kcanvas/device/KRenderingPaintServerPattern.cpp:
3965         (WebCore::KRenderingPaintServerPattern::KRenderingPaintServerPattern):
3966         (WebCore::KRenderingPaintServerPattern::~KRenderingPaintServerPattern):
3967         (WebCore::KRenderingPaintServerPattern::tile):
3968         (WebCore::KRenderingPaintServerPattern::setTile):
3969         (WebCore::KRenderingPaintServerPattern::listener):
3970         (WebCore::KRenderingPaintServerPattern::setListener):
3971         * kcanvas/device/KRenderingPaintServerPattern.h:
3972         * kcanvas/device/KRenderingPaintServerSolid.h:
3973         * kcanvas/device/qt/KCanvasClipperQt.cpp: Removed.
3974         * kcanvas/device/qt/KCanvasClipperQt.h:
3975         * kcanvas/device/qt/KRenderingDeviceQt.cpp:
3976         (WebCore::KRenderingDeviceQt::contextForImage):
3977         (WebCore::KRenderingDeviceQt::createResource):
3978         (WebCore::KRenderingDeviceQt::createPaintServer):
3979         * kcanvas/device/qt/KRenderingDeviceQt.h:
3980         * kcanvas/device/qt/KRenderingPaintServerGradientQt.cpp:
3981         * kcanvas/device/qt/KRenderingPaintServerPatternQt.cpp:
3982         * kcanvas/device/qt/KRenderingPaintServerQt.cpp:
3983         * kcanvas/device/qt/KRenderingPaintServerSolidQt.cpp:
3984         * kcanvas/device/qt/RenderPathQt.h: Removed.
3985         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
3986         (WebCore::KCanvasFilterQuartz::getCIFilterStack):
3987         * kcanvas/device/quartz/KCanvasItemQuartz.mm:
3988         * kcanvas/device/quartz/KCanvasMaskerQuartz.h: Removed.
3989         * kcanvas/device/quartz/KCanvasMaskerQuartz.mm: Removed.
3990         * kcanvas/device/quartz/KCanvasResourcesQuartz.h: Removed.
3991         * kcanvas/device/quartz/KCanvasResourcesQuartz.mm: Removed.
3992         * kcanvas/device/quartz/KRenderingDeviceQuartz.h:
3993         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
3994         (WebCore::KRenderingDeviceQuartz::contextForImage):
3995         (WebCore::KRenderingDeviceQuartz::createPaintServer):
3996         (WebCore::KRenderingDeviceQuartz::createResource):
3997         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
3998         (WebCore::KRenderingPaintServerGradientQuartz::KRenderingPaintServerGradientQuartz):
3999         (WebCore::KRenderingPaintServerGradientQuartz::~KRenderingPaintServerGradientQuartz):
4000         (WebCore::KRenderingPaintServerGradientQuartz::setup):
4001         (WebCore::KRenderingPaintServerGradientQuartz::teardown):
4002         * kcanvas/device/quartz/KRenderingPaintServerQuartz.h:
4003         * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
4004         (WebCore::patternCallback):
4005         (WebCore::KRenderingPaintServerPatternQuartz::setup):
4006         * kcanvas/device/quartz/QuartzSupport.mm:
4007         * ksvg2/misc/KCanvasRenderingStyle.cpp:
4008         (WebCore::sharedSolidPaintServer):
4009         * ksvg2/svg/SVGClipPathElement.cpp:
4010         (WebCore::SVGClipPathElement::SVGClipPathElement):
4011         (WebCore::SVGClipPathElement::~SVGClipPathElement):
4012         (WebCore::SVGClipPathElement::canvasResource):
4013         * ksvg2/svg/SVGClipPathElement.h:
4014         * ksvg2/svg/SVGFEImageElement.cpp:
4015         * ksvg2/svg/SVGFilterElement.cpp:
4016         (WebCore::SVGFilterElement::SVGFilterElement):
4017         (WebCore::SVGFilterElement::~SVGFilterElement):
4018         (WebCore::SVGFilterElement::canvasResource):
4019         * ksvg2/svg/SVGFilterElement.h:
4020         * ksvg2/svg/SVGGradientElement.cpp:
4021         (WebCore::SVGGradientElement::SVGGradientElement):
4022         (WebCore::SVGGradientElement::~SVGGradientElement):
4023         (WebCore::SVGGradientElement::canvasResource):
4024         (WebCore::SVGGradientElement::resourceNotification):
4025         * ksvg2/svg/SVGGradientElement.h:
4026         * ksvg2/svg/SVGImageElement.cpp:
4027         * ksvg2/svg/SVGLinearGradientElement.cpp:
4028         (WebCore::SVGLinearGradientElement::buildGradient):
4029         * ksvg2/svg/SVGLinearGradientElement.h:
4030         * ksvg2/svg/SVGMarkerElement.cpp:
4031         (WebCore::SVGMarkerElement::SVGMarkerElement):
4032         (WebCore::SVGMarkerElement::~SVGMarkerElement):
4033         (WebCore::SVGMarkerElement::canvasResource):
4034         * ksvg2/svg/SVGMarkerElement.h:
4035         * ksvg2/svg/SVGMaskElement.cpp:
4036         (WebCore::SVGMaskElement::SVGMaskElement):
4037         (WebCore::SVGMaskElement::~SVGMaskElement):
4038         (WebCore::SVGMaskElement::drawMaskerContent):
4039         (WebCore::SVGMaskElement::canvasResource):
4040         * ksvg2/svg/SVGMaskElement.h:
4041         * ksvg2/svg/SVGPatternElement.cpp:
4042         (WebCore::SVGPatternElement::SVGPatternElement):
4043         (WebCore::SVGPatternElement::~SVGPatternElement):
4044         (WebCore::SVGPatternElement::fillAttributesFromReferencePattern):
4045         (WebCore::SVGPatternElement::drawPatternContentIntoTile):
4046         (WebCore::SVGPatternElement::canvasResource):
4047         * ksvg2/svg/SVGPatternElement.h:
4048         * ksvg2/svg/SVGRadialGradientElement.cpp:
4049         (WebCore::SVGRadialGradientElement::buildGradient):
4050         * ksvg2/svg/SVGRadialGradientElement.h:
4051         * ksvg2/svg/SVGStyledElement.h:
4052         (WebCore::SVGStyledElement::canvasResource):
4053         * platform/GraphicsContext.cpp: Removed.
4054         * platform/GraphicsContext.h: Removed.
4055         * platform/GraphicsTypes.cpp: Removed.
4056         * platform/GraphicsTypes.h: Removed.
4057         * platform/graphics/GraphicsContext.cpp:
4058         (WebCore::GraphicsContextState::GraphicsContextState):
4059         (WebCore::GraphicsContextPrivate::GraphicsContextPrivate):
4060         (WebCore::GraphicsContext::createGraphicsContextPrivate):
4061         (WebCore::GraphicsContext::destroyGraphicsContextPrivate):
4062         (WebCore::GraphicsContext::save):
4063         (WebCore::GraphicsContext::restore):
4064         (WebCore::GraphicsContext::font):
4065         (WebCore::GraphicsContext::setFont):
4066         (WebCore::GraphicsContext::pen):
4067         (WebCore::GraphicsContext::setPen):
4068         (WebCore::GraphicsContext::setFillColor):
4069         (WebCore::GraphicsContext::fillColor):
4070         (WebCore::GraphicsContext::updatingControlTints):
4071         (WebCore::GraphicsContext::setUpdatingControlTints):
4072         (WebCore::GraphicsContext::setPaintingDisabled):
4073         (WebCore::GraphicsContext::paintingDisabled):
4074         (WebCore::GraphicsContext::drawImage):
4075         (WebCore::GraphicsContext::drawText):
4076         (WebCore::GraphicsContext::drawHighlightForText):
4077         (WebCore::GraphicsContext::initFocusRing):
4078         (WebCore::GraphicsContext::clearFocusRing):
4079         (WebCore::GraphicsContext::focusRingBoundingRect):
4080         (WebCore::GraphicsContext::addFocusRingRect):
4081         (WebCore::GraphicsContext::focusRingWidth):
4082         (WebCore::GraphicsContext::focusRingOffset):
4083         (WebCore::GraphicsContext::focusRingRects):
4084         (WebCore::GraphicsContext::drawTiledImage):
4085         * platform/graphics/GraphicsContext.h:
4086         * platform/graphics/GraphicsTypes.cpp:
4087         (WebCore::):
4088         (WebCore::parseCompositeOperator):
4089         (WebCore::compositeOperatorName):
4090         (WebCore::parseLineCap):
4091         (WebCore::lineCapName):
4092         (WebCore::parseLineJoin):
4093         (WebCore::lineJoinName):
4094         * platform/graphics/GraphicsTypes.h:
4095         (WebCore::):
4096         * platform/graphics/svg/SVGResource.cpp: Added.
4097         (WebCore::SVGResource::SVGResource):
4098         (WebCore::SVGResource::~SVGResource):
4099         (WebCore::SVGResource::invalidate):
4100         (WebCore::SVGResource::addClient):
4101         (WebCore::SVGResource::clients):
4102         (WebCore::SVGResource::idInRegistry):
4103         (WebCore::SVGResource::setIdInRegistry):
4104         (WebCore::SVGResource::externalRepresentation):
4105         (WebCore::getResourceById):
4106         (WebCore::getPaintServerById):
4107         (WebCore::operator<<):
4108         * platform/graphics/svg/SVGResource.h: Added.
4109         (WebCore::):
4110         (WebCore::SVGResource::isPaintServer):
4111         (WebCore::SVGResource::isFilter):
4112         (WebCore::SVGResource::isClipper):
4113         (WebCore::SVGResource::isMarker):
4114         (WebCore::SVGResource::isMasker):
4115         (WebCore::SVGResourceListener::~SVGResourceListener):
4116         * platform/graphics/svg/SVGResourceClipper.cpp: Added.
4117         (WebCore::SVGResourceClipper::SVGResourceClipper):
4118         (WebCore::SVGResourceClipper::~SVGResourceClipper):
4119         (WebCore::SVGResourceClipper::resetClipData):
4120         (WebCore::SVGResourceClipper::addClipData):
4121         (WebCore::SVGResourceClipper::clipData):
4122         (WebCore::SVGResourceClipper::externalRepresentation):
4123         (WebCore::operator<<):
4124         (WebCore::getClipperById):
4125         * platform/graphics/svg/SVGResourceClipper.h: Added.
4126         (WebCore::ClipDataList::addPath):
4127         (WebCore::SVGResourceClipper::isClipper):
4128         * platform/graphics/svg/SVGResourceImage.h: Added.
4129         * platform/graphics/svg/SVGResourceMarker.cpp: Added.
4130         (WebCore::SVGResourceMarker::SVGResourceMarker):
4131         (WebCore::SVGResourceMarker::~SVGResourceMarker):
4132         (WebCore::SVGResourceMarker::setMarker):
4133         (WebCore::SVGResourceMarker::setRef):
4134         (WebCore::SVGResourceMarker::draw):
4135         (WebCore::SVGResourceMarker::externalRepresentation):
4136         (WebCore::getMarkerById):
4137         * platform/graphics/svg/SVGResourceMarker.h: Added.
4138         (WebCore::SVGResourceMarker::refX):
4139         (WebCore::SVGResourceMarker::refY):
4140         (WebCore::SVGResourceMarker::setAngle):
4141         (WebCore::SVGResourceMarker::setAutoAngle):
4142         (WebCore::SVGResourceMarker::angle):
4143         (WebCore::SVGResourceMarker::setUseStrokeWidth):
4144         (WebCore::SVGResourceMarker::useStrokeWidth):
4145         (WebCore::SVGResourceMarker::isMarker):
4146         * platform/graphics/svg/SVGResourceMasker.cpp: Added.
4147         (WebCore::SVGResourceMasker::SVGResourceMasker):
4148         (WebCore::SVGResourceMasker::~SVGResourceMasker):
4149         (WebCore::SVGResourceMasker::setMask):
4150         (WebCore::SVGResourceMasker::mask):
4151         (WebCore::SVGResourceMasker::externalRepresentation):
4152         (WebCore::getMaskerById):
4153         * platform/graphics/svg/SVGResourceMasker.h: Added.
4154         (WebCore::SVGResourceMasker::isMasker):
4155         * platform/graphics/svg/cg/SVGResourceClipperCg.mm: Added.
4156         (WebCore::SVGResourceClipper::applyClip):
4157         * platform/graphics/svg/cg/SVGResourceImageCg.mm: Added.
4158         (WebCore::SVGResourceImage::SVGResourceImage):
4159         (WebCore::SVGResourceImage::~SVGResourceImage):
4160         (WebCore::SVGResourceImage::init):
4161         (WebCore::SVGResourceImage::size):
4162         (WebCore::SVGResourceImage::cgLayer):
4163         (WebCore::SVGResourceImage::setCGLayer):
4164         * platform/graphics/svg/cg/SVGResourceMaskerCg.mm: Added.
4165         (WebCore::applyLuminanceToAlphaFilter):
4166         (WebCore::applyExpandAlphatoGrayscaleFilter):
4167         (WebCore::transformImageIntoGrayscaleMask):
4168         (WebCore::SVGResourceMasker::applyMask):
4169         * platform/graphics/svg/qt/SVGResourceClipperQt.cpp: Added.
4170         (WebCore::SVGResourceClipper::applyClip):
4171         * platform/graphics/svg/qt/SVGResourceImageQt.cpp: Added.
4172       &nb