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