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