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