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