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