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