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