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