637762808bca2dd0fb036edc57f0cc86b12de9cf
[WebKit-https.git] / WebCore / ChangeLog
1 2008-07-07  Dan Bernstein  <mitz@apple.com>
2
3         Reviewed by Darin Adler.
4
5         - fix <rdar://problem/6057650> REGRESSION (r35025): Crash beneath FontCache::invalidate() when activating Safari with no windows open
6
7         * css/CSSFontFaceSource.cpp:
8         (WebCore::CSSFontFaceSource::getFontData): Added a null check because
9         docLoader() can return 0 now.
10         * css/CSSFontSelector.cpp:
11         (WebCore::CSSFontSelector::docLoader): Added a null check of m_document.
12         (WebCore::CSSFontSelector::addFontFaceRule): Ditto.
13         (WebCore::CSSFontSelector::fontLoaded): Ditto.
14         (WebCore::CSSFontSelector::fontCacheInvalidated): Ditto.
15         (WebCore::fontDataForGenericFamily): Added a null check of document.
16         * css/CSSFontSelector.h:
17         (WebCore::CSSFontSelector::clearDocument): Added.
18         * css/CSSStyleSelector.cpp:
19         (WebCore::CSSStyleSelector::~CSSStyleSelector): Added a call to
20         CSSFontSelector::clearDocument(). When the style selector is destroyed,
21         there is no guarantee that the document will continue to exist.
22
23 2008-07-07  Julien Chaffraix  <jchaffraix@webkit.org>
24
25         Not reviewed.
26
27         No svg build fix.
28
29         * DerivedSources.make: Add JSSVGElementWrapperFactory.cpp target.
30         * svg/animation/SMILTimeContainer.cpp: Add ENABLE(SVG) guard.
31
32 2008-07-07  Michelangelo De Simone  <m.des@mac.com>
33
34         Reviewed by Adele.
35
36         Support for CSS3 :read-only and :read-write pseudoclasses for readonly text controls.
37
38         URL: http://www.w3.org/TR/web-forms-2/#relation
39
40         Tests: fast/css/readonly-pseudoclass-opera-001.html
41                fast/css/readonly-pseudoclass-opera-002.html
42                fast/css/readonly-pseudoclass-opera-003.html
43                fast/css/readonly-pseudoclass-opera-004.html
44                fast/css/readonly-pseudoclass-opera-005.html
45
46         * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType):
47         Added "read-only" and "read-write" values for PseudoType extraction.
48         * css/CSSSelector.h: (WebCore::CSSSelector::):
49         Added PseudoReadOnly and PseudoReadWrite entries in PseudoType enum.
50         * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
51         Checks to determine whether to match :read-only and :read-write pseudoclasses on
52         text controls.
53
54 2008-07-07  Sam Weinig  <sam@webkit.org>
55
56         Reviewed by Geoffrey Garen.
57
58         Fix for https://bugs.webkit.org/show_bug.cgi?id=19928
59         querySelectorAll should throw an exception if a NSResolver is passed in.
60
61         - Throw an NOT_SUPPORTED_ERR if a non-null or undefined parameter is passed
62           as the second argument to querySelector or querySelectorAll.
63
64         Test: fast/dom/SelectorAPI/not-supported-NSResolver.html
65
66         * bindings/js/JSDocumentCustom.cpp:
67         (WebCore::JSDocument::querySelector):
68         (WebCore::JSDocument::querySelectorAll):
69         * bindings/js/JSElementCustom.cpp:
70         (WebCore::JSElement::querySelector):
71         (WebCore::JSElement::querySelectorAll):
72         * dom/Document.idl:
73         * dom/Element.idl:
74
75 2008-07-07  Brady Eidson  <beidson@apple.com>
76
77         Reviewed by Mitz and Geoff
78
79         Test: fast/loader/empty-ref-versus-no-ref.html
80
81         Fix for https://bugs.webkit.org/show_bug.cgi?id=18951 and <rdar://problem/5921760>
82         "all DOM operations stop working when location.hash set to '#'"
83
84         The underlying problem is that KURL didn't really know the difference between "empty ref"
85         and "no ref at all" when changing the ref.  So changing to the empty ref in JS ended up 
86         affecting removal of the ref, which ended up causing an infinite load load, also killing
87         javascript.
88
89         * platform/KURL.cpp:
90         (WebCore::KURL::setRef):  Changed "isEmpty()" to "isNull()", since NULL has the special 
91           meaning of "no ref at all" while empty means "empty ref"
92
93 2008-07-07  Kevin McCullough  <kmccullough@apple.com>
94
95         Reviewed by Darin.
96
97         Because profiler.h no longer #includes profile.h we need to explicitly
98         include it in console.cpp.
99
100         * page/Console.cpp:
101
102 2008-07-07  Nikolas Zimmermann  <zimmermann@kde.org>
103
104         Not reviewed. Build fix.
105
106         Fix --svg-filters build (affects Qt build, mac/win don't have it on by default)
107
108         * svg/SVGFEColorMatrixElement.cpp:
109         * svg/SVGFEDiffuseLightingElement.cpp:
110         * svg/SVGFEImageElement.cpp:
111         * svg/SVGFELightElement.cpp:
112         * svg/SVGFESpecularLightingElement.cpp:
113
114 2008-07-07  Nikolas Zimmermann  <zimmermann@kde.org>
115
116         Reviewed by Antti.
117
118         Fixes: http://bugs.webkit.org/show_bug.cgi?id=17779 (SVG 1.1 Errata demands "SVG JavaScript Liveness" support)
119
120         Revised version of the patch, not using pointer-to-member function callbacks anymore - after discussion with Adam Roben.
121         Remove unneccessary parameters of all macros.
122
123         SVG Errata states: "All SVG DOM objects that directly correspond to an
124         attribute, e.g. the SVGAnimatedLength 'ry' in an SVGRectElement, are live. This
125         means that any changes made to the attribute are immediately reflected in the
126         corresponding SVG DOM object." (see linked URL on bug report)
127
128         Until now only XML -> SVG DOM changes took affect, aka. changing the 'rx' attribute of a <rect>
129         element resuted in changes when accessing 'rx' through SVG DOM (rx.baseVal.value).
130
131         Add a new synchronization layer to handle SVG DOM -> XML changes.
132
133         Added test: svg/custom/svg-xml-dom-sync.html
134         Fixed test: svg/hixie/dynamic/005-broken.xml (renamed to 005.xml)
135
136         * dom/Element.cpp:
137         (WebCore::Element::Element): Initialize the two new bits.
138         (WebCore::Element::attributes): Add hooks to call into SVG attribute synchronization code, wrapped in ENABLE(SVG) blocks.
139         (WebCore::Element::getAttribute): Ditto.
140         (WebCore::Element::hasAttributes): Ditto.
141         * dom/Element.h: Add two bits: m_areSVGAttributesValid/m_synchronizingSVGAttributes, to track synchronization status.
142         (WebCore::Element::updateAnimatedSVGAttribute): New virtual function, handling the synronication, similar to updateStyleAttribute.
143         * dom/NamedAttrMap.h: Make addAttribute/removeAttribute protected, from use within the ANIMATED_* macros.
144         * svg/SVGAElement.cpp:
145         * svg/SVGAElement.h:
146         * svg/SVGAnimatedTemplate.h:
147         (WebCore::lookupOrCreateWrapper): Take new AnimatedPropertySynchronizer callback as parameter, and associate it with the wrappers.
148         * svg/SVGCircleElement.cpp:
149         (WebCore::SVGCircleElement::SVGCircleElement):
150         * svg/SVGCircleElement.h:
151         * svg/SVGClipPathElement.cpp:
152         * svg/SVGClipPathElement.h:
153         * svg/SVGComponentTransferFunctionElement.cpp:
154         * svg/SVGComponentTransferFunctionElement.h:
155         * svg/SVGCursorElement.cpp:
156         (WebCore::SVGCursorElement::SVGCursorElement):
157         * svg/SVGCursorElement.h:
158         * svg/SVGElement.cpp:
159         (WebCore::SVGElement::updateAnimatedSVGAttribute): Override virtual function from Element, to handle SVG<->XML DOM synchronization.
160         (WebCore::SVGElement::setSynchronizedSVGAttributes):
161         * svg/SVGElement.h:
162         (WebCore::SVGElement::invokeSVGPropertySynchronizer):
163         (WebCore::SVGElement::invokeAllSVGPropertySynchronizers):
164         (WebCore::SVGElement::addSVGPropertySynchronizer):
165         * svg/SVGEllipseElement.cpp:
166         * svg/SVGEllipseElement.h:
167         * svg/SVGExternalResourcesRequired.cpp:
168         * svg/SVGExternalResourcesRequired.h:
169         * svg/SVGFEBlendElement.cpp:
170         * svg/SVGFEBlendElement.h:
171         * svg/SVGFEColorMatrixElement.cpp:
172         * svg/SVGFEColorMatrixElement.h:
173         * svg/SVGFEComponentTransferElement.cpp:
174         * svg/SVGFEComponentTransferElement.h:
175         * svg/SVGFECompositeElement.cpp:
176         * svg/SVGFECompositeElement.h:
177         * svg/SVGFEDiffuseLightingElement.cpp:
178         * svg/SVGFEDiffuseLightingElement.h:
179         * svg/SVGFEDisplacementMapElement.cpp:
180         * svg/SVGFEDisplacementMapElement.h:
181         * svg/SVGFEGaussianBlurElement.cpp:
182         * svg/SVGFEGaussianBlurElement.h:
183         * svg/SVGFEImageElement.cpp:
184         * svg/SVGFEImageElement.h:
185         * svg/SVGFELightElement.cpp:
186         * svg/SVGFELightElement.h:
187         * svg/SVGFEMergeNodeElement.cpp:
188         * svg/SVGFEMergeNodeElement.h:
189         * svg/SVGFEOffsetElement.cpp:
190         * svg/SVGFEOffsetElement.h:
191         * svg/SVGFESpecularLightingElement.cpp:
192         * svg/SVGFESpecularLightingElement.h:
193         * svg/SVGFETileElement.cpp:
194         * svg/SVGFETileElement.h:
195         * svg/SVGFETurbulenceElement.cpp:
196         * svg/SVGFETurbulenceElement.h:
197         * svg/SVGFilterElement.cpp:
198         * svg/SVGFilterElement.h:
199         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
200         * svg/SVGFilterPrimitiveStandardAttributes.h:
201         * svg/SVGFitToViewBox.cpp:
202         * svg/SVGFitToViewBox.h:
203         * svg/SVGForeignObjectElement.cpp:
204         * svg/SVGForeignObjectElement.h:
205         * svg/SVGGradientElement.cpp:
206         * svg/SVGGradientElement.h:
207         * svg/SVGImageElement.cpp:
208         * svg/SVGImageElement.h:
209         * svg/SVGLineElement.cpp:
210         * svg/SVGLineElement.h:
211         * svg/SVGLinearGradientElement.cpp:
212         * svg/SVGLinearGradientElement.h:
213         * svg/SVGMarkerElement.cpp:
214         * svg/SVGMarkerElement.h:
215         * svg/SVGMaskElement.cpp:
216         * svg/SVGMaskElement.h:
217         * svg/SVGPathElement.cpp:
218         * svg/SVGPathElement.h:
219         * svg/SVGPatternElement.cpp:
220         * svg/SVGPatternElement.h:
221         * svg/SVGRadialGradientElement.cpp:
222         * svg/SVGRadialGradientElement.h:
223         * svg/SVGRectElement.cpp:
224         * svg/SVGRectElement.h:
225         * svg/SVGSVGElement.cpp:
226         * svg/SVGSVGElement.h:
227         * svg/SVGScriptElement.h:
228         * svg/SVGStopElement.cpp:
229         * svg/SVGStopElement.h:
230         * svg/SVGStyledElement.cpp:
231         * svg/SVGStyledElement.h:
232         * svg/SVGStyledTransformableElement.cpp:
233         * svg/SVGStyledTransformableElement.h:
234         * svg/SVGSymbolElement.h:
235         * svg/SVGTextContentElement.cpp:
236         * svg/SVGTextContentElement.h:
237         * svg/SVGTextElement.cpp:
238         * svg/SVGTextElement.h:
239         * svg/SVGTextPathElement.cpp:
240         * svg/SVGTextPathElement.h:
241         * svg/SVGTextPositioningElement.cpp:
242         * svg/SVGTextPositioningElement.h:
243         * svg/SVGURIReference.cpp:
244         * svg/SVGURIReference.h:
245         * svg/SVGUseElement.cpp:
246         * svg/SVGUseElement.h:
247         * svg/SVGViewElement.h:
248         * svg/SynchronizableTypeWrapper.h: Added.
249
250 2008-07-07  Nikolas Zimmermann  <zimmermann@kde.org>
251
252         Reviewed by Oliver.
253
254         Working on: http://bugs.webkit.org/show_bug.cgi?id=17779 (SVG 1.1 Errata demands "SVG JavaScript Liveness" support)
255
256         Splitting up large patch in small chunk: Land valueAsString() implementation on it's own.
257
258         Added valueAsString() conversion for all SVG primitive types, needed by the SVG<->XML synchronization layer.
259         Unify "null value for a SVG animated type" concept, which was implemented in SVGDocumentExtensions before,
260         in SVGAnimatedTemplate.
261
262         * svg/SVGAnimatedTemplate.h:
263         (WebCore::SVGAnimatedTemplate::associatedAttributeName):
264         (WebCore::lookupOrCreateWrapper):
265         (WebCore::SVGAnimatedTypeValue::null):
266         (WebCore::SVGAnimatedTypeValue::toString):
267         (WebCore::):
268         * svg/SVGDocumentExtensions.h:
269         (WebCore::SVGDocumentExtensions::baseValue):
270         * svg/SVGLengthList.cpp:
271         (WebCore::SVGLengthList::valueAsString):
272         * svg/SVGLengthList.h:
273         * svg/SVGNumberList.cpp:
274         (WebCore::SVGNumberList::valueAsString):
275         * svg/SVGNumberList.h:
276         * svg/SVGPreserveAspectRatio.cpp:
277         (WebCore::SVGPreserveAspectRatio::valueAsString):
278         * svg/SVGPreserveAspectRatio.h:
279         * svg/SVGTransformList.cpp:
280         (SVGTransformList::valueAsString):
281         * svg/SVGTransformList.h:
282
283 2008-07-06  Sam Weinig  <sam@webkit.org>
284
285         Reviewed by Dan Bernstein.
286
287         Rename "Access-Contol-Origin" to "Origin" to match the latest
288         Access Control for Cross-Site Request draft. (Editor's Draft 25 May 2008)
289
290         * xml/XMLHttpRequest.cpp:
291         (WebCore::XMLHttpRequest::makeSimpleCrossSiteAccessRequest):
292         (WebCore::XMLHttpRequest::makeCrossSiteAccessRequestWithPreflight):
293         (WebCore::XMLHttpRequest::handleAsynchronousPreflightResult):
294
295 2008-07-06  Dan Bernstein  <mitz@apple.com>
296
297         - try to fix the Windows build
298
299         * WebCore.vcproj/WebCore.vcproj:
300
301 2008-07-06  Dan Bernstein  <mitz@apple.com>
302
303         - add missing brace
304
305         * platform/graphics/qt/FontCacheQt.cpp:
306
307 2008-07-06  Dan Bernstein  <mitz@apple.com>
308
309         - try to fix the Qt build
310
311         * platform/graphics/qt/FontCacheQt.cpp:
312         (WebCore::FontCache::addClient):
313         (WebCore::FontCache::removeClient):
314
315 2008-07-06  Sam Weinig  <sam@webkit.org>
316
317         Reviewed by Cameron Zwarich.
318
319         Add #include for kjs/protect.h.
320
321         * xml/XMLHttpRequest.cpp:
322         (WebCore::XMLHttpRequest::loadRequestAsynchronously):
323
324 2008-07-06  David Kilzer  <ddkilzer@apple.com>
325
326         Save a few more bits in RenderStyle
327
328         Reviewed by Darin.
329
330         No test cases added since there is no change in behavior.
331
332         This changes WebCore::StyleMarqueeData from using 6 bits to 5 bits,
333         WebCore::RenderStyle::inherited_flags from using 36 bits to 35 bits,
334         and WebCore::RenderStyle::noninherited_flags from using 49 bits to
335         47 bits.
336
337         * rendering/style/RenderStyle.h:
338         (WebCore::StyleMarqueeData::behavior): Reduce from 3 bits to 2 bits
339         since EMarqueeBehavior has 4 items.
340         (WebCore::RenderStyle::inherited_flags._text_align): Reduce from
341         4 bits to 3 bits since ETextAlign has 8 items.
342         (WebCore::RenderStyle::noninherited_flags._overflowX): Reduce from
343         4 bits to 3 bits since EOverflow has 6 items.
344         (WebCore::RenderStyle::noninherited_flags._overflowY): Ditto.
345
346 2008-07-06  Dan Bernstein  <mitz@apple.com>
347
348         Reviewed by Darin Adler.
349
350         - fix <rdar://problem/5735163> WebCore caching makes text look wrong after font changes; need to respond appropriately instead
351
352         * css/CSSFontSelector.cpp:
353         (WebCore::CSSFontSelector::CSSFontSelector): Added a call to
354         FontCache::addClient().
355         (WebCore::CSSFontSelector::~CSSFontSelector): Added a call to
356         FontCache::removeClient().
357         (WebCore::CSSFontSelector::fontCacheInvalidated): Added. Called by the
358         font cache when it is invalidated, and ensures that the document is
359         updated.
360
361         * css/CSSFontSelector.h:
362
363         * platform/graphics/Font.cpp:
364         (WebCore::Font::operator==): Added code to compare the font fallback
365         lists' font cache generations.
366
367         * platform/graphics/FontCache.cpp:
368         (WebCore::FontCache::addClient): Added.
369         (WebCore::FontCache::removeClient): Added.
370         (WebCore::FontCache::generation): Added.
371         (WebCore::FontCache::invalidate): Added. Deletes the platform data
372         cache, increments the generation counter, and notifies all clients.
373
374         * platform/graphics/FontCache.h:
375
376         * platform/graphics/FontFallbackList.cpp:
377         (WebCore::FontFallbackList::FontFallbackList): Added initialization of
378         m_generation.
379         (WebCore::FontFallbackList::invalidate): Added code to reset
380         m_generation.
381         (WebCore::FontFallbackList::fontDataAt): Added an assertion.
382         (WebCore::FontFallbackList::fontDataForCharacters): Ditto.
383         (WebCore::FontFallbackList::setPlatformFont): Ditto.
384
385         * platform/graphics/FontFallbackList.h:
386         (WebCore::FontFallbackList::generation): Added. Returns the font cache
387         generation used to populate the list.
388
389         * platform/graphics/FontSelector.h:
390         (WebCore::FontSelector::fontCacheInvalidated): Added.
391
392         * platform/graphics/mac/FontCacheMac.mm:
393         (WebCore::fontCacheATSNotificationCallback): Added. Calls
394         FontCache::invalidate().
395         (WebCore::FontCache::platformInit): Added code to register for ATS
396         notifications.
397
398         * svg/SVGFontFaceElement.cpp: Removed unneeded #inlcudes.
399
400 2008-07-05  Sam Weinig  <sam@webkit.org>
401
402         Rubber-stamped by Cameron Zwarich.
403
404         Rename list.h/cpp to ArgList.h/cpp.
405
406         * ForwardingHeaders/kjs/ArgList.h: Copied from WebCore/ForwardingHeaders/kjs/list.h.
407         * ForwardingHeaders/kjs/list.h: Removed.
408         * WebCore.vcproj/WebCore.vcproj:
409         * bridge/qt/qt_instance.cpp:
410         * page/Console.cpp:
411
412 2008-07-05  Sam Weinig  <sam@webkit.org>
413
414         Rubber-stamped by Cameron Zwarich.
415
416         Split Arguments, IndexToNameMap, PrototypeFunction, GlobalEvalFunction and 
417         the functions on the global object out of JSFunction.h/cpp.
418
419         * ForwardingHeaders/kjs/PrototypeFunction.h: Added.
420         * bindings/js/JSDOMBinding.cpp:
421
422 2008-07-05  Dan Bernstein  <mitz@apple.com>
423
424         Rubber-stamped by Sam Weinig.
425
426         - rename BidiIterator and BidiState
427
428         Renamed BidiIterator to InlineIterator and BidiState
429         to InlineBidiResolver. Renamed variables of type InlineBidiResolver{*,&}
430         to "resolver".
431
432         * rendering/RenderBlock.h:
433         * rendering/RootInlineBox.h:
434         * rendering/bidi.cpp:
435         (WebCore::InlineIterator::InlineIterator):
436         (WebCore::operator==):
437         (WebCore::operator!=):
438         (WebCore::bidiNext):
439         (WebCore::bidiFirst):
440         (WebCore::InlineIterator::increment):
441         (WebCore::InlineBidiResolver::increment):
442         (WebCore::InlineIterator::atEnd):
443         (WebCore::InlineIterator::current):
444         (WebCore::InlineIterator::direction):
445         (WebCore::chopMidpointsAt):
446         (WebCore::checkMidpoints):
447         (WebCore::addMidpoint):
448         (WebCore::appendRunsForObject):
449         (WebCore::InlineBidiResolver::appendRun):
450         (WebCore::RenderBlock::bidiReorderLine):
451         (WebCore::buildCompactRuns):
452         (WebCore::RenderBlock::layoutInlineChildren):
453         (WebCore::RenderBlock::determineStartPosition):
454         (WebCore::RenderBlock::determineEndPosition):
455         (WebCore::RenderBlock::matchedEndLine):
456         (WebCore::skipNonBreakingSpace):
457         (WebCore::requiresLineBox):
458         (WebCore::RenderBlock::generatesLineBoxesForInlineChild):
459         (WebCore::RenderBlock::skipWhitespace):
460         (WebCore::shouldSkipWhitespaceAfterStartObject):
461         (WebCore::RenderBlock::findNextLineBreak):
462
463 2008-07-05  Jan Michael Alonzo  <jmalonzo@webkit.org>
464
465         Rubber-stamped by Oliver Hunt
466
467         Coding style fix
468
469         * html/CanvasRenderingContext2D.cpp: Indentation fix
470
471 2008-07-04  Oliver Hunt  <oliver@apple.com>
472
473         Fix windows build
474
475         * WebCore.vcproj/WebCore.vcproj:
476
477 2008-07-04  Sam Weinig  <sam@webkit.org>
478
479         Fix Qt build.
480
481         * bridge/qt/qt_instance.cpp:
482
483 2008-07-04  Sam Weinig  <sam@webkit.org>
484
485         Rubber-stamped by Dan Bernstein.
486
487         Split Error and GetterSetter out of JSObject.h.
488
489         * ForwardingHeaders/kjs/Error.h: Added.
490         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
491         * bindings/js/JSClipboardCustom.cpp:
492         * bindings/js/JSDOMWindowBase.cpp:
493         * bindings/js/JSEventTargetBase.cpp:
494         * bindings/js/JSHTMLDocumentCustom.cpp:
495         * bindings/js/JSXMLHttpRequestCustom.cpp:
496         * bindings/scripts/CodeGeneratorJS.pm:
497         * bridge/NP_jsobject.cpp:
498         * bridge/jni/jni_instance.cpp:
499         * bridge/jni/jni_runtime.cpp:
500         * bridge/objc/objc_instance.mm:
501         * bridge/objc/objc_runtime.mm:
502         * bridge/objc/objc_utility.h:
503         * bridge/runtime_array.cpp:
504         * bridge/runtime_method.cpp:
505         * bridge/runtime_object.cpp:
506
507 2008-07-04  David D. Kilzer  <ddkilzer@webkit.org>
508
509         Bug 15290: REGRESSION (r14184-r14216): Duplicate DOCTYPE definitions when saving files as webarchives
510
511         <https://bugs.webkit.org/show_bug.cgi?id=15290>
512         <rdar://problem/5509173>
513
514         Reviewed by Dan Bernstein.
515
516         Tests: webarchive/archive-empty-frame-dom.html
517                webarchive/doctype.html
518
519         * editing/markup.cpp:
520         (WebCore::createFullMarkup): If the Node is a Document or a
521         DocumentType, don't prepend the <!DOCTYPE> tag since that will
522         cause it to be duplicated.
523         * loader/archive/cf/LegacyWebArchive.cpp:
524         (WebCore::LegacyWebArchive::create): Ditto.
525
526 2008-07-04  Jan Michael Alonzo  <jmalonzo@webkit.org>
527
528         Gtk build fix
529
530         * GNUmakefile.am:
531
532 2008-07-04  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
533
534         Reviewed by Eric Seidel.
535
536         Bring our implementation of the Netscape plugin API closer to current
537         code style guidelines.
538
539         * bridge/NP_jsobject.cpp:
540         (getListFromVariantArgs):
541         (jsAllocate):
542         (jsDeallocate):
543         (_NPN_CreateScriptObject):
544         (_NPN_CreateNoScriptObject):
545         (_NPN_InvokeDefault):
546         (_NPN_Invoke):
547         (_NPN_Evaluate):
548         (_NPN_GetProperty):
549         (_NPN_SetProperty):
550         (_NPN_RemoveProperty):
551         (_NPN_HasProperty):
552         (_NPN_HasMethod):
553         (_NPN_Enumerate):
554         * bridge/npruntime_impl.h:
555
556 2008-07-04  Simon Hausmann  <hausmann@webkit.org>
557
558         Fix the Qt/Windows build.
559
560         * WebCore.pro: Moved PluginMainThreadScheduler.cpp to the main
561         sources, so that it is always compiled.
562         * platform/qt/CursorQt.cpp: #undef CopyCursor, as it's defined by some
563         Windows header.
564         * platform/qt/KeyboardCodes.h: Don't re-define some of the keycodes
565         that are defined by Windows already.
566         * platform/qt/TemporaryLinkStubs.cpp: Removed the PluginDatabase stubs
567         that are now platform-independent in plugin/PluginDatabase.cpp.
568
569 2008-07-04  Simon Hausmann  <hausmann@webkit.org>
570
571         Fix the Mac build for real, don't define listDirectory() twice.
572
573         * platform/mac/FileSystemMac.mm:
574
575 2008-07-04  Simon Hausmann  <hausmann@webkit.org>
576
577         Prospective Mac build fix.
578
579         * platform/mac/FileSystemMac.mm: Include NotImplemented.h.
580         * platform/posix/FileSystemPOSIX.cpp: Ditto.
581
582 2008-07-04  Tor Arne Vestbø  <tavestbo@trolltech.com>
583
584         Reviewed by Simon.
585
586         Move duplicated code from each PluginDatabaseXX-implementation
587         to PluginDabase.cpp -- ifdefed based on the XP_PLATFORM we are
588         compiling plugins for.
589
590         This make the code cleaner and we can share common patterns.
591         The only implementation left which is specific is the Win
592         implementation (also used by QtWebKit/Win), but we might
593         want to move that too.
594
595         * GNUmakefile.am: Removed PluginDatabaseGtk.cpp from the build.
596         * WebCore.pro: Removed PluginDatabaseQt.cpp from the build.
597         * plugins/PluginDatabase.cpp:
598         (WebCore::PluginDatabase::defaultPluginDirectories):
599         (WebCore::PluginDatabase::isPreferredPluginDirectory):
600         (WebCore::PluginDatabase::getPluginPathsInDirectories):
601         * plugins/gtk/PluginDatabaseGtk.cpp: Removed.
602         * plugins/qt/PluginDatabaseQt.cpp: Removed.
603         * plugins/wx/PluginDatabaseWx.cpp: Removed.
604         * webcore-wx.bkl: Removed PluginDatabaseWx.cpp from the build.
605
606 2008-07-04  Simon Hausmann  <hausmann@webkit.org>
607
608         Fix the Wx build.
609
610         * WebCoreSources.bkl: Add plugins/PluginMainThreadScheduler.cpp to the
611         build.
612         * page/FocusController.cpp:
613         (WebCore::FocusController::setActive): Extend MAC #ifdef to WX as
614         layoutIfNeededRecursive does not exist for the Wx port.
615
616 2008-07-04  Simon Hausmann  <hausmann@webkit.org>
617
618         Fix the Gtk build, adapt to renamed files.
619
620         * GNUmakefile.am:
621
622 2008-07-04  Simon Hausmann  <hausmann@webkit.org>
623
624         Fix the Qt build, adapt to renamed files.
625
626         * WebCore.pro:
627
628 2008-07-03  Oliver Hunt  <oliver@apple.com>
629
630         Reviewed by Eric Seidel.
631
632         Move filter implementations to platform directory.
633
634         * WebCore.vcproj/WebCore.vcproj
635         * WebCore.xcodeproj/project.pbxproj:
636         * svg/SVGComponentTransferFunctionElement.h:
637         * svg/SVGFEBlendElement.h:
638         * svg/SVGFEColorMatrixElement.h:
639         * svg/SVGFEComponentTransferElement.h:
640         * svg/SVGFECompositeElement.h:
641         * platform/graphics/filters/FEBlend.cpp: Renamed from WebCore/svg/graphics/filters/SVGFEBlend.cpp.
642         * platform/graphics/filters/FEBlend.h: Renamed from WebCore/svg/graphics/filters/SVGFEBlend.h.
643         * platform/graphics/filters/FEColorMatrix.cpp: Renamed from WebCore/svg/graphics/filters/SVGFEColorMatrix.cpp.
644         * platform/graphics/filters/FEColorMatrix.h: Renamed from WebCore/svg/graphics/filters/SVGFEColorMatrix.h.
645         * platform/graphics/filters/FEComponentTransfer.cpp: Renamed from WebCore/svg/graphics/filters/SVGFEComponentTransfer.cpp.
646         * platform/graphics/filters/FEComponentTransfer.h: Renamed from WebCore/svg/graphics/filters/SVGFEComponentTransfer.h.
647         * platform/graphics/filters/FEComposite.cpp: Renamed from WebCore/svg/graphics/filters/SVGFEComposite.cpp.
648         * platform/graphics/filters/FEComposite.h: Renamed from WebCore/svg/graphics/filters/SVGFEComposite.h.
649
650 2008-07-03  Alex Mathews  <possessedpenguinbob@gmail.com>
651
652         Reviewed by Oliver Hunt.
653
654         Bug 19835: WebKit needs cross-platform filter system
655         <https://bugs.webkit.org/show_bug.cgi?id=19835>
656
657         More class refactoring in preparation for cross-platform filter
658         implementation.
659
660         * WebCore.xcodeproj/project.pbxproj:
661         * svg/FilterEffect.h:
662         * svg/SVGComponentTransferFunctionElement.cpp:
663         (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
664         (WebCore::SVGComponentTransferFunctionElement::parseMappedAttribute):
665         (WebCore::SVGComponentTransferFunctionElement::transferFunction):
666         * svg/SVGComponentTransferFunctionElement.h:
667         * svg/SVGFEColorMatrixElement.cpp:
668         (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
669         (WebCore::SVGFEColorMatrixElement::parseMappedAttribute):
670         (WebCore::SVGFEColorMatrixElement::filterEffect):
671         (WebCore::SVGFEColorMatrixElement::build):
672         * svg/SVGFEColorMatrixElement.h:
673         * svg/SVGFEComponentTransferElement.cpp:
674         (WebCore::SVGFEComponentTransferElement::filterEffect):
675         (WebCore::SVGFEComponentTransferElement::build):
676         * svg/SVGFEComponentTransferElement.h:
677         * svg/SVGFECompositeElement.cpp:
678         (WebCore::SVGFECompositeElement::SVGFECompositeElement):
679         (WebCore::SVGFECompositeElement::parseMappedAttribute):
680         (WebCore::SVGFECompositeElement::filterEffect):
681         (WebCore::SVGFECompositeElement::build):
682         * svg/SVGFECompositeElement.h:
683         * svg/graphics/filters/SVGFEBlend.cpp:
684         * svg/graphics/filters/SVGFEBlend.h:
685         * svg/graphics/filters/SVGFEColorMatrix.cpp:
686         (WebCore::FEColorMatrix::FEColorMatrix):
687         (WebCore::FEColorMatrix::create):
688         (WebCore::FEColorMatrix::type):
689         (WebCore::FEColorMatrix::setType):
690         (WebCore::FEColorMatrix::values):
691         (WebCore::FEColorMatrix::setValues):
692         (WebCore::FEColorMatrix::apply):
693         (WebCore::FEColorMatrix::dump):
694         * svg/graphics/filters/SVGFEColorMatrix.h:
695         (WebCore::):
696         * svg/graphics/filters/SVGFEComponentTransfer.cpp:
697         (WebCore::FEComponentTransfer::FEComponentTransfer):
698         (WebCore::FEComponentTransfer::create):
699         (WebCore::FEComponentTransfer::redFunction):
700         (WebCore::FEComponentTransfer::setRedFunction):
701         (WebCore::FEComponentTransfer::greenFunction):
702         (WebCore::FEComponentTransfer::setGreenFunction):
703         (WebCore::FEComponentTransfer::blueFunction):
704         (WebCore::FEComponentTransfer::setBlueFunction):
705         (WebCore::FEComponentTransfer::alphaFunction):
706         (WebCore::FEComponentTransfer::setAlphaFunction):
707         (WebCore::FEComponentTransfer::apply):
708         (WebCore::FEComponentTransfer::dump):
709         * svg/graphics/filters/SVGFEComponentTransfer.h:
710         (WebCore::):
711         (WebCore::ComponentTransferFunction::ComponentTransferFunction):
712         * svg/graphics/filters/SVGFEComposite.cpp:
713         (WebCore::FEComposite::FEComposite):
714         (WebCore::FEComposite::create):
715         (WebCore::FEComposite::operation):
716         (WebCore::FEComposite::setOperation):
717         (WebCore::FEComposite::k1):
718         (WebCore::FEComposite::setK1):
719         (WebCore::FEComposite::k2):
720         (WebCore::FEComposite::setK2):
721         (WebCore::FEComposite::k3):
722         (WebCore::FEComposite::setK3):
723         (WebCore::FEComposite::k4):
724         (WebCore::FEComposite::setK4):
725         (WebCore::FEComposite::apply):
726         (WebCore::FEComposite::dump):
727         * svg/graphics/filters/SVGFEComposite.h:
728         (WebCore::):
729         * svg/graphics/filters/cg/SVGFEColorMatrixCg.mm: Removed.
730         * svg/graphics/filters/cg/SVGFEComponentTransferCg.mm: Removed.
731         * svg/graphics/filters/cg/SVGFECompositeCg.mm: Removed.
732
733 2008-07-03  Dan Bernstein  <mitz@apple.com>
734
735         Reviewed by John Sullivan.
736
737         - fix <rdar://problem/6020930> Bidi Problem When Resizing Window
738
739         Test: fast/text/international/bidi-AN-after-empty-run.html
740
741         * platform/text/BidiResolver.h:
742         (WebCore::::appendRun): Changed to reset the current direction and
743         "end of run" direction even in the empty run case.
744         * rendering/bidi.cpp:
745         (WebCore::BidiState::appendRun): Ditto.
746
747 2008-07-02  Jon Honeycutt  <jhoneycutt@apple.com>
748
749         <rdar://5983747> Safari crashes trying to load the SilverLight plugin
750
751         If a plug-in returned an error code from NPP_NewStream, we would call
752         NPP_DestroyStream while cleaning up the request. We now only call
753         NPP_DestroyStream if NPP_NewStream was successful, matching Firefox.
754
755         Reviewed by Anders.
756
757         * plugins/PluginStream.cpp:
758         (WebCore::PluginStream::startStream): If NPP_NewStream returns an error,
759         don't set m_streamState to StreamStarted, and return after calling
760         cancelAndDestroyStream.
761         (WebCore::PluginStream::destroyStream): Don't call NPP_DestroyStream if
762         the stream didn't start successfully.
763
764 2008-07-03  David Hyatt  <hyatt@apple.com>
765
766         Revise Dan's fix for an assert on Windows, since layoutIfNeededRecursive doesn't exist on the
767         Mac.  Revert updateControlTints and add the layout call outside of it in the already-existing
768         !PLATFORM(MAC) ifdef in FocusController's setActive method.
769
770         Reviewed by ggaren, weinig
771
772         * page/FocusController.cpp:
773         (WebCore::FocusController::setActive):
774         * page/FrameView.cpp:
775         (WebCore::FrameView::updateControlTints):
776
777 2008-07-03  Alexey Proskuryakov  <ap@webkit.org>
778
779         Reviewed by Darin.
780
781         https://bugs.webkit.org/show_bug.cgi?id=19884
782         Locating a store at www.366.ru doesn't work
783
784         Test: fast/forms/submit-with-base.html
785
786         * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::submit): Treat empty action the same
787         as missing one - ignore base URL.
788
789 2008-07-03  Dan Bernstein  <mitz@apple.com>
790
791         Reviewed by John Sullivan.
792
793         - fix <rdar://problem/6048904> Assert in WebCore::Frame::paint in Windows
794
795         * page/FrameView.cpp:
796         (WebCore::FrameView::updateControlTints): Changed to update layout
797         recursively and not just for the top-level frame.
798
799 2008-07-03  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
800
801         Reviewed by Geoff.
802
803         Bug 19853: REGRESSION (r34838): Crash when visiting http://www.thewebsiteisdown.com/salesguy.html
804         https://bugs.webkit.org/show_bug.cgi?id=19853
805
806         Remove the body of _NPN_SetException(), because it was simply calling
807         throwError(), which sets an exception on an ExecState but does not
808         actually handle it. The presence of an exception on the global ExecState
809         causes assertions that there is no exception set on that ExecState to
810         fail, as well as causing Machine::execute() to mistakingly return 0 in
811         some cases, as it assumes the presence of an exception implies that it
812         has run out of memory.
813
814         * bridge/NP_jsobject.cpp:
815         (_NPN_SetException):
816
817 2008-07-03  Maciej Katafiasz  <mathrick@gmail.com>
818
819         Gtk build fix with SVG filters enabled
820
821         * GNUmakefile.am: Include missing SVG filter sources
822
823 2008-07-03  Simon Hausmann  <hausmann@webkit.org>
824
825         Fix the Qt build, added FilterEffect to the build.
826
827         * WebCore.pro:
828
829 2008-07-02  Brady Eidson  <beidson@apple.com>
830
831         Reviewed by Mitz Pettel and John Sullivan
832
833         Fix for <rdar://problem/5549871> - Crash when calling [WebView stopLoading:] or [WebFrame stopLoading] 
834         inside of the frame load delegate method -webView:didStartProvisionalLoadForFrame:.
835
836         Test: fast/loader/stop-provisional-loads.html
837
838         * loader/FrameLoader.cpp:
839         (WebCore::FrameLoader::continueLoadAfterWillSubmitForm): Since the provisionalDocumentLoader may have been cleared
840           by the prepareForLoadStart() call, null check it again.
841
842 2008-07-01  Alex Mathews  <possessedpenguinbob@gmail.com>
843
844         Reviewed by Oliver Hunt.
845
846         Renaming of class SVGFEBlend to FEBlend as well as removing
847         a little bit of antiquated code. This includes the removal of
848         SVGFEBlendCg.mm; the feBlend element will now no longer
849         render. 
850
851         * WebCore.xcodeproj/project.pbxproj:
852         * svg/FilterBuilder.h:
853         (WebCore::FilterBuilder::add):
854         (WebCore::FilterBuilder::getEffectById):
855         * svg/SVGFEBlendElement.cpp:
856         (WebCore::SVGFEBlendElement::SVGFEBlendElement):
857         (WebCore::SVGFEBlendElement::parseMappedAttribute):
858         (WebCore::SVGFEBlendElement::filterEffect):
859         (WebCore::SVGFEBlendElement::build):
860         * svg/SVGFEBlendElement.h:
861         * svg/SVGFilterPrimitiveStandardAttributes.h:
862         * svg/graphics/filters/SVGFEBlend.cpp:
863         (WebCore::FEBlend::FEBlend):
864         (WebCore::FEBlend::create):
865         (WebCore::FEBlend::in2):
866         (WebCore::FEBlend::setIn2):
867         (WebCore::FEBlend::blendMode):
868         (WebCore::FEBlend::setBlendMode):
869         (WebCore::FEBlend::apply):
870         (WebCore::FEBlend::dump):
871         * svg/graphics/filters/SVGFEBlend.h:
872         (WebCore::):
873         * svg/graphics/filters/cg/SVGFEBlendCg.mm: Removed.
874
875 2008-07-02  Beth Dakin  <bdakin@apple.com>
876
877         Reviewed by Darin.
878
879         Fix for <rdar://problem/6015523> Implement ARIA ranges/sliders
880         and
881         <rdar://problem/5934355> Need to implement ARIA role="spinbutton"
882
883         * page/AccessibilityObject.h:
884         (WebCore::AccessibilityObject::isSlider):
885         * page/AccessibilityRenderObject.cpp:
886         (WebCore::AccessibilityRenderObject::isSlider):
887         (WebCore::AccessibilityRenderObject::valueForRange):
888         (WebCore::AccessibilityRenderObject::maxValueForRange):
889         (WebCore::AccessibilityRenderObject::minValueForRange):
890         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): We 
891         were addressing the generic has-an-ARIA-role case too early here.
892         (WebCore::AccessibilityRenderObject::focusedUIElement): This is a 
893         bug I ran into while testing role='spinbutton', spinbutton is a 
894         role that can have an active descendant. But we were always trying 
895         to forward focus to the active descendant, even if one was not 
896         specified. 
897         (WebCore::AccessibilityRenderObject::shouldFocusActiveDescendant): 
898         'spinbutton' maps to ProgressIndicatorRole.
899         (WebCore::RoleEntry::):
900         (WebCore::AccessibilityRenderObject::canSetValueAttribute):
901         * page/AccessibilityRenderObject.h:
902         * page/mac/AccessibilityObjectWrapper.mm:
903         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
904         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
905
906 2008-07-02  Dan Bernstein  <mitz@apple.com>
907
908         Reviewed by Adam Roben.
909
910         - Windows build fix
911
912         Renamed the ERROR token in the XPath grammar to XPATH_ERROR, because
913         the ERROR macro is defined in <wingdi.h>.
914
915         * xml/XPathGrammar.y:
916         * xml/XPathParser.cpp:
917         (WebCore::XPath::Parser::lexString):
918         (WebCore::XPath::Parser::nextTokenInternal):
919
920 2008-07-02  Alexey Proskuryakov  <ap@webkit.org>
921
922         Inspired and reviewed by Mark Rowe.
923
924         Change non-API includes from JavaScriptCore/ to kjs/ and wtf/ to match prevalent style.
925
926         * bindings/objc/ExceptionHandlers.h:
927         * bindings/objc/WebScriptObject.mm:
928         * dom/Document.cpp:
929         * dom/Node.cpp:
930         * page/Frame.cpp:
931         * page/InspectorController.cpp:
932         * page/JavaScriptProfileNode.cpp:
933         * page/mac/FrameMac.mm:
934         * platform/mac/ThreadCheck.mm:
935         * xml/XMLHttpRequest.cpp:
936
937 2008-07-02  Simon Hausmann  <hausmann@webkit.org>
938
939         Fix the Gtk build.
940
941         * plugins/gtk/PluginViewGtk.cpp: Adapt to JSLock API changes.
942         (WebCore::PluginView::paint):
943         (WebCore::PluginView::handleKeyboardEvent):
944         (WebCore::PluginView::handleMouseEvent):
945         (WebCore::PluginView::setNPWindowRect):
946         (WebCore::PluginView::stop):
947         (WebCore::PluginView::init):
948
949 2008-07-02  Simon Hausmann  <hausmann@webkit.org>
950
951         Build fixes.
952
953         * WebCore.pro: Added plugins/PluginMainThreadScheduler.cpp to the
954         build.
955         * bridge/qt/qt_instance.cpp: Adjust to JSLock API change.
956         * bridge/qt/qt_runtime.cpp: Ditto.
957         (KJS::Bindings::convertValueToQVariant):
958         (KJS::Bindings::convertQVariantToValue):
959         (KJS::Bindings::QtRuntimeMetaMethod::call):
960         (KJS::Bindings::QtRuntimeConnectionMethod::call):
961         (KJS::Bindings::QtConnectionObject::execute):
962         * page/JavaScriptProfileNode.cpp: Inlude kjs/JSValue.h instead of
963         JavaScriptCore/JSValue.h.
964         * plugins/qt/PluginViewQt.cpp: Adjust to JSLock API changes.
965         (WebCore::PluginView::setNPWindowRect): Ditto.
966         (WebCore::PluginView::stop): Ditto.
967         (WebCore::PluginView::init): Ditto.
968
969 2008-07-02  Alexey Proskuryakov  <ap@webkit.org>
970
971         Build fix.
972
973         * plugins/PluginView.cpp:
974         (WebCore::PluginView::start):
975         (WebCore::getString):
976         (WebCore::PluginView::performRequest):
977         (WebCore::PluginView::bindingInstance):
978         * plugins/win/PluginViewWin.cpp:
979         (WebCore::PluginView::dispatchNPEvent):
980         (WebCore::PluginView::setNPWindowRect):
981         (WebCore::PluginView::stop):
982         Pass false to JSLock and JSLock::DropAllLocks constructors.
983
984 2008-07-01  Oliver Hunt  <oliver@apple.com>
985
986         Reviewed by Geoff Garen.
987
988         <rdar://problem/5974306> CanvasRenderingContext2D becomes invalid when source canvas element is collected
989
990         In order to fix this we now make the rendering context and the canvas element
991         share the same reference count, ensuring that references to the rendering
992         context will force the canvas element to remain live as well.
993
994         Test: fast/canvas/canvas-longlived-context.html
995
996         * html/CanvasRenderingContext2D.cpp:
997         (WebCore::CanvasRenderingContext2D::clearPathForDashboardBackwardCompatibilityMode):
998         (WebCore::CanvasRenderingContext2D::createImageData):
999         (WebCore::CanvasRenderingContext2D::getImageData):
1000         (WebCore::CanvasRenderingContext2D::putImageData):
1001         * html/CanvasRenderingContext2D.h:
1002         (WebCore::CanvasRenderingContext2D::create):
1003         * html/HTMLCanvasElement.cpp:
1004         (WebCore::HTMLCanvasElement::getContext):
1005         * html/HTMLCanvasElement.h:
1006
1007 2008-07-01  Alexey Proskuryakov  <ap@webkit.org>
1008
1009         Reviewed by Darin.
1010
1011         Disable JSLock for per-thread contexts.
1012
1013         * bridge/runtime_root.cpp:
1014         (KJS::Bindings::RootObject::invalidate):
1015         (KJS::Bindings::RootObject::gcProtect):
1016         (KJS::Bindings::RootObject::gcUnprotect):
1017         Don't lock while calling gcProtect/gcUnprotect, which now has its own implicit lock.
1018
1019         * storage/Database.cpp: (WebCore::Database::Database): Call Heap::setGCProtectNeedsLocking
1020         to indicate that protected value list can be concurrently accessed from multiple threads now.
1021
1022         * xml/XMLHttpRequest.cpp:
1023         (WebCore::XMLHttpRequest::loadRequestSynchronously): There is no need to drop the locks here,
1024         as fake locks cannot deadlock, and there is no danger that someone will try to take a real
1025         JSLock on the main thread while we are waiting for response.
1026         (WebCore::XMLHttpRequest::loadRequestAsynchronously): There is no need to explicitly lock
1027         around gcProtect/gcUnprotect now.
1028         (WebCore::XMLHttpRequest::dropProtection): Access heap directly, rather than via
1029         JSGlobalData::threadInstance().
1030
1031         * bindings/js/GCController.cpp:
1032         (WebCore::collect):
1033         (WebCore::GCController::gcTimerFired):
1034         (WebCore::GCController::garbageCollectNow):
1035         (WebCore::GCController::garbageCollectOnAlternateThreadForDebugging):
1036         * bindings/js/JSCustomSQLStatementCallback.cpp:
1037         (WebCore::JSCustomSQLStatementCallback::handleEvent):
1038         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
1039         (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
1040         * bindings/js/JSCustomSQLTransactionCallback.cpp:
1041         (WebCore::JSCustomSQLTransactionCallback::handleEvent):
1042         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
1043         (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
1044         * bindings/js/JSCustomVoidCallback.cpp:
1045         (WebCore::JSCustomVoidCallback::handleEvent):
1046         * bindings/js/JSCustomXPathNSResolver.cpp:
1047         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1048         * bindings/js/JSDOMWindowBase.cpp:
1049         (WebCore::DOMWindowTimer::~DOMWindowTimer):
1050         (WebCore::JSDOMWindowBase::clear):
1051         (WebCore::JSDOMWindowBase::timerFired):
1052         * bindings/js/JSEventCustom.cpp:
1053         (WebCore::toJS):
1054         * bindings/js/JSEventListener.cpp:
1055         (WebCore::JSAbstractEventListener::handleEvent):
1056         (WebCore::JSLazyEventListener::parseCode):
1057         * bindings/js/JSNodeFilterCondition.cpp:
1058         (WebCore::JSNodeFilterCondition::acceptNode):
1059         * bindings/js/ScheduledAction.cpp:
1060         (WebCore::ScheduledAction::execute):
1061         * bindings/js/ScriptController.cpp:
1062         (WebCore::ScriptController::evaluate):
1063         (WebCore::ScriptController::clear):
1064         (WebCore::ScriptController::createHTMLEventHandler):
1065         (WebCore::ScriptController::createSVGEventHandler):
1066         (WebCore::ScriptController::initScript):
1067         (WebCore::ScriptController::updateDocument):
1068         * bindings/objc/WebScriptObject.mm:
1069         (-[WebScriptObject callWebScriptMethod:withArguments:]):
1070         (-[WebScriptObject evaluateWebScript:]):
1071         (-[WebScriptObject setValue:forKey:]):
1072         (-[WebScriptObject valueForKey:]):
1073         (-[WebScriptObject removeWebScriptKey:]):
1074         (-[WebScriptObject stringRepresentation]):
1075         (-[WebScriptObject webScriptValueAtIndex:]):
1076         (-[WebScriptObject setWebScriptValueAtIndex:value:]):
1077         (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
1078         * bridge/NP_jsobject.cpp:
1079         (_NPN_InvokeDefault):
1080         (_NPN_Invoke):
1081         (_NPN_Evaluate):
1082         (_NPN_GetProperty):
1083         (_NPN_SetProperty):
1084         (_NPN_RemoveProperty):
1085         (_NPN_HasProperty):
1086         (_NPN_HasMethod):
1087         (_NPN_SetException):
1088         (_NPN_Enumerate):
1089         * bridge/c/c_class.cpp:
1090         (KJS::Bindings::CClass::~CClass):
1091         (KJS::Bindings::CClass::methodsNamed):
1092         (KJS::Bindings::CClass::fieldNamed):
1093         * bridge/c/c_instance.cpp:
1094         (KJS::Bindings::CInstance::invokeMethod):
1095         (KJS::Bindings::CInstance::invokeDefaultMethod):
1096         (KJS::Bindings::CInstance::getPropertyNames):
1097         * bridge/c/c_runtime.cpp:
1098         (KJS::Bindings::CField::valueFromInstance):
1099         (KJS::Bindings::CField::setValueToInstance):
1100         * bridge/c/c_utility.cpp:
1101         (KJS::Bindings::convertValueToNPVariant):
1102         (KJS::Bindings::convertNPVariantToValue):
1103         * bridge/jni/jni_class.cpp:
1104         (JavaClass::JavaClass):
1105         (JavaClass::~JavaClass):
1106         * bridge/jni/jni_instance.cpp:
1107         (JavaInstance::stringValue):
1108         * bridge/jni/jni_jsobject.mm:
1109         (JavaJSObject::call):
1110         (JavaJSObject::eval):
1111         (JavaJSObject::getMember):
1112         (JavaJSObject::setMember):
1113         (JavaJSObject::removeMember):
1114         (JavaJSObject::getSlot):
1115         (JavaJSObject::setSlot):
1116         (JavaJSObject::toString):
1117         (JavaJSObject::convertValueToJObject):
1118         (JavaJSObject::convertJObjectToValue):
1119         * bridge/jni/jni_objc.mm:
1120         (KJS::Bindings::dispatchJNICall):
1121         * bridge/jni/jni_runtime.cpp:
1122         (JavaMethod::signature):
1123         * bridge/jni/jni_runtime.h:
1124         (KJS::Bindings::JavaString::JavaString):
1125         (KJS::Bindings::JavaString::_commonInit):
1126         (KJS::Bindings::JavaString::~JavaString):
1127         (KJS::Bindings::JavaString::UTF8String):
1128         * bridge/jni/jni_utility.cpp:
1129         (KJS::Bindings::convertArrayInstanceToJavaArray):
1130         (KJS::Bindings::convertValueToJValue):
1131         * bridge/npruntime.cpp:
1132         (_NPN_GetStringIdentifier):
1133         * bridge/objc/objc_instance.mm:
1134         (ObjcInstance::moveGlobalExceptionToExecState):
1135         (ObjcInstance::invokeMethod):
1136         (ObjcInstance::invokeDefaultMethod):
1137         (ObjcInstance::setValueOfUndefinedField):
1138         (ObjcInstance::getValueOfUndefinedField):
1139         * bridge/objc/objc_runtime.mm:
1140         (ObjcField::valueFromInstance):
1141         (ObjcField::setValueToInstance):
1142         * bridge/objc/objc_utility.mm:
1143         (KJS::Bindings::convertValueToObjcValue):
1144         (KJS::Bindings::convertNSStringToString):
1145         (KJS::Bindings::convertObjcValueToValue):
1146         * bridge/runtime.cpp:
1147         (KJS::Bindings::Instance::createRuntimeObject):
1148         * dom/Document.cpp:
1149         (WebCore::Document::~Document):
1150         * dom/Node.cpp:
1151         (WebCore::Node::setDocument):
1152         * history/CachedPage.cpp:
1153         (WebCore::CachedPage::CachedPage):
1154         (WebCore::CachedPage::restore):
1155         (WebCore::CachedPage::clear):
1156         * html/HTMLPlugInElement.cpp:
1157         (WebCore::HTMLPlugInElement::createNPObject):
1158         * loader/FrameLoader.cpp:
1159         (WebCore::getString):
1160         * page/Frame.cpp:
1161         (WebCore::Frame::bindingRootObject):
1162         (WebCore::Frame::windowScriptNPObject):
1163         (WebCore::Frame::clearScriptObjects):
1164         * page/InspectorController.cpp:
1165         (WebCore::jsStringRef):
1166         (WebCore::ConsoleMessage::ConsoleMessage):
1167         (WebCore::XMLHttpRequestResource::XMLHttpRequestResource):
1168         (WebCore::XMLHttpRequestResource::~XMLHttpRequestResource):
1169         (WebCore::getResourceDocumentNode):
1170         (WebCore::search):
1171         (WebCore::inspectedWindow):
1172         (WebCore::wrapCallback):
1173         (WebCore::currentCallFrame):
1174         (WebCore::profiles):
1175         (WebCore::InspectorController::focusNode):
1176         (WebCore::InspectorController::addDatabaseScriptResource):
1177         (WebCore::InspectorController::addScriptProfile):
1178         * page/JavaScriptCallFrame.cpp:
1179         (WebCore::JavaScriptCallFrame::evaluate):
1180         * page/JavaScriptProfileNode.cpp:
1181         (WebCore::getTotalTime):
1182         (WebCore::getSelfTime):
1183         (WebCore::getTotalPercent):
1184         (WebCore::getSelfPercent):
1185         (WebCore::getNumberOfCalls):
1186         (WebCore::getChildren):
1187         (WebCore::getVisible):
1188         * page/mac/FrameMac.mm:
1189         (WebCore::Frame::windowScriptObject):
1190         Pass a parameter (always false) to JSLock and JSLock::DropAllLocks to indicate that WebCore
1191         doesn't need locking. In the future, it may be possible to remove some of these if we
1192         establish that this won't make JSC assertions fail (and that we don't want to add such
1193         assertions either).
1194         Added includes that are now needed.
1195
1196 2008-07-01  Dan Bernstein  <mitz@apple.com>
1197
1198         Reviewed by Oliver Hunt.
1199
1200         - fix a CSSParserValueList leak seen on the build bot
1201
1202         * css/CSSParser.cpp:
1203         (WebCore::BorderImageParseContext::commitBorderImage):
1204
1205 2008-07-01  Alex Mathews  <possessedpenguinbob@gmail.com>
1206
1207         Reviewed by Oliver Hunt.
1208
1209         Prep for more Filter class name changes. Added the first few files for
1210         the new Filter architecture to come.
1211
1212         * WebCore.xcodeproj/project.pbxproj:
1213         * svg/Filter.cpp: Added.
1214         (WebCore::Filter::Filter):
1215         (WebCore::Filter::create):
1216         * svg/Filter.h: Added.
1217         * svg/FilterBuilder.h: Added.
1218         (WebCore::FilterBuilder::add):
1219         (WebCore::FilterBuilder::getEffectById):
1220         (WebCore::FilterBuilder::filter):
1221         * svg/FilterEffect.cpp: Added.
1222         (WebCore::FilterEffect::FilterEffect):
1223         (WebCore::FilterEffect::~FilterEffect):
1224         * svg/FilterEffect.h: Added.
1225
1226 2008-07-01  Christian Dywan  <christian@twotoasts.de>
1227
1228         Gtk+ build fix.
1229
1230         * GNUmakefile.am: add WebCore/plugins/PluginMainThreadScheduler.cpp
1231
1232 2008-07-01  Anders Carlsson  <andersca@apple.com>
1233
1234         Reviewed by Darin.
1235
1236         Add PluginMainThreadScheduler.{cpp|h} to build.
1237         
1238         * WebCore.base.exp:
1239         * WebCore.xcodeproj/project.pbxproj:
1240         * plugins/PluginMainThreadScheduler.cpp:
1241
1242 2008-07-01  Dan Bernstein  <mitz@apple.com>
1243
1244         Reviewed by Darin Adler.
1245
1246         - move the method to set the base writing direction from Frame to Editor
1247
1248         * WebCore.base.exp: Updated.
1249         * editing/Editor.cpp:
1250         (WebCore::Editor::setBaseWritingDirection): Changed the parameter to a
1251         WritingDirection enum value and added the special behavior when the
1252         focused node is a text field or a text area.
1253         * editing/Editor.h:
1254         * page/ContextMenuController.cpp:
1255         (WebCore::ContextMenuController::contextMenuItemSelected): Changed back
1256         to call the Editor method.
1257         * page/Frame.cpp: Removed setSelectionBaseWritingDirection().
1258         * page/Frame.h:
1259
1260 2008-07-01  Darin Adler  <darin@apple.com>
1261
1262         Reviewed by Oliver.
1263
1264         - slight tweak of the setHash fix
1265
1266         * bindings/js/JSLocationCustom.cpp:
1267         (WebCore::JSLocation::setHash): Use oldRef instead of recomputing url.ref().
1268
1269 2008-07-01  Dan Bernstein  <mitz@apple.com>
1270
1271         Reviewed by Anders Carlsson.
1272
1273         - Mac release build fix
1274
1275         * page/Console.cpp:
1276
1277 2008-07-01  Dan Bernstein  <mitz@apple.com>
1278
1279         Reviewed by Anders Carlsson.
1280
1281         - fix <rdar://problem/6045896> REGRESSION: Leak in WebCore::StringImpl::create
1282
1283         * css/CSSPrimitiveValue.cpp:
1284         (WebCore::CSSPrimitiveValue::cleanup):
1285
1286 2008-07-01  Anders Carlsson  <andersca@apple.com>
1287
1288         Reviewed by Jon.
1289
1290         Don't add the Mozilla user agent quirk for Flash 10.
1291         
1292         * plugins/win/PluginPackageWin.cpp:
1293         (WebCore::PluginPackage::isPluginBlacklisted):
1294         (WebCore::PluginPackage::determineQuirks):
1295
1296 2008-07-01  David Kilzer  <ddkilzer@apple.com>
1297
1298         Move data: URL parsing code in HTMLObjectElement to KURL
1299
1300         Reviewed by Ada and Darin.
1301
1302         No test cases added since there is no change in behavior.
1303
1304         * html/HTMLObjectElement.cpp:
1305         (WebCore::HTMLObjectElement::isImageType): Extracted data: URL
1306         parsing code into WebCore::mimeTypeFromDataURL() in KURL.cpp.
1307         * platform/KURL.cpp:
1308         (WebCore::mimeTypeFromDataURL): Added.
1309         * platform/KURL.h:
1310         (WebCore::mimeTypeFromDataURL): Added.
1311
1312 2008-07-01  Dan Bernstein  <mitz@apple.com>
1313
1314         Reviewed by Dave Hyatt.
1315
1316         - fix <rdar://problem/6045890> REGRESSION: Leak in WebCore::CSSParser::createFloatingValueList()
1317
1318         * css/CSSParser.cpp:
1319         (WebCore::CSSParser::addUnresolvedProperty):
1320
1321 2008-07-01  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
1322
1323         Reviewed by Brady Eidson.
1324
1325         Bug 19822: REGRESSION (r30243): setting location.hash to "#" causes a reload
1326         <https://bugs.webkit.org/show_bug.cgi?id=19822>
1327
1328         Change JSLocation::setHash() to not schedule navigation in the case
1329         where the old fragment is the null String and the new fragment is an
1330         empty String.
1331
1332         * bindings/js/JSLocationCustom.cpp:
1333         (WebCore::JSLocation::setHash):
1334
1335 2008-06-30  Anders Carlsson  <andersca@apple.com>
1336
1337         Reviewed by Adam.
1338
1339         Add PluginMainThreadScheduler, a singleton which is responsible for scheduling plug-in 
1340         callbacks on the main thread. Use this to implement NPN_PluginThreadAsyncCall on Windows.
1341         
1342         * WebCore.vcproj/WebCore.vcproj:
1343         Add PluginMainThreadScheduler.{cpp|h}
1344         
1345         * plugins/PluginMainThreadScheduler.cpp: Added.
1346         * plugins/PluginMainThreadScheduler.h: Added.
1347
1348         * plugins/PluginView.cpp:
1349         (WebCore::PluginView::start):
1350         Register with the thread scheduler.
1351         
1352         * plugins/npapi.cpp:
1353         (NPN_PluginThreadAsyncCall):
1354         Call the thread scheduler.
1355         
1356         * plugins/win/PluginPackageWin.cpp:
1357         (WebCore::PluginPackage::load):
1358         Initialize the NPN_PluginThreadAsyncCall callback.
1359         
1360         * plugins/win/PluginViewWin.cpp:
1361         (WebCore::PluginView::stop):
1362         Unregister with the scheduler. This makes sure that we won't try to deliver callbacks
1363         after the plug-in has been destroyed.
1364
1365 2008-07-01  Adam Roben  <aroben@apple.com>
1366
1367         Roll out r34913, as it broke the Windows build due to bad casting
1368
1369         r34913 introduced code that assigned pointers-to-member from a derived
1370         class into a base class pointer-to-member type (e.g., assigned a void
1371         (SVGUseElement::*)() into a void (SVGElement::*)()). This is bad
1372         because it could allow us to call SVGUseElement member functions on a
1373         different SVGElement-derived class. MSVC rightly flagged this as an
1374         error.
1375
1376         Rubberstamped by Anders Carlsson.
1377
1378 2008-07-01  Darin Adler  <darin@apple.com>
1379
1380         - fix build
1381
1382         * bindings/scripts/CodeGeneratorJS.pm: Fix warnings that indicate this was
1383         not working propertly.
1384
1385 2008-07-01  Dan Bernstein  <mitz@apple.com>
1386
1387         Reviewed by Darin Adler.
1388
1389         - fix <rdar://problem/6045893> REGRESSION: Leak in WebCore::HTMLCanvasElement::createPlatformImage() const
1390
1391         * html/CanvasRenderingContext2D.cpp:
1392         (WebCore::CanvasRenderingContext2D::createPattern):
1393
1394 2008-07-01  Sam Weinig  <sam@webkit.org>
1395
1396         Reviewed by Darin Adler.
1397
1398         Split JSCell and JSNumberCell class declarations out of JSValue.h
1399
1400         * ForwardingHeaders/kjs/JSNumberCell.h: Added.
1401         * bindings/scripts/CodeGeneratorJS.pm:
1402         * bridge/c/c_instance.cpp:
1403
1404 2008-07-01  chris fleizach  <cfleizach@apple.com>
1405
1406         Reviewed by Beth Dakin
1407
1408         <rdar://problem/6041580> REGRESSION: AX: AXSize of radio buttons is 0,0
1409
1410         Test: accessibility/radio-button-checkbox-size.html
1411
1412         * page/AccessibilityRenderObject.cpp:
1413         (WebCore::AccessibilityRenderObject::checkboxOrRadioRect):
1414
1415 2008-07-01  Dan Bernstein  <mitz@apple.com>
1416
1417         Reviewed by Antti Koivisto.
1418
1419         - fix SVG pointer-events layout test failures
1420
1421         * css/SVGCSSParser.cpp:
1422         (WebCore::CSSParser::parseSVGValue):
1423
1424 2008-07-01  Nikolas Zimmermann  <zimmermann@kde.org>
1425
1426         Reviewed by Antti.
1427
1428         Fixes: https://bugs.webkit.org/show_bug.cgi?id=19841
1429         Fix two small problems in the gradient & pattern code.
1430
1431         Added 12 new layout tests: svg/dynamic-updates/SVGLinearGradientElement*.html
1432
1433         * svg/SVGLinearGradientElement.cpp:
1434         (WebCore::SVGLinearGradientElement::collectGradientProperties): Compare against already computed bounding box information, instead of querying attributes.
1435         * svg/SVGPatternElement.cpp:
1436         (WebCore::SVGPatternElement::collectPatternProperties): Ditto.
1437         * svg/SVGRadialGradientElement.cpp:
1438         (WebCore::SVGRadialGradientElement::collectGradientProperties): Ditto.
1439         (WebCore::SVGRadialGradientElement::svgAttributeChanged): 'fxAttr' updating wasn't handled. Copy'n'paste error.
1440
1441 2008-07-01  Simon Hausmann  <hausmann@webkit.org>
1442
1443         Fix the build, include SVGTransformList.h instead of
1444         SVGTransformlist.h
1445
1446         * svg/SVGGradientElement.h:
1447
1448 2008-07-01  Alexey Proskuryakov  <ap@webkit.org>
1449
1450         Reviewed by Antti.
1451
1452         <rdar://problem/6033080> REGRESSION: Some CH characters display as garbage on webpage for
1453         the first time.
1454
1455         Test: fast/encoding/preload-encoding.html
1456
1457         * html/PreloadScanner.cpp:
1458         (WebCore::PreloadScanner::tokenize): Reset charset when entering a tag, not just when
1459         starting a load.
1460
1461 2008-07-01  Nikolas Zimmermann  <zimmermann@kde.org>
1462
1463         Reviewed by Antti & Eric.
1464
1465         Fixes: http://bugs.webkit.org/show_bug.cgi?id=17779 (SVG 1.1 Errata demands "SVG JavaScript Liveness" support)
1466
1467         SVG Errata states: "All SVG DOM objects that directly correspond to an
1468         attribute, e.g. the SVGAnimatedLength 'ry' in an SVGRectElement, are live. This
1469         means that any changes made to the attribute are immediately reflected in the
1470         corresponding SVG DOM object." (see linked URL on bug report)
1471
1472         Until now only XML -> SVG DOM changes took affect, aka. changing the 'rx' attribute of a <rect>
1473         element resuted in changes when accessing 'rx' through SVG DOM (rx.baseVal.value).
1474
1475         Add a new synchronization layer to handle SVG DOM -> XML changes.
1476
1477         Global macro change #1: ANIMATED_PROPERTY_FORWARD_DECLARATIONS contains the class name where it's defined as first parameter.
1478         Global macro change #2: Add ANIMATED_PROPERTY_START_DECLARATIONS to all direct base-classes.
1479         Global macro change #3: Rename ANIMATED_PROPERTY_DEFINITIONS to ANIMATED_PROPERTY_DEFINITIONS_REFCOUNTED for refcounted types (ie. SVGTransformList*).
1480
1481         Added test: svg/custom/svg-xml-dom-sync.html
1482         Fixed test: svg/hixie/dynamic/005-broken.xml (renamed to 005.xml)
1483
1484         * dom/Element.cpp:
1485         (WebCore::Element::Element): Initialize the two new bits.
1486         (WebCore::Element::attributes): Add hooks to call into SVG attribute synchronization code, wrapped in ENABLE(SVG) blocks.
1487         (WebCore::Element::getAttribute): Ditto.
1488         (WebCore::Element::hasAttributes): Ditto.
1489         * dom/Element.h: Add two bits: m_synchronizedSVGAttributes/m_synchronizingSVGAttribute, to track synchronization status.
1490         (WebCore::Element::updateAnimatedSVGAttribute): New virtual function, handling the synronication, similar to updateStyleAttribute.
1491         * dom/NamedAttrMap.h: Make addAttribute/removeAttribute protected, from use within the ANIMATED_* macros.
1492         * svg/SVGAElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1493         (WebCore::SVGAElement::contextElement): Return non-const value.
1494         * svg/SVGAltGlyphElement.h:
1495         (WebCore::SVGAltGlyphElement::contextElement): Ditto.
1496         * svg/SVGAnimateElement.h:
1497         (WebCore::SVGAnimateElement::contextElement): Ditto.
1498         * svg/SVGAnimateMotionElement.h:
1499         (WebCore::SVGAnimateMotionElement::contextElement): Ditto.
1500         * svg/SVGAnimateTransformElement.h:
1501         (WebCore::SVGAnimateTransformElement::contextElement): Ditto.
1502         * svg/SVGAnimatedTemplate.h: Add toString() conversion to all SVGAnimated* classes
1503         (WebCore::SVGAnimatedTemplate::toString):
1504         (WebCore::SVGAnimatedTemplate::associatedAttributeName):
1505         (WebCore::lookupOrCreateWrapper):
1506         (WebCore::SVGAnimatedAngle::SVGAnimatedAngle): 
1507         (WebCore::SVGAnimatedAngle::toString):
1508         (WebCore::SVGAnimatedBoolean::SVGAnimatedBoolean):
1509         (WebCore::SVGAnimatedBoolean::toString):
1510         (WebCore::SVGAnimatedEnumeration::SVGAnimatedEnumeration):
1511         (WebCore::SVGAnimatedEnumeration::toString):
1512         (WebCore::SVGAnimatedInteger::SVGAnimatedInteger):
1513         (WebCore::SVGAnimatedInteger::toString):
1514         (WebCore::SVGAnimatedLength::SVGAnimatedLength):
1515         (WebCore::SVGAnimatedLength::toString):
1516         (WebCore::SVGAnimatedLengthList::SVGAnimatedLengthList):
1517         (WebCore::SVGAnimatedLengthList::toString):
1518         (WebCore::SVGAnimatedNumber::SVGAnimatedNumber):
1519         (WebCore::SVGAnimatedNumber::toString):
1520         (WebCore::SVGAnimatedNumberList::SVGAnimatedNumberList):
1521         (WebCore::SVGAnimatedNumberList::toString):
1522         (WebCore::SVGAnimatedPreserveAspectRatio::SVGAnimatedPreserveAspectRatio):
1523         (WebCore::SVGAnimatedPreserveAspectRatio::toString):
1524         (WebCore::SVGAnimatedRect::SVGAnimatedRect):
1525         (WebCore::SVGAnimatedRect::toString):
1526         (WebCore::SVGAnimatedString::SVGAnimatedString):
1527         (WebCore::SVGAnimatedString::toString):
1528         (WebCore::SVGAnimatedTransformList::SVGAnimatedTransformList):
1529         (WebCore::SVGAnimatedTransformList::toString):
1530         (WebCore::SVGAnimatedType::SVGAnimatedType):
1531         * svg/SVGAnimationElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1532         * svg/SVGCircleElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1533         (WebCore::SVGCircleElement::contextElement): Return non-const value.
1534         * svg/SVGClipPathElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1535         (WebCore::SVGClipPathElement::contextElement): Return non-const value.
1536         * svg/SVGComponentTransferFunctionElement.cpp: Apply ANIMATED_PROPERTY_DEFINITIONS_REFCOUNTED change.
1537         * svg/SVGComponentTransferFunctionElement.h: Add ANIMATED_PROPERTY_START_DECLARATIONS, as this class is a base class.
1538         * svg/SVGCursorElement.cpp: Wrap SVGLength objects in SVGLength() statements.
1539         (WebCore::SVGCursorElement::SVGCursorElement):
1540         * svg/SVGCursorElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS. Add ANIMATED_PROPERTY_START_DECLARATIONS.
1541         (WebCore::SVGCursorElement::contextElement): Return non-const value.
1542         * svg/SVGDefsElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1543         (WebCore::SVGDefsElement::contextElement): Return non-const value.
1544         * svg/SVGElement.cpp:
1545         (WebCore::SVGElement::updateAnimatedSVGAttribute): Override virtual function from Element, to handle SVG<->XML DOM synchronization.
1546         (WebCore::SVGElement::setSynchronizedSVGAttributes):
1547         * svg/SVGElement.h: Add helper class "StoredTypeWithDirtyFlag".
1548         (StoredTypeWithDirtyFlag::StoredTypeWithDirtyFlag): Tracks a type and a flag indicating that SVG<->XML DOM synchronization has to be done.
1549         (StoredTypeWithDirtyFlag::operator=):
1550         (StoredTypeWithDirtyFlag::operator==):
1551         (StoredTypeWithDirtyFlag::operator!=):
1552         (StoredTypeWithDirtyFlag::operator StoredType):
1553         (WebCore::SVGElement::invokeSVGPropertySynchronizer): New set of functions taking care of invoking the update handlers.
1554         (WebCore::SVGElement::invokeAllSVGPropertySynchronizers): Ditto.
1555         (WebCore::SVGElement::addSVGPropertySynchronizer): Ditto.
1556         * svg/SVGEllipseElement.cpp: Wrap SVGLength objects in SVGLength() statements.
1557         (WebCore::SVGEllipseElement::SVGEllipseElement):
1558         * svg/SVGEllipseElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1559         (WebCore::SVGEllipseElement::contextElement): Return non-const value.
1560         * svg/SVGExternalResourcesRequired.h: Change contextElement() to return a non-const value.
1561         * svg/SVGFEBlendElement.h:
1562         (WebCore::SVGFEBlendElement::contextElement): Return non-const value.
1563         * svg/SVGFEColorMatrixElement.cpp: Apply ANIMATED_PROPERTY_DEFINITIONS_REFCOUNTED change.
1564         * svg/SVGFEColorMatrixElement.h:
1565         (WebCore::SVGFEColorMatrixElement::contextElement): Return non-const value.
1566         * svg/SVGFEComponentTransferElement.h:
1567         (WebCore::SVGFEComponentTransferElement::contextElement): Return non-const value.
1568         * svg/SVGFECompositeElement.h:
1569         (WebCore::SVGFECompositeElement::contextElement): Return non-const value.
1570         * svg/SVGFEDiffuseLightingElement.h:
1571         (WebCore::SVGFEDiffuseLightingElement::contextElement): Return non-const value.
1572         * svg/SVGFEDisplacementMapElement.h:
1573         (WebCore::SVGFEDisplacementMapElement::contextElement): Return non-const value.
1574         * svg/SVGFEFloodElement.h:
1575         (WebCore::SVGFEFloodElement::contextElement): Return non-const value.
1576         * svg/SVGFEGaussianBlurElement.h:
1577         (WebCore::SVGFEGaussianBlurElement::contextElement): Return non-const value.
1578         * svg/SVGFEImageElement.cpp: Apply ANIMATED_PROPERTY_DEFINITIONS_REFCOUNTED change.
1579         * svg/SVGFEImageElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1580         (WebCore::SVGFEImageElement::contextElement): Return non-const value.
1581         * svg/SVGFELightElement.h: Add ANIMATED_PROPERTY_START_DECLARATIONS, as this is a base class.
1582         * svg/SVGFEMergeElement.h:
1583         (WebCore::SVGFEMergeElement::contextElement): Return non-const value.
1584         * svg/SVGFEMergeNodeElement.h: Add ANIMATED_PROPERTY_START_DECLARATIONS, as this is a base class.
1585         (WebCore::SVGFEMergeNodeElement::contextElement): Return non-const value.
1586         * svg/SVGFEOffsetElement.h:
1587         (WebCore::SVGFEOffsetElement::contextElement): Return non-const value.
1588         * svg/SVGFESpecularLightingElement.h:
1589         (WebCore::SVGFESpecularLightingElement::contextElement): Return non-const value.
1590         * svg/SVGFETileElement.h:
1591         (WebCore::SVGFETileElement::contextElement): Return non-const value.
1592         * svg/SVGFETurbulenceElement.h:
1593         (WebCore::SVGFETurbulenceElement::contextElement): Return non-const value.
1594         * svg/SVGFilterElement.cpp: Wrap SVGLength objects in SVGLength() statements.
1595         (WebCore::SVGFilterElement::SVGFilterElement):
1596         * svg/SVGFilterElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1597         (WebCore::SVGFilterElement::contextElement): Return non-const value.
1598         * svg/SVGFilterPrimitiveStandardAttributes.cpp: Wrap SVGLength objects in SVGLength() statements.
1599         (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
1600         * svg/SVGFilterPrimitiveStandardAttributes.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1601         (WebCore::SVGFilterPrimitiveStandardAttributes::contextElement): Return non-const value.
1602         * svg/SVGFitToViewBox.cpp: Apply ANIMATED_PROPERTY_DEFINITIONS_REFCOUNTED change.
1603         * svg/SVGFitToViewBox.h: Change contextElement() to return a non-const value.
1604         * svg/SVGFontElement.h:
1605         (WebCore::SVGFontElement::contextElement): Return non-const value.
1606         * svg/SVGForeignObjectElement.cpp: Wrap SVGLength objects in SVGLength() statements.
1607         (WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
1608         * svg/SVGForeignObjectElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1609         (WebCore::SVGForeignObjectElement::contextElement): Return non-const value.
1610         * svg/SVGGElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1611         (WebCore::SVGGElement::contextElement): Return non-const value.
1612         * svg/SVGGradientElement.cpp: Apply ANIMATED_PROPERTY_DEFINITIONS_REFCOUNTED change.
1613         * svg/SVGGradientElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1614         * svg/SVGImageElement.cpp: Apply ANIMATED_PROPERTY_DEFINITIONS_REFCOUNTED change. Wrap SVGLength objects in SVGLength() statements.
1615         (WebCore::SVGImageElement::SVGImageElement):
1616         * svg/SVGImageElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1617         (WebCore::SVGImageElement::contextElement): Return non-const value.
1618         * svg/SVGLengthList.cpp:
1619         (WebCore::SVGLengthList::valueAsString): Add new function converting SVG values to strings.
1620         * svg/SVGLengthList.h:
1621         * svg/SVGLineElement.cpp: Wrap SVGLength objects in SVGLength() statements.
1622         (WebCore::SVGLineElement::SVGLineElement):
1623         * svg/SVGLineElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1624         (WebCore::SVGLineElement::contextElement): Return non-const value.
1625         * svg/SVGLinearGradientElement.cpp:
1626         (WebCore::SVGLinearGradientElement::SVGLinearGradientElement): Wrap SVGLength objects in SVGLength() statements.
1627         (WebCore::SVGLinearGradientElement::collectGradientProperties):
1628         * svg/SVGLinearGradientElement.h:
1629         (WebCore::SVGLinearGradientElement::contextElement): Return non-const value.
1630         * svg/SVGMPathElement.h:
1631         (WebCore::SVGMPathElement::contextElement): Return non-const value.
1632         * svg/SVGMarkerElement.cpp: Apply ANIMATED_PROPERTY_DEFINITIONS_REFCOUNTED change. Wrap SVGLength objects in SVGLength() statements.
1633         (WebCore::SVGMarkerElement::SVGMarkerElement):
1634         * svg/SVGMarkerElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1635         (WebCore::SVGMarkerElement::contextElement): Return non-const value.
1636         * svg/SVGMaskElement.cpp: Wrap SVGLength objects in SVGLength() statements.
1637         (WebCore::SVGMaskElement::SVGMaskElement):
1638         * svg/SVGMaskElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1639         (WebCore::SVGMaskElement::contextElement): Return non-const value.
1640         * svg/SVGNumberList.cpp:
1641         (WebCore::SVGNumberList::valueAsString): Add new function converting SVG values to strings.
1642         * svg/SVGNumberList.h:
1643         * svg/SVGPathElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1644         (WebCore::SVGPathElement::contextElement): Return non-const value.
1645         * svg/SVGPatternElement.cpp: Apply ANIMATED_PROPERTY_DEFINITIONS_REFCOUNTED change. Wrap SVGLength objects in SVGLength() statements.
1646         (WebCore::SVGPatternElement::SVGPatternElement):
1647         (WebCore::SVGPatternElement::collectPatternProperties):
1648         * svg/SVGPatternElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1649         (WebCore::SVGPatternElement::contextElement): Return non-const value.
1650         * svg/SVGPolyElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1651         (WebCore::SVGPolyElement::contextElement): Return non-const value.
1652         * svg/SVGPreserveAspectRatio.cpp:
1653         (WebCore::SVGPreserveAspectRatio::valueAsString): Add new function converting SVG values to strings.
1654         * svg/SVGPreserveAspectRatio.h:
1655         * svg/SVGRadialGradientElement.cpp: Wrap SVGLength objects in SVGLength() statements.
1656         (WebCore::SVGRadialGradientElement::SVGRadialGradientElement):
1657         (WebCore::SVGRadialGradientElement::svgAttributeChanged):
1658         (WebCore::SVGRadialGradientElement::collectGradientProperties):
1659         * svg/SVGRadialGradientElement.h:
1660         (WebCore::SVGRadialGradientElement::contextElement): Return non-const value.
1661         * svg/SVGRectElement.cpp: Wrap SVGLength objects in SVGLength() statements.
1662         (WebCore::SVGRectElement::SVGRectElement):
1663         * svg/SVGRectElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1664         (WebCore::SVGRectElement::contextElement): Return non-const value.
1665         * svg/SVGSVGElement.cpp: Wrap SVGLength objects in SVGLength() statements.
1666         (WebCore::SVGSVGElement::SVGSVGElement):
1667         (WebCore::SVGSVGElement::currentView): Pass non-const SVGSVGElement* object to SVGViewSpec.
1668         * svg/SVGSVGElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1669         (WebCore::SVGSVGElement::contextElement): Return non-const value.
1670         * svg/SVGScriptElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1671         (WebCore::SVGScriptElement::contextElement): Return non-const value.
1672         * svg/SVGStyledElement.h: Add ANIMATED_PROPERTY_START_DECLARATIONS, as this is a base class.
1673         * svg/SVGStyledTransformableElement.cpp: Apply ANIMATED_PROPERTY_DEFINITIONS_REFCOUNTED change.
1674         * svg/SVGStyledTransformableElement.h:
1675         * svg/SVGSwitchElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1676         (WebCore::SVGSwitchElement::contextElement): Return non-const value.
1677         * svg/SVGSymbolElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1678         (WebCore::SVGSymbolElement::contextElement): Return non-const value.
1679         * svg/SVGTRefElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1680         (WebCore::SVGTRefElement::contextElement): Return non-const value.
1681         * svg/SVGTSpanElement.h:
1682         (WebCore::SVGTSpanElement::contextElement): Return non-const value.
1683         * svg/SVGTextContentElement.cpp: Wrap SVGLength objects in SVGLength() statements.
1684         (WebCore::SVGTextContentElement::SVGTextContentElement):
1685         * svg/SVGTextContentElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1686         * svg/SVGTextElement.cpp: Apply ANIMATED_PROPERTY_DEFINITIONS_REFCOUNTED change.
1687         * svg/SVGTextElement.h:
1688         (WebCore::SVGTextElement::contextElement): Return non-const value.
1689         * svg/SVGTextPathElement.cpp: Wrap SVGLength objects in SVGLength() statements.
1690         (WebCore::SVGTextPathElement::SVGTextPathElement):
1691         * svg/SVGTextPathElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1692         (WebCore::SVGTextPathElement::contextElement): Return non-const value.
1693         * svg/SVGTextPositioningElement.cpp: Apply ANIMATED_PROPERTY_DEFINITIONS_REFCOUNTED change.
1694         * svg/SVGTextPositioningElement.h:
1695         * svg/SVGTransformList.cpp:
1696         (SVGTransformList::valueAsString): Add new function converting SVG values to strings.
1697         * svg/SVGTransformList.h:
1698         * svg/SVGURIReference.h: Change contextElement() to return a non-const value.
1699         * svg/SVGUseElement.cpp: Wrap SVGLength objects in SVGLength() statements.
1700         (WebCore::SVGUseElement::SVGUseElement):
1701         * svg/SVGUseElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1702         (WebCore::SVGUseElement::contextElement): Return non-const value.
1703         * svg/SVGViewElement.h: Apply global macro change for ANIMATED_PROPERTY_FORWARD_DECLARATIONS.
1704         (WebCore::SVGViewElement::contextElement): Return non-const value.
1705         * svg/SVGViewSpec.cpp:
1706         (WebCore::SVGViewSpec::SVGViewSpec): Pass non-const context element in constructor.
1707         (WebCore::SVGViewSpec::contextElement): Return non-const value.
1708         * svg/SVGViewSpec.h:
1709
1710 2008-07-01  Alex Mathews  <possessedpenguinbob@gmail.com>
1711
1712         Reviewed by Nikolas Zimmermann.
1713
1714         Class name changes for SVG Light Effect files. The class names that changed :
1715
1716         SVGLightSource -> LightSource
1717         SVGDistantLightSource -> DistantLightSource
1718         SVGPointLightSource -> PointLightSource
1719         SVGSpotLightSource -> SpotLightSource
1720
1721         Every other file that is changed is just propagating the class name changes to
1722         dependent files.
1723
1724         * svg/SVGFEDiffuseLightingElement.cpp:
1725         (WebCore::SVGFEDiffuseLightingElement::updateLights):
1726         * svg/SVGFEDistantLightElement.cpp:
1727         (WebCore::SVGFEDistantLightElement::lightSource):
1728         * svg/SVGFEDistantLightElement.h:
1729         * svg/SVGFELightElement.h:
1730         * svg/SVGFEPointLightElement.cpp:
1731         (WebCore::SVGFEPointLightElement::lightSource):
1732         * svg/SVGFEPointLightElement.h:
1733         * svg/SVGFESpecularLightingElement.cpp:
1734         (WebCore::SVGFESpecularLightingElement::updateLights):
1735         * svg/SVGFESpotLightElement.cpp:
1736         (WebCore::SVGFESpotLightElement::lightSource):
1737         * svg/SVGFESpotLightElement.h:
1738         * svg/graphics/filters/SVGDistantLightSource.h:
1739         (WebCore::DistantLightSource::DistantLightSource):
1740         (WebCore::DistantLightSource::azimuth):
1741         (WebCore::DistantLightSource::elevation):
1742         * svg/graphics/filters/SVGFEDiffuseLighting.cpp:
1743         (WebCore::SVGFEDiffuseLighting::lightSource):
1744         (WebCore::SVGFEDiffuseLighting::setLightSource):
1745         * svg/graphics/filters/SVGFEDiffuseLighting.h:
1746         * svg/graphics/filters/SVGFESpecularLighting.cpp:
1747         (WebCore::SVGFESpecularLighting::lightSource):
1748         (WebCore::SVGFESpecularLighting::setLightSource):
1749         * svg/graphics/filters/SVGFESpecularLighting.h:
1750         * svg/graphics/filters/SVGLightSource.cpp:
1751         (WebCore::PointLightSource::externalRepresentation):
1752         (WebCore::SpotLightSource::externalRepresentation):
1753         (WebCore::DistantLightSource::externalRepresentation):
1754         * svg/graphics/filters/SVGLightSource.h:
1755         (WebCore::):
1756         (WebCore::LightSource::LightSource):
1757         (WebCore::LightSource::~LightSource):
1758         (WebCore::LightSource::type):
1759         * svg/graphics/filters/SVGPointLightSource.h:
1760         (WebCore::PointLightSource::PointLightSource):
1761         (WebCore::PointLightSource::position):
1762         * svg/graphics/filters/SVGSpotLightSource.h:
1763         (WebCore::SpotLightSource::SpotLightSource):
1764         (WebCore::SpotLightSource::position):
1765         (WebCore::SpotLightSource::direction):
1766         (WebCore::SpotLightSource::specularExponent):
1767         (WebCore::SpotLightSource::limitingConeAngle):
1768         * svg/graphics/filters/cg/SVGFEDiffuseLightingCg.mm:
1769         (WebCore::SVGFEDiffuseLighting::getCIFilter):
1770         * svg/graphics/filters/cg/SVGFEHelpersCg.h:
1771         * svg/graphics/filters/cg/SVGFEHelpersCg.mm:
1772         (WebCore::getLightVectors):
1773         * svg/graphics/filters/cg/SVGFESpecularLightingCg.mm:
1774         (WebCore::SVGFESpecularLighting::getCIFilter):
1775
1776 2008-07-01  Alp Toker  <alp@nuanti.com>
1777
1778         Rubber-stamped by Holger.
1779
1780         autotools cleanup: move some GTK+-specific sources from libwebcore to
1781         libwebcoregtk.
1782
1783         * GNUmakefile.am:
1784
1785 2008-07-01  Dan Bernstein  <mitz@apple.com>
1786
1787         Reviewed by Oliver Hunt.
1788
1789         - fix the non-SVG build
1790
1791         * css/CSSValueKeywords.in: Added 'all'.
1792         * css/SVGCSSValueKeywords.in: Removed 'all'.
1793
1794 2008-07-01  Simon Hausmann  <hausmann@webkit.org>
1795
1796         Build fix, include DateInstance.h.
1797
1798         * bridge/qt/qt_runtime.cpp:
1799
1800 2008-06-30  Adele Peterson  <adele@apple.com>
1801
1802         Reviewed by Oliver.
1803
1804         Fix for <rdar://problem/5882050> clicking in hidden close box area of empty searchfield causes mousedown to stop firing
1805
1806         Test: fast/forms/search-hidden-cancel-button.html
1807
1808         * html/HTMLTextFieldInnerElement.cpp: (WebCore::HTMLSearchFieldCancelButtonElement::defaultEventHandler):
1809           Don't start capturing mouse events if the cancel button isn't visible.  This was causing the button to start but never stop capturing mouse events.
1810
1811 2008-06-30  Sam Weinig  <sam@webkit.org>
1812
1813         Rubber-stamped by Darin Adler.
1814
1815         Split InternalFunction into its own header file.
1816
1817         * ForwardingHeaders/kjs/InternalFunction.h: Added.
1818         * bridge/runtime_method.h:
1819
1820 2008-06-30  Adele Peterson  <adele@apple.com>
1821
1822         Reviewed by Anders.
1823
1824         Fix for <rdar://problem/5301322> REGRESSION: Select All selects the whole page when used in readonly textareas
1825
1826         Test: editing/selection/select-all-textarea.html
1827
1828         * dom/Node.cpp:
1829         (WebCore::Node::shadowAncestorNode): Break out code to find the root of the shadow tree into a new helper function.
1830         (WebCore::Node::shadowTreeRootNode): Added helper function.
1831         * dom/Node.h:
1832         * dom/Range.cpp: (WebCore::Range::shadowTreeRootNode): Added helper function.
1833         * dom/Range.h:
1834         * editing/Selection.cpp: (WebCore::Selection::shadowTreeRootNode): ditto.
1835         * editing/Selection.h:
1836         * editing/SelectionController.h: (WebCore::SelectionController::shadowTreeRootNode): ditto.
1837         * editing/SelectionController.cpp: (WebCore::SelectionController::selectAll):
1838         If the selection is in a shadow tree, only select the contents of that shadow tree, not the whole document.
1839         * page/Frame.cpp:
1840         (WebCore::Frame::findString): Use the new shadowTreeRootNode helper functions.
1841         (WebCore::Frame::markAllMatchesForText): ditto.
1842
1843 2008-06-30  chris fleizach  <cfleizach@apple.com>
1844
1845         Reviewed by Beth Dakin
1846
1847         <rdar://problem/4180780> Add attribute to get all the radio buttons in a set
1848
1849         * page/AccessibilityObject.cpp:
1850         (WebCore::AccessibilityObject::linkedUIElements):
1851         * page/AccessibilityObject.h:
1852         * page/AccessibilityRenderObject.cpp:
1853         (WebCore::AccessibilityRenderObject::internalLinkElement):
1854         (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
1855         (WebCore::AccessibilityRenderObject::linkedUIElements):
1856         * page/AccessibilityRenderObject.h:
1857         * page/mac/AccessibilityObjectWrapper.mm:
1858         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
1859
1860 2008-06-30  Dan Bernstein  <mitz@apple.com>
1861
1862         Reviewed by Adele Peterson.
1863
1864         - WebCore part of <rdar://problem/3881497> Writing direction context menu item has no effect on text typed in Safari
1865
1866         * WebCore.base.exp: Removed Editor::setBaseWritingDirection() and added
1867         Frame::setSelectionBaseWritingDirection().
1868         * page/ContextMenuController.cpp:
1869         (WebCore::ContextMenuController::contextMenuItemSelected): Changed to
1870         call Frame::setSelectionBaseWritingDirection().
1871         * page/Frame.cpp:
1872         (WebCore::Frame::setSelectionBaseWritingDirection): Added. If the
1873         focused node is a text field or text area, changes its 'dir' attribute.
1874         This is what IE does when the user changes the writing direction in a
1875         text control. Otherwise, calls down to Editor::setBaseWritingDirection().
1876         * page/Frame.h:
1877
1878 2008-06-30  David Kilzer  <ddkilzer@apple.com>
1879
1880         Improve HTMLObjectElement data encapsulation
1881
1882         Reviewed by Dave Hyatt.
1883
1884         HTMLObjectElement has some public member variables that should be
1885         private with accessor methods.
1886
1887         No test cases added since there is no change in behavior.
1888
1889         * html/HTMLObjectElement.cpp:
1890         (WebCore::HTMLObjectElement::HTMLObjectElement): Reorder
1891         initialization of member variables to match defined order in header.
1892         * html/HTMLObjectElement.h:
1893         (WebCore::HTMLObjectElement::classId): Added.
1894         (WebCore::HTMLObjectElement::url): Added.
1895         (WebCore::HTMLObjectElement::serviceType): Added.
1896         * rendering/RenderPartObject.cpp:
1897         (WebCore::RenderPartObject::updateWidget): Use new accessor methods
1898         in HTMLObjectElement now that its member variables are private.
1899
1900 2008-06-30  Dan Bernstein  <mitz@apple.com>
1901
1902         Reviewed by Anders Carlsson.
1903
1904         - remove unused member variable
1905
1906         * page/Page.h: Removed Page::m_focusedNode.
1907
1908 2008-06-30  Anders Carlsson  <andersca@apple.com>
1909
1910         Reviewed by Adam.
1911
1912         <rdar://problem/6014209>
1913         Crash when loading manifest from application cache fails
1914         
1915         There is no need to set any handles to 0 after calling cacheUpdateFailed(), since
1916         that is done inside the function. Furthermore, after calling cacheUpdateFailed() the cache
1917         group could be deleted causing us to access freed memory and then crashing.
1918         
1919         * loader/appcache/ApplicationCacheGroup.cpp:
1920         (WebCore::ApplicationCacheGroup::didReceiveResponse):
1921         (WebCore::ApplicationCacheGroup::didFail):
1922         (WebCore::ApplicationCacheGroup::didFailToLoadManifest):
1923
1924 2008-06-30  Adam Roben  <aroben@apple.com>
1925
1926         Fix <rdar://5954749> Assertion failure due to HashTable's use of
1927         operator&
1928
1929         Reviewed by Ada Chan.
1930
1931         * bindings/js/JSSVGPODTypeWrapper.h:
1932         * dom/Document.h:
1933         * dom/StyledElement.cpp:
1934         * platform/graphics/FontCache.cpp:
1935         * platform/graphics/IntSizeHash.h:
1936         (WTF::):
1937         * platform/text/StringHash.h:
1938         * platform/win/COMPtr.h:
1939         * svg/SVGAnimatedTemplate.h:
1940         Updated all custom HashTraits for HashTable changes.
1941
1942 2008-06-30  Simon Hausmann  <hausmann@webkit.org>
1943
1944         Fix the Qt build.
1945
1946         Added missing includes and changed getItem array calls to use get()
1947         instead.
1948
1949         * bridge/qt/qt_runtime.cpp:
1950         (KJS::Bindings::convertValueToQVariant):
1951
1952 2008-06-29  David Smith  <catfish.man@gmail.com>
1953
1954         Rubberstamped by Sam Weinig.
1955
1956         Change a redundant node->isElement() check to an ASSERT for a 1.3% speedup on getElementsByTagName.
1957
1958         * dom/TagNodeList.cpp:
1959         (WebCore::TagNodeList::nodeMatches):
1960
1961 2008-06-29  Dan Bernstein  <mitz@apple.com>
1962
1963         Reviewed by Darin Adler.
1964
1965         - fix SVG layout test regressions
1966
1967         * css/CSSFontSelector.cpp:
1968         (WebCore::CSSFontSelector::addFontFaceRule): Made this function work
1969         again with primitive values, because the @font-face rules SVG fonts
1970         create still use a single primitive value rather than a value list.
1971
1972 2008-06-29  Dan Bernstein  <mitz@apple.com>
1973
1974         Reviewed by Sam Weinig.
1975
1976         - fix <rdar://problem/5734440> Specifying a font-weight for @font-face not working
1977
1978         Tests: fast/css/font-face-descriptor-multiple-values-parsing.html
1979                fast/css/font-face-descriptor-multiple-values.html
1980
1981         * css/CSSFontSelector.cpp:
1982         (WebCore::CSSFontSelector::addFontFaceRule): Changed to work with value
1983         lists for the descriptor properties.
1984
1985         * css/CSSParser.cpp:
1986         (WebCore::CSSParser::CSSParser): Initialize m_hasFontFaceOnlyValues.
1987         (WebCore::CSSParser::parseValue): Added a call to
1988         deleteFontFaceOnlyValues() if necessary.
1989         (WebCore::CSSParser::parseDeclaration): Ditto.
1990         (WebCore::CSSParser::clearProperties): Added code to reset
1991         m_hasFontFaceOnlyValues to false.
1992         (WebCore::CSSParser::parseFontStyle): Added. If there is a single
1993         valid identifier other than 'all', creates a CSSPrimitiveValue and
1994         assigns it to the property. If 'all' is the only value, or if there are
1995         multiple valid identifiers that are not 'all', creates a CSSValueList
1996         and assigns it to the property, and sets m_hasFontFaceOnlyValues to
1997         true.
1998         (WebCore::CSSParser::parseFontVariant): Ditto.
1999         (WebCore::CSSParser::parseFontWeight): Ditto.
2000         (WebCore::CSSParser::createStyleRule): Added a call to
2001         deleteFontFaceOnlyValues().
2002         (WebCore::CSSParser::createFontFaceRule): Added code to change
2003         font descriptor properties that had only one value, and therefore were
2004         assigned a CSSPrimitiveValue, into CSSValueLists containing that value.
2005         (WebCore::CSSParser::deleteFontFaceOnlyValues): Added. Retroactively
2006         invalidates font descriptor properties that had values that are only
2007         allowed in @font-face. Those are identified by having CSSValueLists
2008         rather than CSSPrimitiveValues as their values.
2009         * css/CSSParser.h: Added m_hasFontFaceOnlyValues, a flag that says that
2010         font descriptor property values that are only valid in @font-face were
2011         encountered. This is used when the style declaration is created (and we
2012         finally know if it is @font-face or not) to delete invalid properties
2013         if needed.
2014
2015 2008-06-28  Darin Adler  <darin@apple.com>
2016
2017         Reviewed by Sam and Cameron.
2018
2019         - fix https://bugs.webkit.org/show_bug.cgi?id=19805
2020           Array.concat turns missing array elements into "undefined"
2021
2022         * bridge/jni/jni_utility.cpp:
2023         (KJS::Bindings::convertArrayInstanceToJavaArray):
2024         Use get instead of getItem, since we always want to consider values from the
2025         prototypes when looking at JavaScript arrays.
2026
2027 2008-06-28  Dan Bernstein  <mitz@apple.com>
2028
2029         Reviewed by Darin Adler.
2030
2031         - allow document markers to touch or overlap if they are not of the same type
2032
2033         Cannot be tested in DumpRenderTree
2034
2035         * dom/Document.cpp:
2036         (WebCore::Document::addMarker):
2037         * rendering/InlineTextBox.cpp:
2038         (WebCore::InlineTextBox::paintDocumentMarkers):
2039
2040 2008-06-28  Sam Weinig  <sam@webkit.org>
2041
2042         Rubber-stamped by Darin Adler.
2043
2044         Update includes after remaming string_object.h to StringObject.h and
2045         splitting out StringObjectThatMasqueradesAsUndefined, StringConstructor
2046         and StringPrototype.
2047
2048         * ForwardingHeaders/kjs/StringObject.h: Copied from WebCore/ForwardingHeaders/kjs/string_object.h.
2049         * ForwardingHeaders/kjs/StringObjectThatMasqueradesAsUndefined.h: Added.
2050         * ForwardingHeaders/kjs/StringPrototype.h: Added.
2051         * ForwardingHeaders/kjs/string_object.h: Removed.
2052         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2053
2054 2008-06-28  Sam Weinig  <sam@webkit.org>
2055
2056         Rubber-stamped by Oliver Hunt.
2057
2058         Update includes after remaming object_object.h to ObjectPrototype.h and
2059         splitting FunctionConstructor out of FunctionPrototype.h
2060
2061         * ForwardingHeaders/kjs/FunctionConstructor.h: Added.
2062         * ForwardingHeaders/kjs/ObjectPrototype.h: Copied from WebCore/ForwardingHeaders/kjs/object_object.h.
2063         * ForwardingHeaders/kjs/object_object.h: Removed.
2064         * bindings/js/JSEventListener.cpp:
2065         * bindings/scripts/CodeGeneratorJS.pm:
2066         * bridge/qt/qt_instance.cpp:
2067
2068 2008-06-28  Dan Bernstein  <mitz@apple.com>
2069
2070         Reviewed by Darin Adler.
2071
2072         - fix <rdar://problem/5994621> REGRESSION (r31090-r31114): Weather widget shows missing image icons briefly when (re)loaded
2073
2074         * html/HTMLImageLoader.cpp:
2075         (WebCore::HTMLImageLoader::updateFromElement): Changed to not load an
2076         image if the 'src' attribute is the empty string and the document's base
2077         URI is a file: URL.
2078
2079 2008-06-27  Sam Weinig  <sam@webkit.org>
2080
2081         Reviewed by Dan Bernstein.
2082
2083         <rdar://problem/6025499> Make Cross-site XHR match the final specification
2084
2085         Update the implemented subset of Access-Control for XMLHttpRequest to the 
2086         latest version. (Editor's Draft 25 May 2008)
2087
2088         - Now differentiates between simple and non-simple cross-site requests, the later
2089           requiring a preflight.
2090         - Now sends request headers cross-site, limited by a blacklist.
2091         - Now allows access to cross-site response headers, limited by a whitelist.
2092         - Now sends request entity body for non-get cross-site requests after preflight.
2093
2094         Tests: http/tests/xmlhttprequest/access-control-basic-blacklist-request-headers.html
2095                http/tests/xmlhttprequest/access-control-basic-get-fail-non-simple.html
2096                http/tests/xmlhttprequest/access-control-basic-whitelist-response-headers.html
2097
2098         * xml/XMLHttpRequest.cpp:
2099         (WebCore::isOnAccessControllRequestHeaderBlackList):
2100         (WebCore::isOnAccessControlSimpleRequestHeaderWhitelist):
2101         (WebCore::isOnAccessControlResponseHeaderWhitelist):
2102         (WebCore::XMLHttpRequest::XMLHttpRequest):
2103         (WebCore::XMLHttpRequest::createRequest):
2104         (WebCore::XMLHttpRequest::makeSameOriginRequest):
2105         (WebCore::XMLHttpRequest::isSimpleCrossSiteAccessRequest):
2106         (WebCore::XMLHttpRequest::makeCrossSiteAccessRequest):
2107         (WebCore::XMLHttpRequest::makeSimpleCrossSiteAccessRequest):
2108         (WebCore::XMLHttpRequest::makeCrossSiteAccessRequestWithPreflight):
2109         (WebCore::XMLHttpRequest::handleAsynchronousPreflightResult):
2110         (WebCore::XMLHttpRequest::loadRequestAsynchronously):
2111         (WebCore::XMLHttpRequest::abort):
2112         (WebCore::XMLHttpRequest::clearRequest):
2113         (WebCore::XMLHttpRequest::setRequestHeader):
2114         (WebCore::XMLHttpRequest::setRequestHeaderInternal):
2115         (WebCore::XMLHttpRequest::getAllResponseHeaders):
2116         (WebCore::XMLHttpRequest::getResponseHeader):
2117         (WebCore::XMLHttpRequest::didFinishLoading):
2118         (WebCore::XMLHttpRequest::didFinishLoadingPreflight):
2119         (WebCore::XMLHttpRequest::didReceiveResponse):
2120         (WebCore::XMLHttpRequest::didReceiveResponsePreflight):
2121         (WebCore::XMLHttpRequest::didReceiveData):
2122         * xml/XMLHttpRequest.h:
2123
2124 2008-06-27  Sam Weinig  <sam@webkit.org>
2125
2126         Rubber-stamped by Mark Rowe.
2127
2128         Clean up sorting in WebCore.xcodeproj.
2129
2130         * WebCore.xcodeproj/project.pbxproj:
2131
2132 2008-06-27  Jan Michael Alonzo  <jmalonzo@webkit.org>
2133
2134         Reviewed by Darin Adler.
2135
2136         Remove unnecessary options to make_names.pl command line
2137         http://bugs.webkit.org/show_bug.cgi?id=19777
2138
2139         * DerivedSources.make:
2140         * GNUmakefile.am:
2141
2142 2008-06-27  Adam Barth  <abarth@webkit.org>
2143
2144         Reviewed by Darin Adler.
2145
2146         https://bugs.webkit.org/show_bug.cgi?id=19784
2147
2148         Properly handle untermianted <!-- comments in <textarea>s.
2149
2150         Tests: fast/parser/open-comment-in-script-tricky.html
2151                fast/parser/open-comment-in-style.html
2152                fast/parser/open-comment-in-textarea.html
2153
2154         * html/HTMLTokenizer.cpp:
2155         (WebCore::HTMLTokenizer::finish):
2156
2157 2008-06-27  Adam Barth  <abarth@webkit.org>
2158
2159         Reviewed by Darin Alder.
2160
2161         Fix <https://bugs.webkit.org/show_bug.cgi?id=19784>:
2162           Text areas in Wikipedia edit pages are empty, following content is missing
2163
2164         Don't treat entities as comment starters in parseSpecial.
2165
2166         Tests: fast/parser/comment-in-iframe.html
2167                fast/parser/entity-comment-in-iframe.html
2168                fast/parser/entity-comment-in-script-tricky.html
2169                fast/parser/entity-comment-in-style.html
2170                fast/parser/entity-comment-in-textarea.html
2171                fast/parser/entity-comment-in-title.html
2172
2173         * html/HTMLTokenizer.cpp:
2174         (WebCore::HTMLTokenizer::parseSpecial):
2175
2176 2008-06-27  Antti Koivisto  <antti@apple.com>
2177
2178         Reviewed by Oliver.
2179         
2180         <rdar://problem/6030720> 
2181         REGRESSION: Discrete animation between incompatible paths does not work
2182
2183         Fall back to discrete path animation if paths are not suitable for morphing.
2184         
2185         Test: svg/custom/animate-path-discrete.svg
2186         
2187         * svg/SVGAnimateElement.cpp:
2188         (WebCore::SVGAnimateElement::calculateAnimatedValue):
2189
2190 2008-06-26  David Smith  <catfish.man@gmail.com>
2191
2192         Reviewed by Sam Weinig.
2193         
2194         https://bugs.webkit.org/show_bug.cgi?id=19002
2195         
2196         Optimize simple id selectors in querySelector/querySelectorAll. 
2197         ~4.4x speedup on the 4 subtests of http://webkit.org/perf/slickspeed/ that it applies to.
2198
2199         * dom/Document.h:
2200         (WebCore::Document::containsMultipleElementsWithId): Added to allow optimizing the common case of no duplicates
2201         * dom/Node.cpp:
2202         (WebCore::Node::querySelector): Uses getElementById instead of DOM traversal where possible now
2203         * dom/SelectorNodeList.cpp:
2204         (WebCore::createSelectorNodeList): Uses getElementById instead of DOM traversal where possible now
2205
2206 2008-06-26  Dan Bernstein  <mitz@apple.com>
2207
2208         Reviewed by Darin Adler.
2209
2210         - fix <rdar://problem/3099526> Find command doesn't search form input controls (textareas and text fields)
2211           http://bugs.webkit.org/show_bug.cgi?id=7023
2212
2213         Test: editing/selection/find-in-text-control.html
2214
2215         * WebCore.base.exp: Updated the TextIterator constructor signature.
2216
2217         * editing/TextIterator.cpp:
2218         (WebCore::TextIterator::TextIterator): Added an enterTextControls
2219         boolean parameter that determines whether the iterator should visit text
2220         inside text areas and text fields. Added code to initialize the
2221         m_inShadowContent member variable based on whether the range is in
2222         shadow content.
2223         (WebCore::TextIterator::advance): Added code to step out of shadow
2224         content.
2225         (WebCore::TextIterator::handleReplacedElement): Added code to enter
2226         text controls if desired.
2227         (WebCore::CharacterIterator::CharacterIterator): Added an
2228         enterTextControls boolean parameter that determines whether the iterator
2229         should visit text inside text areas and text fields. This is passed to
2230         the TextIterator constructor.
2231         (WebCore::findPlainText): Changed to use a CharacterIterator that
2232         visits text controls.
2233
2234         * editing/TextIterator.h: Added member variables to track whether the
2235         current node is in a shadow tree and whether the iterator should visit
2236         text controls.
2237
2238         * page/Frame.cpp:
2239         (WebCore::Frame::findString): Changed to find inside text controls.
2240         (WebCore::Frame::markAllMatchesForText): Ditto.
2241
2242         * rendering/RenderTextControl.cpp:
2243         (WebCore::RenderTextControl::innerTextElement): Added.
2244         * rendering/RenderTextControl.h: Added innerTextElement(), a private
2245         accessor method that is accessible to TextIterator through class
2246         friendship.
2247
2248 2008-06-26  Darin Adler  <darin@apple.com>
2249
2250         Reviewed by Geoff.
2251
2252         * bridge/runtime.h: Added include of JSString.h since jsString will soon
2253         change to return a JSString*.
2254
2255 2008-06-26  Adele Peterson  <adele@apple.com>
2256
2257         Fix suggested by Eric Carlson, added by me, reviewed by Adam.
2258
2259         Fix for <rdar://problem/5733006> <video> and <audio> element should not prompt user for missing files
2260
2261         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::createQTMovie):
2262         Set object with key QTMovieAskUnresolvedDataRefsAttribute to NO in the attributes dictionary passed to -[QTMovie initWithAttributes:]
2263
2264 2008-06-26  Sam Weinig  <sam@webkit.org>
2265
2266         Reviewed by John Sullivan.
2267
2268         <rdar://problem/6031969> Crash in SecurityOrigin code going Forward to a page in the back/forward cache
2269
2270         * loader/FrameLoader.cpp:
2271         (WebCore::FrameLoader::open): Make sure to update the SecurityOrigin and URL of the 
2272         DOMWindow when opening a CachedPage.
2273
2274 2008-06-26  Eric Seidel  <eric@webkit.org>
2275
2276         Reviewed by Beth Dakin.
2277
2278         CSS @import statements can cause DocLoader to use
2279         a dead Frame pointer.
2280         https://bugs.webkit.org/show_bug.cgi?id=19618
2281         
2282         The fix is to get rid of the Frame pointer on DocLoader.
2283         
2284         I also took this opportunity to clean up Document::detach
2285         a little to make it clear why we clear the m_frame pointer
2286         there, and to note that in the future we should stop
2287         using Node::detach to mean "tear down the whole rendering
2288         tree and detach from the frame".
2289
2290         Test: I don't know how to make a good test for this, the test
2291         we have is network timing dependent and does not make a good
2292         layout test.
2293
2294         * dom/Document.cpp:
2295         (WebCore::Document::Document):
2296         (WebCore::Document::detach):
2297         (WebCore::Document::clearFramePointer):
2298         * dom/Document.h:
2299         * loader/DocLoader.cpp:
2300         (WebCore::DocLoader::frame):
2301         * loader/DocLoader.h:
2302
2303 2008-06-26  Anders Carlsson  <andersca@apple.com>
2304
2305         Reviewed by Brady.
2306
2307         Don't enumerate document.applets trying to determine if a page contains applets.
2308         Instead, set m_containsPlugIns to true when an applet has been created.
2309         
2310         * loader/FrameLoader.cpp:
2311         (WebCore::FrameLoader::canCachePage):
2312         (WebCore::FrameLoader::createJavaAppletWidget):
2313
2314 2008-06-26  Alexey Proskuryakov  <ap@webkit.org>
2315
2316         Reviewed by Maciej.
2317
2318         Make JSGlobalData per-thread.
2319
2320         * bindings/js/JSDOMBinding.h:
2321         (WebCore::DOMObject::DOMObject):
2322         * bindings/js/JSDOMWindowBase.cpp:
2323         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
2324         * bridge/runtime_object.cpp:
2325         (RuntimeObjectImp::RuntimeObjectImp):
2326         Removed collectOnMainThreadOnly() calls. WebCore objects live in their own heap now, so
2327         there is no danger for them to be collected on a wrong thread.
2328
2329 2008-06-26  Holger Hans Peter Freyther  <zecke@selfish.org>
2330
2331         Reviewed by Simon.
2332
2333         [svg] Disable plugins for SVG images
2334         The Qt platform allows to have a plugin factory per Page. Now SVG Images
2335         are using a Page and dummy/empty clients for Chrome. The only way to get
2336         the kit from the WebCore::Page is to go through the ChromeClient but this
2337         is not possible when the ChromeClient is an empty client. This leads to a
2338         crash in PluginDataQt.cpp. One way to avoid this would have been the
2339         addition of a rtti like field to ChromeClient to see if it is an empty
2340         client. The other possibility is to not enable plugins for images.
2341
2342         The SVGImage relies on the fact that the document is a SVGDocument and
2343         that the rootElement is a SVGSVGElement. If plugins are used we could
2344         end up with a PluginDocument and crash badly. Do not try to use plugins
2345         if plugins are disabled for the WebCore::Page.
2346
2347         * dom/DOMImplementation.cpp:
2348         (WebCore::DOMImplementation::createDocument):
2349         * svg/graphics/SVGImage.cpp:
2350         (WebCore::SVGImage::dataChanged):
2351
2352 2008-06-25  Holger Hans Peter Freyther  <zecke@selfish.org>
2353
2354         Reviewed by Simon.
2355
2356         CodingStyle fixes
2357
2358         * platform/graphics/qt/SimpleFontDataQt.cpp:
2359         (WebCore::SimpleFontData::SimpleFontData):
2360
2361 2008-06-25  Holger Hans Peter Freyther  <zecke@selfish.org>
2362
2363         Reviewed by Simon.
2364
2365         [svg] Make QtWebKit build more of the SVG support
2366         Add the proper defines and files, update SVGResourceFilterQt.cpp
2367         to be enabled by the filter option and not by experimental svg support
2368
2369         * WebCore.pro:
2370         * svg/graphics/qt/SVGResourceFilterQt.cpp:
2371         (WebCore::SVGResourceFilter::createPlatformData):
2372         (WebCore::SVGResourceFilter::prepareFilter):
2373
2374 2008-06-25  Sam Weinig  <sam@webkit.org>
2375
2376         Reviewed by Brady Eidson.
2377
2378         Move XMLHttpRequestState enum into XMLHttpRequest and rename to State.
2379
2380         * xml/XMLHttpRequest.cpp:
2381         (WebCore::XMLHttpRequest::readyState):
2382         (WebCore::XMLHttpRequest::changeState):
2383         (WebCore::XMLHttpRequest::open):
2384         * xml/XMLHttpRequest.h:
2385         (WebCore::XMLHttpRequest::create):
2386         (WebCore::XMLHttpRequest::):
2387
2388 2008-06-25  Justin Garcia  <justin.garcia@apple.com>
2389
2390         Reviewed by John.
2391
2392         <rdar://problem/5994480> Line break lost on some pastes
2393         
2394         Merging the the first paragraph of inserted content with the content that came
2395         before the selection that was pasted into would also move content after 
2396         the selection that was pasted into if:
2397         
2398         1) Only one paragraph was being pasted, and it was not wrapped in a block
2399         2) The selection that was pasted into ended at the end of a block
2400         3) The next paragraph didn't start at the start of a block.
2401         
2402         Insert a line break just after the inserted content to separate it from what 
2403         comes after and prevent that from happening.
2404         
2405         Doing this exposed a bug in deletion where it would insert an unnecessary placeholder
2406         when deleting a paragraph that started or ended with an input element.  This was
2407         because its m_startBlock and m_endBlock were still computed with the old deprecated
2408         enclosingBlockFlowOrTableElement().
2409         
2410         * editing/DeleteSelectionCommand.cpp:
2411         (WebCore::DeleteSelectionCommand::initializePositionData): Use the new method for
2412         getting an enclosing block.
2413         (WebCore::DeleteSelectionCommand::doApply): The new method for getting an enclosing
2414         block will return 0 if it reaches the root editable element before finding a block,
2415         so if we're deleting inside an inline editable root, m_start/endBlock will
2416         be 0.  Removed an early return for this case (we already have test coverage for it).
2417         * editing/ReplaceSelectionCommand.cpp:
2418         (WebCore::ReplaceSelectionCommand::doApply): Insert a line break just after the inserted 
2419         content to separate it from what comes after.
2420         * dom/Node.h: Removed enclosingBlockFlowOrTableElement().
2421         * dom/Node.cpp: Ditto.
2422
2423 2008-06-25  Anders Carlsson  <andersca@apple.com>
2424
2425         Reviewed by Dave Hyatt.
2426
2427         Fix refcount leak in CSSVariablesRule.
2428
2429         * css/CSSParser.cpp:
2430         (WebCore::CSSParser::createVariablesRule):
2431         * css/CSSVariablesRule.h:
2432         (WebCore::CSSVariablesRule::create):
2433         (WebCore::CSSVariablesRule::setDeclaration):
2434
2435 2008-06-25  Anders Carlsson  <andersca@apple.com>
2436
2437         Reviewed by Mitz.
2438
2439         <rdar://problem/6007111> 
2440         https://bugs.webkit.org/show_bug.cgi?id=19516
2441         DOM modification causes Access Violation (NULL pointer?)
2442         
2443         Null check the document element.
2444         
2445         * html/HTMLParser.cpp:
2446         (WebCore::HTMLParser::handleError):
2447
2448 2008-06-25  Dan Bernstein  <mitz@apple.com>
2449
2450         Reviewed by Dave Hyatt.
2451
2452         - fix <rdar://problem/5873639> REGRESSION (r31620): css2.1/t1506-c525-font-wt-00-b fails on Windows
2453
2454         - fix https://bugs.webkit.org/show_bug.cgi?id=18863
2455           <rdar://problem/5908890> weight mappings with @font-face aren't consistent
2456
2457         Tests: fast/css/font-face-locally-installed.html
2458                fast/css/font-face-multiple-faces.html
2459
2460         * WebCore.vcproj/WebCore.vcproj: Added FontTraitsMask.h.
2461
2462         * WebCore.xcodeproj/project.pbxproj: Ditto.
2463
2464         * css/CSSFontFace.h:
2465         Made CSSFontFace store descriptors from the @font-face rule, as follows:
2466         (WebCore::CSSFontFace::create): Added a FontTraitsMask argument.
2467         (WebCore::CSSFontFace::traitsMask): Added this accessor.
2468         (WebCore::CSSFontFace::addRange): Added.
2469         (WebCore::CSSFontFace::ranges): Added.
2470         (WebCore::CSSFontFace::UnicodeRange::UnicodeRange):
2471         (WebCore::CSSFontFace::UnicodeRange::from):
2472         (WebCore::CSSFontFace::UnicodeRange::to):
2473         (WebCore::CSSFontFace::CSSFontFace): Added a FontTraitsMask and a vector
2474         of UnicodeRanges as member variables.
2475
2476         * css/CSSFontFaceSource.cpp:
2477         Changed the hash key from the font size alone to the font size and
2478         the synthetic style bits, needed if the same source supplies different
2479         synthesized versions.
2480         (WebCore::CSSFontFaceSource::pruneTable):
2481         (WebCore::CSSFontFaceSource::getFontData):
2482
2483         * css/CSSFontFaceSource.h:
2484
2485         * css/CSSFontSelector.cpp:
2486         (WebCore::CSSFontSelector::~CSSFontSelector): Added code to delete
2487         the contents of the font face, locally-installed font face and segmented
2488         font tables.
2489         (WebCore::CSSFontSelector::addFontFaceRule): Changed this function to
2490         not create segmented font faces, but instead just collect font faces
2491         and annotate them with descriptors (traits and unicode ranges).
2492         (WebCore::compareFontFaces): Added. Used in getFontData() to sort the
2493         font faces by proximity to the desired traits.
2494         (WebCore::CSSFontSelector::getFontData): Changed to create the segmented
2495         font face here and cache it.
2496
2497         * css/CSSFontSelector.h:
2498
2499         * css/CSSSegmentedFontFace.cpp:
2500         Changed to keep a vector of font faces instead of font face ranges, as
2501         font faces now know their Unicode ranges.
2502         (WebCore::CSSSegmentedFontFace::~CSSSegmentedFontFace):
2503         (WebCore::CSSSegmentedFontFace::isLoaded):
2504         (WebCore::CSSSegmentedFontFace::isValid):
2505         (WebCore::CSSSegmentedFontFace::appendFontFace):
2506         (WebCore::CSSSegmentedFontFace::getFontData): Removed the synthetic
2507         traits parameters, and instead changed to set them on each FontData
2508         separately based on the difference between the desired traits and
2509         the font face's traits.
2510
2511         * css/CSSSegmentedFontFace.h:
2512
2513         * platform/graphics/FontCache.h:
2514         Removed fontExists() and added getTraitsInFamily().
2515
2516         * platform/graphics/FontDescription.cpp:
2517         (WebCore::FontDescription::traitsMask): Added.
2518
2519         * platform/graphics/FontDescription.h:
2520
2521         * platform/graphics/FontTraitsMask.h: Added.
2522
2523         * platform/graphics/GlyphPageTreeNode.cpp:
2524         (WebCore::GlyphPageTreeNode::initializePage): Changed to fill in with
2525         glyphs from all fonts in the segmented font, using each font in turn to
2526         fill in characters not covered by earlier fonts.
2527
2528         * platform/graphics/gtk/FontCacheGtk.cpp:
2529         (WebCore::FontCache::getTraitsInFamily): Added a stub.
2530
2531         * platform/graphics/mac/FontCacheMac.mm:
2532         (WebCore::FontCache::getTraitsInFamily): Added.
2533
2534         * platform/graphics/qt/FontCacheQt.cpp:
2535         (WebCore::FontCache::getTraitsInFamily): Added a stub.
2536
2537         * platform/graphics/win/FontCacheWin.cpp:
2538         (WebCore::TraitsInFamilyProcData::TraitsInFamilyProcData): Added.
2539         (WebCore::traitsInFamilyEnumProc): Added.
2540         (WebCore::FontCache::getTraitsInFamily): Added.
2541
2542         * platform/graphics/wx/FontCacheWx.cpp:
2543         (WebCore::FontCache::getTraitsInFamily): Added a stub.
2544
2545         * platform/mac/WebFontCache.h:
2546         * platform/mac/WebFontCache.mm:
2547         (toTraitsMask): Added.
2548         (+[WebFontCache getTraits:inFamily:]): Added.
2549
2550 2008-06-24  Anonymous
2551
2552         Reviewed by Darin Adler.  Committed by Adam Barth.
2553
2554         https://bugs.webkit.org/show_bug.cgi?id=19470
2555
2556         Check for a null documentElement() to fix four crashes.
2557
2558         * WebCore/dom/Document.cpp:
2559         * WebCore/dom/Node.cpp:
2560
2561 2008-06-24  Adam Barth  <abarth@webkit.org>
2562
2563         Reviewed by Darin Adler.
2564
2565         Fix <https://bugs.webkit.org/show_bug.cgi?id=19597>
2566
2567         Correctly parse <!-- </textarea> --> inside a <textarea>, matching
2568         Internet Explorer, Firefox, Opera, and HTML 5.
2569
2570         Tests: fast/parser/comment-in-script-tricky.html
2571                fast/parser/comment-in-style.html
2572                fast/parser/comment-in-textarea.html
2573                fast/parser/comment-in-title.html
2574
2575         * html/HTMLTokenizer.cpp:
2576         (WebCore::HTMLTokenizer::parseSpecial):
2577
2578 2008-06-24  Justin Garcia  <justin.garcia@apple.com>
2579
2580         Reviewed by John.
2581
2582         <rdar://problem/6026335> REGRESSION: Caret disappears after deleting a particular selection involving a ToDo
2583         
2584         * editing/CompositeEditCommand.cpp:
2585         (WebCore::CompositeEditCommand::moveParagraphs): If asked to preserveStyle, we
2586         apply styles from the moved paragraph to the destination with applyStyle, which
2587         does selection preservation when it needs to apply block styles.  Selection preservation 
2588         uses relatively untested code in TextIterator to count VisiblePositions which fails in 
2589         this particular test case because it doesn't handle changes in editability properly.  
2590         We can avoid this bug by not applying block styles from moved paragraphs.  This is 
2591         something that should be done anyway, since the moved paragraph should assume the 
2592         block styles of the destination.
2593         * editing/EditCommand.cpp:
2594         (WebCore::EditCommand::styleAtPosition): Added a FIXME about how it is misleading for
2595         this function to also include the typing style.
2596         * editing/TextIterator.h: Added a FIXME about how the code path used for selection preservation
2597         is buggy and should be phased out when we rewrite moveParagraphs.
2598
2599 2008-06-24  Kevin McCullough  <kmccullough@apple.com>
2600
2601         -Added a manual test for the profiler.
2602
2603         * manual-tests/inspector/profiler-test-compare-multiple-profiles.html: Added.
2604
2605 2008-06-24  Sam Weinig  <sam@webkit.org>
2606
2607         Reviewed by Anders Carlsson.
2608
2609         Add support for loadstart, abort and error events for XMLHttpRequests.
2610
2611         Tests: http/tests/xmlhttprequest/onabort-event.html
2612                http/tests/xmlhttprequest/onerror-event.html
2613                http/tests/xmlhttprequest/onloadstart-event.html
2614
2615         * bindings/js/JSXMLHttpRequestCustom.cpp:
2616         (WebCore::JSXMLHttpRequest::mark):
2617         (WebCore::JSXMLHttpRequest::onreadystatechange):
2618         (WebCore::JSXMLHttpRequest::onabort):
2619         (WebCore::JSXMLHttpRequest::setOnabort):
2620         (WebCore::JSXMLHttpRequest::onerror):
2621         (WebCore::JSXMLHttpRequest::setOnerror):
2622         (WebCore::JSXMLHttpRequest::onload):
2623         (WebCore::JSXMLHttpRequest::onloadstart):
2624         (WebCore::JSXMLHttpRequest::setOnloadstart):
2625         (WebCore::JSXMLHttpRequest::onprogress):
2626         * dom/EventNames.h:
2627         * xml/XMLHttpRequest.cpp:
2628         (WebCore::XMLHttpRequest::callReadyStateChangeListener):
2629         (WebCore::XMLHttpRequest::createRequest):
2630         (WebCore::XMLHttpRequest::abort):
2631         (WebCore::XMLHttpRequest::networkError):
2632         (WebCore::XMLHttpRequest::abortError):
2633         (WebCore::XMLHttpRequest::didFail):
2634         (WebCore::XMLHttpRequest::updateAndDispatchOnProgress):
2635         (WebCore::XMLHttpRequest::dispatchReadyStateChangeEvent):
2636         (WebCore::XMLHttpRequest::dispatchXMLHttpRequestProgressEvent):
2637         (WebCore::XMLHttpRequest::dispatchAbortEvent):
2638         (WebCore::XMLHttpRequest::dispatchErrorEvent):
2639         (WebCore::XMLHttpRequest::dispatchLoadEvent):
2640         (WebCore::XMLHttpRequest::dispatchLoadStartEvent):
2641         (WebCore::XMLHttpRequest::dispatchProgressEvent):
2642         * xml/XMLHttpRequest.h:
2643         (WebCore::XMLHttpRequest::setOnAbortListener):
2644         (WebCore::XMLHttpRequest::onAbortListener):
2645         (WebCore::XMLHttpRequest::setOnErrorListener):
2646         (WebCore::XMLHttpRequest::onErrorListener):
2647         (WebCore::XMLHttpRequest::setOnLoadStartListener):
2648         (WebCore::XMLHttpRequest::onLoadStartListener):
2649         * xml/XMLHttpRequest.idl:
2650
2651 2008-06-24  Anders Carlsson  <andersca@apple.com>
2652
2653         Reviewed by Mitz.
2654
2655         <rdar://problem/5957606>
2656         CrashTracer: [USER] 2 crashes in Safari at com.apple.WebCore: WebCore::DocumentLoader::cancelPendingSubstituteLoad + 23
2657
2658         Remove the loader from the document loader after calling didFail, so that the loader will be deferred corectly
2659         in case the call do didFail starts a new run loop.
2660         
2661         * loader/NetscapePlugInStreamLoader.cpp:
2662         (WebCore::NetscapePlugInStreamLoader::didCancel):
2663
2664 2008-06-24  Alexey Proskuryakov  <ap@webkit.org>
2665
2666         Release build fix.
2667
2668         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
2669         (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
2670         * bindings/js/JSCustomSQLTransactionCallback.cpp:
2671         (WebCore::JSCustomSQLTransactionCallback::handleEvent):
2672         Initialize callbackCallType, as the compiler is not smart enough to figure out data flow.
2673
2674 2008-06-24  Alexey Proskuryakov  <ap@webkit.org>
2675
2676         Reviewed by Darin.
2677
2678         https://bugs.webkit.org/show_bug.cgi?id=19723
2679         REGRESSION(r34648): Some SVG tests crash when running under --threaded
2680
2681         * rendering/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::destroy): Do not attempt
2682         to paint during document destruction, because rendering structures are not kept in a
2683         consistent state then.
2684
2685 2008-06-24  Jonathon Jongsma  <jonathon.jongsma@collabora.co.uk>
2686
2687         Reviewed by Darin.
2688
2689         https://bugs.webkit.org/show_bug.cgi?id=19727
2690
2691         Return bool from GraphicsContext::getShadow() so the tests aren't duplicated so
2692         many times in Cairo and Qt ports.
2693
2694         * platform/graphics/GraphicsContext.h:
2695         * platform/graphics/GraphicsContext.cpp:
2696         (WebCore::GraphicsContext::getShadow): return a boolean from getShadow()
2697         which indicates whether there is a visible shadow to draw or not.  Ports
2698         without a platform shadow implementation can use this flag to determine
2699         whether a shadow needs to be drawn manually
2700         * platform/graphics/cairo/FontCairo.cpp:
2701         (WebCore::Font::drawGlyphs):
2702         * platform/graphics/qt/FontQt.cpp:
2703         (WebCore::Font::drawText):
2704         * platform/graphics/qt/GraphicsContextQt.cpp:
2705         (WebCore::GraphicsContext::drawLine): use return from getShadow() to
2706         determine whether to draw the shadow
2707
2708 2008-06-24  Jonathon Jongsma  <jonathon.jongsma@collabora.co.uk>
2709
2710         Reviewed by Simon.
2711
2712         https://bugs.webkit.org/show_bug.cgi?id=18459
2713
2714         Clean up and remove unused platform shadow code.
2715
2716         Minor edits by Simon, removed unused TextShadow struct.
2717
2718         * platform/graphics/qt/GraphicsContextQt.cpp:
2719         (WebCore::GraphicsContext::setPlatformShadow):
2720         (WebCore::GraphicsContext::clearPlatformShadow): Qt doesn't support a
2721         platform shadow, so just make these functions empty.  The shadows are
2722         drawn manually in function like drawLine(), etc.
2723
2724 2008-06-24  Jonathon Jongsma  <jonathon.jongsma@collabora.co.uk>
2725
2726         Reviewed by Simon.
2727
2728         https://bugs.webkit.org/show_bug.cgi?id=18459
2729
2730         Implemented basic text-shadow support for the Qt port.
2731
2732         * platform/graphics/qt/FontQt.cpp:
2733         (WebCore::Font::drawText): implement text-shadow support in the Qt port
2734         * platform/graphics/qt/GraphicsContextQt.cpp:
2735         (WebCore::GraphicsContext::drawLine): also draw shadows for text
2736         decorations such as unerlines
2737
2738 2008-06-24  Simon Hausmann  <hausmann@webkit.org>
2739
2740         Fix the Qt build, adapt to various JSCore API changes.
2741
2742         * bridge/qt/qt_instance.cpp:
2743         (KJS::Bindings::QtRuntimeObjectImp::construct):
2744         (KJS::Bindings::QtInstance::getRuntimeObject):
2745         (KJS::Bindings::QtInstance::invokeDefaultMethod):
2746         * bridge/qt/qt_runtime.cpp:
2747         (KJS::Bindings::convertQVariantToValue):
2748         (KJS::Bindings::QtRuntimeMetaMethod::getCallData):
2749         (KJS::Bindings::QtRuntimeConnectionMethod::call):
2750         (KJS::Bindings::QtRuntimeConnectionMethod::getCallData):
2751         (KJS::Bindings::QtConnectionObject::execute):
2752         * bridge/qt/qt_runtime.h:
2753         (KJS::Bindings::QtRuntimeConnectionMethod::d_func):
2754
2755 2008-06-24  Alexey Proskuryakov  <ap@webkit.org>
2756
2757         Remove XMLHttpRequestProgressEvent.cpp from more project files.
2758
2759         * GNUmakefile.am:
2760         * WebCore.pro:
2761
2762 2008-06-24  Ariya Hidayat  <ariya.hidayat@trolltech.com>
2763
2764         Reviewed by Simon.
2765
2766         For the Qt port, fix linking with MinGW.
2767
2768         * WebCore.pro:
2769
2770 2008-06-23  Darin Adler  <darin@apple.com>
2771
2772         Reviewed by Geoff.
2773
2774         Update for JavaScript changes.
2775
2776         - Use CallData and ConstructData instead of the obsolete implementsCall,
2777           callAsFunction, and construct functions.
2778
2779         - Updated native function arguments, specifically to allow a JSValue
2780           rather than a JSObject for the this argument, and to call toThisObject
2781           as needed when treating it as an object.
2782
2783         - Made some more class members private and protected, including virtual
2784           function overrides.
2785
2786         - Eliminated the use of getCallData in the JavaScript bridging code as
2787           a way to check if an instance supports invokeDefaultMethod.
2788
2789         - Eliminated unnecessary polymorphism in the NodeIterator and TreeWalker
2790           classes. They were using virtual functions simply to share an instance
2791           of the RefCounted template, which was not helpful.
2792
2793         * bindings/js/JSAudioConstructor.cpp:
2794         (WebCore::constructAudio):
2795         (WebCore::JSAudioConstructor::getConstructData):
2796         * bindings/js/JSAudioConstructor.h:
2797         (WebCore::JSAudioConstructor::document):
2798         (WebCore::JSAudioConstructor::classInfo):
2799         * bindings/js/JSClipboardCustom.cpp:
2800         (WebCore::JSClipboard::types):
2801         * bindings/js/JSCustomSQLStatementCallback.cpp:
2802         (WebCore::JSCustomSQLStatementCallback::handleEvent):
2803         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
2804         (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
2805         * bindings/js/JSCustomSQLTransactionCallback.cpp:
2806         (WebCore::JSCustomSQLTransactionCallback::handleEvent):
2807         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
2808         (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
2809         * bindings/js/JSCustomVoidCallback.cpp:
2810         (WebCore::JSCustomVoidCallback::handleEvent):
2811         * bindings/js/JSCustomXPathNSResolver.cpp:
2812         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2813         * bindings/js/JSDOMBinding.h:
2814         (WebCore::DOMObject::DOMObject):
2815         * bindings/js/JSDOMWindowBase.cpp:
2816         (WebCore::windowProtoFuncAToB):
2817         (WebCore::windowProtoFuncBToA):
2818         (WebCore::windowProtoFuncOpen):
2819         (WebCore::windowProtoFuncSetTimeout):
2820         (WebCore::windowProtoFuncClearTimeout):
2821         (WebCore::windowProtoFuncSetInterval):
2822         (WebCore::windowProtoFuncAddEventListener):
2823         (WebCore::windowProtoFuncRemoveEventListener):
2824         (WebCore::windowProtoFuncShowModalDialog):
2825         (WebCore::windowProtoFuncNotImplemented):
2826         (WebCore::toJSDOMWindow):
2827         * bindings/js/JSDOMWindowBase.h:
2828         * bindings/js/JSDOMWindowShell.h:
2829         (WebCore::JSDOMWindowShell::classInfo):
2830         * bindings/js/JSEventListener.cpp:
2831         (WebCore::JSAbstractEventListener::handleEvent):
2832         (WebCore::JSLazyEventListener::parseCode):
2833         * bindings/js/JSEventTargetBase.cpp:
2834         (WebCore::retrieveEventTargetAndCorrespondingNode):
2835         (WebCore::jsEventTargetAddEventListener):
2836         (WebCore::jsEventTargetRemoveEventListener):
2837         (WebCore::jsEventTargetDispatchEvent):
2838         * bindings/js/JSEventTargetBase.h:
2839         * bindings/js/JSHTMLAppletElementCustom.cpp:
2840         (WebCore::JSHTMLAppletElement::customGetOwnPropertySlot):
2841         (WebCore::JSHTMLAppletElement::customPut):
2842         (WebCore::JSHTMLAppletElement::getCallData):
2843         * bindings/js/JSHTMLCollectionCustom.cpp:
2844         (WebCore::callHTMLCollection):
2845         (WebCore::JSHTMLCollection::getCallData):
2846         * bindings/js/JSHTMLDocumentCustom.cpp:
2847         (WebCore::JSHTMLDocument::open):
2848         * bindings/js/JSHTMLEmbedElementCustom.cpp:
2849         (WebCore::JSHTMLEmbedElement::customGetOwnPropertySlot):
2850         (WebCore::JSHTMLEmbedElement::customPut):
2851         (WebCore::JSHTMLEmbedElement::getCallData):
2852         * bindings/js/JSHTMLInputElementBase.cpp:
2853         (WebCore::jsHTMLInputElementBaseFunctionSetSelectionRange):
2854         * bindings/js/JSHTMLInputElementBase.h:
2855         * bindings/js/JSHTMLObjectElementCustom.cpp:
2856         (WebCore::JSHTMLObjectElement::customGetOwnPropertySlot):
2857         (WebCore::JSHTMLObjectElement::customPut):
2858         (WebCore::JSHTMLObjectElement::getCallData):
2859         * bindings/js/JSHTMLOptionElementConstructor.cpp:
2860         (WebCore::constructHTMLOptionElement):
2861         (WebCore::JSHTMLOptionElementConstructor::getConstructData):
2862         * bindings/js/JSHTMLOptionElementConstructor.h:
2863         (WebCore::JSHTMLOptionElementConstructor::document):
2864         (WebCore::JSHTMLOptionElementConstructor::classInfo):
2865         * bindings/js/JSImageConstructor.cpp:
2866         (WebCore::constructImage):
2867         (WebCore::JSImageConstructor::getConstructData):
2868         * bindings/js/JSImageConstructor.h:
2869         (WebCore::JSImageConstructor::document):
2870         (WebCore::JSImageConstructor::classInfo):
2871         * bindings/js/JSInspectedObjectWrapper.h:
2872         (WebCore::JSInspectedObjectWrapper::classInfo):
2873         * bindings/js/JSInspectorCallbackWrapper.cpp:
2874         (WebCore::JSInspectorCallbackWrapper::prepareIncomingValue):
2875         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
2876         (WebCore::JSJavaScriptCallFrame::scopeChain):
2877         * bindings/js/JSNodeFilterCondition.cpp:
2878         (WebCore::JSNodeFilterCondition::JSNodeFilterCondition):
2879         (WebCore::JSNodeFilterCondition::mark):
2880         (WebCore::JSNodeFilterCondition::acceptNode):
2881         * bindings/js/JSNodeFilterCondition.h:
2882         (WebCore::JSNodeFilterCondition::create):
2883         * bindings/js/JSNodeFilterCustom.cpp:
2884         (WebCore::toNodeFilter):
2885         * bindings/js/JSNodeListCustom.cpp:
2886         (WebCore::callNodeList):
2887         (WebCore::JSNodeList::getCallData):
2888         (WebCore::JSNodeList::canGetItemsForName):
2889         (WebCore::JSNodeList::nameGetter):
2890         * bindings/js/JSPluginElementFunctions.cpp:
2891         (WebCore::runtimeObjectGetter):
2892         (WebCore::runtimeObjectPropertyGetter):
2893         (WebCore::runtimeObjectCustomGetOwnPropertySlot):
2894         (WebCore::runtimeObjectCustomPut):
2895         (WebCore::runtimeObjectGetCallData):
2896         (WebCore::pluginInstance):
2897         (WebCore::getRuntimeObject):
2898         (WebCore::callPlugin):
2899         * bindings/js/JSPluginElementFunctions.h:
2900         * bindings/js/JSQuarantinedObjectWrapper.cpp:
2901         (WebCore::JSQuarantinedObjectWrapper::put):
2902         (WebCore::JSQuarantinedObjectWrapper::construct):
2903         (WebCore::JSQuarantinedObjectWrapper::getConstructData):
2904         (WebCore::JSQuarantinedObjectWrapper::hasInstance):
2905         (WebCore::JSQuarantinedObjectWrapper::call):
2906         (WebCore::JSQuarantinedObjectWrapper::getCallData):
2907         * bindings/js/JSQuarantinedObjectWrapper.h:
2908         (WebCore::JSQuarantinedObjectWrapper::className):
2909         * bindings/js/JSRGBColor.cpp:
2910         * bindings/js/JSXMLHttpRequestConstructor.cpp:
2911         (WebCore::constructXMLHttpRequest):
2912         (WebCore::JSXMLHttpRequestConstructor::getConstructData):
2913         * bindings/js/JSXMLHttpRequestConstructor.h:
2914         (WebCore::JSXMLHttpRequestConstructor::document):
2915         (WebCore::JSXMLHttpRequestConstructor::classInfo):
2916         * bindings/js/JSXSLTProcessorConstructor.cpp:
2917         (WebCore::constructXSLTProcessor):
2918         (WebCore::JSXSLTProcessorConstructor::getConstructData):
2919         * bindings/js/JSXSLTProcessorConstructor.h:
2920         (WebCore::JSXSLTProcessorConstructor::classInfo):
2921         * bindings/js/ScheduledAction.cpp:
2922         (WebCore::ScheduledAction::ScheduledAction):
2923         (WebCore::ScheduledAction::execute):
2924         * bindings/js/ScheduledAction.h:
2925         * bindings/objc/WebScriptObject.mm:
2926         (-[WebScriptObject callWebScriptMethod:withArguments:]):
2927         * bindings/scripts/CodeGeneratorJS.pm:
2928         * bridge/NP_jsobject.cpp:
2929         (_NPN_InvokeDefault):
2930         (_NPN_Invoke):
2931         * bridge/c/c_instance.cpp:
2932         (KJS::Bindings::CInstance::supportsInvokeDefaultMethod):
2933         * bridge/c/c_instance.h:
2934         * bridge/jni/jni_jsobject.mm:
2935         (JavaJSObject::call):
2936         * bridge/objc/objc_instance.h:
2937         * bridge/objc/objc_instance.mm:
2938         (ObjcInstance::supportsInvokeDefaultMethod):
2939         * bridge/objc/objc_runtime.h:
2940         (KJS::Bindings::ObjcFallbackObjectImp::propertyName):
2941         (KJS::Bindings::ObjcFallbackObjectImp::classInfo):
2942         * bridge/objc/objc_runtime.mm:
2943         (Bindings::webScriptObjectClass):
2944         (Bindings::webUndefinedClass):
2945         (ObjcFallbackObjectImp::ObjcFallbackObjectImp):
2946         (callObjCFallbackObject):
2947         (ObjcFallbackObjectImp::getCallData):
2948         * bridge/qt/qt_instance.h:
2949         * bridge/runtime.cpp:
2950         (KJS::Bindings::Instance::createRuntimeObject):
2951         (KJS::Bindings::Instance::getInstance):
2952         * bridge/runtime.h:
2953         (KJS::Bindings::Field::~Field):
2954         (KJS::Bindings::Method::~Method):
2955         (KJS::Bindings::Class::~Class):
2956         (KJS::Bindings::Instance::supportsInvokeDefaultMethod):
2957         * bridge/runtime_method.cpp:
2958         (KJS::callRuntimeMethod):
2959         (KJS::RuntimeMethod::getCallData):
2960         * bridge/runtime_method.h:
2961         (KJS::RuntimeMethod::methods):
2962         * bridge/runtime_object.cpp:
2963         (RuntimeObjectImp::defaultValue):
2964         (callRuntimeObject):
2965         (RuntimeObjectImp::getCallData):
2966         * bridge/runtime_object.h:
2967         (KJS::RuntimeObjectImp::getInternalInstance):
2968         (KJS::RuntimeObjectImp::classInfo):
2969         * dom/NodeIterator.h:
2970         * dom/Traversal.cpp:
2971         * dom/Traversal.h:
2972         * dom/TreeWalker.h:
2973
2974 2008-06-23  Adam Barth  <abarth@webkit.org>
2975
2976         Reviewed by Darin Adler.
2977
2978         https://bugs.webkit.org/show_bug.cgi?id=16756
2979
2980         Move isAllowedToLoadLocalResources into SecurityOrigin.
2981
2982         * dom/Document.cpp:
2983         (WebCore::Document::Document):
2984         (WebCore::Document::setURL):
2985         (WebCore::Document::initSecurityContext):
2986         * dom/Document.h:
2987         * loader/FrameLoader.cpp:
2988         (WebCore::FrameLoader::canLoad):
2989         * platform/SecurityOrigin.cpp:
2990         (WebCore::SecurityOrigin::SecurityOrigin):
2991         (WebCore::SecurityOrigin::isLocal):
2992         * platform/SecurityOrigin.h:
2993         (WebCore::SecurityOrigin::protocol):
2994         (WebCore::SecurityOrigin::host):
2995         (WebCore::SecurityOrigin::domain):
2996         (WebCore::SecurityOrigin::port):
2997         (WebCore::SecurityOrigin::canLoadLocalResources):
2998         (WebCore::SecurityOrigin::grantLoadLocalResources):
2999         * xml/XMLHttpRequest.cpp:
3000         (WebCore::XMLHttpRequest::setRequestHeader):
3001
3002 2008-06-23  Mark Rowe  <mrowe@apple.com>
3003
3004         Fix the Windows build.
3005
3006         * WebCore.vcproj/WebCore.vcproj: Add generated files related to CSS variables to the Windows project file.
3007
3008 2008-06-23  Steve Falkenburg  <sfalken@apple.com>
3009
3010         Fix a math error in my last change.
3011         
3012         Reviewed by Ada Chan.
3013
3014         * platform/win/FileSystemWin.cpp:
3015         (WebCore::openTemporaryFile):
3016
3017 2008-06-23  Kevin McCullough  <kmccullough@apple.com>
3018
3019         -Build fix.
3020
3021         * WebCore.vcproj/WebCore.vcproj:
3022
3023 2008-06-23  chris fleizach  <cfleizach@apple.com>
3024
3025         Reviewed by Darin Adler.
3026
3027         <rdar://problem/6024267> VO unable to read massive emails because AccessibilityObject::lengthForVisiblePositionRange makes the string
3028
3029         * page/AccessibilityObject.cpp:
3030         (WebCore::replacedNodeNeedsCharacter):
3031         (WebCore::AccessibilityObject::stringForVisiblePositionRange):
3032         (WebCore::AccessibilityObject::lengthForVisiblePositionRange):
3033
3034 2008-06-23  Steve Falkenburg  <sfalken@apple.com>
3035
3036         Added our own mechanism for generating temporary file names.
3037         
3038         Reviewed by Ada Chan, Darin Adler.
3039
3040         * platform/win/FileSystemWin.cpp:
3041         (WebCore::openTemporaryFile):
3042
3043 2008-06-23  Sam Weinig  <sam@webkit.org>
3044
3045         Remove XMLHttpRequestProgressEvent.cpp from project files.
3046
3047         * WebCore.vcproj/WebCore.vcproj:
3048         * WebCore.xcodeproj/project.pbxproj:
3049         * WebCoreSources.bkl:
3050
3051 2008-06-23  Sam Weinig  <sam@webkit.org>
3052
3053         Reviewed by Dave Hyatt.
3054
3055         Remove empty file.
3056
3057         * xml/XMLHttpRequestProgressEvent.cpp: Removed.
3058
3059 2008-06-23  Sam Weinig  <sam@webkit.org>
3060
3061         Rubber-stamped by Tim Hatcher.
3062
3063         Rename XMLHttpRequest::sameOriginRequest to XMLHttpRequest::makeSameOriginRequest
3064         and XMLHttpRequest::crossSiteAccessRequest to XMLHttpRequest::makeCrossSiteAccessRequest.
3065
3066         * xml/XMLHttpRequest.cpp:
3067         (WebCore::XMLHttpRequest::createRequest):
3068         (WebCore::XMLHttpRequest::makeSameOriginRequest):
3069         (WebCore::XMLHttpRequest::makeCrossSiteAccessRequest):
3070         * xml/XMLHttpRequest.h:
3071
3072 2008-06-23  Sam Weinig  <sam@webkit.org>
3073
3074         Reviewed by Alexey Proskuryakov.
3075
3076         Some XMLHttpRequest re-organization to aid further enhancements coming soon.
3077
3078         * bindings/js/JSXMLHttpRequestCustom.cpp:
3079         (WebCore::JSXMLHttpRequest::send): Explicitly call overloaded versions of send,
3080         instead of always calling though send(DOMString).
3081         * dom/Document.idl: Adds native converter.
3082
3083         * xml/XMLHttpRequest.cpp:
3084         (WebCore::XMLHttpRequest::open):
3085         (WebCore::XMLHttpRequest::initSend):
3086         (WebCore::XMLHttpRequest::send):
3087         (WebCore::XMLHttpRequest::createRequest):
3088         (WebCore::XMLHttpRequest::sameOriginRequest):
3089         (WebCore::XMLHttpRequest::crossSiteAccessRequest):
3090         (WebCore::XMLHttpRequest::abort):
3091         (WebCore::XMLHttpRequest::clearResponse):
3092         (WebCore::XMLHttpRequest::clearRequest):
3093         (WebCore::XMLHttpRequest::genericError):
3094         (WebCore::XMLHttpRequest::dispatchProgressEvent):
3095         * xml/XMLHttpRequest.h:
3096         (WebCore::XMLHttpRequest::setOnReadyStateChangeListener): Inline.
3097         (WebCore::XMLHttpRequest::onReadyStateChangeListener): Ditto.
3098         (WebCore::XMLHttpRequest::setOnLoadListener): Ditto.
3099         (WebCore::XMLHttpRequest::onLoadListener): Ditto.
3100         (WebCore::XMLHttpRequest::setOnProgressListener): Ditto.
3101         (WebCore::XMLHttpRequest::onProgressListener): Ditto.
3102         Makes the request entity body a member variable so that the send method
3103         can be more easily broken up.
3104
3105 2008-06-23  Timothy Hatcher  <timothy@apple.com>
3106
3107         Make profiles of the same name in the Inspector group in the
3108         sidebar under a collapsable item that contains all the runs.
3109
3110         https://bugs.webkit.org/show_bug.cgi?id=19713
3111
3112         Reviewed by Darin Adler.
3113
3114         * English.lproj/localizedStrings.js: New strings.
3115         * page/inspector/Images/profileGroupIcon.png: Added.
3116         * page/inspector/Images/profileSmallIcon.png: Added.
3117         * page/inspector/ProfilesPanel.js:
3118         (WebInspector.ProfilesPanel.prototype.reset): Clear _profileGroups.
3119         Remove the "some-expandable" class from the sidebarTree.
3120         (WebInspector.ProfilesPanel.prototype.addProfile): Append new profiles
3121         that have the same name as a previous profile into a group. When a
3122         group has 2 profiles a ProfileGroupSidebarTreeElement is made and the
3123         ProfileSidebarTreeElements are appended to the group's element. 
3124         (WebInspector.ProfileSidebarTreeElement.prototype.get mainTitle):
3125         Return _mainTitle is it is set.
3126         (WebInspector.ProfileSidebarTreeElement.prototype.set mainTitle):
3127         Set _mainTitle which is an override title.
3128         (WebInspector.ProfileGroupSidebarTreeElement): Inherit SidebarTreeElement.
3129         (WebInspector.ProfileGroupSidebarTreeElement.prototype.onselect):
3130         Show the last profile in the group when selected.
3131         * page/inspector/SidebarTreeElement.js:
3132         (WebInspector.SidebarTreeElement.prototype.get small): Return _small.
3133         (WebInspector.SidebarTreeElement.prototype.set small): Set _small and
3134         update the style to match.
3135         (WebInspector.SidebarTreeElement.prototype.onattach): Set the small
3136         class if the small property is true.
3137         * page/inspector/inspector.css: New styles for profiles groups
3138         and for the small profiles.
3139
3140 2008-06-23  Anders Carlsson  <andersca@apple.com>
3141
3142         Reviewed by Geoff.
3143
3144         Make changedDocuments a HashSet.
3145
3146         * dom/Document.cpp:
3147         (WebCore::Document::setDocumentChanged):
3148         (WebCore::Document::updateDocumentsRendering):
3149
3150 2008-06-23  Alexey Proskuryakov  <ap@webkit.org>
3151
3152         Reviewed by Mark Rowe.
3153
3154         Restore a collectOnMainThreadOnly call that was accidentally removed in r34659. It will not
3155         be needed when heaps are actually per-thread, but this isn't the case yet, and collecting
3156         on a different thread causes crashes.
3157
3158         * bindings/js/JSDOMBinding.h:
3159         (WebCore::DOMObject::DOMObject):
3160
3161 2008-06-22  Jonathon Jongsma  <jonathon.jongsma@collabora.co.uk>
3162
3163         Reviewed by Darin Adler.
3164
3165         Fix https://bugs.webkit.org/show_bug.cgi?id=19465
3166         Bug 19465: Cursor sometimes gets 'stuck' in textareas when trying to navigate with arrow keys
3167
3168         Test: editing/input/textarea-arrow-navigation.html
3169
3170         * rendering/RenderText.cpp:
3171         (WebCore::RenderText::positionForCoordinates): In the case when the next position is to the right
3172         of the last text box but the text offset is 0, set the affinity to DOWNSTREAM instead of UPSTREAM so
3173         that the cursor doesn't remain on the previous line.
3174
3175 2008-06-22  Robert Blaut  <webkit@blaut.biz>
3176
3177         Reviewed by Darin Adler.
3178
3179         Fix for https://bugs.webkit.org/show_bug.cgi?id=17421
3180         Bug 17421: Lack of end tag for SELECT element causes the rest of page to not be rendered
3181
3182         Test: fast/parser/input-textarea-inside-select-element.html
3183
3184         * html/HTMLParser.cpp:
3185         (WebCore::HTMLParser::handleError):
3186
3187 2008-06-22  David Krause  <david.krause@gmail.com>
3188
3189         Reviewed by Darin Adler.
3190
3191         Fix https://bugs.webkit.org/show_bug.cgi?id=19426
3192         Bug 19426: LOW_BANDWIDTH_DISPLAY build broken
3193
3194         Change ref to addClient and deref to removeClient in code wrapped
3195         by USE(LOW_BANDWIDTH_DISPLAY) to match changes in r31834.
3196
3197         * loader/FrameLoader.cpp:
3198         (WebCore::FrameLoader::addLowBandwidthDisplayRequest):
3199         (WebCore::FrameLoader::removeAllLowBandwidthDisplayRequests):
3200         (WebCore::FrameLoader::notifyFinished):
3201
3202 2008-06-22  Robert Blaut  <webkit@blaut.biz>
3203
3204         Reviewed by Darin Adler.
3205
3206         Fix https://bugs.webkit.org/show_bug.cgi?id=19520
3207         Bug 19520: WebKit incorrectly accepts hidden as the value of outline-style
3208
3209         Test: fast/css/outline-hidden-illegal-value.html
3210
3211         * css/CSSParser.cpp:
3212         (WebCore::CSSParser::parseValue):
3213         * rendering/RenderFlow.cpp:
3214         (WebCore::RenderFlow::paintOutline):
3215         * rendering/RenderObject.cpp:
3216         (WebCore::RenderObject::paintOutline):
3217         * rendering/style/RenderStyle.h:
3218         (WebCore::RenderStyle::outlineWidth):
3219         (WebCore::RenderStyle::outlineOffset):
3220
3221 2008-06-22  Jonathon Jongsma  <jonathon.jongsma@collabora.co.uk>
3222
3223         Reviewed by Dan Bernstein.
3224
3225         Fix https://bugs.webkit.org/show_bug.cgi?id=19675
3226         Bug 19675: [GTK] negative text-shadows are not rendered
3227
3228         * platform/graphics/cairo/FontCairo.cpp:
3229         (WebCore::Font::drawGlyphs): The IntSize::isEmpty() call checks that the
3230         sizes are > 0, while we need to check for != 0.
3231
3232 2008-06-22  kuchhal  <kuchhal@yahoo.com>
3233
3234         Reviewed by Darin Adler.
3235
3236         Fix https://bugs.webkit.org/show_bug.cgi?id=19696
3237         Bug 19696: Memory leak in WebCore/editing/DeleteButtonController.cpp
3238
3239         * editing/DeleteButtonController.cpp:
3240         (WebCore::DeleteButtonController::createDeletionUI): Delete the Image instance
3241         if the platform resource could not be loaded.
3242
3243 2008-06-22  kuchhal  <kuchhal@yahoo.com>
3244
3245         Reviewed by Darin Adler.
3246
3247         Fix https://bugs.webkit.org/show_bug.cgi?id=19697
3248         Bug 19697: Redundant releaseRef causing memory leak
3249
3250         * platform/win/ClipboardUtilitiesWin.cpp:
3251         (WebCore::fragmentFromCF_HTML):
3252
3253 2008-06-21  Sam Weinig  <sam@webkit.org>
3254
3255         Fix Windows build.
3256
3257         * bindings/scripts/CodeGeneratorCOM.pm:
3258         * html/HTMLInputElement.idl:
3259
3260 2008-06-21  Timothy Hatcher  <timothy@apple.com>
3261
3262         Fix a typo "new" in the keywords list for hte JavaScript
3263         syntax highlighter. And adds "get" and "set" to the keyword list.
3264
3265         Reviewed by Sam Weinig.
3266
3267         * page/inspector/SourceFrame.js:
3268         (WebInspector.SourceFrame.prototype._syntaxHighlightJavascriptLine):
3269         Fixes the "new" typo and adds "get" and "set".
3270
3271 2008-06-21  David Kilzer  <ddkilzer@apple.com>
3272
3273         Bug 7931: Escaped elements within a textarea block can cause the textarea box to be closed prematurely
3274
3275         <https://bugs.webkit.org/show_bug.cgi?id=7931>
3276
3277         Reviewed by Darin.
3278
3279         Tests: fast/parser/entity-end-iframe-tag.html
3280                fast/parser/entity-end-script-tag.html
3281                fast/parser/entity-end-style-tag.html
3282                fast/parser/entity-end-textarea-tag.html
3283                fast/parser/entity-end-title-tag.html
3284                fast/parser/entity-end-xmp-tag.html
3285
3286         Previously the parser accepted end tags for textarea, title and
3287         iframe elements that contained entity-escaped characters such as
3288         '&lt;'.  The fix is to save the position of the last entity-escaped
3289         character converted and to use that to make sure the end tag does
3290         not contain an escaped character.
3291
3292         Note that this was not an issue for script, style and xmp elements
3293         since they already ignored entity-escaped characters.
3294
3295         * html/HTMLTokenizer.cpp:
3296         (WebCore::HTMLTokenizer::parseSpecial): When looking for a closing
3297         tag, ignore any text with entity-escaped characters by making sure
3298         lastDecodedEntityPosition is less than the first character of the
3299         end tag.
3300
3301 2008-06-21  Sam Weinig  <sam@webkit.org>
3302
3303         Reviewed by Dan Bernstein.
3304
3305         Fix for https://bugs.webkit.org/show_bug.cgi?id=19647
3306         REGRESSION: Problem with extjs (insertAdjacentHTML)
3307
3308         Test: fast/dynamic/insertAdjacentHTML-allowed-parents.html
3309
3310         * html/HTMLElement.cpp:
3311         (WebCore::HTMLElement::insertAdjacentHTML): Don't use innerHTML logic for creating
3312         the DocumentFragment from the html string.
3313
3314 2008-06-21  Adam Barth  <abarth@webkit.org>
3315
3316         Reviewed by Sam Weinig.
3317
3318         Log error messages to the console when we deny a request for a URL.
3319         These error messages do not appear in LayoutTests, but they do
3320         appear in the WebInspector.
3321
3322         * dom/XMLTokenizer.cpp:
3323         (WebCore::shouldAllowExternalLoad):
3324         * loader/DocLoader.cpp:
3325         (WebCore::DocLoader::requestResource):
3326         (WebCore::DocLoader::printAccessDeniedMessage):
3327         * loader/DocLoader.h:
3328         * xml/XSLTProcessor.cpp:
3329         (WebCore::docLoaderFunc):
3330
3331 2008-06-21  Adam Barth  <abarth@webkit.org>
3332
3333         Reviewed by Sam Weinig.
3334
3335         Fix <https://bugs.webkit.org/show_bug.cgi?id=19649>:
3336           XSL style sheets allowed across origins
3337
3338         Block cross-orgin loads of XSL style sheets, matching Internet
3339         Explorer, Firefox, and Opera.  Also, we now block loading of XBL
3340         across origins, matching Firefox.  The XBL behavior does not appear
3341         testable because XBL seems to not be enabled.
3342
3343         Test: http/tests/security/cross-origin-xsl-BLOCKED.html
3344
3345         * loader/DocLoader.cpp:
3346         (WebCore::DocLoader::requestResource):
3347
3348 2008-06-21  Marvin Decker  <marv.decker@gmail.com>
3349
3350         Reviewed by Dave Hyatt.
3351
3352         - fix https://bugs.webkit.org/show_bug.cgi?id=19542
3353           <rdar://problem/6007976> Crash in Font::glyphDataForCharacter when getting small caps data
3354
3355         Adds a NULL check for getting the small caps page of glyph data. The
3356         page() function can explicitly return null in some cases, and every
3357         other usage in this function does the check.
3358
3359         * platform/graphics/Font.cpp:
3360         (WebCore::Font::glyphDataForCharacter):
3361
3362 2008-06-21  Alex Taylor  <darwin@milliamp.org>
3363
3364         Reviewed by Dan Bernstein.
3365
3366         Fixes <https://bugs.webkit.org/show_bug.cgi?id=12425>
3367
3368         Adds support for border-radius on legend elements.
3369         Fieldsets with a legend and rounded borders now have a clipping region set
3370         around the legend.
3371         
3372         Test: fast/borders/fieldsetBorderRadius.html
3373
3374         * rendering/RenderFieldset.cpp:
3375         (WebCore::RenderFieldset::paintBoxDecorations):
3376         (WebCore::RenderFieldset::paintBorderMinusLegend): Removed a FIXME.
3377
3378 2008-06-21  Kevin Ollivier  <kevino@theolliviers.com>
3379
3380         wx build fix. Adding CSSVariable* API sources to the Bakefiles.
3381
3382         * WebCoreSources.bkl:
3383
3384 2008-06-20  Sam Weinig  <sam@webkit.org>
3385
3386         Fix Windows build.
3387
3388         * bindings/scripts/CodeGeneratorCOM.pm:
3389
3390 2008-06-20  Jan Michael Alonzo  <jmalonzo@webkit.org>
3391
3392         Gtk build fix: Add files missing in the previous fix (r34705)
3393
3394         * GNUmakefile.am:
3395
3396 2008-06-20  Dan Bernstein  <mitz@apple.com>
3397
3398         Reviewed by Sam Weinig.
3399
3400         - fix leak of mask images
3401
3402         * rendering/RenderObject.cpp:
3403         (WebCore::RenderObject::arenaDelete): Added a call to removeClient() on
3404         the mask box image.
3405
3406 2008-06-20  Jan Michael Alonzo  <jmalonzo@webkit.org>
3407
3408         Gtk build fix for r34702, r34700 and r34693
3409         Qt build fix for r34700 and r34693
3410
3411         * GNUmakefile.am:
3412         * WebCore.pro:
3413         * platform/gtk/RenderThemeGtk.cpp:
3414         * platform/gtk/RenderThemeGtk.h:
3415         * platform/qt/RenderThemeQt.cpp:
3416         * platform/qt/RenderThemeQt.h:
3417
3418 2008-06-20  Sam Weinig  <sam@webkit.org>
3419
3420         Reviewed by Adele Peterson.
3421
3422         Add 'files' property to the HTMLInputElement, which returns a FileList object 
3423         (when type=file, null otherwise) containing a list of all the files selected.
3424         It currently always contains only 0 or 1 files as multifile input is not supported 
3425         yet.  The list contains File objects which contains the name and size of the file. 
3426         The inspiration for these interfaces is from:
3427             - http://developer.mozilla.org/en/docs/nsIDOMFileList
3428             - http://developer.mozilla.org/en/docs/nsIDOMFile
3429
3430         Also fixes <rdar://problem/6022802>
3431
3432         * DerivedSources.make:
3433         * GNUmakefile.am:
3434         * WebCore.pro:
3435         * WebCore.vcproj/WebCore.vcproj:
3436         * WebCore.xcodeproj/project.pbxproj:
3437         * WebCoreSources.bkl:
3438         * bindings/objc/DOMInternal.h:
3439         * bindings/scripts/CodeGenerator.pm:
3440         * bindings/scripts/IDLStructure.pm:
3441         * html/File.cpp: Added.
3442         (WebCore::File::File):
3443         (WebCore::File::fileSize):
3444         * html/File.h: Added.
3445         (WebCore::File::create):
3446         (WebCore::File::fileName):
3447         (WebCore::File::path):
3448         * html/File.idl: Added.
3449         * html/FileList.cpp: Added.
3450         (WebCore::FileList::FileList):
3451         (WebCore::FileList::item):
3452         * html/FileList.h: Added.
3453         (WebCore::FileList::create):
3454         (WebCore::FileList::length):
3455         (WebCore::FileList::isEmpty):
3456         (WebCore::FileList::clear):
3457         (WebCore::FileList::append):
3458         * html/FileList.idl: Added.
3459         * html/HTMLInputElement.cpp:
3460         (WebCore::HTMLInputElement::setInputType):
3461         (WebCore::HTMLInputElement::appendFormData):
3462         (WebCore::HTMLInputElement::value):
3463         (WebCore::HTMLInputElement::setValue):
3464         (WebCore::HTMLInputElement::setValueFromRenderer):
3465         (WebCore::HTMLInputElement::files):
3466         * html/HTMLInputElement.h:
3467         * html/HTMLInputElement.idl:
3468         * page/DOMWindow.idl:
3469
3470 2008-06-20  David Hyatt  <hyatt@apple.com>
3471
3472         Make sure CSS variables work inside the inline style attribute.
3473
3474         Reviewed by Beth
3475
3476         Added fast/css/variables/inline-style-test.html
3477
3478         * css/CSSMutableStyleDeclaration.cpp:
3479         (WebCore::CSSMutableStyleDeclaration::removeProperty):
3480         (WebCore::CSSMutableStyleDeclaration::addParsedProperties):
3481
3482 2008-06-20  David Hyatt  <hyatt@apple.com>
3483
3484         Add support for the CSSVariablesRule and CSSVariablesDeclaration DOM APIs.  These allow querying of
3485         variables names and values, as well as iteration, setting and removal.
3486
3487         Reviewed by Sam
3488
3489         Added multiple new tests to fast/css/variables/
3490
3491         * DerivedSources.make:
3492         * WebCore.xcodeproj/project.pbxproj:
3493         * bindings/js/JSCSSRuleCustom.cpp:
3494         (WebCore::toJS):
3495         * bindings/objc/DOMInternal.h:
3496         * bindings/scripts/CodeGeneratorJS.pm:
3497         * css/CSSPrimitiveValue.cpp:
3498         (WebCore::CSSPrimitiveValue::parserValue):
3499         * css/CSSVariablesDeclaration.cpp:
3500         (WebCore::CSSVariablesDeclaration::removeVariable):
3501         (WebCore::CSSVariablesDeclaration::setVariable):
3502         (WebCore::CSSVariablesDeclaration::setCssText):
3503         (WebCore::CSSVariablesDeclaration::setChanged):
3504         * css/CSSVariablesDeclaration.h:
3505         * css/CSSVariablesDeclaration.idl: Added.
3506         * css/CSSVariablesRule.h:
3507         * css/CSSVariablesRule.idl: Added.
3508
3509 2008-06-20  Kevin McCullough  <kmccullough@apple.com>
3510
3511         Rubber stamped by Adele. 
3512
3513         * manual-tests/inspector/profiler-test-stop-profiling-after-setTimeout.html: Added.
3514
3515 2008-06-20  Kevin McCullough  <kmccullough@apple.com>
3516
3517         Reviewed by Tim.
3518
3519         <rdar://problem/5958770> JSProfiler: Time incorrectly given to (idle)
3520         if profiling is started and finished within the same function. (19230)
3521         - Now we profile one more stack frame up from the last frame to allocate
3522         the time spent in it, if it exists.
3523
3524         * page/Console.cpp:
3525         * manual-tests/inspector/profiler-test-start-and-stop-profiling-in-the-same-function.html: Added.
3526         (WebCore::Console::profile): When stating the profiler give a client for
3527         the callback of when the profile actually finishes.
3528         (WebCore::Console::profileEnd): No longer needs to handle the return of
3529         the profile object since it will be retruned in the client's callback.
3530         (WebCore::Console::finishedProfiling): Implemenet the ProfileClient
3531         callback method.
3532         * page/Console.h: Inherit from the ProfileClient.
3533         * page/InspectorController.cpp:
3534         (WebCore::InspectorController::startUserInitiatedProfiling): Use the
3535         client callback.
3536         (WebCore::InspectorController::stopUserInitiatedProfiling): Does not
3537         need to handle the profile being returned as it is now handled by the
3538         client callback.
3539         (WebCore::InspectorController::finishedProfiling): Implement the
3540         ProfileClient callback method.
3541         * page/InspectorController.h: Inherit from the ProfileClient.
3542
3543 2008-06-20  Timothy Hatcher  <timothy@apple.com>
3544
3545         Makes the JavaScript syntax highlighter process lines in chunks
3546         so the user interface isn't blocked for large script files.
3547
3548         https://bugs.webkit.org/show_bug.cgi?id=19677
3549
3550         Reviewed by Adam Roben.
3551
3552         * page/inspector/SourceFrame.js:
3553         (WebInspector.SourceFrame.prototype._addMessageToSource): Use the cells
3554         property on the row instead of getElementsByTagName.
3555         (WebInspector.SourceFrame.prototype.syntaxHighlightJavascript): Use the
3556         cells property on the row instead of getElementsByTagName. Added
3557         a nested processChunk function that highlights 10 lines at a time
3558         This processChunk function is called at an interval of 25ms. The
3559         code is still highlighted quickly, and the user can't tell it wasn't
3560         highlighted all at once.
3561
3562 2008-06-20  Timothy Hatcher  <timothy@apple.com>
3563
3564         Fixes a bug where the source view in the Resources panel had a
3565         couple of extra pixels at the bottom when fully scrolled.
3566
3567         Reviewed by Adam Roben.
3568
3569         * page/inspector/SourceFrame.js:
3570         (WebInspector.SourceFrame.prototype.set autoSizesToFitContentHeight):
3571         Call removeStyleClass instead of addStyleClass for "webkit-height-sized-to-fit"
3572         when sizing to fit is being disabled.
3573         * page/inspector/inspector.css:
3574         (.resource-view.headers-visible .source-view-frame): Added the
3575         vertical-align: top property to prevent line alignment from adding extra
3576         pixels on the bottom.
3577
3578 2008-06-20  Timothy Hatcher  <timothy@apple.com>
3579
3580         Changed all lineHeight, baselinePosition and verticalPositionHint
3581         calls to return int instead of short. The short was overflowing
3582         when a value greater than 32,767 was encountered.
3583
3584         Fixes: iframes with a height of 32,768px or greater do not layout correctly
3585         https://bugs.webkit.org/show_bug.cgi?id=19679
3586
3587         Reviewed by Dave Hyatt.
3588
3589         Test: fast/css/line-height-overflow.html
3590
3591         * rendering/RenderBR.cpp:
3592         (WebCore::RenderBR::baselinePosition):
3593         * rendering/RenderBR.h:
3594         * rendering/RenderBlock.cpp:
3595         (WebCore::RenderBlock::lineHeight):
3596         * rendering/RenderBlock.h:
3597         * rendering/RenderFlow.cpp:
3598         * rendering/RenderFlow.h:
3599         * rendering/RenderListBox.cpp:
3600         * rendering/RenderListBox.h:
3601         * rendering/RenderListMarker.cpp:
3602         (WebCore::RenderListMarker::lineHeight):
3603         * rendering/RenderListMarker.h:
3604         * rendering/RenderObject.cpp:
3605         (WebCore::RenderObject::verticalPositionHint):
3606         * rendering/RenderObject.h:
3607         (WebCore::):
3608         * rendering/RenderPath.cpp:
3609         (WebCore::RenderPath::lineHeight):
3610         * rendering/RenderPath.h:
3611         * rendering/RenderReplaced.cpp:
3612         (WebCore::RenderReplaced::lineHeight):
3613         * rendering/RenderReplaced.h:
3614         * rendering/RenderSVGContainer.cpp:
3615         (WebCore::RenderSVGContainer::lineHeight):
3616         * rendering/RenderSVGContainer.h:
3617         * rendering/RenderSVGHiddenContainer.cpp:
3618         (WebCore::RenderSVGHiddenContainer::lineHeight):
3619         * rendering/RenderSVGHiddenContainer.h:
3620         * rendering/RenderSVGRoot.cpp:
3621         (WebCore::RenderSVGRoot::lineHeight):
3622         * rendering/RenderSVGRoot.h:
3623         * rendering/RenderSlider.cpp:
3624         * rendering/RenderSlider.h:
3625         * rendering/RenderTableCell.cpp:
3626         * rendering/RenderTableCell.h:
3627         * rendering/RenderTableCol.h:
3628         * rendering/RenderTableRow.h:
3629         * rendering/RenderTableSection.h:
3630         * rendering/RenderText.cpp:
3631         * rendering/RenderText.h:
3632         * rendering/RenderTextControl.cpp:
3633         * rendering/RenderTextControl.h:
3634         * rendering/RenderTheme.cpp:
3635         * rendering/RenderTheme.h:
3636         * rendering/RenderThemeMac.h:
3637         * rendering/RenderThemeMac.mm:
3638         * rendering/RenderThemeSafari.cpp:
3639         * rendering/RenderThemeSafari.h:
3640
3641 2008-06-20  Dan Bernstein  <mitz@apple.com>
3642
3643         Reviewed by Darin Adler.
3644
3645         - fix https://bugs.webkit.org/show_bug.cgi?id=19519
3646           <rdar://problem/6007345> DOM modification causes stack exhaustion (BUTTON OBJECT COLGROUP)
3647
3648         Test: fast/table/prepend-in-anonymous-table.html
3649
3650         * rendering/RenderBlock.cpp:
3651         (WebCore::RenderBlock::addChildToFlow): Added code to handle the case
3652         of inserting before a child that has been wrapped by an anonymous table,
3653         in which case if the new child is the type that needs to be in a table,
3654         it is inserted into the table, and otherwise it is inserted before the
3655         table.
3656         * rendering/RenderTable.cpp:
3657         (WebCore::RenderTable::addChild): Added table-column-group alongside
3658         table-caption as content that can exist inside an anonymous table
3659         without being wrapped in a table section.
3660
3661 2008-06-20  David Hyatt  <hyatt@apple.com>
3662
3663         Allow CSS variables to support arbitrary expressions as values instead of just a single term.
3664
3665         Reviewed by Sam
3666
3667         Removed fast/css/variables/single-term-test.html and replaced with multiple-term-test.html
3668
3669         * css/CSSGrammar.y:
3670         * css/CSSParser.cpp:
3671         (WebCore::CSSParser::addVariable):
3672         * css/CSSParser.h:
3673         * css/CSSStyleSelector.cpp:
3674         (WebCore::CSSStyleSelector::addMatchedDeclaration):
3675         * css/CSSVariablesDeclaration.cpp:
3676         (WebCore::CSSVariablesDeclaration::CSSVariablesDeclaration):
3677         (WebCore::CSSVariablesDeclaration::getVariableValue):
3678         (WebCore::CSSVariablesDeclaration::addParsedVariable):
3679         (WebCore::CSSVariablesDeclaration::getParsedVariable):
3680         * css/CSSVariablesDeclaration.h:
3681         (WebCore::CSSVariablesDeclaration::create):
3682
3683 2008-06-19  Dan Bernstein  <mitz@apple.com>
3684
3685         Reviewed by John Sullivan.
3686
3687         - fix a bug where anonymous tables were inserted in the wrong place
3688
3689         Tests: tables/mozilla/bugs/bug2479-2.html
3690                tables/mozilla/bugs/bug278266.html
3691                tables/mozilla/bugs/bug8411.xml
3692
3693         * rendering/RenderContainer.cpp:
3694         (WebCore::RenderContainer::addChild): Changed to create an anonymous
3695         table and insert it before beforeChild unless the insertion point is
3696         right after an existing anonymous table, in which case the existing
3697         table is used.
3698
3699 2008-06-19  Justin Garcia  <justin.garcia@apple.com>
3700
3701         Reviewed by Oliver.
3702
3703         <https://bugs.webkit.org/show_bug.cgi?id=16049>
3704         execCommand('backColor') fails on collapsed selections
3705
3706         * editing/EditorCommand.cpp:
3707         (WebCore::CommandEntry::): Enable BackColor for caret selections, and
3708         disable ForeColor in plaintext-only regions.
3709
3710 2008-06-19  Justin Garcia  <justin.garcia@apple.com>
3711
3712         Reviewed by John.
3713
3714         <https://bugs.webkit.org/show_bug.cgi?id=19653>
3715         Typing style lost when creating list from, indenting or outdenting an empty paragraph
3716         
3717         There were two problems.  First, moveParagraphs didn't preserve the style of empty paragraphs.
3718         Second, indent, outdent and list creation returned false from preservesTypingStyle.
3719         The second problem couldn't be fixed by just adding preservesTypingStyle() { return true; }
3720         to those commands, though, because of other bugs.
3721         
3722         Cleaned up the implementation of typing style enough to remove FIXMEs for:
3723         
3724         <rdar://problem/3769899> Implementation of typing style needs improvement 
3725         
3726         which has actually been closed for some time now anyway.
3727         
3728         * dom/Document.cpp: Removed an unused header.
3729         * editing/CompositeEditCommand.cpp:
3730         (WebCore::CompositeEditCommand::moveParagraphs): Preserve the style of an empty paragraph, too.
3731         * editing/DeleteSelectionCommand.cpp:
3732         (WebCore::DeleteSelectionCommand::saveTypingStyleState): Removed FIXME.
3733         (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete): 
3734         Removed FIXME.  
3735         If there is a typing style to apply after a delete, apply it to any line break that acts as a paragraph
3736         placeholder, not only one that was inserted by deletion.  This fixes a bug where deleting
3737         <div><b>Bold</b><br></div>, changing the selection and then coming back and typing wouldn't 
3738         produce bold text.  
3739         Don't set the EditCommand's typingStyle, it has been removed (more on that later).
3740         (WebCore::DeleteSelectionCommand::doApply): We don't need to pass calculateTypingStyleAfterDelete
3741         the inserted placeholder because it will find it.
3742         (WebCore::DeleteSelectionCommand::preservesTypingStyle): Normally deletion doesn't preserve the 
3743         typing style that was present before it.  For example, type a character, Bold, then delete the 
3744         character and start typing.  The Bold typing style shouldn't stick around.  We got this right before 
3745         purely by chance. Deletion should preserve a typing style that *it* sets, however.
3746         * editing/DeleteSelectionCommand.h: No longer need to pass calculateTypingStyleAfterDelete
3747         the inserted placeholder.
3748         * editing/EditCommand.cpp:
3749         (WebCore::EditCommand::apply): 
3750         Clearing or not clearing a removed anchor should not be determined by whether or not a command 
3751         preservesTypingStyle().  For example, the deletion that removed an anchor (and stored it), may 
3752         not preserve the typing style, but that doesn't mean that it should then go and clear the removed 
3753         anchor.  All high level commands, and all commands that a TypingCommand spawns, except for
3754         text insertions, which should restore a removed anchor, should clear it.
3755         There is no longer a typing style on EditCommand, removed code that cleared it.  Code that clears the 
3756         *actual* typing style is now in Editor::appliedEditing, just like before.
3757         There is no longer a typing style on EditCommand, removed code to set one.
3758         (WebCore::EditCommand::styleAtPosition): Removed FIXME.
3759         * editing/EditCommand.h: 
3760         Removed code assosiated with m_typingStyle.
3761         Made preservesTypingStyle() public, so that we can call it from Editor::appliedEditing().
3762         * editing/Editor.cpp:
3763         (WebCore::Editor::appliedEditing):
3764         Removed code to preserve the removedAnchor during the call to setSelection, because we no longer
3765         request to clear the typing style with that call.  Also removed the FIXME about this.
3766         Before, a command would set the Frame's typing style by setting its own typingStyle, and then 
3767         letting code here, in appliedEditing pick that up and set it on the Frame.  Now, the command 
3768         itself sets the Frame's typing style.  Deletion is the only command that does this right now.
3769         * editing/IndentOutdentCommand.h:
3770         (WebCore::IndentOutdentCommand::preservesTypingStyle): Added, returns true.
3771         * editing/InsertLineBreakCommand.cpp:
3772         (WebCore::InsertLineBreakCommand::doApply): Removed FIXME.
3773         * editing/InsertListCommand.h:
3774         (WebCore::InsertListCommand::preservesTypingStyle): Added.
3775         * editing/InsertParagraphSeparatorCommand.cpp:
3776         (WebCore::InsertParagraphSeparatorCommand::applyStyleAfterInsertion): Removed FIXME.
3777         * editing/InsertTextCommand.cpp:
3778         (WebCore::InsertTextCommand::input): Removed FIXME.
3779         * editing/ReplaceSelectionCommand.cpp:
3780         (WebCore::ReplaceSelectionCommand::doApply): Removed FIXME and also added one about clearing
3781         the typing style here.  It seems like it's something that could wait until after the command
3782         has been performed, since there is no code between this point and the end of the operation
3783         that queries or uses the typing style.
3784
3785 2008-06-19  Dan Bernstein  <mitz@apple.com>
3786
3787         Reviewed by Alexey Proskuryakov.
3788
3789         - fix crash in CSSStyleDeclaration::copyPropertiesInSet()
3790
3791         Covered by many editing tests
3792
3793         * css/CSSStyleDeclaration.cpp:
3794         (WebCore::CSSStyleDeclaration::copyPropertiesInSet): Re-ordered to avoid
3795         null pointer deref.
3796
3797 2008-06-19  David Hyatt  <hyatt@apple.com>
3798
3799         Fix out of bounds bug in CSSVariablesDeclaration's item() method.
3800
3801         Reviewed by Sam, Darin
3802
3803         * css/CSSVariablesDeclaration.cpp:
3804         (WebCore::CSSVariablesDeclaration::item):
3805         * css/CSSVariablesDeclaration.h:
3806
3807 2008-06-19  John Sullivan  <sullivan@apple.com>
3808
3809         Reviewed by Darin
3810         
3811         Tweak to previous checkin
3812
3813         * page/FrameView.cpp:
3814         (WebCore::FrameView::performPostLayoutTasks):
3815         clear m_firstLayoutCallbackPending before performing callback, to avoid recursion
3816
3817 2008-06-19  John Sullivan  <sullivan@apple.com>
3818
3819         Reviewed by Darin
3820         
3821         - fixed <rdar://problem/6021353> Assertion failure (!root->needsLayout()) after certain steps
3822         
3823         The didFirstLayout callback was called in a place where trouble would ensue if the client
3824         did any work that would cause the layout to be dirtied. Fixed by delaying the callback
3825         until performPostLayoutTasks.
3826
3827         * page/FrameView.cpp:
3828         new m_firstLayoutCallbackPending instance member variable in FrameViewPrivate
3829         (WebCore::FrameViewPrivate::reset):
3830         set m_firstLayoutCallbackPending to false
3831         (WebCore::FrameView::layout):
3832         set m_firstLayoutCallbackPending instead of a local variable; don't do didFirstLayout callback here
3833         (WebCore::FrameView::performPostLayoutTasks):
3834         if m_firstLayoutCallbackPending is set, do didFirstLayout callback here, then clear m_firstLayoutCallbackPending
3835
3836 2008-06-19  David Hyatt  <hyatt@apple.com>
3837
3838         Implement some cleanup of CSS variables based off Darin's review comments.
3839
3840         Reviewed by darin
3841
3842         * css/CSSParser.cpp:
3843         (WebCore::CSSParser::parseVariable):
3844         (WebCore::CSSParser::checkForVariables):
3845         (WebCore::CSSParser::addUnresolvedProperty):
3846         * css/CSSStyleSelector.cpp:
3847         (WebCore::CSSStyleSelector::addMatchedDeclaration):
3848         * css/CSSVariableDependentValue.h:
3849         * css/CSSVariablesRule.cpp:
3850         (WebCore::CSSVariablesRule::CSSVariablesRule):
3851
3852 2008-06-19  John Sullivan  <sullivan@apple.com>
3853
3854         Rubber-stamped by Dan
3855         
3856         Prepended all FrameViewPrivate instance member variables with "m_" (in preparation
3857         for adding a new one in a future patch)
3858
3859         * page/FrameView.cpp:
3860         (WebCore::FrameViewPrivate::FrameViewPrivate):
3861         (WebCore::FrameViewPrivate::reset):
3862         (WebCore::FrameView::~FrameView):
3863         (WebCore::FrameView::resetScrollbars):
3864         (WebCore::FrameView::didFirstLayout):
3865         (WebCore::FrameView::initScrollbars):
3866         (WebCore::FrameView::layoutCount):
3867         (WebCore::FrameView::needsFullRepaint):
3868         (WebCore::FrameView::layoutRoot):
3869         (WebCore::FrameView::layout):
3870         (WebCore::FrameView::scrollTo):
3871         (WebCore::FrameView::useSlowRepaints):
3872         (WebCore::FrameView::setUseSlowRepaints):
3873         (WebCore::FrameView::removeSlowRepaintObject):
3874         (WebCore::FrameView::setScrollbarsMode):
3875         (WebCore::FrameView::setVScrollbarMode):
3876         (WebCore::FrameView::setHScrollbarMode):
3877         (WebCore::FrameView::scheduleRelayout):
3878         (WebCore::FrameView::scheduleRelayoutOfSubtree):
3879         (WebCore::FrameView::layoutPending):
3880         (WebCore::FrameView::needsLayout):
3881         (WebCore::FrameView::unscheduleRelayout):
3882         (WebCore::FrameView::isTransparent):
3883         (WebCore::FrameView::setTransparent):
3884         (WebCore::FrameView::baseBackgroundColor):
3885         (WebCore::FrameView::setBaseBackgroundColor):
3886         (WebCore::FrameView::performPostLayoutTasks):
3887         (WebCore::FrameView::updateOverflowStatus):
3888
3889 2008-06-19  David Hyatt  <hyatt@apple.com>
3890
3891         Add initial support for CSS variables.  Non-dynamic cases should (hopefully) all work.  Things will get
3892         confused if you use the CSS OM to remove variables/inject variables, etc.  In addition no DOM APIs are
3893         exposed yet for the new variable interfaces.
3894
3895         Reviewed by Beth
3896
3897         Added many tests to fast/css/variables/
3898
3899         * WebCore.xcodeproj/project.pbxproj:
3900         * css/CSSFunctionValue.cpp: Added.
3901         (WebCore::CSSFunctionValue::CSSFunctionValue):
3902         (WebCore::CSSFunctionValue::~CSSFunctionValue):
3903         (WebCore::CSSFunctionValue::cssText):
3904         (WebCore::CSSFunctionValue::parserValue):
3905         * css/CSSFunctionValue.h: Added.
3906         (WebCore::CSSFunctionValue::create):
3907         * css/CSSGrammar.y:
3908         * css/CSSMutableStyleDeclaration.cpp:
3909         (WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration):
3910         (WebCore::CSSMutableStyleDeclaration::copy):
3911         * css/CSSMutableStyleDeclaration.h:
3912         (WebCore::CSSMutableStyleDeclaration::create):
3913         (WebCore::CSSMutableStyleDeclaration::hasVariableDependentValue):
3914         * css/CSSParser.cpp:
3915         (WebCore::equal):
3916         (WebCore::equalIgnoringCase):
3917         (WebCore::CSSParser::~CSSParser):
3918         (WebCore::CSSParserString::lower):
3919         (WebCore::CSSParser::document):
3920         (WebCore::CSSParser::validUnit):
3921         (WebCore::unitFromString):
3922         (WebCore::CSSParser::checkForOrphanedUnits):
3923         (WebCore::CSSParser::parseValue):
3924         (WebCore::CSSParser::parseFillShorthand):
3925         (WebCore::CSSParser::parseTransitionShorthand):
3926         (WebCore::CSSParser::parseContent):
3927         (WebCore::CSSParser::parseFillImage):
3928         (WebCore::CSSParser::parseFillPosition):
3929         (WebCore::CSSParser::parseFillSize):
3930         (WebCore::CSSParser::parseFillProperty):
3931         (WebCore::CSSParser::parseTransitionDuration):
3932         (WebCore::CSSParser::parseTransitionRepeatCount):
3933         (WebCore::CSSParser::parseTimingFunctionValue):
3934         (WebCore::CSSParser::parseTransitionTimingFunction):
3935         (WebCore::CSSParser::parseTransitionProperty):
3936         (WebCore::skipCommaInDashboardRegion):
3937         (WebCore::CSSParser::parseDashboardRegions):
3938         (WebCore::CSSParser::parseCounterContent):
3939         (WebCore::CSSParser::parseShape):
3940         (WebCore::CSSParser::parseFont):
3941         (WebCore::CSSParser::parseFontFamily):
3942         (WebCore::CSSParser::parseFontFaceSrc):
3943         (WebCore::CSSParser::parseFontFaceUnicodeRange):
3944         (WebCore::CSSParser::parseColorParameters):
3945         (WebCore::CSSParser::parseHSLParameters):
3946         (WebCore::CSSParser::parseColor):
3947         (WebCore::CSSParser::parseColorFromValue):
3948         (WebCore::ShadowParseContext::commitLength):
3949         (WebCore::CSSParser::parseShadow):
3950         (WebCore::CSSParser::parseReflect):
3951         (WebCore::BorderImageParseContext::commitNumber):
3952         (WebCore::BorderImageParseContext::commitWidth):
3953         (WebCore::BorderImageParseContext::commitBorderImage):
3954         (WebCore::CSSParser::parseBorderImage):
3955         (WebCore::CSSParser::parseCounter):
3956         (WebCore::parseGradientPoint):
3957         (WebCore::parseGradientColorStop):
3958         (WebCore::CSSParser::parseGradient):
3959         (WebCore::CSSParser::parseCanvas):
3960         (WebCore::TransformOperationInfo::TransformOperationInfo):
3961         (WebCore::CSSParser::parseTransform):
3962         (WebCore::CSSParser::lex):
3963         (WebCore::CSSParser::text):
3964         (WebCore::CSSParser::createFloatingValueList):
3965         (WebCore::CSSParser::sinkFloatingValueList):
3966         (WebCore::CSSParser::createFloatingFunction):
3967         (WebCore::CSSParser::sinkFloatingFunction):
3968         (WebCore::CSSParser::sinkFloatingValue):
3969         (WebCore::CSSParser::createFloatingMediaQueryExp):
3970         (WebCore::CSSParser::createCharsetRule):
3971         (WebCore::CSSParser::createImportRule):
3972         (WebCore::CSSParser::createVariablesRule):
3973         (WebCore::CSSParser::addVariable):
3974         (WebCore::CSSParser::clearVariables):
3975         (WebCore::CSSParser::parseVariable):
3976         (WebCore::CSSParser::parsePropertyWithResolvedVariables):
3977         (WebCore::CSSParser::checkForVariables):
3978         (WebCore::CSSParser::addUnresolvedProperty):
3979         (WebCore::cssPropertyID):
3980         (WebCore::cssValueKeywordID):
3981         * css/CSSParser.h:
3982         * css/CSSParserValues.cpp: Added.
3983         (WebCore::CSSParserValueList::~CSSParserValueList):
3984         (WebCore::CSSParserValueList::addValue):
3985         (WebCore::CSSParserValueList::deleteValueAt):
3986         (WebCore::CSSParserValue::createCSSValue):
3987         * css/CSSParserValues.h: Added.
3988         (WebCore::CSSParserString::operator String):
3989         (WebCore::CSSParserString::operator AtomicString):
3990         (WebCore::CSSParserValue::):
3991         (WebCore::CSSParserValueList::CSSParserValueList):
3992         (WebCore::CSSParserValueList::size):
3993         (WebCore::CSSParserValueList::current):
3994         (WebCore::CSSParserValueList::next):
3995         (WebCore::CSSParserValueList::valueAt):
3996         (WebCore::CSSParserValueList::clear):
3997         (WebCore::CSSParserValueList::containsVariables):
3998         (WebCore::CSSParserFunction::~CSSParserFunction):
3999         * css/CSSPrimitiveValue.cpp:
4000         (WebCore::CSSPrimitiveValue::getStringValue):
4001         (WebCore::CSSPrimitiveValue::cssText):
4002         (WebCore::CSSPrimitiveValue::parserValue):
4003         * css/CSSPrimitiveValue.h:
4004         (WebCore::CSSPrimitiveValue::):
4005         (WebCore::CSSPrimitiveValue::setPrimitiveType):
4006         * css/CSSRule.h:
4007         (WebCore::CSSRule::):
4008         * css/CSSRule.idl:
4009         * css/CSSStyleDeclaration.cpp:
4010         (WebCore::CSSStyleDeclaration::copyPropertiesInSet):
4011         * css/CSSStyleSelector.cpp:
4012         (WebCore::CSSStyleSelector::addMatchedDeclaration):
4013         (WebCore::CSSStyleSelector::addVariables):
4014         (WebCore::CSSStyleSelector::resolveVariableDependentValue):
4015         (WebCore::CSSRuleSet::addRulesFromSheet):
4016         (WebCore::CSSStyleSelector::applyDeclarations):
4017         * css/CSSStyleSelector.h:
4018         * css/CSSValue.h:
4019         (WebCore::CSSValue::isVariableDependentValue):
4020         (WebCore::CSSValue::parserValue):
4021         * css/CSSValueList.cpp:
4022         (WebCore::CSSValueList::CSSValueList):
4023         (WebCore::CSSValueList::createParserValueList):
4024         * css/CSSValueList.h:
4025         (WebCore::CSSValueList::createFromParserValueList):
4026         * css/CSSVariableDependentValue.cpp: Added.
4027         (WebCore::CSSVariableDependentValue::CSSVariableDependentValue):
4028         (WebCore::CSSVariableDependentValue::~CSSVariableDependentValue):
4029         (WebCore::CSSVariableDependentValue::cssText):
4030         * css/CSSVariableDependentValue.h: Added.
4031         (WebCore::CSSVariableDependentValue::create):
4032         (WebCore::CSSVariableDependentValue::isVariableDependentValue):
4033         (WebCore::CSSVariableDependentValue::valueList):
4034         * css/CSSVariablesDeclaration.cpp: Added.
4035         (WebCore::CSSVariablesDeclaration::CSSVariablesDeclaration):
4036         (WebCore::CSSVariablesDeclaration::~CSSVariablesDeclaration):
4037         (WebCore::CSSVariablesDeclaration::getVariableValue):
4038         (WebCore::CSSVariablesDeclaration::removeVariable):
4039         (WebCore::CSSVariablesDeclaration::setVariable):
4040         (WebCore::CSSVariablesDeclaration::addParsedVariable):
4041         (WebCore::CSSVariablesDeclaration::getParsedVariable):
4042         (WebCore::CSSVariablesDeclaration::length):
4043         (WebCore::CSSVariablesDeclaration::item):
4044         (WebCore::CSSVariablesDeclaration::parentRule):
4045         (WebCore::CSSVariablesDeclaration::cssText):
4046         * css/CSSVariablesDeclaration.h: Added.
4047         (WebCore::CSSVariablesDeclaration::create):
4048         * css/CSSVariablesRule.cpp: Added.
4049         (WebCore::CSSVariablesRule::CSSVariablesRule):
4050         (WebCore::CSSVariablesRule::~CSSVariablesRule):
4051         (WebCore::CSSVariablesRule::cssText):
4052         * css/CSSVariablesRule.h: Added.
4053         (WebCore::CSSVariablesRule::media):
4054         (WebCore::CSSVariablesRule::variables):
4055         (WebCore::CSSVariablesRule::type):
4056         (WebCore::CSSVariablesRule::isVariablesRule):
4057         (WebCore::CSSVariablesRule::setDeclaration):
4058         * css/MediaQueryExp.cpp:
4059         (WebCore::MediaQueryExp::MediaQueryExp):
4060         * css/MediaQueryExp.h:
4061         * css/SVGCSSParser.cpp:
4062         (WebCore::CSSParser::parseSVGValue):
4063         (WebCore::CSSParser::parseSVGStrokeDasharray):
4064         * css/StyleBase.h:
4065         (WebCore::StyleBase::isVariablesRule):
4066         * css/tokenizer.flex:
4067
4068 2008-06-19  Julien Chaffraix  <jchaffraix@webkit.org>
4069
4070         Reviewed by Darin.
4071
4072         Bug 19529 : Empty clients need to be refactored
4073         https://bugs.webkit.org/show_bug.cgi?id=19529
4074
4075         - SVGImageEmptyClients' refactoring in order to be able to use them for other
4076         elements.
4077
4078         - Trimmed empty spaces that were pointed out by git.
4079
4080         * WebCore.xcodeproj/project.pbxproj:
4081         * loader/EmptyClients.h: Copied from WebCore/svg/graphics/SVGImageEmptyClients.h.
4082
4083         (WebCore::EmptyChromeClient::~EmptyChromeClient):
4084         (WebCore::EmptyFrameLoaderClient::~EmptyFrameLoaderClient):
4085         (WebCore::EmptyEditorClient::~EmptyEditorClient):
4086         (WebCore::EmptyEditorClient::smartInsertDeleteEnabled):
4087         (WebCore::EmptyContextMenuClient::~EmptyContextMenuClient):
4088         (WebCore::EmptyDragClient::~EmptyDragClient):
4089         (WebCore::EmptyDragClient::createDragImageForLink):
4090         (WebCore::EmptyInspectorClient::~EmptyInspectorClient):
4091         Renamed SVGImageEmpty*Client classes to Empty*Client.
4092
4093         * svg/graphics/SVGImage.cpp:
4094         (WebCore::SVGImage::dataChanged):
4095         * svg/graphics/SVGImageEmptyClients.h: Removed.
4096
4097 2008-06-19  Dan Bernstein  <mitz@apple.com>
4098
4099         Reviewed by Darin Adler.
4100
4101         - fix <rdar://problem/6008098> REGRESSION: Crash at FontFallbackList::fontDataAt()
4102
4103         Test: fast/css/font-face-multiple-families.html
4104
4105         Made changes to reflect the fact that the relationship between
4106         CSSFontFace and CSSSegmentedFontFace is in fact many-to-many.
4107
4108         * css/CSSFontFace.cpp:
4109         (WebCore::CSSFontFace::addedToSegmentedFontFace): Added.
4110         (WebCore::CSSFontFace::removedFromSegmentedFontFace): Added.
4111         (WebCore::CSSFontFace::fontLoaded): Changed to notify all segmented font
4112         faces that include this font face.
4113         (WebCore::CSSFontFace::getFontData): Updated to get the font selector
4114         from one of the segmented font faces.
4115         * css/CSSFontFace.h:
4116         (WebCore::CSSFontFace::CSSFontFace):
4117         * css/CSSFontSelector.cpp:
4118         (WebCore::CSSFontSelector::addFontFaceRule): Fixed the direct cause of
4119         the crash, namely releasing the font face when adding it to the first
4120         family that uses it, making it impossible to add it to the second and
4121         onwards families.
4122         * css/CSSSegmentedFontFace.cpp:
4123         (WebCore::CSSSegmentedFontFace::~CSSSegmentedFontFace): Added code to
4124         call CSSFontFace::removedFromSegmentedFontFace().
4125         (WebCore::CSSSegmentedFontFace::overlayRange): Added code to call
4126         CSSFontFace::{addedTo, removedFrom}SegmentedFontFace().
4127
4128 2008-06-19  Alexey Proskuryakov  <ap@webkit.org>
4129
4130         Qt build fix.
4131
4132         * bridge/qt/qt_runtime.h: Include completion.h.
4133
4134 2008-06-17  Alexey Proskuryakov  <ap@webkit.org>
4135
4136         Reviewed by Darin.
4137
4138         Prepare JavaScript heap for being per-thread.
4139
4140         * ForwardingHeaders/kjs/JSGlobalData.h: Added.
4141         * bindings/js/GCController.cpp:
4142         (WebCore::collect):
4143         (WebCore::GCController::gcTimerFired):
4144         (WebCore::GCController::garbageCollectNow):
4145         * bindings/js/JSAudioConstructor.cpp:
4146         (WebCore::JSAudioConstructor::JSAudioConstructor):
4147         * bindings/js/JSCSSRuleCustom.cpp:
4148         (WebCore::toJS):
4149         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
4150         (WebCore::JSCSSStyleDeclaration::nameGetter):
4151         * bindings/js/JSCSSValueCustom.cpp:
4152         (WebCore::toJS):
4153         * bindings/js/JSCanvasPixelArrayCustom.cpp:
4154         (WebCore::JSCanvasPixelArray::indexGetter):
4155         (WebCore::toJS):
4156         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
4157         (WebCore::toJS):
4158         * bindings/js/JSClipboardCustom.cpp:
4159         (WebCore::JSClipboard::types):
4160         (WebCore::JSClipboard::getData):
4161         * bindings/js/JSCustomXPathNSResolver.cpp:
4162         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
4163         * bindings/js/JSDOMApplicationCacheCustom.cpp:
4164         (WebCore::JSDOMApplicationCache::addEventListener):
4165         (WebCore::JSDOMApplicationCache::removeEventListener):
4166         (WebCore::JSDOMApplicationCache::setOnchecking):
4167         (WebCore::JSDOMApplicationCache::setOnerror):
4168         (WebCore::JSDOMApplicationCache::setOnnoupdate):
4169         (WebCore::JSDOMApplicationCache::setOndownloading):
4170         (WebCore::JSDOMApplicationCache::setOnprogress):
4171         (WebCore::JSDOMApplicationCache::setOnupdateready):
4172         (WebCore::JSDOMApplicationCache::setOncached):
4173         * bindings/js/JSDOMBinding.cpp:
4174         (WebCore::jsStringOrNull):
4175         (WebCore::jsOwnedStringOrNull):
4176         (WebCore::jsStringOrUndefined):
4177         (WebCore::jsStringOrFalse):
4178         (WebCore::nonCachingStaticFunctionGetter):
4179         (WebCore::objectToStringFunctionGetter):
4180         * bindings/js/JSDOMBinding.h:
4181         (WebCore::DOMObject::DOMObject):
4182         (WebCore::cacheDOMObject):
4183         (WebCore::cacheSVGDOMObject):
4184         * bindings/js/JSDOMWindowBase.cpp:
4185         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
4186         (WebCore::JSDOMWindowBase::getValueProperty):
4187         (WebCore::JSDOMWindowBase::setListener):
4188         (WebCore::JSDOMWindowBase::findOrCreateJSEventListener):
4189         (WebCore::JSDOMWindowBase::findJSUnprotectedEventListener):
4190         (WebCore::JSDOM