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