1f0e52b36317b547ee082c5d426558dd73a04cd9
[WebKit-https.git] / WebCore / ChangeLog
1 2006-08-15  Anders Carlsson  <acarlsson@apple.com>
2
3         Reviewed by Darin.
4
5         * platform/PlatformString.h:
6         * platform/String.cpp:
7         (WebCore::String::charactersWithNullTermination):
8         Add new function which calls StringImpl::charactersWithNullTermination.
9         
10         * platform/StringImpl.cpp:
11         (WebCore::StringImpl::init):
12         (WebCore::StringImpl::append):
13         (WebCore::StringImpl::insert):
14         (WebCore::StringImpl::truncate):
15         (WebCore::StringImpl::remove):
16         Set m_hasTerminatingNullCharacter to false;
17         
18         (WebCore::StringImpl::charactersWithNullTermination):
19         If the string already has a terminating null character, simply return it. Otherwise,
20         realloc to make room for one and set m_hasTerminatingNullCharacter to true;
21
22         * platform/StringImpl.h:
23         (WebCore::StringImpl::StringImpl):
24         Add m_hasTerminatingNullCharacter.
25
26 2006-08-15  Adele Peterson  <adele@apple.com>
27
28         Reviewed by Adam.
29
30         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9926
31         REGRESSION: pop-up looks bad because <option> respects color but not background-color
32
33         * rendering/RenderPopupMenuMac.mm:
34         (WebCore::RenderPopupMenuMac::addGroupLabel): Removed code to set foreground color in NSMenu. 
35         Added a FIXME that we need to handle both foreground and background color. (9846)
36         (WebCore::RenderPopupMenuMac::addOption): ditto.
37         * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::adjustMenuListStyle):
38         For the aqua look, set the foreground color to black.
39
40 2006-08-15  Mark Rowe  <opendarwin.org@bdash.net.nz>
41
42         Reviewed by Tim H.
43
44         http://bugzilla.opendarwin.org/show_bug.cgi?id=10384
45         Bug 10384: Switch to DWARF for Release configuration
46
47         * WebCore.xcodeproj/project.pbxproj:
48
49 2006-08-15  Mark Rowe  <opendarwin.org@bdash.net.nz>
50
51         Reviewed by Hyatt.
52         Tweaked and landed by Darin.
53
54         http://bugzilla.opendarwin.org/show_bug.cgi?id=10399
55         Bug 10399: RenderTextArea is unused
56
57         * WebCore.vcproj/WebCore/WebCore.vcproj:
58         * WebCore.xcodeproj/project.pbxproj:
59         * WebCoreSources.bkl:
60         Removed RenderTextArea source files.
61
62         * html/HTMLTextAreaElement.cpp: Removed include of RenderTextArea.h.
63         * html/HTMLTextAreaElement.h: Removed forward declaration of RenderTextArea.
64
65         * platform/mac/WidgetMac.mm: (WebCore::Widget::paint): Updated a comment.
66
67         * platform/TextBox.h: Removed.
68         * platform/mac/TextBoxMac.mm: Removed.
69         * platform/mac/WebCoreTextArea.h: Removed.
70         * platform/mac/WebCoreTextArea.mm: Removed.
71         * rendering/RenderTextArea.cpp: Removed.
72         * rendering/RenderTextArea.h: Removed.
73
74 2006-08-15  Brady Eidson  <beidson@apple.com>
75
76         Reviewed by THE OTHER Maciej...
77
78         Two small fixes -
79         1) Renamed retain/release methods to add PageUrl in - we're being consistent and clear in the WebCore API
80         2) Fixed a bug where a null SiteIcon reference would be added into the pageURLToSiteIcon map causing a
81         null dereference later
82
83         * bridge/mac/WebCoreIconDatabaseBridge.mm:
84         (-[WebCoreIconDatabaseBridge retainIconForURL:]):  Changed IconDatabase method name
85         (-[WebCoreIconDatabaseBridge releaseIconForURL:]):  ditto
86         * loader/icon/IconDatabase.cpp:
87         (WebCore::IconDatabase::retainIconForPageURL):  Name change
88         (WebCore::IconDatabase::releaseIconForPageURL):  ditto
89         (WebCore::IconDatabase::setIconURLForPageURL):  Added the null site-icon check when changing a PageURL's iconURL
90         * loader/icon/IconDatabase.h:  Some renames
91
92 2006-08-14  Eric Seidel  <eric@eseidel.com>
93
94         Reviewed by mjs.
95
96         <mask>, <marker>, <pattern> inside <defs> do not work
97         http://bugzilla.opendarwin.org/show_bug.cgi?id=6548
98
99         * ksvg2/svg/SVGDefsElement.cpp:
100         (WebCore::SVGDefsElement::SVGDefsElement): moved to .cpp file
101         (WebCore::SVGDefsElement::isValid): moved to .cpp file
102         (WebCore::SVGDefsElement::rendererIsNeeded): Added.
103         (WebCore::SVGDefsElement::createRenderer): Added.
104         * ksvg2/svg/SVGDefsElement.h:
105         * ksvg2/svg/SVGGElement.cpp:
106         (WebCore::SVGGElement::SVGGElement): adjusted spacing
107         (WebCore::SVGGElement::parseMappedAttribute): adjusted spacing
108         (WebCore::SVGDummyElement::SVGDummyElement): adjusted spacing
109
110 2006-08-14  Eric Seidel  <eric@eseidel.com>
111
112         Reviewed by darin and mjs.
113         
114         Add better SVGLoad event support.
115         http://bugzilla.opendarwin.org/show_bug.cgi?id=6010
116         There will still need to be additional support added for <link> and <script> elements.
117         Not all of the error -> loaded -> error transition cases work yet.
118
119         * dom/EventTargetNode.cpp:
120         (WebCore::EventTargetNode::dispatchGenericEvent):
121         * html/HTMLImageLoader.cpp:
122         (WebCore::HTMLImageLoader::dispatchLoadEvent):
123         * html/HTMLImageLoader.h:
124         (WebCore::HTMLImageLoader::haveFiredLoadEvent):
125         (WebCore::HTMLImageLoader::setHaveFiredLoadEvent):
126         * ksvg2/misc/SVGImageLoader.cpp:
127         (WebCore::SVGImageLoader::SVGImageLoader):
128         (WebCore::SVGImageLoader::dispatchLoadEvent):
129         * ksvg2/misc/SVGImageLoader.h:
130         * ksvg2/svg/SVGAElement.cpp:
131         (WebCore::SVGAElement::parseMappedAttribute):
132         * ksvg2/svg/SVGAnimatedBoolean.h:
133         * ksvg2/svg/SVGElement.cpp:
134         (WebCore::SVGElement::SVGElement):
135         (WebCore::SVGElement::parseMappedAttribute):
136         (WebCore::SVGElement::haveLoadedRequiredResources):
137         (WebCore::SVGElement::sendSVGLoadEventIfPossible):
138         (WebCore::SVGElement::closeRenderer):
139         * ksvg2/svg/SVGElement.h:
140         (WebCore::SVGElement::rendererIsNeeded):
141         (WebCore::svg_dynamic_cast):
142         * ksvg2/svg/SVGExternalResourcesRequired.h:
143         * ksvg2/svg/SVGImageElement.cpp:
144         (SVGImageElement::SVGImageElement):
145         (SVGImageElement::haveLoadedRequiredResources):
146         * ksvg2/svg/SVGImageElement.h:
147         * ksvg2/svg/SVGSVGElement.cpp:
148         (WebCore::SVGSVGElement::parseMappedAttribute):
149         * ksvg2/svg/SVGScriptElement.cpp:
150         (WebCore::SVGScriptElement::SVGScriptElement):
151         (WebCore::SVGScriptElement::parseMappedAttribute):
152         (WebCore::SVGScriptElement::executeScript):
153         * xml/xmlhttprequest.cpp:
154         (WebCore::XMLHttpRequest::callReadyStateChangeListener): use new Event() instead of createEvent
155
156 2006-08-14  Anders Carlsson  <acarlsson@apple.com>
157
158         Reviewed by Maciej.
159
160         http://bugzilla.opendarwin.org/show_bug.cgi?id=10393
161         Autogenerate NodeIterator and TreeWalker.
162         
163         * DerivedSources.make:
164         * WebCore.xcodeproj/project.pbxproj:
165         Add new files.
166         
167         * bindings/js/JSNodeIteratorCustom.cpp: Added.
168         (WebCore::JSNodeIterator::mark):
169         * bindings/js/JSTreeWalkerCustom.cpp: Added.
170         (WebCore::JSTreeWalker::mark):
171         
172         * bindings/js/kjs_traversal.cpp:
173         * bindings/js/kjs_traversal.h:
174         Remove implementations of DOMNodeIterator and DOMTreeWalker.
175
176         * bindings/scripts/CodeGeneratorJS.pm:
177         Add "CustomMarkFunction" attribute for classes where mark() needs to be overridden.
178         
179         * bindings/objc/DOM.mm:
180         (-[DOMNodeIterator detach]):
181         * dom/NodeIterator.cpp:
182         (WebCore::NodeIterator::detach):
183         * dom/NodeIterator.h:
184         Get rid of exception in detach, it isn't used at all and this function can't throw an exception according to the spec.
185         * dom/NodeIterator.idl: Added.
186         * dom/TreeWalker.idl: Added.
187
188 2006-08-14  Brady Eidson  <beidson@apple.com>
189
190         Reviewed by John
191
192         The changes are plentiful, but small, mostly to improve performance
193         1) Add a bool flag to SiteIcon to stop it from querying the database over and over
194         2) Added a pageURL->iconURL hashmap to cache database results, as an optimization
195         3) Fix a bug in setIconURLForPageURL code where the pageURL would still point to an old icon
196         4) Added isIconURLRetained() to optimize the retain count check
197         5) Prune old, unused code
198
199         * loader/icon/IconDatabase.cpp:
200         (WebCore::IconDatabase::imageDataForIconID): Removed unused code
201         (WebCore::IconDatabase::imageDataForIconURL): Removed unused code
202         (WebCore::IconDatabase::imageDataForPageURL): Removed unused code
203         (WebCore::IconDatabase::isIconExpiredForIconURL): Removed LOG msg
204         (WebCore::IconDatabase::isIconExpiredForPageURL): Removed LOG msg
205         (WebCore::IconDatabase::iconURLForPageURL): Added a hashmap cache to avoid common queries
206         (WebCore::IconDatabase::releaseIconForURL): Changed to is isRetained() instead of retainCount()
207         (WebCore::IconDatabase::isIconURLRetained): Added - we don't care about the actual retain count
208           for an icon so much as whether or not it is retained
209         (WebCore::IconDatabase::setIconURLForPageURL): If the new and old iconURLs are the same, skip the
210           SQLite code
211         * loader/icon/IconDatabase.h:  Added new methods/variables
212         * loader/icon/SiteIcon.cpp:
213         (SiteIcon::SiteIcon): Added a flag so it only queries the database for icon data once
214         (SiteIcon::getImage): Ditto
215
216 2006-08-14  David Hyatt  <hyatt@apple.com>
217
218         Fix for bug 10385, add more support for crappy pseudo-XML-in-HTML.
219
220         Reviewed by ggaren
221
222         Added fast/parser/bad-xml-slash.html
223
224         * html/HTMLTokenizer.cpp:
225         (WebCore::HTMLTokenizer::parseTag):
226
227 2006-08-14  Darin Adler  <darin@apple.com>
228
229         Reviewed by John Sullivan.
230
231         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10204
232           REGRESSION: title tag parsing problem breaks Travelocity and Google Analytics pages
233
234         Test: fast/parser/title-error-test.html
235
236         * html/HTMLParser.cpp: (WebCore::HTMLParser::handleError): Fixed an error
237         handling case that was skipping until a </style> tag in code that was shared
238         between both <title> and <style>. Also rearranged the code a tiny bit.
239
240 2006-08-14  Darin Adler  <darin@apple.com>
241
242         Reviewed by Hyatt.
243
244         - fixed some storage leaks
245           (part of http://bugzilla.opendarwin.org/show_bug.cgi?id=10259)
246
247         * platform/mac/ResourceLoaderMac.mm: (WebCore::ResourceLoader::start):
248         Rearrange code so that "delete this" is called any time the function returns
249         false -- ownership was inconsistent before.
250
251         * rendering/RenderContainer.cpp: (WebCore::RenderContainer::removeChildNode):
252         Call deleteLineBoxWrapper even when documentBeingDestroyed() is true, because
253         some of what it does has to be done during destruction. A little awkward since
254         I preserved the order of operations. Perhaps we could structure this better later.
255
256 2006-08-14  David Harrison  <harrison@apple.com>
257
258         Reviewed by John Sullivan and Geoff Garen.
259
260         <rdar://problem/3854950> AX Seed: Blackboard Learning Systems - frame names need to be put in AXDescription AXAttribute
261
262         Test cases added: None.  Manual AX testing is way too awkward, and automated testing
263         is not possible.  See following bug...
264             <rdar://problem/4256882> Need automated testing support for accessibility APIs
265
266         * bridge/mac/WebCoreAXObject.mm:
267         (-[WebCoreAXObject accessibilityDescription]):
268         For a web area, return the name of the owning frame or iframe.
269         
270         (-[WebCoreAXObject accessibilityAttributeNames]):
271         Advertize NSAccessibilityDescriptionAttribute.
272         
273         (-[WebCoreAXObject rendererForView:]):
274         Clean up some old naming.
275
276 >>>>>>> .r15865
277 2006-08-11  Anders Carlsson  <acarlsson@apple.com>
278
279         Reviewed by Darin.
280
281         http://bugzilla.opendarwin.org/show_bug.cgi?id=10353
282         XMLSerializer and DOMParser should have real implementations
283         
284         Make real implementation files for DOMParser and XMLSerializer and wrap them
285         using our bindings generation.
286         
287         * DerivedSources.make:
288         * WebCore.xcodeproj/project.pbxproj:
289         * bindings/js/JSDOMParser.cpp: Removed.
290         * bindings/js/JSDOMParser.h: Removed.
291         * bindings/js/JSXMLSerializer.cpp: Removed.
292         * bindings/js/JSXMLSerializer.h: Removed.
293         * bindings/js/kjs_window.cpp:
294         (KJS::Window::getValueProperty):
295         * bindings/js/kjs_window.h:
296         (KJS::Window::):
297         * page/DOMWindow.idl:
298         * xml/DOMParser.cpp: Added.
299         (WebCore::DOMParser::parseFromString):
300         * xml/DOMParser.h: Added.
301         * xml/DOMParser.idl: Added.
302         * xml/XMLSerializer.cpp: Added.
303         (WebCore::XMLSerializer::serializeToString):
304         * xml/XMLSerializer.h: Added.
305         * xml/XMLSerializer.idl: Added.
306
307 2006-08-14  Maciej Stachowiak  <mjs@apple.com>
308
309         Reviewed by Brady.
310
311         - removed WebKit-level dependencies from WebFormDataStream. Use WebCore version of system interface
312
313         * WebCore.exp: export new functions
314         * platform/mac/WebCoreSystemInterface.h: Added CFReadStream related functions
315         * platform/mac/WebCoreSystemInterface.mm: ditto
316
317 2006-08-13  Maks Orlovich  <maksim@kde.org>
318
319         Reviewed (and tweaked a little) by Maciej.
320         
321         - shrank the size of JSObject by 8 bytes and made the corresponding reduction to the cell size, resulting
322         in a 1.2% speed improvement on JS iBench (and probably overall memory savings).
323
324         The WebCore part of this is to expect only FunctionImp to have a scope, not all JSObjects.
325         
326         * bindings/js/kjs_events.cpp:
327         (KJS::JSLazyEventListener::parseCode):
328
329 2006-08-12  Eric Seidel  <eric@eseidel.com>
330
331         Reviewed by hyatt and mjs.
332
333         Fix two missing null checks causing layout test crashes.
334
335         * css/cssstyleselector.cpp:
336         (WebCore::CSSStyleSelector::adjustRenderStyle): check e for null (null for pseudo styles)
337         * kcanvas/RenderSVGContainer.cpp:
338         (WebCore::RenderSVGContainer::requiresLayer): check parent()->element() for null
339
340
341 2006-08-11  Eric Seidel  <eric@eseidel.com>
342
343         Reviewed by andersca.
344
345         The outermost <svg> element needs to clip itself
346         http://bugzilla.opendarwin.org/show_bug.cgi?id=5358
347
348         * css/cssstyleselector.cpp:
349         (WebCore::CSSStyleSelector::adjustRenderStyle): adjust for SVG overflow rules
350         * kcanvas/RenderSVGContainer.cpp:
351         (WebCore::RenderSVGContainer::requiresLayer): only require layers for absolute/relative positioning of outermost SVG
352         (WebCore::RenderSVGContainer::paint):
353         * kcanvas/device/KRenderingDevice.h:
354         * kcanvas/device/quartz/KRenderingDeviceQuartz.h: remove dead methods
355         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm: remove dead methods
356         (WebCore::KRenderingDeviceContextQuartz::KRenderingDeviceContextQuartz):
357         * ksvg2/svg/SVGPaint.cpp: spacing changes
358         (WebCore::SVGPaint::SVGPaint): spacing cleanup
359         * ksvg2/svg/SVGSVGElement.cpp:
360         (WebCore::SVGSVGElement::parseMappedAttribute): spacing cleanup
361         * platform/GraphicsContext.h: Added concatCTM
362         * platform/cg/GraphicsContextCG.cpp:
363         (WebCore::GraphicsContext::concatCTM): Added.
364
365 2006-08-11  Brady Eidson  <beidson@apple.com>
366
367         Reviewed by Maciej
368
369         Renamed a method/parameter for clarity and consistency, as well as some style
370         cleanups and removing some ridiculously verbose log messages.
371         Also added an _isEmpty method to the database and bridge for WebKit's use.
372         Finally, added a central way for both WebKit and WebCore to get the icon database filename
373
374         * bridge/mac/WebCoreIconDatabaseBridge.h:  Added _isEmpty and defaultDatabaseFilename
375         * bridge/mac/WebCoreIconDatabaseBridge.mm:  Removed an unnecessary semicolon off most of these methods
376         (-[WebCoreIconDatabaseBridge openSharedDatabaseWithPath:]):
377         (-[WebCoreIconDatabaseBridge closeSharedDatabase]):
378         (-[WebCoreIconDatabaseBridge isOpen]):
379         (-[WebCoreIconDatabaseBridge _isEmpty]):  Added
380         (-[WebCoreIconDatabaseBridge setPrivateBrowsingEnabled:]):
381         (-[WebCoreIconDatabaseBridge privateBrowsingEnabled]):
382         (-[WebCoreIconDatabaseBridge iconForPageURL:withSize:]):
383         (-[WebCoreIconDatabaseBridge iconURLForPageURL:]):
384         (-[WebCoreIconDatabaseBridge defaultIconWithSize:]):
385         (-[WebCoreIconDatabaseBridge retainIconForURL:]):
386         (-[WebCoreIconDatabaseBridge releaseIconForURL:]):
387         (-[WebCoreIconDatabaseBridge _setIconData:forIconURL:]):
388         (-[WebCoreIconDatabaseBridge _setHaveNoIconForIconURL:]):
389         (-[WebCoreIconDatabaseBridge _setIconURL:forPageURL:]):
390         (-[WebCoreIconDatabaseBridge _hasIconForIconURL:]):
391         (-[WebCoreIconDatabaseBridge defaultDatabaseFilename]):  Added
392
393         * loader/icon/IconDatabase.cpp:
394         (WebCore::IconDatabase::defaultDatabaseFilename):  Added
395         (WebCore::IconDatabase::open):  
396         (WebCore::IconDatabase::isEmpty):  Added
397         (WebCore::IconDatabase::retainIconForURL):  Removed log message
398         (WebCore::IconDatabase::releaseIconForURL):  Removed log message
399         * loader/icon/IconDatabase.h: 
400
401 2006-08-11  David Hyatt  <hyatt@apple.com>
402
403         Eliminate RenderImageButton.
404
405         Reviewed by darin
406
407         * WebCore.xcodeproj/project.pbxproj:
408         * bridge/mac/WebCoreAXObject.mm:
409         (-[WebCoreAXObject isImageButton]):
410         * html/HTMLInputElement.cpp:
411         (WebCore::HTMLInputElement::createRenderer):
412         * rendering/RenderImage.h:
413         (WebCore::RenderImage::isImage):
414
415 2006-08-11  Adele Peterson  <adele@apple.com>
416
417         Reviewed by Brady.
418
419         - Fix for <rdar://problem/4656274> 
420         REGRESSION: option elements are selected when added regardless of "selected" property
421
422         Test: fast/forms/option-constructor-selected.html
423
424         * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::setOption):
425         When adding an option element, check that the option element is selected before calling setSelectedIndex.
426
427 2006-08-11  David Hyatt  <hyatt@apple.com>
428
429         Fix for bug 10349, make sure to call setChanged when an anchor changes
430         from not being a link to being a link (and vice versa).
431
432         Test is in fast/dynamic/link-href-change.html
433
434         Reviewed by darin
435
436         * html/HTMLAnchorElement.cpp:
437         (WebCore::HTMLAnchorElement::HTMLAnchorElement):
438         (WebCore::HTMLAnchorElement::parseMappedAttribute):
439         * html/HTMLAnchorElement.h:
440         * html/HTMLAreaElement.cpp:
441         (WebCore::HTMLAreaElement::parseMappedAttribute):
442
443 2006-08-09  Rob Buis  <buis@kde.org>
444
445         Reviewed by Darin.
446
447         Revert an over-optimization step that messed up the HashSet lookup.
448
449         * dom/DOMImplementation.cpp:
450
451 >>>>>>> .r15841
452 2006-08-12  Oliver  <ojh16@student.canterbury.ac.nz>
453
454         Rubber stamped by tim
455
456         Removed commented out code
457
458         * kcanvas/RenderSVGImage.cpp:
459         (WebCore::RenderSVGImage::paint):
460
461 2006-08-12  Oliver  <ojh16@student.canterbury.ac.nz>
462
463         Reviewed by geoff
464
465         Fixed regression in SVG image layout
466         (see bug #10346)
467
468         * kcanvas/RenderSVGImage.cpp:
469         (WebCore::RenderSVGImage::paint):
470
471 2006-08-10  Anders Carlsson  <acarlsson@apple.com>
472
473         Rubber-stamped by Maciej.
474
475         Move xpath to xml.
476         
477         * DerivedSources.make:
478         * WebCore.vcproj/WebCore/WebCore.vcproj:
479         * WebCore.xcodeproj/project.pbxproj:
480         * xpath/XPathEvaluator.cpp: Removed.
481         * xpath/XPathEvaluator.h: Removed.
482         * xpath/XPathEvaluator.idl: Removed.
483         * xpath/XPathExpression.cpp: Removed.
484         * xpath/XPathExpression.h: Removed.
485         * xpath/XPathExpression.idl: Removed.
486         * xpath/XPathNSResolver.cpp: Removed.
487         * xpath/XPathNSResolver.h: Removed.
488         * xpath/XPathNSResolver.idl: Removed.
489         * xpath/XPathNamespace.cpp: Removed.
490         * xpath/XPathNamespace.h: Removed.
491         * xpath/XPathResult.cpp: Removed.
492         * xpath/XPathResult.h: Removed.
493         * xpath/XPathResult.idl: Removed.
494         * xpath/impl/XPathExpressionNode.cpp: Removed.
495         * xpath/impl/XPathExpressionNode.h: Removed.
496         * xpath/impl/XPathFunctions.cpp: Removed.
497         * xpath/impl/XPathFunctions.h: Removed.
498         * xpath/impl/XPathGrammar.y: Removed.
499         * xpath/impl/XPathParser.cpp: Removed.
500         * xpath/impl/XPathParser.h: Removed.
501         * xpath/impl/XPathPath.cpp: Removed.
502         * xpath/impl/XPathPath.h: Removed.
503         * xpath/impl/XPathPredicate.cpp: Removed.
504         * xpath/impl/XPathPredicate.h: Removed.
505         * xpath/impl/XPathStep.cpp: Removed.
506         * xpath/impl/XPathStep.h: Removed.
507         * xpath/impl/XPathUtil.cpp: Removed.
508         * xpath/impl/XPathUtil.h: Removed.
509         * xpath/impl/XPathValue.cpp: Removed.
510         * xpath/impl/XPathValue.h: Removed.
511         * xpath/impl/XPathVariableReference.cpp: Removed.
512         * xpath/impl/XPathVariableReference.h: Removed.
513
514 2006-08-10  David Harrison  <harrison@apple.com>
515
516         Reviewed by John Sullivan.
517
518         <rdar://problem/4600112> REGRESSION: VO no longer able to review text within an edit field on web pages
519
520         Test cases added: None.  Manual AX testing is way too awkward, and automated testing
521         is not possible.  See following bug...
522             <rdar://problem/4256882> Need automated testing support for accessibility APIs
523
524         * bridge/mac/WebCoreAXObject.mm:
525         (-[WebCoreAXObject value]):
526         Add handling for text input fields.
527
528 2006-08-09  Graham Dennis  <graham.dennis@gmail.com>
529
530         Reviewed by Darin.
531
532         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10247
533         REGRESSION: Unable to build webkit without SVG/XPATH
534
535         * bindings/js/kjs_binding.cpp:
536         (KJS::setDOMException):
537         * bindings/js/kjs_dom.cpp:
538         (KJS::toJS):
539         * bindings/js/kjs_html.cpp:
540         (KJS::HTMLElementFunction::callAsFunction):
541         * bindings/js/kjs_proxy.cpp:
542         * bindings/js/kjs_proxy.h:
543         * bindings/objc/DOMInternal.h:
544         * bindings/objc/DOMInternal.mm:
545         (raiseDOMException):
546         * bindings/objc/DOMXPath.mm:
547         * bindings/objc/DOMXPathInternal.h:
548         * bindings/scripts/CodeGeneratorJS.pm:
549         * bridge/mac/WebCoreFrameBridge.mm:
550         (+[WebCoreFrameBridge supportedNonImageMIMETypes]):
551         * css/CSSGrammar.y:
552         * css/CSSStyleDeclaration.cpp:
553         (WebCore::propertyID):
554         * css/cssparser.cpp:
555         (WebCore::CSSParser::parseValue):
556         * css/cssparser.h:
557         * css/cssstyleselector.cpp:
558         (WebCore::CSSStyleSelector::loadDefaultStyle):
559         (WebCore::CSSStyleSelector::applyProperty):
560         * css/cssstyleselector.h:
561         * dom/Document.cpp:
562         (WebCore::Document::Document):
563         (WebCore::Document::~Document):
564         (WebCore::Document::createElementNS):
565         (WebCore::Document::implicitClose):
566         (WebCore::Document::recalcStyleSelector):
567         (WebCore::Document::createEvent):
568         * dom/Document.h:
569         * dom/Document.idl:
570         * dom/Node.cpp:
571         (WebCore::Node::createRendererIfNeeded):
572         * dom/Node.h:
573         * dom/XMLTokenizer.cpp:
574         (WebCore::XMLTokenizer::endElementNs):
575         (WebCore::XMLTokenizer::insertErrorMessageBlock):
576         * html/HTMLEmbedElement.cpp:
577         * html/HTMLEmbedElement.h:
578         * html/HTMLObjectElement.cpp:
579         * html/HTMLObjectElement.h:
580         * kcanvas/KCanvasCreator.cpp:
581         * kcanvas/KCanvasCreator.h:
582         * kcanvas/KCanvasFilters.cpp:
583         * kcanvas/KCanvasFilters.h:
584         * kcanvas/KCanvasImage.h:
585         * kcanvas/KCanvasMatrix.cpp:
586         * kcanvas/KCanvasMatrix.h:
587         * kcanvas/KCanvasPath.cpp:
588         * kcanvas/KCanvasPath.h:
589         * kcanvas/KCanvasResourceListener.h:
590         * kcanvas/KCanvasResources.cpp:
591         * kcanvas/KCanvasResources.h:
592         * kcanvas/KCanvasTreeDebug.cpp:
593         * kcanvas/RenderForeignObject.cpp:
594         * kcanvas/RenderForeignObject.h:
595         * kcanvas/RenderPath.cpp:
596         * kcanvas/RenderPath.h:
597         * kcanvas/RenderSVGContainer.cpp:
598         * kcanvas/RenderSVGContainer.h:
599         * kcanvas/RenderSVGImage.cpp:
600         * kcanvas/RenderSVGImage.h:
601         * kcanvas/RenderSVGText.cpp:
602         * kcanvas/RenderSVGText.h:
603         * kcanvas/device/KRenderingDevice.cpp:
604         * kcanvas/device/KRenderingDevice.h:
605         * kcanvas/device/KRenderingFillPainter.cpp:
606         * kcanvas/device/KRenderingFillPainter.h:
607         * kcanvas/device/KRenderingPaintServer.h:
608         * kcanvas/device/KRenderingPaintServerGradient.cpp:
609         * kcanvas/device/KRenderingPaintServerGradient.h:
610         * kcanvas/device/KRenderingPaintServerPattern.cpp:
611         * kcanvas/device/KRenderingPaintServerPattern.h:
612         * kcanvas/device/KRenderingPaintServerSolid.cpp:
613         * kcanvas/device/KRenderingPaintServerSolid.h:
614         * kcanvas/device/KRenderingStrokePainter.cpp:
615         * kcanvas/device/KRenderingStrokePainter.h:
616         * kcanvas/device/quartz/KCanvasFilterQuartz.h:
617         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
618         * kcanvas/device/quartz/KCanvasItemQuartz.mm:
619         * kcanvas/device/quartz/KCanvasMaskerQuartz.mm:
620         * kcanvas/device/quartz/KCanvasPathQuartz.mm:
621         * kcanvas/device/quartz/KCanvasResourcesQuartz.mm:
622         * kcanvas/device/quartz/KRenderingDeviceQuartz.h:
623         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
624         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
625         * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
626         * kcanvas/device/quartz/QuartzSupport.h:
627         * kcanvas/device/quartz/QuartzSupport.mm:
628         * ksvg2/bindings/js/JSSVGElementWrapperFactory.cpp:
629         * ksvg2/bindings/js/JSSVGElementWrapperFactory.h:
630         * ksvg2/css/SVGCSSParser.cpp:
631         * ksvg2/css/SVGCSSStyleSelector.cpp:
632         * ksvg2/css/SVGRenderStyle.cpp:
633         * ksvg2/css/SVGRenderStyle.h:
634         * ksvg2/css/SVGRenderStyleDefs.cpp:
635         * ksvg2/css/SVGRenderStyleDefs.h:
636         * ksvg2/ecma/GlobalObject.cpp:
637         * ksvg2/ecma/GlobalObject.h:
638         * ksvg2/events/JSSVGLazyEventListener.cpp:
639         * ksvg2/events/JSSVGLazyEventListener.h:
640         * ksvg2/events/SVGZoomEvent.cpp:
641         * ksvg2/events/SVGZoomEvent.h:
642         * ksvg2/ksvg.h:
643         * ksvg2/misc/KCanvasRenderingStyle.cpp:
644         * ksvg2/misc/KCanvasRenderingStyle.h:
645         * ksvg2/misc/KSVGTimeScheduler.cpp:
646         * ksvg2/misc/KSVGTimeScheduler.h:
647         * ksvg2/misc/SVGDocumentExtensions.cpp:
648         * ksvg2/misc/SVGDocumentExtensions.h:
649         * ksvg2/misc/SVGImageLoader.cpp:
650         * ksvg2/misc/SVGImageLoader.h:
651         * ksvg2/svg/DOMList.h:
652         * ksvg2/svg/SVGAElement.cpp:
653         * ksvg2/svg/SVGAElement.h:
654         * ksvg2/svg/SVGAngle.cpp:
655         * ksvg2/svg/SVGAngle.h:
656         * ksvg2/svg/SVGAnimateColorElement.cpp:
657         * ksvg2/svg/SVGAnimateColorElement.h:
658         * ksvg2/svg/SVGAnimateElement.cpp:
659         * ksvg2/svg/SVGAnimateElement.h:
660         * ksvg2/svg/SVGAnimateTransformElement.cpp:
661         * ksvg2/svg/SVGAnimateTransformElement.h:
662         * ksvg2/svg/SVGAnimatedAngle.cpp:
663         * ksvg2/svg/SVGAnimatedAngle.h:
664         * ksvg2/svg/SVGAnimatedBoolean.cpp:
665         * ksvg2/svg/SVGAnimatedBoolean.h:
666         * ksvg2/svg/SVGAnimatedColor.cpp:
667         * ksvg2/svg/SVGAnimatedColor.h:
668         * ksvg2/svg/SVGAnimatedEnumeration.cpp:
669         * ksvg2/svg/SVGAnimatedEnumeration.h:
670         * ksvg2/svg/SVGAnimatedInteger.cpp:
671         * ksvg2/svg/SVGAnimatedInteger.h:
672         * ksvg2/svg/SVGAnimatedLength.cpp:
673         * ksvg2/svg/SVGAnimatedLength.h:
674         * ksvg2/svg/SVGAnimatedLengthList.cpp:
675         * ksvg2/svg/SVGAnimatedLengthList.h:
676         * ksvg2/svg/SVGAnimatedNumber.cpp:
677         * ksvg2/svg/SVGAnimatedNumber.h:
678         * ksvg2/svg/SVGAnimatedNumberList.cpp:
679         * ksvg2/svg/SVGAnimatedNumberList.h:
680         * ksvg2/svg/SVGAnimatedPathData.cpp:
681         * ksvg2/svg/SVGAnimatedPathData.h:
682         * ksvg2/svg/SVGAnimatedPoints.cpp:
683         * ksvg2/svg/SVGAnimatedPoints.h:
684         * ksvg2/svg/SVGAnimatedPreserveAspectRatio.cpp:
685         * ksvg2/svg/SVGAnimatedPreserveAspectRatio.h:
686         * ksvg2/svg/SVGAnimatedRect.cpp:
687         * ksvg2/svg/SVGAnimatedRect.h:
688         * ksvg2/svg/SVGAnimatedString.cpp:
689         * ksvg2/svg/SVGAnimatedString.h:
690         * ksvg2/svg/SVGAnimatedTemplate.h:
691         * ksvg2/svg/SVGAnimatedTransformList.cpp:
692         * ksvg2/svg/SVGAnimatedTransformList.h:
693         * ksvg2/svg/SVGAnimationElement.cpp:
694         * ksvg2/svg/SVGAnimationElement.h:
695         * ksvg2/svg/SVGCircleElement.cpp:
696         * ksvg2/svg/SVGCircleElement.h:
697         * ksvg2/svg/SVGClipPathElement.cpp:
698         * ksvg2/svg/SVGClipPathElement.h:
699         * ksvg2/svg/SVGColor.cpp:
700         * ksvg2/svg/SVGColor.h:
701         * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
702         * ksvg2/svg/SVGComponentTransferFunctionElement.h:
703         * ksvg2/svg/SVGCursorElement.cpp:
704         * ksvg2/svg/SVGCursorElement.h:
705         * ksvg2/svg/SVGDOMImplementation.cpp:
706         * ksvg2/svg/SVGDOMImplementation.h:
707         * ksvg2/svg/SVGDefsElement.cpp:
708         * ksvg2/svg/SVGDefsElement.h:
709         * ksvg2/svg/SVGDescElement.cpp:
710         * ksvg2/svg/SVGDescElement.h:
711         * ksvg2/svg/SVGDocument.cpp:
712         * ksvg2/svg/SVGDocument.h:
713         * ksvg2/svg/SVGElement.cpp:
714         * ksvg2/svg/SVGElement.h:
715         * ksvg2/svg/SVGElementInstance.cpp:
716         * ksvg2/svg/SVGElementInstance.h:
717         * ksvg2/svg/SVGElementInstanceList.cpp:
718         * ksvg2/svg/SVGElementInstanceList.h:
719         * ksvg2/svg/SVGEllipseElement.cpp:
720         * ksvg2/svg/SVGEllipseElement.h:
721         * ksvg2/svg/SVGExternalResourcesRequired.cpp:
722         * ksvg2/svg/SVGExternalResourcesRequired.h:
723         * ksvg2/svg/SVGFEBlendElement.cpp:
724         * ksvg2/svg/SVGFEBlendElement.h:
725         * ksvg2/svg/SVGFEColorMatrixElement.cpp:
726         * ksvg2/svg/SVGFEColorMatrixElement.h:
727         * ksvg2/svg/SVGFEComponentTransferElement.cpp:
728         * ksvg2/svg/SVGFEComponentTransferElement.h:
729         * ksvg2/svg/SVGFECompositeElement.cpp:
730         * ksvg2/svg/SVGFECompositeElement.h:
731         * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
732         * ksvg2/svg/SVGFEDiffuseLightingElement.h:
733         * ksvg2/svg/SVGFEDisplacementMapElement.cpp:
734         * ksvg2/svg/SVGFEDisplacementMapElement.h:
735         * ksvg2/svg/SVGFEDistantLightElement.cpp:
736         * ksvg2/svg/SVGFEDistantLightElement.h:
737         * ksvg2/svg/SVGFEFloodElement.cpp:
738         * ksvg2/svg/SVGFEFloodElement.h:
739         * ksvg2/svg/SVGFEFuncAElement.cpp:
740         * ksvg2/svg/SVGFEFuncAElement.h:
741         * ksvg2/svg/SVGFEFuncBElement.cpp:
742         * ksvg2/svg/SVGFEFuncBElement.h:
743         * ksvg2/svg/SVGFEFuncGElement.cpp:
744         * ksvg2/svg/SVGFEFuncGElement.h:
745         * ksvg2/svg/SVGFEFuncRElement.cpp:
746         * ksvg2/svg/SVGFEFuncRElement.h:
747         * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
748         * ksvg2/svg/SVGFEGaussianBlurElement.h:
749         * ksvg2/svg/SVGFEImageElement.cpp:
750         * ksvg2/svg/SVGFEImageElement.h:
751         * ksvg2/svg/SVGFELightElement.cpp:
752         * ksvg2/svg/SVGFELightElement.h:
753         * ksvg2/svg/SVGFEMergeElement.cpp:
754         * ksvg2/svg/SVGFEMergeElement.h:
755         * ksvg2/svg/SVGFEMergeNodeElement.cpp:
756         * ksvg2/svg/SVGFEMergeNodeElement.h:
757         * ksvg2/svg/SVGFEOffsetElement.cpp:
758         * ksvg2/svg/SVGFEOffsetElement.h:
759         * ksvg2/svg/SVGFEPointLightElement.cpp:
760         * ksvg2/svg/SVGFEPointLightElement.h:
761         * ksvg2/svg/SVGFESpecularLightingElement.cpp:
762         * ksvg2/svg/SVGFESpecularLightingElement.h:
763         * ksvg2/svg/SVGFESpotLightElement.cpp:
764         * ksvg2/svg/SVGFESpotLightElement.h:
765         * ksvg2/svg/SVGFETileElement.cpp:
766         * ksvg2/svg/SVGFETileElement.h:
767         * ksvg2/svg/SVGFETurbulenceElement.cpp:
768         * ksvg2/svg/SVGFETurbulenceElement.h:
769         * ksvg2/svg/SVGFilterElement.cpp:
770         * ksvg2/svg/SVGFilterElement.h:
771         * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.cpp:
772         * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.h:
773         * ksvg2/svg/SVGFitToViewBox.cpp:
774         * ksvg2/svg/SVGFitToViewBox.h:
775         * ksvg2/svg/SVGForeignObjectElement.cpp:
776         * ksvg2/svg/SVGForeignObjectElement.h:
777         * ksvg2/svg/SVGGElement.cpp:
778         * ksvg2/svg/SVGGElement.h:
779         * ksvg2/svg/SVGGradientElement.cpp:
780         * ksvg2/svg/SVGGradientElement.h:
781         * ksvg2/svg/SVGHelper.cpp:
782         * ksvg2/svg/SVGHelper.h:
783         * ksvg2/svg/SVGImageElement.cpp:
784         * ksvg2/svg/SVGImageElement.h:
785         * ksvg2/svg/SVGLangSpace.cpp:
786         * ksvg2/svg/SVGLangSpace.h:
787         * ksvg2/svg/SVGLength.cpp:
788         * ksvg2/svg/SVGLength.h:
789         * ksvg2/svg/SVGLengthList.cpp:
790         * ksvg2/svg/SVGLengthList.h:
791         * ksvg2/svg/SVGLineElement.cpp:
792         * ksvg2/svg/SVGLineElement.h:
793         * ksvg2/svg/SVGLinearGradientElement.cpp:
794         * ksvg2/svg/SVGLinearGradientElement.h:
795         * ksvg2/svg/SVGList.h:
796         * ksvg2/svg/SVGLocatable.cpp:
797         * ksvg2/svg/SVGLocatable.h:
798         * ksvg2/svg/SVGMarkerElement.cpp:
799         * ksvg2/svg/SVGMarkerElement.h:
800         * ksvg2/svg/SVGMaskElement.cpp:
801         * ksvg2/svg/SVGMaskElement.h:
802         * ksvg2/svg/SVGMatrix.cpp:
803         * ksvg2/svg/SVGMatrix.h:
804         * ksvg2/svg/SVGNumber.cpp:
805         * ksvg2/svg/SVGNumber.h:
806         * ksvg2/svg/SVGNumberList.cpp:
807         * ksvg2/svg/SVGNumberList.h:
808         * ksvg2/svg/SVGPaint.cpp:
809         * ksvg2/svg/SVGPaint.h:
810         * ksvg2/svg/SVGPathElement.cpp:
811         * ksvg2/svg/SVGPathElement.h:
812         * ksvg2/svg/SVGPathSeg.cpp:
813         * ksvg2/svg/SVGPathSeg.h:
814         * ksvg2/svg/SVGPathSegArc.cpp:
815         * ksvg2/svg/SVGPathSegArc.h:
816         * ksvg2/svg/SVGPathSegClosePath.cpp:
817         * ksvg2/svg/SVGPathSegClosePath.h:
818         * ksvg2/svg/SVGPathSegCurvetoCubic.cpp:
819         * ksvg2/svg/SVGPathSegCurvetoCubic.h:
820         * ksvg2/svg/SVGPathSegCurvetoCubicSmooth.cpp:
821         * ksvg2/svg/SVGPathSegCurvetoCubicSmooth.h:
822         * ksvg2/svg/SVGPathSegCurvetoQuadratic.cpp:
823         * ksvg2/svg/SVGPathSegCurvetoQuadratic.h:
824         * ksvg2/svg/SVGPathSegCurvetoQuadraticSmooth.cpp:
825         * ksvg2/svg/SVGPathSegCurvetoQuadraticSmooth.h:
826         * ksvg2/svg/SVGPathSegLineto.cpp:
827         * ksvg2/svg/SVGPathSegLineto.h:
828         * ksvg2/svg/SVGPathSegLinetoHorizontal.cpp:
829         * ksvg2/svg/SVGPathSegLinetoHorizontal.h:
830         * ksvg2/svg/SVGPathSegLinetoVertical.cpp:
831         * ksvg2/svg/SVGPathSegLinetoVertical.h:
832         * ksvg2/svg/SVGPathSegList.cpp:
833         * ksvg2/svg/SVGPathSegList.h:
834         * ksvg2/svg/SVGPathSegMoveto.cpp:
835         * ksvg2/svg/SVGPathSegMoveto.h:
836         * ksvg2/svg/SVGPatternElement.cpp:
837         * ksvg2/svg/SVGPatternElement.h:
838         * ksvg2/svg/SVGPoint.cpp:
839         * ksvg2/svg/SVGPoint.h:
840         * ksvg2/svg/SVGPointList.cpp:
841         * ksvg2/svg/SVGPointList.h:
842         * ksvg2/svg/SVGPolyElement.cpp:
843         * ksvg2/svg/SVGPolyElement.h:
844         * ksvg2/svg/SVGPolygonElement.cpp:
845         * ksvg2/svg/SVGPolygonElement.h:
846         * ksvg2/svg/SVGPolylineElement.cpp:
847         * ksvg2/svg/SVGPolylineElement.h:
848         * ksvg2/svg/SVGPreserveAspectRatio.cpp:
849         * ksvg2/svg/SVGPreserveAspectRatio.h:
850         * ksvg2/svg/SVGRadialGradientElement.cpp:
851         * ksvg2/svg/SVGRadialGradientElement.h:
852         * ksvg2/svg/SVGRect.cpp:
853         * ksvg2/svg/SVGRect.h:
854         * ksvg2/svg/SVGRectElement.cpp:
855         * ksvg2/svg/SVGRectElement.h:
856         * ksvg2/svg/SVGSVGElement.cpp:
857         * ksvg2/svg/SVGSVGElement.h:
858         * ksvg2/svg/SVGScriptElement.cpp:
859         * ksvg2/svg/SVGScriptElement.h:
860         * ksvg2/svg/SVGSetElement.cpp:
861         * ksvg2/svg/SVGSetElement.h:
862         * ksvg2/svg/SVGStopElement.cpp:
863         * ksvg2/svg/SVGStopElement.h:
864         * ksvg2/svg/SVGStringList.cpp:
865         * ksvg2/svg/SVGStringList.h:
866         * ksvg2/svg/SVGStylable.cpp:
867         * ksvg2/svg/SVGStylable.h:
868         * ksvg2/svg/SVGStyleElement.cpp:
869         * ksvg2/svg/SVGStyleElement.h:
870         * ksvg2/svg/SVGStyledElement.cpp:
871         * ksvg2/svg/SVGStyledElement.h:
872         * ksvg2/svg/SVGStyledLocatableElement.cpp:
873         * ksvg2/svg/SVGStyledLocatableElement.h:
874         * ksvg2/svg/SVGStyledTransformableElement.cpp:
875         * ksvg2/svg/SVGStyledTransformableElement.h:
876         * ksvg2/svg/SVGSwitchElement.cpp:
877         * ksvg2/svg/SVGSwitchElement.h:
878         * ksvg2/svg/SVGSymbolElement.cpp:
879         * ksvg2/svg/SVGSymbolElement.h:
880         * ksvg2/svg/SVGTRefElement.cpp:
881         * ksvg2/svg/SVGTRefElement.h:
882         * ksvg2/svg/SVGTSpanElement.cpp:
883         * ksvg2/svg/SVGTSpanElement.h:
884         * ksvg2/svg/SVGTests.cpp:
885         * ksvg2/svg/SVGTests.h:
886         * ksvg2/svg/SVGTextContentElement.cpp:
887         * ksvg2/svg/SVGTextContentElement.h:
888         * ksvg2/svg/SVGTextElement.cpp:
889         * ksvg2/svg/SVGTextElement.h:
890         * ksvg2/svg/SVGTextPositioningElement.cpp:
891         * ksvg2/svg/SVGTextPositioningElement.h:
892         * ksvg2/svg/SVGTitleElement.cpp:
893         * ksvg2/svg/SVGTitleElement.h:
894         * ksvg2/svg/SVGTransform.cpp:
895         * ksvg2/svg/SVGTransform.h:
896         * ksvg2/svg/SVGTransformList.cpp:
897         * ksvg2/svg/SVGTransformList.h:
898         * ksvg2/svg/SVGTransformable.cpp:
899         * ksvg2/svg/SVGTransformable.h:
900         * ksvg2/svg/SVGURIReference.cpp:
901         * ksvg2/svg/SVGURIReference.h:
902         * ksvg2/svg/SVGUseElement.cpp:
903         * ksvg2/svg/SVGUseElement.h:
904         * ksvg2/svg/SVGViewElement.cpp:
905         * ksvg2/svg/SVGViewElement.h:
906         * ksvg2/svg/SVGZoomAndPan.cpp:
907         * ksvg2/svg/SVGZoomAndPan.h:
908         * ksvg2/svg/svgpathparser.cpp:
909         * ksvg2/svg/svgpathparser.h:
910         * page/DOMWindow.idl:
911         * page/Frame.cpp:
912         (WebCore::Frame::Frame):
913         (WebCore::Frame::begin):
914         (WebCore::Frame::pauseTimeouts):
915         (WebCore::Frame::resumeTimeouts):
916         * platform/GraphicsContext.h:
917         * platform/cg/GraphicsContextCG.cpp:
918         * rendering/RenderLayer.cpp:
919         (WebCore::RenderLayer::isTransparent):
920         * rendering/RenderObject.cpp:
921         (WebCore::RenderObject::containingBlock):
922         * rendering/RenderObject.h:
923         * rendering/RenderStyle.cpp:
924         (WebCore::RenderStyle::RenderStyle):
925         (WebCore::RenderStyle::inheritFrom):
926         (WebCore::RenderStyle::operator==):
927         (WebCore::RenderStyle::inheritedNotEqual):
928         (WebCore::RenderStyle::diff):
929         * rendering/RenderStyle.h:
930         * rendering/RenderTreeAsText.cpp:
931         (WebCore::write):
932         (WebCore::externalRepresentation):
933         * xpath/XPathEvaluator.cpp:
934         * xpath/XPathEvaluator.h:
935         * xpath/XPathExpression.cpp:
936         * xpath/XPathExpression.h:
937         * xpath/XPathNSResolver.cpp:
938         * xpath/XPathNSResolver.h:
939         * xpath/XPathNamespace.cpp:
940         * xpath/XPathNamespace.h:
941         * xpath/XPathResult.cpp:
942         * xpath/XPathResult.h:
943         * xpath/impl/XPathExpressionNode.cpp:
944         * xpath/impl/XPathExpressionNode.h:
945         * xpath/impl/XPathFunctions.cpp:
946         * xpath/impl/XPathFunctions.h:
947         * xpath/impl/XPathGrammar.y:
948         * xpath/impl/XPathParser.cpp:
949         * xpath/impl/XPathParser.h:
950         * xpath/impl/XPathPath.cpp:
951         * xpath/impl/XPathPath.h:
952         * xpath/impl/XPathPredicate.cpp:
953         * xpath/impl/XPathPredicate.h:
954         * xpath/impl/XPathStep.cpp:
955         * xpath/impl/XPathStep.h:
956         * xpath/impl/XPathUtil.cpp:
957         * xpath/impl/XPathUtil.h:
958         * xpath/impl/XPathValue.cpp:
959         * xpath/impl/XPathValue.h:
960         * xpath/impl/XPathVariableReference.cpp:
961         * xpath/impl/XPathVariableReference.h:
962
963         Change all #if SVG_SUPPORT to #ifdef SVG_SUPPORT and
964         #if XPATH_SUPPORT to #ifdef XPATH_SUPPORT
965         (except for one #if !SVG_SUPPORT to a #ifndef SVG_SUPPORT
966         in RenderTreeAsText.cpp)
967
968 2006-08-08  Rob Buis  <buis@kde.org>
969
970         Reviewed by Darin.
971
972         http://bugzilla.opendarwin.org/show_bug.cgi?id=10230
973         SVGDOMImplementation should die (and be rolled into DOMImplementation)
974
975         Delete SVGDOMImplementation and references to it. The
976         svg specific functionality is now in DOMImplementation.
977
978         * WebCore.xcodeproj/project.pbxproj:
979         * dom/DOMImplementation.cpp:
980         (WebCore::svgFeatureSet):
981         (WebCore::DOMImplementation::hasFeature):
982         (WebCore::DOMImplementation::createDocument):
983         (WebCore::DOMImplementation::createSVGDocument):
984         * dom/DOMImplementation.h:
985         * ksvg2/bindings/idl/svg/SVGDOMImplementation.idl: Removed.
986         * ksvg2/misc/KSVGTimeScheduler.cpp:
987         * ksvg2/svg/SVGColor.cpp:
988         * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
989         * ksvg2/svg/SVGDocument.cpp:
990         (WebCore::SVGDocument::SVGDocument):
991         * ksvg2/svg/SVGDocument.h:
992         * ksvg2/svg/SVGElement.cpp:
993         (WebCore::SVGElement::isSupported):
994         * ksvg2/svg/SVGFEBlendElement.cpp:
995         * ksvg2/svg/SVGFEColorMatrixElement.cpp:
996         * ksvg2/svg/SVGFEComponentTransferElement.cpp:
997         * ksvg2/svg/SVGFECompositeElement.cpp:
998         * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
999         * ksvg2/svg/SVGFEDisplacementMapElement.cpp:
1000         * ksvg2/svg/SVGFEFloodElement.cpp:
1001         * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
1002         * ksvg2/svg/SVGFELightElement.cpp:
1003         * ksvg2/svg/SVGFEMergeElement.cpp:
1004         * ksvg2/svg/SVGFEOffsetElement.cpp:
1005         * ksvg2/svg/SVGFESpecularLightingElement.cpp:
1006         * ksvg2/svg/SVGFETileElement.cpp:
1007         * ksvg2/svg/SVGFETurbulenceElement.cpp:
1008         * ksvg2/svg/SVGGradientElement.cpp:
1009         * ksvg2/svg/SVGPatternElement.cpp:
1010         * ksvg2/svg/SVGPolyElement.cpp:
1011         * ksvg2/svg/SVGStopElement.cpp:
1012         * ksvg2/svg/SVGStyledElement.cpp:
1013         * ksvg2/svg/SVGStyledTransformableElement.cpp:
1014         * ksvg2/svg/SVGTests.cpp:
1015         (WebCore::SVGTests::isValid):
1016         * ksvg2/svg/SVGTransformable.cpp:
1017         * page/Frame.cpp:
1018         (WebCore::Frame::begin):
1019
1020 2006-08-07  Brady Eidson  <beidson@apple.com>
1021
1022         Reviewed by Anders and John
1023
1024         Icons can now refresh when new data is sent from WebKit, both on disk and in memory
1025
1026         * bridge/mac/WebCoreIconDatabaseBridge.h:
1027         * bridge/mac/WebCoreIconDatabaseBridge.mm:
1028         (WebCore::IconDatabase::loadIconFromURL):  Allows WebCore/Kit to kick off a load
1029         outside of any greater context
1030         (-[WebCoreIconDatabaseBridge isIconExpiredForIconURL:]):
1031         (-[WebCoreIconDatabaseBridge isIconExpiredForPageURL:]): Allows WebKit
1032         to get whether or not an icon has expired
1033
1034         * loader/icon/IconDatabase.cpp:
1035         (WebCore::IconDatabase::recreateDatabase): Changed database schema slightly
1036         (WebCore::IconDatabase::createPrivateTables): Changed database schema slightly
1037         (WebCore::IconDatabase::iconForPageURL): 
1038         (WebCore::IconDatabase::isIconExpiredForIconURL): Get if an icon has expired
1039         (WebCore::IconDatabase::isIconExpiredForPageURL): Get if an icon has expired
1040         (WebCore::IconDatabase::setIconDataForIconURL): Force a refresh of the in memory
1041         image when new icon data is loaded
1042         (WebCore::IconDatabase::setIconURLForPageURL): added a check for null iconID
1043
1044         * loader/icon/IconDatabase.h: added/changed some methods
1045         * loader/icon/SiteIcon.cpp:
1046         (SiteIcon::getImage): simplified/removed debugging code
1047         (SiteIcon::manuallySetImageData): allow the image data to be changed when new icon
1048         data is loaded
1049
1050 2006-08-05  Darin Adler  <darin@apple.com>
1051
1052         Reviewed by Eric Seidel.
1053
1054         - fix a storage leak
1055
1056         * rendering/RenderView.cpp: (WebCore::RenderView::setSelection):
1057         Delete the values if we are going to exit without using the maps.
1058         Otherwise all the values leak.
1059
1060 2006-08-05  Darin Adler  <darin@apple.com>
1061
1062         Reviewed by Hyatt.
1063
1064         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10213
1065           REGRESSION: Crash in WebCore::RenderLayer::isTransparent involving <iframe> and <select>
1066
1067         Test: fast/frames/iframe-option-crash.xhtml
1068
1069         * rendering/RenderView.cpp: (WebCore::RenderView::paintBoxDecorations):
1070         Check for a nil renderer.
1071
1072 2006-08-04  David Hyatt  <hyatt@apple.com>
1073
1074         Fix for Radar bug #4644045, regression where dragging selection no longer
1075         works for floats contained inside layers.  I added an optimization to
1076         refine dirty rect checking for layers, and it incorrectly excluded floats
1077         from the paint bounds since PaintPhaseSelection was not considered when
1078         analyzing the floatRect().
1079
1080         Reviewed by beth
1081
1082         * rendering/RenderBlock.cpp:
1083         (WebCore::RenderBlock::paint):
1084
1085 2006-08-04  David Hyatt  <hyatt@apple.com>
1086
1087         Fix remove() so that it is equivalent to calling removeChild on the
1088         parent.  This involved moving three operations that remove did.
1089
1090         (1) Move the accessibility object cache removal into the destroy methods,
1091         since this really should just happen when a render object is going away.
1092
1093         (2) removeFromObjectLists shifted into removeChild, which means it will
1094         now be called more often (this is a correct change).  Note that there is
1095         also now a new guard on removeFromObjectLists so that it won't do any
1096         work unless the document is not being destroyed.
1097
1098         (3) The big one.  deleteLineBoxWrapper was not getting called to clean up
1099         the line box tree.  This moved right into RenderContainer's removeChildNode so
1100         that it is now done even in the lowest level RenderContainer removal primitive.
1101
1102         Reviewed by beth
1103
1104         * rendering/RenderContainer.cpp:
1105         (WebCore::RenderContainer::removeChildNode):
1106         (WebCore::RenderContainer::removeChild):
1107         * rendering/RenderObject.cpp:
1108         (WebCore::RenderObject::removeFromObjectLists):
1109         (WebCore::RenderObject::destroy):
1110         * rendering/RenderObject.h:
1111         (WebCore::RenderObject::remove):
1112         * rendering/RenderWidget.cpp:
1113         (WebCore::RenderWidget::destroy):
1114
1115 2006-08-04  David Hyatt  <hyatt@apple.com>
1116
1117         Back out the fix for list marker crashes.  The actual bug here is that
1118         there is a confusing mismatch between remove() and removeChild() in the
1119         render tree.  remove() does a little bit of extra work that removeChild
1120         should be doing instead (so that remove() can just be a shorthand for
1121         removeChild).
1122
1123         This conservative fix does not solve the remove/removeChild mismatch
1124         but instead just changes the list marker updating code to use remove
1125         instead.
1126
1127         Reviewed by beth
1128
1129         Test Case: fast/lists/dynamic-marker-crash.html
1130
1131         * rendering/ListMarkerBox.cpp:
1132         * rendering/ListMarkerBox.h:
1133         * rendering/RenderListItem.cpp:
1134         (WebCore::RenderListItem::updateMarkerLocation):
1135
1136 2006-08-04  Sam Weinig  <sam.weinig@gmail.com>
1137
1138         Reviewed by Darin.
1139
1140         - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10192
1141           Make WebCore (and friends) compile with -Wshorten-64-to-32
1142
1143           * Adds -Wshorten-64-to-32 flag to Xcode project.
1144           * Adds 'f' to float literals where expecting a float.
1145           * Use cosf() instead of cos() when assigning to a float.
1146
1147         * WebCore.xcodeproj/project.pbxproj:
1148         * kcanvas/device/quartz/filters/WKDiffuseLightingFilter.m:
1149         (+[WKDiffuseLightingFilter initialize]):
1150         * kcanvas/device/quartz/filters/WKDiscreteTransferFilter.m:
1151         (-[WKDiscreteTransferFilter outputImage]):
1152         * kcanvas/device/quartz/filters/WKDisplacementMapFilter.m:
1153         (+[WKDisplacementMapFilter initialize]):
1154         * kcanvas/device/quartz/filters/WKSpecularLightingFilter.m:
1155         (+[WKSpecularLightingFilter initialize]):
1156         * kcanvas/device/quartz/filters/WKSpotLightFilter.m:
1157         (-[WKSpotLightFilter outputImage]):
1158         * kcanvas/device/quartz/filters/WKTableTransferFilter.m:
1159         (-[WKTableTransferFilter outputImage]):
1160
1161 2006-08-03  David Hyatt  <hyatt@apple.com>
1162
1163         Fix for bug 10229, don't bother trying to clear when no floats are
1164         present.  I suspect there's still a bug in the math that follows, but
1165         this fix is safer in that it just does the obvious thing (and doesn't
1166         compute any clearance if no floats are even around).
1167
1168         Reviewed by maciej
1169
1170         * ChangeLog:
1171         * rendering/RenderBlock.cpp:
1172         (WebCore::RenderBlock::getClearDelta):
1173
1174 2006-08-03  Justin Garcia  <justin.garcia@apple.com>
1175
1176         Reviewed by harrison
1177         
1178         <rdar://problem/4641033/4515463/4052426/4046570/4053718/4053724/4060115/4062858>
1179         Copy/Paste fidelity was bad.
1180
1181         * editing/ApplyStyleCommand.cpp:
1182         (WebCore::ApplyStyleCommand::applyInlineStyle):
1183         * editing/markup.cpp:
1184         (WebCore::startMarkup): We were not adding non-inheritable styles
1185         to the markup for an element unless they were in the elements inline
1186         style declaration.
1187
1188 2006-08-03  Sam Weinig  <sam.weinig@gmail.com>
1189
1190         Reviewed by Darin.
1191
1192         - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10176
1193           Make WebCore compile with -Wundef
1194
1195           * Adds -Wundef flag to Xcode project
1196           * Converts #ifs to #ifdef and #ifndefs where needed.
1197           * Replaces #ifdef WIN32 with #if PLATFORM(WIN_OS) or PLATFORM(WIN)
1198             (and in one instance in config.h with #if !COMPILER(MSVC))
1199           * Added #define YYMAXDEPTH 10000 in XPathGrammar.y and CSSGrammar.y
1200             to fix a warning from within Bison.
1201           * Cleaned up style a little in surrounding code.
1202
1203         * WebCore.xcodeproj/project.pbxproj:
1204         * bridge/mac/WebCoreAXObject.mm:
1205         (-[WebCoreAXObject doAXTextMarkerRangeForUnorderedTextMarkers:]):
1206         * config.h:
1207         * css/CSSGrammar.y:
1208         * css/MediaFeatureNames.cpp:
1209         * css/MediaFeatureNames.h:
1210         * css/cssparser.cpp:
1211         * dom/ContainerNode.cpp:
1212         (WebCore::ContainerNode::setActive):
1213         * dom/Element.cpp:
1214         (WebCore::Element::attach):
1215         * dom/Element.h:
1216         * dom/EventNames.cpp:
1217         * dom/EventNames.h:
1218         * dom/NamedAttrMap.h:
1219         * dom/Position.cpp:
1220         * dom/QualifiedName.cpp:
1221         * dom/QualifiedName.h:
1222         * dom/Range.h:
1223         * dom/XMLTokenizer.cpp:
1224         (WebCore::XMLTokenizer::error):
1225         * html/HTMLTokenizer.cpp:
1226         (WebCore::HTMLTokenizer::scriptHandler):
1227         (WebCore::HTMLTokenizer::scriptExecution):
1228         (WebCore::HTMLTokenizer::parseTag):
1229         (WebCore::HTMLTokenizer::continueProcessing):
1230         (WebCore::HTMLTokenizer::write):
1231         (WebCore::HTMLTokenizer::timerFired):
1232         (WebCore::HTMLTokenizer::notifyFinished):
1233         * kcanvas/device/quartz/KCanvasFilterQuartz.h:
1234         * kcanvas/device/quartz/KRenderingDeviceQuartz.h:
1235         * ksvg2/css/SVGRenderStyle.h:
1236         * ksvg2/css/SVGRenderStyleDefs.h:
1237         * ksvg2/scripts/make_names.pl:
1238         * loader/CachedResource.h:
1239         * loader/LoaderFunctions.h:
1240         * loader/loader.h:
1241         * page/Frame.cpp:
1242         * page/FrameTree.cpp:
1243         * page/FrameView.cpp:
1244         (WebCore::FrameView::clear):
1245         (WebCore::FrameView::layout):
1246         (WebCore::FrameView::layoutTimerFired):
1247         (WebCore::FrameView::scheduleRelayout):
1248         (WebCore::FrameView::unscheduleRelayout):
1249         * platform/AtomicString.cpp:
1250         * platform/AtomicString.h:
1251         * platform/Cursor.h:
1252         * platform/DeprecatedArray.h:
1253         * platform/DeprecatedString.cpp:
1254         (WebCore::allocateHandle):
1255         (WebCore::initializeHandleNodeBlock):
1256         (WebCore::freeHandle):
1257         * platform/FloatPoint.h:
1258         * platform/FloatRect.h:
1259         * platform/FloatSize.h:
1260         * platform/GraphicsContext.h:
1261         * platform/Image.h:
1262         * platform/IntPoint.h:
1263         * platform/IntRect.h:
1264         (WebCore::IntRect::inflateX):
1265         (WebCore::IntRect::inflateY):
1266         * platform/IntSize.h:
1267         * platform/PlatformKeyboardEvent.h:
1268         * platform/PlatformMouseEvent.h:
1269         * platform/PlatformString.h:
1270         * platform/ResourceLoader.h:
1271         * platform/ResourceLoaderInternal.h:
1272         (WebCore::ResourceLoaderInternal::ResourceLoaderInternal):
1273         * platform/ScrollView.h:
1274         * platform/StaticConstructors.h:
1275         * platform/StreamingTextDecoderICU.cpp:
1276         (WebCore::StreamingTextDecoderICU::convert):
1277         * platform/StringImpl.h:
1278         * platform/Widget.h:
1279         * platform/mac/BlockExceptions.mm:
1280         * platform/mac/ColorMac.mm:
1281         (+[WebCoreControlTintObserver WebCore]):
1282         * platform/mac/FloatPointMac.mm:
1283         * platform/mac/FloatRectMac.mm:
1284         * platform/mac/FloatSizeMac.mm:
1285         * platform/mac/FontMac.mm:
1286         * platform/mac/GraphicsContextMac.mm:
1287         (WebCore::GraphicsContext::drawFocusRing):
1288         * platform/mac/IntPointMac.mm:
1289         * platform/mac/IntRectMac.mm:
1290         * platform/mac/IntSizeMac.mm:
1291         * platform/mac/WebCoreSystemInterface.h:
1292         * rendering/RenderBlock.h:
1293         * rendering/RenderTableCell.h:
1294         * rendering/bidi.cpp:
1295         (WebCore::appendRun):
1296         (WebCore::RenderBlock::layoutInlineChildren):
1297         * xml/XSLTProcessor.cpp:
1298         (WebCore::parseErrorFunc):
1299         * xpath/impl/XPathGrammar.y:
1300
1301 2006-08-03  Adam Roben  <aroben@apple.com>
1302
1303         Reviewed by Maciej and Beth.
1304
1305         Fix use-after-dispose heap corruption bug.
1306
1307         * rendering/ListMarkerBox.cpp:
1308         (WebCore::ListMarkerBox::destroy): Only call removeChild if we're not
1309         destroying the document
1310
1311 2006-08-03  Adam Roben  <aroben@apple.com>
1312
1313         Reviewed by Anders.
1314
1315         - Fixed Windows build.
1316
1317         * platform/Color.cpp:
1318         (WebCore::makeRGBAFromHSLA): Whitespace change
1319         * platform/win/TemporaryLinkStubs.cpp: Add new method stubs
1320         (PlatformScrollBar::PlatformScrollBar):
1321         (PlatformScrollBar::~PlatformScrollBar):
1322         (PlatformScrollBar::width):
1323         (PlatformScrollBar::height):
1324         (PlatformScrollBar::setEnabled):
1325         (PlatformScrollBar::paint):
1326         (PlatformScrollBar::setScrollBarValue):
1327         (PlatformScrollBar::setKnobProportion):
1328         (PlatformScrollBar::setRect):
1329         (ScrollBar::ScrollBar):
1330         (ScrollBar::scroll):
1331         (ScrollBar::setValue):
1332
1333 2006-08-02  Justin Garcia  <justin.garcia@apple.com>
1334
1335         Reviewed by mjs
1336         
1337         <http://bugzilla.opendarwin.org/show_bug.cgi?id=10225>
1338         GMail Editor: Change Hilite Color doesn't work
1339
1340         * editing/JSEditor.cpp: Added support for execCommand("HiliteColor", ...).
1341         It's what GMail uses to implement text hiliting.  It's just a synonym for BackColor.
1342         * editing/SelectionController.cpp:
1343         (WebCore::SelectionController::nodeWillBeRemoved): Moved a comment
1344         a more appropriate place.
1345
1346 2006-08-03  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1347
1348         Reviewed by Adele and Darin.
1349
1350         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10177
1351           REGRESSION: Successfully dragging text into a disabled field
1352
1353         Test: fast/forms/textfield-drag-into-disabled.html
1354
1355         * rendering/RenderTextControl.cpp:
1356         (WebCore::RenderTextControl::createDivStyle): Changed to set -webkit-user-modify
1357         to read-only on the inner div if the control is disabled.       
1358         (WebCore::RenderTextControl::updateFromElement): Ditto.
1359
1360 2006-08-03  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1361
1362         Reviewed by Darin.
1363
1364         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10198
1365           REGRESSION: WebKit r15750 crashes while loading anthem.com
1366
1367         Test: fast/overflow/generated-content-crash.html
1368
1369         * rendering/RenderLayer.cpp:
1370         (WebCore::RenderLayer::updateScrollInfoAfterLayout): Added a null check for
1371         the renderer's element. Generated content does not have an element and
1372         therefore does not need to maintain overflow status.
1373
1374 2006-08-03  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1375
1376         Reviewed by Anders.
1377
1378         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10202
1379           REGRESSION: Repro crash when loading an empty image document
1380
1381         Test: fast/tokenizer/image-empty-crash.html
1382
1383         * loader/ImageDocument.cpp:
1384         (WebCore::ImageTokenizer::stopParsing): Added null check for m_imageElement.
1385         (WebCore::ImageTokenizer::finish): Ditto.
1386
1387 2006-08-03  Darin Adler  <darin@apple.com>
1388
1389         Reviewed by Anders.
1390
1391         - clean up "flip"-related code a tiny bit
1392
1393         * platform/Screen.h: Removed redundant parameter names.
1394         * platform/mac/ScreenMac.mm:
1395         (WebCore::flipScreenRect): Changed to call flipScreenPoint so we only have one
1396         copy of the flipping code.
1397         (WebCore::flipScreenPoint): Fixed indentation.
1398
1399         * bridge/mac/WebCoreFrameBridge.mm: (globalPoint): Removed type casts and
1400         simplified a bit.
1401
1402         * platform/mac/PlatformMouseEventMac.mm: (WebCore::globalPositionForEvent):
1403         * platform/mac/WheelEventMac.mm: (WebCore::globalPositionForEvent):
1404         Removed unneeded local variable.
1405
1406 2006-08-02  David Hyatt  <hyatt@apple.com>
1407
1408         Abstract RenderLayer scrollbar creation and destruction so that there
1409         is a clean spot in which to drop in engine scrollbar stuff.
1410
1411         Reviewed by timo
1412
1413         * platform/ScrollBar.h:
1414         (WebCore::ScrollBar::hasPlatformScrollBars):
1415         * rendering/RenderLayer.cpp:
1416         (WebCore::RenderLayer::createScrollbar):
1417         (WebCore::RenderLayer::destroyScrollbar):
1418         (WebCore::RenderLayer::setHasHorizontalScrollbar):
1419         (WebCore::RenderLayer::setHasVerticalScrollbar):
1420         * rendering/RenderLayer.h:
1421
1422 2006-08-02  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1423
1424         Reviewed by Darin.
1425
1426         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=3438
1427           incorrect display of transparent 1x1 PNGs
1428
1429         Test: fast/replaced/image-solid-color-with-alpha.html
1430
1431         * platform/mac/ImageMac.mm:
1432         (WebCore::Image::checkForSolidColor): Changed to divide each color component
1433         by the alpha component. You need to do that since the bitmap context has
1434         premultiplied alpha but m_solidColor should be non-premultiplied.
1435
1436 2006-08-02  Adam Roben  <aroben@apple.com>
1437
1438         Reviewed by Brady.
1439
1440         - Remove redundant #include
1441
1442         * loader/loader.cpp:
1443
1444 2006-07-31  Sam Weinig  <sam.weinig@gmail.com>
1445
1446         Reviewed by Darin.
1447
1448         - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=9955
1449         Colors scaled from [0, 1] range to [0, 255] incorrectly
1450         
1451         Fixes scaling issue and fixes Color to follow style guidelines.
1452
1453         * css/cssstyleselector.cpp:
1454         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
1455         * platform/Color.cpp:
1456         (WebCore::calcHue):
1457         (WebCore::makeRGBAFromHSLA):
1458         (WebCore::Color::Color):
1459         (WebCore::Color::name):
1460         (WebCore::Color::setNamedColor):
1461         (WebCore::Color::light):
1462         (WebCore::Color::dark):
1463         (WebCore::blend):
1464         * platform/Color.h:
1465         (WebCore::Color::Color):
1466         (WebCore::Color::isValid):
1467         (WebCore::Color::red):
1468         (WebCore::Color::green):
1469         (WebCore::Color::blue):
1470         (WebCore::Color::alpha):
1471         (WebCore::Color::rgb):
1472         (WebCore::Color::setRGB):
1473         (WebCore::operator==):
1474         (WebCore::operator!=):
1475         * rendering/RenderObject.cpp:
1476         (WebCore::RenderObject::drawBorder):
1477
1478 2006-07-31  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1479
1480         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10158
1481           REGRESSION: Selection highlight is dark and opaque when solid-color images are used
1482
1483         Reviewed by Darin.
1484
1485         Pixel test: fast/backgrounds/solid-color-context-restore.html
1486
1487         * platform/mac/ImageMac.mm:
1488         (WebCore::Image::draw): Added calls to preserve the graphics context
1489         around the painting of a solid color image.
1490         (WebCore::Image::drawTiled): Ditto.
1491
1492 2006-07-31  Maciej Stachowiak  <mjs@apple.com>
1493
1494         Rubber-stamped by Tim Hatcher.
1495
1496         - renamed TransferJob to ResourceLoader
1497
1498         * Projects/gdk/webcore-gdk.bkl:
1499         * WebCore.vcproj/WebCore/WebCore.vcproj:
1500         * WebCore.xcodeproj/project.pbxproj:
1501         * WebCoreSources.bkl:
1502         * bridge/mac/FrameMac.mm:
1503         * bridge/mac/WebCoreResourceLoaderImp.h:
1504         * bridge/mac/WebCoreResourceLoaderImp.mm:
1505         (-[WebCoreResourceLoaderImp redirectedToURL:]):
1506         (-[WebCoreResourceLoaderImp addData:]):
1507         (-[WebCoreResourceLoaderImp finishJobAndHandle:]):
1508         * bridge/win/FrameWin.cpp:
1509         * dom/XMLTokenizer.cpp:
1510         (WebCore::openFunc):
1511         * loader/Cache.cpp:
1512         * loader/LoaderFunctions.h:
1513         * loader/loader.cpp:
1514         (WebCore::Loader::servePendingRequests):
1515         (WebCore::Loader::receivedAllData):
1516         (WebCore::Loader::receivedResponse):
1517         (WebCore::Loader::receivedData):
1518         (WebCore::Loader::cancelRequests):
1519         (WebCore::Loader::jobForRequest):
1520         * loader/loader.h:
1521         * loader/mac/LoaderFunctionsMac.mm:
1522         (WebCore::ServeSynchronousRequest):
1523         * platform/ResourceLoader.cpp: Added.
1524         (WebCore::ResourceLoader::ResourceLoader):
1525         (WebCore::ResourceLoader::isErrorPage):
1526         (WebCore::ResourceLoader::error):
1527         (WebCore::ResourceLoader::setError):
1528         (WebCore::ResourceLoader::queryMetaData):
1529         (WebCore::ResourceLoader::addMetaData):
1530         (WebCore::ResourceLoader::kill):
1531         (WebCore::ResourceLoader::url):
1532         (WebCore::ResourceLoader::postData):
1533         (WebCore::ResourceLoader::method):
1534         (WebCore::ResourceLoader::client):
1535         * platform/ResourceLoader.h: Added.
1536         (WebCore::ResourceLoader::getInternal):
1537         * platform/ResourceLoaderClient.h: Added.
1538         (WebCore::ResourceLoaderClient::~ResourceLoaderClient):
1539         (WebCore::ResourceLoaderClient::receivedRedirect):
1540         (WebCore::ResourceLoaderClient::receivedResponse):
1541         (WebCore::ResourceLoaderClient::receivedData):
1542         (WebCore::ResourceLoaderClient::receivedAllData):
1543         * platform/ResourceLoaderInternal.h: Added.
1544         (WebCore::ResourceLoaderInternal::ResourceLoaderInternal):
1545         * platform/TransferJob.cpp: Removed.
1546         * platform/TransferJob.h: Removed.
1547         * platform/TransferJobClient.h: Removed.
1548         * platform/TransferJobInternal.h: Removed.
1549         * platform/gdk/FrameGdk.cpp:
1550         (WebCore::FrameGdk::openURL):
1551         (WebCore::FrameGdk::urlSelected):
1552         (WebCore::FrameGdk::receivedData):
1553         (WebCore::FrameGdk::receivedAllData):
1554         * platform/gdk/FrameGdk.h:
1555         * platform/gdk/ResourceLoaderCurl.cpp: Added.
1556         (WebCore::ResourceLoaderInternal::~ResourceLoaderInternal):
1557         (WebCore::ResourceLoader::~ResourceLoader):
1558         (WebCore::ResourceLoader::start):
1559         (WebCore::ResourceLoader::cancel):
1560         * platform/gdk/ResourceLoaderManager.cpp: Added.
1561         (WebCore::ResourceLoaderManager::ResourceLoaderManager):
1562         (WebCore::ResourceLoaderManager::get):
1563         (WebCore::ResourceLoaderManager::useSimpleTransfer):
1564         (WebCore::writeCallback):
1565         (WebCore::ResourceLoaderManager::downloadTimerCallback):
1566         (WebCore::ResourceLoaderManager::remove):
1567         (WebCore::ResourceLoaderManager::add):
1568         (WebCore::ResourceLoaderManager::cancel):
1569         * platform/gdk/ResourceLoaderManager.h: Added.
1570         * platform/gdk/TemporaryLinkStubs.cpp:
1571         (WebCore::ServeSynchronousRequest):
1572         (WebCore::ResourceLoader::assembleResponseHeaders):
1573         (WebCore::ResourceLoader::retrieveCharset):
1574         * platform/gdk/TransferJobCurl.cpp: Removed.
1575         * platform/gdk/TransferJobManager.cpp: Removed.
1576         * platform/gdk/TransferJobManager.h: Removed.
1577         * platform/mac/ResourceLoaderMac.mm: Added.
1578         (WebCore::ResourceLoaderInternal::~ResourceLoaderInternal):
1579         (WebCore::ResourceLoader::~ResourceLoader):
1580         (WebCore::ResourceLoader::start):
1581         (WebCore::ResourceLoader::assembleResponseHeaders):
1582         (WebCore::ResourceLoader::retrieveCharset):
1583         (WebCore::ResourceLoader::setLoader):
1584         (WebCore::ResourceLoader::receivedResponse):
1585         (WebCore::ResourceLoader::cancel):
1586         * platform/mac/TransferJobMac.mm: Removed.
1587         * platform/win/ResourceLoaderWin.cpp: Added.
1588         (WebCore::addToOutstandingJobs):
1589         (WebCore::lookupResourceLoader):
1590         (WebCore::ResourceLoaderWndProc):
1591         (WebCore::initializeOffScreenResourceLoaderWindow):
1592         (WebCore::ResourceLoaderInternal::~ResourceLoaderInternal):
1593         (WebCore::ResourceLoader::~ResourceLoader):
1594         (WebCore::ResourceLoader::start):
1595         (WebCore::ResourceLoader::fileLoadTimer):
1596         (WebCore::ResourceLoader::cancel):
1597         * platform/win/ResourceLoaderWin.h: Added.
1598         * platform/win/TemporaryLinkStubs.cpp:
1599         (WebCore::ServeSynchronousRequest):
1600         (WebCore::ResourceLoader::assembleResponseHeaders):
1601         (WebCore::ResourceLoader::retrieveCharset):
1602         * platform/win/TransferJobWin.cpp: Removed.
1603         * platform/win/TransferJobWin.h: Removed.
1604         * xml/XSLTProcessor.cpp:
1605         (WebCore::docLoaderFunc):
1606         * xml/xmlhttprequest.cpp:
1607         (WebCore::XMLHttpRequest::send):
1608         (WebCore::XMLHttpRequest::receivedAllData):
1609         (WebCore::XMLHttpRequest::receivedRedirect):
1610         (WebCore::XMLHttpRequest::receivedData):
1611         * xml/xmlhttprequest.h:
1612
1613 2006-07-31  Darin Adler  <darin@apple.com>
1614
1615         Reviewed by Hyatt.
1616
1617         - removed obsolete cell margin hack
1618
1619         * rendering/RenderBox.cpp: (WebCore::RenderBox::calcVerticalMargins):
1620         Set top and bottom margins to 0 for table cells instead of -16384.
1621         No effect on layout (including layout tests).
1622
1623         * css/CSSComputedStyleDeclaration.cpp:
1624         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1625         Added a few comments about differences between this class and the
1626         what the CSS specification says about computed style.
1627
1628 2006-07-31  Mark Rowe  <opendarwin.org@bdash.net.nz>
1629
1630         Reviewed by Maciej.
1631
1632         http://bugzilla.opendarwin.org/show_bug.cgi?id=9738
1633         Bug 9738: Unqualified :hover selector ignored in strict parsing mode
1634
1635         * css/cssstyleselector.cpp:
1636         (WebCore::CSSStyleSelector::checkSelector): Restrict the :hover and :active
1637         exclusion based on onlyHoverActive to quirks mode.
1638
1639 2006-07-31  David Hyatt  <hyatt@apple.com>
1640
1641         Fix for bug 10179, digg.com scrolls slowly.  Improve fixed positioning
1642         and fixed backgrounds so that a count of them is kept on the FrameView.
1643         This allows us to switch slow scrolling on and off as these objects come
1644         and go.
1645
1646         * css/cssstyleselector.cpp:
1647         (WebCore::CSSStyleSelector::adjustRenderStyle):
1648         (WebCore::CSSStyleSelector::applyProperty):
1649         * page/FrameView.cpp:
1650         (WebCore::FrameViewPrivate::reset):
1651         (WebCore::FrameView::layout):
1652         (WebCore::FrameView::useSlowRepaints):
1653         (WebCore::FrameView::setUseSlowRepaints):
1654         (WebCore::FrameView::addSlowRepaintObject):
1655         (WebCore::FrameView::removeSlowRepaintObject):
1656         * page/FrameView.h:
1657         * rendering/RenderBox.cpp:
1658         (WebCore::RenderBox::paintBackgroundExtended):
1659         * rendering/RenderObject.cpp:
1660         (WebCore::RenderObject::setStyle):
1661         * rendering/RenderView.cpp:
1662         (WebCore::RenderView::paintBoxDecorations):
1663
1664 2006-07-31  David Hyatt  <hyatt@apple.com>
1665
1666         Begin disentangling of scrollbar logic in preparation for engine-implemented
1667         scrollbars.  Split ScrollBar into two classes, an abstract base (still named
1668         ScrollBar) and a new PlatformScrollBar subclass.  This subclass is used only
1669         by platforms that want to continue to use a platform scrollbar (rather than
1670         the engine one).
1671
1672         Reviewed by darin
1673
1674         * WebCore.xcodeproj/project.pbxproj:
1675         * html/HTMLCanvasElement.h:
1676         * page/Frame.cpp:
1677         * platform/PlatformScrollBar.h: Added.
1678         (WebCore::PlatformScrollBar::isWidget):
1679         * platform/ScrollBar.h:
1680         (WebCore::ScrollBarClient::~ScrollBarClient):
1681         (WebCore::ScrollBar::~ScrollBar):
1682         (WebCore::ScrollBar::orientation):
1683         (WebCore::ScrollBar::value):
1684         (WebCore::ScrollBar::client):
1685         * platform/mac/PlatformScrollBarMac.mm: Added.
1686         (-[WebCoreScrollBar initWithPlatformScrollBar:]):
1687         (-[WebCoreScrollBar detachPlatformScrollBar]):
1688         (-[WebCoreScrollBar scroll:]):
1689         (-[WebCoreScrollBar widget]):
1690         (-[WebCoreScrollBar mouseDown:]):
1691         (WebCore::PlatformScrollBar::PlatformScrollBar):
1692         (WebCore::PlatformScrollBar::~PlatformScrollBar):
1693         (WebCore::PlatformScrollBar::setScrollBarValue):
1694         (WebCore::PlatformScrollBar::setKnobProportion):
1695         (WebCore::PlatformScrollBar::scrollbarHit):
1696         (WebCore::PlatformScrollBar::width):
1697         (WebCore::PlatformScrollBar::height):
1698         (WebCore::PlatformScrollBar::setRect):
1699         (WebCore::PlatformScrollBar::setEnabled):
1700         (WebCore::PlatformScrollBar::paint):
1701         * platform/mac/ScrollBarMac.mm: Removed.
1702         * platform/mac/WebCoreTextArea.mm:
1703         * rendering/RenderBlock.cpp:
1704         (WebCore::RenderBlock::isPointInScrollbar):
1705         * rendering/RenderFormElement.cpp:
1706         * rendering/RenderLayer.cpp:
1707         (WebCore::RenderLayer::horizontalScrollbarWidget):
1708         (WebCore::RenderLayer::verticalScrollbarWidget):
1709         (WebCore::RenderLayer::valueChanged):
1710         (WebCore::RenderLayer::setHasHorizontalScrollbar):
1711         (WebCore::RenderLayer::setHasVerticalScrollbar):
1712         (WebCore::RenderLayer::positionScrollbars):
1713         * rendering/RenderLayer.h:
1714         * rendering/RenderWidget.h:
1715
1716 2006-07-31  Adele Peterson  <adele@apple.com>
1717
1718         Reviewed by John and Anders.
1719
1720         - Fix for <rdar://problem/4380576> onChange does not get called when field changed by return key
1721
1722         Test: fast/forms/onchange-enter-submit.html
1723
1724         Blur (which will fire onChange appropriately) before submitting a form when pressing Enter.
1725         This matches the sequence of events fired in WinIE.
1726
1727         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
1728         * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::defaultEventHandler):
1729
1730 2006-07-31  Geoffrey Garen  <ggaren@apple.com>
1731
1732         Reviewed by Kevin.
1733
1734         Moved string debug function outside of the WebCore namespace so that it's
1735         easier to call in the debugger. I will never doubt Darin again (x100).
1736
1737         * platform/String.cpp:
1738         (string):
1739
1740 2006-07-31  David Hyatt  <hyatt@apple.com>
1741
1742         Partial fix for 5453.  Improve overflow so that when it changes
1743         dynamically from scroll/auto to hidden that we properly hide the
1744         scrollbars.  Also refine the dirty dashboard region updating so that
1745         it only happens if the scrollbars genuinely come and go.
1746
1747         Also eliminate the extra repaint of the entire block.  This should not be
1748         necessary, since the scrollbars repaint themselves already and children
1749         will repaint already if they move.
1750
1751         Reviewed by darin
1752
1753         Adding test case from bug into fast/overflow/dynamic-hidden.html
1754
1755         * rendering/RenderLayer.cpp:
1756         (WebCore::RenderLayer::setHasHorizontalScrollbar):
1757         (WebCore::RenderLayer::setHasVerticalScrollbar):
1758         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1759
1760 2006-07-31  Graham Dennis  <graham.dennis@gmail.com>
1761
1762         Reviewed by justin
1763         
1764         <http://bugzilla.opendarwin.org/show_bug.cgi?id=9507>
1765         Empty style spans created in applyInlineStyle
1766         
1767         Improves paste fidelity because some of these empty font/style spans had a non-zero
1768         size and were messing up the layout of pasted content:
1769         <rdar://problem/4515463>
1770         REGRESSION: Blot and Mail both do a very poor job of pasting the main www.apple.com page   
1771
1772         * editing/ApplyStyleCommand.cpp:
1773         (WebCore::ApplyStyleCommand::applyInlineStyle): Use the adjusted start node instead 
1774         of start.node().  Don't do any application if the endpoints are swapped.  Adjust
1775         endNode if the start node is a descendant of it, so that the pre-order traversal will
1776         terminate properly.
1777
1778 2006-07-31  Geoffrey Garen  <ggaren@apple.com>
1779
1780         Reviewed by Darin.
1781
1782         * platform/String.cpp:
1783         (WebCore::string): Added a debugging function to create a String from a
1784         const char*.
1785
1786 2006-07-31  Anders Carlsson  <acarlsson@apple.com>
1787
1788         * css/CSSPrimitiveValue.cpp:
1789         Fix windows build.
1790
1791 2006-07-31  Geoffrey Garen  <ggaren@apple.com>
1792
1793         Reinstating my last change. Everything builds now.
1794         
1795 2006-07-31  Geoffrey Garen  <ggaren@apple.com>
1796
1797         Backing out my last change because it causes a build failure in some
1798         configurations. This seems to be the cleanest way to get svn to cooperate.
1799
1800 2006-07-31  Geoffrey Garen  <ggaren@apple.com>
1801
1802         Reviewed by Maciej.
1803
1804         Moved files around to make WebCore's structure clearer
1805         and easier to explain.
1806
1807         DerivedSources/JS* -> bindings/js/DerivedSources/ (so JS* files
1808         show up when you search inside bindings/js/, but are marked, at
1809         the same time, as files that you should not edit manually)
1810
1811         WebCore+SVG/DOMList.h -> ksvg2/svg/ (only files inside ksvg2/svg/
1812         use DOMList.h)
1813
1814         icon -> loader/icon
1815
1816         I tested that everything still builds.
1817
1818 2006-07-30  Darin Adler  <darin@apple.com>
1819
1820         Reviewed by Tim Hatcher.
1821
1822         - some improvements for the benefit of the style pane of the inspector
1823
1824         * css/CSSComputedStyleDeclaration.cpp: Removed background-position
1825         and border-spacing from the list of properties that show up in
1826         computed style, because of background-position-x, background-position-y,
1827         -webkit-border-horizontal-spacing and -webkit-border-vertical-spacing.
1828         (WebCore::valueForLength): Added handling for undefinedLength, intrinsic,
1829         and min-intrinsic.
1830         (WebCore::primitiveValueFromLength): Removed code that would add a
1831         space to the string for no good reason.
1832         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Added a
1833         special case for a line clamp of -1, which should come back as "none"
1834         rather than an actual "-1".
1835         (WebCore::CSSComputedStyleDeclaration::length): Return 0 if the
1836         declaration has no corresponding node or no renderer.
1837         (WebCore::CSSComputedStyleDeclaration::item): Check against length()
1838         so that the two stay consistent rather than using a constant.
1839
1840         * css/CSSPrimitiveValue.cpp:
1841         (WebCore::isCSSTokenizerIdentifier): Added.
1842         (WebCore::isCSSTokenizerURL): Added.
1843         (WebCore::quoteString): Added.
1844         (WebCore::quoteStringIfNeeded): Changed to quote strings in many more
1845         cases -- any cases where they would not parse in the CSS parser otherwise.
1846         The main case this affects is font names with spaces in them.
1847         (WebCore::quoteURLIfNeeded): Added.
1848         (WebCore::CSSPrimitiveValue::cssText): Use quoteURLIfNeeded in the case
1849         where we're making the text form of a URI.
1850
1851         * css/tokenizer.flex: Whitespace tweaks to line things up better.
1852
1853 2006-07-30  Eric Seidel  <eric@eseidel.com>
1854
1855         Reviewed by gramps!
1856
1857         Remove some unused SVG code.
1858
1859         * ksvg2/ecma/Ecma.cpp: Removed.
1860         * ksvg2/ecma/Ecma.h: Removed.
1861         * ksvg2/ecma/GlobalObject.cpp: remove a couple dead functions.
1862         * ksvg2/ecma/GlobalObject.h: add a comment about this dead code.
1863         * ksvg2/ecma/SVGLookup.h: Removed.
1864
1865 2006-07-29  Darin Adler  <darin@apple.com>
1866
1867         - Removed tabs from these source files that still had them.
1868           We don't use them; that way source files look fine in editors
1869           that have tabs set to 8 spaces or to 4 spaces.
1870         - Removed allow-tabs Subversion property from the files too.
1871
1872         * bindings/objc/WebScriptObject.h:
1873         * bindings/objc/WebScriptObject.mm:
1874         * platform/FontData.cpp:
1875
1876 2006-07-29  Sam Weinig  <sam.weinig@gmail.com>
1877
1878         Reviewed by Darin.
1879
1880         - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10080
1881           Adopt pedantic changes from the Unity project to improve 
1882           cross-compiler compatibility
1883
1884           Changes include:
1885           * Removing trailing semicolon from namespace braces.
1886           * Removing trailing comma from last enum declaration.
1887           * Updating to match style guidelines.
1888           * Adding missing newline to the end of the file.
1889           * Turning on gcc warning for missing newline at the end of a source file
1890             (GCC_WARN_ABOUT_MISSING_NEWLINE in Xcode, -Wnewline in gcc).
1891           * Alphabetical sorting of Xcode source list files.
1892           * Use abs() function from <math.h> instead of ABS() macro.
1893           * Use C-style comments instead of C++ comments in files that might
1894             be included by either C or C++ files.
1895           * Use -numeric_limits<double>::infinity() instead of -HUGE_VAL.
1896
1897         * WebCore+SVG/DOMList.h:
1898         * WebCore.xcodeproj/project.pbxproj:
1899         * WebCorePrefix.h:
1900         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1901         * bindings/js/JSXSLTProcessor.h:
1902         * bindings/js/kjs_domnode.h:
1903         (KJS::DOMNode::):
1904         * bindings/objc/DOMCSS.h:
1905         (-[DOMCSSValue enum]):
1906         * bindings/objc/DOMCore.h:
1907         (-[DOMImplementation createDocument:::]):
1908         * bindings/objc/DOMEvents.h:
1909         (-[DOMOverflowEvent enum]):
1910         * bindings/objc/DOMRange.h:
1911         * bindings/objc/DOMTraversal.h:
1912         * bindings/objc/DOMXPath.h:
1913         (-[DOMXPathNSResolver lookupNamespaceURI:]):
1914         * bridge/mac/WebCoreFrameBridge.h:
1915         * bridge/mac/WebCoreKeyboardAccess.h:
1916         * css/makeprop:
1917         * css/makevalues:
1918         * dom/ChildNodeList.h:
1919         * dom/DocPtr.h:
1920         * dom/Document.h:
1921         (WebCore::Document::):
1922         * dom/DocumentMarker.h:
1923         (WebCore::DocumentMarker::):
1924         (WebCore::DocumentMarker::operator==):
1925         (WebCore::DocumentMarker::operator!=):
1926         * dom/EventTargetNode.h:
1927         * dom/KeyboardEvent.h:
1928         (WebCore::KeyboardEvent::):
1929         * dom/NameNodeList.h:
1930         (WebCore::NameNodeList::rootNodeChildrenChanged):
1931         * dom/QualifiedName.cpp:
1932         * editing/TypingCommand.h:
1933         (WebCore::TypingCommand::):
1934         * editing/UnlinkCommand.h:
1935         (WebCore::UnlinkCommand::editingAction):
1936         * html/FormDataList.h:
1937         (WebCore::FormDataListItem::FormDataListItem):
1938         (WebCore::FormDataList::appendData):
1939         * html/HTMLBlockquoteElement.h:
1940         * html/HTMLDivElement.h:
1941         * html/HTMLFormElement.h:
1942         * html/HTMLHRElement.h:
1943         * html/HTMLHeadingElement.h:
1944         * html/HTMLMarqueeElement.h:
1945         * html/HTMLParagraphElement.h:
1946         * html/HTMLPlugInElement.h:
1947         * html/HTMLPreElement.h:
1948         * html/HTMLTokenizer.h:
1949         (WebCore::HTMLTokenizer::State::):
1950         * icon/IconDatabase.cpp:
1951         * icon/SQLStatement.cpp:
1952         * kcanvas/KCanvasFilters.h:
1953         (WebCore::):
1954         (WebCore::KCanvasPoint3F::KCanvasPoint3F):
1955         (WebCore::KCanvasFilter::KCanvasFilter):
1956         (WebCore::KCanvasFilter::~KCanvasFilter):
1957         (WebCore::KCanvasFilterEffect::~KCanvasFilterEffect):
1958         (WebCore::KCComponentTransferFunction::KCComponentTransferFunction):
1959         (WebCore::KCanvasFEConvolveMatrix::KCanvasFEConvolveMatrix):
1960         (WebCore::KCLightSource::KCLightSource):
1961         (WebCore::KCDistantLightSource::KCDistantLightSource):
1962         (WebCore::KCPointLightSource::KCPointLightSource):
1963         (WebCore::KCSpotLightSource::KCSpotLightSource):
1964         (WebCore::KCanvasFEDiffuseLighting::KCanvasFEDiffuseLighting):
1965         (WebCore::KCanvasFEDisplacementMap::KCanvasFEDisplacementMap):
1966         (WebCore::KCanvasFEImage::KCanvasFEImage):
1967         (WebCore::KCanvasFESpecularLighting::KCanvasFESpecularLighting):
1968         * kcanvas/RenderSVGImage.h:
1969         * kcanvas/device/quartz/KRenderingDeviceQuartz.h:
1970         * ksvg2/css/SVGRenderStyle.h:
1971         (WebCore::SVGRenderStyle::InheritedFlags::):
1972         (WebCore::SVGRenderStyle::NonInheritedFlags::):
1973         * ksvg2/css/SVGRenderStyleDefs.h:
1974         (WebCore::):
1975         * ksvg2/events/SVGZoomEvent.h:
1976         * ksvg2/ksvg.h:
1977         (WebCore::):
1978         * ksvg2/misc/KCanvasRenderingStyle.h:
1979         * ksvg2/misc/SVGImageLoader.h:
1980         * ksvg2/scripts/make_names.pl:
1981         * ksvg2/svg/SVGAElement.h:
1982         * ksvg2/svg/SVGAngle.h:
1983         * ksvg2/svg/SVGAnimateColorElement.h:
1984         * ksvg2/svg/SVGAnimateElement.h:
1985         * ksvg2/svg/SVGAnimateTransformElement.h:
1986         * ksvg2/svg/SVGAnimatedAngle.h:
1987         * ksvg2/svg/SVGAnimatedBoolean.h:
1988         * ksvg2/svg/SVGAnimatedColor.h:
1989         * ksvg2/svg/SVGAnimatedEnumeration.h:
1990         * ksvg2/svg/SVGAnimatedInteger.h:
1991         * ksvg2/svg/SVGAnimatedLength.h:
1992         * ksvg2/svg/SVGAnimatedLengthList.h:
1993         * ksvg2/svg/SVGAnimatedNumber.h:
1994         * ksvg2/svg/SVGAnimatedNumberList.h:
1995         * ksvg2/svg/SVGAnimatedPathData.h:
1996         * ksvg2/svg/SVGAnimatedPoints.h:
1997         * ksvg2/svg/SVGAnimatedPreserveAspectRatio.h:
1998         * ksvg2/svg/SVGAnimatedRect.h:
1999         * ksvg2/svg/SVGAnimatedString.h:
2000         * ksvg2/svg/SVGAnimatedTemplate.h:
2001         * ksvg2/svg/SVGAnimatedTransformList.h:
2002         * ksvg2/svg/SVGAnimationElement.cpp:
2003         (SVGAnimationElement::calculateCurrentValueItem):
2004         (SVGAnimationElement::calculateRelativeTimePercentage):
2005         * ksvg2/svg/SVGAnimationElement.h:
2006         (WebCore::):
2007         * ksvg2/svg/SVGCircleElement.h:
2008         * ksvg2/svg/SVGClipPathElement.h:
2009         * ksvg2/svg/SVGColor.h:
2010         * ksvg2/svg/SVGComponentTransferFunctionElement.h:
2011         * ksvg2/svg/SVGCursorElement.h:
2012         * ksvg2/svg/SVGDOMImplementation.h:
2013         * ksvg2/svg/SVGDefsElement.h:
2014         * ksvg2/svg/SVGDescElement.h:
2015         * ksvg2/svg/SVGDocument.h:
2016         * ksvg2/svg/SVGElement.h:
2017         (WebCore::SVGElement::rendererIsNeeded):
2018         (WebCore::svg_dynamic_cast):
2019         * ksvg2/svg/SVGElementInstance.h:
2020         * ksvg2/svg/SVGElementInstanceList.h:
2021         * ksvg2/svg/SVGEllipseElement.h:
2022         * ksvg2/svg/SVGExternalResourcesRequired.h:
2023         * ksvg2/svg/SVGFEBlendElement.h:
2024         * ksvg2/svg/SVGFEColorMatrixElement.h:
2025         * ksvg2/svg/SVGFEComponentTransferElement.h:
2026         * ksvg2/svg/SVGFECompositeElement.h:
2027         * ksvg2/svg/SVGFEDiffuseLightingElement.h:
2028         * ksvg2/svg/SVGFEDisplacementMapElement.h:
2029         * ksvg2/svg/SVGFEDistantLightElement.h:
2030         * ksvg2/svg/SVGFEFloodElement.h:
2031         * ksvg2/svg/SVGFEFuncAElement.h:
2032         * ksvg2/svg/SVGFEFuncBElement.h:
2033         * ksvg2/svg/SVGFEFuncGElement.h:
2034         * ksvg2/svg/SVGFEFuncRElement.h:
2035         * ksvg2/svg/SVGFEGaussianBlurElement.h:
2036         * ksvg2/svg/SVGFEImageElement.h:
2037         * ksvg2/svg/SVGFELightElement.h:
2038         * ksvg2/svg/SVGFEMergeElement.h:
2039         * ksvg2/svg/SVGFEMergeNodeElement.h:
2040         * ksvg2/svg/SVGFEOffsetElement.h:
2041         * ksvg2/svg/SVGFEPointLightElement.h:
2042         * ksvg2/svg/SVGFESpecularLightingElement.h:
2043         * ksvg2/svg/SVGFESpotLightElement.h:
2044         * ksvg2/svg/SVGFETileElement.h:
2045         * ksvg2/svg/SVGFETurbulenceElement.h:
2046         * ksvg2/svg/SVGFilterElement.h:
2047         * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.h:
2048         * ksvg2/svg/SVGFitToViewBox.h:
2049         * ksvg2/svg/SVGForeignObjectElement.cpp:
2050         * ksvg2/svg/SVGForeignObjectElement.h:
2051         * ksvg2/svg/SVGGElement.h:
2052         * ksvg2/svg/SVGGradientElement.h:
2053         * ksvg2/svg/SVGHelper.h:
2054         (WebCore::):
2055         * ksvg2/svg/SVGImageElement.h:
2056         * ksvg2/svg/SVGLangSpace.h:
2057         * ksvg2/svg/SVGLength.h:
2058         * ksvg2/svg/SVGLengthList.h:
2059         * ksvg2/svg/SVGLineElement.h:
2060         * ksvg2/svg/SVGLinearGradientElement.h:
2061         * ksvg2/svg/SVGList.h:
2062         * ksvg2/svg/SVGLocatable.h:
2063         * ksvg2/svg/SVGMarkerElement.h:
2064         * ksvg2/svg/SVGMaskElement.h:
2065         * ksvg2/svg/SVGMatrix.h:
2066         * ksvg2/svg/SVGNumber.h:
2067         * ksvg2/svg/SVGNumberList.h:
2068         * ksvg2/svg/SVGPaint.h:
2069         * ksvg2/svg/SVGPathElement.h:
2070         * ksvg2/svg/SVGPathSeg.h:
2071         * ksvg2/svg/SVGPathSegArc.h:
2072         * ksvg2/svg/SVGPathSegClosePath.h:
2073         * ksvg2/svg/SVGPathSegCurvetoCubic.h:
2074         * ksvg2/svg/SVGPathSegCurvetoCubicSmooth.h:
2075         * ksvg2/svg/SVGPathSegCurvetoQuadratic.h:
2076         * ksvg2/svg/SVGPathSegCurvetoQuadraticSmooth.h:
2077         * ksvg2/svg/SVGPathSegLineto.h:
2078         * ksvg2/svg/SVGPathSegLinetoHorizontal.h:
2079         * ksvg2/svg/SVGPathSegLinetoVertical.h:
2080         * ksvg2/svg/SVGPathSegList.h:
2081         * ksvg2/svg/SVGPathSegMoveto.h:
2082         * ksvg2/svg/SVGPatternElement.h:
2083         * ksvg2/svg/SVGPoint.h:
2084         * ksvg2/svg/SVGPointList.h:
2085         * ksvg2/svg/SVGPolyElement.h:
2086         * ksvg2/svg/SVGPolygonElement.h:
2087         * ksvg2/svg/SVGPolylineElement.h:
2088         * ksvg2/svg/SVGPreserveAspectRatio.h:
2089         * ksvg2/svg/SVGRadialGradientElement.h:
2090         * ksvg2/svg/SVGRect.h:
2091         * ksvg2/svg/SVGRectElement.h:
2092         * ksvg2/svg/SVGSVGElement.h:
2093         * ksvg2/svg/SVGScriptElement.h:
2094         * ksvg2/svg/SVGSetElement.h:
2095         * ksvg2/svg/SVGStopElement.h:
2096         * ksvg2/svg/SVGStringList.h:
2097         * ksvg2/svg/SVGStylable.h:
2098         * ksvg2/svg/SVGStyleElement.h:
2099         * ksvg2/svg/SVGStyledElement.h:
2100         (WebCore::SVGStyledElement::rendererIsNeeded):
2101         (WebCore::SVGStyledElement::canvasResource):
2102         * ksvg2/svg/SVGStyledLocatableElement.h:
2103         * ksvg2/svg/SVGStyledTransformableElement.h:
2104         * ksvg2/svg/SVGSwitchElement.h:
2105         * ksvg2/svg/SVGSymbolElement.h:
2106         * ksvg2/svg/SVGTRefElement.h:
2107         * ksvg2/svg/SVGTSpanElement.h:
2108         * ksvg2/svg/SVGTests.h:
2109         * ksvg2/svg/SVGTextContentElement.h:
2110         * ksvg2/svg/SVGTextElement.h:
2111         * ksvg2/svg/SVGTextPositioningElement.h:
2112         * ksvg2/svg/SVGTitleElement.h:
2113         * ksvg2/svg/SVGTransform.h:
2114         * ksvg2/svg/SVGTransformList.h:
2115         * ksvg2/svg/SVGTransformable.h:
2116         * ksvg2/svg/SVGURIReference.h:
2117         * ksvg2/svg/SVGUseElement.h:
2118         * ksvg2/svg/SVGViewElement.h:
2119         * ksvg2/svg/SVGZoomAndPan.h:
2120         * ksvg2/svg/svgpathparser.h:
2121         * page/Frame.h:
2122         (WebCore::):
2123         * platform/AffineTransform.h:
2124         * platform/FontCache.cpp:
2125         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
2126         * platform/FontData.cpp:
2127         (WebCore::FontData::FontData):
2128         * platform/FontData.h:
2129         * platform/TextBox.h:
2130         (WebCore::TextBox::):
2131         * platform/Timer.cpp:
2132         (WebCore::TimerBase::heapPop):
2133         * platform/mac/FontCacheMac.mm:
2134         * platform/mac/GlyphMapMac.cpp:
2135         * platform/mac/WebFontCache.mm:
2136         (betterChoice):
2137         * rendering/DeprecatedRenderSelect.cpp:
2138         (WebCore::DeprecatedRenderSelect::setWidgetWritingDirection):
2139         * rendering/EllipsisBox.h:
2140         * rendering/RenderBR.h:
2141         (WebCore::RenderBR::renderName):
2142         (WebCore::RenderBR::width):
2143         * rendering/RenderBlock.h:
2144         (WebCore::):
2145         * rendering/RenderFlexibleBox.h:
2146         * rendering/RenderFlow.h:
2147         (WebCore::RenderFlow::RenderFlow):
2148         * rendering/RenderFrame.cpp:
2149         * rendering/bidi.h:
2150         * rendering/break_lines.cpp:
2151
2152 2006-07-29  Rob Buis  <buis@kde.org>
2153
2154         Reviewed by Geoff.
2155
2156         http://bugzilla.opendarwin.org/show_bug.cgi?id=10151
2157         ghostmap XHTML + SVG fails due to javascript undefined exception
2158
2159         Make sure document.URL works when called from a non-HTML document.
2160
2161         * bindings/js/kjs_html.cpp:
2162         (KJS::JSHTMLDocument::getValueProperty):
2163         * bindings/js/kjs_html.h:
2164         (KJS::JSHTMLDocument::):
2165         * dom/Document.idl:
2166
2167 2006-07-29  Mike Emmel  <mike.emmel@gmail.com>
2168
2169         Reviewed and tweaked by Darin.
2170
2171         - fixes for Linux build
2172           (still might not compile, since Darin tweaked but was unable to test).
2173
2174         * WebCoreSources.bkl: Added some new sources, removed some obsolete ones.
2175         * Projects/gdk/webcore-gdk.bkl: Added RenderPopupMenuGdk.cpp
2176
2177         * html/HTMLPlugInElement.h: Removed incorrect syntax with class name
2178         before ::.
2179
2180         * platform/gdk/FrameGdk.h:
2181         * platform/gdk/FrameGdk.cpp: Updated parameters of constructor. Moved a couple stubs
2182         out of this file.
2183         * platform/gdk/RenderPopupMenuGdk.h: Added.
2184         * platform/gdk/RenderPopupMenuGdk.cpp: Added. Just a file full of empty stubs.
2185         * platform/gdk/RenderThemeGdk.h:
2186         * platform/gdk/RenderThemeGdk.cpp: (WebCore::RenderThemeGdk::createPopupMenu): Added.
2187
2188         * platform/gdk/TemporaryLinkStubs.cpp: Add some new stubs.
2189
2190 2006-07-29  Mark Rowe  <opendarwin.org@bdash.net.nz>
2191
2192         Reviewed by Darin.
2193
2194         http://bugzilla.opendarwin.org/show_bug.cgi?id=10022
2195         Bug 10022: REGRESSION: Crash in WebCore::XMLTokenizer::characters
2196
2197         * dom/XMLTokenizer.cpp:
2198         (WebCore::XMLTokenizer::resumeParsing): If the write() call resulted in new callbacks being
2199         added, don't call through to end() just yet.
2200
2201 2006-07-29  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2202
2203         Reviewed by John Sullivan.
2204
2205         - manual test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9984
2206           ASSERTION FAILURE: _private->mouseDownEvent != nil
2207           (WebKit/WebView/WebHTMLView.m:4863 -[WebHTMLView(WebInternal) _delegateDragSourceActionMask])
2208
2209         * manual-tests/subview-click-assertion.html: Added.
2210
2211 2006-07-29  Andrew Wellington  <proton@wiretapped.net>
2212
2213         Reviewed by Darin.
2214
2215         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8587 / <rdar://problem/4631844>
2216         REGRESSION: {display:list-item} items outside an ol or ul element don't number correctly
2217
2218         * rendering/RenderListItem.cpp:
2219         (WebCore::enclosingList): If no real list element is found, use parent instead.
2220         (WebCore::previousListItem): Check list elements to see if they are list items -- the
2221         old code assumed that a list would never be a list item but this is entirely possible
2222         with CSS and especially with the new rule that means any DOM element could act as a list.
2223
2224 2006-07-29  Alexey Proskuryakov  <ap@nypop.com>
2225
2226         Reviewed by Darin.
2227
2228         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10147
2229         REGRESSION: custom attribute values set via javascript are not persistent
2230
2231         Test: fast/dom/Element/setAttribute-case-insensitivity.html
2232
2233         * dom/Element.cpp:
2234         (WebCore::Element::setAttribute): Use the lowercased localName for retrieving the old value, too.
2235
2236 2006-07-28  Timothy Hatcher  <timothy@apple.com>
2237
2238         Suggested by Darin.
2239
2240         Moving the implementation of isContentEditable to the
2241         the WebPrivate category.
2242
2243         * bindings/objc/DOM.mm:
2244         (-[DOMNode isContentEditable]):
2245
2246 2006-07-28  Justin Garcia  <justin.garcia@apple.com>
2247
2248         Reviewed by levi
2249         
2250         First part of:
2251         <rdar://problem/4515463>
2252         REGRESSION: Blot and Mail both do a very poor job of pasting the main www.apple.com page
2253         
2254         Migrate to isBlock and enclosingBlock.
2255         Changed RendereringInfo::isBlock and ReplacementFragment::isBlock
2256         to wasBlock so that they don't conflict with isBlock and because
2257         it's more descriptive.
2258
2259         * editing/ReplaceSelectionCommand.cpp:
2260         (WebCore::ReplacementFragment::mergeStartNode):
2261         (WebCore::ReplacementFragment::wasBlock):
2262         (WebCore::ReplacementFragment::saveRenderingInfo):
2263         (WebCore::ReplacementFragment::renderedBlocks):
2264         (WebCore::RenderingInfo::RenderingInfo):
2265         (WebCore::ReplaceSelectionCommand::shouldMergeStart):
2266         (WebCore::ReplaceSelectionCommand::doApply):
2267         * editing/ReplaceSelectionCommand.h:
2268         (WebCore::RenderingInfo::wasBlock):
2269
2270 2006-07-27  Justin Garcia  <justin.garcia@apple.com>
2271
2272         Reviewed by levi
2273         
2274         More changes for:
2275         <rdar://problem/4242293>
2276         Poor paste fidelity of http://www.google.com/
2277
2278         * editing/markup.cpp:
2279         (WebCore::needInterchangeNewlineAfter): Added.
2280         (WebCore::createMarkup): 
2281         Only add an interchangeNewline if we're annotating for interchange.  Can't test 
2282         this until we expose createMarkup in non-annotate mode (I'd expose Range::toHTML).
2283         Remove the FIXME about prepending the interchangeNewline before creating the rest 
2284         of the markup.  Its correct to surround the interchangeNewline in ancestors of the
2285         adjusted startNode.
2286         Fixed the check to see if an interchangeNewline is needed (!inSameBlock).  This would
2287         add an interchangeNewline for a selection that started before a table.
2288         Removed the workaround for the bug where markup for a table was not included when 
2289         selecting the contents of a table, since this change fixes the general problem of 
2290         markup for ancestors of the startNode being left out.
2291         Don't leave out ancestors of the startNode as we leave their subtrees.  Execute the
2292         code to include them even if we closed ancestors in the ancestorsToClose list.
2293
2294 2006-07-28  Timothy Hatcher  <timothy@apple.com>
2295
2296         Reviewed by John.
2297
2298         Adding isContentEditable to DOMNode's private category. 
2299
2300         * bindings/objc/DOMPrivate.h:
2301
2302 2006-07-28  Alexey Proskuryakov  <ap@nypop.com>
2303
2304         Rolling out http://bugzilla.opendarwin.org/show_bug.cgi?id=6010 because of failing layout tests.
2305         Add better SVGLoad event support.
2306
2307         * dom/EventTargetNode.cpp:
2308         (WebCore::EventTargetNode::dispatchGenericEvent):
2309         * html/HTMLImageLoader.cpp:
2310         (WebCore::HTMLImageLoader::dispatchLoadEvent):
2311         * html/HTMLImageLoader.h:
2312         * ksvg2/misc/SVGImageLoader.cpp:
2313         (WebCore::SVGImageLoader::SVGImageLoader):
2314         * ksvg2/misc/SVGImageLoader.h:
2315         * ksvg2/svg/SVGAElement.cpp:
2316         (WebCore::SVGAElement::parseMappedAttribute):
2317         * ksvg2/svg/SVGAnimatedBoolean.h:
2318         * ksvg2/svg/SVGElement.cpp:
2319         (WebCore::SVGElement::SVGElement):
2320         (WebCore::SVGElement::parseMappedAttribute):
2321         * ksvg2/svg/SVGElement.h:
2322         (WebCore::SVGElement::adjustViewportClipping):
2323         (WebCore::SVGElement::closeRenderer):
2324         (WebCore::SVGElement::rendererIsNeeded):
2325         (WebCore::SVGElement::isClosed):
2326         (WebCore::svg_dynamic_cast):
2327         * ksvg2/svg/SVGExternalResourcesRequired.h:
2328         * ksvg2/svg/SVGImageElement.cpp:
2329         (SVGImageElement::SVGImageElement):
2330         * ksvg2/svg/SVGImageElement.h:
2331         * ksvg2/svg/SVGSVGElement.cpp:
2332         (WebCore::SVGSVGElement::parseMappedAttribute):
2333         * ksvg2/svg/SVGScriptElement.cpp:
2334         (SVGScriptElement::SVGScriptElement):
2335         (SVGScriptElement::parseMappedAttribute):
2336         (SVGScriptElement::executeScript):
2337         * xml/xmlhttprequest.cpp:
2338         (WebCore::XMLHttpRequest::callReadyStateChangeListener):
2339
2340 2006-07-28  Adele Peterson  <adele@apple.com>
2341
2342         Rolling out http://bugzilla.opendarwin.org/show_bug.cgi?id=9753 because of failing layout tests.
2343         SVG with width and height 100% leaves room for scrollbar on the right.
2344
2345         * kcanvas/RenderPath.cpp:
2346         * kcanvas/RenderPath.h:
2347         * kcanvas/RenderSVGContainer.cpp:
2348         (WebCore::RenderSVGContainer::layout):
2349         * ksvg2/svg/SVGCircleElement.cpp:
2350         * ksvg2/svg/SVGCircleElement.h:
2351         * ksvg2/svg/SVGEllipseElement.cpp:
2352         * ksvg2/svg/SVGEllipseElement.h:
2353         * ksvg2/svg/SVGLineElement.cpp:
2354         * ksvg2/svg/SVGLineElement.h:
2355         * ksvg2/svg/SVGRectElement.cpp:
2356         * ksvg2/svg/SVGRectElement.h:
2357         * ksvg2/svg/SVGStyledElement.h:
2358
2359 2006-07-27  Eric Seidel  <eric@eseidel.com>
2360
2361         Reviewed by darin.
2362         
2363         Add better SVGLoad event support.
2364         http://bugzilla.opendarwin.org/show_bug.cgi?id=6010
2365         There will still need to be additional support added for <link> and <script> elements.
2366         Not all of the error -> loaded -> error transition cases work yet.
2367
2368         * dom/EventTargetNode.cpp:
2369         (WebCore::EventTargetNode::dispatchGenericEvent):
2370         * html/HTMLImageLoader.cpp:
2371         (WebCore::HTMLImageLoader::dispatchLoadEvent):
2372         * html/HTMLImageLoader.h:
2373         (WebCore::HTMLImageLoader::haveFiredLoadEvent):
2374         (WebCore::HTMLImageLoader::setHaveFiredLoadEvent):
2375         * ksvg2/misc/SVGImageLoader.cpp:
2376         (WebCore::SVGImageLoader::SVGImageLoader):
2377         (WebCore::SVGImageLoader::dispatchLoadEvent):
2378         * ksvg2/misc/SVGImageLoader.h:
2379         * ksvg2/svg/SVGAElement.cpp:
2380         (WebCore::SVGAElement::parseMappedAttribute):
2381         * ksvg2/svg/SVGAnimatedBoolean.h:
2382         * ksvg2/svg/SVGElement.cpp:
2383         (WebCore::SVGElement::SVGElement):
2384         (WebCore::SVGElement::parseMappedAttribute):
2385         (WebCore::SVGElement::haveLoadedRequiredResources):
2386         (WebCore::SVGElement::sendSVGLoadEventIfPossible):
2387         (WebCore::SVGElement::closeRenderer):
2388         * ksvg2/svg/SVGElement.h:
2389         (WebCore::SVGElement::rendererIsNeeded):
2390         (WebCore::svg_dynamic_cast):
2391         * ksvg2/svg/SVGExternalResourcesRequired.h:
2392         * ksvg2/svg/SVGImageElement.cpp:
2393         (SVGImageElement::SVGImageElement):
2394         (SVGImageElement::haveLoadedRequiredResources):
2395         * ksvg2/svg/SVGImageElement.h:
2396         * ksvg2/svg/SVGSVGElement.cpp:
2397         (WebCore::SVGSVGElement::parseMappedAttribute):
2398         * ksvg2/svg/SVGScriptElement.cpp:
2399         (WebCore::SVGScriptElement::SVGScriptElement):
2400         (WebCore::SVGScriptElement::parseMappedAttribute):
2401         (WebCore::SVGScriptElement::executeScript):
2402         * xml/xmlhttprequest.cpp:
2403         (WebCore::XMLHttpRequest::callReadyStateChangeListener): use new Event() instead of createEvent
2404
2405 2006-07-27  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2406
2407         Reviewed by Anders.
2408
2409         - http://bugzilla.opendarwin.org/show_bug.cgi?id=10135
2410           Cleanup: remove useless parameters from RenderObject::position()
2411
2412         No test possible (no functionality change)
2413
2414         * rendering/RenderBox.cpp:
2415         (WebCore::RenderBox::position):
2416         * rendering/RenderBox.h:
2417         * rendering/RenderObject.h:
2418         (WebCore::RenderObject::position):
2419         * rendering/RenderTableRow.h:
2420         (WebCore::RenderTableRow::position):
2421         * rendering/RenderTableSection.h:
2422         (WebCore::RenderTableSection::position):
2423         * rendering/RenderText.cpp:
2424         (WebCore::RenderText::position):
2425         * rendering/RenderText.h:
2426         * rendering/bidi.cpp:
2427         (WebCore::RenderBlock::constructLine):
2428         (WebCore::RenderBlock::computeVerticalPositionsForLine):
2429
2430 2006-07-27  Rob Buis  <buis@kde.org>
2431
2432         Reviewed by Maciej.
2433
2434         http://bugzilla.opendarwin.org/show_bug.cgi?id=9753
2435         SVG with width and height 100% leaves room for scrollbar on the right.
2436
2437         Relayout children of svg containers, except svg shapes that do not depend on percentages.
2438
2439         * kcanvas/RenderPath.cpp: (WebCore::RenderPath::hasPercentageValues):
2440         * kcanvas/RenderPath.h:
2441         * kcanvas/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::layout):
2442         * ksvg2/svg/SVGCircleElement.cpp: (SVGCircleElement::hasPercentageValues):
2443         * ksvg2/svg/SVGCircleElement.h:
2444         * ksvg2/svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::hasPercentageValues):
2445         * ksvg2/svg/SVGEllipseElement.h:
2446         * ksvg2/svg/SVGLineElement.cpp: (SVGLineElement::hasPercentageValues):
2447         * ksvg2/svg/SVGLineElement.h:
2448         * ksvg2/svg/SVGRectElement.cpp: (WebCore::SVGRectElement::hasPercentageValues):
2449         * ksvg2/svg/SVGRectElement.h:
2450         * ksvg2/svg/SVGStyledElement.h: (WebCore::SVGStyledElement::hasPercentageValues):
2451
2452 2006-07-27  Justin Garcia  <justin.garcia@apple.com>
2453
2454         Reviewed by levi
2455         
2456         <rdar://problem/4242293>
2457         Poor paste fidelity of http://www.google.com/
2458
2459         * editing/ApplyStyleCommand.cpp:
2460         (WebCore::ApplyStyleCommand::applyInlineStyle):  Fixed crasher with nil-check.
2461         * editing/markup.cpp:
2462         (WebCore::startMarkup): Style information wasn't added to an element if it had
2463         attributes but no style attribute.
2464
2465 2006-07-27  Alexander Kellett  <lypanov@kde.org>
2466
2467         Reviewed by Darin.
2468
2469         - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9867
2470           REGRESSION: code that modifies form element in Firefox modifies form attribute in WebKit
2471
2472         * bindings/scripts/CodeGeneratorJS.pm: add new attribute - HasOverridingNameGetter
2473         * html/HTMLFormElement.idl:
2474
2475 2006-07-27  Rob Buis  <buis@kde.org>
2476
2477         Reviewed by Anders.
2478
2479         http://bugzilla.opendarwin.org/show_bug.cgi?id=8992
2480         Some HTML DOM attributes have incorrect types
2481
2482         Adjust idl and dom source code for HTMLImageElement and
2483         HTMLBaseFontElement to choose correct type for
2484         HTMLImageElement::border and HTMLBaseFontElement::size
2485         attributes.
2486
2487         * html/HTMLBaseFontElement.cpp:
2488         (WebCore::HTMLBaseFontElement::size):
2489         (WebCore::HTMLBaseFontElement::setSize):
2490         * html/HTMLBaseFontElement.h:
2491         * html/HTMLBaseFontElement.idl:
2492         * html/HTMLImageElement.cpp:
2493         (WebCore::HTMLImageElement::border):
2494         (WebCore::HTMLImageElement::setBorder):
2495         * html/HTMLImageElement.h:
2496         * html/HTMLImageElement.idl:
2497
2498 2006-07-27  Justin Garcia  <justin.garcia@apple.com>
2499
2500         Reviewed by levi
2501         
2502         <rdar://problem/4628409>
2503         Safari crashes in CompositeEditCommand::removeBlockPlaceholder entering text in a web page form
2504
2505         * editing/CompositeEditCommand.cpp:
2506         (WebCore::CompositeEditCommand::removeBlockPlaceholder): 
2507         A script on the page shrinks the textarea down to zero rows just
2508         before insertion.  That gives the shadow div a zero height, removing
2509         [div, 0] as a candidate for a VisiblePosition.  Then 
2510         InsertTextCommand::input() tries to create a VisiblePosition from 
2511         [div, 0] and fails.  A nil check is a quick fix.  Another might
2512         be to make positions where there is a caret selection candidates.
2513         Another might be to make any [div, 0] where div is a shadow div inside
2514         a form element a candidate.
2515
2516 2006-07-27  Graham Dennis  <graham.dennis@gmail.com>
2517
2518         Reviewed by Darin.
2519
2520         - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=10094
2521           Japanese characters improperly rendering in TOT
2522           
2523         Test: fast/encoding/denormalised-voiced-japanese-chars.html
2524
2525         * platform/Font.cpp:
2526         (WebCore::WidthIterator::advance): pass currentCharacter to normalizeVoicingMarks
2527         (WebCore::WidthIterator::normalizeVoicingMarks): turn the currentCharacter variable
2528         into an argument as WidthIterator::advance doesn't update m_currentCharacter while
2529         looping
2530
2531 2006-07-27  Eric Seidel  <eric@eseidel.com>
2532
2533         Reviewed by ap.
2534
2535         Complex entities seem to fail on TOT
2536         http://bugzilla.opendarwin.org/show_bug.cgi?id=6390
2537         Use an alternative work-around to an XML Entity parsing bug.
2538
2539         * dom/XMLTokenizer.cpp:
2540         (WebCore::XMLTokenizer::write):
2541         (WebCore::hackAroundLibXMLEntityBug): added.
2542         (WebCore::startElementNsHandler):
2543         (WebCore::endElementNsHandler):
2544         (WebCore::charactersHandler):
2545         (WebCore::processingInstructionHandler):
2546         (WebCore::cdataBlockHandler):
2547         (WebCore::commentHandler):
2548         (WebCore::getEntityHandler):
2549
2550 2006-07-27  Rob Buis  <buis@kde.org>
2551
2552         Reviewed by Darin.
2553
2554         http://bugzilla.opendarwin.org/show_bug.cgi?id=9938
2555         Fix viewBox issues in Hixie's test
2556
2557         Do a more accurate and quicker job of parsing the viewBox
2558         attribute. Handle properly on negative width/height and
2559         invalid syntax in general.
2560
2561         * ksvg2/svg/SVGFitToViewBox.cpp:
2562         (SVGFitToViewBox::parseViewBox):
2563
2564 2006-07-27  Eric Seidel  <eric@eseidel.com>
2565
2566         Reviewed by ap.
2567
2568         Enables getSVGDocument() support for HTMLObjectElement and HTMLEmbedElement
2569         http://bugzilla.opendarwin.org/show_bug.cgi?id=9237
2570         This patch does not try to autogenerate anything, but enables the SVG functionality.
2571         Also fix HTMLObjectElement vspace and hspace to be numbers instead of strings to match IE & Firefox.
2572
2573         * bindings/js/kjs_dom.cpp:
2574         (KJS::toJS):
2575         * bindings/js/kjs_html.cpp:
2576         (KJS::JSHTMLElement::objectGetter):
2577         (KJS::HTMLElementFunction::callAsFunction):
2578         (KJS::JSHTMLElement::objectSetter):
2579         * bindings/js/kjs_html.h:
2580         (KJS::JSHTMLElement::):
2581         * dom/Document.h:
2582         (WebCore::Document::isSVGDocument):
2583         * html/HTMLEmbedElement.cpp:
2584         (WebCore::HTMLEmbedElement::contentDocument):
2585         (WebCore::HTMLEmbedElement::getSVGDocument):
2586         * html/HTMLEmbedElement.h:
2587         * html/HTMLObjectElement.cpp:
2588         (WebCore::HTMLObjectElement::HTMLObjectElement):
2589         (WebCore::HTMLObjectElement::getInstance):
2590         (WebCore::HTMLObjectElement::parseMappedAttribute):
2591         (WebCore::HTMLObjectElement::contentDocument):
2592         (WebCore::HTMLObjectElement::rendererIsNeeded):
2593         (WebCore::HTMLObjectElement::createRenderer):
2594         (WebCore::HTMLObjectElement::setCode):
2595         (WebCore::HTMLObjectElement::setArchive):
2596         (WebCore::HTMLObjectElement::setBorder):
2597         (WebCore::HTMLObjectElement::setCodeBase):
2598         (WebCore::HTMLObjectElement::setCodeType):
2599         (WebCore::HTMLObjectElement::setData):
2600         (WebCore::HTMLObjectElement::hspace):
2601         (WebCore::HTMLObjectElement::setHspace):
2602         (WebCore::HTMLObjectElement::setStandby):
2603         (WebCore::HTMLObjectElement::setType):
2604         (WebCore::HTMLObjectElement::setUseMap):
2605         (WebCore::HTMLObjectElement::vspace):
2606         (WebCore::HTMLObjectElement::setVspace):
2607         (WebCore::HTMLObjectElement::getSVGDocument):
2608         * html/HTMLObjectElement.h:
2609         * ksvg2/svg/SVGDocument.h:
2610         (WebCore::SVGDocument::isSVGDocument):
2611         * rendering/RenderWidget.h:
2612         (WebCore::RenderWidget::frameView):
2613
2614 2006-07-26  Alexey Proskuryakov  <ap@nypop.com>
2615
2616         Reviewed by Darin.
2617
2618         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9901
2619         XSLTProcessor cannot parse text nodes for INPUT ELEMENTS in an XSLT stylesheet
2620
2621         Test: fast/js/xhtml-serialize.html
2622
2623         * editing/markup.cpp:
2624         (WebCore::endMarkup): If the element has child nodes, write a closing tag even if it 
2625         is not permitted in HTML, to make it valid XML.
2626
2627 2006-07-26  Alice Liu  <alice.liu@apple.com>
2628
2629         Reviewed by John Sullivan (and Kevin and Timo).
2630
2631         landing this patch for John et al.  
2632         Fixed <rdar://problem/4651380> REGRESSION (9A232->9A234): existing web clips don't render if you restart Dashboard
2633
2634         * page/FrameView.cpp:
2635         (WebCore::FrameView::layout):
2636         moved the call to didFirstLayout to above the check for needsLayout
2637         because we need to call didFirstLayout for every webview, not just
2638         ones we think need layout.  
2639
2640 2006-07-26  Justin Garcia  <justin.garcia@apple.com>
2641
2642         Reviewed by darin
2643         
2644         <rdar://problem/4652788>
2645         REGRESSION: Can't change size or style of any text in message body
2646
2647         * dom/Node.cpp:
2648         (WebCore::Node::isContentRichlyEditable): Mimic Node::isContentEditable.
2649         * html/HTMLElement.cpp:
2650         (WebCore::HTMLElement::isContentRichlyEditable): First check
2651         the frame for editability, then userModify, like what
2652         HTMLElement::isContentEditable() does.
2653         * html/HTMLElement.h:
2654
2655 2006-07-26  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2656
2657         Reviewed by ap.
2658
2659         - fix debug-only information() string for table cells
2660
2661         * rendering/RenderObject.cpp:
2662         (WebCore::RenderObject::information):
2663
2664 2006-07-25  David Harrison  <harrison@apple.com>
2665
2666         Reviewed by timo and Darin.
2667
2668         <rdar://problem/4618584> "Paste and Match Style" is not working in Mail (add SPI)
2669         
2670         * WebCore.xcodeproj/project.pbxproj:
2671         * bridge/mac/WebCoreFrameBridge.h:
2672         * bridge/mac/WebCoreFrameBridge.mm:
2673         (-[WebCoreFrameBridge replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]):
2674         Add matchStyle parameter for use by WebKit.
2675
2676 2006-07-25  Justin Garcia  <justin.garcia@apple.com>
2677
2678         Reviewed by adele
2679         
2680         <rdar://problem/4649560>
2681         REGRESSION: Can't Select All when the body is contentEditable="true"
2682
2683         * editing/VisiblePosition.cpp:
2684         (WebCore::VisiblePosition::canonicalPosition): Allow descent from a non-editable html
2685         element into an editable body as a convenience.
2686
2687 2006-07-25  Justin Garcia  <justin.garcia@apple.com>
2688
2689         Reviewed by darin
2690         
2691         <rdar://problem/4468458> Incoming HTML message is editable <body contenteditable="true">
2692
2693         * dom/Document.cpp:
2694         (WebCore::Document::inDesignMode): Removed some spaces.
2695         * page/Frame.cpp:
2696         (WebCore::Frame::applyEditingStyleToElement): Just add CSS properties needed for editing.
2697         (WebCore::Frame::removeEditingStyleFromElement): Made this a no-op, we'll remove
2698         it eventually.
2699
2700 2006-07-25  David Kilzer  <ddkilzer@kilzer.net>
2701
2702         Reviewed by Darin.
2703
2704         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9717
2705           Replace IDL ConvertUndefinedToTrue parameter attribute with Optional attribute
2706
2707         No test added because there is no change in functionality.
2708
2709         * bindings/js/kjs_binding.cpp: Removed valueToBooleanTreatUndefinedAsTrue() method.
2710         * bindings/js/kjs_binding.h: Ditto.
2711         * bindings/scripts/CodeGeneratorJS.pm: Removed support for ConvertUndefinedToTrue parameter attribute.
2712         * dom/Element.h: Set default value to true for scrollIntoView() and scrollIntoViewIfNeeded() arguments.
2713         * dom/Element.idl: Replaced ConvertUndefinedToTrue attribute with Optional attribute.
2714           Fixed name of scrollIntoViewIfNeeded() argument to match implementation.
2715         * page/DOMWindow.idl: Replaced ConvertUndefinedToTrue attribute with Optional attribute.
2716
2717 2006-07-24  Dan Waylonis  <waylonis@google.com>
2718
2719         Reviewed and tweaked a bunch by Darin.
2720
2721         Test: plugins/bindings-test.html
2722
2723         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9902
2724           jsNull and NSNull not properly converted between JS and ObjC
2725
2726         * bindings/objc/WebScriptObject.mm:
2727         (+[WebScriptObject _convertValueToObjcValue:originExecutionContext:executionContext:]):
2728         Added case that converts jsNull to NSNull.
2729
2730 2006-07-24  Darin Adler  <darin@apple.com>
2731
2732         Reviewed by Adele and Justin.
2733
2734         - fix <rdar://problem/4613616> REGRESSION: some spaces typed in <textarea> are posted as non-breaking spaces (9630)
2735           http://bugzilla.opendarwin.org/show_bug.cgi?id=9630
2736         - also fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=9939
2737           REGRESSION: Pasting text into native text area with newline at end does not preserve newline
2738         - removed some uses of DeprecatedPtrList in the markup code
2739
2740         Test: fast/forms/textarea-type-spaces.html
2741         Test: fast/forms/textarea-paste-newline.html
2742
2743         * bindings/objc/DOMHTML.mm: (-[DOMHTMLDocument createDocumentFragmentWithText:]):
2744         Updated call to pass a range -- in this case it is the range of the entire document,
2745         so this will not handle the whitespace properly.
2746
2747         * bridge/mac/WebCoreFrameBridge.h: Added range context parameter to the
2748         documentFragmentWithText: method, so we can handle whitespace properly.
2749         * bridge/mac/WebCoreFrameBridge.mm:
2750         (-[WebCoreFrameBridge nodesFromList:]): Changed from DeprecatedPtrList to Vector.
2751         (-[WebCoreFrameBridge markupStringFromNode:nodes:]): Ditto.
2752         (-[WebCoreFrameBridge markupStringFromRange:nodes:]): Ditto.
2753         (-[WebCoreFrameBridge documentFragmentWithText:inContext:]): Added range context
2754         parameter -- pass it on to createFragmentFromText.
2755         (-[WebCoreFrameBridge documentFragmentWithNodesAsParagraphs:]): Changed from
2756         DeprecatedPtrList to Vector.
2757         (-[WebCoreFrameBridge replaceSelectionWithText:selectReplacement:smartReplace:]):
2758         Pass the range of the current selection as context when creating the fragment.
2759
2760         * dom/Position.cpp: (WebCore::Position::inRenderedText): Replace range check with
2761         a call to the new containsCaretOffset function -- helps make the caret work right when
2762         it is past the end of the last line in a textarea.
2763
2764         * editing/CompositeEditCommand.cpp:
2765         (WebCore::CompositeEditCommand::rebalanceWhitespaceAt): Don't do anything if the
2766         style does not call for collapsing whitespace.
2767         (WebCore::CompositeEditCommand::rebalanceWhitespace): Call replaceWhitespaceAt
2768         to share code, including the new logic mentioned above.
2769
2770         * editing/InsertLineBreakCommand.cpp: (WebCore::InsertLineBreakCommand::doApply):
2771         Use a text node instead of a break element when inserting and the style is preserveNewline.
2772
2773         * editing/JSEditor.cpp: (WebCore::execRemoveFormat): Pass the selection range
2774         to createFragmentFromText.
2775
2776         * editing/RebalanceWhitespaceCommand.cpp: (WebCore::RebalanceWhitespaceCommand::doApply):
2777         Assert that we're in a style that collapses whitespace. It's the caller's responsibility
2778         not to call otherwise.
2779
2780         * editing/ReplaceSelectionCommand.h: Removed unused destructor, type, isSingleTextNode,
2781         isTreeFragment, m_type, and added a context parameter to inertFragmentForTestRendering.
2782         Also changed the constructor to take a selection rather than a pointer to the root
2783         editable element, replaced removeEndBRIfNeeded with shouldRemoveEndBR and removed an
2784         unused parameter from shouldMergeEnd.
2785         * editing/ReplaceSelectionCommand.cpp:
2786         (WebCore::ReplacementFragment::ReplacementFragment): Removed code to set up m_type.
2787         Compute root editable element from passed-in selection. Used the start of the selection
2788         as a base node for style purposes for the test rendering. Removed the special case
2789         "single text node" alternative to createFragmentFromText in the plain text case, since
2790         createFragmentFromText now handles that correctly.
2791         (WebCore::ReplacementFragment::insertFragmentForTestRendering): Copy the whitespace
2792         property from the source location when creating a temporary element for test rendering.
2793         (WebCore::ReplacementFragment::shouldMergeEnd): Removed unneeded boolean
2794         parameter fragmentHadInterchangeNewlineAtEnd, which is always false.
2795         (WebCore::ReplaceSelectionCommand::doApply): Update for ReplacementFragment changes,
2796         change code to not remove end BR when it can be re-used instead, don't call the
2797         paragraph separator insertion when the position is at the start of a paragraph already,
2798         removed redundant computation of identical "next" value, removed unneeded boolean
2799         parameter to shouldMergeEnd, add case for merging when all we need to do is to delete
2800         a newline character, removed unneeded code to set insertionPos after all code that uses
2801         it, and  use spaces instead of non-breaking spaces when doing smart paste if the
2802         context is one where we do not collapse white space.
2803         (WebCore::ReplaceSelectionCommand::shouldRemoveEndBR): Renamed and changed to return
2804         a boolean instead of doing the removal.
2805
2806         * editing/markup.h: Use Vector instead of DeprecatedPtrList. Change the
2807         createFragmentFromText function to take a range for context instead of a document.
2808         * editing/markup.cpp:
2809         (WebCore::markup): Use Vector instead of DeprecatedPtrList.
2810         (WebCore::createMarkup): Ditto.
2811         (WebCore::createParagraphContentsFromString): Remove unneeded document parameter
2812         and changed a couple places to use isEmpty instead of comparing with "".
2813         (WebCore::createFragmentFromText): Given the new context parameter, if the context
2814         is one that preserves newlines, then use "\n" instead of <br> elements.
2815         (WebCore::createFragmentFromNodes): Use Vector instead of DeprecatedPtrList.
2816
2817         * html/HTMLElement.cpp: (WebCore::HTMLElement::setInnerText): Do not use <br>
2818         elements if the context of this node is one where we preserve newlines.
2819
2820         * rendering/InlineTextBox.h:
2821         * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::containsCaretOffset):
2822         Added. Implements the appropriate rule for determining if a caret position is
2823         in this line or not. Returns true for both one line and the next in cases where
2824         affinity must be considered to determine which line the caret is on.
2825
2826         * rendering/RenderText.h: Make atLineWrap no longer be a member function.
2827         * rendering/RenderText.cpp:
2828         (WebCore::atLineWrap): Remove special rule about preserveNewline and isLineBreak,
2829         which will no longer apply due to the new containsCaretOffset function logic.
2830         (WebCore::RenderText::caretRect): Use containsCaretOffset.
2831         (WebCore::RenderText::inlineBox): Ditto.
2832
2833         * rendering/RenderTextControl.cpp:
2834         (WebCore::RenderTextControl::updateFromElement): Make a placeholder <br> element
2835         after calling setInnerText so that the last newline in the string has the effect
2836         we expect outside the HTML world (an additional line).
2837         (WebCore::RenderTextControl::setSelectionRange): Set granularity of the selection
2838         too. The layout tests caught this problem, which needs a better solution long term.
2839         (WebCore::RenderTextControl::text): Call textContent with the parameter false
2840         so it will not include newlines for <br> elements. Now the only <br> element
2841         that will ever be in the shadow DOM tree is the one to prevent collapsing, and
2842         that one should not show up in the text value.
2843
2844         * rendering/bidi.cpp: (WebCore::RenderBlock::findNextLineBreak): Took a rule
2845         that specifically called out the pre whitespace mode and made it work for all
2846         the modes that preserve newlines. This makes sure we get a last line box for
2847         text after the last "\n" even in cases where there is no <br> afterward.
2848
2849         * editing/DeleteSelectionCommand.cpp:
2850         (WebCore::DeleteSelectionCommand::fixupWhitespace):
2851         * editing/InsertParagraphSeparatorCommand.cpp:
2852         (WebCore::InsertParagraphSeparatorCommand::doApply):
2853         Added assertions to make sure we don't do anything when we're not collapsing
2854         whitespace.
2855
2856         * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::setDefaultValue):
2857         Changed to use Vector instead of DeprecatedPtrList.
2858
2859         * editing/HTMLInterchange.cpp: Removed obsolete comment.
2860
2861         * loader/Cache.h: Removed a stray include.
2862
2863 2006-07-24  Adele Peterson  <adele@apple.com>
2864
2865         Reviewed by Justin.
2866
2867         - Fix for <rdar://problem/4632132> Changing style of content with mixed editability fails
2868
2869         Test: * editing/style/apple-style-editable-mix.html
2870
2871         * dom/Node.cpp: (WebCore::Node::isContentRichlyEditable): Doesn't need to check the editable root.  It now just
2872           checks the user modify property of its own renderer, since that is inherited.
2873         * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyInlineStyle): If the end position is in a table,
2874         Adjust the end node to the last descendant of the table, so we don't skip over any runs.
2875
2876 2006-07-24  Darin Adler  <darin@apple.com>
2877
2878         Reviewed by Hyatt.
2879
2880         - implement String::createCFString
2881
2882         * WebCore.xcodeproj/project.pbxproj: Added StringImplMac.mm and StringMac.mm.
2883
2884         * bindings/objc/DOMInternal.mm: Moved NSString conversion functions out of here.
2885
2886         * platform/mac/StringImplMac.mm: Added. Moved NSString conversion members here
2887         and added the CFStringRef ones.
2888         * platform/mac/StringMac.mm: Added. Ditto.
2889
2890 2006-07-24  David Hyatt  <hyatt@apple.com>
2891
2892         Two bug fixes.
2893
2894         (1) Make sure to mark positioned objects that depend on line position to
2895         mark themselves as needing layout when their line box placeholder gets
2896         repositioned.
2897
2898         * rendering/RenderBox.cpp:
2899         (WebCore::RenderBox::position):
2900        
2901         (2) Improve highlighting to factor the inflation into overflow so that
2902         invalidation and repainting will work properly.
2903
2904         * rendering/RootInlineBox.cpp:
2905         (WebCore::RootInlineBox::addHighlightOverflow):
2906         * rendering/RootInlineBox.h:
2907         * rendering/bidi.cpp:
2908         (WebCore::RenderBlock::layoutInlineChildren):
2909
2910 2006-07-24  Anders Carlsson  <acarlsson@apple.com>
2911
2912         Reviewed by Adele.
2913
2914         <rdar://problem/4641824> REGRESSION: Wikipedia widget fails to complete a search after pressing return key
2915         
2916         * html/HTMLInputElement.cpp:
2917         (WebCore::HTMLInputElement::defaultEventHandler):
2918         Don't eat enter events for search fields that have no enclosing form; they need to be passed to AppKit so
2919         that onsearch can be invoked.
2920         
2921         * manual-tests/onsearch-enter.html: Added.
2922
2923 2006-07-24  Dave MacLachlan  <dmaclach@mac.com>
2924
2925         Reviewed by Darin and Alexey.
2926         
2927         Fix for: <http://bugzilla.opendarwin.org/show_bug.cgi?id=8425> 
2928         and <http://bugzilla.opendarwin.org/show_bug.cgi?id=6947>
2929
2930         Test: svg/custom/non-opaque-filters.svg
2931
2932         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
2933         (WebCore::KCanvasFilterQuartz::prepareFilter):
2934         We create an autorelease pool so we can control the deallocation of the
2935         CIContext that we're creating. The CIContext retains the CGContext that 
2936         you pass it internally so when the CIContext is released, the 
2937         CGContext is released as well.
2938         This is all fine and dandy unless you wrap the creation of the CIFilter
2939         with a pair of CGBegin/EndTransparencyLayer calls which swap the context
2940         out from underneath you. So if you start with context A, 
2941         CGBeginTransparencyLayer swaps it out and gives you B. You create a CIFilter
2942         with it and add a reference to B. CGEndTransparencyLayer swaps out B and
2943         gives you back A. Autorelease pool comes and cleans up the Filter, and calls
2944         release on A, but A never got the refcount in the first place. B did. BOOM!
2945         So we create a pool, then do a retain, then release the pool so that we 
2946         don't have to worry about the pool releasing it at a later time.
2947         See <rdar://problem/4647735> for reduction of CGEndTransparencyLayer case
2948
2949 2006-07-24  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2950
2951         Reviewed by Hyatt.
2952
2953         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9669
2954           Incomplete repaint when changing an inline's border
2955
2956         Test: fast/repaint/line-overflow.html
2957
2958         * rendering/RenderBlock.h:
2959         * rendering/bidi.cpp:
2960         (WebCore::RenderBlock::layoutInlineChildren): Added repaintTop and repaintBottom
2961         variables to track the vertical edges of the area that changed, accounting for
2962         lines that were deleted, inserted or moved. Removed unnecessary updating of
2963         m_overflowHeight.
2964         (WebCore::RenderBlock::determineStartPosition): Removed unnecessary updating of
2965         m_overflowHeight.
2966         (WebCore::RenderBlock::determineEndPosition):
2967         (WebCore::RenderBlock::matchedEndLine): Added repaintTop and repaintBottom
2968         arguments, which this method updates to account for deleted lines.
2969         (WebCore::RenderBlock::checkLinesForOverflow): Removed outdated FIXME.
2970
2971 2006-07-24  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2972
2973         Reviewed by Darin.
2974
2975         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10075
2976           REGRESSION: Reversed pop-up text in visually-ordered Hebrew pages
2977
2978         Test: fast/forms/select-visual-hebrew.html
2979
2980         * css/html4.css: Set "-webkit-rtl-ordering: logical" on select elements.
2981
2982 2006-07-24  Alexey Proskuryakov  <ap@nypop.com>
2983
2984         Reviewed by Darin.
2985
2986         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10009
2987         REGRESSION: Schubert-IT PDF Plug-in not working for full page (works in frames)
2988
2989         * page/Frame.cpp:
2990         (WebCore::Frame::begin): Give PDF plugins a chance to handle frame content, before ImageDocument
2991         claims it.
2992
2993 2006-07-24  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2994
2995         Reviewed by Darin.
2996
2997         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10083
2998           REGRESSION (r15584): editing/selection/select-from-textfield-outwards failing
2999
3000         * rendering/RenderBlock.cpp:
3001         (WebCore::RenderBlock::positionForCoordinates): Added back change from the fix
3002         for bug 9312: For coordinates outside a replaced object, return the position
3003         just before (after) the element if the coordinates are above or to the left (below
3004         or to the right).
3005
3006 2006-07-23  Mark Rowe  <opendarwin.org@bdash.net.nz>
3007
3008         Reviewed by maciej.
3009
3010         Bug 9686: [Drosera] Need the ability to break into Drosera on Javascript exceptions
3011         http://bugzilla.opendarwin.org/show_bug.cgi?id=9686
3012
3013         WebCore portion of the fix.
3014
3015         * bridge/mac/WebCoreScriptDebugger.h:
3016         (-[WebScriptDebugger exceptionRaised:sourceId:line::]): Add delegate method.
3017         * bridge/mac/WebCoreScriptDebugger.mm:
3018         (WebCoreScriptDebuggerImp::exception): Call delegate method when an exception is raised.
3019
3020 2006-07-23  Alice Liu  <alice.liu@apple.com>
3021
3022         Reviewed by Adele.
3023         Actually Adele figured out how to fix the layout test failures.  Landing this patch for her.  Layout test failures exposed but not caused by  r15584 (my patch earlier today).
3024
3025         * editing/visible_units.cpp:
3026         (WebCore::previousLinePosition):
3027         When setting selection endpoints, don't traverse down into nodes where editing would ignore its contents. Use the parent node instead.  
3028         (WebCore::nextLinePosition):
3029         same as above
3030
3031 2006-07-23  David Harrison  <harrison@apple.com>
3032
3033         Reviewed by timo.
3034
3035         <rdar://problem/4646759> Mail crash editing To Do - WebCore::InsertTextCommand::prepareForTextInsertion
3036         
3037         * Test: editing/deleting/delete-mixed-editable-content-001.html
3038
3039         * editing/visible_units.cpp:
3040         (WebCore::startOfParagraph):
3041         Respect editable boundary the same way endOfParagraph does.
3042
3043 2006-07-23  Beth Dakin  <bdakin@apple.com>
3044
3045         Reviewed by Maciej. (Patch by me, Maciej, and Harrison.)
3046
3047         Fix for <rdar://problem/4529398> WebCore crashes when pasting rich 
3048         text - WebCore::InlineBox::root()
3049
3050         The initial rendering crash was due to a render object having a 
3051         stale reference to an inline box that had already been deleted and 
3052         then recreated in the exact same location in memory. (Crazy, I 
3053         know.) The situation seemed pretty specific to list markers 
3054         according to Hyatt according to Maciej, so that is what I patched 
3055         specifically. Fixing this crash unearthed a separate editing crash 
3056         where we were trying to insert a block into itself. I worked on 
3057         that with Maciej and Harrison, and Harrison came up with a fix.
3058
3059         * editing/CompositeEditCommand.cpp:
3060         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): This is the fix for the editing crash. If paragraphStart is an atomic 
3061         node, insert the new block into the parent instead.
3062         * rendering/InlineBox.cpp:
3063         (WebCore::InlineBox::isChildOfParent): This function is for 
3064         posterity. It will help keep the linebox tree in check.
3065         * rendering/InlineBox.h:
3066         * rendering/InlineFlowBox.cpp:
3067         (WebCore::InlineFlowBox::addToLine): Added assert.
3068         (WebCore::InlineFlowBox::deleteLine): Added assert.
3069         * rendering/ListMarkerBox.cpp:
3070         (WebCore::ListMarkerBox::destroy): If this has a parent, call 
3071         removeChild on this.
3072         (WebCore::ListMarkerBox::operator delete):
3073         * rendering/ListMarkerBox.h:
3074
3075 2006-07-23  Alice Liu  <alice.liu@apple.com>
3076
3077         Reviewed by Darin.
3078
3079         fixed <rdar://problem/4617841> REGRESSION (NativeTextField): You can move keyboard focus to a field without getting insertion point
3080
3081         * rendering/RenderBlock.cpp:
3082         (WebCore::RenderBlock::positionForCoordinates):
3083         removed some unnecessary vertical position checks and added a fudge factor to be more forgiving for clicks near lines.
3084         * rendering/RenderTextControl.cpp:
3085         (WebCore::RenderTextControl::nodeAtPoint):
3086         added implementation
3087         * rendering/RenderTextControl.h:
3088         added function protocol
3089
3090 2006-07-23  Adele Peterson  <adele@apple.com>
3091
3092         Reviewed by Darin.
3093
3094         Updating fix from last checkin.
3095
3096         * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutVerticalBox):
3097         Only tell the view about this flexbox if there isn't another flexbox already cached.
3098
3099 2006-07-23  Adele Peterson  <adele@apple.com>
3100
3101         Reviewed by Maciej.
3102
3103         - Fix for <rdar://problem/4644614> REGRESSION: Typing, pasting or dragging in new text areas causes unnecessary scrolling
3104
3105         * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): Don't updateScrollInfoAfterLayout if an ancestor flexible box is just on
3106         its first layout.
3107         * rendering/RenderFlexibleBox.cpp:
3108         (WebCore::RenderFlexibleBox::layoutBlock): ditto.
3109         (WebCore::RenderFlexibleBox::layoutVerticalBox): Let the view know if this flex box is doing its first pass at layout.
3110
3111         * rendering/RenderView.cpp: (WebCore::RenderView::RenderView): Caches a flexible box that's doing its first layout.
3112         * rendering/RenderView.h:
3113         (WebCore::RenderView::setFlexBoxInFirstLayout):
3114         (WebCore::RenderView::flexBoxInFirstLayout):
3115
3116 2006-07-22  Alexey Proskuryakov  <ap@nypop.com>
3117
3118         Reviewed by Darin.
3119
3120         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10038
3121         REGRESSION: Length of navigator.mimeTypes collection returns number of installed plugins, not number 
3122         of registered mime types
3123
3124         * bindings/js/kjs_navigator.cpp:
3125         (KJS::MimeTypes::getValueProperty): Return the length of the mime types vector, not the plugins one.
3126         (KJS::MimeTypes::getOwnPropertySlot): Fixed another typo, which prevented MimeTypes::getValueProperty()
3127         from even being called.
3128
3129 2006-07-21  Maciej Stachowiak  <mjs@apple.com>
3130
3131         Reviewed by Adele and Tim Omernick.
3132
3133         <rdar://problem/4641004> 9A224: Safari crashes in WebCore::RenderMenuList::showPopup when changing a input select field to input text field
3134
3135         Couldn't figure out how to make layout test, here's a manual test:
3136         * manual-tests/remove-select-onchange.html: Added.
3137         
3138         * rendering/RenderMenuList.cpp:
3139         (WebCore::RenderMenuList::showPopup): Don't add the RenderPopupMenu to the render
3140         tree so it doesn't get destroyed if we do.
3141         
3142         The remaining changes are to let the RenderPopupMenu know its menu list w/o having
3143         to be in the render tree:
3144         
3145         * rendering/RenderPopupMenu.cpp:
3146         (WebCore::RenderPopupMenu::RenderPopupMenu):
3147         * rendering/RenderPopupMenu.h:
3148         (WebCore::RenderPopupMenu::menuList):
3149         * rendering/RenderPopupMenuMac.h:
3150         * rendering/RenderPopupMenuMac.mm:
3151         (WebCore::RenderPopupMenuMac::RenderPopupMenuMac):
3152         * rendering/RenderPopupMenuWin.h:
3153         (WebCore::RenderPopupMenuWin::RenderPopupMenuWin):
3154         * rendering/RenderTheme.h:
3155         * rendering/RenderThemeMac.h:
3156         * rendering/RenderThemeMac.mm:
3157         (WebCore::RenderThemeMac::createPopupMenu):
3158         * rendering/RenderThemeWin.cpp:
3159         (WebCore::RenderThemeWin::createPopupMenu):
3160         * rendering/RenderThemeWin.h:
3161
3162 2006-07-21  Adele Peterson  <adele@apple.com>
3163
3164         Reviewed by Darin.
3165
3166         Fix for: <rdar://problem/4643238> REGRESSION: Can't set insertion point at the end of a line of text
3167
3168         Test: fast/forms/textarea-scrolled-endline-caret.html
3169
3170         * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionForCoordinates):
3171         When looking for the closest line box, take the scroll offset into account.
3172
3173 2006-07-21  Tim Omernick  <timo@apple.com>
3174
3175         Reviewed by Geoff & Maciej.
3176
3177         <rdar://problem/4632505> REGRESSION: Crash at WebCore::Widget::getView() const + 6
3178
3179         Geoff is working on a layout test for this.
3180
3181         * bridge/mac/FrameMac.mm:
3182         (WebCore::FrameMac::focusWindow):
3183         (WebCore::FrameMac::unfocusWindow):
3184         Check for a NULL view.  The view can be NULL if the frame has not yet loaded any data.  This fixes the crash, but the behavior is still
3185         wrong -- we should focus the frame once it gets a view.  I've filed <rdar://problem/4645685> to track that.  It's not as urgent as this
3186         crasher.
3187         
3188 2006-07-21  Maciej Stachowiak  <mjs@apple.com>
3189
3190         Reviewed by Darin.
3191
3192         <rdar://problem/4523976> REGRESSION (NativeTextField): Crash occurs when choosing "Undo Typing" after typing and setting the value
3193
3194         * rendering/RenderTextControl.cpp:
3195         (WebCore::RenderTextControl::updateFromElement): Clear the undo
3196         chain when the text control contents have been set
3197         programmatically.
3198         * bridge/mac/FrameMac.mm:
3199         (WebCore::FrameMac::clearUndoRedoOperations): Before clearing undo
3200         stack, close all open undo groups and then open an equal number,
3201         since otherwise NSUndoManager ends up in an inconsistent state
3202         leading to uncaught ObjC exceptions.
3203
3204 2006-07-21  Beth Dakin  <bdakin@apple.com>
3205         
3206         Reviewed by Darin.
3207
3208         Just moving this assertion down a couple of lines. It was hitting 
3209         every time you try to print a page because we put it too early in 
3210         the function.
3211
3212         * bridge/mac/WebCoreFrameBridge.mm:
3213         (-[WebCoreFrameBridge drawRect:]):
3214
3215 2006-07-21  Justin Garcia  <justin.garcia@apple.com>
3216
3217         Reviewed by levi
3218         
3219         <rdar://problem/4548238>
3220         REGRESSION: Can't remove the first OL/UL list item in a Mail's compose window
3221
3222         * editing/CompositeEditCommand.cpp:
3223         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): 
3224         Moved from InsertParagraphSeparator.  Does its own typing style restoration.
3225         * editing/CompositeEditCommand.h:
3226         * editing/InsertParagraphSeparatorCommand.cpp:
3227         (WebCore::InsertParagraphSeparatorCommand::doApply): Call breakOutOfEmptyListItem.
3228         * editing/TypingCommand.cpp:
3229         (WebCore::TypingCommand::deleteKeyPressed): Call breakOutOfEmptyListItem if
3230         the endingSelection is at the start of an editable region.
3231         * editing/htmlediting.cpp:
3232         (WebCore::embeddedSublist): Moved from InsertParagraphSeparator.
3233         (WebCore::appendedSublist): Ditto.
3234         (WebCore::enclosingEmptyListItem): Ditto.
3235         * editing/htmlediting.h:
3236
3237 === Safari-521.20 ===
3238
3239 2006-07-21  Tim Omernick  <timo@apple.com>
3240
3241         Reviewed by Beth Dakin & John Sullivan.
3242
3243         <rdar://problem/4633717> 9A218: Reproducible crash in -[NSScroller mouseDown:]
3244
3245         Beth is in the middle of making a layout test for this; she will land it soon.
3246
3247         * platform/mac/ScrollBarMac.mm:
3248         (ScrollBar::~ScrollBar):
3249         Call Widget::removeFromSuperview() rather than -removeFromSuperview directly on the scroll bar view.
3250         Widget::removeFromSuperview() obeys the "mustStayInWindow" flag, which is set while tracking the mouse
3251         in view-based widgets to prevent their destruction while the tracking is in progress.
3252         I searched around WebCore and this is the only Widget subclass that directly removes its view rather
3253         than using removeFromSuperview().
3254
3255 2006-07-21  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3256
3257         Reviewed by Darin.
3258
3259         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9312
3260           REGRESSION: Selection bug in new text fields when selecting past the first letter
3261
3262         Test: editing/selection/select-from-textfield-outwards.html
3263
3264         * editing/Selection.cpp:
3265         (WebCore::Selection::adjustForEditableContent): Added code to handle the case
3266         where the selection starts (resp. ends) in the last (resp. first) visual position
3267         inside an editable root.
3268         * editing/htmlediting.cpp:
3269         (WebCore::comparePositions): Fixed the case of comparing a position inside a shadow
3270         tree with a position in the shadow ancestor.
3271         * rendering/RenderBlock.cpp:
3272         (WebCore::RenderBlock::positionForCoordinates): For coordinates outside a replaced
3273         object, return the position just before (after) the element if the coordinates are above or
3274         to the left (below or to the right).
3275         * rendering/RenderObject.cpp:
3276         (WebCore::RenderObject::caretMaxOffset): Changed to return 1 for replaced objects.
3277         * rendering/RenderText.cpp:
3278         (WebCore::RenderText::positionForCoordinates): Changed to return the last position
3279         in the lowest text box if the y coordinate is below all text boxes.
3280
3281 2006-07-21  Geoffrey Garen  <ggaren@apple.com>
3282
3283         Reviewed by Darin.
3284         
3285         - Fixed <rdar://problem/4507265> REGRESSION: overlays don't work on 
3286         HousingMaps.com (Google Maps-based site)
3287         
3288         - Made style.filter undetectable, like document.all.
3289         
3290         Unfortunately, the SVG spec-makers invented a CSS attribute named 'filter',
3291         which conflicts with IE's custom CSS attribute by the same name. Web programs 
3292         like the Google maps API test for style.filter, and assume it's the IE 
3293         style.filter if they find it, so we need to make style.filter undetectable 
3294         to avoid breaking them.
3295         
3296         An alternative solution would be to hotwire a delorean, go back in time,
3297         and beg the web standards makers to make standards that work on the web.
3298
3299         * bindings/js/kjs_css.cpp:
3300         (KJS::DOMCSSStyleDeclaration::cssPropertyGetter):
3301
3302 2006-07-20  Justin Garcia  <justin.garcia@apple.com>
3303
3304         Reviewed by john
3305         
3306         <rdar://problem/4641033>
3307         REGRESSION: Pasting from web pages into Mail (or Blot) often loses most of the content
3308         
3309         * editing/markup.cpp:
3310         (WebCore::createMarkup): We surround the currently accumulated markup with markup 
3311         for ancestors of the startNode when the pre-order traversal leaves the trees rooted 
3312         at those ancestors.  We assumed that any ancestors of the current node not in the 
3313         ancestorsToClose list were those kind of ancestors.  But we don't add renderer-less 
3314         containers to the ancestorsToClose list.  So, we were incorrectly surrounding the 
3315         currently accumulated markup with markup for render-less containers.  Most of the
3316         content at apple.com was being put inside an <optgroup> inside a <select> element.  
3317         Then on Paste createContextualFragment would drop it.
3318
3319 2006-07-21  Anders Carlsson  <acarlsson@apple.com>
3320
3321         Reviewed by Geoff.
3322
3323         * dom/Document.h:
3324         (WebCore::Document::):
3325         * dom/EventTargetNode.cpp:
3326         (WebCore::EventTargetNode::addEventListener):
3327         * page/FrameView.cpp:
3328         (WebCore::FrameView::layout):
3329         * rendering/RenderLayer.cpp:
3330         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
3331         Only dispatch overflowchanged events if overflowchanged event listeners have been registered on the document.
3332
3333 2006-07-20  Anders Carlsson  <acarlsson@apple.com>
3334
3335         Reviewed by Geoff.
3336
3337         <rdar://problem/4637807> REGRESSION: "Features & Options" page at volvocars.us fails
3338
3339         * xml/XSLTProcessor.cpp:
3340         (WebCore::xsltParamArrayFromParameterMap):
3341         Turns out parameters never worked. String parameters need to be escaped so we create a transform context,
3342         add the parameters to it quoted and then use xsltApplyStylesheetUser which lets us pass the transform context to it.
3343         This also works around a bug in libxslt where a hash table isn't allocated.
3344
3345 2006-07-20  Alice Liu  <alice.liu@apple.com>
3346
3347         Reviewed by Tim Omernick.
3348
3349         Fixed <rdar://problem/4621649> repro crash: Upload link causes crash on pages.google.com in Frame::nodeForWidget
3350         added manual test because there is no way to change the value of an <input type=file> via the DOM.  It's not supported because it's a security risk. 
3351
3352         * manual-tests/remove-input-file-onchange.html: Added.
3353         * platform/mac/FileButtonMac.mm:
3354         (-[WebFileChooserButton chooseFilename:]):
3355         swapped the calls to changeFilename and bridgeForWidget because changeFilename will destroy the widget that is accessed in bridgeForWidget 
3356
3357 2006-07-20  Alice Liu  <alice.liu@apple.com>
3358
3359         Reviewed by Adele.
3360
3361         Fixed <rdar://problem/4532113> REGRESSION (NativeTextField): Crash occurs after modifying field then reloading page -[FormDelegate frameLayoutHasChanged:]
3362         added a manual test because of the need to use AutoFill.
3363
3364         * dom/Node.h:
3365         (WebCore::Node::aboutToUnload):
3366         added virtual function prototype
3367         * html/HTMLInputElement.cpp:
3368         (WebCore::HTMLInputElement::aboutToUnload):
3369         added implementation that sends textFieldDidEndEditing notification
3370         * html/HTMLInputElement.h:
3371         added virtual function prototype
3372         * manual-tests/input-type-file-autocomplete-frame-1.html: Added.
3373         * manual-tests/input-type-file-autocomplete-frame-2.html: Added.
3374         * manual-tests/input-type-file-autocomplete-refresh.html: Added.
3375         * page/Frame.cpp:
3376         (WebCore::Frame::stopLoading):
3377         before unloading, call aboutToUnload on the current focused node
3378
3379 2006-07-20  Brady Eidson  <beidson@apple.com>
3380
3381         Reviewed by Maciej
3382
3383         fixed <rdar://problem/4611303> REGRESSION: repro crash in WebCore::EventTargetNode::dispatchWindowEvent at aeropostale.com
3384         There was an attempt to deref an EventListener that got cleaned up in GC.  Changing Document's EventListener list from 
3385         vanilla ptrs to refptrs to prevent GC, following EventTargetNode's proven example.
3386
3387         * dom/Document.cpp:
3388         (WebCore::Document::Document):
3389         (WebCore::Document::clear):
3390         (WebCore::Document::handleWindowEvent):
3391         (WebCore::Document::getHTMLWindowEventListener):
3392         (WebCore::Document::removeHTMLWindowEventListener):
3393         (WebCore::Document::removeWindowEventListener):
3394         (WebCore::Document::hasWindowEventListener):
3395         Changed all of the list iterators to work with RefPtrs instead of vanilla ptrs
3396
3397         * dom/Document.h:
3398         Changed the EventListener list to be a vanilla pointer list to a refptr list
3399
3400 2006-07-20  John Sullivan  <sullivan@apple.com>
3401
3402         Reviewed by Maciej
3403
3404         - WebCore part of fix for:
3405         <rdar://problem/4557386> REGRESSION (419.3-521.19): repro Safari world leak involving 
3406         closing tabs after clicking in a web page
3407         
3408         * bridge/mac/WebCoreFrameBridge.h:
3409         (-[WebCoreFrameBridge textViewWasFirstResponderAtMouseDownTime:])
3410         renamed to be more specific (formerly wasFirstResponderAtMouseDownTime:)
3411         * bridge/mac/FrameMac.mm:
3412         (WebCore::FrameMac::passMouseDownEventToWidget):
3413         updated for name change
3414
3415 2006-07-19  Alexey Proskuryakov  <ap@nypop.com>
3416
3417         Reviewed by Darin.
3418
3419         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8272
3420         Use of window.open & window.close can cause crash
3421
3422         * platform/PlatformMouseEvent.h:
3423         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
3424         * platform/mac/PlatformMouseEventMac.mm:
3425         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
3426         The default constructor now creates a "zero" event, and a new one was added to create the "current" one.
3427
3428         * bridge/mac/FrameMac.mm:
3429         (WebCore::FrameMac::handleMouseMoveEvent):
3430         * rendering/RenderFormElement.cpp:
3431         (WebCore::RenderFormElement::clicked): 
3432         Updated for the above changes.
3433
3434         * platform/gdk/MouseEventGdk.cpp:
3435         * platform/gdk/TemporaryLinkStubs.cpp:
3436         (PlatformMouseEvent::PlatformMouseEvent):
3437         * platform/win/MouseEventWin.cpp:
3438         * platform/win/TemporaryLinkStubs.cpp:
3439         (PlatformMouseEvent::PlatformMouseEvent):
3440         Trying not to break other platforms.
3441
3442         * manual-tests/invalid-mouse-event.html: Added.
3443
3444 2006-07-20  Maciej Stachowiak  <mjs@apple.com>
3445         
3446         Reviewed by Anders.
3447
3448         - delete line that I only commented in the last patch - meant to do this before landing
3449
3450         * html/HTMLFrameElement.cpp:
3451         (WebCore::HTMLFrameElement::close): 
3452
3453 2006-07-19  Maciej Stachowiak  <mjs@apple.com>
3454
3455         Reviewed by Geoff.
3456
3457         - fixed <rdar://problem/4634484> REGRESSION: Project Change Request form should have vertical scroll bar, but doesn't
3458         
3459         I couldn't figure out how to make an automated test case for this,
3460         or even a manual one. It seems to be timing-related in some way.
3461
3462         * html/HTMLFrameElement.cpp:
3463         (WebCore::HTMLFrameElement::close): detach the child frame from
3464         its element, not the frame containing this element.
3465
3466 2006-07-20  Anders Carlsson  <acarlsson@apple.com>
3467
3468         Reviewed by Darin.
3469
3470         * bridge/mac/FrameMac.mm:
3471         (WebCore::FrameMac::nextKeyViewInFrame):
3472         Hold a ref to the node in case it gets destroyed by an event handler.
3473
3474 2006-07-19  Mark Rowe  <opendarwin.org@bdash.net.nz>
3475
3476         Reviewed by Darin.
3477
3478         http://bugzilla.opendarwin.org/show_bug.cgi?id=10021
3479         Bug 10021: REGRESSION: Stack overflow due to infinite recursion in 
3480         Image::checkForSolidColor
3481
3482         * platform/Image.cpp:
3483         (WebCore::Image::cacheFrame): Don't call checkForSolidColor unless 
3484         the frame was decoded successfully.
3485
3486 2006-07-19  Adele Peterson  <adele@apple.com>
3487
3488         Reviewed by Maciej.
3489
3490         - Fix for: 
3491         <rdar://problem/4422657> REGRESSION: member name field or password field should have focus after loading webmail.mac.com (7405)
3492         http://bugzilla.opendarwin.org/show_bug.cgi?id=7405
3493
3494         <rdar://problem/4614181> REGRESSION: Crash in WebCore::RenderTextField::text() when quoting post at the Ars Technica forum (9707)
3495         http://bugzilla.opendarwin.org/show_bug.cgi?id=9707
3496
3497         Needs an http test. (http://bugzilla.opendarwin.org/show_bug.cgi?id=10020)
3498
3499         These bugs were both cases where focus() was called on an element which didn't have a renderer yet because stylesheets hadn't finished loading yet.
3500         Now, we detect this case and let setFocusNode be called.  And when the stylesheet finishes loading, and the element attaches, a timer will fire, 
3501         which will cause the correct selection & scrolling behavior to occur. 
3502
3503         This fix removes selection and scrolling behavior from the focus method.  This code is now in a new method, updateFocusAppearance.
3504         updateFocusAppearance can now be called directly from focus(), but it can also be called when a timer fires.  This timer gets set
3505         up when an element attaches, and its already been focused by the focus method.  We have to use a timer, because updateFocusAppearance can cause
3506         a layout to happen, and we don't want that to happen in the middle of attach().
3507
3508         * bindings/objc/DOM.mm: (-[DOMElement isFocused]): Added SPI for autofill.
3509         * bindings/objc/DOMPrivate.h:
3510
3511         * dom/Element.cpp:
3512         (WebCore::Element::Element): Initializes timer and needFocusAppearanceUpdate bool.
3513         (WebCore::Element::attach): Checks needsFocusAppearanceUpdate, and if the node is focused, then starts the timer.
3514         (WebCore::Element::focus): Updated to check supportsFocus before calling setFocusNode, 
3515         and only requiring the element to be focusable now before updating focus appearance.
3516         (WebCore::Element::updateFocusAppearance): Added. Separates the selection, and the scrolling from focusing the node.
3517         (WebCore::Element::updateFocusAppearanceTimerFired): Stops the timer, and if the element is focusable, calls updateFocusAppearance.
3518         (WebCore::Element::stopUpdateFocusAppearanceTimer):  Cancels timer, and setsNeedsFocusAppearanceUpdate(false).
3519         (WebCore::Element::detach): Calls stopUpdateFocusAppearanceTimer.
3520         (WebCore::Element::blur): ditto.
3521         * dom/Element.h:
3522         (WebCore::Element::needsFocusAppearanceUpdate): Added so the timer only fires when focus() methods have caused an element to be focused.
3523         (WebCore::Element::setNeedsFocusAppearanceUpdate): Added so focus methods can set this flag.
3524
3525         * dom/Node.h: (WebCore::Node::supportsFocus): Added.  Base class just calls isFocusable.
3526         * html/HTMLAnchorElement.h: Added supportsFocus.
3527         * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::supportsFocus): Added. Checks for the case where stylesheets haven't loaded yet,
3528         so we can still focus the node without a renderer, and when it gets a renderer, we'll update the focus appearance.
3529         * html/HTMLGenericFormElement.h: (WebCore::HTMLGenericFormElement::supportsFocus): ditto.
3530         * html/HTMLGenericFormElement.cpp: Removed include of Document.h since this is now in the header.
3531
3532         * html/HTMLInputElement.cpp:
3533         (WebCore::HTMLInputElement::focus): Updated to check supportsFocus before calling setFocusNode, 
3534         and only requiring the element to be focusable now before updating focus appearance.
3535         (WebCore::HTMLInputElement::updateFocusAppearance): Added. Separates the selection, and the scrolling from focusing the node.
3536         * html/HTMLInputElement.h:
3537
3538         * html/HTMLTextAreaElement.cpp:
3539         (WebCore::HTMLTextAreaElement::focus): Updated to check supportsFocus before calling setFocusNode, 
3540         and only requiring the element to be focusable now before updating focus appearance.
3541         (WebCore::HTMLTextAreaElement::updateFocusAppearance): Added. Separates the selection, and the scrolling from focusing the node.
3542         * html/HTMLTextAreaElement.h:
3543
3544 2006-07-19  Justin Garcia  <justin.garcia@apple.com>
3545
3546         Reviewed by levi
3547         
3548         <rdar://problem/4631972>
3549         REGRESSION: Mail crashes when pasting entire contents of http://www.apple.com/support/ into a new mail message
3550
3551         * dom/Position.cpp:
3552         (WebCore::Position::upstream): Deployed isBlock and enclosingBlock.
3553         (WebCore::Position::downstream): Ditto.
3554         * editing/CompositeEditCommand.cpp:
3555         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Ditto.
3556         * editing/htmlediting.cpp:
3557         (WebCore::canHaveChildrenForEditing): Added !iframe.
3558         (WebCore::isBlock): Added, returns !node->renderer()->isInline()
3559         (WebCore::enclosingBlock): Added.
3560         * editing/htmlediting.h:
3561
3562 2006-07-19  Anders Carlsson  <acarlsson@apple.com>
3563
3564         Reviewed by Adele.
3565
3566         <rdar://problem/4631272> REGRESSION: Crash tabbing out of hostname field at autorestore.apple.com
3567         
3568         * bridge/mac/FrameMac.mm:
3569         (WebCore::FrameMac::nextKeyViewInFrame):
3570         Take into account that focus handlers can cause a node's renderer to be destroyed.
3571         
3572 2006-07-19  David Hyatt  <hyatt@apple.com>
3573
3574         Fix for 4638376.  The 1x1 solid color image optimization was broken when
3575         I re-architected image.  This patch restores the optimization for CG.  Cairo
3576         will still need the optimization.
3577
3578         Reviewed by darin
3579
3580         WARNING: NO TEST CASES ADDED OR CHANGED (need test cases still)
3581
3582         * platform/Image.cpp:
3583         (WebCore::Image::Image):
3584         (WebCore::Image::invalidateData):
3585         (WebCore::Image::cacheFrame):
3586         * platform/Image.h:
3587         (WebCore::Image::setIsPDF):
3588         * platform/cairo/ImageCairo.cpp:
3589         (WebCore::Image::checkForSolidColor):
3590         * platform/mac/ImageMac.mm:
3591         (WebCore::Image::initNativeData):
3592         (WebCore::Image::invalidateNativeData):
3593         (WebCore::Image::checkForSolidColor):
3594         (WebCore::Image::draw):
3595         (WebCore::Image::drawTiled):
3596
3597 2006-07-19  Justin Garcia  <justin.garcia@apple.com>
3598
3599         Reviewed by levi
3600         
3601         <rdar://problem/4613519>
3602         REGRESSION: Pasting text in native text area inserts text one character before it should (9527)
3603
3604         * editing/InsertParagraphSeparatorCommand.cpp:
3605         (WebCore::InsertParagraphSeparatorCommand::doApply): Turn into an InsertLineBreakCommand instead of bailing
3606         if the enclosingBlockFlowElement doesn't have a parent.
3607
3608 2006-07-19  David Harrison  <harrison@apple.com>
3609
3610         Reviewed by Tim Hatcher.
3611
3612         <rdar://problem/4629307> -[DOMRange markupString] does not include the initial table element if it is at the beginning of the range
3613         <rdar://problem/4062218> pasting in contents of web.apple.com strips off the <table> element from the first table
3614         
3615         Better patch than previous checkin.
3616
3617         * test: editing/pasteboard/paste-table-003.html
3618         
3619         * editing/markup.cpp:
3620         (WebCore::createMarkup):
3621         Make sure to include the table when including a tbody.
3622
3623 === Safari-521.19 ===
3624
3625 2006-07-19  David Harrison  <harrison@apple.com>
3626
3627         Reviewed by Tim Hatcher.
3628
3629         <rdar://problem/4629307> -[DOMRange markupString] does not include the initial table element if it is at the beginning of the range
3630
3631         No test case as this can only be reproduced through ObjC APIs.
3632
3633         * editing/markup.cpp:
3634         (WebCore::createMarkup):
3635         Adjust the range for ancestor markup handling when main loop skips first node.
3636
3637 2006-07-18  David Hyatt  <hyatt@apple.com>
3638
3639         Fix for radar 4611287, make resizable text fields opt-in rather than
3640         opt-out.  Open source users will need to write the pref into their defaults
3641         to see the resizers on textareas now.
3642
3643         Reviewed by mjs and adele
3644
3645         * WebCore.xcodeproj/project.pbxproj:
3646         * bridge/mac/WebCoreSettings.mm:
3647         (-[WebCoreSettings setTextAreasAreResizable:]):
3648         * css/cssparser.cpp:
3649         (WebCore::CSSParser::parseValue):
3650         * css/cssstyleselector.cpp:
3651         (WebCore::CSSStyleSelector::applyProperty):
3652         * css/html4.css:
3653
3654 2006-07-18  Anders Carlsson  <acarlsson@apple.com>
3655
3656         Reviewed by Darin.
3657
3658         http://bugzilla.opendarwin.org/show_bug.cgi?id=9959
3659         REGRESSION: iframes stop rendering after 200th one on successive reloads
3660         
3661         * html/HTMLFrameElement.cpp:
3662         (WebCore::HTMLFrameElement::attach):
3663         (WebCore::HTMLFrameElement::close):
3664         * html/HTMLIFrameElement.cpp:
3665         (WebCore::HTMLIFrameElement::insertedIntoDocument):
3666         (WebCore::HTMLIFrameElement::willRemove):
3667         Remove calls to incrementFrameCount and decrementFrameCount.
3668         
3669         * page/Frame.cpp:
3670         (WebCore::Frame::Frame):
3671         Call incrementFrameCount here.
3672         
3673         (WebCore::Frame::~Frame):
3674         Call disconnectOwnerElement.
3675         
3676         (WebCore::Frame::disconnectOwnerElement):
3677         Call decrementFrameCount here.
3678         
3679 2006-07-18  Alexey Proskuryakov  <ap@nypop.com>
3680
3681         Reviewed by Darin.
3682
3683         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9013
3684         Let correct CSS custom cursor declarations parse
3685
3686         * css/cssparser.cpp:
3687         (WebCore::CSSParser::parseValue): Ignore any values following a custom CSS cursor URI, instead of
3688         requiring that it is the only one in the list (which is actually illegal, according to the spec). 
3689         This is only a temporary hack, with a real implementation to follow in bug 6001/6002.
3690
3691         * manual-tests/custom-cursors.html: Added a test for this issue.
3692         * manual-tests/resources/helpCursor.tiff: A cursor image used in the test.
3693
3694 2006-07-18  Timothy Hatcher  <timothy@apple.com>
3695
3696         Reviewed by Anders.
3697         
3698         <rdar://problem/4636216> NetNewsWire fails to launch on 9A224 - missing symbols
3699         
3700         WebCore needs to add -sub_library libobjc to maintain
3701         backwards compatibility with binaries linked with WebKit
3702         before JavaScriptCore moved out of WebKit.
3703
3704         * WebCore.xcodeproj/project.pbxproj:
3705
3706 2006-07-18  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3707
3708         Reviewed by Justin.
3709
3710         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9978
3711           REGRESSION (r12949-r12988): Clicking the first letter on a line places the caret at the end of the previous line
3712
3713         Test: editing/selection/click-start-of-line.html
3714
3715         * rendering/RenderText.cpp:
3716         (WebCore::RenderText::positionForCoordinates): Changed to return downstream
3717         affinity if the x coordinate is to the left of the middle of the first character
3718         in the text box.
3719
3720 2006-07-18  Anders Carlsson  <acarlsson@apple.com>
3721
3722         Reviewed by Darin.
3723
3724         http://bugzilla.opendarwin.org/show_bug.cgi?id=9695
3725         <rdar://problem/4614085> 
3726         TOT REGRESSION: NativeTextArea: Text area does not respond to Cmd-UpArrow/Cmd-DownArrow (9695)
3727         
3728         * editing/SelectionController.cpp:
3729         (WebCore::SelectionController::modifyExtendingRightForward):
3730         (WebCore::SelectionController::modifyMovingRightForward):
3731         (WebCore::SelectionController::modifyExtendingLeftBackward):
3732         (WebCore::SelectionController::modifyMovingLeftBackward):
3733         If the caret is inside an editable region, the beginning/end of the document should actually be the
3734         beginning/end of the editable region.
3735
3736 2006-07-17  Tim Omernick  <timo@apple.com>
3737
3738         Reviewed by Maciej.
3739
3740         <rdar://problem/4612079> need a way to prevent pages from scrolling to reveal elements that are focused
3741         by script
3742
3743         * bridge/mac/WebCoreFrameBridge.h:
3744         * bridge/mac/WebCoreFrameBridge.mm:
3745         (-[WebCoreFrameBridge setProhibitsScrolling:]):
3746         * page/Frame.cpp:
3747         (WebCore::Frame::prohibitsScrolling):
3748         (WebCore::Frame::setProhibitsScrolling):
3749         * page/Frame.h:
3750         * page/FramePrivate.h:
3751         (WebCore::FramePrivate::FramePrivate):
3752         * page/FrameView.cpp:
3753         (WebCore::FrameView::scrollPointRecursively):
3754         (WebCore::FrameView::setContentsPos):
3755         * page/FrameView.h:
3756         * platform/ScrollView.h:
3757
3758 2006-07-17  Maciej Stachowiak  <mjs@apple.com>
3759
3760         Reviewed by Dave Harrison.
3761         
3762         - fixed <rdar://problem/4618089> Blot crashes when I paste in all the contents of http://www.apple.com/startpage/
3763
3764         * editing/htmlediting.cpp:
3765         (WebCore::editingIgnoresContent):
3766
3767 2006-07-17  Justin Garcia  <justin.garcia@apple.com>
3768
3769         Reviewed by levi
3770         
3771         <rdar://problem/4621728>
3772         REGRESSION: Selecting by dragging down creates selection in wrong direction, with certain steps
3773         <rdar://problem/4604932>
3774         REGRESSION: Dragging too far left on a line will select all lines above it.
3775  
3776         No layout test because of 9980.
3777
3778         * rendering/RenderBlock.cpp:
3779         (WebCore::RenderBlock::positionForCoordinates): Don't return positions inside editable roots
3780         for coordinates outside those roots, except for coordinates outside a document that is entirely 
3781         editable.
3782
3783 2006-07-17  Timothy Hatcher  <timothy@apple.com>
3784
3785         Reviewed by Darin.
3786
3787         <rdar://problem/4635281> JSCanvasRenderingContext2D::drawImage needs to initialize the exception code to zero
3788
3789         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
3790         (WebCore::JSCanvasRenderingContext2D::drawImage): initialize ec to zero
3791         * html/CanvasRenderingContext2D.cpp:
3792         (WebCore::CanvasRenderingContext2D::drawImage): initialize ec before earlier return
3793
3794 2006-07-17  Timothy Hatcher  <timothy@apple.com>
3795
3796         Reviewed by Maciej.
3797
3798         <rdar://problem/4634874> WebScriptObject and WebUndefined are no longer defined by WebKit
3799
3800         Moves WebScriptObject and WebUndefined to WebCore.
3801
3802         * WebCore.exp:
3803         * WebCore.xcodeproj/project.pbxproj:
3804         * bindings/objc/DOM.mm:
3805         * bindings/objc/DOMCore.h:
3806         * bindings/objc/DOMInternal.mm:
3807         * bindings/objc/DOMUtility.mm:
3808         * bindings/objc/WebScriptObject.mm: Added.
3809         (+[WebUndefined allocWithZone:]):
3810         (-[WebUndefined initWithCoder:]):
3811         (-[WebUndefined encodeWithCoder:]):
3812         (-[WebUndefined copyWithZone:]):
3813         * bindings/objc/WebScriptObjectPrivate.h: Added.
3814         * bridge/mac/FrameMac.mm:
3815         * bridge/mac/WebCoreScriptDebugger.mm:
3816
3817 2006-07-17  David Hyatt  <hyatt@apple.com>
3818
3819         Back out the fix for 5564, since it turns out font:x-small; is a pretty
3820         prominent IE-specific CSS hack.  Because Web sites rely on IE's incorrect
3821         font parsing as a means of also correcting IE's incorrect font size rules.
3822
3823         This fixes Yahoo.com.
3824
3825         Reviewed by darin
3826
3827         * css/cssparser.cpp:
3828         (WebCore::CSSParser::parseFont):
3829
3830 2006-07-17  Justin Garcia  <justin.garcia@apple.com>
3831
3832         Reviewed by levi
3833         
3834         <rdar://problem/4618389> REGRESSION: After applying a link to the last word of a sentence, a new selection is created at the start of the sentence
3835         
3836         * dom/Document.cpp:
3837         (WebCore::Document::updateSelection):
3838
3839 2006-07-17  Maciej Stachowiak  <mjs@apple.com>
3840
3841         Reviewed by Beth.
3842         
3843         <rdar://problem/4604946> REGRESSION: 'checkboxRef.checked = true' fires onchange event in Leopard
3844
3845         * html/HTMLInputElement.cpp:
3846         (WebCore::HTMLInputElement::setChecked):
3847         (WebCore::HTMLInputElement::preDispatchEventHandler):
3848         * html/HTMLInputElement.h:
3849
3850 2006-07-16  David Kilzer  <ddkilzer@kilzer.net>
3851
3852         Reviewed by Darin.
3853
3854         - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9954
3855           REGRESSION: document.dir should return empty string in <head>
3856
3857         Test: fast/dom/document-dir-property.html
3858
3859         * bindings/js/kjs_html.cpp:
3860         (KJS::JSHTMLDocument::getValueProperty): Return an empty string instead of an
3861         undefined value for an unset document.dir property.
3862
3863 2006-07-16  David Kilzer  <ddkilzer@kilzer.net>
3864
3865         Reviewed by Darin.
3866
3867         * dom/NodeFilter.idl:
3868         Removed "No newline at end of file" that snuck in as part of the "apply patch" process.
3869         * manual-tests/input-empty-on-focus.html:
3870         Removed "Property changes" that snuck in as part of the "apply patch" process.
3871
3872 2006-07-16  Darin Adler  <darin@apple.com>
3873
3874         Reviewed by John Sullivan.
3875
3876         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9943
3877           <rdar://problem/4590613>
3878           REGRESSION (Tiger-TOT): menus are offset to the right at http://movies.aol.com/movie-photo-bts/superman-returns
3879
3880         The problem turns out to be the fact that body.offsetLeft is returning a non-zero value.
3881         I have no idea why the menus worked in Tiger Safari, because body.offsetLeft behavior has not changed.
3882         Presumably some other bug that we fixed had been compensating.
3883
3884         Test: fast/html/body-offset-properties.html
3885
3886         * rendering/RenderObject.cpp:
3887         (WebCore::RenderObject::offsetLeft): Always return 0 for any object without an offsetParent.
3888         (WebCore::RenderObject::offsetTop): Ditto.
3889         (WebCore::RenderObject::offsetParent): Return 0 for the body (treat as a special case).
3890
3891 2006-07-16  Beth Dakin  <bdakin@apple.com>
3892
3893         Reviewed by Maciej.
3894
3895         Fix for <rdar://problem/4616595> REGRESSION: Problems with world 
3896         clock widget clock hand motion on 9A211 + 4604574
3897
3898         The second hand on the widget was jiggling because the rotation was 
3899         messing up the use of the affine transformation matrix while 
3900         rounding to pixel boundaries in device space. We are mainly 
3901         concerned with rounding to pixel boundaries with the scale in mind, 
3902         so this patch extracts the scale to device space from the matrix, 
3903         and rounds to pixel boundaries using only the scale. This doesn't 
3904         seem like it is a perfect solution, but it definitely solves the 
3905         immediate problem. We will probably need to re-address what should 
3906         happen to avoid pixel cracks with rotations at non-integral scale 
3907         factors. 
3908
3909         * platform/cg/GraphicsContextCG.cpp:
3910         (WebCore::GraphicsContext::roundToDevicePixels):
3911
3912 2006-07-15  Darin Adler  <darin@apple.com>
3913
3914         - fix mistake from fix for 8952 that was breaking layout tests
3915
3916         * editing/SelectionController.cpp: (WebCore::SelectionController::nodeWillBeRemoved):
3917         Justin was right! I changed the behavior of the function by accident. Changed it
3918         back so that it doesn't blow away the selection on the DOM side in the case where
3919         it didn't before.
3920
3921         I will write 100 times on the blackboard: "When Justin says something about editing,
3922         assume he is right."
3923
3924 2006-07-15  Darin Adler  <darin@apple.com>
3925
3926         - try to fix Windows build
3927
3928         * WebCore.vcproj/WebCore/WebCore.vcproj: Added StreamingTextDecoderICU.cpp/h.
3929
3930 2006-07-15  Darin Adler  <darin@apple.com>
3931
3932         Reviewed by John Sullivan.
3933
3934         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8952
3935           <rdar://problem/4575185>
3936           REGRESSION: crash on drag of highlighted Google custom home page modules
3937
3938         Test: fast/dynamic/move-node-with-selection.html
3939
3940         * editing/SelectionController.cpp: (WebCore::SelectionController::nodeWillBeRemoved):
3941         Call updateRendering before calling clearSelection(), since it's important to do any
3942         work beforehand, and there are calls inside clearSelection that will indirectly do an
3943         updateRendering. Also change code to make fewer assumptions about object lifetime.
3944
3945 2006-07-15  Darin Adler  <darin@apple.com>
3946
3947         Reviewed by John Sullivan.
3948
3949         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8587
3950           <rdar://problem/4631844>
3951           REGRESSION: {display:list-item} on items outside an ol or ul element no longer causes incremental numbering
3952
3953         Test: fast/lists/numeric-markers-outside-list.html
3954
3955         * rendering/RenderListItem.cpp: (WebCore::previousListItem):
3956         Look for list items, even when we're outside any list.
3957
3958 2006-07-15  Adele Peterson  <adele@apple.com>
3959
3960         Reviewed by John.
3961
3962         - Fix for <rdar://problem/4593970> REGRESSION (NativeTextField): autofill menu disappears after typing a 2nd character
3963
3964         This was caused by composite editing commands, (like typing or pasting) that include a DeleteCommand, being
3965         interpreted by the form delegate as an actual delete.  This fix doesn't notify the form delegate if the deletion is
3966         part of an editing command to replace the selected text.
3967
3968         * editing/DeleteSelectionCommand.h: Added m_replace to keep track of whether this deletion is 
3969           part of a composite command to replace the text being deleted.
3970         * editing/DeleteSelectionCommand.cpp:
3971         (WebCore::DeleteSelectionCommand::DeleteSelectionCommand): Initialize m_replace.
3972         (WebCore::DeleteSelectionCommand::doApply): Only notify the form delegate of the deletion if the text is not being replaced.
3973         * editing/CompositeEditCommand.h:
3974         * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::deleteSelection): 
3975           Added replace argument to construct DeleteSelectionCommand.
3976           
3977         * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::input): Call deleteSelection with replace argument.
3978         * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): ditto.
3979
3980 2006-07-15  Geoffrey Garen  <ggaren@apple.com>
3981
3982         Reviewed by Maciej, tweaked to match Darin's patch.
3983         
3984         - Fixed <rdar://problem/4631837> REGRESSION: Reproducible crash on 
3985         FCKeditor demo (9911)
3986         
3987         * WebCore.xcodeproj/project.pbxproj:
3988         * bindings/js/kjs_html.cpp:
3989         (KJS::JSHTMLDocument::putValueProperty): Check for a null body element before
3990         forwarding the put request to it. I confirmed that no other parts of the 
3991         file use 'body' or 'bodyElement' without checking for null. 
3992         
3993         Also, use 'body' rather than 'bodyElement' because dir can bet set on 
3994         any element, not just HTMLBodyElement.
3995
3996 2006-07-15  Darin Adler  <darin@apple.com>
3997
3998         Reviewed by Adele.
3999
4000         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8871
4001           <rdar://problem/4575417>
4002           REGRESSION: Pressing Enter/Return in a text input removes the selected text
4003
4004         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9743
4005           <rdar://problem/4614228>
4006           REGRESSION: crash dispatching JavaScript-created keyboard event to input element
4007
4008         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::doTextFieldCommandFromEvent):
4009         Add a null check to fix the crash, and a FIXME explaining why this is not necessarily
4010         enough for the future.
4011
4012         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
4013         Consume Enter key keypress events even if the element is not in a form.
4014
4015         * platform/mac/KeyEventMac.mm: (WebCore::keyIdentifierForKeyEvent): Added \n to the
4016         characters that turn into "Enter". Actual keyboard events always are \r or \003 on
4017         the Macintosh, but in layout tests we can use \n, and everything other than the
4018         code path here works, so worth fixing.
4019
4020 2006-07-15  Darin Adler  <darin@apple.com>
4021
4022         Reviewed by John Sullivan.
4023
4024         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9883
4025           <rdar://problem/4631821>
4026           REGRESSION: NativePopups don't work correctly in some forum software
4027
4028         Test: fast/forms/select-selected.html
4029
4030         * rendering/RenderMenuList.h:
4031         * rendering/RenderMenuList.cpp:
4032         (WebCore::RenderMenuList::updateFromElement): Added code to map the selected option
4033         index to a list index before using it to index into the list.
4034         (WebCore::RenderMenuList::showPopup): Added code to map the selection option index
4035         to a list index before passing it to the menu renderer.
4036         (WebCore::RenderMenuList::valueChanged): Added code to map the list index back to a
4037         option index before calling setSelectedIndex (that function takes an option index).
4038
4039 2006-07-15  Darin Adler  <darin@apple.com>
4040
4041         Reviewed by John Sullivan.
4042
4043         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9928
4044           REGRESSION: Text Encoding menu inoperative (after gcc protocol build fix)
4045
4046         * bindings/objc/DOM.mm:
4047         (-[DOMNode addEventListener:::]): Moved into DOMEventTarget category.
4048         (-[DOMNode removeEventListener:::]): Ditto.
4049         (-[DOMNode dispatchEvent:]): Ditto.
4050
4051         * WebCore.xcodeproj/project.pbxproj: Allow Xcode to do its thing.
4052
4053 2006-07-15  Maciej Stachowiak  <mjs@apple.com>
4054
4055         Reviewed by Anders.
4056
4057         <rdar://problem/4632144> REGRESSION: table column tests failing as a result of very recent fix
4058
4059         * rendering/RenderTable.cpp:
4060         (WebCore::RenderTable::addChild): columns and colgroups are valid children of a table too, not
4061         just table sections!
4062
4063 2006-07-15  Anders Carlsson  <acarlsson@apple.com>
4064
4065         Reviewed by Darin.
4066
4067         http://bugzilla.opendarwin.org/show_bug.cgi?id=9866
4068         <rdar://problem/4631561>
4069         REGRESSION: Repro crash from mangleme using iframe, only from server.
4070         
4071         * html/HTMLIFrameElement.cpp:
4072         (WebCore::HTMLIFrameElement::attach):
4073         Add null check for contentFrame() since content frames won't be created for invalid URLs.        
4074
4075 2006-07-14  Alexey Proskuryakov  <ap@nypop.com>
4076
4077         Reviewed by Darin.
4078
4079         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4195
4080         REGRESSION: KOI8-U encoding no longer supported.
4081
4082         Tests:
4083         * http/tests/misc/BOM-override.pl
4084         * http/tests/misc/BOM-override-script.html
4085         * fast/encoding/charset-koi8-u.html
4086         * fast/encoding/charset-x-nextstep.html
4087
4088         Restored a TEC code path for encodings that are not supported by ICU (but which currently
4089         passes all layout tests even by itself with ICU disabled). A lot of refactoring is 
4090         still needed - most importantly, round-tripping encoding names via CFStringEncoding 
4091         makes little sense now.
4092
4093         * WebCore.exp:
4094         * bridge/mac/WebCoreTextDecoder.h: Removed.
4095         * bridge/mac/WebCoreTextDecoder.mm: Removed.
4096         WebCoreTextDecoder was not used anywhere since WebTextView was moved into WebCore.
4097
4098         * loader/Decoder.cpp:
4099         (Decoder::Decoder):
4100         (Decoder::setEncodingName):
4101         (Decoder::decode):
4102         Use StreamingTextDecoder::create().
4103
4104         * platform/StreamingTextDecoder.cpp:
4105         (WebCore::StreamingTextDecoder::create):
4106         (WebCore::StreamingTextDecoder::~StreamingTextDecoder):
4107         * platform/StreamingTextDecoder.h:
4108         StreamingTextDecoder is just an abstract interface to implementations now.
4109
4110         * platform/StreamingTextDecoderICU.cpp: Added.
4111         (WebCore::StreamingTextDecoderICU::StreamingTextDecoderICU):
4112         (WebCore::StreamingTextDecoderICU::~StreamingTextDecoderICU):
4113         (WebCore::StreamingTextDecoderICU::releaseICUConverter):
4114         (WebCore::StreamingTextDecoderICU::textEncodingSupported):
4115         (WebCore::StreamingTextDecoderICU::convertUTF16):
4116         (WebCore::StreamingTextDecoderICU::convertIfASCII):
4117         (WebCore::StreamingTextDecoderICU::createICUConverter):
4118         (WebCore::StreamingTextDecoderICU::appendOmittingBOM):
4119         (WebCore::StreamingTextDecoderICU::convertUsingICU):
4120         (WebCore::StreamingTextDecoderICU::convert):
4121         (WebCore::StreamingTextDecoderICU::toUnicode):
4122         (WebCore::StreamingTextDecoderICU::fromUnicode):
4123         * platform/StreamingTextDecoderICU.h: Added.
4124         Renamed from StreamingTextDecoder; added a way to tell whether the encoding is actually
4125         supported by the decoder; minor cleanup.
4126
4127         * platform/TextEncoding.cpp:
4128         (WebCore::TextEncoding::effectiveEncoding): Moved from StreamingTextDecoder.
4129         (WebCore::TextEncoding::toUnicode): Use StreamingTextDecoder::create().
4130         (WebCore::TextEncoding::fromUnicode): Moved to StreamingTextDecoderICU.
4131         
4132         * platform/TextEncoding.h: Changed __APPLE__ to PLATFORM(MAC); added effectiveEncoding().
4133
4134         * platform/mac/StreamingTextDecoderMac.cpp: Added.
4135         (WebCore::StreamingTextDecoderMac::StreamingTextDecoderMac):
4136         (WebCore::StreamingTextDecoderMac::~StreamingTextDecoderMac):
4137         (WebCore::StreamingTextDecoderMac::releaseTECConverter):
4138         (WebCore::StreamingTextDecoderMac::textEncodingSupported):
4139         (WebCore::StreamingTextDecoderMac::convertUTF16):
4140         (WebCore::StreamingTextDecoderMac::convertIfASCII):
4141         (WebCore::StreamingTextDecoderMac::createTECConverter):
4142         (WebCore::StreamingTextDecoderMac::appendOmittingBOM):
4143         (WebCore::StreamingTextDecoderMac::convertOneChunkUsingTEC):
4144         (WebCore::StreamingTextDecoderMac::convertUsingTEC):
4145         (WebCore::StreamingTextDecoderMac::convert):
4146         (WebCore::StreamingTextDecoderMac::toUnicode):
4147         (WebCore::StreamingTextDecoderMac::fromUnicode):
4148         * platform/mac/StreamingTextDecoderMac.h: Added.
4149         (WebCore::StreamingTextDecoderMac::convert):
4150         This is a TEC+CFString code path for decoding, basically restored from a year-old revision.
4151
4152         * platform/mac/TextEncodingMac.cpp: Removed. Code moved to StreamingTextDecoderMac.
4153
4154         * WebCore.xcodeproj/project.pbxproj:
4155
4156 === Safari-521.17&nb