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