e6170e7b6268d4fe7b74f6c75a300ee76f1c606c
[WebKit-https.git] / WebCore / ChangeLog
1 2007-02-22  Adele Peterson  <adele@apple.com>
2
3         Reviewed by John.
4
5         Fix <rdar://problem/5016969> REGRESSION: "Check Spelling As You Type" context menu item is never checked
6
7         * platform/ContextMenu.cpp: (WebCore::ContextMenu::checkOrEnableIfNeeded): Set shouldCheck for ContextMenuItemTagCheckSpellingWhileTyping.
8
9 2007-02-22  Antti Koivisto  <antti@apple.com>
10
11         Reviewed by Darin.
12
13         - fix http://bugs.webkit.org/show_bug.cgi?id=11447
14         REGRESSION(NativeListBox): List not scrolled to preselected option
15         <rdar://problem/4957463>
16         
17         Initiate scroll when selected <option> is added to <select>.
18
19         * html/HTMLOptionElement.cpp:
20         (WebCore::HTMLOptionElement::insertedIntoDocument):
21         * html/HTMLOptionElement.h:
22         * html/HTMLSelectElement.cpp:
23         (WebCore::HTMLSelectElement::notifyOptionSelected):
24         (WebCore::HTMLSelectElement::updateListBoxSelection):
25         (WebCore::HTMLSelectElement::scrollToSelection):
26         * html/HTMLSelectElement.h:
27
28 2007-02-22  Zack Rusin  <zrusin@trolltech.com>
29
30         Reviewed by Lars
31
32         Fix sites with fixed positioned backgrounds.
33
34         * platform/qt/ScrollViewQt.cpp:
35         (WebCore::ScrollView::setStaticBackground):
36
37 2007-02-22  Zack Rusin  <zrusin@trolltech.com>
38
39         Reviewed by Lars
40
41         Properly implement canvas/scrollview's. Get
42         rid of ScrollViewCanvas and replace it with
43         a tailor abstractscrollview (now in qwebframe).
44         Scrolling of pages is finally completely smooth.
45
46         * WebCore.pro:
47         * platform/ScrollView.h:
48         * platform/qt/ScrollViewCanvasQt.cpp: Removed.
49         * platform/qt/ScrollViewCanvasQt.h: Removed.
50         * platform/qt/ScrollViewQt.cpp:
51         (WebCore::ScrollView::ScrollView):
52         (WebCore::ScrollView::setScrollArea):
53         (WebCore::ScrollView::updateContents):
54         (WebCore::ScrollView::resizeContents):
55         (WebCore::ScrollView::contentsWidth):
56         (WebCore::ScrollView::contentsHeight):
57         (WebCore::ScrollView::contentsToWindow):
58         (WebCore::ScrollView::windowToContents):
59         (WebCore::ScrollView::addChild):
60         * platform/qt/WidgetQt.cpp:
61         (WebCore::WidgetPrivate::canvas):
62         (WebCore::WidgetPrivate::parentScroll):
63         (WebCore::WidgetPrivate::setGeometry):
64         (WebCore::WidgetPrivate::geometry):
65         (WebCore::Widget::frameGeometry):
66         (WebCore::Widget::setQWidget):
67         (WebCore::Widget::setFrameGeometry):
68
69 2007-02-21  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
70
71         Reviewed by Adam Roben.
72
73         Improve notImplemented() macro for gdk. Rename to notImplementedGdk() to
74         give it a unique name (so that it doesn't clash with notImplemented()
75         for other platforms).
76         Make it print a given warning only once, so that frequently called
77         functions don't clutter the output.
78         Don't print the warning if DISABLE_NI_WARNING env variable is set.
79
80         * loader/gdk/FrameLoaderClientGdk.cpp:
81         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveAuthenticationChallenge):
82         (WebCore::FrameLoaderClientGdk::dispatchDidCancelAuthenticationChallenge):
83         (WebCore::FrameLoaderClientGdk::dispatchWillSendRequest):
84         (WebCore::FrameLoaderClientGdk::assignIdentifierToInitialRequest):
85         (WebCore::FrameLoaderClientGdk::createPlugin):
86         (WebCore::FrameLoaderClientGdk::createFrame):
87         (WebCore::FrameLoaderClientGdk::redirectDataToPlugin):
88         (WebCore::FrameLoaderClientGdk::createJavaAppletWidget):
89         (WebCore::FrameLoaderClientGdk::objectContentType):
90         (WebCore::FrameLoaderClientGdk::overrideMediaType):
91         (WebCore::FrameLoaderClientGdk::windowObjectCleared):
92         (WebCore::FrameLoaderClientGdk::hasWebView):
93         (WebCore::FrameLoaderClientGdk::hasFrameView):
94         (WebCore::FrameLoaderClientGdk::frameLoadCompleted):
95         (WebCore::FrameLoaderClientGdk::saveViewStateToItem):
96         (WebCore::FrameLoaderClientGdk::restoreViewState):
97         (WebCore::FrameLoaderClientGdk::privateBrowsingEnabled):
98         (WebCore::FrameLoaderClientGdk::makeDocumentView):
99         (WebCore::FrameLoaderClientGdk::makeRepresentation):
100         (WebCore::FrameLoaderClientGdk::forceLayout):
101         (WebCore::FrameLoaderClientGdk::forceLayoutForNonHTML):
102         (WebCore::FrameLoaderClientGdk::setCopiesOnScroll):
103         (WebCore::FrameLoaderClientGdk::detachedFromParent1):
104         (WebCore::FrameLoaderClientGdk::detachedFromParent2):
105         (WebCore::FrameLoaderClientGdk::detachedFromParent3):
106         (WebCore::FrameLoaderClientGdk::detachedFromParent4):
107         (WebCore::FrameLoaderClientGdk::loadedFromPageCache):
108         (WebCore::FrameLoaderClientGdk::dispatchDidHandleOnloadEvents):
109         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveServerRedirectForProvisionalLoad):
110         (WebCore::FrameLoaderClientGdk::dispatchDidCancelClientRedirect):
111         (WebCore::FrameLoaderClientGdk::dispatchWillPerformClientRedirect):
112         (WebCore::FrameLoaderClientGdk::dispatchDidChangeLocationWithinPage):
113         (WebCore::FrameLoaderClientGdk::dispatchWillClose):
114         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveIcon):
115         (WebCore::FrameLoaderClientGdk::dispatchDidStartProvisionalLoad):
116         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveTitle):
117         (WebCore::FrameLoaderClientGdk::dispatchDidCommitLoad):
118         (WebCore::FrameLoaderClientGdk::dispatchDidFinishDocumentLoad):
119         (WebCore::FrameLoaderClientGdk::dispatchDidFirstLayout):
120         (WebCore::FrameLoaderClientGdk::dispatchShow):
121         (WebCore::FrameLoaderClientGdk::cancelPolicyCheck):
122         (WebCore::FrameLoaderClientGdk::dispatchDidLoadMainResource):
123         (WebCore::FrameLoaderClientGdk::revertToProvisionalState):
124         (WebCore::FrameLoaderClientGdk::clearUnarchivingState):
125         (WebCore::FrameLoaderClientGdk::willChangeTitle):
126         (WebCore::FrameLoaderClientGdk::finishedLoading):
127         (WebCore::FrameLoaderClientGdk::finalSetupForReplace):
128         (WebCore::FrameLoaderClientGdk::setDefersLoading):
129         (WebCore::FrameLoaderClientGdk::isArchiveLoadPending):
130         (WebCore::FrameLoaderClientGdk::cancelPendingArchiveLoad):
131         (WebCore::FrameLoaderClientGdk::clearArchivedResources):
132         (WebCore::FrameLoaderClientGdk::canHandleRequest):
133         (WebCore::FrameLoaderClientGdk::canShowMIMEType):
134         (WebCore::FrameLoaderClientGdk::representationExistsForURLScheme):
135         (WebCore::FrameLoaderClientGdk::generatedMIMETypeForURLScheme):
136         (WebCore::FrameLoaderClientGdk::provisionalLoadStarted):
137         (WebCore::FrameLoaderClientGdk::didFinishLoad):
138         (WebCore::FrameLoaderClientGdk::prepareForDataSourceReplacement):
139         (WebCore::FrameLoaderClientGdk::setTitle):
140         (WebCore::FrameLoaderClientGdk::setDocumentViewFromPageCache):
141         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveContentLength):
142         (WebCore::FrameLoaderClientGdk::dispatchDidFinishLoading):
143         (WebCore::FrameLoaderClientGdk::dispatchDidFailLoading):
144         (WebCore::FrameLoaderClientGdk::dispatchDidLoadResourceFromMemoryCache):
145         (WebCore::FrameLoaderClientGdk::dispatchDidFailProvisionalLoad):
146         (WebCore::FrameLoaderClientGdk::dispatchDidFailLoad):
147         (WebCore::FrameLoaderClientGdk::download):
148         (WebCore::FrameLoaderClientGdk::cancelledError):
149         (WebCore::FrameLoaderClientGdk::cannotShowURLError):
150         (WebCore::FrameLoaderClientGdk::interruptForPolicyChangeError):
151         (WebCore::FrameLoaderClientGdk::cannotShowMIMETypeError):
152         (WebCore::FrameLoaderClientGdk::fileDoesNotExistError):
153         (WebCore::FrameLoaderClientGdk::shouldFallBack):
154         (WebCore::FrameLoaderClientGdk::willUseArchive):
155         (WebCore::FrameLoaderClientGdk::saveDocumentViewToPageCache):
156         (WebCore::FrameLoaderClientGdk::canCachePage):
157         (WebCore::FrameLoaderClientGdk::dispatchCreatePage):
158         (WebCore::FrameLoaderClientGdk::dispatchUnableToImplementPolicy):
159         (WebCore::FrameLoaderClientGdk::setMainDocumentError):
160         (WebCore::FrameLoaderClientGdk::startDownload):
161         (WebCore::FrameLoaderClientGdk::updateGlobalHistoryForStandardLoad):
162         (WebCore::FrameLoaderClientGdk::updateGlobalHistoryForReload):
163         (WebCore::FrameLoaderClientGdk::shouldGoToHistoryItem):
164         * page/gdk/EventHandlerGdk.cpp:
165         (WebCore::EventHandler::passMouseDownEventToWidget):
166         (WebCore::EventHandler::eventActivatedView):
167         (WebCore::EventHandler::passSubframeEventToSubframe):
168         (WebCore::EventHandler::passWheelEventToWidget):
169         (WebCore::EventHandler::createDraggingClipboard):
170         * platform/gdk/EditorClientGdk.cpp:
171         (WebCore::EditorClientGdk::shouldDeleteRange):
172         (WebCore::EditorClientGdk::isContinuousSpellCheckingEnabled):
173         (WebCore::EditorClientGdk::isGrammarCheckingEnabled):
174         (WebCore::EditorClientGdk::spellCheckerDocumentTag):
175         (WebCore::EditorClientGdk::shouldBeginEditing):
176         (WebCore::EditorClientGdk::shouldEndEditing):
177         (WebCore::EditorClientGdk::shouldInsertText):
178         (WebCore::EditorClientGdk::shouldChangeSelectedRange):
179         (WebCore::EditorClientGdk::shouldApplyStyle):
180         (WebCore::EditorClientGdk::didBeginEditing):
181         (WebCore::EditorClientGdk::respondToChangedContents):
182         (WebCore::EditorClientGdk::didEndEditing):
183         (WebCore::EditorClientGdk::didWriteSelectionToPasteboard):
184         (WebCore::EditorClientGdk::didSetSelectionTypesForPasteboard):
185         (WebCore::EditorClientGdk::selectWordBeforeMenuEvent):
186         (WebCore::EditorClientGdk::isEditable):
187         (WebCore::EditorClientGdk::registerCommandForUndo):
188         (WebCore::EditorClientGdk::registerCommandForRedo):
189         (WebCore::EditorClientGdk::clearUndoRedoOperations):
190         (WebCore::EditorClientGdk::canUndo):
191         (WebCore::EditorClientGdk::canRedo):
192         (WebCore::EditorClientGdk::undo):
193         (WebCore::EditorClientGdk::redo):
194         (WebCore::EditorClientGdk::shouldInsertNode):
195         (WebCore::EditorClientGdk::pageDestroyed):
196         (WebCore::EditorClientGdk::smartInsertDeleteEnabled):
197         (WebCore::EditorClientGdk::toggleContinuousSpellChecking):
198         (WebCore::EditorClientGdk::textFieldDidBeginEditing):
199         (WebCore::EditorClientGdk::textFieldDidEndEditing):
200         (WebCore::EditorClientGdk::textDidChangeInTextField):
201         (WebCore::EditorClientGdk::doTextFieldCommandFromEvent):
202         (WebCore::EditorClientGdk::textWillBeDeletedInTextField):
203         (WebCore::EditorClientGdk::textDidChangeInTextArea):
204         * platform/gdk/RenderThemeGdk.cpp:
205         (WebCore::RenderThemeGdk::setCheckboxSize):
206         (WebCore::RenderThemeGdk::setRadioSize):
207         (WebCore::RenderThemeGdk::adjustTextFieldStyle):
208         * platform/gdk/TemporaryLinkStubs.cpp:
209         (FrameView::updateBorder):
210         (Widget::setEnabled):
211         (Widget::isEnabled):
212         (Widget::focusPolicy):
213         (Widget::enableFlushDrawing):
214         (Widget::disableFlushDrawing):
215         (Widget::lockDrawingFocus):
216         (Widget::unlockDrawingFocus):
217         (Widget::removeFromParent):
218         (Widget::paint):
219         (Widget::setIsSelected):
220         (Widget::invalidate):
221         (Widget::invalidateRect):
222         (PlatformMouseEvent::PlatformMouseEvent):
223         (WebCore::findNextSentenceFromIndex):
224         (WebCore::findSentenceBoundary):
225         (WebCore::findNextWordFromIndex):
226         (ChromeClientGdk::chromeDestroyed):
227         (ChromeClientGdk::windowRect):
228         (ChromeClientGdk::setWindowRect):
229         (ChromeClientGdk::pageRect):
230         (ChromeClientGdk::scaleFactor):
231         (ChromeClientGdk::focus):
232         (ChromeClientGdk::unfocus):
233         (ChromeClientGdk::createWindow):
234         (ChromeClientGdk::createModalDialog):
235         (ChromeClientGdk::show):
236         (ChromeClientGdk::canRunModal):
237         (ChromeClientGdk::runModal):
238         (ChromeClientGdk::setToolbarsVisible):
239         (ChromeClientGdk::toolbarsVisible):
240         (ChromeClientGdk::setStatusbarVisible):
241         (ChromeClientGdk::statusbarVisible):
242         (ChromeClientGdk::setScrollbarsVisible):
243         (ChromeClientGdk::scrollbarsVisible):
244         (ChromeClientGdk::setMenubarVisible):
245         (ChromeClientGdk::menubarVisible):
246         (ChromeClientGdk::setResizable):
247         (ChromeClientGdk::closeWindowSoon):
248         (ChromeClientGdk::canTakeFocus):
249         (ChromeClientGdk::takeFocus):
250         (ChromeClientGdk::canRunBeforeUnloadConfirmPanel):
251         (ChromeClientGdk::addMessageToConsole):
252         (ChromeClientGdk::runBeforeUnloadConfirmPanel):
253         (ChromeClientGdk::runJavaScriptAlert):
254         (ChromeClientGdk::runJavaScriptConfirm):
255         (ChromeClientGdk::runJavaScriptPrompt):
256         (ChromeClientGdk::setStatusbarText):
257         (ChromeClientGdk::shouldInterruptJavaScript):
258         (ChromeClientGdk::tabsToLinks):
259         (ChromeClientGdk::windowResizerRect):
260         (ChromeClientGdk::addToDirtyRegion):
261         (ChromeClientGdk::scrollBackingStore):
262         (ChromeClientGdk::updateBackingStore):
263         (PlugInInfoStore::createPluginInfoForPluginAtIndex):
264         (PlugInInfoStore::pluginCount):
265         (WebCore::PlugInInfoStore::supportsMIMEType):
266         (WebCore::refreshPlugins):
267         (SearchPopupMenu::saveRecentSearches):
268         (SearchPopupMenu::loadRecentSearches):
269         (SearchPopupMenu::SearchPopupMenu):
270         (PlatformScrollbar::PlatformScrollbar):
271         (PlatformScrollbar::~PlatformScrollbar):
272         (PlatformScrollbar::setEnabled):
273         (PlatformScrollbar::paint):
274         (PlatformScrollbar::updateThumbPosition):
275         (PlatformScrollbar::updateThumbProportion):
276         (PlatformScrollbar::setRect):
277         (FileChooser::FileChooser):
278         (FileChooser::~FileChooser):
279         (FileChooser::openFileChooser):
280         (FileChooser::basenameForWidth):
281         (ResourceHandle::willLoadFromCache):
282         (ResourceHandle::loadsBlocked):
283         (ResourceHandle::loadResourceSynchronously):
284         (Icon::Icon):
285         (Icon::~Icon):
286         (Icon::newIconForFile):
287         (Icon::paint):
288         (Font::drawComplexText):
289         (Font::floatWidthForComplexText):
290         (Font::offsetForPositionForComplexText):
291         (PageCache::close):
292         (Editor::ignoreSpelling):
293         (Editor::learnSpelling):
294         (Editor::isSelectionUngrammatical):
295         (Editor::isSelectionMisspelled):
296         (Editor::guessesForMisspelledSelection):
297         (Editor::guessesForUngrammaticalSelection):
298         (Editor::markMisspellingsAfterTypingToPosition):
299         (Editor::newGeneralClipboard):
300         (Pasteboard::generalPasteboard):
301         (Pasteboard::writeSelection):
302         (Pasteboard::writeURL):
303         (Pasteboard::writeImage):
304         (Pasteboard::clear):
305         (Pasteboard::canSmartReplace):
306         (Pasteboard::documentFragment):
307         (Pasteboard::plainText):
308         (Pasteboard::Pasteboard):
309         (Pasteboard::~Pasteboard):
310         (ContextMenu::ContextMenu):
311         (ContextMenu::~ContextMenu):
312         (ContextMenu::appendItem):
313         (ContextMenuItem::ContextMenuItem):
314         (ContextMenuItem::~ContextMenuItem):
315         (ContextMenuItem::releasePlatformDescription):
316         (ContextMenuItem::type):
317         (ContextMenuItem::setType):
318         (ContextMenuItem::action):
319         (ContextMenuItem::setAction):
320         (ContextMenuItem::title):
321         (ContextMenuItem::setTitle):
322         (ContextMenuItem::platformSubMenu):
323         (ContextMenuItem::setSubMenu):
324         (ContextMenuItem::setChecked):
325         (ContextMenuItem::setEnabled):
326         (WebCore::supportedKeySizes):
327         (WebCore::systemBeep):
328         (WebCore::userIdleTime):
329
330 2007-02-21  Antti Koivisto  <antti@apple.com>
331
332         Reviewed by Hyatt.
333
334         - fix http://bugs.webkit.org/show_bug.cgi?id=12820
335         REGRESSION (r19706): Caret not painted after popup, failing editing/pasteboard/4641033
336
337         Yet another attempt to figure out exactly who should paint the caret.
338
339         * editing/SelectionController.cpp:
340         (WebCore::SelectionController::isInsideNode):
341         * editing/SelectionController.h:
342         * rendering/RenderBlock.cpp:
343         (WebCore::RenderBlock::paintCaret):
344
345 2007-02-21  Mitz Pettel  <mitz@webkit.org>
346
347         Reviewed by Hyatt.
348
349         - fix http://bugs.webkit.org/show_bug.cgi?id=12818
350           REGRESSION (r19148): shacknews.com does not render completely
351
352         Test: fast/dynamic/staticY-marking-parents-regression.html
353
354         Changed calls to setChildNeedsLayout(true) during layout to
355         setChildNeedsLayout(true, false). Prior to r19148, the default behavior
356         of marking containers did not matter because the caller was the container
357         and was already marked, but r19148 added marking of the parent of
358         objects with static Y, which can be different from the caller and not
359         necessarily marked already.
360
361         * rendering/RenderBlock.cpp:
362         (WebCore::RenderBlock::collapseMargins):
363         (WebCore::RenderBlock::clearFloatsIfNeeded):
364         (WebCore::RenderBlock::layoutBlockChildren):
365         * rendering/RenderBox.cpp:
366         (WebCore::RenderBox::setStaticY):
367         * rendering/RenderFlexibleBox.cpp:
368         (WebCore::RenderFlexibleBox::layoutVerticalBox):
369
370 2007-02-21  Brady Eidson  <beidson@apple.com>
371
372         Reviewed by Dave Harrison
373
374         <rdar://problem/5014313> - Crash in FrameLoader::restoreScrollPositionAndViewState() 
375         after regaining network connection
376
377         * loader/FrameLoader.cpp:
378         (WebCore::FrameLoader::restoreScrollPositionAndViewState):  Leave an assertion for debug
379         build exploration, but gracefully handle the release build case
380
381 2007-02-21  Timothy Hatcher  <timothy@apple.com>
382
383         Rubber-stamped by Darin.
384
385         * bindings/objc/PublicDOMInterfaces.h: Add missing classes that are really public.
386         Also adds the deprecated selector for getComputedStyle: on DOMDocument.
387
388 2007-02-21  Justin Garcia  <justin.garcia@apple.com>
389
390         Reviewed by john
391         
392         <rdar://problem/5012665>
393         Removing indent from list moves the caret to the line below
394
395         Selection preservation during indent, outdent and list 
396         operations uses rangeFromLocationAndLength.  Ranges returned 
397         by rangeFromLocationAndLength were incorrect for locations 
398         just before the line breaks that are emitted after blocks.  
399         This is because TextIterator emitted bad ranges for these line 
400         breaks (ranges that started and ended *after* the block).  
401         The fix corrects the start but not the end.  This is acceptible 
402         because there is code in rangeFromLocationAndLength that corrects 
403         the ends of runs using the start of the run and VisiblePosition 
404         creation.
405         
406         * editing/TextIterator.cpp:
407         (WebCore::TextIterator::exitNode): Emit a position *inside* 
408         the block, after its contents.
409
410 2007-02-21  Adele Peterson  <adele@apple.com>
411
412         Reviewed by Darin.
413
414         Fix for <rdar://problem/4999030> Indexing into select element to get to items in the options collection is broken
415
416         Test: fast/forms/select-index-setter.html
417
418         Added indexSetter for HTMLSelectElement.
419
420         * WebCore.xcodeproj/project.pbxproj: Added JSHTMLSelectElementCustom.h
421
422         * bindings/js/JSHTMLOptionsCollectionCustom.cpp: (WebCore::JSHTMLOptionsCollection::indexSetter):
423           Moved code to selectIndexSetter so it can be shared between these classes.
424         * bindings/js/JSHTMLSelectElementCustom.cpp:
425         (WebCore::selectIndexSetter): Added.  Moved from JSHTMLOptionsCollection::indexSetter.
426         (WebCore::JSHTMLSelectElement::indexSetter): Calls selectIndexSetter.
427         * bindings/js/JSHTMLSelectElementCustom.h: Added.
428         * html/HTMLSelectElement.idl: Added HasCustomIndexSetter keyword.
429
430         * bindings/scripts/CodeGeneratorJS.pm: When generating "put" methods, if the propertyName is a number, call the indexSetter first,
431           and then call the version of lookupPut that will also try to use the parent's lookup table.  This matches the order of our
432           old code, before we autogenerated the JSHTMLSelectElement class.
433
434 2007-02-21  George Staikos  <staikos@kde.org>
435
436         Reviewed by Zack.
437
438         Add files to the build.
439
440         * WebCore.pro:
441
442 2007-02-21  Zack Rusin  <zrusin@trolltech.com>
443
444         Reviewed by Lars
445
446         Implementing popups for the Qt platform.
447
448         * WebCore.pro:
449         * platform/PopupMenu.h:
450         * platform/Widget.h:
451         * platform/qt/PopupMenuQt.cpp:
452         (WebCore::PopupMenu::PopupMenu):
453         (WebCore::PopupMenu::clear):
454         (WebCore::PopupMenu::populate):
455         (WebCore::PopupMenu::show):
456         (WebCore::PopupMenu::hide):
457         * platform/qt/QWebPopup.cpp: Added.
458         (WebCore::QWebPopup::QWebPopup):
459         (WebCore::QWebPopup::exec):
460         (WebCore::QWebPopup::hideEvent):
461         (WebCore::QWebPopup::activeChanged):
462         * platform/qt/QWebPopup.h: Added.
463         * platform/qt/WidgetQt.cpp:
464         (WebCore::Widget::canvas):
465
466 2007-02-21  George Staikos  <staikos@kde.org>
467
468         Reviewed by Zack.
469
470         Remove unneeded hack now.
471
472         * platform/qt/RenderThemeQt.cpp:
473         (WebCore::RenderThemeQt::setCheckboxSize):
474
475 2007-02-21  Zack Rusin  <zrusin@trolltech.com>
476
477         Reviewed by Lars
478
479         Fix rendering of lineedits and remove the spurious
480         padding on push-buttons.
481
482         * platform/qt/RenderThemeQt.cpp:
483         (WebCore::RenderThemeQt::baselinePosition):
484         (WebCore::RenderThemeQt::adjustTextFieldStyle):
485         (WebCore::RenderThemeQt::sizeForFont):
486         (WebCore::RenderThemeQt::setButtonPadding):
487
488 2007-02-21  Zack Rusin  <zrusin@trolltech.com>
489
490         Fix compilation.
491
492         * platform/qt/PasteboardQt.cpp:
493         (WebCore::Pasteboard::writeURL):
494         (WebCore::Pasteboard::writeImage):
495
496 2007-02-20  Adam Roben  <aroben@apple.com>
497
498         Preemptive build fix.
499
500         * platform/mac/FontCacheMac.mm: Remove unused (and non-existent) header.
501
502 2007-02-20  Adam Roben  <aroben@apple.com>
503
504         Fix the build the right way.
505
506         * platform/StringTruncator.cpp:
507         (WebCore::truncateString): Keep all widths as floats.
508
509 2007-02-20  Beth Dakin  <bdakin@apple.com>
510
511         Reviewed by Maciej.
512
513         Implement writeImage() on Pasteboard so that the context menus can 
514         call into the editor for the "Copy image" command instead of 
515         calling across the clients.
516
517         * WebCore.exp:
518         * WebCore.xcodeproj/project.pbxproj:
519         * editing/Editor.cpp:
520         (WebCore::Editor::copyImage): Call into the Pasteboard.
521         * editing/Editor.h:
522         * loader/mac/LoaderNSURLExtras.h: A new NSURL extra needed inside 
523         WebCore.
524         * loader/mac/LoaderNSURLExtras.m: Made this file Objective-C++ 
525         (from Objective-C) since the call into the MIMETypeRegistry will 
526         return a Vector.
527         (urlByRemovingComponent): Cast to build as Obj-C++
528         (urlWithDataRelativeToURL): Same.
529         (vectorContainsString): Helper.
530         (suggestedFilenameWithMIMEType): New function.
531         * page/ContextMenuClient.h: Remove copyImageToClipboard()
532         * page/ContextMenuController.cpp:
533         (WebCore::ContextMenuController::contextMenuItemSelected): Call 
534         into the editor instead of the client.
535         * page/mac/WebCoreViewFactory.h: New localized String.
536         * platform/LocalizedStrings.h: Same.
537         * platform/MimeTypeRegistry.h: Expose two additional functions for 
538         MIMEType information from WebCore System Interface.
539         * platform/Pasteboard.h:
540         * platform/SharedBuffer.h: Make platformData() and platformDataSize
541         () public since they are needed to write the image to the 
542         pasteboard.
543         * platform/mac/LocalizedStringsMac.mm: New localized string.
544         (WebCore::copyImageUnknownFileLabel):
545         * platform/mac/MimeTypeRegistryMac.mm:
546         (WebCore::MimeTypeRegistry::getExtensionsForMIMEType):
547         (WebCore::MimeTypeRegistry::getPreferredExtensionForMIMEType):
548         * platform/mac/PasteboardMac.mm:
549         (WebCore::writableTypesForImage):
550         (WebCore::Pasteboard::writeURL): Write the correct types if the url 
551         is for an image.
552         (WebCore::fileWrapperForImage):
553         (WebCore::Pasteboard::writeFileWrapperAsRTFDAttachment):
554         (WebCore::Pasteboard::writeImage):
555         * platform/mac/WebCoreNSStringExtras.h: Added. Some the the 
556         NSStringExtras that were in WebKit are now needed by WebCore. To 
557         avoid having two copies of these functions, I just moved the 
558         implementations to WebCore. The WebKit functions just call into 
559         WebCore.
560         * platform/mac/WebCoreNSStringExtras.mm: Added.
561         (hasCaseInsensitiveSuffix):
562         (hasCaseInsensitiveSubstring):
563         (filenameByFixingIllegalCharacters):
564         * platform/mac/WebCoreSystemInterface.h: 
565         wkGetPreferredExtensionForMIMEType and wkGetExtensionsForMIMEType 
566         are now needed in WebCore as well as WebKit.
567         * platform/mac/WebCoreSystemInterface.mm:
568
569 2007-02-20  Adam Roben  <aroben@apple.com>
570
571         Build fix.
572
573         * platform/StringTruncator.cpp:
574         (WebCore::truncateString): Added explicit casts.
575
576 2007-02-20  Adam Roben  <aroben@apple.com>
577
578         Reviewed by Darin and Anders.
579
580         Fix <rdar://problem/4736215> Make WebCoreStringTruncator use WebCore types
581
582         * WebCore.exp: Updated symbols.
583         * WebCore.xcodeproj/project.pbxproj: Updated file names.
584         * bridge/mac/WebCoreStringTruncator.h: Removed.
585         * bridge/mac/WebCoreStringTruncator.mm: Removed.
586         * platform/StringTruncator.cpp: Added. Moved from bridge/mac/WebCoreStringTruncator.mm.
587         (WebCore::textBreakAtOrPreceding): Added.
588         (WebCore::boundedTextBreakFollowing): Added.
589         (WebCore::centerTruncateToBuffer):
590         (WebCore::rightTruncateToBuffer):
591         (WebCore::stringWidth): Now takes a const Font& instead of a Font*.
592         (WebCore::truncateString):
593         (WebCore::StringTruncator::centerTruncate):
594         (WebCore::StringTruncator::rightTruncate):
595         (WebCore::StringTruncator::width):
596         * platform/StringTruncator.h: Added.
597         * platform/TextBreakIterator.h: Added isTextBreak declaration.
598         * platform/TextBreakIteratorICU.cpp:
599         (WebCore::isTextBreak): Implemented.
600         * platform/mac/FileChooserMac.mm:
601         (WebCore::FileChooser::basenameForWidth): Updated for changes to WebCoreStringTruncator.
602         * platform/qt/TextBreakIteratorQt.cpp:
603         (WebCore::isTextBreak): Stubbed out.
604
605 2007-02-20  Justin Garcia  <justin.garcia@apple.com>
606
607         Reviewed by harrison
608
609         <rdar://problem/5006779>
610         REGRESSION: Paste and Match Style of quoted text onto empty line yields quoted text
611         
612         We decided to change the copy/paste behavior in both
613         the Paste and the Paste and Match Style cases.
614
615         * editing/markup.cpp:
616         (WebCore::createMarkup): Don't add mail blockquote wrappers
617         unless the user selected one or more paragraphs.
618
619 2007-02-20  Timothy Hatcher  <timothy@apple.com>
620
621         Reviewed by Mark Rowe.
622
623         <rdar://problem/4912899> WebCore project ObjC @property cleanup
624
625         * bindings/objc/DOMObject.h: Add the new style @property
626         * bindings/objc/PublicDOMInterfaces.h: Update to the new style @property
627         * bindings/scripts/CodeGeneratorObjC.pm: Export both new and old style @properties
628
629 2007-02-20  Timothy Hatcher  <timothy@apple.com>
630
631         Reviewed by Sam Weinig.
632
633         <rdar://problem/5007248> need to export symbols for DOM exception constants
634
635         * WebCore.exp: Adds DOMEventException, DOMException, DOMRangeException, DOMXPathException
636
637 2007-02-20  Timothy Hatcher  <timothy@apple.com>
638
639         Reviewed by Darin.
640
641         <rdar://problem/4900579> WebKit -finalize methods are not thread-safe; design change needed
642
643         Call WebCoreObjCFinalizeOnMainThread from the initialize method of all the classes
644         that have a finalizer that needs called on the main thread.
645
646         * WebCore.exp:
647         * WebCore.xcodeproj/project.pbxproj:
648         * bindings/objc/WebScriptObject.mm:
649         (+[WebScriptObject initialize]):
650         * bridge/mac/WebCoreScriptDebugger.mm:
651         (+[WebCoreScriptDebugger initialize]):
652         * platform/mac/SharedBufferMac.mm:
653         (+[SharedBufferData initialize]):
654         * platform/mac/WebCoreObjCExtras.c: Added.
655         (WebCoreObjCFinalizeOnMainThread):
656         * platform/mac/WebCoreObjCExtras.h: Added.
657
658 2007-02-20  Geoffrey Garen  <ggaren@apple.com>
659
660         Not not reviewed by Mitz Pettel.
661
662         Fixed http://bugs.webkit.org/show_bug.cgi?id=12827 | <rdar://problem/5006671> 
663         REGRESSION: -[DOMCSSStyleDeclaration setValue:forKey:] doesn't have an 
664         immediate effect
665         
666         Let's just pretend this never happened.
667         
668         I attempted a layout test but I couldn't get the old code to fail because 
669         there's no obvious way to isolate the ObjC bindings in a test that's 
670         controlled by JS.
671         
672         * bindings/objc/WebScriptObject.mm:
673         (_didExecute):
674
675 2007-02-20  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
676
677         Reviewed by Maciej S.
678
679         Gdk build fixes for recent refactorings.
680
681         * Projects/gdk/webcore-gdk.bkl:
682         * WebCoreSources.bkl:
683         * page/gdk/DragControllerGdk.cpp:
684         (WebCore::DragController::dragOperation):
685         (WebCore::DragController::maxDragImageSize):
686         * page/gdk/EventHandlerGdk.cpp:
687         (WebCore::EventHandler::createDraggingClipboard):
688         * platform/DragImage.h:
689         * platform/gdk/ChromeClientGdk.h:
690         * platform/gdk/CursorGdk.cpp:
691         (WebCore::verticalTextCursor):
692         (WebCore::cellCursor):
693         (WebCore::contextMenuCursor):
694         (WebCore::noDropCursor):
695         (WebCore::copyCursor):
696         (WebCore::progressCursor):
697         (WebCore::aliasCursor):
698         (WebCore::noneCursor):
699         (WebCore::notAllowedCursor):
700         * platform/gdk/EditorClientGdk.cpp:
701         (WebCore::EditorClientGdk::shouldChangeSelectedRange):
702         (WebCore::EditorClientGdk::isEditable):
703         (WebCore::EditorClientGdk::textFieldDidBeginEditing):
704         (WebCore::EditorClientGdk::textFieldDidEndEditing):
705         (WebCore::EditorClientGdk::textDidChangeInTextField):
706         (WebCore::EditorClientGdk::doTextFieldCommandFromEvent):
707         (WebCore::EditorClientGdk::textWillBeDeletedInTextField):
708         (WebCore::EditorClientGdk::textDidChangeInTextArea):
709         * platform/gdk/EditorClientGdk.h:
710         * platform/gdk/FrameGdk.cpp:
711         (WebCore::Frame::print):
712         (WebCore::Frame::issueTransposeCommand):
713         (WebCore::Frame::respondToChangedSelection):
714         (WebCore::Frame::cleanupPlatformScriptObjects):
715         (WebCore::Frame::isCharacterSmartReplaceExempt):
716         (WebCore::Frame::dragImageForSelection):
717         * platform/gdk/FrameGdk.h:
718         * platform/gdk/MimeTypeRegistryGdk.cpp: Added.
719         * platform/gdk/TemporaryLinkStubs.cpp:
720         (ChromeClientGdk::tabsToLinks):
721         (ChromeClientGdk::windowResizerRect):
722         (ChromeClientGdk::addToDirtyRegion):
723         (ChromeClientGdk::scrollBackingStore):
724         (ChromeClientGdk::updateBackingStore):
725         * webcore-base.bkl:
726
727 2007-02-20  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
728
729         Reviewed by Darin.
730
731         Allow over-writting Product, ProductSub, Vendor and VendorSub
732         js properties via #define WEBCORE_NAVIGATOR_*
733
734         * bindings/js/kjs_navigator.cpp:
735         (KJS::Navigator::getValueProperty):
736
737 2007-02-20  Darin Adler  <darin@apple.com>
738
739         Reviewed by Anders.
740
741         - prepare to fix some "stop loading" bugs by moving state from the
742           FrameLoader class to the DocumentLoader class
743
744         * WebCore.exp: Update since cancelMainResourceLoad is now on the document loader.
745
746         * html/HTMLDocument.h:
747         * html/HTMLDocument.cpp:
748         (WebCore::HTMLDocument::HTMLDocument): Removed unused bodyElement and htmlElement
749         data members.
750         (WebCore::HTMLDocument::lastModified): Call getResponseModifiedHeader directly on
751         the document loader.
752
753         * loader/DocumentLoader.h: Moved m_mainResourceLoader, m_subresourceLoaders, and
754         m_plugInStreamLoaders here.
755         * loader/DocumentLoader.cpp:
756         (WebCore::cancelAll): Moved here from FrameLoader.
757         (WebCore::setAllDefersLoading): Ditto.
758         (WebCore::DocumentLoader::mainResourceData): Moved the body of FrameLoader's
759         mainResourceData function here.
760         (WebCore::DocumentLoader::stopLoading): Replaced calls to hasMainResourceLoader
761         and cancelMainResourceLoad with code that works directly on m_mainResourceLoader.
762         Call the stop functions moved from FrameLoader here on ourselves.
763         (WebCore::DocumentLoader::setupForReplaceByMIMEType): Ditto.
764         (WebCore::DocumentLoader::setPrimaryLoadComplete): Moved the code to store the
765         main resource data here; it doesn't require separate functions.
766         (WebCore::DocumentLoader::isLoadingInAPISense): Removed call to isLoadingSubresources
767         and instead just check if the m_subresourceLoaders set is empty.
768         (WebCore::DocumentLoader::setDefersLoading): Moved code here from FrameLoader.
769         (WebCore::DocumentLoader::stopLoadingPlugIns): Ditto.
770         (WebCore::DocumentLoader::stopLoadingSubresources): Ditto.
771         (WebCore::DocumentLoader::addSubresourceLoader): Ditto.
772         (WebCore::DocumentLoader::removeSubresourceLoader): Ditto.
773         (WebCore::DocumentLoader::addPlugInStreamLoader): Ditto.
774         (WebCore::DocumentLoader::removePlugInStreamLoader): Ditto.
775         (WebCore::DocumentLoader::isLoadingSubresources): Ditto.
776         (WebCore::DocumentLoader::isLoadingPlugIns): Ditto.
777         (WebCore::DocumentLoader::startLoadingMainResource): Ditto.
778         (WebCore::DocumentLoader::cancelMainResourceLoad): Ditto.
779
780         * loader/FrameLoader.h: Removed stopLoadingPlugIns, stopLoadingSubresources,
781         cancelMainResourceLoad, hasMainResourceLoader, isLoadingSubresources,
782         mainResourceData, releaseMainResourceLoader, lastModified, startLoadingMainResource,
783         isLoadingPlugIns, m_mainResourceLoader, m_subresourceLoaders, m_plugInStreamLoaders,
784         m_responseRefreshHeader, and m_responseModifiedHeader.
785         * loader/FrameLoader.cpp:
786         (WebCore::FrameLoader::setDefersLoading): Call setDefersLoading on all the document
787         loaders.
788         (WebCore::FrameLoader::stopLoading): Get rid of code to set m_responseRefreshHeader
789         and m_responseModifiedHeader.
790         (WebCore::FrameLoader::receivedFirstData): Call httpHeaderField on the response
791         here to get the Refresh, instead of storing it in a data member.
792         (WebCore::FrameLoader::addPlugInStreamLoader): Change to just call this on the
793         document loader.
794         (WebCore::FrameLoader::removePlugInStreamLoader): Ditto.
795         (WebCore::FrameLoader::isLoading): Change to call isLoadingSubresources and
796         isLoadingPlugIns on the document loader.
797         (WebCore::FrameLoader::addSubresourceLoader): Change to just call this on the
798         document loader.
799         (WebCore::FrameLoader::removeSubresourceLoader): Ditto.
800         (WebCore::FrameLoader::commitProvisionalLoad): Call stopLoadingSubresources and
801         stopLoadingPlugIns on the document loader. Removed code to set
802         m_responseModifiedHeader.
803         (WebCore::FrameLoader::startLoading): Call isLoadingMainResource and
804         startLoadingMainResource on the document loader.
805
806         * loader/ImageDocument.cpp: (WebCore::ImageTokenizer::finish): Call
807         mainResourceData() on the document loader instead of the frame loader.
808
809         - other changes
810
811         * loader/DocLoader.cpp:
812         (WebCore::DocLoader::checkCacheObjectStatus): Fixed indentation.
813
814 2007-02-20  Zack Rusin  <zrusin@trolltech.com>
815
816         Reviewed by Lars
817
818         Fix focus handling and make the forms
819         work as expected.
820
821         * platform/qt/ScrollViewQt.cpp:
822         (WebCore::ScrollView::setScrollArea):
823         * platform/qt/WidgetQt.cpp:
824         (WebCore::WidgetPrivate::WidgetPrivate):
825         (WebCore::WidgetPrivate::canvas):
826         (WebCore::Widget::hasFocus):
827         (WebCore::Widget::setFocus):
828         (WebCore::Widget::clearFocus):
829         (WebCore::Widget::setFont):
830         (WebCore::Widget::setQWidget):
831         (WebCore::Widget::focusPolicy):
832
833 2007-02-20  Mitz Pettel  <mitz@webkit.org>
834
835         Reviewed by Darin and then Sam.
836
837         - fix http://bugs.webkit.org/show_bug.cgi?id=10735
838           Clicking in SVG results causes WebKit to consume 100% CPU for several minutes
839
840         No test since there is no change in functionality.
841
842         * CMakeLists.txt:
843         * WebCore.pro:
844         * WebCore.xcodeproj/project.pbxproj: Added PositionIterator.{cpp,h}.
845         * WebCoreSources.bkl:
846         * dom/Position.cpp:
847         (WebCore::Position::Position): Added converting constructor from
848         PositionIterator.
849         (WebCore::Position::previous): Changed assert() to ASSERT().
850         (WebCore::Position::next): Ditto.
851         (WebCore::isStreamer): Changed the argument to a PositionIterator.
852         (WebCore::Position::upstream): Changed to use PositionIterator.
853         (WebCore::Position::downstream): Ditto.
854         (WebCore::Position::inRenderedText): Made public.
855         (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight): Changed
856         into a static member function.
857         (WebCore::Position::nodeIsUserSelectNone): Ditto.
858         * dom/Position.h:
859         * dom/PositionIterator.cpp: Added. A Position iterator with constant-time
860         increment, decrement, and several predicates on the Position it is at.
861         Conversion to/from Position is O(n) in the offset.
862         (WebCore::PositionIterator::increment):
863         (WebCore::PositionIterator::decrement):
864         (WebCore::PositionIterator::atStart):
865         (WebCore::PositionIterator::atEnd):
866         (WebCore::PositionIterator::atStartOfNode):
867         (WebCore::PositionIterator::atEndOfNode):
868         (WebCore::PositionIterator::isCandidate):
869         * dom/PositionIterator.h: Added.
870         (WebCore::PositionIterator::PositionIterator):
871         (WebCore::PositionIterator::node):
872         (WebCore::PositionIterator::offsetInLeafNode):
873         * editing/htmlediting.cpp:
874         (WebCore::nextCandidate): Changed to use PositionIterator.
875         (WebCore::previousCandidate): Changed to use PositionIterator.
876
877 2007-02-20  Rob Buis  <buis@kde.org>
878
879         Reviewed by Darin.
880
881         http://bugs.webkit.org/show_bug.cgi?id=12439
882         SVG parser complains about points attribute in polygon and polyline element
883
884         Return true when the parsed points specification is valid.
885
886         * ksvg2/svg/SVGParserUtilities.cpp:
887         (WebCore::parseNumber):
888         (WebCore::SVGPolyParser::parsePoints):
889         * ksvg2/svg/SVGPolyElement.cpp:
890         (WebCore::SVGPolyElement::parseMappedAttribute):
891
892 2007-02-20  Zack Rusin  <zrusin@trolltech.com>
893
894         Reviewed by Lars
895
896         Make editing of forms work plus make sure that non-void methods
897         always return something.
898
899         * WebCore.pro:
900         * loader/qt/DocumentLoaderQt.cpp:
901         (WebCore::DocumentLoader::getResponseModifiedHeader):
902         * platform/qt/ClipboardQt.cpp:
903         (WebCore::ClipboardQt::setData):
904
905 2007-02-20  Zack Rusin  <zrusin@trolltech.com>
906
907         Reviewed by Lars
908
909         Refactor and fix the implementation of theming of
910         form elements on the Qt platform.
911
912         * platform/qt/RenderThemeQt.cpp:
913         (WebCore::theme):
914         (WebCore::RenderThemeQt::RenderThemeQt):
915         (WebCore::RenderThemeQt::supportsHover):
916         (WebCore::RenderThemeQt::supportsFocusRing):
917         (WebCore::RenderThemeQt::baselinePosition):
918         (WebCore::RenderThemeQt::controlSupportsTints):
919         (WebCore::RenderThemeQt::supportsControlTints):
920         (WebCore::RenderThemeQt::adjustRepaintRect):
921         (WebCore::RenderThemeQt::paintResizeControl):
922         (WebCore::RenderThemeQt::platformActiveSelectionBackgroundColor):
923         (WebCore::RenderThemeQt::platformInactiveSelectionBackgroundColor):
924         (WebCore::RenderThemeQt::platformActiveSelectionForegroundColor):
925         (WebCore::RenderThemeQt::platformInactiveSelectionForegroundColor):
926         (WebCore::RenderThemeQt::systemFont):
927         (WebCore::RenderThemeQt::minimumMenuListSize):
928         (WebCore::RenderThemeQt::adjustSliderThumbSize):
929         (WebCore::RenderThemeQt::paintCheckbox):
930         (WebCore::RenderThemeQt::paintRadio):
931         (WebCore::RenderThemeQt::setRadioSize):
932         (WebCore::RenderThemeQt::adjustButtonStyle):
933         (WebCore::RenderThemeQt::setButtonSize):
934         (WebCore::RenderThemeQt::adjustTextFieldStyle):
935         (WebCore::RenderThemeQt::adjustMenuListStyle):
936         (WebCore::RenderThemeQt::paintMenuList):
937         (WebCore::RenderThemeQt::paintMenuListButton):
938         (WebCore::RenderThemeQt::adjustMenuListButtonStyle):
939         (WebCore::RenderThemeQt::paintSliderTrack):
940         (WebCore::RenderThemeQt::paintSliderThumb):
941         (WebCore::RenderThemeQt::paintSearchField):
942         (WebCore::RenderThemeQt::adjustSearchFieldStyle):
943         (WebCore::RenderThemeQt::adjustSearchFieldCancelButtonStyle):
944         (WebCore::RenderThemeQt::paintSearchFieldCancelButton):
945         (WebCore::RenderThemeQt::adjustSearchFieldDecorationStyle):
946         (WebCore::RenderThemeQt::paintSearchFieldDecoration):
947         (WebCore::RenderThemeQt::adjustSearchFieldResultsDecorationStyle):
948         (WebCore::RenderThemeQt::paintSearchFieldResultsDecoration):
949         (WebCore::RenderThemeQt::supportsFocus):
950         (WebCore::RenderThemeQt::getStylePainterAndWidgetFromPaintInfo):
951         (WebCore::RenderThemeQt::applyTheme):
952         (WebCore::RenderThemeQt::setSizeFromFont):
953         (WebCore::RenderThemeQt::sizeForFont):
954         (WebCore::RenderThemeQt::setButtonPadding):
955         (WebCore::RenderThemeQt::setPopupPadding):
956         (WebCore::RenderThemeQt::setPrimitiveSize):
957         * platform/qt/RenderThemeQt.h: Added.
958
959 2007-02-19  Lars Naesbye Christensen <lars@naesbye.dk>
960
961         Reviewed by Maciej.
962
963         http://bugs.webkit.org/show_bug.cgi?id=12815
964         Two image files not included in project file
965
966         * WebCore.xcodeproj/project.pbxproj: Added crossHairCursor.png and
967         notAllowedCursor.png.
968
969 2007-02-19  Geoffrey Garen  <ggaren@apple.com>
970
971         Reviewed by Adam Roben.
972
973         Fixed some leaks in RenderThemeMac.
974         
975         No test case because 'leaks' can't detect these leaks inside DRT, even if
976         DRT forces the WebView to paint. ('leaks' can detect these leaks inside
977         Safari. Weird.)
978         
979         * rendering/RenderThemeMac.h:
980             - Renamed data members to m_*, to match our style guidelines.
981             - Renamed *Is* to is**, to match our style guidelines.
982             - Removed a few unnecessary data members.
983             - Made cached values like m_checkbox mutable, since they can change
984             inside functions that don't change the logical state of a RenderTheme
985             object. (The alternative was to make some const functions non-const.)
986
987         (WebCore::RenderThemeMac::paintMenuList): Took CFType pointers that just 
988         used to leak and placed them in RetainPtrs.
989         (WebCore::RenderThemeMac::paintMenuListButtonGradients): ditto
990
991         Factored inline implementations of lazy initialization into these accessor
992         functions, for better encapsulation:
993         
994         (WebCore::RenderThemeMac::checkbox):
995         (WebCore::RenderThemeMac::radio):
996         (WebCore::RenderThemeMac::button):
997         (WebCore::RenderThemeMac::popupButton):
998         (WebCore::RenderThemeMac::search):
999         (WebCore::RenderThemeMac::sliderThumbHorizontal): The inline version of
1000         this initialization used to confuse the retained data member with a local
1001         stack value, causing both a leak and a failure to initialize. Fixed now.
1002         (WebCore::RenderThemeMac::sliderThumbVertical): ditto
1003         (WebCore::RenderThemeMac::resizeCornerImage):
1004
1005 2007-02-19  Mitz Pettel  <mitz@webkit.org>
1006
1007         Reviewed by Hyatt.
1008
1009         - fix http://bugs.webkit.org/show_bug.cgi?id=12817
1010           REGRESSION (r18634): Table border-collapse problems with right margin
1011
1012         Test: fast/repaint/table-outer-border.html
1013
1014         * rendering/RenderTable.cpp:
1015         (WebCore::RenderTable::layout): Reordered to initialize horizontal overflow
1016         after table sections have computed their outer horizontal borders.
1017
1018 2007-02-19  John Sullivan  <sullivan@apple.com>
1019
1020         Reviewed by Darin
1021         
1022         - fixed <rdar://problem/4613701> REGRESSION: A line break in the source HTML of a link becomes visible after drag & drop
1023
1024         * page/DragController.cpp:
1025         (WebCore::DragController::startDrag):
1026         Call simplifyWhiteSpace() on the proposed link title to match what's displayed on the web page, instead of using the
1027         raw source HTML text.
1028
1029 2007-02-19  David Hyatt  <hyatt@apple.com>
1030
1031         Fix for Radar 4981605, regression where button grows randomly when a select is
1032         opened.  With the new form controls, the WinIE quirk for using line width
1033         ended up being used for them more.
1034
1035         This patch removes the quirk after verifying that Firefox doesn't implement
1036         the quirk at all.  usesLineWidth is being renamed to shrinksToAvoidFloats to
1037         make it clear that the new method only applies to block objects that avoid floats
1038         and that have auto width.
1039
1040         Also fixed a regression where whitespace after a floating <select> at the start
1041         of a block got incorrectly rendered.  Make sure skipWhitespace always skips
1042         through floating/positioned elements regardless of the whitespace setting (this
1043         way the white-space:pre value on floating <select>s doesn't cause trouble).
1044
1045         Reviewed by darin
1046
1047         fast/block/float/float-avoidance.html
1048
1049         * rendering/RenderBlock.cpp:
1050         (WebCore::RenderBlock::collapseMargins):
1051         (WebCore::RenderBlock::clearFloatsIfNeeded):
1052         (WebCore::RenderBlock::layoutBlockChildren):
1053         (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout):
1054         * rendering/RenderBox.cpp:
1055         (WebCore::RenderBox::containingBlockWidth):
1056         * rendering/RenderObject.cpp:
1057         (WebCore::RenderObject::shrinkToAvoidFloats):
1058         * rendering/RenderObject.h:
1059         * rendering/bidi.cpp:
1060         (WebCore::RenderBlock::skipWhitespace):
1061
1062 2007-02-19  Zalan Bujtas  <zbujtas@gmail.com>
1063
1064         Reviewed by Darin.
1065
1066         Update stylesheet href, when document's baseUrl changes. It needs
1067         update when the stylesheet is constructed before the parser hits the base tag.
1068         http://bugs.webkit.org/show_bug.cgi?id=12214
1069
1070         * css/StyleSheet.h:
1071         (WebCore::StyleSheet::setHref):
1072         * dom/Document.cpp:
1073         (WebCore::Document::setBaseURL):
1074         * dom/Document.h:
1075
1076 2007-02-19  Mitz Pettel  <mitz@webkit.org>
1077
1078         Reviewed by Adam.
1079
1080         - fix http://bugs.webkit.org/show_bug.cgi?id=11518
1081           REGRESSION (r14376): View Source not available after Back navigation from a non-HTML page
1082
1083         The FrameLoader's responseMIMEType was not being updated when a page was
1084         brought back from the page cache.
1085         
1086         Moved the line that updates the MIME type from commitProvisionalLoad() to
1087         transitionToCommitted().
1088
1089         * loader/FrameLoader.cpp:
1090         (WebCore::FrameLoader::commitProvisionalLoad):
1091         (WebCore::FrameLoader::transitionToCommitted):
1092
1093 2007-02-19  Anders Carlsson  <acarlsson@apple.com>
1094
1095         Reviewed by Oliver.
1096
1097         Make DragController::maxDragImageSize a function to get rid of the global initializer.
1098         
1099         * page/DragController.cpp:
1100         (WebCore::DragController::doImageDrag):
1101         * page/DragController.h:
1102         * page/mac/DragControllerMac.mm:
1103         (WebCore::DragController::maxDragImageSize):
1104         * page/qt/DragControllerQt.cpp:
1105         (WebCore::DragController::maxDragImageSize):
1106
1107 2007-02-19  Darin Adler  <darin@apple.com>
1108
1109         Reviewed by Hyatt.
1110
1111         - <rdar://problem/5006414> REGRESSION: Crash occurs at WebCore::Frame::loader()
1112           when loading AFL Ladder widget
1113
1114         * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::openURL):
1115         Add missing null check so this fails without crashing when called on an element
1116         that's no longer in a frame.
1117
1118 2007-02-19  Antti Koivisto  <antti@apple.com>
1119
1120         Reviewed by Mitz.
1121
1122         - fix for http://bugs.webkit.org/show_bug.cgi?id=10990
1123           REGRESSION: Pressing a pop-up's access key doesn't focus it
1124           <rdar://problem/4823138>
1125           
1126         Focus the select element too in accessKeyAction.
1127
1128         * html/HTMLSelectElement.cpp:
1129         (WebCore::HTMLSelectElement::accessKeyAction):
1130
1131 2007-02-18  Antti Koivisto  <antti@apple.com>
1132
1133         Reviewed by Hyatt.
1134
1135         - really fix http://bugs.webkit.org/show_bug.cgi?id=11974
1136         REGRESSION: Caret drawn over input when smaller than font size on initial focus
1137         <rdar://problem/4960258>
1138         
1139         Avoid double painting caret when it is on a block element.
1140         
1141         Layout test for this already went in previous try (it only fails in pixel mode) in r19626.
1142
1143         * rendering/RenderBlock.cpp:
1144         (WebCore::RenderBlock::paintCaret):
1145
1146 2007-02-19  Lars Knoll <lars@trolltech.com>
1147
1148         Added a one line patch from Olliej to create the
1149         clipboard on demand (to stop things from crashing), 
1150         and added lots of notImplemented() warnings all 
1151         over the place.
1152
1153         * platform/qt/ClipboardQt.cpp:
1154         (WebCore::ClipboardQt::ClipboardQt):
1155         (WebCore::ClipboardQt::clearData):
1156         (WebCore::ClipboardQt::clearAllData):
1157         (WebCore::ClipboardQt::getData):
1158         (WebCore::ClipboardQt::setData):
1159         (WebCore::ClipboardQt::types):
1160         (WebCore::ClipboardQt::dragLocation):
1161         (WebCore::ClipboardQt::dragImage):
1162         (WebCore::ClipboardQt::setDragImage):
1163         (WebCore::ClipboardQt::dragImageElement):
1164         (WebCore::ClipboardQt::setDragImageElement):
1165         (WebCore::ClipboardQt::createDragImage):
1166         (WebCore::ClipboardQt::declareAndWriteDragImage):
1167         (WebCore::ClipboardQt::writeURL):
1168         (WebCore::ClipboardQt::writeRange):
1169         (WebCore::ClipboardQt::hasData):
1170         * platform/qt/DragDataQt.cpp:
1171         (WebCore::DragData::canSmartReplace):
1172         (WebCore::DragData::containsColor):
1173         (WebCore::DragData::containsPlainText):
1174         (WebCore::DragData::asPlainText):
1175         (WebCore::DragData::asColor):
1176         (WebCore::DragData::createClipboard):
1177         (WebCore::DragData::containsCompatibleContent):
1178         (WebCore::DragData::containsURL):
1179         (WebCore::DragData::asURL):
1180         (WebCore::DragData::asFragment):
1181
1182 2007-02-19  Lars Knoll <lars@trolltech.com>
1183
1184         Compile again.
1185
1186         * platform/qt/ClipboardQt.cpp:
1187         (WebCore::ClipboardQt::types):
1188
1189 2007-02-17  Lars Knoll <lars@trolltech.com>
1190
1191         Reviewed by Maciej.
1192         
1193         Additional coding by Maciej, additional review by Oliver.
1194
1195         Get rid of the FrameMac and FrameQt classes. Instead
1196         move all methods into Frame directly, and implement
1197         some platform specific methods in foo/FrameFoo.cpp.
1198
1199         Some general cleanup in Frame:
1200         * Move some methods out of Frame, to the place where they 
1201         belong.
1202         * Unify the different ways of creating the JavaScript wrappers
1203         for <object>, <embed> and <applet>
1204         * Some cleanup of the WebCoreFrameBridge
1205
1206         * ForwardingHeaders/bindings/NP_jsobject.h: Added.
1207         * ForwardingHeaders/bindings/npruntime_impl.h: Added.
1208         * ForwardingHeaders/bindings/runtime_root.h: Added.
1209         * WebCore.exp:
1210         * WebCore.xcodeproj/project.pbxproj:
1211         * bindings/js/kjs_binding.cpp:
1212         (KJS::ScriptInterpreter::shouldInterruptScript):
1213         * bindings/objc/DOM.mm:
1214         (-[DOMNode KJS::Bindings::]):
1215         * bindings/objc/DOMInternal.mm:
1216         (-[WebScriptObject _initializeScriptDOMNodeImp]):
1217         * bridge/EditorClient.h:
1218         * bridge/mac/FrameViewMac.mm:
1219         (WebCore::FrameView::updateBorder):
1220         (WebCore::FrameView::updateDashboardRegions):
1221         * bridge/mac/WebCoreAXObject.mm:
1222         (-[WebCoreAXObject rendererForView:]):
1223         * dom/Position.cpp:
1224         (WebCore::Position::next):
1225         * editing/CommandByName.cpp:
1226         (WebCore::Frame::execCopy):
1227         (WebCore::Frame::execCut):
1228         (WebCore::Frame::execPaste):
1229         * editing/Editor.cpp:
1230         (WebCore::Editor::canEdit):
1231         (WebCore::Editor::pasteWithPasteboard):
1232         (WebCore::Editor::paste):
1233         (WebCore::Editor::pasteAsPlainText):
1234         * editing/Editor.h:
1235         * editing/JSEditor.cpp:
1236         * html/HTMLAppletElement.cpp:
1237         (WebCore::HTMLAppletElement::getInstance):
1238         * html/HTMLEmbedElement.cpp:
1239         (WebCore::HTMLEmbedElement::getInstance):
1240         * html/HTMLFormElement.cpp:
1241         (WebCore::HTMLFormElement::formData):
1242         * html/HTMLObjectElement.cpp:
1243         (WebCore::HTMLObjectElement::getInstance):
1244         * loader/FrameLoader.cpp:
1245         (WebCore::FrameLoader::clear):
1246         (WebCore::FrameLoader::detachFromParent):
1247         * loader/mac/ImageDocumentMac.mm:
1248         (WebCore::finishImageLoad):
1249         * loader/qt/DocumentLoaderQt.cpp:
1250         * page/Chrome.cpp:
1251         (WebCore::Chrome::shouldInterruptJavaScript):
1252         * page/Chrome.h:
1253         * page/ChromeClient.h:
1254         * page/Frame.cpp:
1255         (WebCore::Frame::~Frame):
1256         (WebCore::Frame::markedTextRange):
1257         (WebCore::Frame::shouldChangeSelection):
1258         (WebCore::Frame::shouldDeleteSelection):
1259         (WebCore::Frame::isContentEditable):
1260         (WebCore::Frame::setSecureKeyboardEntry):
1261         (WebCore::Frame::isSecureKeyboardEntry):
1262         (WebCore::Frame::bindingRootObject):
1263         (WebCore::Frame::createRootObject):
1264         (WebCore::Frame::windowScriptNPObject):
1265         (WebCore::Frame::cleanupScriptObjects):
1266         (WebCore::FramePrivate::FramePrivate):
1267         * page/Frame.h:
1268         * page/FramePrivate.h:
1269         * page/FrameView.h:
1270         * page/mac/EventHandlerMac.mm:
1271         (WebCore::EventHandler::tabsToLinks):
1272         (WebCore::EventHandler::tabsToAllControls):
1273         (WebCore::EventHandler::focusDocumentView):
1274         (WebCore::EventHandler::passMouseDownEventToWidget):
1275         (WebCore::EventHandler::handleDrag):
1276         (WebCore::EventHandler::sendFakeEventsAfterWidgetTracking):
1277         (WebCore::EventHandler::keyboardUIMode):
1278         * page/mac/FrameMac.h: Removed.
1279         * page/mac/FrameMac.mm:
1280         (WebCore::Frame::setBridge):
1281         (WebCore::Frame::bridge):
1282         (WebCore::Frame::searchForLabelsAboveCell):
1283         (WebCore::Frame::searchForLabelsBeforeElement):
1284         (WebCore::Frame::matchLabelsAgainstElement):
1285         (WebCore::Frame::focusWindow):
1286         (WebCore::Frame::unfocusWindow):
1287         (WebCore::Frame::imageFromRect):
1288         (WebCore::Frame::selectionImage):
1289         (WebCore::Frame::snapshotDragImage):
1290         (WebCore::Frame::fontAttributesForSelectionStart):
1291         (WebCore::Frame::baseWritingDirectionForSelectionStart):
1292         (WebCore::Frame::print):
1293         (WebCore::Frame::issuePasteCommand):
1294         (WebCore::Frame::issueTransposeCommand):
1295         (WebCore::Frame::respondToChangedSelection):
1296         (WebCore::Frame::textFieldDidBeginEditing):
1297         (WebCore::Frame::textFieldDidEndEditing):
1298         (WebCore::Frame::textDidChangeInTextField):
1299         (WebCore::Frame::textDidChangeInTextArea):
1300         (WebCore::Frame::doTextFieldCommandFromEvent):
1301         (WebCore::Frame::textWillBeDeletedInTextField):
1302         (WebCore::Frame::setSecureKeyboardEntry):
1303         (WebCore::Frame::isSecureKeyboardEntry):
1304         (WebCore::Frame::setMarkedTextRange):
1305         (WebCore::Frame::dashboardRegionsDictionary):
1306         (WebCore::Frame::dashboardRegionsChanged):
1307         (WebCore::Frame::willPopupMenu):
1308         (WebCore::Frame::isCharacterSmartReplaceExempt):
1309         (WebCore::Frame::setNeedsReapplyStyles):
1310         (WebCore::Frame::customHighlightLineRect):
1311         (WebCore::Frame::paintCustomHighlight):
1312         (WebCore::Frame::createScriptInstanceForWidget):
1313         (WebCore::Frame::windowScriptObject):
1314         (WebCore::Frame::cleanupPlatformScriptObjects):
1315         * page/mac/WebCoreFrameBridge.h:
1316         * page/mac/WebCoreFrameBridge.mm:
1317         (createRootObject):
1318         (bridge):
1319         (-[WebCoreFrameBridge _frame]):
1320         * page/qt/EventHandlerQt.cpp:
1321         * page/qt/FrameQt.cpp:
1322         (WebCore::Frame::unfocusWindow):
1323         (WebCore::Frame::focusWindow):
1324         (WebCore::Frame::issueTransposeCommand):
1325         (WebCore::Frame::respondToChangedSelection):
1326         (WebCore::Frame::print):
1327         (WebCore::Frame::createScriptInstanceForWidget):
1328         (WebCore::Frame::cleanupPlatformScriptObjects):
1329         (WebCore::Frame::isCharacterSmartReplaceExempt):
1330         * page/qt/FrameQt.h: Removed.
1331         * platform/MimeTypeRegistry.h:
1332         * platform/graphics/svg/SVGImage.cpp:
1333         (WebCore::SVGImage::setData):
1334         * platform/graphics/svg/SVGImageEmptyClients.h:
1335         (WebCore::SVGEmptyChromeClient::shouldInterruptJavaScript):
1336         (WebCore::SVGEmptyEditorClient::shouldChangeSelectedRange):
1337         * platform/mac/ClipboardMac.h:
1338         * platform/mac/ClipboardMac.mm:
1339         (WebCore::ClipboardMac::ClipboardMac):
1340         * platform/mac/FileChooserMac.mm:
1341         (-[OpenPanelController beginSheetWithFrame:]):
1342         * platform/mac/MimeTypeRegistryMac.mm:
1343         (WebCore::MimeTypeRegistry::getMIMETypeForPath):
1344         * platform/mac/PopupMenuMac.mm:
1345         (WebCore::PopupMenu::show):
1346         * platform/mac/WidgetMac.mm:
1347         (WebCore::Widget::setFocus):
1348         (WebCore::Widget::setIsSelected):
1349         * platform/network/mac/ResourceHandleMac.mm:
1350         * platform/network/qt/ResourceHandleManagerQt.cpp:
1351         * platform/network/qt/ResourceHandleQt.cpp:
1352         (WebCore::ResourceHandle::start):
1353         * platform/qt/MimeTypeRegistryQt.cpp:
1354         (WebCore::MimeTypeRegistry::getMIMETypeForPath):
1355         * platform/qt/PopupMenuQt.cpp:
1356         * platform/qt/ScrollViewCanvasQt.cpp:
1357         * platform/qt/ScrollViewQt.cpp:
1358         * platform/win/TemporaryLinkStubs.cpp:
1359         * rendering/InlineTextBox.cpp:
1360         (WebCore::InlineTextBox::paintCustomHighlight):
1361         * rendering/RenderBox.cpp:
1362         (WebCore::RenderBox::paintCustomHighlight):
1363         * rendering/RootInlineBox.cpp:
1364         (WebCore::RootInlineBox::addHighlightOverflow):
1365         (WebCore::RootInlineBox::paintCustomHighlight):
1366
1367 2007-02-18  Oliver Hunt  <oliver@apple.com>
1368
1369         Reviewed by NOBODY (Buildfix).
1370
1371         Oops, missed a 'const'
1372
1373         * platform/qt/ClipboardQt.h:
1374
1375 2007-02-18  Oliver Hunt  <oliver@apple.com>
1376
1377         Reviewed by Adam.
1378
1379         Adding stubbed out implementation of Clipboard for Qt to stop
1380         it crashing whenever someone drags the mouse.
1381
1382         * WebCore.pro:
1383         * page/qt/EventHandlerQt.cpp:
1384         (WebCore::EventHandler::createDraggingClipboard):
1385         * platform/qt/ClipboardQt.cpp: Added.
1386         (WebCore::ClipboardQt::ClipboardQt):
1387         (WebCore::ClipboardQt::clearData):
1388         (WebCore::ClipboardQt::clearAllData):
1389         (WebCore::ClipboardQt::getData):
1390         (WebCore::ClipboardQt::setData):
1391         (WebCore::ClipboardQt::types):
1392         (WebCore::ClipboardQt::dragLocation):
1393         (WebCore::ClipboardQt::dragImage):
1394         (WebCore::ClipboardQt::setDragImage):
1395         (WebCore::ClipboardQt::dragImageElement):
1396         (WebCore::ClipboardQt::setDragImageElement):
1397         (WebCore::ClipboardQt::createDragImage):
1398         (WebCore::ClipboardQt::declareAndWriteDragImage):
1399         (WebCore::ClipboardQt::writeURL):
1400         (WebCore::ClipboardQt::writeRange):
1401         (WebCore::ClipboardQt::hasData):
1402         * platform/qt/ClipboardQt.h: Added.
1403         (WebCore::ClipboardQt::~ClipboardQt):
1404         (WebCore::ClipboardQt::isForDragging):
1405
1406 2007-02-18  Oliver Hunt  <oliver@apple.com>
1407
1408         Reviewed by Adam.
1409
1410         Don't even attempt to do a document based drag if there isn't a document
1411         Fixes rdar://problem/4960109
1412
1413         * page/DragController.cpp:
1414         (WebCore::DragController::tryDocumentDrag):  
1415            Null check m_document
1416         (WebCore::DragController::tryDHTMLDrag):
1417            ASSERT(m_document) -- tryDocumentDrag is the only 
1418            thing that will ever call us, but lets play it safe
1419
1420 2007-02-18  Adam Roben  <aroben@apple.com>
1421
1422         Reviewed by Hyatt.
1423
1424         A little preparation for <rdar://problem/5006872>.
1425
1426         * platform/PopupMenu.h:
1427
1428 2007-02-18  Alexey Proskuryakov  <ap@webkit.org>
1429
1430         Reviewed by Adele.
1431
1432         http://bugs.webkit.org/show_bug.cgi?id=12807
1433         XPath incorrectly converts NaN to boolean
1434
1435         Test: fast/xpath/nan-to-boolean.html
1436
1437         * xml/XPathValue.cpp:
1438         (WebCore::XPath::Value::toBoolean): Convert NaN to false.
1439         * xml/XPathFunctions.cpp:
1440         (WebCore::XPath::FunSubstringAfter::doEvaluate): Fix substring-after to actually work.
1441
1442 2007-02-18  Mitz Pettel  <mitz@webkit.org>
1443
1444         Reviewed by Hyatt.
1445
1446         - fix http://bugs.webkit.org/show_bug.cgi?id=12123
1447           REGRESSION: Incomplete repaint of floats' overflows
1448
1449         Tests: fast/repaint/float-overflow.html
1450                fast/repaint/float-overflow-right.html
1451                fast/repaint/table-cell-vertical-overflow.html
1452
1453         - fix http://bugs.webkit.org/show_bug.cgi?id=10116
1454           REGRESSION: Menu item drawn 2 pixels short on WWDC 2006 Attendee Site
1455
1456         Reflected in existing test results.
1457
1458         Unified floats and overflow for the purposes of painting and hit-testing.
1459         Overhanging and overflowing floats are now factored into a block's overflow
1460         unless their painting has been propagated to an ancestor.
1461
1462         Changed table cells to no longer expand to enclose overflow, thus making
1463         it purely "visual overflow", having no effect on layout in WebCore. It
1464         still determines scrolling dimensions.
1465
1466         * rendering/InlineFlowBox.cpp:
1467         (WebCore::InlineFlowBox::placeBoxesHorizontally): Include inline blocks'
1468         horizontal overflow in the inline box's dimensions.
1469         * rendering/RenderBlock.cpp:
1470         (WebCore::RenderBlock::layoutBlock): Removed the expand to enclose overflows
1471         behavior. Added code to add this block's floats (and their overflow) to its
1472         overflow rect if it is not in a block formatting context. Otherwise, the
1473         inclusion of floats in the overflow is deferred until this block's parent
1474         examines its floats and possibly adopts overhanging floats.
1475         (WebCore::RenderBlock::layoutBlockChildren):
1476         (WebCore::RenderBlock::paint): 
1477         (WebCore::RenderBlock::floatRect): Made non-virtual and changed to return an empty
1478         rect if there are no floats or the floats are clipped, instead of returning the border
1479         box.
1480         (WebCore::RenderBlock::addOverhangingFloats): Any floats of the child that
1481         are not to be painted by the parent are added to the child's overflow rect.
1482         (WebCore::RenderBlock::addVisualOverflow): Added. Adjusts the overflow
1483         bounds to include the given rect.
1484         (WebCore::RenderBlock::nodeAtPoint):
1485         * rendering/RenderBlock.h:
1486         * rendering/RenderFlexibleBox.cpp:
1487         (WebCore::RenderFlexibleBox::layoutBlock): 
1488         (WebCore::RenderFlexibleBox::layoutHorizontalBox): After placing a normal
1489         child, add its floats to its overflow, since painting of floats does not
1490         propagate to flexible boxes. 
1491         (WebCore::RenderFlexibleBox::layoutVerticalBox): Ditto.
1492         * rendering/RenderForeignObject.cpp:
1493         (WebCore::RenderForeignObject::layout):
1494         * rendering/RenderHTMLCanvas.cpp:
1495         (WebCore::RenderHTMLCanvas::layout):
1496         * rendering/RenderImage.cpp:
1497         (WebCore::RenderImage::layout):
1498         * rendering/RenderLayer.cpp:
1499         (WebCore::RenderLayer::updateLayerPositions):
1500         (WebCore::RenderLayer::absoluteBoundingBox):
1501         * rendering/RenderLayer.h:
1502         * rendering/RenderObject.cpp:
1503         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
1504         * rendering/RenderObject.h:
1505         (WebCore::RenderObject::expandsToEncloseOverhangingFloats):
1506         * rendering/RenderPath.cpp:
1507         (WebCore::RenderPath::layout):
1508         * rendering/RenderSVGContainer.cpp:
1509         (WebCore::RenderSVGContainer::layout):
1510         * rendering/RenderSVGText.cpp:
1511         (WebCore::RenderSVGText::layout):
1512         * rendering/RenderTable.h: Removed the override of overflowHeight() since now tables can have
1513         vertical overflow.
1514         * rendering/RenderTableCell.cpp:
1515         (WebCore::RenderTableCell::paint): Made sure that overflow is repainted.
1516         * rendering/RenderTableCell.h:
1517         (WebCore::RenderTableCell::expandsToEncloseOverhangingFloats): Removed.
1518         * rendering/RenderTableSection.cpp:
1519         (WebCore::RenderTableSection::RenderTableSection):
1520         (WebCore::RenderTableSection::layoutRows): Factor in vertical overflow from cells.
1521         (WebCore::RenderTableSection::paint):
1522         * rendering/RenderTableSection.h:
1523         (WebCore::RenderTableSection::overflowHeight):
1524         (WebCore::RenderTableSection::overflowTop):
1525
1526 2007-02-18  Oliver Hunt  <oliver@apple.com>
1527
1528         Reviewed by NOBODY (Buildfix).
1529
1530         Build fix for the build fix -- can't call something that isn't a function
1531
1532         * platform/qt/CursorQt.cpp:
1533         (WebCore::notAllowedCursor):
1534
1535 2007-02-18  Oliver Hunt  <oliver@apple.com>
1536
1537         Reviewed by NOBODY (Build fix).
1538
1539         Adding platform/DragImage.cpp and platform/qt/DragImageQt.cpp to the Qt
1540         project files
1541
1542         Stubbed method for WebCore::notAllowedCursor -- not sure what it should return, 
1543         have returned blank cursor, possibly needs to return something else
1544
1545         * WebCore.pro:
1546         * platform/qt/CursorQt.cpp:
1547         (WebCore::notAllowedCursor):
1548
1549 2007-02-18  Oliver Hunt  <oliver@apple.com>
1550
1551         Reviewed by NOBODY (Buildfix).
1552
1553         Sigh, obnoxious occasional auto conversion from float to int
1554
1555         * platform/mac/ClipboardMac.mm:
1556         (WebCore::ClipboardMac::createDragImage):
1557
1558 2007-02-18  Alexey Proskuryakov  <ap@webkit.org>
1559
1560         Reviewed by Hyatt.
1561
1562         http://bugs.webkit.org/show_bug.cgi?id=12799
1563         REGRESSION: Webpage doesn't load correctly (www.cincinnati.com
1564         redirects to the wrong URL)
1565
1566         Test: http/tests/misc/refresh-meta-with-newline.html
1567
1568         * platform/network/HTTPParsers.cpp:
1569         (WebCore::skipWhiteSpace):
1570         (WebCore::parseHTTPRefresh):
1571         * platform/network/HTTPParsers.h:
1572         In HTML, all characters with codes <= 0x20 are whitespace, while in
1573         HTTP, only space and tab are such.
1574
1575         * dom/Document.cpp:
1576         (WebCore::Document::processHttpEquiv):
1577         * loader/FrameLoader.cpp:
1578         (WebCore::FrameLoader::receivedFirstData):
1579         Pass parseHTTPRefresh() a flag telling about the source of data.
1580
1581 2007-02-18  Oliver Hunt  <oliver@apple.com>
1582
1583         Reviewed by NOBODY (Build fix).
1584
1585         Buld fix -- surprisingly RetainPtr doesn't exist on Qt
1586
1587         * platform/DragImage.h:
1588
1589 2007-02-18  Oliver Hunt  <oliver@apple.com>
1590
1591         Reviewed by Adam.
1592
1593         More drag and drop migration, now the entirety of the
1594         drag initiation logic has been rendered platform independent
1595         This has required a number of new interfaces, and a reasonable
1596         amount of logic migration.
1597
1598         As a side effect, this patch also fixes rdar://problem/4945341
1599
1600         There are some basic Qt stubs that should stop the build from failing,
1601         however the absence of ClipboardQt means any attempt to initiate a drag 
1602         may cause a crash.
1603
1604         * WebCore.exp:
1605            Exporting new symbols
1606
1607         * WebCore.xcodeproj/project.pbxproj:
1608            New files
1609
1610         * dom/Clipboard.cpp:
1611         (WebCore::Clipboard::canSaveAsWebArchive):
1612           Migrated from WebKit
1613
1614         * dom/Clipboard.h:
1615           Added more methods to allow Clipboard to be used as a 
1616           platform independent container for drag and drop
1617
1618         * page/DragClient.h:
1619         (WebCore::DragClient::declareAndWriteDragImage):
1620           This is a mac only helper function, so i've made it have an empty implementation,
1621           that way we won't need a PLATFORM(MAC) block in SVGImageEmptyClients
1622
1623         * page/DragController.cpp:
1624         (WebCore::DragController::dragExited):
1625         (WebCore::DragController::performDrag):
1626         (WebCore::DragController::tryDocumentDrag): 
1627         (WebCore::DragController::tryDHTMLDrag):
1628           Using RefPtrs now
1629         (WebCore::getCachedImage):
1630         (WebCore::getImage):
1631           Helper functions                   
1632         (WebCore::dragLocForDHTMLDrag):
1633         (WebCore::dragLocForSelectionDrag):
1634         (WebCore::DragController::startDrag):
1635         (WebCore::DragController::doImageDrag):
1636         (WebCore::DragController::doSystemDrag):
1637           Logic that generates drag images and clipboard content, and
1638           initiates the actual system drag operation
1639
1640         * page/DragController.h:
1641           Method and variable declarations
1642
1643         * page/EventHandler.cpp:
1644         (WebCore::EventHandler::handleDrag):
1645           handleDrag is now platform independent
1646         (WebCore::EventHandler::handleTextInputEvent):
1647            formatting
1648
1649         * page/EventHandler.h:
1650         (WebCore::EventHandler::eventLoopHandleMouseDragged):
1651           Forgot to define this stub function 
1652
1653         * page/Frame.h:
1654           Declaring dragImageForSelection to provide drag image for selected content
1655
1656         * page/mac/DragControllerMac.mm:
1657           Defining drag images control vars
1658
1659         * page/mac/EventHandlerMac.mm:
1660         (WebCore::EventHandler::createDraggingClipboard):
1661           Migrated old clipboard creation to here
1662
1663         * page/mac/FrameMac.mm:
1664         (WebCore::Frame::dragImageForSelection):
1665           Wrap FrameMac::selectionImage
1666
1667         * page/qt/DragControllerQt.cpp:
1668           Defining drag images control vars
1669
1670         * page/qt/EventHandlerQt.cpp:
1671         (WebCore::EventHandler::createDraggingClipboard):
1672           stub
1673
1674         * page/qt/FrameQt.cpp:
1675         (WebCore::Frame::dragImageForSelection):
1676           stub
1677
1678         * platform/DragImage.cpp: Added.
1679         (WebCore::fitDragImageToMaxSize):
1680         (WebCore::createDragImageForSelection):
1681            Platform independent processing for drag images
1682
1683         * platform/DragImage.h: Added.
1684            Declaring typedefs and wrapper functions to abstract the handling
1685            of drag images 
1686
1687         * platform/Pasteboard.h:
1688           Declaring extracted writeURL and writeSelection methods
1689
1690         * platform/graphics/svg/SVGImageEmptyClients.h:
1691         (WebCore::SVGEmptyDragClient::willPerformDragSourceAction):
1692         (WebCore::SVGEmptyDragClient::startDrag):
1693         (WebCore::SVGEmptyDragClient::createDragImageForLink):
1694           Stubs FTW!
1695
1696         * platform/mac/ClipboardMac.h:
1697         (WebCore::ClipboardMac::pasteboard):
1698           Provide accessor for underlying NSPasteboard
1699
1700         * platform/mac/ClipboardMac.mm:
1701         (WebCore::ClipboardMac::hasData):
1702         (WebCore::ClipboardMac::writeRange):
1703         (WebCore::ClipboardMac::writeURL):
1704         (WebCore::ClipboardMac::declareAndWriteDragImage):
1705         (WebCore::ClipboardMac::createDragImage):
1706            Implemented new Clipboarid functionality.
1707         (WebCore::ClipboardMac::dragNSImage):
1708            Made this a const method
1709
1710         * platform/mac/DragImageMac.mm: Added.
1711         (WebCore::dragImageSize):
1712         (WebCore::deleteDragImage):
1713         (WebCore::scaleDragImage):
1714         (WebCore::dissolveDragImageToFraction):
1715         (WebCore::createDragImageFromImage):
1716         (WebCore::createDragImageIconForCachedImage):
1717            Implemented platform specific DragImage functions
1718
1719         * platform/mac/PasteboardMac.mm:
1720         (WebCore::writeSelection):
1721         (WebCore::Pasteboard::writeSelection):
1722         (WebCore::writeURL):
1723         (WebCore::Pasteboard::writeURL):
1724            Extracted member implementations of these functions, so that
1725            Clipboard could also make use of this functionality.
1726            Pasteboard methods now call the new non-member implementations.
1727            Also fixed implementations to respect the list of requested types.
1728
1729         * platform/qt/DragImageQt.cpp: Added.
1730         (WebCore::dragImageSize):
1731         (WebCore::deleteDragImage):
1732         (WebCore::scaleDragImage):
1733         (WebCore::dissolveDragImageToFraction):
1734         (WebCore::createDragImageFromImage):
1735         (WebCore::createDragImageIconForCachedImage):  
1736           Stubs
1737
1738 2007-02-17  David Hyatt  <hyatt@apple.com>
1739
1740         Fix textarea resizers to not fill with black by making sure the fill color starts off as
1741         transparent instead of black.
1742
1743         Reviewed by aroben
1744
1745         * platform/graphics/GraphicsContext.cpp:
1746         (WebCore::GraphicsContextState::GraphicsContextState):
1747
1748 2007-02-17  Lars Knoll <lars@trolltech.com>
1749
1750         Reviewed by Adam.
1751
1752         fix http://bugs.webkit.org/show_bug.cgi?id=11476
1753         <rdar://problem/4960247> REGRESSION: Nesting the IMG tag inside of a
1754         MAP fails to render correctly in ToT
1755
1756         Test: fast/images/image-in-map.html
1757
1758         * html/HTMLMapElement.cpp:
1759         (WebCore::HTMLMapElement::checkDTD):
1760
1761 2007-02-17  Alexey Proskuryakov  <ap@webkit.org>
1762
1763         Reviewed by Maciej.
1764
1765         http://bugs.webkit.org/show_bug.cgi?id=12733
1766         XPath namespace is attached to a wrong step
1767
1768         * xml/XPathGrammar.y: NAMETEST is different from other NodeTests in that its
1769         resulting type is an expanded name, rather than a string. It is not really possible 
1770         to store the namespace inside Parser, because it gets used in wrong steps then.
1771
1772         * xml/XPathParser.cpp:
1773         (WebCore::XPath::Parser::expandQName):
1774         * xml/XPathParser.h:
1775         Moved code that expands a QName from XPathGrammar.y. Removed m_currentNamespaceURI.
1776
1777         * xml/XPathStep.cpp:
1778         (WebCore::XPath::Step::Step):
1779         * xml/XPathStep.h:
1780         Added a constructor that takes a namespace.
1781
1782 2007-02-17  Mitz Pettel  <mitz@webkit.org>
1783
1784         Reviewed by Maciej.
1785
1786         - fix http://bugs.webkit.org/show_bug.cgi?id=12479
1787           ASSERTION FAILURE: resource->inCache() in WebCore::Cache::remove
1788
1789         Test: fast/loader/simultaneous-reloads-assert.html
1790
1791         * loader/Cache.cpp:
1792         (WebCore::Cache::remove): Replaced the assertion with a check whether the
1793         resource is in the cache. The resource could have been removed from the cache
1794         as a result of a reload occurring simultaneously in a different document.
1795
1796 2007-02-12  Lars Naesbye Christensen  <lars@naesbye.dk>
1797
1798         Reviewed by Adam.
1799
1800         Fix for http://bugs.webkit.org/show_bug.cgi?id=12711
1801         Prettier and more distinct cursors
1802
1803         * Resources/crossHairCursor.png: Added.
1804         * Resources/northEastSouthWestResizeCursor.png:
1805         * Resources/northWestSouthEastResizeCursor.png:
1806         * Resources/notAllowedCursor.png: Added.
1807         * page/EventHandler.cpp: (WebCore::selectCursor):
1808         * platform/Cursor.h:
1809         * platform/mac/CursorMac.mm:
1810         (WebCore::crossCursor):
1811         (WebCore::notAllowedCursor):
1812
1813 2007-02-16  Mitz Pettel  <mitz@webkit.org>
1814
1815         Reviewed by Darin.
1816
1817         - fix http://bugs.webkit.org/show_bug.cgi?id=12780
1818           REGRESSION (r19341-r19385): Reproducible crash in "onselectstart" event
1819
1820         Test: fast/events/shadow-boundary-crossing.html
1821
1822         * dom/EventTargetNode.cpp:
1823         (WebCore::EventTargetNode::dispatchGenericEvent): Changed to use the new
1824         eventParentNode() function for constructing the chain of ancestors for
1825         capture and bubbling.
1826         * dom/Node.h:
1827         (WebCore::Node::eventParentNode): Added. Returns the node's parent for the
1828         purpose of of event capture and bubbling. The base class implementation is
1829         to return the parent node.
1830         * ksvg2/svg/SVGElement.h:
1831         (WebCore::SVGElement::eventParentNode): Added. Since in SVG events bubble
1832         to and can be captured across the shadow DOM boundary, returns the shadow parent
1833         for shadow nodes.
1834
1835 2007-02-17  Dave Hyatt <hyatt@apple.com>
1836
1837         Change how textarea resizers paint to more closely match the way the main window resizer paints.
1838         
1839         Reviewed by olliej
1840
1841         * rendering/RenderLayer.cpp:
1842         (WebCore::RenderLayer::paintOverflowControls):
1843
1844 2007-02-17  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1845
1846         Reviewed by Adam Roben.
1847
1848         Fix crashes on ARM due to different struct packing. Based on a patch
1849         from Mike Emmel.
1850
1851         * platform/DeprecatedString.cpp: compile-time assert to make sure sizeof(DeprecatedChar) == 2
1852         * platform/DeprecatedString.h: pack DeprecatedChar struct to ensure that
1853         sizeof(DeprecatedChar) == 2. Move _internalBuffer in DeprecatedStringData
1854         to the end, to avoid crashes on ARM due to different struct packing.
1855
1856 2007-02-16  Adele Peterson  <adele@apple.com>
1857
1858         Reviewed by Mitz.
1859
1860         Fix for http://bugs.webkit.org/show_bug.cgi?id=11534
1861         <rdar://problem/4946947> REGRESSION: Readonly text fields don't scroll when selecting content
1862
1863         Test: fast/forms/input-readonly-autoscroll.html
1864
1865         Implemented autoscroll methods for RenderTextControl, so this works on non-editable text controls.
1866
1867         * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::autoscroll):
1868         * rendering/RenderTextControl.h: (WebCore::RenderTextControl::shouldAutoscroll):
1869
1870 2007-02-17  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1871
1872         Reviewed by Adam Roben.
1873
1874         Curl networking improvements inspired by Mike Emmel's patches in
1875         http://bugs.webkit.org/show_bug.cgi?id=11332.
1876         Fix FrameLoaderClientGdk due to changed FrameLoaderClient API.
1877
1878         * loader/gdk/FrameLoaderClientGdk.cpp: Massage for changed API.
1879         (WebCore::FrameLoaderClientGdk::saveViewStateToItem):
1880         (WebCore::FrameLoaderClientGdk::restoreViewState):
1881         (WebCore::FrameLoaderClientGdk::generatedMIMETypeForURLScheme):
1882         (WebCore::FrameLoaderClientGdk::willUseArchive):
1883         * loader/gdk/FrameLoaderClientGdk.h: Ditto.
1884         * platform/network/ResourceHandleInternal.h: Remember url and custom headers
1885         for the request lifetime and free them at the end.
1886         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1887         * platform/network/gdk/ResourceHandleCurl.cpp: Ditto.
1888         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
1889         * platform/network/gdk/ResourceHandleManager.cpp: url improvements:
1890         - remove m_useSimple code-path since it wasn't used anywhere
1891         - don't use hashmap for keeping track of outstanding jobs - curl does it anyway
1892         - set custom headers from request
1893         - enable gzip and deflate through Accept-Encoding
1894         - setup curl to share cookies and DNS cache between requests
1895         - enable persisting of cookies in a file (if client provides file name
1896           for cookies via ResourceHandleManager::setCookieJarFileName())
1897         (WebCore::ResourceHandleManager::ResourceHandleManager):
1898         (WebCore::ResourceHandleManager::setCookieJarFileName):
1899         (WebCore::ResourceHandleManager::downloadTimerCallback):
1900         (WebCore::ResourceHandleManager::removeFromCurl):
1901         (WebCore::ResourceHandleManager::setupPUT):
1902         (WebCore::ResourceHandleManager::setupPOST):
1903         (WebCore::ResourceHandleManager::add):
1904         (WebCore::ResourceHandleManager::cancel):
1905         * platform/network/gdk/ResourceHandleManager.h:
1906
1907 2007-02-17  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1908
1909         Reviewed by Adam Roben.
1910
1911         Gdk fixes.
1912
1913         * page/gdk/EventHandlerGdk.cpp: Comment out chatty message.
1914         (WebCore::EventHandler::handleDrag):
1915         * platform/gdk/EditorClientGdk.cpp: Enable entering text into text field.
1916         (WebCore::EditorClientGdk::shouldInsertText):
1917
1918 2007-02-16  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1919
1920         Reviewed by Adam Roben.
1921
1922         Move Path implementation from TemporaryLinkStubs.cpp to
1923         its own file.
1924         Implement setLineCap, setLineJoin and setMiterLimit for
1925         cairo's GraphicsContext.
1926
1927         * WebCoreSources.bkl:
1928         * platform/gdk/TemporaryLinkStubs.cpp:
1929         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1930         (WebCore::GraphicsContext::setPlatformFillColor):
1931         (WebCore::GraphicsContext::setPlatformStrokeColor):
1932         (WebCore::GraphicsContext::setLineCap):
1933         (WebCore::GraphicsContext::setLineJoin):
1934         (WebCore::GraphicsContext::setMiterLimit):
1935         * platform/graphics/cairo/PathCairo.cpp: Added.
1936         (WebCore::Path::Path):
1937         (WebCore::Path::~Path):
1938         (WebCore::Path::contains):
1939         (WebCore::Path::translate):
1940         (WebCore::Path::boundingRect):
1941         (WebCore::Path::operator=):
1942         (WebCore::Path::clear):
1943         (WebCore::Path::moveTo):
1944         (WebCore::Path::addLineTo):
1945         (WebCore::Path::addQuadCurveTo):
1946         (WebCore::Path::addBezierCurveTo):
1947         (WebCore::Path::addArcTo):
1948         (WebCore::Path::closeSubpath):
1949         (WebCore::Path::addArc):
1950         (WebCore::Path::addRect):
1951         (WebCore::Path::addEllipse):
1952         (WebCore::Path::transform):
1953         (WebCore::Path::apply):
1954
1955 2007-02-16  Ada Chan  <adachan@apple.com>
1956
1957         Reviewed by Adam and Maciej.
1958
1959         Use a RefPtr to store the old hover node.
1960
1961         * rendering/RenderLayer.cpp:
1962         (WebCore::RenderLayer::updateHoverActiveState):
1963
1964 2007-02-16  Darin Adler  <darin@apple.com>
1965
1966         Reviewed by Adele.
1967
1968         - fix <rdar://problem/4990864> ASSERT in FormDelegate.m while dragging text between frames
1969
1970         This symptom is specific to Safari, so no layout test.
1971
1972         * editing/DeleteSelectionCommand.cpp:
1973         (WebCore::DeleteSelectionCommand::doApply): Only call textWillBeDeletedInTextField if the
1974         text field is focused.
1975         * html/HTMLInputElement.cpp:
1976         (WebCore::HTMLInputElement::aboutToUnload): Only call textFieldDidEndEditing if the text
1977         field is focused.
1978         (WebCore::HTMLInputElement::dispatchBlurEvent): Remove unneeded type cast.
1979         (WebCore::HTMLInputElement::defaultEventHandler): Only call doTextFieldCommandFromEvent if
1980         the text field is focused.
1981         * rendering/RenderTextControl.cpp:
1982         (WebCore::RenderTextControl::subtreeHasChanged): Only call textDidChangeInTextArea,
1983         textFieldDidBeginEditing, and textDidChangeInTextField if the element is focused.
1984
1985 2007-02-16  Anders Carlsson  <acarlsson@apple.com>
1986
1987         Reviewed by Adam.
1988
1989         <rdar://problem/4943985> 
1990         REGRESSION: Dragging standalone images to Finder fails to download the image file
1991         
1992         Set the data and response on the image resource. Also, since this is platform-independent we don't need to do it in 
1993         ImageDocumentMac.mm
1994         
1995         * loader/ImageDocument.cpp:
1996         (WebCore::ImageTokenizer::finish):
1997         * loader/mac/ImageDocumentMac.h:
1998         * loader/mac/ImageDocumentMac.mm:
1999         (WebCore::finishImageLoad):
2000
2001 2007-02-16  David Harrison  <harrison@apple.com>
2002
2003         Reviewed by Adam.
2004
2005         <rdar://problem/5004746> Need mechanism to protect against WebKit calls from secondary threads (DOM APIs)
2006
2007         * platform/mac/LoggingMac.mm:
2008         (WebCore::_WebCoreThreadViolationCheck):
2009         Change the default to log the violations.
2010
2011 2007-02-16  Adele Peterson  <adele@apple.com>
2012
2013         Reviewed by Mitz.
2014
2015         Fixed: http://bugs.webkit.org/show_bug.cgi?id=12768
2016         <rdar://problem/4995250> REGRESSION: Crash occurs at WebCore::RenderLayer::scrollToOffset() when leaving page that has focus in field
2017
2018         No test case added.  This crash doesn't occur in DumpRenderTree because the B/F cache is turned off.
2019
2020         * dom/Node.cpp: (WebCore::Node::willRemove): Check that the document is not in the page cache before 
2021
2022         * dom/Element.cpp: (WebCore::Element::updateFocusAppearance): Added restorePreviousSelection argument, with appropriate default values.
2023         * dom/Element.h: ditto.
2024         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateFocusAppearance): ditto.
2025         * html/HTMLInputElement.h: ditto.
2026         * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::updateFocusAppearance): ditto.
2027         * html/HTMLTextAreaElement.h: ditto.
2028
2029         * page/PageState.cpp: (WebCore::PageState::restore): Call updateFocusAppearance on the focused node for this page.  Pass true for the
2030           restorePreviousSelection argument.
2031
2032         * rendering/RenderLayer.cpp: Added ASSERTS and nil checks on the RenderView.  It shouldn't be null, but if it is, 
2033           we'll fail silently on release builds.
2034         (WebCore::RenderLayer::updateLayerPositions):
2035         (WebCore::RenderLayer::scrollToOffset):
2036         (WebCore::RenderLayer::windowClipRect):
2037         (WebCore::RenderLayer::calculateClipRects):
2038         (WebCore::RenderLayer::calculateRects):
2039         (WebCore::RenderLayer::intersectsDamageRect):
2040         (WebCore::RenderLayer::absoluteBoundingBox):
2041
2042 2007-02-16  Anders Carlsson  <acarlsson@apple.com>
2043
2044         Reviewed by Darin.
2045
2046         <rdar://problem/4993055> auto_refcount_underflow_error: WebCore::FrameLoader::continueAfterNavigationPolicy () over-releases under GC
2047
2048         Add ::adoptNS and ::adoptCF methods to RetainPtr to indicate what type of reference to adopt.
2049         
2050         * platform/cf/RetainPtr.h:
2051         (WebCore::):
2052         (WebCore::adoptNSReference):
2053         (WebCore::RetainPtr::RetainPtr):
2054         (WebCore::::adoptCF):
2055         (WebCore::::adoptNS):
2056         * platform/mac/FileChooserMac.mm:
2057         (WebCore::FileChooser::FileChooser):
2058         * platform/network/mac/ResourceErrorMac.mm:
2059         (WebCore::ResourceError::operator NSError*):
2060         * platform/network/mac/ResourceRequestMac.mm:
2061         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2062         * platform/network/mac/ResourceResponseMac.mm:
2063         (WebCore::ResourceResponse::nsURLResponse):
2064
2065 2007-02-15  Brady Eidson  <beidson@apple.com>
2066
2067         Reviewed by Lost Objective-C Hippyness (or hippiness)
2068
2069         Oh boy, did I ever botch this one up...
2070
2071         * loader/FrameLoader.cpp:
2072         (WebCore::FrameLoader::saveScrollPositionAndViewStateToItem): Null check the FrameView
2073
2074 2007-02-15  Brady Eidson  <beidson@apple.com>
2075
2076         Reviewed by Adam's complaint
2077
2078         Adam wanted me to do an early return, instead.
2079
2080         * loader/FrameLoader.cpp:
2081         (WebCore::FrameLoader::saveScrollPositionAndViewStateToItem):
2082
2083 2007-02-15  Brady Eidson  <beidson@apple.com>
2084
2085         Reviewed by Adele
2086
2087         Forgot to bring the null check with me when I backed this code out of 
2088         the FrameLoaderClient
2089
2090         * loader/FrameLoader.cpp:
2091         (WebCore::FrameLoader::saveScrollPositionAndViewStateToItem): null check the HistoryItem
2092
2093 2007-02-15  Brady Eidson  <beidson@apple.com>
2094
2095         Reviewed by Adam
2096
2097         Save scroll state for back/forward navigation in FrameLoader, not the client
2098
2099        * loader/FrameLoader.cpp:
2100         (WebCore::FrameLoader::saveScrollPositionAndViewStateToItem): Actually save the scroll position
2101          here instead of asking the FrameLoaderClient
2102         (WebCore::FrameLoader::restoreScrollPositionAndViewState): Ditto
2103
2104         * loader/FrameLoaderClient.h: Renamed/repurposed 2 methods
2105
2106         * platform/graphics/svg/SVGImageEmptyClients.h:
2107         (WebCore::SVGEmptyFrameLoaderClient::restoreViewState): Ditto
2108         (WebCore::SVGEmptyFrameLoaderClient::saveViewStateToItem): Ditto
2109
2110 2007-02-15  Justin Garcia  <justin.garcia@apple.com>
2111
2112         Reviewed by harrison
2113         
2114         <rdar://problem/4989774>
2115         REGRESSION: Pasting a image into a plain text message can place image on a new line
2116
2117         <span><img><span><img></span></span> will appear as two
2118         images on different lines because of a layout/rendering
2119         bug.  This patch avoids the bug by producing cleaner
2120         markup so that the paste code can safely remove the style 
2121         spans.
2122
2123         * editing/markup.cpp:
2124         (WebCore::createMarkup): Get the default style from the
2125         editable root or body instead of the document element.
2126         This produces cleaner markup since we don't inline the 
2127         root's styles.
2128
2129 2007-02-15  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
2130
2131         Reviewed by Adam Roben.
2132
2133         Add gdk version of ContextMenuClient based on qt version.
2134
2135         * WebCoreSources.bkl:
2136         * page/gdk/ContextMenuClientGdk.cpp: Added.
2137         (WebCore::ContextMenuClientGdk::contextMenuDestroyed):
2138         (WebCore::ContextMenuClientGdk::getCustomMenuFromDefaultItems):
2139         (WebCore::ContextMenuClientGdk::contextMenuItemSelected):
2140         (WebCore::ContextMenuClientGdk::downloadURL):
2141         (WebCore::ContextMenuClientGdk::copyImageToClipboard):
2142         (WebCore::ContextMenuClientGdk::searchWithGoogle):
2143         (WebCore::ContextMenuClientGdk::lookUpInDictionary):
2144         (WebCore::ContextMenuClientGdk::speak):
2145         (WebCore::ContextMenuClientGdk::stopSpeaking):
2146         * page/gdk/ContextMenuClientGdk.h: Added.
2147         * webcore-base.bkl: curl is needed when building webcore_base files.
2148
2149 2007-02-15  Kevin Decker  <kdecker@apple.com>
2150
2151        Reviewed by Darin.
2152
2153        Fixed: <rdar://problem/4983883> Background of a .mov window should not be white
2154
2155        * loader/PluginDocument.cpp: 
2156        (WebCore::PluginTokenizer::createDocumentStructure): Set a background color of gray
2157        for full frame plug-ins, which makes it easier on the eyes. It's also the same 
2158        gray that PDFKit uses, too.
2159
2160 2007-02-15  Mitz Pettel  <mitz@webkit.org>
2161
2162         Reviewed by Darin.
2163
2164         - fix http://bugs.webkit.org/show_bug.cgi?id=12625
2165           REGRESSION: Crash when closing the web inspector with text selected
2166
2167         The problem was that selectionRect() was being called on a render tree that
2168         had pending style changes. The changes were committed as a side effect in
2169         the middle of traversing the render tree, and the current object got
2170         deleted as a result. The solution is to update the render tree before
2171         starting to traverse it.
2172
2173         The inspector was affected because it makes style changes in response to
2174         an AppKit notification that's sent right before the windowDidResignKey:
2175         notification, under which WebKit calls selectionRect(). I couldn't recreate
2176         the same conditions (having uncommitted style changes in the tree when the
2177         window becomes inactive) using HTML/JS in Safari, hence the lack of
2178         a regression test to go with this patch.
2179
2180         * rendering/RenderView.cpp:
2181         (WebCore::RenderView::selectionRect): Added call to updateRendering().
2182
2183 2007-02-15  Mitz Pettel  <mitz@webkit.org>
2184
2185         Reviewed by Darin.
2186
2187         - fix http://bugs.webkit.org/show_bug.cgi?id=10127
2188           REGRESSION: Crash undoing delete in textarea
2189
2190         Document::removeMarkers() was using a Vector iterator (which is just a
2191         pointer) and inserting into the Vector at the same time, which made the
2192         iterator invalid as the Vector's data buffer was relocated.
2193         
2194         Replaced all instances of Vector<DocumentMarker>::iterator with indices.
2195
2196         * dom/Document.cpp:
2197         (WebCore::Document::addMarker):
2198         (WebCore::Document::copyMarkers):
2199         (WebCore::Document::removeMarkers):
2200         (WebCore::Document::repaintMarkers):
2201         (WebCore::Document::shiftMarkers):
2202
2203 2007-02-15  Mitz Pettel  <mitz@webkit.org>
2204
2205         Reviewed by Darin.
2206
2207         - http://bugs.webkit.org/show_bug.cgi?id=12777
2208           REGRESSION (r18574): User profile pages display incorrectly at ebay.ca
2209
2210         Fixes existing layout tests: tables/mozilla/bugs/bug45486.html
2211                                      tables/mozilla_expected_failures/core/col_span2.html
2212
2213         * rendering/AutoTableLayout.cpp:
2214         (WebCore::AutoTableLayout::calcEffectiveWidth): Fixed a mismatch between which
2215         columns count as percentage columns when adding up the total percent and
2216         which columns count as percentage columns when converting non-percentage
2217         columns to effectively-percentage.
2218
2219 2007-02-14  Mitz Pettel  <mitz@webkit.org>
2220
2221         Reviewed by Sam Weinig!
2222
2223         - fix http://bugs.webkit.org/show_bug.cgi?id=12773
2224           REGRESSION (r19490): Crash on ipx-server.de
2225
2226         * manual-tests/background-image-change-in-page-cache.html: Added.
2227         * rendering/RenderBox.cpp:
2228         (WebCore::RenderBox::imageChanged): Bail out if the object is not in a view,
2229         which can happen if the document is in the page cache and the same cached
2230         image used for its background is also being used in another document that
2231         is currently in view.
2232
2233 2007-02-14  Adam Roben  <aroben@apple.com>
2234
2235         Reviewed by Darin.
2236
2237         Fix http://bugs.webkit.org/show_bug.cgi?id=12517
2238         <rdar://problem/4971227> REGRESSION: Tab order incorrect when input
2239         inside frame/iframe gets initial focus (12517)
2240
2241         Test: fast/events/frame-programmatic-focus.html
2242
2243         * dom/Element.cpp:
2244         (WebCore::Element::focus): Call FocusController::setFocusedNode to set
2245         the focus for the whole page.
2246         * html/HTMLInputElement.cpp:
2247         (WebCore::HTMLInputElement::focus): Ditto.
2248         * html/HTMLTextAreaElement.cpp:
2249         (WebCore::HTMLTextAreaElement::focus): Ditto.
2250         * page/EventHandler.cpp:
2251         (WebCore::EventHandler::handleTextInputEvent): Send the textInput
2252         event to the same target that was sent the keypress event before it.
2253         * page/FocusController.cpp:
2254         (WebCore::FocusController::advanceFocus): Added a FIXME.
2255         (WebCore::FocusController::setFocusedNode): Added. Sets the focused
2256         node for a whole page.
2257         * page/FocusController.h: Added declaration.
2258         * platform/cf/RetainPtr.h: Removed unused pointer_cast functions.
2259
2260 2007-02-14  Justin Garcia  <justin.garcia@apple.com>
2261
2262         Reviewed by adele
2263         
2264         <rdar://problem/4976800>
2265         Outdent combines 2 separate strings on 2 different lines
2266
2267         * editing/IndentOutdentCommand.cpp:
2268         (WebCore::IndentOutdentCommand::outdentParagraph): Add line breaks
2269         if removing the indented node causes content before or after it to
2270         collapse into the same paragraph as its content.
2271
2272 2007-02-14  Justin Garcia  <justin.garcia@apple.com>
2273
2274         Reviewed by adele
2275         
2276         <rdar://problem/4960120>
2277         REGRESSION: First Enter key ignored on initial focus of textarea after page load (11967)
2278         
2279         We'd insert a newline, but into an empty div.  We need two newlines
2280         in that case.
2281
2282         * editing/InsertLineBreakCommand.cpp:
2283         (WebCore::lineBreakExistsAtPosition): Returns true if there is a
2284         br or a '\n' in text that preserves newlines at the incoming position.
2285         (WebCore::InsertLineBreakCommand::doApply): Fixed to handle the empty
2286         block case, the anonymous block case.
2287
2288 2007-02-14  Darin Adler  <darin@apple.com>
2289
2290         Reviewed by Hyatt.
2291
2292         - test or http://bugs.webkit.org/show_bug.cgi?id=12417
2293           <rdar://problem/4990046> REGRESSION: pressing "Return" in a <select>
2294           box does not submit the form (12697)
2295
2296         Test: fast/forms/select-enter-key.html
2297
2298         * html/HTMLSelectElement.cpp:
2299         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2300         Add code to submit when someone hits the Enter key.
2301
2302 2007-02-14  Anders Carlsson  <acarlsson@apple.com>
2303
2304         Reviewed by Darin.
2305
2306         <rdar://problem/4960112>
2307         http://bugs.webkit.org/show_bug.cgi?id=12417
2308         REGRESSION: "Are you sure you want to send a form again?" sheet is displayed twice (validator.w3.org)
2309         
2310         The problem was that doing a reload would cause the "Cache-Control" HTTP header to be set on the request _after_ the first
2311         navigation policy delegate callback was called. This would break the request equality check that's used to prevent multiple policy
2312         delegate callbacks from getting called for the same request. The solution is to set the header as early as possible.
2313         
2314         This patch also fixes some bugs in the ResourceRequest equality operator.
2315         
2316         * loader/FrameLoader.cpp:
2317         (WebCore::FrameLoader::reload):
2318         Set the "Cache-Control" header field on the request here.
2319         
2320         * platform/network/FormData.h:
2321         (WebCore::operator==):
2322         Short-circuit if the pointers are the same.
2323         
2324         * platform/network/ResourceRequest.cpp:
2325         (WebCore::operator==):
2326         Check the equality of the objects, not the pointers.
2327
2328 2007-02-14  David Hyatt  <hyatt@apple.com>
2329
2330         Move setPlatformData out of FontFallbackListMac.mm and delete the file.  The function was completely
2331         cross-platform already.
2332
2333         Reviewed by Ada
2334
2335         * WebCore.xcodeproj/project.pbxproj:
2336         * platform/FontFallbackList.cpp:
2337         (WebCore::FontFallbackList::setPlatformFont):
2338
2339 2007-02-14  David Hyatt  <hyatt@apple.com>
2340
2341         Make the Font constructor that takes a FontPlatformData cross-platform, since the implementation was already
2342         completely cross-platform.
2343
2344         Reviewed by Ada
2345
2346         * platform/Font.cpp:
2347         (WebCore::Font::Font):
2348         * platform/Font.h:
2349         * platform/mac/FontMac.mm:
2350
2351 2007-02-14  Antti Koivisto  <antti@apple.com>
2352
2353         Reverting http://bugs.webkit.org/show_bug.cgi?id=11974, it causes repainting problems in some cases.
2354
2355         * rendering/RenderTextControl.h:
2356         (WebCore::RenderTextControl::avoidsFloats):
2357
2358 2007-02-14  Antti Koivisto  <antti@apple.com>
2359
2360         Reviewed by Maciej.
2361         
2362         - fix http://bugs.webkit.org/show_bug.cgi?id=11974
2363         REGRESSION: Caret drawn over input when smaller than font size on initial focus
2364         <rdar://problem/4960258>
2365         
2366         Set controlClip for non-search text controls.
2367
2368         * rendering/RenderTextControl.h:
2369         (WebCore::RenderTextControl::hasControlClip):
2370
2371 2007-02-14  Mitz Pettel  <mitz@webkit.org>
2372
2373         Reviewed by Hyatt.
2374
2375         - fix http://bugs.webkit.org/show_bug.cgi?id=12726
2376           REGRESSION (r12073): Text wraps in the middle of a word instead of wrapping at the space before the word
2377
2378         Test: fast/text/break-word.html
2379
2380         The wrapW variable used to keep track of the width of the characters scanned
2381         so far by adding up the widths of individual characters. Because of the
2382         rounding hack, the total ended up being bigger than the width of the same characters
2383         when measured together as a single run.
2384
2385         The fix is to use wrapW only as an upper bound, and once it overflows the line's width,
2386         fall back on measuring everything from the beginning of the line as one run.
2387
2388         * rendering/bidi.cpp:
2389         (WebCore::RenderBlock::findNextLineBreak): Implemented the above fix, including not measuring
2390         additional single characters once wrapW overflows the line. Also moved the assignment
2391         to breakNBSP out of the loop since it is constant for the entire text object, made breakWords and
2392         midWordBreak update only when they might change, and cleaned up a few things.
2393
2394 2007-02-14  Antti Koivisto  <antti@apple.com>
2395
2396         Reviewed by Hyatt.
2397
2398         - fix http://bugs.webkit.org/show_bug.cgi?id=11923
2399         REGRESSION: Placeholder text in password field shows as bullets
2400         <rdar://problem/4960257> 
2401         
2402         Disable textSecurity when placeholder is visible.
2403         
2404         * rendering/RenderTextControl.cpp:
2405         (WebCore::RenderTextControl::updatePlaceholder):
2406
2407 2007-02-13  Alexey Proskuryakov  <ap@webkit.org>
2408
2409         Reviewed by Mark Rowe.
2410
2411         http://bugs.webkit.org/show_bug.cgi?id=12763
2412         REGRESSION: button title is displayed incorrectly at quotes.burntelectrons.org
2413
2414         Test: fast/parser/entities-in-attributes.xhtml
2415
2416         * dom/XMLTokenizer.cpp:
2417         (WebCore::getEntityHandler): Set a correct type for the found entity (I'm not really
2418         sure if XML_INTERNAL_GENERAL_ENTITY is _the_ correct one, but it fixes the problem).
2419
2420 2007-02-13  Darin Adler  <darin@apple.com>
2421
2422         Reviewed by Hyatt.
2423
2424         - removed some bogus names (Hyatt smacked me since this doesn't fix a P1)
2425
2426         * dom/EventNames.h: Removed half-implemented khtmlDragdrop and khtmlMove
2427         (you could add listeners, but nobody ever sent the events). Renamed the
2428         other two khtml-prefixed internal event names to use the webkit prefix.
2429
2430         * bindings/js/kjs_dom.cpp:
2431         (KJS::DOMEventTargetNode::getValueProperty): Removed ondragdrop and onmove.
2432         (KJS::DOMEventTargetNode::putValueProperty): Ditto.
2433         * bindings/js/kjs_dom.h:
2434         * bindings/js/kjs_window.cpp:
2435         (KJS::Window::getValueProperty): Ditto.
2436         (KJS::Window::put): Ditto.
2437         * bindings/js/kjs_window.h:
2438
2439         * dom/BeforeTextInsertedEvent.cpp:
2440         (WebCore::BeforeTextInsertedEvent::BeforeTextInsertedEvent): Renamed to webkit.
2441         * editing/Editor.cpp:
2442         (WebCore::dispatchEditableContentChangedEvents): Ditto.
2443         * editing/ReplaceSelectionCommand.cpp:
2444         (WebCore::ReplacementFragment::ReplacementFragment): Ditto.
2445         * html/HTMLTextFieldInnerElement.cpp:
2446         (WebCore::HTMLTextFieldInnerTextElement::defaultEventHandler): Ditto.
2447
2448 2007-02-13  Darin Adler  <darin@apple.com>
2449
2450         Rubber stamped by Maciej.
2451
2452         * dom/EventNames.h: Resort names. Removed unused names.
2453
2454 2007-02-13  Anders Carlsson  <acarlsson@apple.com>
2455
2456         Reviewed by Kevin Decker.
2457
2458         <rdar://problem/4990049> 
2459         http://bugs.webkit.org/show_bug.cgi?id=12718
2460         REGRESSION: Segmentation fault when loading abc.go.com (12718)
2461
2462         The problem is that redirecting to about:blank causes the delegate to be released even though the load wasn't finished.
2463         This is usally not a problem since NSURLConnection retains its delegate. However, the proxy delegate does not retain _it's_ 
2464         delegate. The solution is to make releaseDelegate clear out the proxy delegate's delegate.
2465         
2466         * platform/network/mac/ResourceHandleMac.mm:
2467         (WebCore::ResourceHandle::releaseDelegate):
2468         If there's a proxy, nil out its delegate too.
2469
2470 2007-02-13  Dex Deacon  <occupant4@gmail.com>
2471
2472         Reviewed by Darin.
2473
2474         - fix for http://bugs.webkit.org/show_bug.cgi?id=12750
2475           Vector operator== was not defined correctly. It returned void,
2476           did not accept const Vectors, and used an int instead of size_t. 
2477
2478         * rendering/RenderStyle.h: Added a != operator for StyleDashboardRegion.
2479         The only reason this compiled before was that the comparing two vectors
2480         with a != was simply comparing the pointers.
2481
2482 2007-02-13  Darin Adler  <darin@apple.com>
2483
2484         - roll out fix for <rdar://problem/4874059> REGRESSION: Painter IX:register -
2485           Crash in WebCore:: ResourceLoader::willSendRequest()
2486
2487         This fix was causing a crash in at least one layout test.
2488
2489         * loader/FrameLoader.cpp:
2490         (WebCore::FrameLoader::stopAllLoaders):
2491         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
2492
2493 2007-02-13  Mitz Pettel  <mitz@webkit.org>
2494
2495         Reviewed by Hyatt.
2496
2497         - fix http://bugs.webkit.org/show_bug.cgi?id=12746
2498         REGRESSION (r13853): List item's first line overflows containing div
2499
2500         Test: fast/lists/item-not-in-list-line-wrapping.html
2501
2502         * rendering/bidi.cpp:
2503         (WebCore::RenderBlock::findNextLineBreak): Use the list marker's isInside()
2504         instead of looking at its style()->listStylePosition(), since if the
2505         list item is not in a list, the marker is inside regardless of the style.
2506
2507 2007-02-13  Rob Buis  <buis@kde.org>
2508
2509         Reviewed by Maciej.
2510
2511         http://bugs.webkit.org/show_bug.cgi?id=12578
2512         WebKit incorrectly strokes zero-width/height rectangles
2513
2514         Create an empty path when encountering zero-width/height rectangles, similar to circles with zero radius.
2515
2516         * platform/graphics/Path.cpp:
2517         (WebCore::Path::createRectangle):
2518
2519 2007-02-13  Rob Buis  <buis@kde.org>
2520
2521         Reviewed by Maciej.
2522
2523         Remove SVGDOMImplementation from the project.
2524
2525         * CMakeLists.txt:
2526         * WebCore.pro:
2527         * ksvg2/svg/SVGDOMImplementation.cpp: Removed.
2528         * ksvg2/svg/SVGDOMImplementation.h: Removed.
2529
2530 2007-02-13  Brady Eidson <beidson@apple.com>
2531
2532         Reviewed by Maciej and Adam
2533
2534         Fixes <rdar://problem/4985497> - Crash when opening a new window to "Same Page"
2535
2536         * loader/FrameLoader.cpp:
2537         (WebCore::FrameLoader::loadItem): Null check documentLoader() since if we're a brand new 
2538           WebView, cloning the history of another view, we have no documentLoader()
2539
2540 2007-02-12  Antti Koivisto  <antti@apple.com>
2541
2542         Reviewed by Maciej.
2543
2544         -fix REGRESSION: <select disabled size="5"> listbox cannot be scrolled
2545         http://bugs.webkit.org/show_bug.cgi?id=11852
2546         <rdar://problem/4960129>
2547         
2548         Pass mouse press events to scrollbars even if event is swallowed.
2549         
2550         No layout test, DumpRenderTree eventSender can't hit scrollbars.
2551
2552         * page/EventHandler.cpp:
2553         (WebCore::EventHandler::handleMousePressEvent):
2554
2555 2007-02-12  David Hyatt  <hyatt@apple.com>
2556
2557         Fix for bug 12149 (Radar Bug#4928692), external CSS causes incomplete
2558         text field focus.
2559
2560         Make sure to clear out the focus node in willRemove() rather than in
2561         detach(), since detach/attach caused by style recalc should not affect
2562         the focused node.
2563
2564         Reviewed by aroben
2565
2566         * dom/ContainerNode.cpp:
2567         (WebCore::ContainerNode::willRemove):
2568         * dom/Document.cpp:
2569         (WebCore::Document::focusedNodeRemoved):
2570         (WebCore::Document::setFocusedNode):
2571         * dom/Document.h:
2572         * dom/Element.cpp:
2573         (WebCore::Element::updateFocusAppearance):
2574         * dom/Node.cpp:
2575         (WebCore::Node::willRemove):
2576         (WebCore::Node::detach):
2577         * html/HTMLInputElement.cpp:
2578         (WebCore::HTMLInputElement::updateFocusAppearance):
2579
2580 2007-02-12  Kevin McCullough  <kmccullough@apple.com>
2581
2582         - reverting fix for rdar://problem/4922454 because it caused regressions
2583           and performance problems
2584
2585         * bindings/objc/DOM.mm:
2586         (-[DOMElement image]):
2587         (-[DOMElement _imageTIFFRepresentation]):
2588         * dom/XMLTokenizer.cpp:
2589         (WebCore::XMLTokenizer::notifyFinished):
2590         * html/HTMLImageLoader.cpp:
2591         (WebCore::HTMLImageLoader::dispatchLoadEvent):
2592         * html/HTMLTokenizer.cpp:
2593         (WebCore::HTMLTokenizer::reset):
2594         (WebCore::HTMLTokenizer::notifyFinished):
2595         * ksvg2/misc/SVGImageLoader.cpp:
2596         (WebCore::SVGImageLoader::dispatchLoadEvent):
2597         * loader/Cache.cpp:
2598         (WebCore::Cache::requestResource):
2599         (WebCore::Cache::remove):
2600         * loader/CachedImage.h:
2601         (WebCore::CachedImage::canRender):
2602         (WebCore::CachedImage::isErrorImage):
2603         * loader/CachedResource.h:
2604         * loader/CachedScript.h:
2605         (WebCore::CachedScript::errorOccurred):
2606         * loader/DocLoader.cpp:
2607         (WebCore::DocLoader::requestResource):
2608         (WebCore::DocLoader::setLoadInProgress):
2609         * loader/FrameLoader.cpp:
2610         (WebCore::FrameLoader::canLoad):
2611         * page/EventHandler.cpp:
2612         (WebCore::selectCursor):
2613         * rendering/HitTestResult.cpp:
2614         (WebCore::HitTestResult::image):
2615         * rendering/RenderImage.cpp:
2616         (WebCore::RenderImage::setCachedImage):
2617         (WebCore::RenderImage::imageChanged):
2618         (WebCore::RenderImage::paint):
2619         (WebCore::RenderImage::layout):
2620         (WebCore::RenderImage::calcAspectRatioWidth):
2621         (WebCore::RenderImage::calcAspectRatioHeight):
2622         * rendering/RenderImage.h:
2623         (WebCore::RenderImage::isErrorImage):
2624         * rendering/RenderListItem.cpp:
2625         (WebCore::RenderListItem::setStyle):
2626         * rendering/RenderListMarker.cpp:
2627         (WebCore::RenderListMarker::isImage):
2628
2629 2007-02-12  Mitz Pettel  <mitz@webkit.org>
2630
2631         Reviewed by Dave Hyatt.
2632
2633         - fix http://bugs.webkit.org/show_bug.cgi?id=12123
2634           REGRESSION: Incomplete repaint of floats' overflows
2635
2636         Tests: fast/repaint/float-overflow.html
2637                fast/repaint/float-overflow-right.html
2638
2639         - fix http://bugs.webkit.org/show_bug.cgi?id=10116
2640           REGRESSION: Menu item drawn 2 pixels short on WWDC 2006 Attendee Site
2641
2642         Reflected in existing test results.
2643
2644         Unified floats and overflow for the purposes of painting and hit-testing.
2645         Overhanging and overflowing floats are now factored into a block's overflow
2646         unless their painting has been propagated to an ancestor.
2647
2648         Changed table cells to no longer expand to enclose overflow, thus making
2649         it purely "visual overflow", having no effect on layout in WebCore. It
2650         still determines scrolling dimensions.
2651
2652         * rendering/InlineFlowBox.cpp:
2653         (WebCore::InlineFlowBox::placeBoxesHorizontally): Include inline blocks'
2654         horizontal overflow in the inline box's dimensions.
2655         * rendering/RenderBlock.cpp:
2656         (WebCore::RenderBlock::layoutBlock): Removed the expand to enclose overflows
2657         behavior. Added code to add this block's floats (and their overflow) to its
2658         overflow rect if it is not in a block formatting context. Otherwise, the
2659         inclusion of floats in the overflow is deferred until this block's parent
2660         examines its floats and possibly adopts overhanging floats.
2661         (WebCore::RenderBlock::layoutBlockChildren):
2662         (WebCore::RenderBlock::paint): 
2663         (WebCore::RenderBlock::floatRect): Changed to return an empty rect if there
2664         are no floats or the floats are clipped, instead of returning the border box.
2665         (WebCore::RenderBlock::addOverhangingFloats): Any floats of the child that
2666         are not to be painted by the parent are added to the child's overflow rect.
2667         (WebCore::RenderBlock::addVisualOverflow): Added. Adjusts the overflow
2668         bounds to include the given rect.
2669         (WebCore::RenderBlock::nodeAtPoint):
2670         * rendering/RenderBlock.h:
2671         * rendering/RenderFlexibleBox.cpp:
2672         (WebCore::RenderFlexibleBox::layoutBlock): 
2673         (WebCore::RenderFlexibleBox::layoutHorizontalBox): After placing a normal
2674         child, add its floats to its overflow, since painting of floats does not
2675         propagate to flexible boxes. 
2676         (WebCore::RenderFlexibleBox::layoutVerticalBox): Ditto.
2677         * rendering/RenderForeignObject.cpp:
2678         (WebCore::RenderForeignObject::layout):
2679         * rendering/RenderHTMLCanvas.cpp:
2680         (WebCore::RenderHTMLCanvas::layout):
2681         * rendering/RenderImage.cpp:
2682         (WebCore::RenderImage::layout):
2683         * rendering/RenderLayer.cpp:
2684         (WebCore::RenderLayer::updateLayerPositions):
2685         (WebCore::RenderLayer::absoluteBoundingBox):
2686         * rendering/RenderLayer.h:
2687         * rendering/RenderObject.cpp:
2688         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
2689         * rendering/RenderObject.h:
2690         (WebCore::RenderObject::expandsToEncloseOverhangingFloats):
2691         * rendering/RenderPath.cpp:
2692         (WebCore::RenderPath::layout):
2693         * rendering/RenderSVGContainer.cpp:
2694         (WebCore::RenderSVGContainer::layout):
2695         * rendering/RenderSVGText.cpp:
2696         (WebCore::RenderSVGText::layout):
2697         * rendering/RenderTable.cpp:
2698         (WebCore::RenderTable::layout):
2699         * rendering/RenderTableCell.h:
2700         (WebCore::RenderTableCell::expandsToEncloseOverhangingFloats):
2701
2702 2007-02-12  Darin Adler  <darin@apple.com>
2703
2704         Reviewed by Hyatt.
2705
2706         - fix http://bugs.webkit.org/show_bug.cgi?id=12668
2707           <rdar://problem/4893344> REGRESSION: underline not visible for the international
2708           input inline hole in most text fields (12668)
2709
2710         - fix bug where overline and line-through were 1px lower than we intended
2711
2712         * platform/graphics/GraphicsContext.h: Removed unneeded y offset parameter.
2713         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2714         (WebCore::GraphicsContext::drawLineForText): Removed bogus y offset and +1.
2715         * platform/graphics/cg/GraphicsContextCG.cpp:
2716         (WebCore::GraphicsContext::drawLineForText): Ditto.
2717         * platform/graphics/qt/GraphicsContextQt.cpp:
2718         (WebCore::GraphicsContext::drawLineForText): Ditto.
2719
2720         * rendering/InlineFlowBox.cpp:
2721         (WebCore::InlineFlowBox::paintTextDecorations): Added the "+1" that used to be
2722         inside drawLineForText to the underline-drawing code. Changed the other callers
2723         of drawLineForText to include the y offset in the y coordinate.
2724         * rendering/InlineTextBox.cpp:
2725         (WebCore::InlineTextBox::paintDecoration): Ditto. Also renamed _tx and _ty to
2726         remove the gratuitious underscores.
2727         (WebCore::InlineTextBox::paintMarkedTextUnderline): Made the default thickness
2728         be 1px instead of 0 (which ends up being roughly 1px in the CG code path anyway).
2729         Fixed the code computing the position to put the underline at the bottom of the
2730         line (different from regular underlines which are put 1px under the baseline).
2731         The old code used to put the underline 1px further down in the thick case, and
2732         2px further down in the non-thick case. Both of those are bad, because they
2733         could be completely clipped out in many cases.
2734
2735 2007-02-12  Anders Carlsson  <acarlsson@apple.com>
2736
2737         Reviewed by Darin.
2738
2739         <rdar://problem/4846962>
2740         Aperture: Aperture 1.5 - DOM exception occurs when exporting a web gallery
2741
2742         * dom/ContainerNode.cpp:
2743         (WebCore::ContainerNode::replaceChild):
2744         Call checkReplaceChild here.
2745         
2746         * dom/Document.cpp:
2747         (WebCore::Document::canReplaceChild):
2748         * dom/Document.h:
2749         Add implementation of canReplaceChild that makes sure that doing the replacement won't cause
2750         more than one element and document type node to end up in the document.
2751         
2752         * dom/Node.cpp:
2753         (WebCore::Node::canReplaceChild):
2754         Base implementation of canReplaceChild.
2755         
2756         (WebCore::Node::checkReplaceChild):
2757         New function that does what checAddChild does but calls canReplaceChild.
2758         
2759 2007-02-12  Kevin Decker <kdecker@apple.com>
2760
2761         Reviewed by Anders.
2762
2763         Fixed: <rdar://problem/4874059> REGRESSION: Painter IX:register - Crash in WebCore:: ResourceLoader::willSendRequest()
2764         
2765         What happened here was that a WebDataSource was being dealloced *while* a load for that resource is still in progress. 
2766
2767         * loader/FrameLoader.cpp:
2768         (WebCore::FrameLoader::stopAllLoaders): Calling stopAllLoaders cancels loads and informs the frame load delegate accordingly.
2769         The delegate however may decide to kick off a new provisional load as the result of the cancel. Therefore a local variable 
2770         for the provisional and main doucment loader is introduced, and we now only nil out the provisional loader if the local and
2771         member provisional variables represent the exact same load.
2772         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Added the same check here, too.
2773
2774 2007-02-12  Lars Knoll  <lars@trolltech.com>
2775
2776         Reviewed by Mitz.
2777
2778         Do not create child renderers for table column groups
2779         if the child has not a table column display type.
2780
2781         * dom/Node.cpp:
2782         (WebCore::Node::createRendererIfNeeded):
2783         * rendering/RenderObject.h:
2784         (WebCore::RenderObject::isChildAllowed):
2785         * rendering/RenderTableCol.cpp:
2786         (WebCore::RenderTableCol::isChildAllowed):
2787         * rendering/RenderTableCol.h:
2788
2789 2007-02-12  Antti Koivisto  <antti@apple.com>
2790
2791         Reviewed by Mitz
2792
2793         Fix assertion failure in layout test.
2794
2795         * html/HTMLMapElement.cpp:
2796         (WebCore::HTMLMapElement::parseMappedAttribute):
2797
2798 2007-02-12  Kevin McCulough  <kmccullough@apple.com>
2799
2800         Reviewed by Brady.
2801
2802         - Fixing a performance regression caused by r19500.  The heart of the matter
2803         is that we now call canLoad on every resource request even ones in the cache,
2804         to avoid a security issue. So I could not take out the canLoad call, but I
2805         but I could try to make it more efficient.
2806
2807         * loader/DocLoader.cpp:
2808         (WebCore::DocLoader::requestResource):
2809         (WebCore::DocLoader::setLoadInProgress):
2810         * loader/FrameLoader.cpp:
2811         (WebCore::FrameLoader::canLoad):
2812
2813 2007-02-12  Darin Adler  <darin@apple.com>
2814
2815         Reviewed by Oliver.
2816
2817         - fix http://bugs.webkit.org/show_bug.cgi?id=12677
2818           <rdar://problem/4759563> REGRESSION: Return key is always sent when you confirm
2819           a clause in kotoeri (12677)
2820
2821         - fix http://bugs.webkit.org/show_bug.cgi?id=12596
2822           <rdar://problem/4794346> REGRESSION: Tab key shifts form field focus instead of
2823           navigating prediction window (12596)
2824
2825         - fix http://bugs.webkit.org/show_bug.cgi?id=10010
2826           <rdar://problem/4822935> REGRESSION: Pressing Return with unconfirmed text in
2827           Hangul inserts carriage return (10010)
2828
2829         - fix http://bugs.webkit.org/show_bug.cgi?id=12531
2830           <rdar://problem/4975126> REGRESSION: Inline text input types repeated keys in
2831           latest nightly (r19336) (12531)
2832
2833         - fix http://bugs.webkit.org/show_bug.cgi?id=12539
2834           <rdar://problem/4975130> REGRESSION: Pressing Backspace while in inline input
2835           area moves to the previous page in history (12539)
2836
2837         This area still needs work because keypress events are being sent for all the
2838         events before they go to the input methods, and it seems that this is not
2839         compatible with what other browsers do and with what sites assume. That's covered
2840         by this bug:
2841
2842             http://bugs.webkit.org/show_bug.cgi?id=10871
2843             <rdar://problem/4823129> REGRESSION: IME key events different in nightly (10871)
2844
2845         which is still open.
2846
2847         * bindings/objc/ExceptionHandlers.h: Remove selectRange helper that doesn't really
2848         belong here, and also isn't needed since the callers don't want to raise ObjC
2849         exceptions.
2850         * bindings/objc/ExceptionHandlers.mm: Ditto. Also removed unneeded external globals
2851         that aren't exported anyway and unneeded includes.
2852
2853         * bridge/EditorClient.h: Added Mac-specific function, markedTextAbandoned. Long term
2854         this might move into platform instead, but it's fine to have it on the client for now
2855         as long as it doesn't cause trouble for platforms other than Mac.
2856
2857         * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::defaultEventHandler): Since
2858         all the event handling code in this function is intended to run on the node itself,
2859         not parent nodes, check and do nothing if this event is bubbling up from another
2860         node. Added code to call a function on EventHandler for default handling of text
2861         input events.
2862
2863         * dom/KeyboardEvent.h:
2864         * dom/KeyboardEvent.cpp: (WebCore::findKeyboardEvent): Added. Just like the
2865         findUIEventWithKeyState function, but specific to keyboard events.
2866
2867         * dom/TextEvent.h: Added isLineBreak and isBackTab flags so that we can carry
2868         additional information about what a text input event is trying to do, but still
2869         go through the DOM event machinery.
2870         * dom/TextEvent.cpp: Ditto.
2871
2872         * editing/Editor.h:
2873         * editing/Editor.cpp:
2874         (WebCore::Editor::handleKeyPress): Removed unneeded check of isCaretOrRange, since
2875         isContentEditable already checks that.
2876         (WebCore::Editor::canEdit): Ditto.
2877         (WebCore::Editor::canEditRichly): Ditto.
2878         (WebCore::Editor::canPaste): Changed to call canEdit for brevity.
2879         (WebCore::Editor::replaceSelectionWithText): Changed to take a const String&.
2880         (WebCore::Editor::shouldInsertText): Ditto.
2881         (WebCore::hasEditableSelection): Removed unneeded check of isCaretOrRange, since
2882         isContentEditable already checks that.
2883         (WebCore::Editor::Editor): Initialize the new m_ignoreMarkedTextSelectionChange
2884         flag. Moved here from WebHTMLView.
2885         (WebCore::Editor::insertText): Moved most of the code from -[WebHTMLView insertText:]
2886         here, since this needs to be done in response to a text input event and we don't want
2887         to go back over the WebKit side for that.
2888         (WebCore::Editor::insertLineBreak): Added. Moved here from -[WebHTMLView insertLineBreak:]
2889         for the same reason -- needs to be done in response to text input events.
2890         (WebCore::Editor::insertParagraphSeparator): Ditto.
2891         (WebCore::Editor::selectMarkedText): Added. Used by insertText.
2892         (WebCore::Editor::discardMarkedText): Added. Used by insertText.
2893         (WebCore::Editor::unmarkText): Added. Used by insertText.
2894         * editing/mac/EditorMac.mm:
2895         (WebCore::Editor::unmarkText): Added. Used by insertText.
2896
2897         * html/HTMLInputElement.cpp:
2898         (WebCore::HTMLInputElement::canHaveSelection): Changed to use isTextField to avoid repeating
2899         the switch statement.
2900         (WebCore::HTMLInputElement::selectionStart): Ditto.
2901         (WebCore::HTMLInputElement::selectionEnd): Ditto.
2902         (WebCore::HTMLInputElement::setSelectionStart): Ditto.
2903         (WebCore::HTMLInputElement::setSelectionEnd): Ditto.
2904         (WebCore::HTMLInputElement::select): Ditto.
2905         (WebCore::HTMLInputElement::setSelectionRange): Ditto.
2906         (WebCore::HTMLInputElement::createRenderer): Resorted cases alphaebtically.
2907         (WebCore::HTMLInputElement::defaultEventHandler): Added code to make hitting return cause the
2908         form to be submitted when it comes through as a text input event. This is now the normal case
2909         on Macintosh, because enter key presses normally turn into this. In addition, change the other
2910         event handling to run only after trying the base defaultEventHandler. That makes the key
2911         handling done in EventTargetNode take precedence over the event handling here for editable text
2912         fields, which is what we want. This gets rid of the need for the hack where we check
2913         inputManagerHasMarkedText and suppress the handling of the enter key.
2914
2915         * page/EventHandler.h: Removed unneeded includes. Moved EventHandlerDragState down into the
2916         private part of the class. Changed sendContextMenuEvent to take a const&. Added new
2917         handleTextInputEvent and defaultTextInputEventHandler functions. Made eventLoopHandleMouseUp
2918         and eventLoopHandleMouseDragged private. Added private defaultTabEventHandler function.
2919         * page/EventHandler.cpp:
2920         (WebCore::EventHandler::sendContextMenuEvent): Changed parameter to be a const&.
2921         (WebCore::EventHandler::defaultKeyboardEventHandler): Rearranged things so that the key bindings
2922         handling in handleKeyPress comes before special tab event handling. In cases where the tab turns
2923         into text to insert, we now handle it in the text input event handler.
2924         (WebCore::EventHandler::handleTextInputEvent): Added. Creates and dispatches a text input event.
2925         (WebCore::EventHandler::defaultTextInputEventHandler): Added. Inserts text, but has special cases
2926         for the tab and newline character cases.
2927         (WebCore::EventHandler::defaultTabEventHandler): Added. Shared by the tab-handling code in
2928         the keyboard event and text input event handlers.
2929         * page/mac/EventHandlerMac.mm: Tweak formatting, remove some unused functions.
2930
2931         * page/FocusController.h: Removed unnneded includes and forwards, and added an overload of
2932         advanceFocus that takes a FocusDirection parameter.
2933         * page/FocusController.cpp: (WebCore::FocusController::advanceFocus): Changed to allow a 0 for
2934         the event pointer. Also added a version where the direction is passed explicitly, to be used
2935         for cases where we want to tab backward even if the event doesn't have a shift modifier key set.
2936
2937         * platform/graphics/svg/SVGImageEmptyClients.h: Updated for change to EditorClient.
2938         This should really probably just use 0 for the EditorClient.
2939
2940         * WebCore.exp: Update both for newly used and no-longer-used entry points.
2941
2942         * page/mac/WebCoreFrameBridge.h:
2943         * page/mac/WebCoreFrameBridge.mm: Removed two unused methods.
2944
2945 2007-02-12  Antti Koivisto  <antti@apple.com>
2946
2947         Reviewed by Darin.
2948
2949         - fixed Imagemap not clickable in www.toptenbooks.net/
2950         http://bugs.webkit.org/show_bug.cgi?id=12738
2951         
2952         Make imagemap names case insensitive in HTML mode
2953
2954         * dom/Document.cpp:
2955         (WebCore::Document::getImageMap):
2956         * html/HTMLMapElement.cpp:
2957         (WebCore::HTMLMapElement::parseMappedAttribute):
2958
2959 2007-02-12  Maciej Stachowiak  <mjs@apple.com>
2960
2961         Reviewed by Antti.
2962
2963         - fixed <rdar://problem/4928675> REGRESSION: Crash in CGBlt_copyBytes under WebCore::Font::drawGlyphs (12083)
2964         http://bugs.webkit.org/show_bug.cgi?id=12083
2965         
2966         Test: fast/text/text-shadow-extreme-value.html
2967
2968         * platform/graphics/cg/GraphicsContextCG.cpp:
2969         (WebCore::GraphicsContext::setShadow): Clamp shadow value to 1000px, anything more seems to 
2970         make CG unhappy.
2971
2972 2007-02-11  Brady Eidson <beidson@apple.com>
2973
2974         Reviewed by Maciej.
2975
2976         First in what will be a series of HistoryItem enhancements to help debugging
2977
2978         * history/HistoryItem.cpp:
2979         (WebCore::HistoryItem::showTree):
2980         (WebCore::HistoryItem::showTreeWithIndent):
2981         (showTree): Outside of WebCore namespace, and extern "C" - to make even the 
2982           DWARF debugger able to find it...  *sigh* 
2983         * history/HistoryItem.h:
2984
2985 2007-02-11  Eric Seidel  <eric@webkit.org>
2986
2987         Reviewed by Anders.
2988
2989         - fixed <rdar://problem/4975133> ASSERT failure and crash right-clicking on image in SVG use test
2990         http://bugs.webkit.org/show_bug.cgi?id=12580
2991         
2992         Test: svg/cust/use-events-crash.svg
2993
2994         * bindings/js/kjs_dom.cpp:
2995         (KJS::toJS):
2996         * ksvg2/svg/SVGElementInstance.cpp:
2997         (WebCore::SVGElementInstance::toNode):
2998         * ksvg2/svg/SVGElementInstance.h:
2999
3000 2007-02-11  Mitz Pettel  <mitz@webkit.org>
3001
3002         Reviewed by Maciej.
3003
3004         - fix http://bugs.webkit.org/show_bug.cgi?id=10144
3005           REGRESSION: Reproducible assertion failure in DeleteSelectionCommand::fixupWhitespace()
3006
3007         Test: fast/text/delete-hard-break-character.html
3008
3009         The bug was caused by not updating a line whose line break object and offset
3010         has been deleted. When deleting text, all lines containing the deleted text
3011         are marked dirty. However, if the first character being deleted is a newline
3012         which serves as a hard line break for the previous line, then that line will
3013         not be marked, and since it will be a clean line ending with a line break,
3014         relayout will begin at the next line. The fix is to check for this when
3015         determining where to relayout from. 
3016
3017         * rendering/bidi.cpp:
3018         (WebCore::RenderBlock::determineStartPosition): Changed the condition for
3019         including the last clean line in relayout to include the case where the
3020         last clean line ends with a line break, but that line break is a newline that
3021         has been deleted.
3022
3023 2007-02-12  Antti Koivisto  <antti@apple.com>
3024
3025         Reviewed by Maciej.
3026         
3027         REGRESSION: Google Calendar cell highlight misplaced
3028         http://bugs.webkit.org/show_bug.cgi?id=12687
3029         
3030         Make offsetLeft/offsetTop/offsetParent behavior match Firefox.
3031
3032         * rendering/RenderObject.cpp:
3033         (WebCore::RenderObject::offsetLeft):
3034         (WebCore::RenderObject::offsetTop):
3035         (WebCore::RenderObject::offsetParent):
3036
3037 2007-02-10  Antti Koivisto  <antti@apple.com>
3038
3039         Reviewed by Maciej.
3040
3041         - fixed REGRESSION: No day/week scrollbar in Google Calendar
3042         http://bugs.webkit.org/show_bug.cgi?id=11985
3043
3044         Make sure overflow:auto scrollbars are always enabled. If they were overflow:scroll
3045         and dynamically changed to auto they might still be disabled.
3046
3047         * rendering/RenderLayer.cpp:
3048         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
3049
3050 2007-02-11  Alexey Proskuryakov  <ap@webkit.org>
3051
3052         Reviewed by Hyatt.
3053
3054         http://bugs.webkit.org/show_bug.cgi?id=12581
3055         XPath //title shouldn't match <title> in XHTML
3056
3057         Test: fast/xpath/ensure-null-namespace.xhtml
3058
3059         * xml/XPathStep.cpp:
3060         (WebCore::XPath::Step::nodeTestMatches): Only let a null namespace match any for HTML.
3061
3062 2007-02-10  Alexey Proskuryakov  <ap@webkit.org>
3063
3064         Reviewed by Adam.
3065
3066         http://bugs.webkit.org/show_bug.cgi?id=12701
3067         REGRESSION: After javascript, onChange not triggered when selecting same option
3068
3069         * html/HTMLSelectElement.cpp:
3070         (WebCore::HTMLSelectElement::setSelectedIndex): Remember m_lastOnChangeIndex value,
3071         as it can change from setSelected() now.
3072         (WebCore::HTMLSelectElement::notifyOptionSelected): Update m_lastOnChangeIndex.
3073
3074         * manual-tests/select-onchange-after-js.html: Added. Also tests for bug 11402.
3075
3076 2007-02-10  David Carson  <dacarson@gmail.com>`
3077
3078         Reviewed by Maciej.
3079
3080         Manual tests for http://bugs.webkit.org/show_bug.cgi?id=12636
3081         Call different Java methods that take a variety of Array parameters
3082         from Javascript, passing a Javascript array.
3083
3084         * manual-tests/liveconnect-applet-array-parameters.html: Added.
3085         * manual-tests/resources/ArrayParameterTestApplet.class: Added.
3086         * manual-tests/resources/ArrayParameterTestApplet.java: Added.
3087
3088 2007-02-10  Alexey Proskuryakov  <ap@webkit.org>
3089
3090         Reviewed by Maciej.
3091
3092         http://bugs.webkit.org/show_bug.cgi?id=12724
3093         Crash when enumerating XPath namespace axis
3094
3095         * xml/XPathStep.cpp:
3096         (WebCore::XPath::Step::nodesInAxis): Namespace axis enumeration was broken in that it crashed, and also in that
3097         it returned attribute nodes instead of XPath namespace ones. Removed it altogether.
3098
3099 2007-02-10  Mitz Pettel  <mitz@webkit.org>
3100
3101         Reviewed by Adam.
3102
3103         - fix http://bugs.webkit.org/show_bug.cgi?id=12565
3104           ASSERTION failure on some declarative animations <rdar://problem/4975132>
3105
3106         * ksvg2/svg/SVGAnimationElement.cpp:
3107         (WebCore::parseValues): Changed the string length math to avoid truncating
3108         the last character of each value.
3109         * manual-tests/svg-animation-parseValues.svg: Added.
3110
3111 2007-02-10  Mitz Pettel  <mitz@webkit.org>
3112
3113         Reviewed by Adam.
3114
3115         - fix http://bugs.webkit.org/show_bug.cgi?id=11621
3116           REGRESSION (Native slider): slider thumb not updated when the mouse is dragged/released out of range
3117
3118         No automated test case because dumping the render tree updates layer positions anyway.
3119
3120         * manual-tests/slider-thumb-tracking.html: Added.
3121         * rendering/RenderSlider.cpp:
3122         (WebCore::RenderSlider::setCurrentPosition): Added call to updateLayerPosition()
3123         for the thumb's layer.
3124
3125 2007-02-09  Brady Eidson <beidson@apple.com>
3126
3127         Reviewed by Maciej
3128
3129         <rdar://problem/4965133> WebKit sends file:// url referrers
3130
3131         * loader/SubresourceLoader.cpp:
3132         (WebCore::SubresourceLoader::create): In SubresourceLoader::create(), we make a copy of the original request
3133         to use for the load.  We then call FrameLoader::canLoad() which tells us if we should hide the referer.  Before 
3134         this fix if it said to hide the referrer, we would simply not apply a new referrer to our copy of the request.
3135         But if the original request already had a referrer, so did our copy.  We simply have to clear the referrer from
3136         the copied request.
3137
3138 2007-02-10  Maciej Stachowiak  <mjs@apple.com>
3139
3140         Reviewed by me, patch from Ian Eng (cleaned up by me some).
3141
3142         - fixed <rdar://problem/4988091> objects attached to Window not cleared (memory leak)
3143         
3144         Test case: fast/dom/Window/window-appendages-cleared.html
3145
3146         * bindings/js/kjs_window.cpp:
3147         (KJS::Window::clearHelperObjectProperties):
3148         (KJS::Window::clear):
3149         * bindings/js/kjs_window.h:
3150
3151 2007-02-09  Brady Eidson  <beidson@apple.com>
3152
3153         Reviewed by Tim Hatcher
3154
3155         <rdar://problem/4985497> - Plugs a potential null DocumentLoader deref when 
3156         transitioning out of the Bookmarks View
3157
3158         * loader/FrameLoader.cpp:
3159         (WebCore::FrameLoader::recursiveGoToItem): add a null check
3160
3161 2007-02-09  Beth Dakin  <bdakin@apple.com>
3162
3163         Rubber-stamped by John . . . and Adam.
3164
3165         * page/ContextMenuController.cpp:
3166         (WebCore::ContextMenuController::contextMenuItemSelected): Missing 
3167         break.
3168
3169 2007-02-09  Justin Garcia  <justin.garcia@apple.com>
3170
3171         Reviewed by darin
3172
3173         <rdar://problem/4975120>
3174         REGRESSION: double-cursor after switching window away/back (11770)
3175         <http://bugs.webkit.org/show_bug.cgi?id=11328>
3176         Gmail Editor: Caret can simultaneously appear in both the TO: and message body fields
3177
3178         * page/mac/WebCoreFrameBridge.h: Removed two unused methods
3179         left over from the old form control implementation.
3180
3181 2007-02-09  John Sullivan  <sullivan@apple.com>
3182
3183         * rendering/bidi.cpp:
3184         (WebCore::bidiNext):
3185         At Darin's suggestion, moved the "next = 0" line from my previous patch to the start of the loop body
3186
3187 2007-02-09  Justin Garcia  <justin.garcia@apple.com>
3188
3189         Reviewed by john
3190         
3191         <rdar://problem/4960116>
3192         REGRESSION: Nightly Safari crashes in WebCore::SelectionController::xPosForVerticalArrowNavigation (12416)
3193
3194         * editing/SelectionController.cpp:
3195         (WebCore::SelectionController::xPosForVerticalArrowNavigation):
3196         Null check.  VisiblePosition creation can fail if a node that 
3197         contains the selection was made invisible after the selection 
3198         was made and before this function is called during a selection 
3199         modification operation.
3200
3201 2007-02-09  Justin Garcia  <justin.garcia@apple.com>
3202
3203         Reviewed by john
3204         
3205         <rdar://problem/4983858>
3206         REGRESSION: In a new mail message, attempting to select a single word causes the selection to extend to the previous line
3207
3208         * editing/TextIterator.cpp:
3209         (WebCore::SimplifiedBackwardsTextIterator::exitNode):
3210         We recently split shouldEmitNewlineForNode into
3211         shouldEmitNewline{Before, After}Node, so this function now
3212         needs an implementation that is different from
3213         SimplifiedBackwardsTextIterator::handleNonTextNode.  The
3214         difference is that we must call shouldEmit*BeforeNode
3215         instead of shouldEmit*AfterNode since we are a) exiting
3216         nodes and b) moving backward.
3217
3218 2007-02-09  Justin Garcia  <justin.garcia@apple.com>
3219
3220         Reviewed by john
3221
3222         <rdar://problem/4916541>
3223         Some of the selection isn't preserved during an Indent opreration
3224
3225         * editing/IndentOutdentCommand.cpp:
3226         (WebCore::indexForVisiblePosition): Added.
3227         (WebCore::IndentOutdentCommand::indentRegion): Use rangeLength
3228         and rangeFromLocationAndLength to restore the selection after
3229         the repeated moveParagraph calls necessary to perform indent are
3230         finished.
3231
3232 2007-02-09  John Sullivan  <sullivan@apple.com>
3233
3234         Reviewed by Kevin Decker
3235         
3236         - fixed <rdar://problem/4960095> REPRODUCIBLE HANG: WebKit freezes when printing as PDF
3237           a certain kind of code (12449)
3238  
3239         No test case because I don't know how to make the bug occur without printing.
3240
3241         * rendering/bidi.cpp:
3242         (WebCore::bidiNext):
3243         reset loop's "next" variable after using it; we were setting "current" to the same value
3244         of "next" each subsequent time through the loop, which is not helpful.
3245
3246 2007-02-09  Darin Adler  <darin@apple.com>
3247
3248         Reviewed by Adele.
3249
3250         - Add TextEvent to the DOM (based on the proposed DOM level 3)
3251           to be used to fix some international input bugs soon.
3252           At this point, we don't send any text events.
3253
3254         - Remove some obsolete files.
3255
3256         * CMakeLists.txt:
3257         * WebCore.pro:
3258         * WebCore.xcodeproj/project.pbxproj:
3259         * WebCoreSources.bkl:
3260         Add new files, remove obsolete files.
3261
3262         * DerivedSources.make: Add TextEvent to the Objective-C and JavaScript bindings lists.
3263         * WebCore.exp: Export DOMTextEvent Objective-C wrapper.
3264
3265         * bindings/js/kjs_events.cpp: (KJS::toJS): Added TextEvent to the list of Event subclasses
3266         so we make the right kind of JS wrapper.
3267         * bindings/objc/DOMEvents.mm: (+[DOMEvent _eventWith:]): Same thing, for Objective-C.
3268
3269         * bindings/objc/DOMInternal.h: Added DOMTextEventInternal.h.
3270
3271         * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::hasFeature):
3272         Added "TextEvents", "3.0" to the list of things we'll answer true for
3273         (as specified in the DOM Level 3 documentation).
3274         This isn't so great until we actually send textInput events, but that's coming soon.
3275
3276         * dom/Document.cpp: (WebCore::Document::createEvent): Add "TextEvent" as a way to make
3277         a TextEvent (as specified in the DOM Level 3 documentation).
3278
3279         * dom/Event.h:
3280         * dom/Event.cpp: (WebCore::Event::isTextEvent): Added virtual function to be used
3281         for runtime type checking of Event objects (as for other event types).
3282
3283         * dom/TextEvent.cpp: Added.
3284         * dom/TextEvent.h: Added.
3285         * dom/TextEvent.idl: Added.
3286
3287         * platform/mac/WebCoreWidgetHolder.h: Removed.
3288         * rendering/CounterListItem.h: Removed.
3289         * rendering/CounterResetNode.cpp: Removed.
3290         * rendering/CounterResetNode.h: Removed.
3291
3292 2007-02-09  Anders Carlsson  <acarlsson@apple.com>
3293
3294         Reviewed by Geoff.
3295
3296         <rdar://problem/4816376> 
3297         REGRESSION: NetNewsWire 3.0 - Crashes in WebDocumentLoaderMac::attachToFrame() (12674)
3298         
3299         The bug was that the NNW policy delegate never calls back on the policy listener so we'll try to do a load
3300         while there's a policy decision underway. The extra call to setPolicyDocumentLoader would cause a detached (and deallocated)
3301         WebDataSource to be reattached and thus causing a crash.
3302         
3303         * loader/FrameLoader.cpp:
3304         (WebCore::FrameLoader::load):
3305         Remove extra call to setPolicyDocumentLoader.
3306
3307 2007-02-09  Beth Dakin  <bdakin@apple.com>
3308
3309         Reviewed by Darin.
3310
3311         Fix for <rdar://problem/4674537> REGRESSION: Adobe Acrobat 8 - Text 
3312         blinks when mouse is moved, and is invisible otherwise
3313
3314         Acrobat 8 was relying on a WebKit bug that was fixed about a year 
3315         ago with r12753. The bug was that we would not reload a page if the 
3316         source of an iframe was set to the same value it already was. Now 
3317         that we have fixed the bug, Acrobat constantly reloads their EULA, 
3318         making it blinky and impossible to read. 
3319
3320         No layout test since the fix is to add an Acrobat-specific quirk.
3321
3322         * WebCore.exp:
3323         * html/HTMLFrameElementBase.cpp:
3324         (WebCore::HTMLFrameElementBase::setLocation): If the new url is the 
3325         same as the old one and we are honoring the Acrobat quirk, don't do 
3326         anything.
3327         * page/Settings.cpp:
3328         (WebCore::Settings::Settings):
3329         (WebCore::Settings::setNeedsAcrobatFrameReloadingQuirk):
3330         * page/Settings.h:
3331         (WebCore::Settings::needsAcrobatFrameReloadingQuirk):
3332
3333 2007-02-09  Brady Eidson  <beidson@apple.com>
3334
3335         Rubberstamped by Dave Harrison
3336
3337         Disable the thread-check assertion in WebCore, as well as Webkit
3338
3339         * WebCore.xcodeproj/project.pbxproj:
3340
3341 2007-02-08  Anders Carlsson  <acarlsson@apple.com>
3342
3343         Reviewed by Geoff.
3344
3345         No need to pause timeout checks anymore.
3346         
3347         * bindings/js/kjs_window.cpp:
3348         (KJS::WindowFunc::callAsFunction):
3349
3350 2007-02-09  John Sullivan  <sullivan@apple.com>
3351
3352         Reviewed by Beth
3353         
3354         - WebCore part of fix for radar 4939636, problems with context menu items and binaries linked
3355           against WebKit 2.0.
3356
3357         * platform/ContextMenuItem.h:
3358         (WebCore::):
3359         Tweaked comment; bumped enum value for new SPI tags to avoid conflict with pre-3.0 SPI tag values.
3360
3361 2007-02-09  Nicholas Shanks  <webkit@nickshanks.com>
3362
3363         Reviewed by Dave Hyatt.
3364
3365         Removed broken recognition of :last-* and :only-* selectors
3366
3367         * css/CSSGrammar.y:
3368         * css/CSSSelector.cpp:
3369         (WebCore::CSSSelector::extractPseudoType):
3370         * css/CSSSelector.h:
3371         (WebCore::CSSSelector::):
3372         * css/cssstyleselector.cpp:
3373         (WebCore::CSSStyleSelector::checkOneSelector):
3374
3375 2007-02-09  Maciej Stachowiak  <mjs@apple.com>
3376
3377         Reviewed by Mark.
3378
3379         <rdar://problem/4980176>
3380
3381         * page/Frame.cpp:
3382         (WebCore::Frame::pageDestroyed): Since this frame is getting
3383         disconnected from its page, ensure it is not the focus node.
3384
3385 2007-02-09  Krzysztof  <kkowalczyk@gmail.com>
3386
3387         Reviewed by Maciej.
3388
3389         gdklauncher crashes when compiled with NDEBUG defined.
3390
3391         * Projects/gdk/webcore-gdk.bkl:
3392
3393 2007-02-09  Maciej Stachowiak  <mjs@apple.com>
3394
3395         Reviewed by Mitz.
3396
3397         <rdar://problem/4971224> REGRESSION: ASSERT in WebCore with Mail (12491)
3398         http://bugs.webkit.org/show_bug.cgi?id=12491
3399
3400         No test case. Not testable since there is no way to do substitute
3401         data loads from layout tests.
3402         
3403         * loader/MainResourceLoader.cpp:
3404         (WebCore::MainResourceLoader::continueAfterContentPolicy): Don't dispatch data load
3405         callback when loading empty data.
3406
3407 2007-02-09  Mark Rowe  <mrowe@apple.com>
3408
3409         Reviewed by Maciej.
3410
3411         http://bugs.webkit.org/show_bug.cgi?id=12705
3412         REGRESSION: Crash with user stylesheet set
3413
3414         Allow the Frame::canLoad check to skipped so that user stylesheets can be loaded in remote documents.
3415
3416         * ChangeLog:
3417         * loader/DocLoader.cpp:
3418         (WebCore::DocLoader::requestCSSStyleSheet): Skip canLoad check if this is a user stylesheet.
3419         (WebCore::DocLoader::requestUserCSSStyleSheet):
3420         (WebCore::DocLoader::requestResource): Allow canLoad check to be skipped.
3421         * loader/DocLoader.h:
3422         * page/Frame.cpp:
3423         (WebCore::UserStyleSheetLoader::UserStyleSheetLoader):
3424
3425 2007-02-08  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
3426
3427         Reviewed by Darin.
3428
3429         Linux/gdk build fixes.
3430
3431         * Projects/gdk/webcore-gdk.bkl: Account for file renaming.
3432         * platform/gdk/KeyEventGdk.cpp: Make gdk's tab key recognized as tab so that
3433         keyboard link walking works on gdk.
3434         (WebCore::keyIdentifierForGdkKeyCode):
3435
3436 2007-02-08  Adele Peterson  <adele@apple.com>
3437
3438         Reviewed by Brady.
3439
3440         Fix for http://bugs.webkit.org/show_bug.cgi?id=12599
3441         <rdar://problem/4973507> REGRESSION: When replying in Gmail, the caret disappears when you start to type (12599)
3442
3443         When a frame's window was focused, the page didn't get updated about the new frame getting focus.
3444         This was causing handleKeyPress to fail because it kept getting a selection for the wrong frame (which wasn't editable).
3445
3446         Test: fast/frames/iframe-window-focus.html
3447
3448         * page/Frame.cpp:
3449         (WebCore::Frame::focusWindow):
3450         (WebCore::Frame::unfocusWindow):
3451         * page/Frame.h:
3452         * page/mac/FrameMac.mm:
3453         (WebCore::FrameMac::focusWindow):
3454         (WebCore::FrameMac::unfocusWindow):
3455
3456 2007-02-08  Adele Peterson  <adele@apple.com>
3457
3458         Reviewed by Brady.
3459
3460         Fix for http://bugs.webkit.org/show_bug.cgi?id=12480
3461         <rdar://problem/4971222> REGRESSION (NativeListBox): Deselecting option causes list to jump to top
3462
3463         Test: fast/forms/listbox-deselect-scroll.html
3464
3465         * html/HTMLSelectElement.cpp:
3466         (WebCore::HTMLSelectElement::activeSelectionStartListIndex): Added.  Returns the index for the active selection.  If there is no active selection,
3467          it returns the first selected index.
3468         (WebCore::HTMLSelectElement::activeSelectionEndListIndex): Added.  If there is no active selection, it returns the last selected index.
3469         * html/HTMLSelectElement.h:
3470         * rendering/RenderListBox.cpp: (WebCore::RenderListBox::scrollToRevealSelection): Instead of using the first and last selected indices,
3471           use the active selection indices to determine which item to reveal.  This way, when you're selecting with the keyboard, or the mouse,
3472           no unnecessary scrolling will occur if the end of your active selection is already visible.
3473
3474 2007-02-08  Adele Peterson  <adele@apple.com>
3475
3476         Reviewed by Hyatt.
3477
3478         Fix for <rdar://problem/4963411> Items of SELECT element are incorrectly highlighted when display:block is set
3479
3480         Test: fast/forms/select-block-background.html
3481
3482         * rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintObject):
3483           Paint the item backgrounds during the PaintPhaseChildBlockBackground or PaintPhaseChildBlockBackgrounds phase.
3484
3485 2007-02-08  Mitz Pettel  <mitz@webkit.org>
3486
3487         Reviewed by Adele.
3488
3489         - fix http://bugs.webkit.org/show_bug.cgi?id=11047
3490           REGRESSION: Empty options cause the entire select to collapse
3491         
3492         Test: fast/forms/select-empty-option-height.html
3493
3494         - fix http://bugs.webkit.org/show_bug.cgi?id=10783
3495           REGRESSION (r16044): Clicking a popup changes layout around it
3496
3497         * rendering/RenderMenuList.cpp:
3498         (WebCore::RenderMenuList::setText): If the option text is empty, use a RenderBR
3499         as inner text, to ensure that the inner div has line height.
3500
3501 2007-02-08  Geoffrey Garen  <ggaren@apple.com>
3502
3503         Reviewed by Beth Dakin.
3504
3505         Added a hard counter for SubresourceLoaders because the leaks tool now
3506         ignores them.
3507         
3508         * loader/SubresourceLoader.cpp:
3509         (WebCore::):
3510         (WebCore::SubresourceLoaderCounter::~SubresourceLoaderCounter):
3511         (WebCore::SubresourceLoader::SubresourceLoader):
3512         (WebCore::SubresourceLoader::~SubresourceLoader):
3513         * page/Frame.cpp: Removed unnecessary #define
3514
3515 2007-02-08  Geoffrey Garen  <ggaren@apple.com>
3516
3517         Reviewed by Beth Dakin.
3518
3519         Fixed <rdar://problem/4982374> CSSComputedStyleDeclaration::getPropertyCSSValue 
3520         leak reported by buildbot
3521         
3522         The leak was a typo: "new" instead of "return new". I also generously
3523         deployed RefPtr in places that were holding ref-counted objects in
3524         bare pointers.
3525
3526         * css/CSSComputedStyleDeclaration.cpp:
3527         (WebCore::valueForShadow):
3528         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3529
3530 2007-02-08  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
3531
3532         Reviewed by Adam Roben.
3533
3534         Linux/gdk build fixes.
3535
3536         * platform/gdk/EditorClientGdk.cpp: Added. Based on qt version.
3537         (WebCore::EditorClientGdk::shouldDeleteRange):
3538         (WebCore::EditorClientGdk::shouldShowDeleteInterface):
3539         (WebCore::EditorClientGdk::isContinuousSpellCheckingEnabled):
3540         (WebCore::EditorClientGdk::isGrammarCheckingEnabled):
3541         (WebCore::EditorClientGdk::spellCheckerDocumentTag):
3542         (WebCore::EditorClientGdk::shouldBeginEditing):
3543         (WebCore::EditorClientGdk::shouldEndEditing):
3544         (WebCore::EditorClientGdk::shouldInsertText):
3545         (WebCore::EditorClientGdk::shouldApplyStyle):
3546         (WebCore::EditorClientGdk::didBeginEditing):
3547         (WebCore::EditorClientGdk::respondToChangedContents):
3548         (WebCore::EditorClientGdk::didEndEditing):
3549         (WebCore::EditorClientGdk::didWriteSelectionToPasteboard):
3550         (WebCore::EditorClientGdk::didSetSelectionTypesForPasteboard):
3551         (WebCore::EditorClientGdk::selectWordBeforeMenuEvent):
3552         (WebCore::EditorClientGdk::isEditable):
3553         (WebCore::EditorClientGdk::registerCommandForUndo):
3554         (WebCore::EditorClientGdk::registerCommandForRedo):
3555         (WebCore::EditorClientGdk::clearUndoRedoOperations):
3556         (WebCore::EditorClientGdk::canUndo):
3557         (WebCore::EditorClientGdk::canRedo):
3558         (WebCore::EditorClientGdk::undo):
3559         (WebCore::EditorClientGdk::redo):
3560         (WebCore::EditorClientGdk::shouldInsertNode):
3561         (WebCore::EditorClientGdk::pageDestroyed):
3562         (WebCore::EditorClientGdk::smartInsertDeleteEnabled):
3563         (WebCore::EditorClientGdk::toggleContinuousSpellChecking):
3564         (WebCore::EditorClientGdk::toggleGrammarChecking):
3565         (WebCore::EditorClientGdk::handleKeyPress):
3566         (WebCore::EditorClientGdk::EditorClientGdk):
3567         (WebCore::EditorClientGdk::setPage):
3568         * platform/gdk/EditorClientGdk.h: Added. Ditto.
3569         * platform/gdk/FrameGdk.cpp: Add exitAfterLoading and dumpRenderTreeAfterLoading
3570         as small debugging features. Remove FrameGdkClient as no other platform has Frame*Client
3571         anymore. Adjust for new APIs.
3572         (WebCore::FrameGdk::FrameGdk):
3573         (WebCore::FrameGdk::onDidFinishLoad):
3574         (WebCore::FrameGdk::dumpRenderTree):
3575         (WebCore::FrameGdk::keyPress):
3576         (WebCore::FrameGdk::handleGdkEvent):
3577         (WebCore::FrameGdk::focusWindow):
3578         (WebCore::FrameGdk::unfocusWindow):
3579         (WebCore::FrameGdk::getObjectInstanceForWidget):
3580         (WebCore::FrameGdk::getEmbedInstanceForWidget):
3581         (WebCore::FrameGdk::bindingRootObject):
3582         (WebCore::FrameGdk::print):
3583         (WebCore::FrameGdk::getAppletInstanceForWidget):
3584         (WebCore::FrameGdk::issueCutCommand):
3585         (WebCore::FrameGdk::issueCopyCommand):
3586         (WebCore::FrameGdk::issuePasteCommand):
3587         (WebCore::FrameGdk::issueTransposeCommand):
3588         (WebCore::FrameGdk::issuePasteAndMatchStyleCommand):
3589         (WebCore::FrameGdk::markedTextRange):
3590         (WebCore::FrameGdk::shouldChangeSelection):
3591         (WebCore::FrameGdk::respondToChangedSelection):
3592         (WebCore::FrameGdk::mimeTypeForFileName):
3593         * platform/gdk/FrameGdk.h: Ditto.
3594         (WebCore::FrameGdk::setExitAfterLoading):
3595         (WebCore::FrameGdk::exitAfterLoading):
3596         (WebCore::FrameGdk::setDumpRenderTreeAfterLoading):
3597         (WebCore::FrameGdk::dumpRenderTreeAfterLoading):
3598         (WebCore::GdkFrame):
3599         * platform/gdk/TemporaryLinkStubs.cpp: Adjust to new APIs. Small cleanups.
3600         (FrameView::updateBorder):
3601         (Widget::setEnabled):
3602         (Widget::isEnabled):
3603         (Widget::enableFlushDrawing):
3604         (Widget::removeFromParent):
3605         (Widget::paint):
3606         (Widget::setIsSelected):
3607         (Widget::invalidate):
3608         (Widget::invalidateRect):
3609         (PlatformMouseEvent::PlatformMouseEvent):
3610         (WebCore::findWordBoundary):
3611         (ChromeClientGdk::chromeDestroyed):
3612         (ChromeClientGdk::closeWindowSoon):
3613         (ChromeClientGdk::canTakeFocus):
3614         (ChromeClientGdk::takeFocus):
3615         (ChromeClientGdk::canRunBeforeUnloadConfirmPanel):
3616         (ChromeClientGdk::addMessageToConsole):
3617         (ChromeClientGdk::runBeforeUnloadConfirmPanel):
3618         (ChromeClientGdk::runJavaScriptAlert):
3619         (ChromeClientGdk::runJavaScriptConfirm):
3620         (ChromeClientGdk::runJavaScriptPrompt):
3621         (ChromeClientGdk::setStatusbarText):
3622         (ChromeClientGdk::shouldInterruptJavaScript):
3623         (WebCore::inputElementAltText):
3624         (WebCore::resetButtonDefaultLabel):
3625         (WebCore::searchableIndexIntroduction):
3626         (WebCore::fileButtonChooseFileLabel):
3627         (WebCore::fileButtonNoFileSelectedLabel):
3628         (WebCore::contextMenuItemTagOpenLinkInNewWindow):
3629         (WebCore::contextMenuItemTagDownloadLinkToDisk):
3630         (WebCore::contextMenuItemTagCopyLinkToClipboard):
3631         (WebCore::contextMenuItemTagOpenImageInNewWindow):
3632         (WebCore::contextMenuItemTagDownloadImageToDisk):
3633         (WebCore::contextMenuItemTagCopyImageToClipboard):
3634         (WebCore::contextMenuItemTagOpenFrameInNewWindow):
3635         (WebCore::contextMenuItemTagCopy):
3636         (WebCore::contextMenuItemTagGoBack):
3637         (WebCore::contextMenuItemTagGoForward):
3638         (WebCore::contextMenuItemTagStop):
3639         (WebCore::contextMenuItemTagReload):
3640         (WebCore::contextMenuItemTagCut):
3641         (WebCore::contextMenuItemTagPaste):
3642         (WebCore::contextMenuItemTagNoGuessesFound):
3643         (WebCore::contextMenuItemTagIgnoreSpelling):
3644         (WebCore::contextMenuItemTagLearnSpelling):
3645         (WebCore::contextMenuItemTagSearchWeb):
3646         (WebCore::contextMenuItemTagLookUpInDictionary):
3647         (WebCore::contextMenuItemTagOpenLink):
3648         (WebCore::contextMenuItemTagIgnoreGrammar):
3649         (WebCore::contextMenuItemTagSpellingMenu):
3650         (WebCore::contextMenuItemTagShowSpellingPanel):
3651         (WebCore::contextMenuItemTagCheckSpelling):
3652         (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
3653         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
3654         (WebCore::contextMenuItemTagFontMenu):
3655         (WebCore::contextMenuItemTagBold):
3656         (WebCore::contextMenuItemTagItalic):
3657         (WebCore::contextMenuItemTagUnderline):
3658         (WebCore::contextMenuItemTagOutline):
3659         (WebCore::contextMenuItemTagWritingDirectionMenu):
3660         (WebCore::contextMenuItemTagDefaultDirection):
3661         (WebCore::contextMenuItemTagLeftToRight):
3662         (WebCore::contextMenuItemTagRightToLeft):
3663         (PlugInInfoStore::createPluginInfoForPluginAtIndex):
3664         (PlugInInfoStore::pluginCount):
3665         (WebCore::PlugInInfoStore::supportsMIMEType):
3666         (WebCore::refreshPlugins):
3667         (SearchPopupMenu::saveRecentSearches):
3668         (SearchPopupMenu::loadRecentSearches):
3669         (SearchPopupMenu::SearchPopupMenu):
3670         (Path::apply):
3671         (PlatformScrollbar::PlatformScrollbar):
3672         (PlatformScrollbar::~PlatformScrollbar):
3673         (PlatformScrollbar::width):
3674         (PlatformScrollbar::height):
3675         (PlatformScrollbar::setEnabled):
3676         (PlatformScrollbar::paint):
3677         (PlatformScrollbar::updateThumbPosition):
3678         (PlatformScrollbar::updateThumbProportion):
3679         (PlatformScrollbar::setRect):
3680         (ResourceHandle::willLoadFromCache):
3681         (ResourceHandle::loadsBlocked):
3682         (ResourceHandle::loadResourceSynchronously):
3683         (PageCache::close):
3684         (Editor::ignoreSpelling):
3685         (Editor::learnSpelling):
3686         (Editor::isSelectionUngrammatical):
3687         (Editor::isSelectionMisspelled):
3688         (Editor::guessesForMisspelledSelection):
3689         (Editor::guessesForUngrammaticalSelection):
3690         (Editor::markMisspellingsAfterTypingToPosition):
3691         (Editor::newGeneralClipboard):
3692         (Pasteboard::generalPasteboard):
3693         (Pasteboard::writeSelection):
3694         (Pasteboard::writeURL):
3695         (Pasteboard::clear):
3696         (Pasteboard::canSmartReplace):
3697         (Pasteboard::documentFragment):
3698         (Pasteboard::plainText):
3699         (Pasteboard::Pasteboard):
3700         (Pasteboard::~Pasteboard):
3701         (ContextMenu::ContextMenu):
3702         (ContextMenu::~ContextMenu):
3703         (ContextMenu::appendItem):
3704         (ContextMenu::setPlatformDescription):
3705         (ContextMenu::platformDescription):
3706         (ContextMenuItem::ContextMenuItem):
3707         (ContextMenuItem::~ContextMenuItem):
3708         (ContextMenuItem::releasePlatformDescription):
3709         (ContextMenuItem::type):
3710         (ContextMenuItem::setType):
3711         (ContextMenuItem::action):
3712         (ContextMenuItem::setAction):
3713         (ContextMenuItem::title):
3714         (ContextMenuItem::setTitle):
3715         (ContextMenuItem::platformSubMenu):
3716         (ContextMenuItem::setSubMenu):
3717         (ContextMenuItem::setChecked):
3718         (ContextMenuItem::setEnabled):
3719         (WebCore::systemBeep):
3720         (WebCore::userIdleTime):
3721
3722 2007-02-08  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
3723
3724         Reviewed by Adam Roben.
3725
3726         Linux/gdk build fixes.
3727
3728         * platform/GlyphPageTreeNode.h: Fix header guard name.
3729         * platform/gdk/ChromeClientGdk.h:
3730         * platform/gdk/CursorGdk.cpp:
3731         (WebCore::verticalTextCursor):
3732         (WebCore::cellCursor):
3733         (WebCore::contextMenuCursor):
3734         (WebCore::noDropCursor):
3735         (WebCore::copyCursor):
3736         (WebCore::progressCursor):
3737         (WebCore::aliasCursor):
3738         * platform/gdk/MouseEventGdk.cpp:
3739         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
3740         * platform/gdk/PageGdk.cpp: Removed. No longer used.
3741         * platform/gdk/RenderThemeGdk.cpp:
3742         (WebCore::RenderThemeGdk::getThemeData):
3743         (WebCore::RenderThemeGdk::setCheckboxSize):
3744         (WebCore::RenderThemeGdk::paintCheckbox):
3745         (WebCore::RenderThemeGdk::setRadioSize):
3746         (WebCore::RenderThemeGdk::paintRadio):
3747         (WebCore::RenderThemeGdk::paintButton):
3748         (WebCore::RenderThemeGdk::adjustTextFieldStyle):
3749         (WebCore::RenderThemeGdk::paintTextField):
3750         (WebCore::RenderThemeGdk::paintTextArea):
3751         (WebCore::RenderThemeGdk::systemFont):
3752         * platform/gdk/RenderThemeGdk.h:
3753         * platform/gdk/ScreenGdk.cpp:
3754         (WebCore::screenDepth):
3755         (WebCore::screenDepthPerComponent):
3756         (WebCore::screenIsMonochrome):
3757         (WebCore::screenRect):
3758         (WebCore::screenAvailableRect):
3759
3760 2007-02-08  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
3761
3762         Reviewed by Adam Roben.
3763
3764         Linux/gdk build fixes for cairo.
3765
3766         * platform/graphics/GraphicsContext.cpp:
3767         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3768         (WebCore::GraphicsContext::GraphicsContext):
3769         (WebCore::GraphicsContext::strokeArc):
3770         (WebCore::GraphicsContext::drawFocusRing):
3771         (WebCore::GraphicsContext::setFocusRingClip):
3772         (WebCore::GraphicsContext::clearFocusRingClip):
3773         (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
3774         (WebCore::GraphicsContext::origin):
3775         (WebCore::GraphicsContext::setPlatformFillColor):
3776         (WebCore::GraphicsContext::setPlatformStrokeColor):
3777         (WebCore::GraphicsContext::setPlatformStrokeThickness):
3778         (WebCore::GraphicsContext::setPlatformStrokeStyle):
3779         (WebCore::GraphicsContext::setPlatformFont):
3780         (WebCore::GraphicsContext::setURLForRect):
3781         (WebCore::GraphicsContext::addRoundedRectClip):
3782         (WebCore::GraphicsContext::addInnerRoundedRectClip):
3783         (WebCore::GraphicsContext::setShadow):
3784         (WebCore::GraphicsContext::clearShadow):
3785         (WebCore::GraphicsContext::beginTransparencyLayer):
3786         (WebCore::GraphicsContext::endTransparencyLayer):
3787         (WebCore::GraphicsContext::clearRect):
3788         (WebCore::GraphicsContext::strokeRect):
3789         (WebCore::GraphicsContext::setLineCap):
3790         (WebCore::GraphicsContext::setLineJoin):
3791         (WebCore::GraphicsContext::setMiterLimit):
3792         (WebCore::GraphicsContext::setAlpha):
3793         (WebCore::toCairoOperator):
3794         (WebCore::GraphicsContext::setCompositeOperation):
3795         (WebCore::GraphicsContext::clip):
3796         (WebCore::GraphicsContext::rotate):
3797         (WebCore::GraphicsContext::scale):
3798         (WebCore::GraphicsContext::clipOut):
3799         (WebCore::GraphicsContext::clipOutEllipseInRect):
3800         (WebCore::GraphicsContext::fillRoundedRect):
3801
3802 2007-02-08  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
3803
3804         Reviewed by Adam Roben.
3805
3806         Linux/gdk build fixes.
3807
3808         * Projects/gdk/webcore-gdk.bkl:
3809         * WebCoreSources.bkl:
3810         * webcore-base.bkl:
3811
3812 2007-02-08  Brady Eidson  <beidson@apple.com>
3813
3814         Reviewed by Tim Hatcher
3815
3816         Tweaked the thread violation behavior to be disabled by default, and to provide
3817         an easy breakpoint to set.  
3818         The possibilities for the "WebCoreThreadCheck" user defaults key are -
3819           - The value "None" disables thread checking
3820           - The value "Log" causes an NSLog on a violation
3821           - The value "Exception" causes exceptions to be raised on a violation
3822
3823         * platform/Logging.h:
3824         * platform/mac/LoggingMac.mm:
3825         (WebCore::_WebCoreThreadViolationCheck):
3826         (WebCoreReportThreadViolation):  In the global namespace, making breakpoints cake!
3827
3828 2007-02-08  Brady Eidson  <beidson@apple.com>
3829
3830         Reviewed by Tim Hatcher
3831
3832         <rdar://problem/4983515> Need mechanism to protect against WebKit calls from secondary threads
3833         This initial landing is a conservative move until we can be certain of performance impact.
3834         By writing to the user defaults key @"WebCoreThreadCheck" for the WebKit app you're running -
3835           - The value "None" disables thread checking
3836           - The value "Exception" causes exceptions to be raised on a violation
3837           - The default is to do the check, and NSLog each violation
3838
3839         * bindings/objc/ExceptionHandlers.h:  Add a "Is Main Thread" assert macro
3840         * bindings/scripts/CodeGeneratorObjC.pm: Use new mechanism in allocs and deallocs for now
3841
3842         * platform/Logging.h: Added WebCoreThreadViolationCheck macro
3843         * platform/mac/LoggingMac.mm:
3844         (WebCore::_WebCoreThreadViolationCheck): Check for main-threadedness, and do some stuff
3845
3846 2007-02-08  Kevin McCullough  <KMcCullough@apple.com>
3847
3848         Reviewed by Maciej, Darin, and Mark.
3849
3850         rdar://problem/4922454
3851         - Prevents remote sites from executing local scripts.
3852
3853         * bindings/objc/DOM.mm: - renamed a function that is now in the base class
3854         (-[DOMElement image]):
3855         (-[DOMElement _imageTIFFRepresentation]):
3856         * dom/XMLTokenizer.cpp: - removed needless asserts
3857         (WebCore::XMLTokenizer::notifyFinished):
3858         * html/HTMLImageLoader.cpp: - renamed a function that is now in the base class
3859         (WebCore::HTMLImageLoader::dispatchLoadEvent):
3860         * html/HTMLTokenizer.cpp: - removed needless asserts
3861         (WebCore::HTMLTokenizer::reset):
3862         (WebCore::HTMLTokenizer::notifyFinished):
3863         * ksvg2/misc/SVGImageLoader.cpp: - renamed a function that is now in the base class
3864         (WebCore::SVGImageLoader::dispatchLoadEvent):
3865         * loader/Cache.cpp: - return early if an error occured
3866         (WebCore::Cache::requestResource):
3867         (WebCore::Cache::remove):
3868         * loader/CachedImage.h: - renamed a function that is now in the base class
3869         (WebCore::CachedImage::canRender):
3870         * loader/CachedResource.h: - renamed a function that is now in the base class
3871         (WebCore::CachedResource::errorOccurred):
3872         * loader/CachedScript.h: - renamed a function that is now in the base class 
3873         (WebCore::CachedScript::schedule):
3874         * loader/DocLoader.cpp: - The heart of the fix, prevents resources from being created or retrieved from the cache if a remote site is requesting the local resource.
3875         (WebCore::DocLoader::requestResource):
3876         (WebCore::DocLoader::setLoadInProgress):
3877         * page/EventHandler.cpp: - renamed a function that is now in the base class
3878         (WebCore::selectCursor):
3879         * rendering/HitTestResult.cpp: - renamed a function that is now in the base class
3880         (WebCore::HitTestResult::image):
3881         * rendering/RenderImage.cpp: - renamed a function that is now in the base class
3882         (WebCore::RenderImage::setCachedImage):
3883         (WebCore::RenderImage::imageChanged):
3884         (WebCore::RenderImage::paint):
3885         (WebCore::RenderImage::layout):
3886         (WebCore::RenderImage::calcAspectRatioWidth):
3887         (WebCore::RenderImage::calcAspectRatioHeight):
3888         * rendering/RenderImage.h: - renamed a function that is now in the base class
3889         (WebCore::RenderImage::errorOccurred):
3890         * rendering/RenderListItem.cpp: - renamed a function that is now in the base class
3891         (WebCore::RenderListItem::setStyle):
3892         * rendering/RenderListMarker.cpp: - renamed a function that is now in the base class
3893         (WebCore::RenderListMarker::isImage):
3894
3895 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
3896
3897         Reviewed by Maciej.
3898
3899         Add updateGeometry() to gdk's ScrollView. Needed to fix resizing of the window
3900         in gdk.
3901
3902         * platform/ScrollView.h:
3903         * platform/gdk/ScrollViewGdk.cpp:
3904         (WebCore::ScrollView::updateGeometry):
3905         (WebCore::ScrollView::setDrawable):
3906
3907 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
3908
3909         Reviewed by Maciej.
3910
3911         Linux/gdk build fixes.
3912
3913         * platform/ContextMenuItem.h:
3914         * platform/PlatformMenuDescription.h:
3915         * platform/gdk/PopupMenuGdk.cpp: Added. Renamed from RenderPopupMenuGdk.cpp for
3916         consistency with other platforms.
3917         (WebCore::PopupMenu::PopupMenu):
3918         (WebCore::PopupMenu::~PopupMenu):
3919         * platform/gdk/RenderPopupMenuGdk.cpp: Removed.
3920         * platform/gdk/RenderPopupMenuGdk.h: Removed.
3921
3922 2007-02-07  Mitz Pettel  <mitz@webkit.org>
3923
3924         Reviewed by Maciej.
3925
3926         - fix http://bugs.webkit.org/show_bug.cgi?id=12608
3927           Incorrect min. width calculation of a series of floats with clear:both and white-space:nowrap
3928
3929         Test: fast/block/float/nowrap-clear-min-width.html
3930
3931         * rendering/RenderBlock.cpp:
3932         (WebCore::RenderBlock::calcInlineMinMaxWidth):
3933
3934 2007-02-07  Mitz Pettel  <mitz@webkit.org>
3935
3936         Reviewed by Dave Hyatt.
3937
3938         - fix http://bugs.webkit.org/show_bug.cgi?id=10522
3939           REGRESSION: Incomplete repaint after table relayout that decreases height
3940
3941         Test: fast/repaint/intermediate-layout-position.html
3942
3943         * rendering/RenderBlock.cpp:
3944         (WebCore::RenderBlock::layoutBlock): Adjust the old bounds by the layout delta,
3945         to get the block's absolute bounds as they were before its ancestors moved it
3946         during layout.
3947         (WebCore::RenderBlock::collapseMargins): Update the layout delta for the child
3948         when moving it.
3949         (WebCore::RenderBlock::clearFloatsIfNeeded): Ditto.
3950         (WebCore::RenderBlock::determineHorizontalPosition): Ditto.
3951         (WebCore::RenderBlock::layoutBlockChildren): Ditto.
3952         * rendering/RenderFlexibleBox.cpp:
3953         (WebCore::RenderFlexibleBox::layoutBlock): Adjust the old bounds by the current
3954         layout delta.
3955         * rendering/RenderHTMLCanvas.cpp:
3956         (WebCore::RenderHTMLCanvas::layout): Ditto.
3957         * rendering/RenderImage.cpp:
3958         (WebCore::RenderImage::layout): Ditto.
3959         * rendering/RenderTable.cpp:
3960         (WebCore::RenderTable::layout): Ditto.
3961         * rendering/RenderView.h:
3962         (WebCore::RenderView::layoutDelta): Added. Keeps track of the offset between
3963         the position of the object currently being laid out and its position at the
3964         end of the last layout.
3965         (WebCore::RenderView::addLayoutDelta): Added.
3966
3967 2007-02-07  Christopher Brichford  <chrisb@adobe.com>
3968
3969         Reviewed by Brady.
3970
3971         http://bugs.webkit.org/show_bug.cgi?id=6286
3972         Very large (~500MB) images cause reproducible Safari crash
3973
3974         * loader/CachedImage.cpp: 
3975         (WebCore::CachedImage::bufferData): Detect failure to create a
3976         large Vector<> and call error() when that happens.
3977
3978 2007-02-07  Mitz Pettel  <mitz@webkit.org>
3979
3980         Reviewed by Dave Hyatt.
3981
3982         - fix http://bugs.webkit.org/show_bug.cgi?id=5399
3983           no-repeat on negatively positioned background images are ignored
3984
3985         Test: fast/backgrounds/repeat/negative-offset-repeat.html
3986
3987         - fix http://bugs.webkit.org/show_bug.cgi?id=5821
3988           Changing background of <col> doesn't repaint the column
3989
3990         Test: fast/repaint/table-col-background.html
3991
3992         - fix http://bugs.webkit.org/show_bug.cgi?id=11720
3993           REGRESSION: large amounts of CPU consumed viewing this site
3994
3995         * rendering/RenderBox.cpp:
3996         (WebCore::RenderBox::imageChanged): Added. Finds the border and/or background
3997         layer(s) that use the image and invalidates only the rect in which the image
3998         actually paints. There are two special cases in this function: 1) for the body
3999         element, the background is propagated to the root; 2) inline flows do a full
4000         repaint.
4001         (WebCore::RenderBox::calculateBackgroundImageGeometry): Added. Factored out,
4002         simplified and corrected the calculation of the rectangle into which the background
4003         image paints, the tile size and the pattern phase.
4004         (WebCore::RenderBox::paintBackgroundExtended):
4005         * rendering/RenderBox.h:
4006         * rendering/RenderObject.cpp:
4007         * rendering/RenderObject.h:
4008         (WebCore::RenderObject::imageChanged): Moved the implementation to RenderBox.
4009         * rendering/RenderTableCol.cpp:
4010         (WebCore::RenderTableCol::getAbsoluteRepaintRect): Overridden to return the
4011         table's repaint rect.
4012         (WebCore::RenderTableCol::imageChanged): Overridden to do a full repaint, which
4013         currently repaints the entire table.
4014         * rendering/RenderTableCol.h:
4015         * rendering/RenderTableRow.cpp:
4016         (WebCore::RenderTableRow::imageChanged): Overridden to do a full repaint
4017         of the row, since the backgrounds are painted by the cells.
4018         * rendering/RenderTableRow.h:
4019         * rendering/RenderTableSection.cpp:
4020         (WebCore::RenderTableSection::imageChanged): Overridden to do a full
4021         repaint of the section, since the backgrounds are painted by the cells.
4022         * rendering/RenderTableSection.h:
4023
4024 2007-02-07  Anders Carlsson  <acarlsson@apple.com>
4025
4026         Reviewed by Maciej.
4027
4028         Move shouldInterruptJavaScript to the Chrome.
4029
4030         * bindings/js/kjs_binding.cpp:
4031         (KJS::ScriptInterpreter::shouldInterruptScript):
4032         * page/Chrome.cpp:
4033         (WebCore::Chrome::shouldInterruptJavaScript):
4034         * page/Chrome.h:
4035         * page/ChromeClient.h:
4036         * page/Frame.h:
4037         * page/mac/FrameMac.h:
4038         * page/mac/FrameMac.mm:
4039         * page/mac/WebCoreFrameBridge.h:
4040         * platform/graphics/svg/SVGImageEmptyClients.h:
4041         (WebCore::SVGEmptyChromeClient::shouldInterruptJavaScript):
4042
4043 2007-02-07  Darin Adler  <darin@apple.com>
4044
4045         Reviewed by Maciej.
4046
4047         - <rdar://problem/4826861> WebKit tests show memory leaks in NSHTMLReader, caused by method named "hash"
4048
4049         * bindings/scripts/CodeGeneratorObjC.pm: Added a list of method names we should never use, since they
4050         are in base classes WebScriptObject and NSObject. Luckily, only "hash" is causing trouble. Added
4051         "hash" to the existing special case for "id". Now "hash" is "hashName" just as "id" is "idName".
4052
4053 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
4054
4055         Reviewed by Adam Roben.
4056
4057         Linux/gdk build fixes for graphics-related stuff.
4058
4059         * platform/graphics/cairo/ImageCairo.cpp:
4060         (WebCore::BitmapImage::checkForSolidColor):
4061         * platform/graphics/cairo/ImageSourceCairo.cpp:
4062         (WebCore::ImageSource::setData):
4063         * platform/graphics/gdk/ImageGdk.cpp:
4064         (WebCore::BitmapImage::initPlatformData):
4065         (WebCore::BitmapImage::invalidatePlatformData):
4066         (WebCore::Image::loadPlatformResource):
4067         (WebCore::Image::drawPattern):
4068
4069 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
4070
4071         Reviewed by Maciej.
4072
4073         Linux/gdk build fixes related to networking.
4074
4075         * platform/network/ResourceHandleInternal.h: Add accessor for m_client.
4076         (WebCore::ResourceHandleInternal::client):
4077         * platform/network/gdk/ResourceHandleCurl.cpp: Add missing functions and
4078         massage for changed APIs.
4079         (WebCore::ResourceHandle::start):
4080         (WebCore::ResourceHandle::cancel):
4081         (WebCore::ResourceHandle::bufferedData):
4082         (WebCore::ResourceHandle::supportsBufferedData):
4083         (WebCore::ResourceHandle::setDefersLoading):
4084         * platform/network/gdk/ResourceHandleManager.cpp: Rename get() to
4085         sharedInstance(). Massaged for changed APIs.
4086         (WebCore::ResourceHandleManager::sharedInstance):
4087         (WebCore::writeCallback):
4088         (WebCore::ResourceHandleManager::downloadTimerCallback):
4089         (WebCore::ResourceHandleManager::remove):
4090         * platform/network/gdk/ResourceHandleManager.h: Ditto.
4091
4092 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
4093
4094         Reviewed by Maciej.
4095
4096         Mismatched type of alloc/free function crashes gdk build.
4097
4098         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
4099         (WebCore::JPEGImageReader::close):
4100
4101 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
4102
4103         Reviewed by Adam Roben.
4104
4105         Linux/gdk build fixes - add file based on qt implementation.
4106
4107         * platform/DragData.h:
4108         * platform/gdk/DragDataGdk.cpp: Added.
4109
4110 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
4111
4112         Reviewed by Adam Roben.
4113
4114         Linux/gdk build fixes - add new files based on qt implementation.
4115
4116         * page/gdk/DragControllerGdk.cpp: Added.
4117         (WebCore::DragController::dragOperation):
4118         * page/gdk/EventHandlerGdk.cpp: Added.
4119         (WebCore::EventHandler::focusDocumentView):
4120         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
4121         (WebCore::EventHandler::handleDrag):
4122         (WebCore::EventHandler::eventActivatedView):
4123
4124 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
4125
4126         Reviewed by Adam Roben.
4127
4128         Linux/gdk build fixes - add new files based on Qt implementation.
4129
4130         * loader/gdk/DocumentLoaderGdk.cpp: Added.
4131         (WebCore::DocumentLoader::getResponseModifiedHeader):
4132         * loader/gdk/FrameLoaderClientGdk.cpp: Added.
4133         (WebCore::FrameLoaderClientGdk::FrameLoaderClientGdk):
4134         (WebCore::FrameLoaderClientGdk::frame):
4135         (WebCore::FrameLoaderClientGdk::userAgent):
4136         (WebCore::FrameLoaderClientGdk::createDocumentLoader):
4137         (WebCore::FrameLoaderClientGdk::dispatchWillSubmitForm):
4138         (WebCore::FrameLoaderClientGdk::committedLoad):
4139         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveAuthenticationChallenge):
4140         (WebCore::FrameLoaderClientGdk::dispatchDidCancelAuthenticationChallenge):
4141         (WebCore::FrameLoaderClientGdk::dispatchWillSendRequest):
4142         (WebCore::FrameLoaderClientGdk::assignIdentifierToInitialRequest):
4143         (WebCore::FrameLoaderClientGdk::postProgressStartedNotification):
4144         (WebCore::FrameLoaderClientGdk::postProgressEstimateChangedNotification):
4145         (WebCore::FrameLoaderClientGdk::postProgressFinishedNotification):
4146         (WebCore::FrameLoaderClientGdk::frameLoaderDestroyed):
4147         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveResponse):
4148         (WebCore::FrameLoaderClientGdk::dispatchDecidePolicyForMIMEType):
4149         (WebCore::FrameLoaderClientGdk::dispatchDecidePolicyForNewWindowAction):
4150         (WebCore::FrameLoaderClientGdk::dispatchDecidePolicyForNavigationAction):
4151         (WebCore::FrameLoaderClientGdk::createPlugin):
4152         (WebCore::FrameLoaderClientGdk::createFrame):
4153         (WebCore::FrameLoaderClientGdk::redirectDataToPlugin):
4154         (WebCore::FrameLoaderClientGdk::createJavaAppletWidget):
4155         (WebCore::FrameLoaderClientGdk::objectContentType):
4156         (WebCore::FrameLoaderClientGdk::overrideMediaType):
4157         (WebCore::FrameLoaderClientGdk::windowObjectCleared):
4158         (WebCore::FrameLoaderClientGdk::setMainFrameDocumentReady):
4159         (WebCore::FrameLoaderClientGdk::hasWebView):
4160         (WebCore::FrameLoaderClientGdk::hasFrameView):
4161         (WebCore::FrameLoaderClientGdk::dispatchDidFinishLoad):
4162         (WebCore::FrameLoaderClientGdk::frameLoadCompleted):
4163         (WebCore::FrameLoaderClientGdk::privateBrowsingEnabled):
4164         (WebCore::FrameLoaderClientGdk::makeDocumentView):
4165         (WebCore::FrameLoaderClientGdk::makeRepresentation):
4166         (WebCore::FrameLoaderClientGdk::forceLayout):
4167         (WebCore::FrameLoaderClientGdk::forceLayoutForNonHTML):
4168         (WebCore::FrameLoaderClientGdk::setCopiesOnScroll):
4169         (WebCore::FrameLoaderClientGdk::detachedFromParent1):
4170         (WebCore::FrameLoaderClientGdk::detachedFromParent2):
4171         (WebCore::FrameLoaderClientGdk::detachedFromParent3):
4172         (WebCore::FrameLoaderClientGdk::detachedFromParent4):
4173         (WebCore::FrameLoaderClientGdk::loadedFromPageCache):
4174         (WebCore::FrameLoaderClientGdk::dispatchDidHandleOnloadEvents):
4175         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveServerRedirectForProvisionalLoad):
4176         (WebCore::FrameLoaderClientGdk::dispatchDidCancelClientRedirect):
4177         (WebCore::FrameLoaderClientGdk::dispatchWillPerformClientRedirect):
4178         (WebCore::FrameLoaderClientGdk::dispatchDidChangeLocationWithinPage):
4179         (WebCore::FrameLoaderClientGdk::dispatchWillClose):
4180         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveIcon):
4181         (WebCore::FrameLoaderClientGdk::dispatchDidStartProvisionalLoad):
4182         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveTitle):
4183         (WebCore::FrameLoaderClientGdk::dispatchDidCommitLoad):
4184         (WebCo