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