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