1c331173d592f19e75efc3e21ffffab3533efcd4
[WebKit-https.git] / WebCore / ChangeLog
1 2007-06-13  Darin Adler  <darin@apple.com>
2
3         Reviewed by Kevin Decker.
4
5         - fix <rdar://problem/5264923> Safari frequently "stalls" beneath
6           +[NSFont fontWithName:size:] while loading a web page (searching on disk for the font)
7
8         * platform/mac/WebFontCache.mm:
9         (+[WebFontCache internalFontWithFamily:traits:size:]): Renamed from fontWithFamily.
10         Took out the auto-activation code.
11         (+[WebFontCache fontWithFamily:traits:size:]): Added. Calls internalFontWithFamily,
12         then calls NSFont to trigger activation if that returned nil, then calls
13         internalFontWithFamily again.
14
15 2007-06-13  Anders Carlsson  <andersca@apple.com>
16
17         Reviewed by Geoff.
18
19         Pass the root object to methods that end up creating new ObjcInstance objects.
20         
21         * bindings/objc/WebScriptObject.mm:
22         (listFromNSArray):
23         (-[WebScriptObject callWebScriptMethod:withArguments:]):
24         (-[WebScriptObject evaluateWebScript:]):
25         (-[WebScriptObject setValue:forKey:]):
26         (-[WebScriptObject valueForKey:]):
27         (-[WebScriptObject removeWebScriptKey:]):
28         (-[WebScriptObject setWebScriptValueAtIndex:value:]):
29
30 2007-06-13  Anders Carlsson  <andersca@apple.com>
31
32         Reviewed by Darin.
33
34         <rdar://problem/5267992>
35         Make sure an alert doesn't allow loading to continue inside a script.
36         
37         Make sure to defer all loads where it's possible for a second main loop to be running.
38         
39         * page/Chrome.cpp:
40         (WebCore::Chrome::runModal):
41         (WebCore::Chrome::runBeforeUnloadConfirmPanel):
42         (WebCore::Chrome::runJavaScriptAlert):
43         (WebCore::Chrome::runJavaScriptConfirm):
44         (WebCore::Chrome::runJavaScriptPrompt):
45         (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
46         (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
47         
48         * platform/network/cf/ResourceHandleCFNet.cpp:
49         (WebCore::ResourceHandle::setDefersLoading):
50         Implement this.
51
52 2007-06-13  Alp Toker  <alp.toker@collabora.co.uk>
53
54         Reviewed by Rob.
55
56         http://bugs.webkit.org/show_bug.cgi?id=14060
57         Cairo SVG support
58
59         * WebCore.pro: Add new files to the build.
60         * platform/graphics/svg/SVGPaintServerPattern.h:
61         * platform/graphics/svg/SVGPaintServerSolid.h:
62         * platform/graphics/svg/cairo: Added.
63         * platform/graphics/svg/cairo/RenderPathCairo.cpp: Added.
64         (WebCore::RenderPath::strokeContains):
65         (WebCore::RenderPath::strokeBBox):
66         * platform/graphics/svg/cairo/SVGPaintServerCairo.cpp: Added.
67         (WebCore::SVGPaintServer::draw):
68         (WebCore::SVGPaintServer::teardown):
69         (WebCore::SVGPaintServer::renderPath):
70         * platform/graphics/svg/cairo/SVGPaintServerGradientCairo.cpp: Added.
71         (WebCore::SVGPaintServerGradient::setup):
72         * platform/graphics/svg/cairo/SVGPaintServerPatternCairo.cpp: Added.
73         (WebCore::SVGPaintServerPattern::setup):
74         * platform/graphics/svg/cairo/SVGPaintServerSolidCairo.cpp: Added.
75         (WebCore::SVGPaintServerSolid::setup):
76         * platform/graphics/svg/cairo/SVGResourceClipperCairo.cpp: Added.
77         (WebCore::SVGResourceClipper::applyClip):
78         * platform/graphics/svg/cairo/SVGResourceMaskerCairo.cpp: Added.
79         (WebCore::SVGResourceMasker::applyMask):
80
81 2007-06-13  Simon Hausmann  <hausmann@kde.org>
82
83         Reviewed by Lars.
84
85         Added a make install target that installs the Qt port and renamed
86         WebKitQt to QtWebKit
87
88         * WebCore.pro:
89
90 2007-06-13  Adam Roben  <aroben@apple.com>
91
92         Fix one more BITMAPINFO/BITMAPINFOHEADER typo.
93
94         Rubberstamped by Oliver.
95
96         * platform/win/DragImageWin.cpp:
97         (WebCore::allocImage):
98
99 2007-06-12  Oliver Hunt  <oliver@apple.com>
100
101         Reviewed by Darin.
102
103         Use correct size for BITMAPINFOHEADER -- whoops.
104
105         * platform/win/CursorWin.cpp:
106         (WebCore::Cursor::Cursor):
107         * platform/win/PasteboardWin.cpp:
108         (WebCore::Pasteboard::writeImage):
109
110 2007-06-12  Sam Weinig  <sam@webkit.org>
111
112         Reviewed by Oliver.
113
114         Patch for http://bugs.webkit.org/show_bug.cgi?id=14109
115         Cleanup JSEvent and JSClipboard in preperation for autogeneration
116
117         * bindings/js/kjs_events.cpp:
118         (KJS::DOMEvent::DOMEvent):
119         (KJS::DOMEvent::getValueProperty):
120         (KJS::DOMEvent::put):
121         (KJS::DOMEvent::putValueProperty):
122         (KJS::DOMEventPrototypeFunction::callAsFunction):
123         (KJS::toJS):
124         (KJS::toEvent):
125         (KJS::):
126         (KJS::JSClipboard::JSClipboard):
127         (KJS::JSClipboard::~JSClipboard):
128         (KJS::JSClipboard::getOwnPropertySlot):
129         (KJS::JSClipboard::getValueProperty):
130         (KJS::JSClipboard::put):
131         (KJS::JSClipboard::putValueProperty):
132         (KJS::JSClipboardPrototypeFunction::callAsFunction):
133         (KJS::toClipboard):
134         * bindings/js/kjs_events.h:
135         (KJS::DOMEvent::):
136         (KJS::DOMEvent::impl):
137         (KJS::JSClipboard::impl):
138         * dom/ClipboardEvent.h:
139         * dom/Event.h:
140         (WebCore::Event::srcElement):
141         (WebCore::Event::returnValue):
142         (WebCore::Event::clipboardData):
143         (WebCore::Event::dataTransfer):
144         (WebCore::Event::clipboard):
145         * dom/MouseEvent.h:
146
147 2007-06-13  Lars Knoll <lars@trolltech.com>
148
149         Reviewed by Niko.
150
151         Small cleanup
152
153         * platform/qt/PlugInInfoStoreQt.cpp:
154         (WebCore::PlugInInfoStore::supportsMIMEType):
155
156 2007-06-13  Lars Knoll <lars@trolltech.com>
157
158         Reviewed by Niko
159
160         Implement the parts required for the JS bridge
161         to know about the plugins.
162
163         * WebCore.pro:
164         * platform/qt/PlugInInfoStoreQt.cpp: Added.
165         (WebCore::PlugInInfoStore::createPluginInfoForPluginAtIndex):
166         (WebCore::PlugInInfoStore::pluginCount):
167         (WebCore::PlugInInfoStore::supportsMIMEType):
168         (WebCore::refreshPlugins):
169         * platform/qt/TemporaryLinkStubs.cpp:
170
171 2007-06-10  Holger Hans Peter Freyther  <zecke@selfish.org>
172
173          Reviewed by Maciej.
174  
175          Disable whole-view editing for the Gdk port in order to improve the browsing experience.
176  
177          * platform/gdk/EditorClientGdk.cpp:
178          (WebCore::EditorClientGdk::isEditable): Return false to disable whole-view editing
179  
180 2007-06-08  Sam Weinig  <sam@webkit.org>
181
182         Reviewed by Oliver.
183
184         Patch for http://bugs.webkit.org/show_bug.cgi?id=14044
185         Autogenerate the JS bindings for HTMLCollection
186
187         - also moves JSHTMLAllCollection into it's own file.
188
189         * DerivedSources.make:
190         * WebCore.pro:
191         * WebCore.xcodeproj/project.pbxproj:
192         * bindings/js/JSHTMLAllCollection.h: Added.
193         (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
194         (WebCore::JSHTMLAllCollection::toBoolean):
195         (WebCore::JSHTMLAllCollection::masqueradeAsUndefined):
196         * bindings/js/JSHTMLCollectionCustom.cpp: Added.
197         (WebCore::getNamedItems):
198         (WebCore::JSHTMLCollection::callAsFunction):
199         (WebCore::JSHTMLCollection::implementsCall):
200         (WebCore::JSHTMLCollection::canGetItemsForName):
201         (WebCore::JSHTMLCollection::nameGetter):
202         (WebCore::JSHTMLCollection::item):
203         (WebCore::JSHTMLCollection::namedItem):
204         (WebCore::toJS):
205         * bindings/js/JSHTMLDocumentCustom.cpp:
206         (WebCore::JSHTMLDocument::nameGetter):
207         (WebCore::JSHTMLDocument::all):
208         * bindings/js/JSXMLHttpRequest.cpp:
209         * bindings/js/kjs_html.cpp:
210         (WebCore::ImageConstructorImp::ImageConstructorImp):
211         (WebCore::ImageConstructorImp::construct):
212         * bindings/js/kjs_html.h:
213         (WebCore::ImageConstructorImp::implementsConstruct):
214         * bindings/js/kjs_window.cpp:
215         (KJS::Window::namedItemGetter):
216         * bindings/objc/DOMUtility.mm:
217         (KJS::createDOMWrapper):
218         * bindings/scripts/CodeGeneratorJS.pm:
219         * html/HTMLCollection.cpp:
220         (WebCore::HTMLCollection::tags):
221         * html/HTMLCollection.h:
222         (WebCore::HTMLCollection::collectionType):
223         * html/HTMLCollection.idl:
224         * html/HTMLOptionsCollection.idl:
225
226 2007-06-08  Justin Garcia  <justin.garcia@apple.com>
227
228         Reviewed by John.
229         
230         <rdar://problem/5232159> REGRESSION: Cannot select text in RSS view
231
232         The selection is updated both on mouse movement and
233         when the autoscroll timer fires.  The autoscroll
234         code wasn't converting mouse coordinates to layer
235         coordinates correctly, and was then using those
236         coordinates to create a bad selection.
237
238         * rendering/RenderLayer.cpp:
239         (WebCore::RenderLayer::autoscroll): Use convertToLayerCoordinates.
240
241 2007-06-08  Anders Carlsson  <andersca@apple.com>
242
243         Reviewed by Geoff.
244
245         Store the root object in a hash set, keyed by the plugin view. This is in preparation for 
246         letting plugins invalidate the root object upon destruction
247
248         * page/Frame.cpp:
249         (WebCore::Frame::createRootObject):
250         (WebCore::Frame::cleanupScriptObjects):
251         * page/FramePrivate.h:
252
253 2007-06-08  Lars Knoll <lars@trolltech.com>
254
255         Reviewed by Zack.
256
257         Add qwebobjectpluginconnector to the build.
258
259         * WebCore.pro:
260
261 2007-06-07  Justin Garcia  <justin.garcia@apple.com>
262
263         Reviewed by Tristan.
264         
265         <rdar://problem/5250997> A crash occurs when selecting Undo Typing for a page that has been closed in tab
266
267         * WebCore.exp: Added clearUndoRedoOperations.
268         * page/Page.cpp:
269         (WebCore::Page::clearUndoRedoOperations): Added.
270         * page/Page.h:
271         
272 2007-06-07  David Hyatt  <hyatt@apple.com>
273
274         Fix crash.  Null check layer.  Bug 13984.
275
276         Reviewed by andersca
277
278         * WebCore.xcodeproj/project.pbxproj:
279         * page/FrameView.cpp:
280         (WebCore::FrameView::windowClipRectForLayer):
281
282 2007-06-07  Oliver Hunt  <oliver@apple.com>
283
284         Reviewed by Justin.
285
286         Remove incorrect assertions.
287         
288         These assertions were made on the assumption that 
289         TSM would always call with a range that was contained 
290         by an editable region.
291         
292         TSM may call -[WebHTMLView characterIndexForPoint:] on a mouse
293         event that is otherwise unrelated to editing, which may
294         be outside the current editing region, triggering these 
295         assertions.
296
297         * page/mac/WebCoreFrameBridge.mm:
298         (-[WebCoreFrameBridge convertToNSRange:]):
299
300 2007-06-07  Justin Garcia  <justin.garcia@apple.com>
301
302         Reviewed by John.
303         
304         <rdar://problem/5237074> REGRESSION: editing/unsupported-content/table-delete-003 is failing (13931)
305         
306         * editing/DeleteSelectionCommand.cpp:
307         (WebCore::DeleteSelectionCommand::initializeStartEnd):
308         We wouldn't expand the selection to include a special element 
309         at the start of the selection unless the end of the selection 
310         was at the end of a special element. Avoid a special 
311         element at the start as long as it's fully selected. Ditto for 
312         the end.
313         * editing/htmlediting.cpp:
314         (WebCore::positionBeforeContainingSpecialElement):
315         (WebCore::positionAfterContainingSpecialElement):
316
317 2007-06-07  Sam Weinig  <sam@webkit.org>
318
319         Reviewed by Anders.
320
321         Patch for  http://bugs.webkit.org/show_bug.cgi?id=14028
322         Finish autogenerating the JS bindings for Node
323
324         * DerivedSources.make:
325         * WebCore.pro:
326         * WebCore.xcodeproj/project.pbxproj:
327         * bindings/js/JSHTMLElementWrapperFactory.cpp:
328         (WebCore::createJSHTMLWrapper):
329         * bindings/js/JSHTMLElementWrapperFactory.h:
330         * bindings/js/JSHTMLOptionElementConstructor.cpp:
331         * bindings/js/JSNamedNodeMapCustom.cpp:
332         * bindings/js/JSNodeCustom.cpp:
333         (WebCore::JSNode::insertBefore):
334         (WebCore::JSNode::replaceChild):
335         (WebCore::JSNode::removeChild):
336         (WebCore::JSNode::appendChild):
337         (WebCore::JSNode::mark):
338         (WebCore::toJS):
339         * bindings/js/JSSVGElementWrapperFactory.cpp:
340         (WebCore::createJSSVGWrapper):
341         * bindings/js/JSSVGElementWrapperFactory.h:
342         * bindings/js/JSXSLTProcessor.cpp:
343         (KJS::XSLTProcessorPrototypeFunction::callAsFunction):
344         * bindings/js/kjs_binding.cpp:
345         (KJS::ScriptInterpreter::getDOMNodeForDocument):
346         (KJS::ScriptInterpreter::putDOMNodeForDocument):
347         (KJS::ScriptInterpreter::markDOMNodesForDocument):
348         (KJS::ScriptInterpreter::updateDOMNodeDocument):
349         * bindings/js/kjs_binding.h:
350         * bindings/js/kjs_dom.cpp:
351         (WebCore::toAttr):
352         * bindings/js/kjs_dom.h:
353         * bindings/js/kjs_domnode.h: Removed.
354         * bindings/objc/DOMUtility.mm:
355         (KJS::createDOMWrapper):
356         * bindings/scripts/CodeGeneratorJS.pm:
357         * dom/Node.h:
358         (WebCore::Node::parentElement):
359         * dom/Node.idl:
360
361 2007-06-07  Sam Weinig  <sam@webkit.org>
362
363         Another Gdk and Qt build fix.
364
365         * WebCore.pro:
366
367 2007-06-07  Sam Weinig  <sam@webkit.org>
368
369         Gdk and Qt build fix.
370
371         * WebCore.pro:
372
373 2007-06-06  Sam Weinig  <sam@webkit.org>
374
375         Reviewed by Hyatt.
376
377         Patch for http://bugs.webkit.org/show_bug.cgi?id=13973
378         Autogenerate most of the rest of kjs_dom.h/cpp
379
380         - Autogenerate JSNodeList and JSNamedNodeMap.
381         - Move JSEventTargetNode, JSNamedNodesCollection, and JSDOMExceptionConstructor 
382           into their own files.
383         - Rename KJS::DOMEventTargeNode to WebCore::JSEventTargetNode to adhere
384           to convention and allow easier code generation.
385         - Add JS constructors for JSNodeList and JSNamedNodeMap.
386         - Moved more toJS methods into the correct (corresponding) header files.
387         - Cleaned up code in order for changes to work.
388
389         * DerivedSources.make:
390         * WebCore.xcodeproj/project.pbxproj:
391         * bindings/js/JSDOMExceptionConstructor.cpp: Added.
392         (WebCore::):
393         (WebCore::JSDOMExceptionConstructor::JSDOMExceptionConstructor):
394         (WebCore::JSDOMExceptionConstructor::getOwnPropertySlot):
395         (WebCore::JSDOMExceptionConstructor::getValueProperty):
396         (WebCore::getDOMExceptionConstructor):
397         * bindings/js/JSDOMExceptionConstructor.h: Added.
398         (WebCore::JSDOMExceptionConstructor::classInfo):
399         * bindings/js/JSDOMWindowCustom.cpp: Added.
400         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
401         * bindings/js/JSDocumentCustom.cpp:
402         (WebCore::JSDocument::mark):
403         (WebCore::toJS):
404         * bindings/js/JSEventTargetNode.cpp: Added.
405         (WebCore::JSEventTargetNode::JSEventTargetNode):
406         (WebCore::JSEventTargetNode::getOwnPropertySlot):
407         (WebCore::JSEventTargetNode::getValueProperty):
408         (WebCore::JSEventTargetNode::put):
409         (WebCore::JSEventTargetNode::putValueProperty):
410         (WebCore::JSEventTargetNode::setListener):
411         (WebCore::JSEventTargetNode::getListener):
412         (WebCore::JSEventTargetNode::pushEventHandlerScope):
413         (WebCore::JSEventTargetNodePrototypeFunction::callAsFunction):
414         (WebCore::toEventTargetNode):
415         * bindings/js/JSEventTargetNode.h: Added.
416         (WebCore::JSEventTargetNode::):
417         * bindings/js/JSHTMLElementCustom.cpp:
418         * bindings/js/JSHTMLFormElementCustom.cpp:
419         (WebCore::JSHTMLFormElement::nameGetter):
420         * bindings/js/JSHTMLOptionElementConstructor.cpp:
421         * bindings/js/JSNamedNodeMapCustom.cpp: Added.
422         (WebCore::JSNamedNodeMap::canGetItemsForName):
423         (WebCore::JSNamedNodeMap::nameGetter):
424         * bindings/js/JSNamedNodesCollection.cpp: Added.
425         (WebCore::):
426         (WebCore::JSNamedNodesCollection::JSNamedNodesCollection):
427         (WebCore::JSNamedNodesCollection::lengthGetter):
428         (WebCore::JSNamedNodesCollection::indexGetter):
429         (WebCore::JSNamedNodesCollection::getOwnPropertySlot):
430         * bindings/js/JSNamedNodesCollection.h: Added.
431         (WebCore::JSNamedNodesCollection::classInfo):
432         * bindings/js/JSNodeCustom.cpp: Added.
433         (WebCore::toJS):
434         * bindings/js/JSNodeListCustom.cpp: Added.
435         (WebCore::JSNodeList::callAsFunction):
436         (WebCore::JSNodeList::implementsCall):
437         (WebCore::JSNodeList::canGetItemsForName):
438         (WebCore::JSNodeList::nameGetter):
439         * bindings/js/kjs_dom.cpp:
440         * bindings/js/kjs_dom.h:
441         * bindings/js/kjs_domnode.h:
442         * bindings/js/kjs_events.cpp:
443         (KJS::JSLazyEventListener::parseCode):
444         * bindings/js/kjs_html.cpp:
445         (KJS::JSHTMLCollection::getNamedItems):
446         * bindings/js/kjs_html.h:
447         * bindings/js/kjs_window.cpp:
448         (WebCore::toJS):
449         * bindings/js/kjs_window.h:
450         * bindings/objc/DOMInternal.mm:
451         (-[WebScriptObject _initializeScriptDOMNodeImp]):
452         * bindings/objc/DOMUtility.mm:
453         (KJS::createDOMWrapper):
454         * bindings/scripts/CodeGeneratorJS.pm:
455         * bridge/mac/WebCoreAXObject.mm:
456         * dom/Attr.idl:
457         * dom/CharacterData.idl:
458         * dom/Document.idl:
459         * dom/DocumentFragment.idl:
460         * dom/DocumentType.idl:
461         * dom/Element.idl:
462         * dom/NamedNodeMap.idl:
463         * dom/Node.idl:
464         * dom/NodeList.idl:
465         * page/DOMWindow.idl:
466
467 2007-06-06  Justin Garcia  <justin.garcia@apple.com>
468
469         Reviewed by Oliver.
470         
471         <rdar://problem/5245519> CrashTracer: [USER] 457 crashes in Mail at WebCore::CSSComputedStyleDeclaration::copyInheritableProperties()
472         
473         If the user pastes something into a region that ends up being
474         invisible, or if the pasted content contains style spans 
475         that are render-less, we'll crash when we try to remove
476         redundant styles from style spans.
477
478         * css/CSSComputedStyleDeclaration.cpp:
479         (WebCore::CSSComputedStyleDeclaration::copyInheritableProperties):
480         Add null checks.
481
482 2007-06-06  Justin Garcia  <justin.garcia@apple.com>
483
484         Reviewed by Harrison.
485
486         <rdar://problem/4889598> Problems with moveDown: and moveUp: in Notes with ToDos
487         
488         The caret would disappear when moving from content above or below
489         a ToDo if that ToDo doesn't have any content in it with the same
490         x position as the caret. That's because closestLeafChildForXPos
491         would return non-editable leaves, and which turn into non-editable
492         VisiblePositions, which are invisible.
493
494         * editing/visible_units.cpp:
495         (WebCore::previousLinePosition): Ask closestLeafForXPos to only
496         return editable leaves.
497         (WebCore::nextLinePosition): Ditto.
498         * rendering/RootInlineBox.cpp:
499         (WebCore::isEditableLeaf): Added.
500         (WebCore::RootInlineBox::closestLeafChildForXPos): If requested,
501         return the closest editable leaf. Removed an early return if the
502         position is before the first leaf, it's not really much of an
503         optimization.
504         * rendering/RootInlineBox.h:
505
506 2007-06-06  Sam Weinig  <sam@webkit.org>
507
508         Reviewed by Anders.
509
510         Fix release build.
511
512         * bindings/objc/DOM.mm:
513         (-[DOMDocument createNodeIterator:whatToShow:filter:expandEntityReferences:]): Add missing null initialization.
514         (-[DOMDocument createTreeWalker:whatToShow:filter:expandEntityReferences:]): Add missing null initialization.
515
516 2007-06-06  Sam Weinig  <sam@webkit.org>
517
518         Reviewed by Hyatt.
519
520         Patch for http://bugs.webkit.org/show_bug.cgi?id=13947
521         Finish autogenerating the JS DOM traversal code
522
523         - Completely generate JSNodeFilter.
524         - Move JSNodeFilterCondition into its own file
525
526         * DerivedSources.make:
527         * WebCore.pro:
528         * WebCore.xcodeproj/project.pbxproj:
529         * bindings/js/JSNodeFilterCondition.cpp: Copied from WebCore/bindings/js/kjs_traversal.cpp.
530         (WebCore::JSNodeFilterCondition::JSNodeFilterCondition):
531         (WebCore::JSNodeFilterCondition::mark):
532         (WebCore::JSNodeFilterCondition::acceptNode):
533         * bindings/js/JSNodeFilterCondition.h: Copied from WebCore/bindings/js/kjs_traversal.h.
534         * bindings/js/JSNodeFilterCustom.cpp: Added.
535         (WebCore::JSNodeFilter::mark):
536         (WebCore::toNodeFilter):
537         * bindings/js/kjs_dom.cpp:
538         * bindings/js/kjs_traversal.cpp: Removed.
539         * bindings/js/kjs_traversal.h: Removed.
540         * bindings/js/kjs_window.cpp:
541         * bindings/objc/DOM.mm:
542         (-[DOMDocument createNodeIterator:whatToShow:filter:expandEntityReferences:]):
543         (-[DOMDocument createTreeWalker:whatToShow:filter:expandEntityReferences:]):
544         * bindings/scripts/CodeGeneratorJS.pm:
545         * dom/Document.cpp:
546         (WebCore::Document::createNodeIterator):
547         (WebCore::Document::createTreeWalker):
548         * dom/Document.h:
549         * dom/NodeFilter.idl:
550
551 2007-06-06  Alp Toker  <alp.toker@collabora.co.uk>
552
553         Reviewed by Eric Seidel.
554
555         http://bugs.webkit.org/show_bug.cgi?id=14017
556         Cairo: Unwanted gradient effect for small stretched images
557
558         * platform/graphics/cairo/ImageCairo.cpp: Use CAIRO_FILTER_NEAREST to
559         work around the issue.
560         (WebCore::BitmapImage::draw):
561         (WebCore::Image::drawPattern):
562
563 2007-06-06  Lars Knoll <lars@trolltech.com>
564
565         Reviewed by Zack
566
567         Add an API to create and load plugins.
568         Don't include moc files by hand anymore, rather let
569         qmake handle them.
570
571         * WebCore.pro:
572         * platform/qt/MimeTypeRegistryQt.cpp:
573         (WebCore::):
574         (WebCore::MimeTypeRegistry::getMIMETypeForExtension):
575         * platform/qt/QWebPopup.cpp:
576         * platform/qt/SharedTimerQt.cpp:
577
578 2007-06-06  Mark Rowe  <mrowe@apple.com>
579
580         Qt build fix.
581
582         * rendering/RenderTextControl.cpp: Fix case of #include filename.
583
584 2007-06-06  Lars Knoll  <lars@trolltech.com>
585
586         Reviewed by Maciej.
587
588         Define WTF_USE_NPOBJECT for Qt. Fix includes
589         in HTMLPluginElement and add proper forwarding headers
590         from JavaScriptCore.
591
592         * ForwardingHeaders/bindings/npruntime.h: Added.
593         * ForwardingHeaders/bindings/runtime.h: Added.
594         * config.h:
595         * html/HTMLPlugInElement.cpp:
596         * html/HTMLPlugInElement.h:
597
598 2007-06-06  David Hyatt  <hyatt@apple.com>
599
600         Bulletproof windowClipRect, since it can be called at crazy times.
601         Part of fix for 13972.
602
603         Reviewed by olliej
604
605         * bindings/objc/DOM.mm:
606         (-[DOMElement _windowClipRect]):
607
608 2007-06-05  MorganL  <morganl.webkit@yahoo.com>
609
610         Reviewed by Dave Hyatt.
611
612         Fixes http://bugs.webkit.org/show_bug.cgi?id=14008
613
614         * rendering/RenderTextControl.cpp:
615         (WebCore::RenderTextControl::calcHeight):
616         (WebCore::RenderTextControl::calcPrefWidths):
617
618 2007-06-05  Kevin McCullough  <kmccullough@apple.com>
619
620         - Respelling Oliver's name right.
621
622 2007-06-05  Kevin McCullough  <kmccullough@apple.com>
623
624         Reviewed by Mark and Oliver.
625
626         - http://bugs.webkit.org/show_bug.cgi?id=13352  REGRESSION: Gmail hangs on send message.
627         - Now we don't hang, but we do so by avoiding certain legitimate characters, the evangelism bug for this is: <rdar://problem/5252577> gmail does not accept legal characters in the form boundary
628
629         * html/HTMLFormElement.cpp:
630         (WebCore::getUniqueBoundaryString):
631
632 2007-06-05  Anders Carlsson  <andersca@apple.com>
633
634         Build fix.
635         
636         * xml/xmlhttprequest.cpp:
637         (WebCore::isValidToken):
638
639 2007-06-05  Anders Carlsson  <andersca@apple.com>
640
641         Reviewed by Geoff.
642
643         <rdar://problem/5245555> REGRESSION: HTTP header injection in XMLHttpRequest.setRequestHeader
644         <rdar://problem/5246208> HTTP injection in XMLHttpRequest.open method parameter
645         <rdar://problem/5246242> HTTP header injection in HXMLHttpRequest.setRequestHeader header parameter
646         
647         Check method names, header names and header values and throw exceptions if any of them are
648         invalid. This is what the new XMLHttpRequest spec states that we should do.
649         
650         * xml/xmlhttprequest.cpp:
651         (WebCore::isValidToken):
652         (WebCore::isValidHeaderValue):
653         (WebCore::XMLHttpRequest::open):
654         (WebCore::XMLHttpRequest::setRequestHeader):
655
656 2007-06-05  Sam Weinig  <sam@webkit.org>
657
658         Reviewed by Geoff.
659
660         Optimize JSCSSStyleDeclaration after performance regression in r21854.
661
662         - Check static table before name getter in JSCSSStyleDeclaration::getOwnPropertySlot()
663         - Get rid of a string allocation by keeping string as KJS::Identifier for canGetItemsForName()
664           functions.
665
666         * WebCore.xcodeproj/project.pbxproj:
667         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
668         (WebCore::JSCSSStyleDeclaration::canGetItemsForName):
669         * bindings/js/JSHTMLAppletElementCustom.cpp:
670         (WebCore::JSHTMLAppletElement::canGetItemsForName):
671         * bindings/js/JSHTMLDocumentCustom.cpp:
672         (WebCore::JSHTMLDocument::canGetItemsForName):
673         * bindings/js/JSHTMLEmbedElementCustom.cpp:
674         (WebCore::JSHTMLEmbedElement::canGetItemsForName):
675         * bindings/js/JSHTMLFormElementCustom.cpp:
676         (WebCore::JSHTMLFormElement::canGetItemsForName):
677         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
678         (WebCore::JSHTMLFrameSetElement::canGetItemsForName):
679         * bindings/js/JSHTMLObjectElementCustom.cpp:
680         (WebCore::JSHTMLObjectElement::canGetItemsForName):
681         * bindings/scripts/CodeGeneratorJS.pm:
682         * css/CSSStyleDeclaration.idl:
683
684 2007-06-04  Sam Weinig  <sam@webkit.org>
685
686         Reviewed, tweaked and landed by Anders.
687
688         <rdar://problem/5247178> REGRESSION: With CSS Edit 2.5, a crash occurs at WebCore::DeprecatedString::DeprecatedString when page fails to be extracted
689         
690         Null check the provisional document loader. If an application stops the load 
691         inside of the didFailProvisionalLoad delegate method, the provisional document loader will be nulled out.
692
693         * loader/FrameLoader.cpp:
694         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
695
696 2007-06-04  Alp Toker  <alp.toker@collabora.co.uk>
697
698         Reviewed by Anders.
699
700         http://bugs.webkit.org/show_bug.cgi?id=13986
701         Cairo graphics fixes and cleanups
702
703         * platform/graphics/ImageBuffer.h:
704         * platform/graphics/cairo/ImageBufferCairo.cpp:
705         (WebCore::ImageBuffer::surface): Provide surface() accessor.
706         * platform/graphics/cairo/AffineTransformCairo.cpp:
707         (WebCore::AffineTransform::rotate): Convert from degrees to radians to
708         fix rotation.
709         * platform/graphics/cairo/GraphicsContextCairo.cpp:
710         (WebCore::GraphicsContext::drawRect): Add save/restore.
711         (WebCore::GraphicsContext::rotate): Rename parameter to "radians" to
712         avoid further confusion.
713         * platform/graphics/cairo/PathCairo.cpp:
714         (WebCore::Path::boundingRect): The cairo_fill_extents() parameters do
715         not describe a point/size but rather the two control points of the
716         rectangular region.
717         (WebCore::Path::contains): Remove needless casts.
718
719 2007-06-04  Sam Weinig  <sam@webkit.org>
720
721         Reviewed by Adam Roben.
722
723         Fix the buildbot.
724
725         * rendering/RenderSVGContainer.cpp:
726         (WebCore::RenderSVGContainer::layout):
727
728 2007-06-04  Justin Garcia  <justin.garcia@apple.com>
729
730         Reviewed by Kimon Tsinteris.
731
732         <rdar://problem/5241148> REGRESSION: ActivEdit can't perform operations on certain selections
733         
734         Return valid equivalents from these methods (no [img, 1] for 
735         example). ActivEdit was using positions returned from these
736         methods to create new DOM Ranges.
737         
738         * editing/SelectionController.cpp:
739         (WebCore::SelectionController::baseNode):
740         (WebCore::SelectionController::baseOffset):
741         (WebCore::SelectionController::extentNode):
742         (WebCore::SelectionController::extentOffset):
743         (WebCore::SelectionController::anchorNode):
744         (WebCore::SelectionController::anchorOffset):
745         (WebCore::SelectionController::focusNode):
746         (WebCore::SelectionController::focusOffset):
747         * editing/SelectionController.h:
748
749 2007-06-04  Rob Buis  <buis@kde.org>
750
751         Fix the svg experimental build.
752
753         * ksvg2/svg/SVGFEFloodElement.cpp:
754
755 2007-06-04  Rob Buis  <buis@kde.org>
756
757         Reviewed by Hyatt.
758
759         http://bugs.webkit.org/show_bug.cgi?id=6170
760         CSS1: Properties for :first-letter aren't recalculated on color change
761
762         Mark styles with first-letter as unique.
763
764         * css/cssstyleselector.cpp:
765         (WebCore::CSSStyleSelector::styleForElement):
766
767 2007-06-01  Anders Carlsson  <acarlsson@apple.com>
768
769         Reviewed by David Harrison.
770
771         <rdar://problem/5236843> 
772         CrashTracer: [USER] 3 crashes in Mail at WebCore::Loader::didReceiveResponse(WebCore::SubresourceLoader*, WebCore::ResourceResponse const&)
773
774         This is by no means the best solution for handling user style sheets. I've filed <rdar://problem/5244734> 
775         for tracking that.
776         
777         * loader/loader.cpp:
778         (WebCore::Loader::didReceiveResponse):
779         If a load starts while the frame is still in the provisional state 
780         (this can be the case when loading the user style sheet), committing the load then causes all
781         requests to be removed from the m_requestsLoading map. This means that req might be null here.
782         In that case we just return early. 
783         
784 2007-06-01  Mitz Pettel  <mitz@webkit.org>
785
786         Reviewed by Adele.
787
788         - fix http://bugs.webkit.org/show_bug.cgi?id=13958
789           REGRESSION: Form select menu in iframe destroys form select menu on page
790
791         * page/mac/EventHandlerMac.mm:
792         (WebCore::EventHandler::sendFakeEventsAfterWidgetTracking): Instead of calling
793         the event handler methods directly, post the fake event on the application event
794         queue. This ensures that the fake event is handled only after handling of the
795         initiating event has ended, and is seen by ancestor frames' event handlers.
796
797 2007-06-01  George Staikos  <staikos@kde.org>
798
799         Reviewed by bdash.
800
801         Redo the build fix again after it was backed out
802
803         * WebCore.pro: add an include guard around CSSGrammar.h
804
805 2007-05-31  Geoffrey Garen  <ggaren@apple.com>
806
807         Reviewed by Beth Dakin.
808
809         Fixed <rdar://problem/5238177> Continuing after hitting breakpoint doesn't 
810         execute the next step.
811         
812         No test because the only code affected is the debugger, and none of the
813         relevant API is exported.
814         
815         Reverted an accidental change in 21324 that caused originRootObject for
816         the window object always to be 0. We could probably just remove the debugger's
817         dependency on originRootObject, but I wanted to be safe.
818
819         * page/mac/FrameMac.mm:
820         (WebCore::Frame::windowScriptObject):
821
822 2007-05-31  David Hyatt  <hyatt@apple.com>
823
824         Fix for 11768, Flash plugin does not respect clips set via CSS.
825
826         Reviewed by olliej
827
828         * bindings/objc/DOM.mm:
829         (-[DOMElement _windowClipRect]):
830         * bindings/objc/DOMPrivate.h:
831         * page/FrameView.cpp:
832         (WebCore::FrameView::windowClipRect):
833         (WebCore::FrameView::windowClipRectForLayer):
834         * platform/ScrollView.h:
835         (WebCore::ScrollView::contentsToWindow):
836         (WebCore::ScrollView::windowToContents):
837         * platform/mac/ScrollViewMac.mm:
838         (WebCore::ScrollView::contentsToWindow):
839         (WebCore::ScrollView::windowToContents):
840
841 2007-05-31  Sam Weinig  <sam@webkit.org>
842
843         Reviewed by Adam.
844
845         Fix build bot.
846
847         * ksvg2/svg/SVGSVGElement.cpp:
848         (WebCore::SVGSVGElement::setCurrentScale):
849
850 2007-05-31  Sam Weinig  <sam@webkit.org>
851
852         Fix Qt and Gdk builds.
853
854         * WebCore.pro: remove bindings/js/JSHTMLAnchorElementCustom.cpp
855
856 2007-05-31  Sam Weinig  <sam@webkit.org>
857
858         Reviewed by Geoff.
859
860         Patch for http://bugs.webkit.org/show_bug.cgi?id=10782
861         Classes should not override JSObject::toString(ExecState *)
862
863         Remove all overrides of JSObject::toString and JSObject::toPrimitive
864         which is a bad practice.  Instead, if an object, like the 
865         HTMLAnchorElement, needs to override to toString, it should add
866         a function to the JS object which will be called when needed.  This
867         also allows developers to override toString and valueOf from within JS.
868
869         Test: fast/js/toString-and-valueOf-override.html
870
871         * WebCore.xcodeproj/project.pbxproj:
872         * bindings/js/JSHTMLAnchorElementCustom.cpp: Removed.
873         * bindings/js/kjs_binding.cpp:
874         * bindings/js/kjs_binding.h:
875         * bindings/js/kjs_dom.cpp:
876         * bindings/js/kjs_dom.h:
877         * bindings/js/kjs_domnode.h:
878         * bindings/js/kjs_window.cpp:
879         (KJS::History::):
880         (KJS::LocationFunc::callAsFunction):
881         (KJS::SelectionFunc::callAsFunction):
882         * bindings/js/kjs_window.h:
883         * bindings/scripts/CodeGeneratorJS.pm:
884         * html/HTMLAnchorElement.cpp:
885         (WebCore::HTMLAnchorElement::toString):
886         * html/HTMLAnchorElement.h:
887         * html/HTMLAnchorElement.idl:
888
889 2007-05-31  Rob Buis  <buis@kde.org>
890
891         Reviewed by Darin.
892
893         http://bugs.webkit.org/show_bug.cgi?id=11272
894         Implement currentScale(), setCurrentScale() and currentTranslate() in SVGSVGElement
895
896         Allow zooming and panning, thereby implementing the above methods.
897
898         * ksvg2/svg/SVGDocument.cpp:
899         (WebCore::SVGDocument::zoomEnabled):
900         (WebCore::SVGDocument::startPan):
901         (WebCore::SVGDocument::updatePan):
902         * ksvg2/svg/SVGDocument.h:
903         * ksvg2/svg/SVGSVGElement.cpp:
904         (WebCore::SVGSVGElement::currentScale):
905         (WebCore::SVGSVGElement::setCurrentScale):
906         (WebCore::SVGSVGElement::currentTranslate):
907         (WebCore::SVGSVGElement::setCurrentTranslate):
908         * ksvg2/svg/SVGSVGElement.h:
909         * page/EventHandler.cpp:
910         (WebCore::EventHandler::EventHandler):
911         (WebCore::EventHandler::handleMousePressEvent):
912         (WebCore::EventHandler::handleMouseMoveEvent):
913         (WebCore::EventHandler::handleMouseReleaseEvent):
914         * page/EventHandler.h:
915         * page/Frame.cpp:
916         (WebCore::Frame::setZoomFactor):
917         * rendering/RenderSVGContainer.cpp:
918         (WebCore::RenderSVGContainer::layout):
919         (WebCore::RenderSVGContainer::paint):
920         (WebCore::RenderSVGContainer::absoluteTransform):
921         * rendering/RenderSVGContainer.h:
922
923 2007-05-31  Eric Seidel  <eric@webkit.org>
924
925         Reviewed by Niko.
926
927         Links are activated based on mouse down events instead of click events
928         http://bugs.webkit.org/show_bug.cgi?id=12570
929         
930         Test: svg/custom/prevent-default.svg
931
932         * html/HTMLAnchorElement.cpp: use MiddleButton and RightButton instead of 1 and 2
933         (WebCore::HTMLAnchorElement::defaultEventHandler):
934         * ksvg2/svg/SVGAElement.cpp:
935         (WebCore::SVGAElement::defaultEventHandler): make it function more like the HTML side
936
937 2007-05-30  Maciej Stachowiak  <mjs@apple.com>
938
939         Reviewed by Hyatt.
940
941         - fix layout test editing/style/table-selection.html
942         
943         This was broken by the change to keep whitespace text nodes in tables. They safely didn't render,
944         but the font delta style change command would wrap them in spans, creating extra anonymous table
945         cells.
946
947         * editing/ApplyStyleCommand.cpp:
948         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): Don't wrap in a span if the text node
949         is not rendered.
950
951 2007-05-31  Alp Toker  <alp.toker@collabora.co.uk>
952
953         Reviewed by Eric Seidel.
954
955         http://bugs.webkit.org/show_bug.cgi?id=13941
956         Rename WebCore/platform/network/gdk to WebCore/platform/network/curl
957
958         * WebCore.pro:
959
960 2007-05-31  Alp Toker  <alp.toker@collabora.co.uk>
961
962         Reviewed by Niko.
963
964         Patch for http://bugs.webkit.org/show_bug.cgi?id=13945
965         GraphicsContextCairo enhancements necessary for SVG support
966
967         * platform/graphics/cairo/GraphicsContextCairo.cpp:
968         (WebCore::GraphicsContext::concatCTM):
969         (WebCore::GraphicsContext::beginPath):
970         (WebCore::GraphicsContext::addPath):
971
972 2007-05-31  Patti Hoa <patti@apple.com>
973
974         Reviewed by Darin.
975         
976         <rdar://problem/5221920> AXLink is returning a CFString instead of a CFURL for AXURL
977
978         * bridge/mac/WebCoreAXObject.mm:
979         (-[WebCoreAXObject accessibilityAttributeValue:]):
980         Convert the url string to an NSURL before returning as the AXURLAttribute
981
982 2007-05-30  Sam Weinig  <sam@webkit.org>
983
984         Reviewed by Oliver.
985
986         Patch for http://bugs.webkit.org/show_bug.cgi?id=13943
987         Autogenerate the JS bindings for the CSSStyleSheet
988
989         * DerivedSources.make:
990         * WebCore.pro:
991         * WebCore.xcodeproj/project.pbxproj:
992         * bindings/js/JSStyleSheetCustom.cpp:
993         (WebCore::toJS):
994         * bindings/js/kjs_css.cpp:
995         * bindings/js/kjs_css.h:
996         * bindings/scripts/CodeGeneratorJS.pm:
997         * css/CSSStyleSheet.cpp:
998         (WebCore::CSSStyleSheet::addRule):
999         (WebCore::CSSStyleSheet::cssRules):
1000         * css/CSSStyleSheet.h:
1001         (WebCore::CSSStyleSheet::rules):
1002         (WebCore::CSSStyleSheet::removeRule):
1003         * css/CSSStyleSheet.idl:
1004         * page/DOMWindow.idl:
1005
1006 2007-05-30  Sam Weinig  <sam@webkit.org>
1007
1008         Reviewed by Oliver.
1009
1010         Patch for http://bugs.webkit.org/show_bug.cgi?id=13937
1011         Autogenerate the JS bindings for the CSSValue
1012
1013         * WebCore.pro:
1014         * WebCore.xcodeproj/project.pbxproj:
1015         * bindings/js/JSCSSValueCustom.cpp: Added.
1016         (WebCore::toJS):
1017         * bindings/js/kjs_css.cpp:
1018         * bindings/js/kjs_css.h:
1019         * bindings/objc/DOMUtility.mm:
1020         (KJS::createDOMWrapper):
1021         * bindings/scripts/CodeGeneratorJS.pm:
1022         * css/CSSValue.h:
1023         (WebCore::CSSValue::setCssText):
1024         * css/CSSValue.idl:
1025
1026 2007-05-30  Sam Weinig  <sam@webkit.org>
1027
1028         Reviewed by Oliver the Hun.
1029
1030         Patch for http://bugs.webkit.org/show_bug.cgi?id=13944
1031         Generate and add missing JS constructors
1032
1033         * css/CSSRuleList.idl:
1034         * css/CSSValueList.idl:
1035         * css/Counter.idl:
1036         * page/DOMWindow.idl:
1037
1038 2007-05-30  Justin Garcia  <justin.garcia@apple.com>
1039  
1040         Reviewed by Darin.
1041  
1042         http://bugs.webkit.org/show_bug.cgi?id=13915
1043         REGRESSION(r21687): editing/inserting/paragraph-separator-* failing pixel test (misspelling markers)
1044
1045         After r21687, SimplifiedBackwardsTextIterator was no longer 
1046         emitting a '\n' as it left the first block of a range ending 
1047         at [block, 0]. So, foo<div>^<br></div> looked like foo^ to
1048         spell checking (foo wasn't marked as misspelled).
1049
1050         After r21687, SBTI stopped emitting '\n's in the above case 
1051         because 1) we stopped incorrectly emitting '\n's for nodes as 
1052         we entered them and 2) we were and still are incorrectly calling 
1053         code that should only be called when entering nodes as we leave 
1054         them and 3) we don't call exitNode(), which is responsible 
1055         for emitting the '\n' in the above testcase, when we should.
1056
1057         Before and after r21687, we'd call exitNode() for a node as 
1058         we traversed in reverse pre-order from its first descendant 
1059         out to its sibling or one of its ancestors' siblings.  We 
1060         weren't calling it a) after we'd enter a node that could 
1061         have children but had none and b) when leaving a container 
1062         that contained the end of the range used to create the iterator.
1063
1064         * editing/TextIterator.cpp:
1065         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
1066         (WebCore::SimplifiedBackwardsTextIterator::advance): Call exitNode() as we
1067         leave a childless container node and a node where the range ended.
1068         * editing/TextIterator.h: Track the end of the range used to create
1069         the SimplifiedBackwardsTextIterator.
1070
1071 2007-05-30  Alp Toker  <alp.toker@collabora.co.uk>
1072
1073         Reviewed by Brady.
1074
1075         Enable logging in the Gdk port.
1076         http://bugs.webkit.org/show_bug.cgi?id=13936
1077
1078         * WebCore.pro:
1079         * platform/NotImplemented.h: Changed to use WTFLogVerbose.
1080         * platform/gdk/LoggingGdk.cpp: Added.
1081         (WebCore::InitializeLoggingChannelsIfNecessary):
1082
1083 2007-05-30  Beth Dakin  <bdakin@apple.com>
1084
1085         Reviewed by Hyatt.
1086
1087         Fix for <rdar://problem/5198882> CrashTracer: [USER] 7 crashes in 
1088         Safari at com.apple.WebCore: WebCore::RenderBlock::layoutBlock + 
1089         2360
1090
1091         The problem is that we are re-entering layout when we should not. 
1092         http://trac.webkit.org/projects/webkit/changeset/21778 actually 
1093         fixed this crash, but we have been inspired to add the same guard 
1094         in two other possibly-dangerous places.
1095
1096         * page/FrameView.cpp:
1097         (WebCore::FrameView::layout): Add the guard in two more places.
1098
1099 2007-05-30  Justin Garcia  <justin.garcia@apple.com>
1100
1101         Reviewed by Oliver.
1102
1103         <rdar://problem/5096134> VO gets stuck on Howto.apple.com
1104         http://bugs.webkit.org/show_bug.cgi?id=8622
1105         VisiblePositions aren't canonicalized in some cases
1106         
1107         No new test cases added: can't write automated tests 
1108         for VO.
1109
1110         * editing/IndentOutdentCommand.cpp:
1111         (WebCore::IndentOutdentCommand::outdentParagraph):
1112         VisiblePositions must be recomputed after nodes that
1113         may have effected their canonicalization are removed.
1114         * editing/VisiblePosition.cpp:
1115         (WebCore::canonicalizeCandidate): Added.
1116         (WebCore::VisiblePosition::canonicalPosition): Canonicalize
1117         the candidates returned by next/previousCandidate before
1118         returning them.
1119         * editing/VisiblePosition.h:
1120         (WebCore::operator==): Remove the workaround for 8622.
1121         * editing/visible_units.cpp:
1122         (WebCore::startOfParagraph): Ditto.
1123
1124 2007-05-30  Sam Weinig  <sam@webkit.org>
1125
1126         Reviewed by Dr. Harrison.
1127
1128         Patch for http://bugs.webkit.org/show_bug.cgi?id=13868
1129         REGRESSION: crash on accessing a new iframe's contentWindow property
1130
1131         Adds a null check in for the contentWindow property for HTMLIFrameElement
1132         and HTMLFrameElement.
1133
1134         * bindings/scripts/CodeGeneratorJS.pm:
1135         * html/HTMLFrameElement.idl:
1136         * html/HTMLIFrameElement.idl:
1137
1138 2007-05-30  Mitz Pettel  <mitz@webkit.org>
1139
1140         Reviewed by Darin.
1141
1142         - fix http://bugs.webkit.org/show_bug.cgi?id=13775
1143           REGRESSION: Popup button text should use "natural" directionality to match the items in the popup menu
1144
1145         Test: fast/forms/select-writing-direction-natural.html
1146
1147         * platform/PopupMenu.h: Added the static method itemWritingDirectionIsNatural
1148         which says whether items in the popup ignore the CSS text-align and direction
1149         properties and instead are left-aligned and use natural writing direction.
1150         * platform/gdk/PopupMenuGdk.cpp:
1151         (WebCore::PopupMenu::itemWritingDirectionIsNatural):
1152         * platform/mac/PopupMenuMac.mm:
1153         (WebCore::PopupMenu::itemWritingDirectionIsNatural):
1154         * platform/qt/PopupMenuQt.cpp:
1155         (WebCore::PopupMenu::itemWritingDirectionIsNatural):
1156         * platform/win/TemporaryLinkStubs.cpp:
1157         (WebCore::PopupMenu::itemWritingDirectionIsNatural):
1158         * platform/wx/TemporaryLinkStubs.cpp:
1159         (PopupMenu::itemWritingDirectionIsNatural):
1160         * rendering/RenderMenuList.cpp:
1161         (WebCore::textDirectionForParagraph): Added this helper function that uses
1162         the Unicode Bidi Algorithm rules P2 and P3 to determine the writing direction
1163         of text.
1164         (WebCore::RenderMenuList::adjustInnerStyle): Made the alignment and direction
1165         adjustment conditional on the popup implementation.
1166         (WebCore::RenderMenuList::setText): Added call to adjustInnerStyle() since
1167         the style depends on the text when natural writing direction is used.
1168
1169 2007-05-30  Timothy Hatcher  <timothy@apple.com>
1170
1171         Reviewed by Darin.
1172
1173         <rdar://problem/5200795> REGRESSION (r21057): lineBoxRects doesn't match actual text when wrapping occurs
1174
1175         Use box->end() instead of box->len().
1176
1177         * rendering/RenderText.cpp:
1178         (WebCore::RenderText::addLineBoxRects):
1179
1180 2007-05-30  Sam Weinig  <sam@webkit.org>
1181
1182         Reviewed by Darin.
1183
1184         Patch for http://bugs.webkit.org/show_bug.cgi?id=13919
1185         Autogenerate the JS bindings for the CSSRule and its subclasses
1186
1187         - subclasses generated are CSSCharsetRule, CSSFontFaceRule, CSSImportRule
1188           CSSMediaRule, CSSPageRule and CSSStyleRule.
1189
1190         * DerivedSources.make:
1191         * WebCore.pro:
1192         * WebCore.xcodeproj/project.pbxproj:
1193         * bindings/js/JSCSSRuleCustom.cpp: Added.
1194         (WebCore::toJS):
1195         * bindings/js/kjs_css.cpp:
1196         * bindings/js/kjs_css.h:
1197         * bindings/objc/DOMUtility.mm:
1198         (KJS::createDOMWrapper):
1199         * bindings/scripts/CodeGeneratorJS.pm:
1200         * css/CSSCharsetRule.h:
1201         (WebCore::CSSCharsetRule::setEncoding):
1202         * css/CSSCharsetRule.idl:
1203         * css/CSSFontFaceRule.idl:
1204         * css/CSSImportRule.idl:
1205         * css/CSSMediaRule.idl:
1206         * css/CSSPageRule.cpp:
1207         (WebCore::CSSPageRule::setSelectorText):
1208         * css/CSSPageRule.h:
1209         * css/CSSPageRule.idl:
1210         * css/CSSRule.cpp:
1211         (WebCore::CSSRule::setCssText):
1212         * css/CSSRule.h:
1213         * css/CSSRule.idl:
1214         * css/CSSStyleRule.cpp:
1215         (WebCore::CSSStyleRule::setSelectorText):
1216         * css/CSSStyleRule.h:
1217         * css/CSSStyleRule.idl:
1218         * page/DOMWindow.idl: add new constructors.
1219
1220 2007-05-30  Mark Rowe  <mrowe@apple.com>
1221
1222         Build fixes after r21889.  Add missing #includes.
1223
1224         * ForwardingHeaders/kjs/function.h: Added.
1225         * bindings/js/kjs_binding.h:
1226         * bindings/js/kjs_dom.h:
1227         * bindings/js/kjs_window.h:
1228
1229 2007-05-30  Mark Rowe  <mrowe@apple.com>
1230
1231         Gdk build fix.  Update WidgetGdk to use NotImplemented.h.
1232
1233         * platform/gdk/WidgetGdk.cpp:
1234         (WebCore::Widget::setEnabled):
1235         (WebCore::Widget::isEnabled):
1236         (WebCore::Widget::removeFromParent):
1237         (WebCore::Widget::paint):
1238         (WebCore::Widget::setIsSelected):
1239
1240 2007-05-29  Holger Freyther  <zecke@selfish.org>
1241
1242         Reviewed by Anders.
1243
1244         Make ScrollView use a GtkLayout. This class matches QScrollView the most and promises
1245         to ease the implementation of ScrollView::addChild. GtkLayout should be resource friendly
1246         even with huge width and heights of frames.
1247         Make Widget aware of GtkLayout to use the right GdkWindow as drawable. For GtkLayout one must
1248         draw on the bin_window.
1249         Remove the layer violation from FrameGdk.cpp and ScrollView. FrameGdk is no longer responsible to
1250         implement scrolling on keyboard events. ScrollView is no longer required to know that it could be
1251         a FrameView and handles scrolling of Frames magically.
1252
1253         * platform/ScrollView.h:
1254         * platform/gdk/FrameGdk.cpp:
1255         (WebCore::FrameGdk::keyPress):
1256         (WebCore::FrameGdk::handleGdkEvent):
1257         * platform/gdk/ScrollViewGdk.cpp:
1258         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
1259         (WebCore::ScrollView::updateContents):
1260         (WebCore::ScrollView::visibleWidth):
1261         (WebCore::ScrollView::visibleHeight):
1262         (WebCore::ScrollView::visibleContentRect):
1263         (WebCore::ScrollView::resizeContents):
1264         (WebCore::ScrollView::contentsX):
1265         (WebCore::ScrollView::contentsY):
1266         (WebCore::ScrollView::scrollOffset):
1267         (WebCore::ScrollView::scrollBy):
1268         (WebCore::ScrollView::setFrameGeometry):
1269         (WebCore::ScrollView::updateGeometry):
1270         (WebCore::ScrollView::setGtkWidget):
1271         (WebCore::ScrollView::updateScrollbars):
1272         (WebCore::ScrollView::windowToContents):
1273         (WebCore::ScrollView::contentsToWindow):
1274         (WebCore::ScrollView::scrollbarUnderMouse):
1275         * platform/gdk/TemporaryLinkStubs.cpp: Move Widget methods to WidgetGdk.cpp
1276         * platform/gdk/WidgetGdk.cpp:
1277         (WebCore::Widget::setGtkWidget):
1278         (WebCore::Widget::setFrameGeometry):
1279         (WebCore::Widget::setEnabled):
1280         (WebCore::Widget::isEnabled):
1281         (WebCore::Widget::removeFromParent):
1282         (WebCore::Widget::paint):
1283         (WebCore::Widget::setIsSelected):
1284         (WebCore::Widget::invalidate):
1285         (WebCore::Widget::invalidateRect):
1286
1287 2007-05-29  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1288
1289         Reviewed by Maciej.
1290
1291         Curl (linux/gdk) networking improvements: 
1292         a) POST support
1293         b) don't use CURL in a re-entrant way.
1294         c) turn on curl's internal debugging support in a debug build if the DEBUG_CURL environment variable is set.
1295
1296         * platform/network/ResourceHandleInternal.h:
1297         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1298         * platform/network/gdk/ResourceHandleCurl.cpp:
1299         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
1300         * platform/network/gdk/ResourceHandleManager.cpp:
1301         (WebCore::ResourceHandleManager::ResourceHandleManager):
1302         (WebCore::writeCallback):
1303         (WebCore::ResourceHandleManager::downloadTimerCallback):
1304         (WebCore::ResourceHandleManager::setupPOST):
1305         (WebCore::ResourceHandleManager::add):
1306         (WebCore::ResourceHandleManager::removeScheduledJob):
1307         (WebCore::ResourceHandleManager::startScheduledJobs):
1308         (WebCore::ResourceHandleManager::startJob):
1309         (WebCore::ResourceHandleManager::cancel):
1310         * platform/network/gdk/ResourceHandleManager.h:
1311         (WebCore::ResourceHandleList::ResourceHandleList):
1312         (WebCore::ResourceHandleList::next):
1313         (WebCore::ResourceHandleList::job):
1314         (WebCore::ResourceHandleList::setRemoved):
1315         (WebCore::ResourceHandleList::removed):
1316
1317 2007-05-29  Sam Weinig  <sam@webkit.org>
1318
1319         Fix the Qt and Gdk builds.
1320
1321         * WebCore.pro:
1322
1323 2007-05-29  Adele Peterson  <adele@apple.com>
1324
1325         Reviewed by Adam.
1326
1327         Fix for <rdar://problem/5109711> REGRESSION: Focus ring artifacts appear around a widget's search field at times (Address Book, Dictionary)
1328
1329         * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintSearchField):
1330           We only need this hack for drawing the search field focus ring on Tiger.  On Leopard, drawWithFrame correctly draws the cell's focus ring.
1331
1332 2007-05-29  Alp Toker  <alp.toker@collabora.co.uk>
1333
1334         Reviewed by Mitz.
1335
1336         Patch for http://bugs.webkit.org/show_bug.cgi?id=13899
1337
1338         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1339         (WebCore::GraphicsContext::strokeArc): Use cairo_arc_negative() to fix
1340         CSS rounded borders.
1341         (WebCore::GraphicsContext::beginTransparencyLayer):
1342         (WebCore::GraphicsContext::endTransparencyLayer): save/restore is
1343         redundant. push/pop group does this implicitly.
1344
1345 2007-05-29  Sam Weinig  <sam@webkit.org>
1346
1347         Reviewed by Oliver.
1348
1349         Patch for http://bugs.webkit.org/show_bug.cgi?id=13912
1350         Autogenerate the JS bindings for the MediaList
1351
1352         * DerivedSources.make:
1353         * WebCore.xcodeproj/project.pbxproj:
1354         * bindings/js/kjs_css.cpp:
1355         * bindings/js/kjs_css.h:
1356         * bindings/objc/DOMUtility.mm:
1357         (KJS::createDOMWrapper):
1358         * bindings/scripts/CodeGeneratorJS.pm:
1359         * css/MediaList.idl:
1360         * page/DOMWindow.idl: Add constructor.
1361
1362 2007-05-29  Matt Perry  <mpComplete@gmail.com>
1363
1364         Reviewed by Maciej.
1365
1366         Fixed some rendering issues for <select>s on Windows.
1367
1368         * rendering/RenderThemeWin.cpp:
1369         (WebCore::RenderThemeWin::adjustMenuListStyle):
1370         (WebCore::RenderThemeWin::paintMenuList):
1371         * rendering/RenderThemeWin.h:
1372
1373 2007-05-29  David Hyatt  <hyatt@apple.com>
1374
1375         Fold the invalidateVerticalPositions crawl into the bidi iteration.
1376         This makes it more correct (since we won't drill into elements that
1377         did not need to be reset) and cuts out an extra walk of all our children.
1378         We're still O(n^2) as new content streams in, but this at least cuts
1379         out one separate O(n^2) crawl.
1380
1381         Reviewed by olliej
1382
1383         * rendering/RenderObject.cpp:
1384         * rendering/RenderObject.h:
1385         (WebCore::RenderObject::invalidateVerticalPosition):
1386         * rendering/bidi.cpp:
1387         (WebCore::RenderBlock::layoutInlineChildren):
1388
1389 2007-05-29  Sam Weinig  <sam@webkit.org>
1390
1391         Reviewed by Oliver.
1392
1393         Patch for http://bugs.webkit.org/show_bug.cgi?id=13908
1394         Autogenerate the JS bindings for the StyleSheet
1395
1396         * DerivedSources.make:
1397         * WebCore.xcodeproj/project.pbxproj:
1398         * bindings/js/JSStyleSheetCustom.cpp: Added.
1399         (WebCore::toJS):
1400         (WebCore::JSStyleSheet::toBoolean):
1401         * bindings/js/kjs_css.cpp:
1402         (KJS::):
1403         (KJS::DOMCSSStyleSheet::DOMCSSStyleSheet):
1404         (KJS::DOMCSSStyleSheet::getOwnPropertySlot):
1405         * bindings/js/kjs_css.h:
1406         * bindings/objc/DOMUtility.mm:
1407         (KJS::createDOMWrapper):
1408         * bindings/scripts/CodeGeneratorJS.pm:
1409         * css/StyleSheet.idl:
1410         * page/DOMWindow.idl: Add new constructor.
1411
1412 2007-05-29  David Hyatt  <hyatt@apple.com>
1413
1414         Make sure <embed> does not allow an end tag.
1415
1416         Reviewed by olliej
1417
1418         * html/HTMLEmbedElement.h:
1419         (WebCore::HTMLEmbedElement::endTagRequirement):
1420
1421 2007-05-29  Adele Peterson  <adele@apple.com>
1422
1423         Reviewed by Brady.
1424
1425         Fix for <rdar://problem/5213039> REGRESSION: Wells Fargo registration page returns blank
1426
1427         Roll out updated fix for 11866 that tried to make reset work for hidden inputs.  Since
1428         all browsers update the value attribute when setting the value, it doesn't really make sense to reset.
1429         Its true that IE does support resetting these controls, but in this case, it doesn't really make sense to have
1430         another place to store an alternate version of the value.
1431
1432         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::reset):
1433         * html/HTMLInputElement.h:
1434
1435 2007-05-29  Darin Adler  <darin@apple.com>
1436
1437         Reviewed by Anders.
1438
1439         - removed the general case optimization for innerHTML because some sites
1440           rely on setting innerHTML to trigger loading plug-ins for example; we
1441           could consider bringing it back some day, perhaps with a list of element
1442           types to exclude
1443
1444         * dom/CharacterData.cpp: (WebCore::CharacterData::setData):
1445         Do nothing if the old data is identical to the new data.
1446
1447         * html/HTMLElement.cpp:
1448         (WebCore::replaceChildrenWithFragment): Remove childrenAreEqual optimization.
1449         (WebCore::replaceChildrenWithText): Remove optimization for cases where the
1450         text data is identical to the new data, since CharacterData handles that now.
1451         (WebCore::HTMLElement::setOuterHTML): Remove childrenAreEqual optimization.
1452
1453 2007-05-29  Mitz Pettel  <mitz@webkit.org>
1454
1455         Reviewed by Maciej.
1456
1457         - fix http://bugs.webkit.org/show_bug.cgi?id=13904
1458           REGRESSION: Search fields with a results popup do not always draw the popup arrow
1459
1460         Covered by fast/forms/box-shadow-override.html
1461
1462         The search button draws a popup arrow depending on whether the
1463         search menu template is set, rather than on the maximum number of recent
1464         search strings.
1465
1466         * rendering/RenderThemeMac.h:
1467         * rendering/RenderThemeMac.mm:
1468         (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration): Removed the
1469         call to -setMaxmiumRecents:.
1470         (WebCore::RenderThemeMac::paintSearchFieldResultsButton): Replaced calling
1471         -setMaximumRecents: with setting the search menu template.
1472         (WebCore::RenderThemeMac::search): Removed initialization of the menu.
1473         (WebCore::RenderThemeMac::searchMenuTemplate): Added. Returns an empty
1474         NSMenu to be used as the search menu template.
1475
1476 2007-05-29  David Hyatt  <hyatt@apple.com>
1477
1478         Fix for bug 13907, <noscript> should be allowed inside <head> when
1479         scripting is enabled.
1480
1481         Reviewed by aroben
1482
1483         * html/HTMLHeadElement.cpp:
1484         (WebCore::HTMLHeadElement::checkDTD):
1485         * html/HTMLParser.cpp:
1486         (WebCore::HTMLParser::handleError):
1487         * html/HTMLParserErrorCodes.cpp:
1488         (WebCore::htmlParserErrorMessageTemplate):
1489         * html/HTMLParserErrorCodes.h:
1490
1491 2007-05-29  Mitz Pettel  <mitz@webkit.org>
1492
1493         Reviewed by Maciej.
1494
1495         - fix crash in http://bugs.webkit.org/show_bug.cgi?id=13792
1496           REGRESSION: WebKit doesn't show this javascript screenshot page (and crashes after click on its "hidden link")
1497
1498         Test: fast/frames/removal-before-attach-crash.html
1499
1500         Delayed the queueing of the post-attach callback until attach().
1501
1502         * html/HTMLFrameElementBase.cpp:
1503         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
1504         (WebCore::HTMLFrameElementBase::parseMappedAttribute): Replaced call to the
1505         HTMLElement implementation with a call to the HTMLFrameOwnerElement
1506         implementation, as the latter is the parent class.
1507         (WebCore::HTMLFrameElementBase::insertedIntoDocument): Instead of queueing
1508         the post-attach callback here, just set a flag telling us to do so
1509         at the beginning of attach().
1510         (WebCore::HTMLFrameElementBase::removedFromDocument): Reset the above flag.
1511         (WebCore::HTMLFrameElementBase::attach): If this is the first attach() after
1512         being inserted into the document, queue a post-attach callback to load the
1513         frame.
1514         (WebCore::HTMLFrameElementBase::willRemove): Changed to call up to the correct
1515         parent class.
1516         (WebCore::HTMLFrameElementBase::setFocus): Ditto.
1517         * html/HTMLFrameElementBase.h:
1518         * html/HTMLPlugInElement.cpp:
1519         (WebCore::HTMLPlugInElement::mapToEntry): Replaced call to the HTMLElement
1520         implementation with a call to the HTMLFrameOwnerElement implementation,
1521         as the latter is the parent class.
1522         (WebCore::HTMLPlugInElement::parseMappedAttribute): Ditto.
1523         (WebCore::HTMLPlugInElement::checkDTD): Ditto.
1524         (WebCore::HTMLPlugInElement::detach): Ditto.
1525
1526 2007-05-29  Darin Adler  <darin@apple.com>
1527
1528         Reviewed by Maciej.
1529
1530         - fix http://bugs.webkit.org/show_bug.cgi?id=13602
1531           Amazon product pages keep repainting over and over again
1532
1533         - fix first-letter when the text of the affected text node is changed
1534
1535         Optimize setInnerHTML, setOuterHTML, and setInnerText so they don't change the DOM at all
1536         if they don't need to.
1537
1538         Test: fast/dom/HTMLElement/set-inner-outer-optimization.html
1539         Test: fast/css/first-letter-detach.html
1540
1541         * html/HTMLElement.cpp:
1542         (WebCore::equal): Added. Helper function that compares two Text nodes or two NamedAttrMap
1543         attribute maps.
1544         (WebCore::shallowEqual): Added. Helper function that compares two Element nodes or two
1545         arbitrary nodes.
1546         (WebCore::childrenAreEqual): Added. Helper functions that compare children of nodes.
1547         (WebCore::hasOneChild): Added. Helper function.
1548         (WebCore::hasOneTextChild): Added. Helper function.
1549         (WebCore::replaceChildrenWithFragment): Added. Helper function used by setInnerHTML and
1550         setInnerText. Optimizes the cases where all the nodes are the same, where both the current
1551         and the new content are single text nodes, and where the current content is a single node
1552         that can be replaced with replaceChild.
1553         (WebCore::replaceChildrenWithText): Added. Helper function used by setInnerText. Optimizes
1554         the case where the current content is a single text node or a single node that can be
1555         replaced with replaceChild.
1556         (WebCore::HTMLElement::setInnerHTML): Changed to call replaceChildrenWithFragment.
1557         (WebCore::HTMLElement::setOuterHTML): Added special case to optimize when the new content
1558         exactly matches the current node.
1559         (WebCore::HTMLElement::setInnerText): Changed to call replaceChildrenWithText in a few
1560         cases instead of doing removeChildren/appendChild. Changed code that was using
1561         DeprecatedString to instead use String. Changed general case to use a document fragment
1562         and replaceChildrenWithFragment.
1563
1564         * dom/CharacterData.cpp: (WebCore::CharacterData::dispatchModifiedEvent):
1565         Fixed bug where we would not dispatch the DOMSubtreeModified event unless someone
1566         was registered for the DOMCharacterDataModified event. Caused trouble in the test.
1567
1568         * rendering/RenderBlock.cpp: (WebCore::RenderBlock::updateFirstLetter): Set first-letter
1569         after the setStyle call so calls to setTextInternal inside setStyle don't clear it.
1570
1571         * rendering/RenderText.h: Made setTextInternal virtual so that RenderTextFragment can do
1572         appropriate work when the text changes.
1573
1574         * rendering/RenderTextFragment.h: Added an override of setTextInternal. Removed the
1575         firstLetter parameter to the constructor and made it a separate setter. Also changed
1576         m_generatedContentStr to m_contentString to match the getter function.
1577         * rendering/RenderTextFragment.cpp:
1578         (WebCore::RenderTextFragment::RenderTextFragment): Removed firstLetter parameter.
1579         (WebCore::RenderTextFragment::setTextInternal): When the text changes, destroy the
1580         first-letter node and reset the fragment values so that RenderBlock::updateFirstLetter,
1581         which will run during layout, will create a new first-letter child. Otherwise we end up
1582         with the first letter of the old text.
1583
1584 2007-05-29  Sam Weinig  <sam@webkit.org>
1585
1586         Fix Qt build.
1587
1588         * platform/NotImplemented.h:
1589
1590 2007-05-29  Sam Weinig  <sam@webkit.org>
1591
1592         Reviewed by Adam Roben.
1593
1594         Consolidate platform dependent notImplemented() macros
1595         into one platform independent macro that uses WTFLog.
1596
1597         * platform/NotImplemented.h:
1598
1599 2007-05-29  Darin Adler  <darin@apple.com>
1600
1601         Reviewed by Sam.
1602
1603         - a clean-up pass on form-related aspects of the recent JSHTMLElement patch
1604
1605         * bindings/js/JSHTMLElementCustom.cpp: (WebCore::JSHTMLElement::pushEventHandlerScope):
1606         Replace the call to formForEventHandlerScope() with a call to the new form() function.
1607         And removed the now-uneeded code to search for a form ancestor.
1608
1609         * html/HTMLElement.h: Added a general-purpose form() function. The intent is to return
1610         the form ancestor if any, but return the associated form for a form control, which isn't
1611         always an ancestor of the control. To keep form() efficient for form controls, it's an
1612         inline that calls a virtual, allowing a derived class to override it with an inline.
1613         This replaces formForEventHandlerScope(). Also added findFormAncestor() to use here and
1614         to replace the multiple loops found elsewhere to search for the nearest form ancestor.
1615         * html/HTMLElement.cpp:
1616         (WebCore::HTMLElement::findFormAncestor): Added.
1617         (WebCore::HTMLElement::virtualForm): Added. Calls findFormAncestor().
1618
1619         * html/HTMLGenericFormElement.h: Suggested name change to HTMLFormControlElement.
1620         Removed the confusing getForm() function, which is superceded by findFormAncestor.
1621         Removed the unused onSelect() function. Removed the override of formForEventHandlerScope(),
1622         replacing it with an override of virtualForm().
1623         * html/HTMLGenericFormElement.cpp:
1624         (WebCore::HTMLGenericFormElement::HTMLGenericFormElement): Use findFormAncestor
1625         instead of getForm.
1626         (WebCore::HTMLGenericFormElement::insertedIntoTree): Ditto.
1627         (WebCore::HTMLGenericFormElement::virtualForm): Added.
1628
1629         * html/HTMLLabelElement.h: Removed now-unneeded form() and formForEventHandlerScope()
1630         functions, since base class behavior is now good enough. Renamed formElement() to
1631         correspondingControl(), since that's the terminology used elsewhere in the code,
1632         and the old name was unnecessarily confusing.
1633         * html/HTMLLabelElement.cpp:
1634         (WebCore::HTMLLabelElement::correspondingControl): Renamed. Removed unnecessary
1635         special case for empty ID, since getElementById already returns 0 for that case.
1636         (WebCore::HTMLLabelElement::setActive): Updated for name change.
1637         (WebCore::HTMLLabelElement::setHovered): Ditto.
1638         (WebCore::HTMLLabelElement::defaultEventHandler): Ditto.
1639         (WebCore::HTMLLabelElement::focus): Ditto.
1640         (WebCore::HTMLLabelElement::accessKeyAction): Ditto.
1641
1642         * html/HTMLObjectElement.h: Removed now-unneeded form() and formForEventHandlerScope()
1643         functions, since base class behavior is now good enough. Also removed forward
1644         declaration of KJS::Bindings::Instance -- since the type is the return value of a
1645         function from the base class, it's guaranteed to be declared in the base class header.
1646         * html/HTMLObjectElement.cpp: Ditto.
1647
1648         * bridge/mac/WebCoreAXObject.mm: (labelForElement): Updated for name change.
1649
1650 2007-05-29  Zack Rusin  <zrusin@trolltech.com>
1651
1652         Reviewed by George and Niko
1653
1654         Making the convenience method notImplemented convenient
1655         for the Qt port.
1656
1657         * platform/NotImplemented.h:
1658
1659 2007-05-28  Sam Weinig  <sam@webkit.org>
1660
1661         Reviewed by Geoff.
1662
1663         - Patch for http://bugs.webkit.org/show_bug.cgi?id=13902
1664           Autogenerate the JS bindings for the CSSStyleDeclaration
1665
1666         * WebCore.pro:
1667         * WebCore.xcodeproj/project.pbxproj:
1668         * bindings/js/JSCSSStyleDeclarationCustom.cpp: Added.
1669         (WebCore::cssPropertyName):
1670         (WebCore::isCSSPropertyName):
1671         (WebCore::JSCSSStyleDeclaration::canGetItemsForName):
1672         (WebCore::JSCSSStyleDeclaration::nameGetter):
1673         (WebCore::JSCSSStyleDeclaration::customPut):
1674         * bindings/js/kjs_binding.h:
1675         * bindings/js/kjs_css.cpp:
1676         * bindings/js/kjs_css.h:
1677         * bindings/objc/DOMUtility.mm:
1678         (KJS::createDOMWrapper):
1679         * bindings/scripts/CodeGeneratorJS.pm:
1680         * css/CSSStyleDeclaration.idl:
1681
1682 2007-05-28  Mitz Pettel  <mitz@webkit.org>
1683
1684         Reviewed by Darin.
1685
1686         - fix http://bugs.webkit.org/show_bug.cgi?id=13896
1687           REGRESSION (NativePopup): Reproductible crasher on Google Coop control panel
1688
1689         Test: fast/forms/select-display-none-style-resolve.html
1690
1691         * html/HTMLOptGroupElement.cpp:
1692         (WebCore::HTMLOptGroupElement::attach): Do not compute style if the parent
1693         does not have style.
1694         * html/HTMLOptionElement.cpp:
1695         (WebCore::HTMLOptionElement::attach): Ditto.
1696
1697 2007-05-28  Sam Weinig  <sam@webkit.org>
1698
1699         Fix Gdk and Qt builds.
1700
1701         * WebCore.pro:
1702
1703 2007-05-28  Sam Weinig  <sam@webkit.org>
1704
1705         Reviewed by Darin.
1706
1707         Patch for http://bugs.webkit.org/show_bug.cgi?id=13894
1708         Remove the legacy class KJS::JSHTMLElement
1709
1710         - Now that all of the subclasses of JSHTMLElement are
1711           autogenerated and no longer rely on the legacy parent,
1712           we can remove it and update all the HTML idl files to
1713           reflect so.
1714
1715         - Also adds JSHTMLBlockquoteElement's JS constructor which
1716           was mistakingly missing.
1717
1718         * WebCore.xcodeproj/project.pbxproj:
1719         * bindings/js/JSHTMLAnchorElementCustom.cpp:
1720         (WebCore::JSHTMLAnchorElement::toString):
1721         * bindings/js/JSHTMLElementCustom.cpp: Added.
1722         (WebCore::JSHTMLElement::pushEventHandlerScope):
1723         * bindings/js/JSHTMLElementWrapperFactory.cpp:
1724         (WebCore::createJSHTMLWrapper):
1725         * bindings/js/JSHTMLInputElementBase.cpp:
1726         (WebCore::):
1727         (WebCore::JSHTMLInputElementBase::JSHTMLInputElementBase):
1728         (WebCore::JSHTMLInputElementBase::getOwnPropertySlot):
1729         (WebCore::JSHTMLInputElementBase::put):
1730         * bindings/js/JSHTMLInputElementBase.h:
1731         * bindings/js/JSHTMLSelectElementCustom.cpp:
1732         * bindings/js/kjs_html.cpp:
1733         (KJS::runtimeObjectCustomGetOwnPropertySlot):
1734         * bindings/js/kjs_html.h:
1735         * bindings/scripts/CodeGeneratorJS.pm:
1736         * html/HTMLAnchorElement.idl:
1737         * html/HTMLAppletElement.idl:
1738         * html/HTMLAreaElement.idl:
1739         * html/HTMLBRElement.idl:
1740         * html/HTMLBaseElement.idl:
1741         * html/HTMLBaseFontElement.idl:
1742         * html/HTMLBlockquoteElement.idl:
1743         * html/HTMLBodyElement.idl:
1744         * html/HTMLButtonElement.idl:
1745         * html/HTMLCanvasElement.idl:
1746         * html/HTMLDListElement.idl:
1747         * html/HTMLDirectoryElement.idl:
1748         * html/HTMLDivElement.idl:
1749         * html/HTMLElement.cpp:
1750         (WebCore::HTMLElement::formForEventHandlerScope):
1751         * html/HTMLElement.h:
1752         * html/HTMLElement.idl:
1753         * html/HTMLEmbedElement.idl:
1754         * html/HTMLFieldSetElement.idl:
1755         * html/HTMLFontElement.idl:
1756         * html/HTMLFormElement.idl:
1757         * html/HTMLFrameElement.idl:
1758         * html/HTMLFrameSetElement.idl:
1759         * html/HTMLGenericFormElement.cpp:
1760         (WebCore::HTMLGenericFormElement::formForEventHandlerScope):
1761         * html/HTMLGenericFormElement.h:
1762         * html/HTMLHRElement.idl:
1763         * html/HTMLHeadElement.idl:
1764         * html/HTMLHeadingElement.idl:
1765         * html/HTMLHtmlElement.idl:
1766         * html/HTMLIFrameElement.idl:
1767         * html/HTMLImageElement.idl:
1768         * html/HTMLIsIndexElement.idl:
1769         * html/HTMLLIElement.idl:
1770         * html/HTMLLabelElement.cpp:
1771         (WebCore::HTMLLabelElement::form):
1772         (WebCore::HTMLLabelElement::formForEventHandlerScope):
1773         * html/HTMLLabelElement.h:
1774         * html/HTMLLabelElement.idl:
1775         * html/HTMLLegendElement.idl:
1776         * html/HTMLLinkElement.idl:
1777         * html/HTMLMapElement.idl:
1778         * html/HTMLMarqueeElement.idl:
1779         * html/HTMLMenuElement.idl:
1780         * html/HTMLMetaElement.idl:
1781         * html/HTMLModElement.idl:
1782         * html/HTMLOListElement.idl:
1783         * html/HTMLObjectElement.cpp:
1784         (WebCore::HTMLObjectElement::formForEventHandlerScope):
1785         * html/HTMLObjectElement.h:
1786         * html/HTMLObjectElement.idl:
1787         * html/HTMLOptGroupElement.idl:
1788         * html/HTMLOptionElement.idl:
1789         * html/HTMLParagraphElement.idl:
1790         * html/HTMLParamElement.idl:
1791         * html/HTMLPreElement.idl:
1792         * html/HTMLQuoteElement.idl:
1793         * html/HTMLScriptElement.idl:
1794         * html/HTMLSelectElement.idl:
1795         * html/HTMLStyleElement.idl:
1796         * html/HTMLTableCaptionElement.idl:
1797         * html/HTMLTableCellElement.idl:
1798         * html/HTMLTableColElement.idl:
1799         * html/HTMLTableElement.idl:
1800         * html/HTMLTableRowElement.idl:
1801         * html/HTMLTableSectionElement.idl:
1802         * html/HTMLTextAreaElement.idl:
1803         * html/HTMLTitleElement.idl:
1804         * html/HTMLUListElement.idl:
1805         * page/DOMWindow.idl:
1806
1807 2007-05-28  Zack Rusin  <zrusin@trolltech.com>
1808
1809         Reviewed by andersca
1810
1811         Adding Qt related constructor/casting operators
1812         to the AtomicString and updating the project
1813         file for new Qt settings api using those.
1814
1815         * WebCore.pro:
1816         * platform/AtomicString.h:
1817
1818 2007-05-27  Sam Weinig  <sam@webkit.org>
1819
1820         Qt and Gdk build fix.
1821
1822         * WebCore.pro:
1823
1824 2007-05-27  Sam Weinig  <sam@webkit.org>
1825
1826         Reviewed by Hyatt.
1827
1828         Patch for http://bugs.webkit.org/show_bug.cgi?id=13893
1829         Autogenerate the JS bindings for the HTMLObjectElement, 
1830         HTMLEmbedElement and HTMLAppletElement
1831
1832         * DerivedSources.make:
1833         * WebCore.xcodeproj/project.pbxproj:
1834         * bindings/js/JSHTMLAppletElementCustom.cpp: Added.
1835         (WebCore::JSHTMLAppletElement::customGetOwnPropertySlot):
1836         (WebCore::JSHTMLAppletElement::customPut):
1837         (WebCore::JSHTMLAppletElement::implementsCall):
1838         (WebCore::JSHTMLAppletElement::callAsFunction):
1839         (WebCore::JSHTMLAppletElement::canGetItemsForName):
1840         (WebCore::JSHTMLAppletElement::nameGetter):
1841         * bindings/js/JSHTMLElementWrapperFactory.cpp:
1842         * bindings/js/JSHTMLEmbedElementCustom.cpp: Added.
1843         (WebCore::JSHTMLEmbedElement::customGetOwnPropertySlot):
1844         (WebCore::JSHTMLEmbedElement::customPut):
1845         (WebCore::JSHTMLEmbedElement::implementsCall):
1846         (WebCore::JSHTMLEmbedElement::callAsFunction):
1847         (WebCore::JSHTMLEmbedElement::canGetItemsForName):
1848         (WebCore::JSHTMLEmbedElement::nameGetter):
1849         * bindings/js/JSHTMLObjectElementCustom.cpp: Added.
1850         (WebCore::JSHTMLObjectElement::customGetOwnPropertySlot):
1851         (WebCore::JSHTMLObjectElement::customPut):
1852         (WebCore::JSHTMLObjectElement::implementsCall):
1853         (WebCore::JSHTMLObjectElement::callAsFunction):
1854         (WebCore::JSHTMLObjectElement::canGetItemsForName):
1855         (WebCore::JSHTMLObjectElement::nameGetter):
1856         * bindings/js/kjs_html.cpp:
1857         (KJS::):
1858         (KJS::JSHTMLElement::toString):
1859         (KJS::JSHTMLElement::pushEventHandlerScope):
1860         (KJS::runtimeObjectGetter):
1861         (KJS::runtimeObjectPropertyGetter):
1862         (KJS::runtimeObjectCustomGetOwnPropertySlot):
1863         (KJS::runtimeObjectCustomPut):
1864         (KJS::runtimeObjectImplementsCall):
1865         (KJS::runtimeObjectCallAsFunction):
1866         * bindings/js/kjs_html.h:
1867         (KJS::JSHTMLElement::classInfo):
1868         * bindings/scripts/CodeGeneratorJS.pm: Add support for 
1869         CustomGetOwnPropertySlot, CustomPutFunction, CustomCall,
1870         and SVGCheckSecurityDocument properties.
1871         * html/HTMLAppletElement.idl:
1872         * html/HTMLEmbedElement.idl:
1873         * html/HTMLObjectElement.idl:
1874         * page/DOMWindow.idl: Uncomment constructors.
1875
1876 2007-05-27  Sam Weinig  <sam@webkit.org>
1877
1878         Reviewed by Oliver.
1879
1880         Gdk build fix.
1881
1882         * platform/graphics/Path.h:
1883
1884 2007-05-27  Sam Weinig  <sam@webkit.org>
1885
1886         Gdk build fix.  Forgot to update a few instances of notImplementedGdk() to notImplemented().
1887
1888         * page/gdk/EventHandlerGdk.cpp:
1889         (WebCore::EventHandler::passMousePressEventToScrollbar):
1890         * platform/gdk/EditorClientGdk.cpp:
1891         (WebCore::EditorClientGdk::ignoreWordInSpellDocument):
1892         (WebCore::EditorClientGdk::learnWord):
1893         (WebCore::EditorClientGdk::checkSpellingOfString):
1894         (WebCore::EditorClientGdk::checkGrammarOfString):
1895         (WebCore::EditorClientGdk::updateSpellingUIWithGrammarString):
1896         (WebCore::EditorClientGdk::updateSpellingUIWithMisspelledWord):
1897         (WebCore::EditorClientGdk::showSpellingUI):
1898         (WebCore::EditorClientGdk::spellingUIIsShowing):
1899         (WebCore::EditorClientGdk::getGuessesForWord):
1900         * platform/gdk/FrameGdk.cpp:
1901         (WebCore::Frame::dashboardRegionsChanged):
1902         * platform/gdk/PlatformScrollBarGdk.cpp:
1903         (PlatformScrollbar::paint):
1904         (PlatformScrollbar::updateThumbPosition):
1905         (PlatformScrollbar::updateThumbProportion):
1906         * platform/gdk/TemporaryLinkStubs.cpp:
1907         (Widget::setEnabled):
1908         (Widget::isEnabled):
1909         (Widget::removeFromParent):
1910         (Widget::paint):
1911         (Widget::setIsSelected):
1912         (Widget::invalidate):
1913         (Widget::invalidateRect):
1914
1915 2007-05-27  Alp Toker  <alp.toker@collabora.co.uk>
1916
1917         Reviewed by Sam and Oliver.
1918
1919         Implement PathCairo. This patch is based on changes in Mike Emmel's
1920         WebKit fork with some additional clean-ups and updates.
1921
1922         * platform/graphics/Path.h:
1923         * platform/graphics/cairo/CairoPath.h: Added.
1924         (CairoPath::CairoPath):
1925         (CairoPath::~CairoPath):
1926         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1927         (WebCore::GraphicsContext::clip):
1928         * platform/graphics/cairo/PathCairo.cpp:
1929         (WebCore::Path::Path):
1930         (WebCore::Path::~Path):
1931         (WebCore::Path::operator=):
1932         (WebCore::Path::clear):
1933         (WebCore::Path::isEmpty):
1934         (WebCore::Path::translate):
1935         (WebCore::Path::moveTo):
1936         (WebCore::Path::addLineTo):
1937         (WebCore::Path::addRect):
1938         (WebCore::Path::addQuadCurveTo):
1939         (WebCore::Path::addBezierCurveTo):
1940         (WebCore::Path::addArc):
1941         (WebCore::Path::addArcTo):
1942         (WebCore::Path::addEllipse):
1943         (WebCore::Path::closeSubpath):
1944         (WebCore::Path::boundingRect):
1945         (WebCore::Path::contains):
1946         (WebCore::Path::apply):
1947         (WebCore::Path::transform):
1948         (WebCore::Path::debugString):
1949
1950 2007-05-27  Kevin Ollivier  <kevino@theolliviers.com>
1951
1952         Reviewed by Sam Weinig.
1953
1954         Consolidate all notImplemented() macro definitions into
1955         one header file for all platforms.
1956
1957         * loader/gdk/DocumentLoaderGdk.cpp:
1958         (WebCore::DocumentLoader::getResponseModifiedHeader):
1959         * loader/gdk/FrameLoaderClientGdk.cpp:
1960         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveAuthenticationChallenge):
1961         (WebCore::FrameLoaderClientGdk::dispatchDidCancelAuthenticationChallenge):
1962         (WebCore::FrameLoaderClientGdk::dispatchWillSendRequest):
1963         (WebCore::FrameLoaderClientGdk::assignIdentifierToInitialRequest):
1964         (WebCore::FrameLoaderClientGdk::createPlugin):
1965         (WebCore::FrameLoaderClientGdk::createFrame):
1966         (WebCore::FrameLoaderClientGdk::redirectDataToPlugin):
1967         (WebCore::FrameLoaderClientGdk::createJavaAppletWidget):
1968         (WebCore::FrameLoaderClientGdk::objectContentType):
1969         (WebCore::FrameLoaderClientGdk::overrideMediaType):
1970         (WebCore::FrameLoaderClientGdk::windowObjectCleared):
1971         (WebCore::FrameLoaderClientGdk::hasWebView):
1972         (WebCore::FrameLoaderClientGdk::hasFrameView):
1973         (WebCore::FrameLoaderClientGdk::frameLoadCompleted):
1974         (WebCore::FrameLoaderClientGdk::saveViewStateToItem):
1975         (WebCore::FrameLoaderClientGdk::restoreViewState):
1976         (WebCore::FrameLoaderClientGdk::privateBrowsingEnabled):
1977         (WebCore::FrameLoaderClientGdk::makeDocumentView):
1978         (WebCore::FrameLoaderClientGdk::makeRepresentation):
1979         (WebCore::FrameLoaderClientGdk::forceLayout):
1980         (WebCore::FrameLoaderClientGdk::forceLayoutForNonHTML):
1981         (WebCore::FrameLoaderClientGdk::setCopiesOnScroll):
1982         (WebCore::FrameLoaderClientGdk::detachedFromParent1):
1983         (WebCore::FrameLoaderClientGdk::detachedFromParent2):
1984         (WebCore::FrameLoaderClientGdk::detachedFromParent3):
1985         (WebCore::FrameLoaderClientGdk::detachedFromParent4):
1986         (WebCore::FrameLoaderClientGdk::loadedFromCachedPage):
1987         (WebCore::FrameLoaderClientGdk::dispatchDidHandleOnloadEvents):
1988         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveServerRedirectForProvisionalLoad):
1989         (WebCore::FrameLoaderClientGdk::dispatchDidCancelClientRedirect):
1990         (WebCore::FrameLoaderClientGdk::dispatchWillPerformClientRedirect):
1991         (WebCore::FrameLoaderClientGdk::dispatchDidChangeLocationWithinPage):
1992         (WebCore::FrameLoaderClientGdk::dispatchWillClose):
1993         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveIcon):
1994         (WebCore::FrameLoaderClientGdk::dispatchDidStartProvisionalLoad):
1995         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveTitle):
1996         (WebCore::FrameLoaderClientGdk::dispatchDidCommitLoad):
1997         (WebCore::FrameLoaderClientGdk::dispatchDidFinishDocumentLoad):
1998         (WebCore::FrameLoaderClientGdk::dispatchDidFirstLayout):
1999         (WebCore::FrameLoaderClientGdk::dispatchShow):
2000         (WebCore::FrameLoaderClientGdk::cancelPolicyCheck):
2001         (WebCore::FrameLoaderClientGdk::dispatchDidLoadMainResource):
2002         (WebCore::FrameLoaderClientGdk::revertToProvisionalState):
2003         (WebCore::FrameLoaderClientGdk::clearUnarchivingState):
2004         (WebCore::FrameLoaderClientGdk::willChangeTitle):
2005         (WebCore::FrameLoaderClientGdk::finishedLoading):
2006         (WebCore::FrameLoaderClientGdk::finalSetupForReplace):
2007         (WebCore::FrameLoaderClientGdk::setDefersLoading):
2008         (WebCore::FrameLoaderClientGdk::isArchiveLoadPending):
2009         (WebCore::FrameLoaderClientGdk::cancelPendingArchiveLoad):
2010         (WebCore::FrameLoaderClientGdk::clearArchivedResources):
2011         (WebCore::FrameLoaderClientGdk::canHandleRequest):
2012         (WebCore::FrameLoaderClientGdk::canShowMIMEType):
2013         (WebCore::FrameLoaderClientGdk::representationExistsForURLScheme):
2014         (WebCore::FrameLoaderClientGdk::generatedMIMETypeForURLScheme):
2015         (WebCore::FrameLoaderClientGdk::provisionalLoadStarted):
2016         (WebCore::FrameLoaderClientGdk::didFinishLoad):
2017         (WebCore::FrameLoaderClientGdk::prepareForDataSourceReplacement):
2018         (WebCore::FrameLoaderClientGdk::setTitle):
2019         (WebCore::FrameLoaderClientGdk::setDocumentViewFromCachedPage):
2020         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveContentLength):
2021         (WebCore::FrameLoaderClientGdk::dispatchDidFinishLoading):
2022         (WebCore::FrameLoaderClientGdk::dispatchDidFailLoading):
2023         (WebCore::FrameLoaderClientGdk::dispatchDidLoadResourceFromMemoryCache):
2024         (WebCore::FrameLoaderClientGdk::dispatchDidFailProvisionalLoad):
2025         (WebCore::FrameLoaderClientGdk::dispatchDidFailLoad):
2026         (WebCore::FrameLoaderClientGdk::download):
2027         (WebCore::FrameLoaderClientGdk::cancelledError):
2028         (WebCore::FrameLoaderClientGdk::blockedError):
2029         (WebCore::FrameLoaderClientGdk::cannotShowURLError):
2030         (WebCore::FrameLoaderClientGdk::interruptForPolicyChangeError):
2031         (WebCore::FrameLoaderClientGdk::cannotShowMIMETypeError):
2032         (WebCore::FrameLoaderClientGdk::fileDoesNotExistError):
2033         (WebCore::FrameLoaderClientGdk::shouldFallBack):
2034         (WebCore::FrameLoaderClientGdk::willUseArchive):
2035         (WebCore::FrameLoaderClientGdk::saveDocumentViewToCachedPage):
2036         (WebCore::FrameLoaderClientGdk::canCachePage):
2037         (WebCore::FrameLoaderClientGdk::dispatchCreatePage):
2038         (WebCore::FrameLoaderClientGdk::dispatchUnableToImplementPolicy):
2039         (WebCore::FrameLoaderClientGdk::setMainDocumentError):
2040         (WebCore::FrameLoaderClientGdk::startDownload):
2041         (WebCore::FrameLoaderClientGdk::updateGlobalHistoryForStandardLoad):
2042         (WebCore::FrameLoaderClientGdk::updateGlobalHistoryForReload):
2043         * loader/qt/DocumentLoaderQt.cpp:
2044         * page/gdk/ContextMenuClientGdk.cpp:
2045         (WebCore::ContextMenuClientGdk::contextMenuDestroyed):
2046         (WebCore::ContextMenuClientGdk::getCustomMenuFromDefaultItems):
2047         (WebCore::ContextMenuClientGdk::contextMenuItemSelected):
2048         (WebCore::ContextMenuClientGdk::downloadURL):
2049         (WebCore::ContextMenuClientGdk::copyImageToClipboard):
2050         (WebCore::ContextMenuClientGdk::searchWithGoogle):
2051         (WebCore::ContextMenuClientGdk::lookUpInDictionary):
2052         (WebCore::ContextMenuClientGdk::speak):
2053         (WebCore::ContextMenuClientGdk::stopSpeaking):
2054         * page/gdk/EventHandlerGdk.cpp:
2055         (WebCore::EventHandler::passMouseDownEventToWidget):
2056         (WebCore::EventHandler::eventActivatedView):
2057         (WebCore::EventHandler::passSubframeEventToSubframe):
2058         (WebCore::EventHandler::passWheelEventToWidget):
2059         (WebCore::EventHandler::createDraggingClipboard):
2060         * page/qt/EventHandlerQt.cpp:
2061         * page/qt/FrameQt.cpp:
2062         * platform/NotImplemented.h: Added.
2063         * platform/gdk/CursorGdk.cpp:
2064         (WebCore::Cursor::Cursor):
2065         * platform/gdk/EditorClientGdk.cpp:
2066         (WebCore::EditorClientGdk::shouldDeleteRange):
2067         (WebCore::EditorClientGdk::isContinuousSpellCheckingEnabled):
2068         (WebCore::EditorClientGdk::isGrammarCheckingEnabled):
2069         (WebCore::EditorClientGdk::spellCheckerDocumentTag):
2070         (WebCore::EditorClientGdk::shouldBeginEditing):
2071         (WebCore::EditorClientGdk::shouldEndEditing):
2072         (WebCore::EditorClientGdk::shouldInsertText):
2073         (WebCore::EditorClientGdk::shouldChangeSelectedRange):
2074         (WebCore::EditorClientGdk::shouldApplyStyle):
2075         (WebCore::EditorClientGdk::didBeginEditing):
2076         (WebCore::EditorClientGdk::respondToChangedContents):
2077         (WebCore::EditorClientGdk::respondToChangedSelection):
2078         (WebCore::EditorClientGdk::didEndEditing):
2079         (WebCore::EditorClientGdk::didWriteSelectionToPasteboard):
2080         (WebCore::EditorClientGdk::didSetSelectionTypesForPasteboard):
2081         (WebCore::EditorClientGdk::selectWordBeforeMenuEvent):
2082         (WebCore::EditorClientGdk::isEditable):
2083         (WebCore::EditorClientGdk::registerCommandForUndo):
2084         (WebCore::EditorClientGdk::registerCommandForRedo):
2085         (WebCore::EditorClientGdk::clearUndoRedoOperations):
2086         (WebCore::EditorClientGdk::canUndo):
2087         (WebCore::EditorClientGdk::canRedo):
2088         (WebCore::EditorClientGdk::undo):
2089         (WebCore::EditorClientGdk::redo):
2090         (WebCore::EditorClientGdk::shouldInsertNode):
2091         (WebCore::EditorClientGdk::pageDestroyed):
2092         (WebCore::EditorClientGdk::smartInsertDeleteEnabled):
2093         (WebCore::EditorClientGdk::toggleContinuousSpellChecking):
2094         (WebCore::EditorClientGdk::handleInputMethodKeypress):
2095         (WebCore::EditorClientGdk::textFieldDidBeginEditing):
2096         (WebCore::EditorClientGdk::textFieldDidEndEditing):
2097         (WebCore::EditorClientGdk::textDidChangeInTextField):
2098         (WebCore::EditorClientGdk::doTextFieldCommandFromEvent):
2099         (WebCore::EditorClientGdk::textWillBeDeletedInTextField):
2100         (WebCore::EditorClientGdk::textDidChangeInTextArea):
2101         * platform/gdk/FrameGdk.cpp:
2102         (WebCore::Frame::print):
2103         (WebCore::Frame::issueTransposeCommand):
2104         (WebCore::Frame::cleanupPlatformScriptObjects):
2105         (WebCore::Frame::dragImageForSelection):
2106         * platform/gdk/NotImplementedGdk.h: Removed.
2107         * platform/gdk/PopupMenuGdk.cpp:
2108         (WebCore::PopupMenu::PopupMenu):
2109         (WebCore::PopupMenu::~PopupMenu):
2110         (WebCore::PopupMenu::show):
2111         (WebCore::PopupMenu::hide):
2112         (WebCore::PopupMenu::updateFromElement):
2113         * platform/gdk/RenderThemeGdk.cpp:
2114         (WebCore::RenderThemeGdk::setCheckboxSize):
2115         (WebCore::RenderThemeGdk::setRadioSize):
2116         (WebCore::RenderThemeGdk::adjustTextFieldStyle):
2117         * platform/gdk/ScreenGdk.cpp:
2118         (WebCore::screenDepthPerComponent):
2119         (WebCore::screenIsMonochrome):
2120         (WebCore::screenRect):
2121         (WebCore::screenAvailableRect):
2122         * platform/gdk/ScrollViewGdk.cpp:
2123         (WebCore::ScrollView::update):
2124         (WebCore::ScrollView::addChild):
2125         (WebCore::ScrollView::removeChild):
2126         (WebCore::ScrollView::scrollRectIntoViewRecursively):
2127         (WebCore::ScrollView::inWindow):
2128         (WebCore::ScrollView::wheelEvent):
2129         (WebCore::ScrollView::updateScrollbars):
2130         (WebCore::ScrollView::updateScrollInfo):
2131         (WebCore::ScrollView::windowToContents):
2132         (WebCore::ScrollView::contentsToWindow):
2133         (WebCore::ScrollView::scrollbarUnderMouse):
2134         * platform/gdk/TemporaryLinkStubs.cpp:
2135         (FrameView::updateBorder):
2136         (WebCore::findNextWordFromIndex):
2137         (WebCore::currentTextBreakLocaleID):
2138         (ChromeClientGdk::chromeDestroyed):
2139         (ChromeClientGdk::windowRect):
2140         (ChromeClientGdk::setWindowRect):
2141         (ChromeClientGdk::pageRect):
2142         (ChromeClientGdk::scaleFactor):
2143         (ChromeClientGdk::focus):
2144         (ChromeClientGdk::unfocus):
2145         (ChromeClientGdk::createWindow):
2146         (ChromeClientGdk::createModalDialog):
2147         (ChromeClientGdk::show):
2148         (ChromeClientGdk::canRunModal):
2149         (ChromeClientGdk::runModal):
2150         (ChromeClientGdk::setToolbarsVisible):
2151         (ChromeClientGdk::toolbarsVisible):
2152         (ChromeClientGdk::setStatusbarVisible):
2153         (ChromeClientGdk::statusbarVisible):
2154         (ChromeClientGdk::setScrollbarsVisible):
2155         (ChromeClientGdk::scrollbarsVisible):
2156         (ChromeClientGdk::setMenubarVisible):
2157         (ChromeClientGdk::menubarVisible):
2158         (ChromeClientGdk::setResizable):
2159         (ChromeClientGdk::closeWindowSoon):
2160         (ChromeClientGdk::canTakeFocus):
2161         (ChromeClientGdk::takeFocus):
2162         (ChromeClientGdk::canRunBeforeUnloadConfirmPanel):
2163         (ChromeClientGdk::addMessageToConsole):
2164         (ChromeClientGdk::runBeforeUnloadConfirmPanel):
2165         (ChromeClientGdk::runJavaScriptAlert):
2166         (ChromeClientGdk::runJavaScriptConfirm):
2167         (ChromeClientGdk::runJavaScriptPrompt):
2168         (ChromeClientGdk::setStatusbarText):
2169         (ChromeClientGdk::shouldInterruptJavaScript):
2170         (ChromeClientGdk::tabsToLinks):
2171         (ChromeClientGdk::windowResizerRect):
2172         (ChromeClientGdk::addToDirtyRegion):
2173         (ChromeClientGdk::scrollBackingStore):
2174         (ChromeClientGdk::updateBackingStore):
2175         (PlugInInfoStore::createPluginInfoForPluginAtIndex):
2176         (PlugInInfoStore::pluginCount):
2177         (WebCore::PlugInInfoStore::supportsMIMEType):
2178         (WebCore::refreshPlugins):
2179         (SearchPopupMenu::saveRecentSearches):
2180         (SearchPopupMenu::loadRecentSearches):
2181         (SearchPopupMenu::SearchPopupMenu):
2182         (SearchPopupMenu::enabled):
2183         (FileChooser::FileChooser):
2184         (FileChooser::~FileChooser):
2185         (FileChooser::openFileChooser):
2186         (FileChooser::basenameForWidth):
2187         (ResourceHandle::willLoadFromCache):
2188         (ResourceHandle::loadsBlocked):
2189         (ResourceHandle::loadResourceSynchronously):
2190         (Icon::Icon):
2191         (Icon::~Icon):
2192         (Icon::newIconForFile):
2193         (Icon::paint):
2194         (Font::selectionRectForComplexText):
2195         (Font::drawComplexText):
2196         (Font::floatWidthForComplexText):
2197         (Font::offsetForPositionForComplexText):
2198         (CachedPage::close):
2199         (Editor::newGeneralClipboard):
2200         (Pasteboard::generalPasteboard):
2201         (Pasteboard::writeSelection):
2202         (Pasteboard::writeURL):
2203         (Pasteboard::writeImage):
2204         (Pasteboard::clear):
2205         (Pasteboard::canSmartReplace):
2206         (Pasteboard::documentFragment):
2207         (Pasteboard::plainText):
2208         (Pasteboard::Pasteboard):
2209         (Pasteboard::~Pasteboard):
2210         (ContextMenu::ContextMenu):
2211         (ContextMenu::~ContextMenu):
2212         (ContextMenu::appendItem):
2213         (ContextMenuItem::ContextMenuItem):
2214         (ContextMenuItem::~ContextMenuItem):
2215         (ContextMenuItem::releasePlatformDescription):
2216         (ContextMenuItem::type):
2217         (ContextMenuItem::setType):
2218         (ContextMenuItem::action):
2219         (ContextMenuItem::setAction):
2220         (ContextMenuItem::title):
2221         (ContextMenuItem::setTitle):
2222         (ContextMenuItem::platformSubMenu):
2223         (ContextMenuItem::setSubMenu):
2224         (ContextMenuItem::setChecked):
2225         (ContextMenuItem::setEnabled):
2226         (WebCore::supportedKeySizes):
2227         (WebCore::systemBeep):
2228         (WebCore::userIdleTime):
2229         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2230         * platform/graphics/cairo/ImageBufferCairo.cpp:
2231         * platform/graphics/cairo/PathCairo.cpp:
2232         * platform/graphics/gdk/ImageGdk.cpp:
2233         * platform/graphics/qt/GraphicsContextQt.cpp:
2234         * platform/graphics/qt/IconQt.cpp:
2235         * platform/graphics/qt/ImageQt.cpp:
2236         * platform/network/gdk/ResourceHandleCurl.cpp:
2237         (WebCore::ResourceHandle::setDefersLoading):
2238         * platform/network/gdk/ResourceHandleManager.cpp:
2239         (WebCore::ResourceHandleManager::setupPUT):
2240         (WebCore::ResourceHandleManager::setupPOST):
2241         * platform/network/qt/ResourceHandleQt.cpp:
2242         * platform/qt/ClipboardQt.cpp:
2243         * platform/qt/CursorQt.cpp:
2244         * platform/qt/DragDataQt.cpp:
2245         * platform/qt/FileChooserQt.cpp:
2246         * platform/qt/MimeTypeRegistryQt.cpp:
2247         * platform/qt/PasteboardQt.cpp:
2248         * platform/qt/PlatformScrollBarQt.cpp:
2249         * platform/qt/PopupMenuQt.cpp:
2250         * platform/qt/ScrollViewQt.cpp:
2251         * platform/qt/TemporaryLinkStubs.cpp:
2252         * platform/qt/TextBoundaries.cpp:
2253         * platform/qt/WidgetQt.cpp:
2254         * platform/win/FontWin.cpp:
2255         * platform/win/TemporaryLinkStubs.cpp:
2256         * platform/wx/ClipboardWx.cpp:
2257         * platform/wx/FontWx.cpp:
2258         * platform/wx/ScrollViewWx.cpp:
2259         * platform/wx/SharedTimerWx.cpp:
2260         * platform/wx/TemporaryLinkStubs.cpp:
2261
2262 2007-05-27  Rob Buis  <buis@kde.org>
2263
2264         Reviewed by Oliver.
2265
2266         http://bugs.webkit.org/show_bug.cgi?id=13828
2267         x/y values on rootmost <svg> elements should be ignored
2268
2269         Make sure that root-most <svg> elements do not take into account x/y.
2270
2271         * ksvg2/svg/SVGSVGElement.cpp:
2272         (WebCore::SVGSVGElement::viewport):
2273         (WebCore::SVGSVGElement::getCTM):
2274         (WebCore::SVGSVGElement::getScreenCTM):
2275         * rendering/RenderSVGContainer.cpp:
2276         (WebCore::RenderSVGContainer::calcViewport):
2277
2278 2007-05-26  David Hyatt  <hyatt@apple.com>
2279
2280         Fix for radar bug 5219562, PNG isn't displayed on SVG test suite.
2281         Improve <object> error handling so that it recovers properly when
2282         <td> is used inside it.
2283
2284         Reviewed by olliej
2285
2286         Added fast/invalid/td-inside-object.html
2287
2288         * html/HTMLObjectElement.h:
2289         (WebCore::HTMLObjectElement::tagPriority):
2290         * html/HTMLParser.cpp:
2291         (WebCore::HTMLParser::handleError):
2292         * html/HTMLParserErrorCodes.cpp:
2293         (WebCore::htmlParserErrorMessageTemplate):
2294         * html/HTMLParserErrorCodes.h:
2295
2296 2007-05-26  David Hyatt  <hyatt@apple.com>
2297
2298         Don't compare the "isset" variables in background layers, since they
2299         lead us to turn off the Aqua look incorrectly, even when the background
2300         matches the default.
2301
2302         Reviewed by olliej
2303
2304         * rendering/RenderStyle.cpp:
2305         (WebCore::BackgroundLayer::operator==):
2306
2307 2007-05-26  David Hyatt  <hyatt@apple.com>
2308
2309         Improve the </p> -> <p></p> error message to not spew two errors.
2310         Fix a bug where errors reported inside document.write didn't get
2311         reported as such because of a mistake in the notation of SegmentedString.
2312
2313         Reviewed by aroben
2314
2315         * html/HTMLParser.cpp:
2316         (WebCore::HTMLParser::processCloseTag):
2317         * platform/SegmentedString.h:
2318         (WebCore::SegmentedSubstring::clear):
2319
2320 2007-05-26  David Hyatt  <hyatt@apple.com>
2321
2322         Fix for bug 13887, percentage height block not sized correctly inside
2323         positioned percentage height containing block.
2324
2325         Reviewed by mitz
2326
2327         fast/block/positioning/complex-percentage-height.html
2328
2329         * rendering/RenderBox.cpp:
2330         (WebCore::RenderBox::calcPercentageHeight):
2331
2332 2007-05-26  Mitz Pettel  <mitz@webkit.org>
2333
2334         Reviewed by Oliver Hunt.
2335
2336         - finish fixing http://bugs.webkit.org/show_bug.cgi?id=13871
2337           Box shadow should not apply to Aqua-themed controls
2338
2339         Covered by fast/forms/box-shadow-override.html
2340
2341         I forgot to include adjustSliderThumbStyle in the previous patch and the
2342         test didn't detect it because of a bug introduced in r21739.
2343
2344         * rendering/RenderThemeMac.h:
2345         * rendering/RenderThemeMac.mm:
2346         (WebCore::RenderThemeMac::adjustSliderThumbStyle):
2347
2348 2007-05-26  Mitz Pettel  <mitz@webkit.org>
2349
2350         Reviewed by Hyatt.
2351
2352         - fix http://bugs.webkit.org/show_bug.cgi?id=13876
2353           Box-Shadow disappears if shadow doesn't fit in the window size
2354
2355         Tests: fast/repaint/box-shadow-h.html
2356                fast/repaint/box-shadow-v.html
2357
2358         * rendering/RenderTable.cpp:
2359         (WebCore::RenderTable::layout):
2360
2361 2007-05-26  Alexey Proskuryakov  <ap@webkit.org>
2362
2363         Reviewed by Darin.
2364
2365         http://bugs.webkit.org/show_bug.cgi?id=13605
2366         REGRESSION: Browser crashes when switching Kotoeri input modes
2367
2368         The problem could no longer be reproduced with Kotoeri thanks to
2369         a fix in <http://trac.webkit.org/projects/webkit/changeset/21728>,
2370         but we still need to protect from invalid ranges passed from
2371         input methods.
2372
2373         Test: editing/input/replace-invalid-range.html
2374
2375         * page/mac/WebCoreFrameBridge.mm:
2376         (-[WebCoreFrameBridge selectNSRange:]): Added a null check.
2377
2378 2007-05-26  Darin Adler  <darin@apple.com>
2379
2380         * platform/network/mac/ResourceResponseMac.mm:
2381         (WebCore::ResourceResponse::doUpdateResourceResponse):
2382         Alexey pointed out that I was wrong about object lifetime, so
2383         rolling this change out.
2384
2385 2007-05-26  Darin Adler  <darin@apple.com>
2386
2387         Reviewed by Anders.
2388
2389         * platform/network/mac/ResourceResponseMac.mm:
2390         (WebCore::ResourceResponse::doUpdateResourceResponse):
2391         Fixed code where a temporary String is used after destroyed.
2392
2393 2007-05-26  Mitz Pettel  <mitz@webkit.org>
2394
2395         Reviewed by Darin.
2396
2397         - http://bugs.webkit.org/show_bug.cgi?id=13842
2398           Simplify Color::light() and Color::dark()
2399
2400         Not testable.
2401
2402         * platform/graphics/Color.cpp:
2403         (WebCore::Color::light):
2404         (WebCore::Color::dark):
2405
2406 2007-05-26  Mitz Pettel  <mitz@webkit.org>
2407
2408         Reviewed by Darin.
2409
2410         - fix http://bugs.webkit.org/show_bug.cgi?id=13870
2411           RenderFrameSet should only allow frame and frameset children
2412
2413         Covered by fast/frames/inline-object-inside-frameset.html
2414
2415         * rendering/RenderFrame.h:
2416         (WebCore::RenderFrame::isFrame): Added.
2417         * rendering/RenderFrameSet.cpp:
2418         (WebCore::RenderFrameSet::paint): Removed check for inline objects that is
2419         no longer needed.
2420         (WebCore::RenderFrameSet::isChildAllowed): Added. Allows the child only
2421         if it is a frame or another frameset.
2422         * rendering/RenderFrameSet.h:
2423         * rendering/RenderObject.h:
2424         (WebCore::RenderObject::isFrame): Added.
2425
2426 2007-05-26  Mitz Pettel  <mitz@webkit.org>
2427
2428         Reviewed by Darin.
2429
2430         - http://bugs.webkit.org/show_bug.cgi?id=13871
2431           Box shadow should not apply to Aqua-themed controls
2432
2433         Test: fast/forms/box-shadow-override.html
2434
2435         * rendering/RenderTheme.cpp:
2436         (WebCore::RenderTheme::adjustCheckboxStyle):
2437         (WebCore::RenderTheme::adjustRadioStyle):
2438         * rendering/RenderThemeMac.h:
2439         * rendering/RenderThemeMac.mm:
2440         (WebCore::RenderThemeMac::adjustButtonStyle):
2441         (WebCore::RenderThemeMac::adjustMenuListStyle):
2442         (WebCore::RenderThemeMac::adjustSliderTrackStyle):
2443         (WebCore::RenderThemeMac::adjustSearchFieldStyle):
2444         (WebCore::RenderThemeMac::adjustSearchFieldCancelButtonStyle):
2445         (WebCore::RenderThemeMac::adjustSearchFieldDecorationStyle):
2446         (WebCore::RenderThemeMac::adjustSearchFieldResultsDecorationStyle):
2447         (WebCore::RenderThemeMac::adjustSearchFieldResultsButtonStyle):
2448
2449 2007-05-26  Holger Freyther  <zecke@selfish.org>
2450
2451         Reviewed by Anders.
2452
2453         * platform/gdk/FrameGdk.cpp: Catch up to make it compile
2454         (WebCore::FrameGdk::FrameGdk): The Settings is now owned by the Page
2455
2456 2007-05-25  Sam Weinig  <sam@webkit.org>
2457
2458         Reviewed by Oliver of the Hunt.
2459
2460         Fixed <rdar://problem/5230247> at least 43 xhtml tests fail in 
2461         Leopard because they are being interpreted as html
2462
2463         Adds a work around for <rdar://problem/5230154> which explicitly
2464         sets local .xhtml files to have the MIME type application/xhtml+xml.
2465
2466         * platform/network/mac/ResourceResponseMac.mm:
2467         (WebCore::ResourceResponse::doUpdateResourceResponse):
2468
2469 2007-05-25  Geoffrey Garen  <ggaren@apple.com>
2470
2471         Reviewed by Darin Adler.
2472
2473         Fixed <rdar://problem/5055182> The page cache has no global cap.
2474         
2475         Beefed up the PageCache class to track which HistoryItems are 
2476         cached, and decide how to evict old HistoryItems as new ones are
2477         added.
2478
2479         * history/BackForwardList.cpp: Removed support for managing the page cache
2480         through the BackForwardList since this is deprecated in Mac's 
2481         WebBackForwardList, and doesn't exist on other platforms.
2482         
2483         Added a Page* back pointer so that Mac WebBackForwardList can still support 
2484         its deprecated API, using the new hotness. This isn't a big burden, since 
2485         Page is responsible for calling BackForwardList::close upon destruction, 
2486         anyway.
2487
2488         * history/HistoryItem.cpp: Replaced CachedPage* with boolean that tells
2489         you whether you're in the page cache. This prevents us from having more
2490         than one persistent repository for cached pages.
2491
2492         * history/PageCache.cpp: If you're playing along at home, this code is 
2493         the reason for the patch.
2494
2495         * loader/FrameLoader.cpp: If you're playing along at home, the minuses in
2496         this file are the reason for the patch.
2497         
2498         Replaced call to FrameLoaderClient::loadedFromCachedPage with its one-line
2499         implementation because WebCore calling itself through WebKit is uncivilized.
2500
2501         * page/Settings.cpp: Added support for removing a Page's HistoryItems from
2502         the page cache.
2503
2504 2007-05-25  Mitz Pettel  <mitz@webkit.org>
2505
2506         Reviewed by Darin.
2507
2508         - fix http://bugs.webkit.org/show_bug.cgi?id=13869
2509           Many leaks seen on buildbot after r21735
2510
2511         - fix another regression from r21739: ::-webkit-slider-thumb style not
2512           applied.
2513
2514         Test: fast/forms/slider-thumb-stylability.html
2515
2516         * rendering/RenderSlider.cpp:
2517         (WebCore::RenderSlider::setStyle):
2518         (WebCore::RenderSlider::createThumbStyle):
2519
2520 2007-05-25  Justin Garcia  <justin.garcia@apple.com>
2521
2522         Reviewed by Harrison.
2523
2524         <rdar://problem/5228141> 
2525         REGRESSION: Can't apply style to selection that ends after an image
2526
2527         * editing/ApplyStyleCommand.cpp:
2528         (WebCore::ApplyStyleCommand::applyInlineStyle):
2529         Use range compliant equivalents when creating the Range
2530         used to compute pastEndNode(), otherwise Range's constructor
2531         ASSERTs and pastEndNode() returns null. Added a testcase.
2532         If the incoming Range is collapsed at [br, 0], callers want
2533         the style to be applied to the br, so expand the Range to include
2534         it.  We got away without expanding before because pastEndNode
2535         of a Range from [br, 0] to [br, 0] is the node after the br.
2536         Using range compliant equivalents changed that. There's already
2537         test coverage for this change.
2538         Changed while loop termination for finding the end of a run 
2539         so that we don't process pastEnd.  end.node() may now be 
2540         non-atomic and we'd blow past it. There's already test
2541         coverage for this change.
2542
2543 2007-05-25  Beth Dakin  <bdakin@apple.com>
2544
2545         Rubber stamped by Hyatt
2546
2547         Adding an ASSERT for good measure.
2548
2549         * page/FrameView.cpp:
2550         (WebCore::FrameView::layout):
2551
2552 2007-05-25  Kevin McCullough  <kmccullough@apple.com>
2553  
2554         Reviewed by Geoff.
2555
2556         - <rdar://problem/5183523> REGRESSION: Excel: Worksheet tabs in spreadsheet saved as web page don't work 
2557         - Change load to check the URL as well as the referrer since it is possilbe to have a referrer which limits a load even thought the URL would allow it.  There is a bug about how we need to re-evaluate the whole load architecture: <rdar://problem/5227992> Rethink canLoad() to have a consistent and comprehensive architecture.
2558
2559         * loader/FrameLoader.cpp:
2560         (WebCore::FrameLoader::loadSubframe):
2561         (WebCore::FrameLoader::load):
2562         (WebCore::FrameLoader::canLoad):
2563         * loader/FrameLoader.h:
2564
2565 2007-05-25  Anders Carlsson  <andersca@apple.com>
2566
2567         Reviewed by Brady.
2568
2569         <rdar://problem/5209536>
2570         http://bugs.webkit.org/show_bug.cgi?id=13757
2571         REGRESSION: Leaks seen on buildbot after r21497.
2572         
2573         Fix multipart data loading so it works like Tiger Safari. When one part of a multipart connection has been loaded,
2574         move the subresource loader from the subresource loaders set and into a special multipart subresource loader set. This set 
2575         is not considered when asking a document loader if it's currently loading. 
2576                 
2577         * loader/DocumentLoader.cpp:
2578         (WebCore::DocumentLoader::stopLoading):
2579         Always stop the multipart subresource loaders here.
2580         
2581         (WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart):
2582         New function that moves the loader from m_subresourceLoaders to m_multipartSubresourceLoaders and updates the document loader's state.
2583         
2584         * loader/ProgressTracker.cpp:
2585         (WebCore::ProgressTracker::incrementProgress):
2586         If a progress item already exists, reuse it. This can happen in some rare circumstances when dealing with multipart data.
2587         
2588         * loader/SubresourceLoader.cpp:
2589         (WebCore::SubresourceLoader::didReceiveResponse):
2590         Call subresourceLoaderFinishedLoadingOnePart if the response is multipart.
2591
2592 2007-05-25  Patti Hoa  <patti@apple.com>
2593
2594         Reviewed by Tim Hatcher.
2595
2596         <rdar://problem/4918397> Exception raise inspecting note contents in the background
2597         
2598         * bridge/mac/WebCoreAXObject.mm:
2599         (-[WebCoreAXObject accessibilityDescription]):
2600         Only allow asking the attachmentView for description if attachmentView supports this description attribute
2601
2602 2007-05-25  Beth Dakin  <bdakin@apple.com>
2603
2604         Reviewed by Oliver and Hyatt.
2605
2606         Fix for <rdar://problem/5228363> REGRESSION: In Mail, attempting to 
2607         create a To Do results in a crash
2608
2609         This regressed with r21635. Now that -boundingBox updates layout if 
2610         it is needed, we infinitely recurse when Mail draws a custom 
2611         highlight. The fix is to put a guard around laying out the render 
2612         tree.
2613
2614         * page/FrameView.cpp:
2615         (WebCore::FrameViewPrivate::reset):
2616         (WebCore::FrameView::layout):
2617
2618 2007-05-25  Patti Hoa <patti@apple.com>
2619
2620         Reviewed by John Sullivan.
2621         
2622         <rdar://problem/5221986> selection in web areas doesn't seem to be working for text navigation
2623         
2624         * bridge/mac/WebCoreAXObject.mm:
2625         (-[WebCoreAXObject accessibilityIsAttributeSettable:]):
2626         Fixed up incorrect string comparison for AXSelectedTextMarkerRange ax attribute so 
2627         this attribute can actually announce its settability. 
2628
2629 2007-05-25  Darin Adler  <darin@apple.com>
2630
2631         Reviewed by Alice.
2632
2633         - fix <rdar://problem/5228048> REGRESSION: In a new Mail message, the caret isn't
2634           immediately inserted when tabbing into or clicking in the message body
2635
2636         This latent problem was uncovered by <http://trac.webkit.org/projects/webkit/changeset/21476>,
2637         which removed some code that did extra work whenever setCaretVisible made the caret visible.
2638
2639         * page/Frame.cpp: (WebCore::Frame::selectionLayoutChanged): Call invalidateCaretRect
2640         when turning the caret on. All other call sites that touched m_caretPaint were doing
2641         this, but this was not.
2642
2643 2007-05-25  Darin Adler  <darin@apple.com>
2644
2645         Reviewed by Harrison.
2646
2647         * DerivedSources.make: Tweaked spelling.
2648
2649 2007-05-25  Mitz Pettel  <mitz@webkit.org>
2650
2651         Reviewed by Darin.
2652
2653         - fix http://bugs.webkit.org/show_bug.cgi?id=13872
2654           REGRESSION: An empty search field can have a cancel button
2655
2656         Test: fast/forms/search-cancel-button-style-sharing.html
2657
2658         * rendering/RenderTextControl.cpp:
2659         (WebCore::RenderTextControl::createCancelButtonStyle): Prevented sharing of
2660         the cancel button style between search fields that share style, because
2661         each search field mutates the style to show and hide the cancel button.
2662
2663 2007-05-25  David Harrison  <harrison@apple.com>
2664
2665         Reviewed by Kevin and Geoff.
2666
2667         * DerivedSources.make:
2668         Add an inclusion guard for CSSGrammar.h and XPathGrammar.h, because older versions of bison do not
2669         
2670         * css/maketokenizer:
2671         Unconditionally define the flex basic types that are not part of newer versions of flex. Was
2672         only needed on Linux. Now needed on Mac OS 10.5, and is OK to do on 10.4.9.
2673
2674 2007-05-25  Geoffrey Garen  <ggaren@apple.com>
2675
2676         Reviewed by Darin Adler.
2677         
2678         Moved JavaScriptCore-related pending public API to public API.
2679
2680         Moved -JSObject
2681
2682         * bindings/objc/WebScriptObjectPendingPublic.h: from here
2683         * bindings/objc/WebScriptObject.h: to here
2684         * bindings/objc/WebScriptObject.mm: and out of its temporary category
2685
2686 2007-05-25  Mitz Pettel  <mitz@webkit.org>
2687
2688         Reviewed by Darin.
2689
2690         - fix http://bugs.webkit.org/show_bug.cgi?id=13767
2691           REGRESSION: Multipart image documents are garbled
2692
2693         Test: http/tests/multipart/invalid-image-data-standalone.html
2694
2695         * loader/DocumentLoader.cpp:
2696         (WebCore::DocumentLoader::isLoadingMultipartContent): Added.
2697         * loader/DocumentLoader.h:
2698         * loader/ImageDocument.cpp:
2699         (WebCore::ImageTokenizer::finish): If the image is multipart, make a copy
2700         of the current part instead of using the resource data, which is going to be
2701         overwritten by the next part.
2702         * loader/MainResourceLoader.h:
2703         (WebCore::MainResourceLoader::isLoadingMultipartContent): Added.
2704
2705 2007-05-25  Anders Carlsson  <andersca@apple.com>
2706
2707         Fix no-svg build.
2708         
2709         * bindings/js/kjs_html.cpp:
2710         (KJS::HTMLElementFunction::callAsFunction):
2711
2712 2007-05-25  Anders Carlsson  <andersca@apple.com>
2713
2714         Reviewed by Mitz.
2715
2716         <rdar://problem/5226788> After resizing the window larger than the image, hovering over the image still shows magnify glass
2717         
2718         One part of the bug was already fixed by my previous commit. This fixes the case where the window is sized so the image fit
2719         after it has been zoomed in.
2720         
2721         * loader/ImageDocument.cpp:
2722         (WebCore::ImageDocument::windowSizeChanged):
2723
2724 2007-05-25  John Sullivan  <sullivan@apple.com>
2725
2726         Reviewed by Anders and Tim
2727
2728         - WebCore change for: 
2729           <rdar://problem/5226000> REGRESSION: In Gmail and Mail, a hang occurs when attempting to grammar/spellcheck a word in a reply 
2730
2731         * editing/Editor.cpp:
2732         (WebCore::findFirstBadGrammarInRange):
2733         Use the more obvious way to check whether a range is empty. In this case the more obvious way
2734         would also have caused no problem to occur. Also added an assertion. Though this change is
2735         enough to fix the symptom of the bug, the real fix is in WebKit.
2736
2737 2007-05-25  Anders Carlsson  <andersca@apple.com>
2738
2739         Reviewed by Darin (Sorta).
2740
2741         * loader/ImageDocument.cpp:
2742         (WebCore::ImageDocument::restoreImageSize):
2743         Use removeProperty here.
2744
2745 2007-05-25  Geoffrey Garen  <ggaren@apple.com>
2746
2747         Reviewed by Darin Adler.
2748
2749         Some cleanup to Cache while Fixing <rdar://problem/5055182> The page cache 
2750         has no global cap.
2751         
2752         * loader/Cache.cpp: Removed destructor to help identify this class as a
2753         singleton.
2754
2755         * loader/Cache.h: Made constructor and destructor private to match the
2756         singleton model of PageCache.
2757         
2758         Put structs related to Cache inside its declaration to fix some namespace
2759         conflicts I had while writing my patch. (They don't exist anymore, but
2760         I figured this might help future development.)
2761
2762 2007-05-24  Geoffrey Garen  <ggaren@apple.com>
2763
2764         Reviewed by Darin Adler.
2765
2766         Fixed a bug with Settings where a number of different objects held bare 
2767         Settings* data members, even though the Page owns the Settings object and 
2768         deletes it upon destruction.
2769
2770         Added NULL checks since the Page can be deleted before the frame/document.
2771
2772         * page/Settings.cpp: Removed reliance on setNeedsReapplyStylesForSettingsChange.
2773
2774         * css/cssstyleselector.cpp: CSSStyleSelector was the worst offender. It 
2775         held a number of back pointers that were not guaranteed. I removed the 
2776         Settings*, Frame*, and FrameView* back pointers, but others could probably 
2777         go, too. I replaced them with a single Document* pointer, which is guaranteed
2778         because the Document owns the CSSStyleSelector.
2779
2780         * page/Page.cpp: Removed setNeedsReapplyStylesForSettingsChange -- the 
2781         Settings object is now a proper subcontroller of Page, so it doesn't need
2782         to use a global table to find its page anymore. Also, this function
2783         confusingly implied that the Frames in a page can have heterogeneous settings,
2784         which is not true.
2785
2786 2007-05-25  David Hyatt  <hyatt@apple.com>
2787
2788         Make sure -webkit-border-fit accounts for padding as well as border.
2789
2790         Reviewed by aroben
2791
2792         * rendering/RenderBlock.cpp:
2793         (WebCore::RenderBlock::borderFitAdjust):
2794
2795 2007-05-25  David Hyatt  <hyatt@apple.com>
2796
2797         Rework line numbering (again).  This time I finally think I have
2798         it right for all the document.write insanity that can occur.
2799
2800         Reviewed by aroben
2801
2802         * html/HTMLParser.cpp:
2803         (WebCore::HTMLParser::reportErrorToConsole):
2804         * html/HTMLParserErrorCodes.cpp:
2805         (WebCore::htmlParserDocumentWriteMessage):
2806         * html/HTMLParserErrorCodes.h:
2807         * html/HTMLTokenizer.cpp:
2808         (WebCore::HTMLTokenizer::write):
2809         * html/HTMLTokenizer.h:
2810         (WebCore::HTMLTokenizer::lineNumberPtr):
2811         (WebCore::HTMLTokenizer::processingContentWrittenByScript):
2812         * platform/SegementedSring.cpp
2813         (WebCore::SegmentedString::setExcludeLineNumbers):
2814         * platform/SegmentedString.h:
2815         (WebCore::SegmentedSubstring::SegmentedSubstring):
2816         (WebCore::SegmentedSubstring::clear):
2817         (WebCore::SegmentedSubstring::excludeLineNumbers):
2818         (WebCore::SegmentedSubstring::setExcludeLineNumbers):
2819         (WebCore::SegmentedString::excludeLineNumbers):
2820         (WebCore::SegmentedString::advance):
2821
2822 2007-05-24  Geoffrey Garen  <ggaren@apple.com>
2823
2824         Reviewed by Adam Roben.
2825
2826         Added a debug-only CachedPage counter. This helped me track down an SVG 
2827         timer bug in my recent page cache work.
2828                 
2829         * history/CachedPage.cpp:
2830
2831 2007-05-24  David Hyatt  <hyatt@apple.com>
2832
2833         Improve <form> error reporting to catch <form>s inside table parts.
2834         Tweak the wording of some of the error messages to be a bit better.
2835
2836         Reviewed by olliej
2837
2838         * html/HTMLParser.cpp:
2839         (WebCore::HTMLParser::insertNode):
2840         (WebCore::HTMLParser::processCloseTag):
2841         (WebCore::HTMLParser::popBlock):
2842         * html/HTMLParserErrorCodes.cpp:
2843         (WebCore::htmlParserErrorMessageTemplate):
2844         * html/HTMLParserErrorCodes.h:
2845
2846 2007-05-24  Rob Buis  <buis@kde.org>
2847
2848         Reviewed by Hyatt.
2849
2850         http://bugs.webkit.org/show_bug.cgi?id=4104
2851         first-letter not updating style with hover
2852         http://bugs.webkit.org/show_bug.cgi?id=13169
2853         css-formatted first letter won't hide dynamically
2854
2855         Update first letter when RenderBlock::setStyle is called. 
2856
2857         * css/cssstyleselector.cpp:
2858         (WebCore::CSSStyleSelector::checkOneSelector):
2859         * dom/Document.cpp:
2860         (WebCore::Document::Document):
2861         (WebCore::Document::createElement):
2862         * dom/Document.h:
2863         (WebCore::Document::usesFirstLetterRules):
2864         (WebCore::Document::setUsesFirstLetterRules):
2865         * rendering/RenderBlock.cpp:
2866         (WebCore::RenderBlock::setStyle):
2867         (WebCore::RenderBlock::updateFirstLetter):
2868
2869 2007-05-24  Mitz Pettel  <mitz@webkit.org>
2870
2871         Reviewed by Darin.
2872
2873         - fix http://bugs.webkit.org/show_bug.cgi?id=13800
2874           REGRESSION: Moving a slider moves another unrelated slider
2875
2876         Test: fast/forms/slider-thumb-shared-style.html
2877
2878         RenderSlider mutates the thumb's style, therefore it must not be shared
2879         with another slider's thumb, a situation that could occur if the sliders
2880         themselves shared style.
2881
2882         * rendering/RenderSlider.cpp:
2883         (WebCore::RenderSlider::createThumbStyle): Always use a private copy for
2884         the thumb style.
2885
2886 2007-05-24  Adele Peterson  <adele@apple.com>
2887
2888         Reviewed by Darin.
2889
2890         Fix for <rdar://problem/5211921> Form values sometimes get transposed (iGoogle)
2891
2892         Test: fast/history/redirect-load-no-form-restoration.html
2893
2894         * history/HistoryItem.cpp:
2895         (WebCore::HistoryItem::setURL): Clear the document state when the url changes for a HistoryItem.
2896         (WebCore::HistoryItem::isCurrentDocument): Added. Compares the HistoryItem url to the document's url.  This might not be the best way to do this, but it works for now.
2897         * history/HistoryItem.h:
2898         * loader/FrameLoader.cpp: (WebCore::FrameLoader::saveDocumentState): Only set the document (and form) state if the document is current for the history item.
2899
2900 2007-05-24  Mitz Pettel  <mitz@webkit.org>
2901
2902         Reviewed by Adele.
2903
2904         - fix http://bugs.webkit.org/show_bug.cgi?id=13857
2905           REGRESSION: onChange function applied to select element executes twice when focus is set
2906
2907         Test: fast/forms/select-double-onchange.html
2908
2909         * html/HTMLSelectElement.cpp:
2910         (WebCore::HTMLSelectElement::menuListOnChange): Changed to update m_lastOnChangeIndex
2911         before dispatching the change event to avoid reentrancy.
2912
2913 2007-05-24  Darin Adler  <darin@apple.com>
2914
2915         Reviewed by Hyatt.
2916
2917         - fix <rdar://problem/5226451> REGRESSION (21618): Mail block quotes
2918           are missing the lines on the side
2919
2920         This patch fixes three problems:
2921
2922         1) makes the "skip canLoad check" boolean also skip the check
2923            that prevents any loads while the document is in provisional
2924            state; this is the proximate cause of the bug
2925
2926         * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::create):
2927         Don't check the frame's state if skipCanLoadCheck is true.
2928
2929         2) moves the "skip canLoad check" boolean to the Request object;
2930            the old implementation would cause that flag to affect the
2931            new request we served, which might not be the resource with
2932            that flag set
2933
2934         3) fixes error-handling code path that would leak requests
2935
2936         * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::updateFromElement):
2937         Pass false to the CachedImage constructor to indicate we are not making
2938         this object for the cache.
2939
2940         * loader/Cache.cpp:
2941         (WebCore::createResource): Pass true to the CachedImage constructor to
2942         indicate we are making this object for the cache.
2943         (WebCore::Cache::requestResource): Add new code that assumes the object
2944         will already have the inCache bit set, and that will delete the object
2945         and return 0 if the cache is disabled and the load failed.
2946
2947         * loader/CachedImage.h:
2948         * loader/CachedImage.cpp: (WebCore::CachedImage::CachedImage):
2949         Added a forCache boolean parameter. Always false for the constructor
2950         that's only used outside the cache code, and passed in as a boolean
2951         for the constructor that's used both in cache and outside cache.
2952
2953         * loader/CachedResource.h:
2954         * loader/CachedResource.cpp:
2955         (WebCore::CachedResource::CachedResource): Added a forCache boolean
2956         parameter that determines the initial state of the m_inCache flag.
2957         This is needed to prevent a resource from being destroyed if an
2958         error occurs during the initial load.
2959
2960         * loader/DocLoader.cpp:
2961         (WebCore::DocLoader::requestCSSStyleSheet): Added FIXME.
2962         (WebCore::DocLoader::setLoadInProgress): Added null check.
2963
2964         * loader/Request.h:
2965         * loader/Request.cpp: (WebCore::Request::Request):
2966         Added a shouldSkipCanLoadCheck boolean here, since we need to track
2967         this for each request.
2968
2969         * loader/loader.h:
2970         * loader/loader.cpp:
2971         (WebCore::Loader::load): Pass the skipCanLoadCheck boolean to the
2972         Request constructor rather than to the servePendingRequests function.
2973         (WebCore::Loader::servePendingRequests): Add a loop so we can handle
2974         cases where the request fails immediately without leaking the request
2975         and thinking that we're loading forever.
2976
2977 2007-05-24  David Hyatt  <hyatt@apple.com>
2978
2979         Add error reporting for residual style.
2980
2981         Reviewed by aroben
2982
2983         * html/HTMLParser.cpp:
2984         (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
2985         (WebCore::HTMLParser::reopenResidualStyleTags):
2986         * html/HTMLParserErrorCodes.cpp:
2987         (WebCore::htmlParserErrorMessageTemplate):
2988         * html/HTMLParserErrorCodes.h:
2989
2990 2007-05-24  David Hyatt  <hyatt@apple.com>
2991
2992         Report <script/> as a warning instead of an error for now, since we
2993         actually do close it.  (Sigh.)
2994
2995         Reviewed by beth
2996
2997         * html/HTMLParser.cpp:
2998         (WebCore::HTMLParser::parseToken):
2999         (WebCore::HTMLParser::reportErrorToConsole):
3000         * html/HTMLParserErrorCodes.cpp:
3001         (WebCore::htmlParserErrorMessageTemplate):
3002         (WebCore::isWarning):
3003         * html/HTMLParserErrorCodes.h:
3004
3005 2007-05-24  David Hyatt  <hyatt@apple.com>
3006
3007         Add error reporting for the </p> -> <p></p> quirk.
3008
3009         Add error reporting when a stray close tag is encountered with no
3010         corresponding open tag.
3011
3012         Reviewed by adele
3013
3014         * html/HTMLParser.cpp:
3015         (WebCore::HTMLParser::HTMLParser):
3016         (WebCore::HTMLParser::processCloseTag):
3017         (WebCore::HTMLParser::popBlock):
3018         * html/HTMLParser.h:
3019         (WebCore::HTMLParser::popBlock):
3020         * html/HTMLParserErrorCodes.cpp:
3021         (WebCore::htmlParserErrorMessageTemplate):
3022         * html/HTMLParserErrorCodes.h:
3023
3024 2007-05-24  Kevin McCullough  <kmccullough@apple.com>
3025
3026         Reviewed by.
3027
3028         - Rolling back change to fix the build until I have a good fix for data: urls.
3029
3030         * ChangeLog:
3031         * loader/FrameLoader.cpp:
3032         (WebCore::FrameLoader::load):
3033         (WebCore::FrameLoader::open):
3034         * platform/String.cpp:
3035
3036 2007-05-24  David Hyatt  <hyatt@apple.com>
3037
3038         Add two more error messages to the HTMLParser.
3039
3040         Report when the </br> -> <br> quirk is triggered.
3041
3042         Also report whenever the broken XML self-closing tag syntax is used on
3043         tags that can actually have an end tag (either optional or required).
3044
3045         Reviewed by aroben
3046
3047         * html/HTMLParser.cpp:
3048         (WebCore::HTMLParser::parseToken):
3049         * html/HTMLParserErrorCodes.cpp:
3050         (WebCore::htmlParserErrorMessageTemplate):
3051         * html/HTMLParserErrorCodes.h:
3052         (WebCore::):
3053         * html/HTMLTokenizer.cpp:
3054         (WebCore::HTMLTokenizer::parseTag):
3055         * html/HTMLTokenizer.h:
3056         (WebCore::Token::reset):
3057
3058 2007-05-24  Sam Weinig  <sam@webkit.org>
3059
3060         Reviewed by Anders.
3061
3062         Rename JSHTMLFrameSetCustom.cpp to JSHTMLFrameSetElementCustom.cpp
3063         for consistency.
3064
3065         * WebCore.xcodeproj/project.pbxproj:
3066         * bindings/js/JSHTMLFrameSetCustom.cpp: Removed.
3067         * bindings/js/JSHTMLFrameSetElementCustom.cpp: Added.
3068
3069 2007-05-24  David Hyatt  <hyatt@apple.com>
3070
3071         Fix for <rdar://problem/5208440> (13753)
3072
3073         REGRESSION: Raw text needs to be pulled outside of tables
3074
3075         Reviewed by aroben
3076
3077         * html/HTMLParser.cpp:
3078         (WebCore::HTMLParser::handleError):
3079         * html/HTMLTableColElement.cpp:
3080         (WebCore::HTMLTableColElement::checkDTD):
3081         * html/HTMLTableElement.cpp:
3082         (WebCore::HTMLTableElement::checkDTD):
3083         * html/HTMLTableRowElement.cpp:
3084         (WebCore::HTMLTableRowElement::checkDTD):
3085         * html/HTMLTableSectionElement.cpp:
3086         (WebCore::HTMLTableSectionElement::checkDTD):
3087
3088 2007-05-24  Mitz Pettel  <mitz@webkit.org>
3089
3090         Reviewed by Darin.
3091
3092         - fix http://bugs.webkit.org/show_bug.cgi?id=13837
3093           Separator in new <select> widget disappears when block element with border is in document.
3094
3095         Test: fast/forms/menulist-separator-painting.html
3096
3097         * platform/graphics/cg/GraphicsContextCG.cpp:
3098         (WebCore::GraphicsContext::drawConvexPolygon): Changed this function to
3099         actually do both filling and stroking when needed, even though all existing
3100         callers set the stroke to none.
3101         * rendering/RenderThemeMac.mm:
3102         (WebCore::RenderThemeMac::paintMenuListButton): Added calls to set the stroke
3103         style and thickness when painting the arrows and the separator.
3104
3105 2007-05-24  Timothy Hatcher  <timothy@apple.com>
3106
3107         Reviewed by Sam Weinig.
3108
3109         Remove the OBJC_NEW_PROPERTIES #ifdef and only export the new @property syntax.
3110
3111         * bindings/objc/DOMObject.h:
3112         * bindings/scripts/CodeGeneratorObjC.pm:
3113
3114 2007-05-24  Sam Weinig  <sam@webkit.org>
3115
3116         Reviewed by Anders.
3117
3118         Uncomment HTMLFramesSetElement constructor now that it exists.
3119
3120         * page/DOMWindow.idl:
3121
3122 2007-05-24  Anders Carlsson  <andersca@apple.com>
3123
3124         Try fixing the buildbot build.
3125         
3126         * loader/ImageDocument.cpp:
3127         (WebCore::ImageDocument::resizeImageToFit):
3128         (WebCore::ImageDocument::imageClicked):
3129
3130 2007-05-24  Sam Weinig  <sam@webkit.org>
3131
3132         Reviewed by Darin.
3133
3134         Patch for http://bugs.webkit.org/show_bug.cgi?id=13853
3135         Autogenerate the JS bindings for the HTMLFrameSetElement
3136
3137         * DerivedSources.make:
3138         * WebCore.pro:
3139         * WebCore.xcodeproj/project.pbxproj:
3140         * bindings/js/JSHTMLElementWrapperFactory.cpp:
3141         * bindings/js/JSHTMLFrameSetCustom.cpp: Added.
3142         (WebCore::JSHTMLFrameSetElement::canGetItemsForName):
3143         (WebCore::JSHTMLFrameSetElement::nameGetter):
3144         * bindings/js/kjs_html.cpp:
3145         (KJS::):
3146         (KJS::JSHTMLElement::classInfo):
3147         (KJS::JSHTMLElement::accessors):
3148         (KJS::JSHTMLElement::getOwnPropertySlot):
3149         * bindings/js/kjs_html.h:
3150         (KJS::JSHTMLElement::):
3151         * html/HTMLFrameSetElement.idl:
3152
3153 2007-05-24  Zack Rusin  <zrusin@trolltech.com>
3154
3155         Reviewed by andersca
3156
3157         Fixing check for incorrent font size - it should
3158         check fixed not normal.
3159
3160         * page/Settings.cpp:
3161         (WebCore::Settings::setDefaultFixedFontSize):
3162
3163 2007-05-24  Mitz Pettel  <mitz@webkit.org>
3164
3165         Speculative buildbot build fix.
3166
3167         * css/cssstyleselector.cpp:
3168         (WebCore::CSSStyleSelector::applyProperty):
3169
3170 2007-05-24  Adam Roben  <aroben@apple.com>
3171
3172         Made Chrome::addMessageToConsole more flexible
3173
3174         addMessageToConsole now takes two additional parameters to specify the
3175         message source (HTML, JS, CSS, XML) and level (error, warning, log). To
3176         maintain our old behavior, all current messages were given
3177         JSMessageSource and ErrorMessageLevel parameters. Messages matching
3178         these characteristics are passed up to the ChromeClient.
3179
3180         Reviewed by Hyatt.
3181
3182         * bindings/js/JSCustomXPathNSResolver.cpp:
3183         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
3184         * bindings/js/kjs_events.cpp:
3185         (KJS::JSAbstractEventListener::handleEvent):
3186         * bindings/js/kjs_proxy.cpp:
3187         (WebCore::KJSProxy::evaluate):
3188         * bindings/js/kjs_window.cpp:
3189         (KJS::Window::isSafeScript):
3190         (KJS::ScheduledAction::execute):
3191         * html/HTMLParser.cpp:
3192         (WebCore::HTMLParser::reportErrorToConsole):
3193         * ksvg2/misc/SVGDocumentExtensions.cpp:
3194         (WebCore::SVGDocumentExtensions::reportWarning):
3195         (WebCore::SVGDocumentExtensions::reportError):
3196         * loader/FrameLoader.cpp:
3197         (WebCore::FrameLoader::reportLocalLoadFailed):
3198         * page/Chrome.cpp:
3199         (WebCore::Chrome::addMessageToConsole):
3200         * page/Chrome.h:
3201         (WebCore::):
3202         * xml/xmlhttprequest.cpp:
3203         (WebCore::XMLHttpRequest::setRequestHeader):
3204
3205 2007-05-24  David Hyatt  <hyatt@apple.com>
3206
3207         Rework how HTML handles line numbering so that it is not fooled by
3208         \r without a following \n and so that document.write doesn't lead
3209         to line numbering confusion.
3210
3211         Reviewed by aroben
3212
3213         * html/HTMLParser.cpp:
3214         (WebCore::HTMLParser::reportErrorToConsole):
3215         * html/HTMLTokenizer.cpp:
3216         (WebCore::HTMLTokenizer::processListing):
3217         (WebCore::HTMLTokenizer::parseSpecial):
3218         (WebCore::HTMLTokenizer::parseComment):
3219         (WebCore::HTMLTokenizer::parseServer):
3220         (WebCore::HTMLTokenizer::parseProcessingInstruction):
3221         (WebCore::HTMLTokenizer::parseText):
3222         (WebCore::HTMLTokenizer::parseEntity):
3223         (WebCore::HTMLTokenizer::parseTag):
3224         (WebCore::HTMLTokenizer::write):
3225         (WebCore::HTMLTokenizer::processToken):
3226         (WebCore::HTMLTokenizer::setSrc):
3227         * html/HTMLTokenizer.h:
3228         (WebCore::HTMLTokenizer::lineNumberPtr):
3229         * html/HTMLViewSourceDocument.cpp:
3230         (WebCore::HTMLViewSourceDocument::addLine):
3231         * loader/TextDocument.cpp:
3232         (WebCore::TextTokenizer::write):
3233         * platform/SegmentedString.cpp:
3234         (WebCore::SegmentedString::SegmentedString):
3235         (WebCore::SegmentedString::operator=):
3236         (WebCore::SegmentedString::clear):
3237         * platform/SegmentedString.h:
3238         (WebCore::SegmentedString::SegmentedString):
3239         (WebCore::SegmentedString::advance):
3240         (WebCore::SegmentedString::escaped):
3241
3242 2007-05-23  David Hyatt  <hyatt@apple.com>
3243
3244         Make the delete/InsertRows/Cells methods as well as the rowIndex method
3245         able to work properly even when whitespace or comment nodes are present.
3246
3247         Reviewed by aroben
3248
3249         fast/table/rowindex-comment-nodes.html
3250
3251         * html/HTMLTableRowElement.cpp:
3252         (WebCore::HTMLTableRowElement::rowIndex):
3253         (WebCore::HTMLTableRowElement::insertCell):
3254         (WebCore::HTMLTableRowElement::deleteCell):
3255         * html/HTMLTableSectionElement.cpp:
3256         (WebCore::HTMLTableSectionElement::insertRow):
3257         (WebCore::HTMLTableSectionElement::deleteRow):
3258
3259 2007-05-23  David Hyatt  <hyatt@apple.com>
3260
3261         <optgroup> should allow <script> and text nodes inside it, just like
3262         <select> does.
3263
3264         Reviewed by aroben
3265
3266         fast/forms/stuff-on-my-optgroup.html
3267
3268         * html/HTMLOptGroupElement.cpp:
3269         (WebCore::HTMLOptGroupElement::checkDTD):
3270         * html/HTMLSelectElement.cpp:
3271         (WebCore::HTMLSelectElement::checkDTD):
3272
3273 2007-05-23  David Hyatt  <hyatt@apple.com>
3274
3275         Framesets should allow whitespace text nodes as children.
3276
3277         Reviewed by aroben
3278
3279         * html/HTMLFrameSetElement.cpp:
3280         (WebCore::HTMLFrameSetElement::checkDTD):
3281
3282 2007-05-24  Mark Rowe  <mrowe@apple.com>
3283
3284         Fix the Qt build after r21685.
3285
3286         * platform/qt/CursorQt.cpp:
3287         (WebCore::notAllowedCursor):
3288         (WebCore::zoomInCursor):
3289         (WebCore::zoomOutCursor):
3290
3291 2007-05-23  Alp Toker  <alp.toker@collabora.co.uk>
3292
3293         Reviewed by Adam.
3294
3295         Fix the gdk build following changes in r21685.
3296
3297         * platform/gdk/CursorGdk.cpp:
3298         (WebCore::zoomInCursor):
3299         (WebCore::zoomOutCursor):
3300
3301 2007-05-23  David Hyatt  <hyatt@apple.com>
3302
3303         Fix for <rdar://problem/5222611> REGRESSION: Paint ordering problems at
3304         http://buymeasoda.com/dev/issues/image_onload/image_onload.html
3305
3306         Clamp z-index so that values that exceed maxint (or that are below minint)
3307         are clamped to those values.
3308
3309         Reviewed by darin
3310
3311         * css/cssstyleselector.cpp:
3312         (WebCore::CSSStyleSelector::applyProperty):
3313
3314 2007-05-23  Mitz Pettel  <mitz@webkit.org>
3315
3316         Reviewed by David Hyatt.
3317
3318         - fix http://bugs.webkit.org/show_bug.cgi?id=13563
3319           REGRESSION: Crash loading message in Yahoo! Mail
3320
3321         Tests: fast/css/stale-style-selector-crash-1.html
3322                fast/css/stale-style-selector-crash-2.html
3323
3324         * dom/Document.cpp:
3325         (WebCore::Document::Document): Initialize the m_didCalculateStyleSelector
3326         flag to 'false'.
3327         (WebCore::Document::updateStyleSelector): Do not bail out if we have ever
3328         calculated a non-trivial style selector, even if at the moment we are
3329         pending style sheets. We could have calculated a non-trivial selector
3330         already either because at some point there were no pending style sheets
3331         (so the currently pending ones were added dynamically) or because we were
3332         forced to do a layout ignoring pending style sheets. Either way, once
3333         there is a style selector, we need to keep it up to date, otherwise we can
3334         crash under recalcStyle() during updateRendering() or simply not recalculate
3335         style correctly for dynamic changes.
3336         (WebCore::Document::recalcStyleSelector): Set m_didCalculateStyleSelector
3337         to 'true' when creating a new style selector.
3338         * dom/Document.h:
3339
3340 2007-05-23  Anders Carlsson  <andersca@apple.com>
3341
3342         Reviewed by Adam.
3343
3344         <rdar://problem/5224749> Show a zoom/unzoom cursor for resizable image documents
3345         
3346         * WebCore.xcodeproj/project.pbxproj:
3347         Install the zoom cursors.
3348         
3349         * loader/ImageDocument.cpp:
3350         (WebCore::ImageDocument::resizeImageToFit):
3351         Set the cursor to the zoom in cursor.
3352         
3353         (WebCore::ImageDocument::restoreImageSize):
3354         If the image fits, reset the cursor. Otherwise, set it to the zoom in cursor.
3355
3356 2007-05-23  Darin Adler  <darin@apple.com>
3357
3358         Reviewed by Hyatt.
3359
3360         - fix problems where unrendered nodes were affecting on plain text serialization
3361
3362         * editing/TextIterator.cpp:
3363         (WebCore::TextIterator::advance): Don't call handleXXX functions or exitNode for
3364         nodes without renderers.
3365         (WebCore::shouldEmitNewlineAfterNode): Only consider rendered nodes when deciding
3366         if this is the last node in the document.
3367
3368 2007-05-23  Anders Carlsson  <andersca@apple.com>
3369
3370         Reviewed by Geoff.
3371
3372         <rdar://problem/3663808> Resize large images to fit in the browser window
3373         
3374         * WebCore.exp:
3375         Add new settings method.
3376         
3377         * loader/ImageDocument.cpp:
3378         (WebCore::ImageEventListener::ImageEventListener):
3379         New class that handles resize events and click events and forwards them to the image document.
3380         
3381         (WebCore::ImageTokenizer::ImageTokenizer):
3382         (WebCore::ImageTokenizer::writeRawData):
3383         (WebCore::ImageTokenizer::finish):
3384         (WebCore::ImageDocument::ImageDocument):
3385         (WebCore::ImageDocument::createDocumentStructure):
3386         (WebCore::ImageDocument::cachedImage):
3387         Let the ImageDocument class keep track of its document structure.
3388         
3389         (WebCore::ImageDocument::scale):
3390         Returns the scale that should be used when resizing the image.
3391         
3392         (WebCore::ImageDocument::resizeImage):
3393         Update the image size.
3394         
3395         (WebCore::ImageDocument::imageClicked):
3396         Toggle between resized and not resized. When restoring the size, scroll the image so that the area under
3397         the mouse stays the same.
3398         
3399         (WebCore::ImageDocument::imageChanged):
3400         When the image size is known, resize the image if needed.
3401         
3402         (WebCore::ImageDocument::restoreImageSize):
3403         Restore the image size.
3404         
3405         (WebCore::ImageDocument::imageNeedsResizing):
3406         Return whether the image is too big for its window or not.
3407         
3408         (WebCore::ImageDocument::windowSizeChanged):
3409         Called when the window's size changes. Determine if the window fits or not and resize it if it doesn't fit.
3410         
3411         (WebCore::ImageEventListener::handleEvent):
3412         Forward events to the image document.
3413         
3414         * page/Settings.cpp:
3415         (WebCore::Settings::Settings):
3416         (WebCore::Settings::setEnableAutomaticImageResizing):
3417         * page/Settings.h:
3418         (WebCore::Settings::enableAutomaticImageResizing):
3419         Add new setting.
3420         
3421 2007-05-23  Anders Carlsson  <andersca@apple.com>
3422
3423         Reviewed by Darin.
3424
3425         Add -webkit-zoom-in and -webkit-zoom-out cursors.
3426         
3427         * Resources/zoomInCursor.png: Added.
3428         * Resources/zoomOutCursor.png: Added.
3429         * css/CSSComputedStyleDeclaration.cpp:
3430         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3431         * css/CSSValueKeywords.in:
3432         * page/EventHandler.cpp:
3433         (WebCore::selectCursor):
3434         * platform/Cursor.h:
3435         * platform/mac/CursorMac.mm:
3436         (WebCore::zoomInCursor):
3437         (WebCore::zoomOutCursor):
3438         * rendering/RenderStyle.h:
3439         (WebCore::):
3440
3441 2007-05-23  Sam Weinig  <sam@webkit.org>
3442
3443         Reviewed by Darin.
3444
3445         Part one of patch for http://bugs.webkit.org/show_bug.cgi?id=13830
3446         Auto-generate JS DOM bindings for HTMLDocument and most of the rest
3447         of HTMLElement
3448
3449         - Just the HTMLElement part.
3450
3451         * bindings/js/kjs_html.cpp:
3452         (KJS::JSHTMLElement::getValueProperty):
3453         (KJS::JSHTMLElement::putValueProperty):
3454         * bindings/js/kjs_html.h:
3455         (KJS::JSHTMLElement::):
3456         * html/HTMLElement.idl:
3457
3458 2007-05-22  Kevin McCullough  <kmccullough@apple.com>
3459
3460         Reviewed by Darin.
3461
3462         - rdar://problem/5183523
3463         - We now check the document's URL to see if it can load a resource in the case of a URL click, instead of checking the referrer, which is blank for local files.
3464
3465         * loader/FrameLoader.cpp:
3466         (WebCore::FrameLoader::load):
3467         (WebCore::FrameLoader::open):
3468         * platform/PlatformString.h:
3469         (WebCore::debugPrintString):
3470
3471 2007-05-23  Sam Weinig  <sam@webkit.org>
3472
3473         Reviewed by Darin.
3474
3475         Part two of patch for http://bugs.webkit.org/show_bug.cgi?id=13830
3476         Auto-generate JS DOM bindings for HTMLDocument and most of the rest
3477         of HTMLElement
3478
3479         - Just the HTMLDocument part.
3480
3481         * WebCore.pro:
3482         * WebCore.xcodeproj/project.pbxproj:
3483         * bindings/js/JSHTMLDocumentCustom.cpp: Added.
3484         (WebCore::JSHTMLDocument::canGetItemsForName):
3485         (WebCore::JSHTMLDocument::nameGetter):
3486         (WebCore::JSHTMLDocument::all):
3487         (WebCore::JSHTMLDocument::setAll):
3488         (WebCore::JSHTMLDocument::location):
3489         (WebCore::JSHTMLDocument::setLocation):
3490         (WebCore::JSHTMLDocument::open):
3491         (WebCore::writeHelper):
3492         (WebCore::JSHTMLDocument::write):
3493         (WebCore::JSHTMLDocument::writeln):
3494         (WebCore::JSHTMLDocument::clear):
3495         * bindings/js/kjs_dom.cpp:
3496         (KJS::toJS):
3497         * bindings/js/kjs_dom.h:
3498         * bindings/js/kjs_html.cpp:
3499         * bindings/js/kjs_html.h:
3500         * bindings/objc/DOMPrivate.h:
3501         * bindings/scripts/CodeGeneratorJS.pm: Add [Deletable] property
3502         for Document.all and fix HasOverridingNameGetter to allow correct
3503         prototype chain
3504         * dom/Document.cpp:
3505         (WebCore::Document::plugins): adds alias to embeds() for bindings
3506         * dom/Document.h:
3507         * html/HTMLDocument.cpp:
3508         (WebCore::HTMLDocument::width):
3509         (WebCore::HTMLDocument::height):
3510         (WebCore::HTMLDocument::dir):
3511         (WebCore::HTMLDocument::setDir):
3512         (WebCore::HTMLDocument::designMode):
3513         (WebCore::HTMLDocument::setDesignMode):
3514         (WebCore::HTMLDocument::bgColor):
3515         (WebCore::HTMLDocument::setBgColor):
3516         (WebCore::HTMLDocument::fgColor):
3517         (WebCore::HTMLDocument::setFgColor):
3518         (WebCore::HTMLDocument::alinkColor):
3519         (WebCore::HTMLDocument::setAlinkColor):
3520         (WebCore::HTMLDocument::linkColor):
3521         (WebCore::HTMLDocument::setLinkColor):
3522         (WebCore::HTMLDocument::vlinkColor):
3523         (WebCore::HTMLDocument::setVlinkColor):
3524         (WebCore::HTMLDocument::captureEvents):
3525         (WebCore::HTMLDocument::releaseEvents):
3526         * html/HTMLDocument.h:
3527         * html/HTMLDocument.idl:
3528
3529 2007-05-23  David Hyatt  <hyatt@apple.com>
3530
3531         Fix for <rdar://problem/5221838> REGRESSION (r21581): no content in idisk
3532         window at mac.com.
3533
3534         Back out the change to make self-closed <script/> into a Dashboard quirk
3535         only.
3536
3537         Reviewed by aroben
3538
3539         * html/HTMLTokenizer.cpp:
3540         (WebCore::HTMLTokenizer::parseTag):
3541
3542 2007-05-23  Patti  <patti@apple.com>
3543
3544         Reviewed by David Harrison.
3545
3546         <rdar://problem/5078453> AXNext/PrevLineEndTextMarkerForTextMarker returns kAXErrorNoValue for attachment range
3547         
3548         Floating objects, such as aligned images, are not included as part of any line.  So when the given 
3549         text marker is on the floating object, the returned line edge cannot be found and asserts are fired.
3550         In addition, this paints an inconsistent text layout (in the accessibility sense) of where the floating 
3551         object resides.  Character/word methods report floating object at the beginning of the text line(s).  Yet
3552         line methods never present floating objects anywhere.  
3553         To fix this, the ax line methods will now do more checking to ensure floating object nodes are included
3554         when determining the line range/position. That way, assistive apps won't get stuck using the line methods 
3555         to read line-by-line
3556
3557         * bridge/mac/WebCoreAXObject.mm:
3558         (updateAXLineStartForVisiblePosition):
3559         Added a helper method to adjust line start position to account for floating objects
3560         (-[WebCoreAXObject doAXLeftLineTextMarkerRangeForTextMarker:]):
3561         (-[WebCoreAXObject doAXRightLineTextMarkerRangeForTextMarker:]):
3562         (-[WebCoreAXObject doAXNextLineEndTextMarkerForTextMarker:]):
3563         (-[WebCoreAXObject doAXPreviousLineStartTextMarkerForTextMarker:]):
3564         Fixed up line routines to include floating object nodes in line position calculation.
3565         startOfLine/endOLine may return null for position next to a floating position.  So now there's extra checks to prevent
3566         returning null line position/ranges back to AX.
3567
3568
3569 2007-05-23  Simon Hausmann  <hausmann@kde.org>
3570
3571         Reviewed by Zack, discussed also with Lars.
3572
3573         Make it possible to have per-QWebPage network interface
3574         implementations.
3575
3576         * platform/network/qt/ResourceHandleQt.cpp:
3577         (WebCore::ResourceHandle::start): Pass the page's network interface to
3578         the network manager.
3579
3580 2007-05-23  Rob Buis  <buis@kde.org>
3581
3582         Reviewed by Dave Hyatt.
3583
3584         http://bugs.webkit.org/show_bug.cgi?id=13174
3585         line-height in font shorthand does not override a previously stated line-height property
3586
3587         Make sure line-height is calculated against definite font-size and
3588         uses the last set line-height, ie. directly or through font shorthand.
3589
3590         * css/cssstyleselector.cpp:
3591         (WebCore::CSSStyleSelector::styleForElement):
3592         (WebCore::CSSStyleSelector::pseudoStyleForElement):
3593         (WebCore::CSSStyleSelector::applyDeclarations):
3594         (WebCore::CSSStyleSelector::applyProperty):
3595         * css/cssstyleselector.h:
3596
3597 2007-05-23  Lars Knoll <lars@trolltech.com>
3598
3599         Reviewed by Zack and Valgrind
3600
3601         Initialize variable.
3602
3603         * platform/qt/PlatformMouseEventQt.cpp:
3604         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
3605
3606 2007-05-23  Rob Buis  <buis@kde.org>
3607
3608         Reviewed by Darin.
3609
3610         http://bugs.webkit.org/show_bug.cgi?id=13784
3611         REGRESSION (r13744-13750): Crash with empty gradient when drawing to canvas
3612
3613         Fix crash by testing for zero stops, and returning transparent black
3614         in this case.
3615
3616         * html/CanvasGradient.cpp:
3617         (WebCore::CanvasGradient::getColor):
3618
3619 2007-05-23  Rob Buis  <buis@kde.org>
3620
3621         Reviewed by Darin.
3622
3623         http://bugs.webkit.org/show_bug.cgi?id=13801
3624         Crash when loading nonexisting symbol
3625
3626         Check for referenced element and when not found just return.
3627
3628         * ksvg2/svg/SVGUseElement.cpp:
3629         (WebCore::SVGUseElement::buildPendingResource):
3630
3631 2007-05-22  Sam Weinig  <sam@webkit.org>
3632
3633         Rubber stamped by Adam.
3634
3635         Fix license.
3636
3637         * bindings/js/JSHTMLAnchorElementCustom.cpp:
3638
3639 2007-05-22  Sam Weinig  <sam@webkit.org>
3640
3641         Reviewed by Adam.
3642
3643         Patch for http://bugs.webkit.org/show_bug.cgi?id=13833
3644         Add ObjC DOM binding for HTMLMarqeeElement
3645
3646         - Also adds missing DOMHTMLFramePrivate.
3647
3648         * DerivedSources.make:
3649         * WebCore.xcodeproj/project.pbxproj:
3650         * bindings/objc/DOM.mm:
3651         (WebCore::createElementClassMap):
3652         * bindings/objc/DOMHTML.h:
3653         * bindings/objc/DOMInternal.h:
3654         * bindings/objc/DOMPrivate.h:
3655         * bindings/objc/PublicDOMInterfaces.h:
3656
3657 2007-05-22  Justin Garcia  <justin.garcia@apple.com>
3658
3659         Reviewed by darin, who found the fix independently.
3660
3661         http://bugs.webkit.org/show_bug.cgi?id=13804
3662         REGRESSION(r21611): Several new layout test pixel failures (misspelling markers)
3663         
3664         r21611 exposed a bug in the way removeMarkers computes
3665         the end of the range to remove markers from.  It also
3666         introduced a bug: removeMarkers expects a startOffset
3667         and a length, not a startOffset and an endOffset (added 
3668         a layout test).
3669
3670         * dom/Document.cpp:
3671         (WebCore::Document::removeMarkers): The other removeMarkers
3672         expects a startOffset and a length, not a startOffset and
3673         an endOffset.
3674         (WebCore::Document::removeMarkers): Fixed the endOffset
3675         from length and startOffset calculation.
3676
3677 2007-05-22  David Hyatt  <hyatt@apple.com>
3678
3679         Fix for bug 13802, background colors can't be reset to default
3680         color.  Fix the value cssText method to do the right thing for background
3681         and background-position values.
3682
3683         Reviewed by beth
3684
3685         fast/dom/background-shorthand-csstext.html
3686
3687         * css/CSSInitialValue.h:
3688         (WebCore::CSSInitialValue:::m_implicit):
3689         (WebCore::CSSInitialValue::isImplicitInitialValue):
3690         * css/CSSMutableStyleDeclaration.cpp:
3691         (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
3692         (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue):
3693         * css/CSSMutableStyleDeclaration.h:
3694         * css/CSSValue.h:
3695         (WebCore::CSSValue::isImplicitInitialValue):
3696         * css/cssparser.cpp:
3697         (WebCore::CSSParser::parseValue):
3698         (WebCore::CSSParser::parseBackgroundShorthand):
3699         (WebCore::CSSParser::parseShorthand):
3700
3701 2007-05-22  Darin Adler  <darin@apple.com>
3702
3703         Reviewed by Geoff.
3704
3705         - fix <rdar://problem/5215830> REGRESSION: ebay.com layout is wrong
3706
3707         The code on ebay was looking for the "document" property on a iframe.
3708         We changed that to be the ownerDocument rather than the contentDocument,
3709         which was not what ebay was expecting. The best fix seems to be removing
3710         the document property altogether.
3711
3712         Test: fast/dom/iframe-document.html
3713
3714         * bindings/js/kjs_html.h: Remove ElementDocument.
3715         * bindings/js/kjs_html.cpp: (KJS::JSHTMLElement::getValueProperty): Ditto.
3716
3717 2007-05-22  Adele Peterson  <adele@apple.com>
3718
3719         Reviewed by Darin.
3720
3721         A little cleanup from my last checkin.
3722
3723         * page/Chrome.h: Formatting change.
3724         * page/mac/ChromeMac.mm: Fixed copyright.
3725
3726 2007-05-22  Adele Peterson  <adele@apple.com>
3727
3728         Reviewed by Darin.
3729
3730         Fix for http://bugs.webkit.org/show_bug.cgi?id=13796
3731         Crash in [NSInputContext currentInputContext] when you click on this map
3732
3733         This is another case of <rdar://problem/5171145> Safari crashed closing tab in NSInputContext updateInputContexts
3734
3735         Test: fast/frames/frame-display-none-focus.html
3736
3737         * WebCore.xcodeproj/project.pbxproj: Added ChromeMac.mm
3738         * page/Chrome.h:
3739         * page/mac/ChromeMac.mm: Added.
3740         (WebCore::Chrome::focusNSView): Moved code from Widget::setFocus so it can be used whenever we need to make a view the first responder.
3741         * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::focusDocumentView): Calls focusNSView.
3742         * platform/mac/WidgetMac.mm: (WebCore::Widget::setFocus): Calls focusNSView.
3743
3744 2007-05-22  Justin Garcia  <justin.garcia@apple.com>
3745
3746         Reviewed by darin
3747         
3748         <rdar://problem/4875189> 
3749         List is deleted when replacing contents with Chinese/Japanese characters
3750
3751         * editing/htmlediting.cpp:
3752         (WebCore::isSpecialElement): Lists are no longer special.
3753         They can be removed by removing their content and then 
3754         then hitting delete inside of the empty list item that's 
3755         left over. Even when that list item is the first thing 
3756         in the editable region.
3757
3758 2007-05-22  Darin Adler  <darin@apple.com>
3759
3760         Reviewed by Tim Hatcher.
3761
3762         - fix <rdar://problem/5206089> REGRESSION: hovering over amazon.com "product categories"
3763           tab makes page content disappear
3764
3765         The contentWindow property was doing a cross-frame security check, but it shouldn't.
3766         Window objects are responsible for protecting themselves from cross-frame activity.
3767         Because contentWindow returned undefined, we then ended up setting visibility on the
3768         body of the main frame to "hidden".
3769
3770         No layout test yet. When we make cross-domain tests, we should include this one.
3771
3772         * html/HTMLFrameElement.idl: Removed CheckFrameSecurity attribute from contentWindow.
3773         * html/HTMLIFrameElement.idl: Ditto.
3774
3775 2007-05-22  Justin Garcia  <justin.garcia@apple.com>
3776
3777         Reviewed by oliver
3778
3779         <rdar://problem/5213963>
3780         REGRESSION(r21467): Active selection remains in text field after clicking on a button
3781
3782         * page/EventHandler.cpp:
3783         (WebCore::EventHandler::dispatchMouseEvent): Call
3784         FocusController::setFocusedNode, because Document::setFocusedNode
3785         no longer clears the selection.
3786         Begin passing the new focused frame to 
3787         FocusController::setFocusedNode, because when the 
3788         new focus node is null, the selection should only be 
3789         cleared if the focused frame isn't changing.
3790         (WebCore::Element::focus): Begin passing the new focused
3791         frame.
3792         (WebCore::Element::blur): Ditto.
3793         * html/HTMLInputElement.cpp:
3794         (WebCore::HTMLInputElement::focus): Ditto.
3795         * html/HTMLTextAreaElement.cpp:
3796         (WebCore::HTMLTextAreaElement::focus): Ditto.
3797         * page/Frame.cpp:
3798         (WebCore::Frame::setFocusedNodeIfNeeded): Ditto.
3799         * page/FocusController.cpp:
3800         (WebCore::clearSelectionIfNeeded): Take in the new
3801         focused frame.  If it's not changing, don't clear the
3802         selection.
3803         (WebCore::FocusController::setFocusedNode): Take
3804         in the new focused frame.
3805         * page/FocusController.h:
3806
3807 2007-05-22  Marius Bugge Monsen  <mbm@trolltech.com>
3808
3809         Reviewed by Zack.
3810
3811         Implement some more functions in ClipboardQt.
3812
3813         * platform/qt/ClipboardQt.cpp:
3814         (WebCore::ClipboardQt::ClipboardQt):
3815         (WebCore::ClipboardQt::getData):
3816         (WebCore::ClipboardQt::setData):
3817         (WebCore::ClipboardQt::types):
3818
3819 2007-05-21  Oliver Hunt  <oliver@apple.com>
3820
3821         Reviewed by Sam.
3822         
3823         Fix for http://bugs.webkit.org/show_bug.cgi?id=13789 
3824         -- SVGLocatable::getScreenCTM() faulty
3825         
3826         Needed to update SVGLength to handle the case where the SVGElement is
3827         not the root document element -- we do this by falling back on the 
3828         renderer for the context.
3829         
3830         For <svg> elements embedded as mixed content in xhtml we consider the
3831         absolutePosition of the parent to be the origin for the <svg> element.
3832
3833         * ksvg2/svg/SVGLength.cpp:
3834         (WebCore::SVGLength::PercentageOfViewport):
3835         * ksvg2/svg/SVGSVGElement.cpp:
3836         (WebCore::SVGSVGElement::getScreenCTM):
3837
3838 2007-05-21  Timothy Hatcher  <timothy@apple.com>
3839
3840         Reviewed by Adam.
3841
3842         <rdar://problem/5084400> -[DOMRange lineBoxRects] returns an empty array when the DOM nodes have just been created
3843
3844         Do a updateLayoutIgnorePendingStylesheets before asking the Node or Range for it's box rects.
3845
3846         * bindings/objc/DOM.mm:
3847         (-[DOMNode boundingBox]):
3848         (-[DOMNode lineBoxRects]):
3849         (-[DOMRange boundingBox]):
3850         (-[DOMRange lineBoxRects]):
3851
3852 2007-05-21  Sam Weinig  <sam@webkit.org>
3853
3854         Reviewed by George Staikos.
3855
3856         Fix Qt build.
3857
3858         * WebCore.pro: add missing IDL files.
3859
3860 2007-05-21  Sam Weinig  <sam@webkit.org>
3861
3862         Reviewed by Darin.
3863
3864         Patch for http://bugs.webkit.org/show_bug.cgi?id=13803
3865         Autogenerate the JS bindings for the HTMLMarqueeElement.
3866
3867         * DerivedSources.make:
3868         * WebCore.xcodeproj/project.pbxproj:
3869         * bindings/js/JSHTMLElementWrapperFactory.cpp:
3870         * bindings/js/kjs_css.cpp:
3871         (KJS::DOMCSSRule::getOwnPropertySlot): Fix possible null pointer issue.
3872         (KJS::DOMCSSRule::put): Fix possible null pointer issue.
3873         * bindings/js/kjs_html.cpp:
3874         (KJS::):
3875         (KJS::JSHTMLElement::classInfo):
3876         (KJS::JSHTMLElement::accessors):
3877         (KJS::JSHTMLElement::getOwnPropertySlot): Fix null pointer issue.
3878         (KJS::HTMLElementFunction::callAsFunction):
3879         (KJS::JSHTMLElement::put):
3880         * bindings/js/kjs_html.h:
3881         (KJS::JSHTMLElement::):
3882         * html/HTMLMarqueeElement.cpp:
3883         (WebCore::HTMLMarqueeElement::start):
3884         (WebCore::HTMLMarqueeElement::stop):
3885         * html/HTMLMarqueeElement.h: Add start() and stop() functions.
3886         * html/HTMLMarqueeElement.idl: Added.
3887         * page/DOMWindow.idl: Add marquee constructor.
3888
3889 2007-05-21  Adele Peterson  <adele@apple.com>
3890
3891         Fix by Darin, reviewed by me.
3892
3893         Fix for <rdar://problem/5171145> Safari crashed closing tab in NSInputContext updateInputContexts
3894
3895         * platform/mac/WidgetMac.mm:
3896         (WebCore::safeRemoveFromSuperview): Added. If the view is the window's first responder, then 
3897          set the window's first responder to nil so we don't leave the window pointing to a view that's no longer in it.
3898         (WebCore::Widget::setFocus): Don't attempt to focus the view if it has no window.
3899         (WebCore::Widget::removeFromSuperview): Call safeRemoveFromSuperview.
3900         (WebCore::Widget::afterMouseDown): ditto.
3901
3902 2007-05-21  David Hyatt  <hyatt@apple.com>
3903
3904         Make a line gutter backdrop so that tiny view source docs don't look
3905         bad.
3906
3907         Reviewed by aroben
3908
3909         * css/view-source.css:
3910         * html/HTMLViewSourceDocument.cpp:
3911         (WebCore::HTMLViewSourceDocument::createContainingTable):
3912
3913 2007-05-21  David Hyatt  <hyatt@apple.com>
3914
3915         Make sure to distinguish between links to internal resources and
3916         real links (anchors) in view source mode.
3917
3918         Reviewed by aroben
3919
3920         * css/view-source.css:
3921         * html/HTMLViewSourceDocument.cpp:
3922         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
3923         (WebCore::HTMLViewSourceDocument::addLink):
3924         * html/HTMLViewSourceDocument.h:
3925
3926 2007-05-21  Sam Weinig  <sam@webkit.org>
3927
3928         Reviewed by Adam and Darin.
3929
3930         Patch for http://bugs.webkit.org/show_bug.cgi?id=13791
3931         Autogenerate the JS bindings for the HTMLIFrameElement and HTMLFrameElement.
3932
3933         * DerivedSources.make:
3934         * WebCore.xcodeproj/project.pbxproj:
3935         * bindings/js/JSHTMLAnchorElementCustom.cpp:
3936         * bindings/js/JSHTMLElementWrapperFactory.cpp:
3937         * bindings/js/kjs_html.cpp:
3938         (KJS::):
3939         (KJS::JSHTMLElement::classInfo):
3940         (KJS::JSHTMLElement::accessors):
3941         (KJS::HTMLElementFunction::callAsFunction):
3942         * bindings/js/kjs_html.h:
3943         (KJS::JSHTMLElement::):
3944         * bindings/scripts/CodeGeneratorJS.pm:
3945         * html/HTMLFrameElement.idl:
3946         * html/HTMLFrameElementBase.cpp:
3947         (WebCore::HTMLFrameElementBase::location):
3948         * html/HTMLFrameElementBase.h:
3949         * html/HTMLFrameOwnerElement.h:
3950         (WebCore::HTMLFrameOwnerElement::contentWindow):
3951         * html/HTMLIFrameElement.idl:
3952         * page/DOMWindow.idl:
3953
3954 2007-05-21  Lars Knoll <lars@trolltech.com>
3955
3956         Reviewed by Zack.
3957
3958         Remove the ResourceHandleManager class, it is now part of 
3959         QWebNetworkInterface. Adapt ResourceHandle to the new way 
3960         of things.
3961
3962         * WebCore.pro:
3963         * platform/network/ResourceHandleInternal.h:
3964         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
3965         * platform/network/qt/ResourceHandleManagerKDE.cpp: Removed.
3966         * platform/network/qt/ResourceHandleManagerKDE.h: Removed.
3967         * platform/network/qt/ResourceHandleManagerQt.cpp: Removed.
3968         * platform/network/qt/ResourceHandleManagerQt.h: Removed.
3969         * platform/network/qt/ResourceHandleQt.cpp:
3970         (WebCore::ResourceHandle::~ResourceHandle):
3971         (WebCore::ResourceHandle::start):
3972         (WebCore::ResourceHandle::cancel):
3973
3974 2007-05-21  David Hyatt  <hyatt@apple.com>
3975
3976         Second half of fix for 13793, make sure rules=groups works properly with
3977         spanning colgroups.
3978
3979         Also make sure colgroups get an actual span of 1 (instead of incorrectly
3980         giving them a span of 0).
3981
3982         Reviewed by mitz
3983
3984         fast/table/colgroup-spanning-groups-rules.html
3985
3986         * html/HTMLTableColElement.cpp:
3987         (WebCore::HTMLTableColElement::HTMLTableColElement):
3988         * rendering/RenderTable.cpp:
3989         (WebCore::RenderTable::colElement):
3990         * rendering/RenderTable.h:
3991         * rendering/RenderTableCell.cpp:
3992         (WebCore::RenderTableCell::collapsedLeftBorder):
3993         (WebCore::RenderTableCell::collapsedRightBorder):
3994
3995 2007-05-20  David Hyatt  <hyatt@apple.com>
3996
3997         Half of a fix for 13793, make sure rules=groups and border behave properly
3998         together.
3999
4000         Reviewed by mitz
4001
4002         No tests added, two Mozilla table tests now pass that failed before.
4003
4004         * html/HTMLTableElement.cpp:
4005         (WebCore::HTMLTableElement::getSharedCellDecl):
4006
4007 2007-05-20  Brady Eidson <beidson@apple.com>
4008
4009         Reviewed by Geoose Garen
4010
4011         <rdar://problem/4758919> - Incorrect favicon shown for URL after going back
4012
4013         When restoring a cached page, we'd try to kick off the icon load for it, which ended up causing 
4014         shenanigans with the icon url -> page url mapping.  
4015
4016         * loader/FrameLoader.cpp:
4017         (WebCore::FrameLoader::endIfNotLoading): Only try an icon load if we're not restoring from the page cache
4018         (WebCore::FrameLoader::startIconLoader): Added helpful logging that helped me track this down
4019         (WebCore::FrameLoader::commitIconURLToIconDatabase): Ditto (and fixed a comment typo)
4020
4021         * loader/icon/IconLoader.cpp:
4022         (WebCore::IconLoader::stopLoading): Don't null out the ResourceLoader here, as clearLoadingState() does that
4023         (WebCore::IconLoader::finishLoading): Added helpful logging that helped me track this down
4024
4025
4026 2007-05-20  Darin Adler  <darin@apple.com>
4027
4028         Reviewed by Oliver Hunt.
4029
4030         - fix <rdar://problem/5193416> REGRESSION: Selection on large pages extremely slow
4031
4032         * dom/Document.cpp: (WebCore::Document::removeMarkers): Added an early exit for the common
4033         case where there are no markers. Changed code to iterate over all the nodes in the range
4034         instead of using TextIterator, which is more efficient.
4035         
4036         * page/Frame.cpp: (WebCore::Frame::respondToChangedSelection): Added checks for editable,
4037         so we don't bother doing work related to spell checking and grammar checking when changing
4038         the selection in non-editable text. Also rearranged the code so we only compute the old
4039         word boundaries and sentence boundaries when actually needed, and don't do the sentence
4040         range checks unless grammar checking is enabled.
4041
4042         * platform/TextBreakIteratorICU.cpp:
4043         (WebCore::setUpIterator): Don't take a locale parameter. Always pass in currentTextBreakLocaleID.
4044         (WebCore::characterBreakIterator): Removed local parameter.
4045         (WebCore::wordBreakIterator): Ditto.
4046         (WebCore::lineBreakIterator): Ditto.
4047         (WebCore::sentenceBreakIterator): Ditto.
4048
4049         * platform/mac/TextBreakIteratorInternalICUMac.mm:
4050         (WebCore::getTextBreakLocale): Broke out the code to actually get the locale.
4051         (WebCore::currentTextBreakLocaleID): This function now handles only the caching and calls
4052         getTextBreakLocale to actually figure it out.
4053
4054         * editing/visible_units.cpp: Added lots of FIXME comments, but no code change.
4055
4056 2007-05-20  Adam Treat  <adam@staikos.net>
4057
4058         Add -f to cp to deal with some obscure build environments.
4059
4060         Reviewed by George Staikos.
4061
4062         * move-js-headers.sh:
4063
4064 2007-05-20  Adam Treat  <adam@staikos.net>
4065
4066         Add missing include for auto_ptr
4067
4068         Reviewed by George Staikos.
4069
4070         * platform/graphics/ImageBuffer.h:
4071
4072 2007-05-19  David Hyatt  <hyatt@apple.com>
4073
4074         Fix for bug 13785, O(n^2) counter creation.
4075
4076         Reviewed by darin
4077
4078         * rendering/RenderCounter.cpp:
4079         (WebCore::findPlaceForCounter):
4080         (WebCore::RenderCounter::originalText):
4081
4082 2007-05-19  Mitz Pettel  <mitz@webkit.org>
4083
4084         Reviewed by Dave Hyatt.
4085
4086         - fix http://bugs.webkit.org/show_bug.cgi?id=12729
4087           box-shadow disappears when scrolling a div that it falls on/under
4088
4089         Tests: fast/repaint/box-shadow-dynamic.html
4090                fast/repaint/box-shadow-h.html
4091                fast/repaint/box-shadow-v.html
4092
4093         * rendering/InlineFlowBox.cpp:
4094         (WebCore::InlineFlowBox::placeBoxesHorizontally): Factor in box shadow.
4095         (WebCore::InlineFlowBox::placeBoxesVertically): Ditto.
4096         (WebCore::InlineFlowBox::paint): Account for box shadow when checking if
4097         the damage rect intersects.
4098         * rendering/RenderBlock.cpp:
4099         (WebCore::RenderBlock::overflowHeight): For overflow areas, when asked
4100         for the "exterior" overflow, add box shadow overflow.
4101         (WebCore::RenderBlock::overflowWidth): Ditto.
4102         (WebCore::RenderBlock::overflowLeft): Ditto.
4103         (WebCore::RenderBlock::overflowTop): Ditto.
4104         (WebCore::RenderBlock::overflowRect): Ditto.
4105         (WebCore::RenderBlock::layoutBlock): Factor box shadow into visual overflow.
4106         * rendering/RenderFlexibleBox.cpp:
4107         (WebCore::RenderFlexibleBox::layoutBlock): Ditto.
4108         * rendering/RenderFlow.cpp:
4109         (WebCore::RenderFlow::lowestPosition): For overflow areas, when asked for
4110         the "exterior" extreme position, add box shadow.
4111         (WebCore::RenderFlow::rightmostPosition): Ditto.
4112         (WebCore::RenderFlow::leftmostPosition): Ditto.
4113         * rendering/RenderLayer.cpp:
4114         (WebCore::RenderLayer::calculateRects): Avoid clipping out box shadow.
4115         * rendering/RenderObject.cpp:
4116         (WebCore::RenderObject::repaintAfterLayoutIfNeeded): Make sure to paint
4117         the box shadow when an edge with a shadow moves.
4118         (WebCore::RenderObject::adjustRectForOutlineAndShadow): Helper function
4119         that expands a given rectangle to encompass outline and box shadow.
4120         (WebCore::RenderObject::absoluteOutlineBox): Changed to include box shadow.
4121         * rendering/RenderObject.h:
4122
4123 2007-05-19  Mitz Pettel  <mitz@webkit.org>
4124
4125         Reviewed by Dave Hyatt.
4126
4127         - fix http://bugs.webkit.org/show_bug.cgi?id=13783
4128           REGRESSION (r21120): Frame resizers not repainted properly when dragged
4129
4130         * rendering/RenderFrameSet.cpp:
4131         (WebCore::RenderFrameSet::layout):
4132
4133 2007-05-19  Mitz Pettel  <mitz@webkit.org>
4134
4135         Reviewed by Darin.
4136
4137         - fix http://bugs.webkit.org/show_bug.cgi?id=13774
4138           REGRESSION: Crash emailing blog entry using Google Reader
4139
4140         Test: fast/table/stale-grid-crash.html
4141
4142         * rendering/RenderTable.cpp:
4143         (WebCore::RenderTable::recalcSections): Made const and replaced
4144         setNeedsLayout(true) with an assertion that the table is already
4145         marked for layout.
4146         (WebCore::RenderTable::sectionAbove): Added call to recalcSectionsIfNeeded().
4147         (WebCore::RenderTable::sectionBelow): Ditto.
4148         (WebCore::RenderTable::cellAbove): Ditto.
4149         (WebCore::RenderTable::cellBelow): Ditto.
4150         (WebCore::RenderTable::cellBefore): Ditto.
4151         (WebCore::RenderTable::cellAfter): Ditto.
4152         * rendering/RenderTable.h:
4153         Made some private member variables which are used in section recalc mutable.
4154         (WebCore::RenderTable::setNeedsSectionRecalc): Moved the call to
4155         setNeedsLayout() from recalcSections() into here, because I made
4156         recalcSections() const.
4157         (WebCore::RenderTable::recalcSectionsIfNeeded): Made const.
4158
4159 2007-05-19  Mitz Pettel  <mitz@webkit.org>
4160
4161         Reviewed by Darin.
4162
4163         - http://bugs.webkit.org/show_bug.cgi?id=13320
4164           rounded corners with drop shadows are really slow
4165
4166         Test for a rendering bug fixed by this patch:
4167             fast/box-shadow/border-radius-big.html
4168
4169         No test for the performance ingredient.
4170
4171         * platform/graphics/GraphicsContext.cpp:
4172         (WebCore::GraphicsContext::addRoundedRectClip): Made cross-platform.
4173         Changed to use a single clipping path. If all the radii cannot be
4174         accommodated, clips to a rect.
4175         (WebCore::GraphicsContext::clipOutRoundedRect): Changed to use a single
4176         clipping path. If all the radii cannot be accommodated, clips out a rect.
4177         * platform/graphics/GraphicsContext.h: Added clipOut(const Path&).
4178         * platform/graphics/Path.cpp:
4179         (WebCore::Path::createRoundedRectangle): Added. Returns a rounded rectangle
4180         with the specified radii. If all the radii cannot be accommodated, returns
4181         a rectangular path.
4182         * platform/graphics/Path.h:
4183         * platform/graphics/cairo/GraphicsContextCairo.cpp:
4184         (WebCore::GraphicsContext::clipOut): Added.
4185         * platform/graphics/cg/GraphicsContextCG.cpp:
4186         (WebCore::GraphicsContext::fillRoundedRect): Changed to use a single path.
4187         (WebCore::GraphicsContext::clipOut): Added.
4188         * platform/graphics/qt/GraphicsContextQt.cpp:
4189         (WebCore::GraphicsContext::clipOut): Added.
4190
4191 2007-05-19  Anders Carlsson  <andersca@apple.com>
4192
4193         Reviewed by Mitz.
4194
4195         Test: fast/frames/inline-object-inside-frameset.html
4196         
4197         http://bugs.webkit.org/show_bug.cgi?id=13771
4198         Assertion failure ASSERT(m_layer) when running Hamachi fuzz tester
4199
4200         Don't paint inline objects.
4201         
4202         * rendering/RenderFrameSet.cpp:
4203         (WebCore::RenderFrameSet::paint):
4204
4205 2007-05-19  David Hyatt  <hyatt@apple.com>
4206
4207         Add support for plain text MIME types (CSS/JS/TXT) to view source mode.
4208         CSS/JS will eventually tokenize via their own special tokenizers so that
4209         they can also be syntax-highlighted, but for now just treat them as
4210         plain text.
4211
4212         Reviewed by aroben
4213
4214         * dom/DOMImplementation.cpp:
4215         (WebCore::DOMImplementation::createDocument):
4216         * html/HTMLViewSourceDocument.cpp:
4217         (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
4218         (WebCore::HTMLViewSourceDocument::createTokenizer):
4219         (WebCore::HTMLViewSourceDocument::createContainingTable):
4220         (WebCore::HTMLViewSourceDocument::addViewSourceText):
4221         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
4222         * html/HTMLViewSourceDocument.h:
4223         * loader/TextDocument.cpp:
4224         (WebCore::TextTokenizer::TextTokenizer):
4225         (WebCore::TextTokenizer::write):
4226         * loader/TextDocument.h:
4227         (WebCore::TextTokenizer::checkBuffer):
4228
4229 2007-05-18  David Hyatt  <hyatt@apple.com>
4230
4231         Fix a glitch in view source mode attribute names.
4232
4233         * html/HTMLViewSourceDocument.cpp:
4234         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
4235
4236 2007-05-18  David Hyatt  <hyatt@apple.com>
4237
4238         "Linkify" view source mode links.
4239
4240         Reviewed by andersca
4241
4242         * css/view-source.css:
4243         * html/HTMLViewSourceDocument.cpp:
4244         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
4245         (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
4246         (WebCore::HTMLViewSourceDocument::addLink):
4247         * html/HTMLViewSourceDocument.h:
4248
4249 2007-05-18  Oliver Hunt  <oliver@apple.com>
4250
4251         Reviewed by Sam
4252
4253         No longer need to pass HTMLImageElement and HTMLImageLoader on to WebKit
4254         Need to expose CachedResourceClient constructor
4255
4256         * WebCore.exp:
4257         * WebCore.xcodeproj/project.pbxproj:
4258
4259 2007-05-18  David Hyatt  <hyatt@apple.com>
4260
4261         Fix for <rdar://problem/5214338> REGRESSION: / mishandled in 
4262         HTML tokenization (13780).
4263