17787f4d65765e3d011cec6621e7ba0ce2c24060
[WebKit-https.git] / WebCore / ChangeLog
1 2009-04-21  Xan Lopez  <xlopez@igalia.com>
2
3         Reviewed by Gustavo Noronha.
4
5         https://bugs.webkit.org/show_bug.cgi?id=21546
6         [GTK] ATK accessibility enhancements
7
8         Only implement AtkAction interface if we actually have an action.
9
10         * page/gtk/AccessibilityObjectWrapperAtk.cpp:
11
12 2009-04-20  Alexey Proskuryakov  <ap@webkit.org>
13
14         Reviewed by Darin Adler.
15
16         https://bugs.webkit.org/show_bug.cgi?id=25290
17         REGRESSION(r41732): Crash when constructing XMLHttpRequest in a detached document
18
19         Test: fast/dom/xmlhttprequest-constructor-in-detached-document.html
20
21         * bindings/js/JSAudioConstructor.cpp:
22         (WebCore::JSAudioConstructor::JSAudioConstructor):
23         * bindings/js/JSAudioConstructor.h:
24         * bindings/js/JSDOMGlobalObject.h:
25         (WebCore::getDOMConstructor):
26         * bindings/js/JSImageConstructor.cpp:
27         (WebCore::JSImageConstructor::JSImageConstructor):
28         * bindings/js/JSImageConstructor.h:
29         * bindings/js/JSMessageChannelConstructor.cpp:
30         (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor):
31         * bindings/js/JSMessageChannelConstructor.h:
32         * bindings/js/JSOptionConstructor.cpp:
33         (WebCore::JSOptionConstructor::JSOptionConstructor):
34         * bindings/js/JSOptionConstructor.h:
35         * bindings/js/JSXMLHttpRequestConstructor.cpp:
36         (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
37         * bindings/js/JSXMLHttpRequestConstructor.h:
38         Avoid accessing JSDOMGlobalObject via ScriptExecutionContext, since it may not
39         work during frame teardown.
40
41 2009-04-20  Geoffrey Garen  <ggaren@apple.com>
42
43         Rubber stamped by Darin Adler and Sam Weinig.
44
45         Renamed "*InlineEventListener*" => "*AttributeEventListener*", and
46         "isInline" => "isAttribute".
47
48         * bindings/js/JSDOMGlobalObject.cpp:
49         (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
50         * bindings/js/JSEventListener.cpp:
51         (WebCore::JSEventListener::JSEventListener):
52         (WebCore::JSEventListener::~JSEventListener):
53         (WebCore::JSEventListener::handleEvent):
54         (WebCore::JSEventListener::virtualisAttribute):
55         * bindings/js/JSEventListener.h:
56         (WebCore::JSEventListener::create):
57         (WebCore::JSEventListener::isAttribute):
58         * bindings/js/JSLazyEventListener.cpp:
59         (WebCore::createAttributeEventListener):
60         * bindings/js/JSLazyEventListener.h:
61         * bindings/scripts/CodeGeneratorJS.pm:
62         * dom/Element.cpp:
63         (WebCore::Element::setWindowAttributeEventListener):
64         * dom/Element.h:
65         * dom/EventListener.h:
66         (WebCore::EventListener::isAttribute):
67         (WebCore::EventListener::virtualisAttribute):
68         * dom/Node.cpp:
69         (WebCore::Node::clearAttributeEventListener):
70         (WebCore::Node::setAttributeEventListener):
71         (WebCore::Node::getAttributeEventListener):
72         (WebCore::Node::onabort):
73         (WebCore::Node::setOnabort):
74         (WebCore::Node::onblur):
75         (WebCore::Node::setOnblur):
76         (WebCore::Node::onchange):
77         (WebCore::Node::setOnchange):
78         (WebCore::Node::onclick):
79         (WebCore::Node::setOnclick):
80         (WebCore::Node::oncontextmenu):
81         (WebCore::Node::setOncontextmenu):
82         (WebCore::Node::ondblclick):
83         (WebCore::Node::setOndblclick):
84         (WebCore::Node::onerror):
85         (WebCore::Node::setOnerror):
86         (WebCore::Node::onfocus):
87         (WebCore::Node::setOnfocus):
88         (WebCore::Node::oninput):
89         (WebCore::Node::setOninput):
90         (WebCore::Node::onkeydown):
91         (WebCore::Node::setOnkeydown):
92         (WebCore::Node::onkeypress):
93         (WebCore::Node::setOnkeypress):
94         (WebCore::Node::onkeyup):
95         (WebCore::Node::setOnkeyup):
96         (WebCore::Node::onload):
97         (WebCore::Node::setOnload):
98         (WebCore::Node::onmousedown):
99         (WebCore::Node::setOnmousedown):
100         (WebCore::Node::onmousemove):
101         (WebCore::Node::setOnmousemove):
102         (WebCore::Node::onmouseout):
103         (WebCore::Node::setOnmouseout):
104         (WebCore::Node::onmouseover):
105         (WebCore::Node::setOnmouseover):
106         (WebCore::Node::onmouseup):
107         (WebCore::Node::setOnmouseup):
108         (WebCore::Node::onmousewheel):
109         (WebCore::Node::setOnmousewheel):
110         (WebCore::Node::onbeforecut):
111         (WebCore::Node::setOnbeforecut):
112         (WebCore::Node::oncut):
113         (WebCore::Node::setOncut):
114         (WebCore::Node::onbeforecopy):
115         (WebCore::Node::setOnbeforecopy):
116         (WebCore::Node::oncopy):
117         (WebCore::Node::setOncopy):
118         (WebCore::Node::onbeforepaste):
119         (WebCore::Node::setOnbeforepaste):
120         (WebCore::Node::onpaste):
121         (WebCore::Node::setOnpaste):
122         (WebCore::Node::ondragenter):
123         (WebCore::Node::setOndragenter):
124         (WebCore::Node::ondragover):
125         (WebCore::Node::setOndragover):
126         (WebCore::Node::ondragleave):
127         (WebCore::Node::setOndragleave):
128         (WebCore::Node::ondrop):
129         (WebCore::Node::setOndrop):
130         (WebCore::Node::ondragstart):
131         (WebCore::Node::setOndragstart):
132         (WebCore::Node::ondrag):
133         (WebCore::Node::setOndrag):
134         (WebCore::Node::ondragend):
135         (WebCore::Node::setOndragend):
136         (WebCore::Node::onreset):
137         (WebCore::Node::setOnreset):
138         (WebCore::Node::onresize):
139         (WebCore::Node::setOnresize):
140         (WebCore::Node::onscroll):
141         (WebCore::Node::setOnscroll):
142         (WebCore::Node::onsearch):
143         (WebCore::Node::setOnsearch):
144         (WebCore::Node::onselect):
145         (WebCore::Node::setOnselect):
146         (WebCore::Node::onselectstart):
147         (WebCore::Node::setOnselectstart):
148         (WebCore::Node::onsubmit):
149         (WebCore::Node::setOnsubmit):
150         (WebCore::Node::onunload):
151         (WebCore::Node::setOnunload):
152         * dom/Node.h:
153         * editing/ReplaceSelectionCommand.cpp:
154         (WebCore::ReplacementFragment::ReplacementFragment):
155         * html/HTMLBodyElement.cpp:
156         (WebCore::HTMLBodyElement::parseMappedAttribute):
157         * html/HTMLButtonElement.cpp:
158         (WebCore::HTMLButtonElement::parseMappedAttribute):
159         * html/HTMLElement.cpp:
160         (WebCore::HTMLElement::parseMappedAttribute):
161         * html/HTMLFormElement.cpp:
162         (WebCore::HTMLFormElement::parseMappedAttribute):
163         * html/HTMLFrameElementBase.cpp:
164         (WebCore::HTMLFrameElementBase::parseMappedAttribute):
165         * html/HTMLFrameSetElement.cpp:
166         (WebCore::HTMLFrameSetElement::parseMappedAttribute):
167         * html/HTMLImageElement.cpp:
168         (WebCore::HTMLImageElement::parseMappedAttribute):
169         * html/HTMLInputElement.cpp:
170         (WebCore::HTMLInputElement::parseMappedAttribute):
171         * html/HTMLObjectElement.cpp:
172         (WebCore::HTMLObjectElement::parseMappedAttribute):
173         * html/HTMLScriptElement.cpp:
174         (WebCore::HTMLScriptElement::parseMappedAttribute):
175         * html/HTMLSelectElement.cpp:
176         (WebCore::HTMLSelectElement::parseMappedAttribute):
177         * html/HTMLTextAreaElement.cpp:
178         (WebCore::HTMLTextAreaElement::parseMappedAttribute):
179         * page/AccessibilityRenderObject.cpp:
180         (WebCore::AccessibilityRenderObject::mouseButtonListener):
181         * page/DOMWindow.cpp:
182         (WebCore::DOMWindow::setAttributeEventListener):
183         (WebCore::DOMWindow::clearAttributeEventListener):
184         (WebCore::DOMWindow::getAttributeEventListener):
185         (WebCore::DOMWindow::onabort):
186         (WebCore::DOMWindow::setOnabort):
187         (WebCore::DOMWindow::onblur):
188         (WebCore::DOMWindow::setOnblur):
189         (WebCore::DOMWindow::onchange):
190         (WebCore::DOMWindow::setOnchange):
191         (WebCore::DOMWindow::onclick):
192         (WebCore::DOMWindow::setOnclick):
193         (WebCore::DOMWindow::ondblclick):
194         (WebCore::DOMWindow::setOndblclick):
195         (WebCore::DOMWindow::onerror):
196         (WebCore::DOMWindow::setOnerror):
197         (WebCore::DOMWindow::onfocus):
198         (WebCore::DOMWindow::setOnfocus):
199         (WebCore::DOMWindow::onkeydown):
200         (WebCore::DOMWindow::setOnkeydown):
201         (WebCore::DOMWindow::onkeypress):
202         (WebCore::DOMWindow::setOnkeypress):
203         (WebCore::DOMWindow::onkeyup):
204         (WebCore::DOMWindow::setOnkeyup):
205         (WebCore::DOMWindow::onload):
206         (WebCore::DOMWindow::setOnload):
207         (WebCore::DOMWindow::onmousedown):
208         (WebCore::DOMWindow::setOnmousedown):
209         (WebCore::DOMWindow::onmousemove):
210         (WebCore::DOMWindow::setOnmousemove):
211         (WebCore::DOMWindow::onmouseout):
212         (WebCore::DOMWindow::setOnmouseout):
213         (WebCore::DOMWindow::onmouseover):
214         (WebCore::DOMWindow::setOnmouseover):
215         (WebCore::DOMWindow::onmouseup):
216         (WebCore::DOMWindow::setOnmouseup):
217         (WebCore::DOMWindow::onmousewheel):
218         (WebCore::DOMWindow::setOnmousewheel):
219         (WebCore::DOMWindow::onreset):
220         (WebCore::DOMWindow::setOnreset):
221         (WebCore::DOMWindow::onresize):
222         (WebCore::DOMWindow::setOnresize):
223         (WebCore::DOMWindow::onscroll):
224         (WebCore::DOMWindow::setOnscroll):
225         (WebCore::DOMWindow::onsearch):
226         (WebCore::DOMWindow::setOnsearch):
227         (WebCore::DOMWindow::onselect):
228         (WebCore::DOMWindow::setOnselect):
229         (WebCore::DOMWindow::onsubmit):
230         (WebCore::DOMWindow::setOnsubmit):
231         (WebCore::DOMWindow::onunload):
232         (WebCore::DOMWindow::setOnunload):
233         (WebCore::DOMWindow::onbeforeunload):
234         (WebCore::DOMWindow::setOnbeforeunload):
235         (WebCore::DOMWindow::onwebkitanimationstart):
236         (WebCore::DOMWindow::setOnwebkitanimationstart):
237         (WebCore::DOMWindow::onwebkitanimationiteration):
238         (WebCore::DOMWindow::setOnwebkitanimationiteration):
239         (WebCore::DOMWindow::onwebkitanimationend):
240         (WebCore::DOMWindow::setOnwebkitanimationend):
241         (WebCore::DOMWindow::onwebkittransitionend):
242         (WebCore::DOMWindow::setOnwebkittransitionend):
243         * page/DOMWindow.h:
244         * svg/SVGElement.cpp:
245         (WebCore::SVGElement::parseMappedAttribute):
246         * svg/SVGElementInstance.cpp:
247         (WebCore::SVGElementInstance::onabort):
248         (WebCore::SVGElementInstance::setOnabort):
249         (WebCore::SVGElementInstance::onblur):
250         (WebCore::SVGElementInstance::setOnblur):
251         (WebCore::SVGElementInstance::onchange):
252         (WebCore::SVGElementInstance::setOnchange):
253         (WebCore::SVGElementInstance::onclick):
254         (WebCore::SVGElementInstance::setOnclick):
255         (WebCore::SVGElementInstance::oncontextmenu):
256         (WebCore::SVGElementInstance::setOncontextmenu):
257         (WebCore::SVGElementInstance::ondblclick):
258         (WebCore::SVGElementInstance::setOndblclick):
259         (WebCore::SVGElementInstance::onerror):
260         (WebCore::SVGElementInstance::setOnerror):
261         (WebCore::SVGElementInstance::onfocus):
262         (WebCore::SVGElementInstance::setOnfocus):
263         (WebCore::SVGElementInstance::oninput):
264         (WebCore::SVGElementInstance::setOninput):
265         (WebCore::SVGElementInstance::onkeydown):
266         (WebCore::SVGElementInstance::setOnkeydown):
267         (WebCore::SVGElementInstance::onkeypress):
268         (WebCore::SVGElementInstance::setOnkeypress):
269         (WebCore::SVGElementInstance::onkeyup):
270         (WebCore::SVGElementInstance::setOnkeyup):
271         (WebCore::SVGElementInstance::onload):
272         (WebCore::SVGElementInstance::setOnload):
273         (WebCore::SVGElementInstance::onmousedown):
274         (WebCore::SVGElementInstance::setOnmousedown):
275         (WebCore::SVGElementInstance::onmousemove):
276         (WebCore::SVGElementInstance::setOnmousemove):
277         (WebCore::SVGElementInstance::onmouseout):
278         (WebCore::SVGElementInstance::setOnmouseout):
279         (WebCore::SVGElementInstance::onmouseover):
280         (WebCore::SVGElementInstance::setOnmouseover):
281         (WebCore::SVGElementInstance::onmouseup):
282         (WebCore::SVGElementInstance::setOnmouseup):
283         (WebCore::SVGElementInstance::onmousewheel):
284         (WebCore::SVGElementInstance::setOnmousewheel):
285         (WebCore::SVGElementInstance::onbeforecut):
286         (WebCore::SVGElementInstance::setOnbeforecut):
287         (WebCore::SVGElementInstance::oncut):
288         (WebCore::SVGElementInstance::setOncut):
289         (WebCore::SVGElementInstance::onbeforecopy):
290         (WebCore::SVGElementInstance::setOnbeforecopy):
291         (WebCore::SVGElementInstance::oncopy):
292         (WebCore::SVGElementInstance::setOncopy):
293         (WebCore::SVGElementInstance::onbeforepaste):
294         (WebCore::SVGElementInstance::setOnbeforepaste):
295         (WebCore::SVGElementInstance::onpaste):
296         (WebCore::SVGElementInstance::setOnpaste):
297         (WebCore::SVGElementInstance::ondragenter):
298         (WebCore::SVGElementInstance::setOndragenter):
299         (WebCore::SVGElementInstance::ondragover):
300         (WebCore::SVGElementInstance::setOndragover):
301         (WebCore::SVGElementInstance::ondragleave):
302         (WebCore::SVGElementInstance::setOndragleave):
303         (WebCore::SVGElementInstance::ondrop):
304         (WebCore::SVGElementInstance::setOndrop):
305         (WebCore::SVGElementInstance::ondragstart):
306         (WebCore::SVGElementInstance::setOndragstart):
307         (WebCore::SVGElementInstance::ondrag):
308         (WebCore::SVGElementInstance::setOndrag):
309         (WebCore::SVGElementInstance::ondragend):
310         (WebCore::SVGElementInstance::setOndragend):
311         (WebCore::SVGElementInstance::onreset):
312         (WebCore::SVGElementInstance::setOnreset):
313         (WebCore::SVGElementInstance::onresize):
314         (WebCore::SVGElementInstance::setOnresize):
315         (WebCore::SVGElementInstance::onscroll):
316         (WebCore::SVGElementInstance::setOnscroll):
317         (WebCore::SVGElementInstance::onsearch):
318         (WebCore::SVGElementInstance::setOnsearch):
319         (WebCore::SVGElementInstance::onselect):
320         (WebCore::SVGElementInstance::setOnselect):
321         (WebCore::SVGElementInstance::onselectstart):
322         (WebCore::SVGElementInstance::setOnselectstart):
323         (WebCore::SVGElementInstance::onsubmit):
324         (WebCore::SVGElementInstance::setOnsubmit):
325         (WebCore::SVGElementInstance::onunload):
326         (WebCore::SVGElementInstance::setOnunload):
327         * svg/SVGSVGElement.cpp:
328         (WebCore::SVGSVGElement::parseMappedAttribute):
329
330 2009-04-20  Geoffrey Garen  <ggaren@apple.com>
331
332         Approved by Mark Rowe, Cameron Zwarich, Oliver Hunt, and Ojan Vafai.
333         
334         Used svn merge to roll out revisions 42678, 42690, 42694, 42697 because
335         they broke the Tiger and Windows buildbots.
336
337         * css/html4.css:
338         * css/themeWin.css:
339         * platform/graphics/SimpleFontData.cpp:
340         * platform/graphics/SimpleFontData.h:
341         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
342         * platform/graphics/chromium/SimpleFontDataLinux.cpp:
343         * platform/graphics/gtk/SimpleFontDataGtk.cpp:
344         * platform/graphics/gtk/SimpleFontDataPango.cpp:
345         * platform/graphics/mac/SimpleFontDataMac.mm:
346         * platform/graphics/qt/SimpleFontDataQt.cpp:
347         * platform/graphics/win/SimpleFontDataCGWin.cpp:
348         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
349         * platform/graphics/win/SimpleFontDataWin.cpp:
350         * platform/graphics/wx/SimpleFontDataWx.cpp:
351         * rendering/RenderTextControl.cpp:
352         * rendering/RenderTextControlMultiLine.cpp:
353         * rendering/RenderTextControlSingleLine.cpp:
354
355 2009-04-20  Geoffrey Garen  <ggaren@apple.com>
356
357         Reviewed by Adam Roben.
358
359         One last loose end, discovered using COLLECT_ON_EVERY_ALLOCATION, for
360         https://bugs.webkit.org/show_bug.cgi?id=21260
361         Unbounded memory growth when churning elements with anonymous event handler functions
362         
363         * bindings/js/JSSVGElementInstanceCustom.cpp:
364         (WebCore::JSSVGElementInstance::mark): Don't ASSERT that an ElementInstance's
365         correspondingElement has a JS wrapper. If a GC falls exactly between the
366         allocation of the ElementInstance wrapper and the correspondingElement
367         wrapper, the correspondingElement won't have a wrapper at the time we
368         mark the ElementInstance's wrapper.
369
370 2009-04-20  Brady Eidson  <beidson@apple.com>
371
372         Rubberstamped by Mark Rowe
373
374         Clean builds are broken on case-sensitive filesystems.  Let's fix, shall we?
375
376         * platform/graphics/SimpleFontData.cpp: Remove "String.h" include.  Ojan probably intended to include
377           "PlatformString.h" which was unnecessary because it is pulled in through other headers.  This wasn't a 
378           build failure on case-insensitive file systems because those systems would find the system <string.h>, averting
379           the warning.
380
381 2009-04-20  Geoffrey Garen  <ggaren@apple.com>
382
383         Reviewed by Darin Adler.
384
385         Last patch for https://bugs.webkit.org/show_bug.cgi?id=21260
386         Unbounded memory growth when churning elements with anonymous event handler functions
387         
388         Converted "lazy" event listeners to be unprotected, just like all the others.
389
390         * bindings/js/JSEventListener.cpp:
391         (WebCore::JSEventListener::JSEventListener):
392         (WebCore::JSEventListener::~JSEventListener):
393         (WebCore::JSEventListener::jsFunction):
394         (WebCore::JSEventListener::markJSFunction):
395         (WebCore::JSEventListener::handleEvent):
396         (WebCore::JSEventListener::virtualIsInline):
397         * bindings/js/JSEventListener.h:
398         (WebCore::JSEventListener::isInline): Merged JSAbstractEventListener
399         into JSEventListener. Now that the only difference between JSEventListener
400         and JSLazyEventListener is that JSLazyEventListener compiles lazily,
401         there's no need for an abstract base class.
402
403         * bindings/js/JSLazyEventListener.cpp: Converted JSLazyEventListener to
404         inherit from JSEventListener and match its un-GC-protected behavior.
405         (WebCore::JSLazyEventListener::JSLazyEventListener): ditto
406         (WebCore::JSLazyEventListener::parseCode): ditto
407         (WebCore::createInlineEventListener): When creating a lazy event listener,
408         ensure that the related node has a JS wrapper to mark the listener. Since
409         the parser makes these listeners, it's possible that no JS reference has
410         been made to the node yet.
411         * bindings/js/JSLazyEventListener.h: ditto
412
413         * dom/EventListener.h:
414         (WebCore::EventListener::clearJSFunction): Removed an usused function.
415
416 2009-04-20  Justin Garcia  <justin.garcia@apple.com>
417
418         Reviewed by Dan Bernstein.
419
420         https://bugs.webkit.org/show_bug.cgi?id=25299
421         Don't bound caret to root line box if it is still inside its containing block
422         
423         Can't yet write tests for behavior of non-standard caret widths.
424
425         * rendering/RenderText.cpp:
426         (WebCore::RenderText::localCaretRect):
427
428 2009-04-20  Steve Falkenburg  <sfalken@apple.com>
429
430         Separate JavaScriptCore.dll from WebKit.dll.
431         Slight performance improvement or no change on benchmarks.
432         
433         Allows us to break a circular dependency between CFNetwork and WebKit on Windows,
434         and simplifies standalone JavaScriptCore builds.
435
436         Reviewed by Oliver Hunt.
437
438         * config.h: Specify __declspec(dllexport/dllimport) appropriately when exporting data.
439
440 2009-04-20  Anders Carlsson  <andersca@apple.com>
441
442         Reviewed by Sam Weinig.
443
444         <rdar://problem/6722845> In the Cocoa event model, NPWindow's window field should be null
445
446         * bridge/npapi.h:
447         (_NPCocoaEvent::):
448         Add a CGContextRef member to the draw struct. Add an NPCoordinateSpace enum.
449         
450         * plugins/npfunctions.h:
451         Add a prototype for NPN_ConvertPoint.
452
453 2009-04-10  Ojan Vafai  <ojan@chromium.org>
454
455         Reviewed by Dan Bernstein.
456
457         Make textarea and text input metrics more closely match IEs.
458         https://bugs.webkit.org/show_bug.cgi?id=15312
459
460         This involves:
461         -set text input width to size*avgCharWidth + maxCharWidth - avgCharWidth
462         -set textarea width to cols*avgCharWidth
463         -Make default CSS match IEs
464         -Correctly initializing m_avgCharWidth and m_maxCharWidth for each platform and SVG.
465
466         Those values for textarea and inputs were derived by doing a ton of manual
467         testing of IE's width values for various textareas and fonts.
468
469         To get the average and max character width of a font, we do the following
470         for each platform:
471         -Win: TextMetrics expose avgCharWidth and maxCharWidth
472         -SVG: avgCharWidth = width of an '0', fallback on width of a space glyph, then m_xHeight
473             maxCharWidth = width of a 'W' for roman fonts, fallback on m_ascent
474         -Linux: avgCharWidth = width of an '0', fallback on m_xHeight
475             maxCharWidth = max of avgCharWidth and m_ascent
476         -Mac: look in the OS/2 table for avgCharWidth and grab the maxCharWidth off the font.
477             If either one is not there, then calculate the value using the Linux approach.
478
479         Linux ports could probably dig into the OS/2 table as well, but I'll leave
480         that up to them to implement.
481
482         Tests: fast/forms/text-control-intrinsic-widths.html
483                fast/forms/textarea-metrics.html
484                svg/custom/svg-fonts-in-text-controls.html
485
486         * css/html4.css:
487         * css/themeWin.css:
488         * platform/graphics/SimpleFontData.cpp:
489         (WebCore::SimpleFontData::SimpleFontData):
490         (WebCore::SimpleFontData::initCharWidths):
491         * platform/graphics/SimpleFontData.h:
492         (WebCore::SimpleFontData::maxCharWidth):
493         (WebCore::SimpleFontData::avgCharWidth):
494         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
495         (WebCore::SimpleFontData::platformCharWidthInit):
496         * platform/graphics/chromium/SimpleFontDataLinux.cpp:
497         (WebCore::SimpleFontData::platformCharWidthInit):
498         * platform/graphics/gtk/SimpleFontDataGtk.cpp:
499         (WebCore::SimpleFontData::platformCharWidthInit):
500         * platform/graphics/gtk/SimpleFontDataPango.cpp:
501         (WebCore::SimpleFontData::platformCharWidthInit):
502         * platform/graphics/mac/SimpleFontDataMac.mm:
503         (WebCore::SimpleFontData::platformCharWidthInit):
504         * platform/graphics/qt/SimpleFontDataQt.cpp:
505         (WebCore::SimpleFontData::platformCharWidthInit):
506         * platform/graphics/win/SimpleFontDataCGWin.cpp:
507         (WebCore::SimpleFontData::platformCharWidthInit):
508         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
509         (WebCore::SimpleFontData::platformInit):
510         (WebCore::SimpleFontData::platformCharWidthInit):
511         * platform/graphics/win/SimpleFontDataWin.cpp:
512         (WebCore::SimpleFontData::initGDIFont):
513         * platform/graphics/wx/SimpleFontDataWx.cpp:
514         (WebCore::SimpleFontData::platformCharWidthInit):
515         * rendering/RenderTextControl.cpp:
516         (WebCore::RenderTextControl::calcPrefWidths):
517         * rendering/RenderTextControlMultiLine.cpp:
518         (WebCore::RenderTextControlMultiLine::createInnerTextStyle):
519         * rendering/RenderTextControlSingleLine.cpp:
520         (WebCore::RenderTextControlSingleLine::preferredContentWidth):
521
522 2009-04-17  Eric Seidel  <eric@webkit.org>
523
524         Reviewed by Simon Fraser.
525
526         Remove m_absoluteBounds hack from SVG renderers and move outlineBoundsForRepaint into RenderSVGModelObject
527         https://bugs.webkit.org/show_bug.cgi?id=25276
528
529         This also exposed a buggy paint check in RenderSVGContainer::layout()
530         we should repaint if we are self painting OR if our kids changed, not AND.
531
532         Writing real outlineBoundsForRepaint required writing a mapLocalToContainer() function
533
534         No functional changes, thus no tests.
535
536         * rendering/RenderPath.cpp:
537         (WebCore::RenderPath::localToParentTransform):
538         (WebCore::RenderPath::layout):
539         * rendering/RenderPath.h:
540         * rendering/RenderSVGContainer.cpp:
541         (WebCore::RenderSVGContainer::layout):
542         * rendering/RenderSVGContainer.h:
543         * rendering/RenderSVGModelObject.cpp:
544         (WebCore::RenderSVGModelObject::mapLocalToContainer):
545         (WebCore::RenderSVGModelObject::outlineBoundsForRepaint):
546         * rendering/RenderSVGModelObject.h:
547         * rendering/RenderSVGRoot.cpp:
548         (WebCore::RenderSVGRoot::layout):
549         (WebCore::RenderSVGRoot::paint):
550         (WebCore::RenderSVGRoot::localToParentTransformWithoutCSSParentOffset):
551         (WebCore::RenderSVGRoot::localToParentTransform):
552         (WebCore::RenderSVGRoot::computeRectForRepaint):
553         * rendering/RenderSVGRoot.h:
554         * rendering/RenderSVGViewportContainer.cpp:
555         (WebCore::RenderSVGViewportContainer::layout):
556
557 2009-04-20  Simon Fraser  <simon.fraser@apple.com>
558
559         Reviewed by Eric Seidel
560
561         https://bugs.webkit.org/show_bug.cgi?id=25282
562         
563         outlineBoundsForRepaint() should compute a quad relative to the
564         repaintContainer. This fixes the repaint issues originally fixed in
565         https://bugs.webkit.org/show_bug.cgi?id=12885 for elements in compositing layers.
566         Failure was only apparent when building with ACCELERATED_COMPOSITING enabled.
567
568         Tests: compositing/repaint/content-into-overflow.html
569                compositing/repaint/overflow-into-content.html
570
571         * rendering/RenderBox.cpp:
572         (WebCore::RenderBox::outlineBoundsForRepaint):
573
574 2009-04-20  Sam Weinig  <sam@webkit.org>
575
576         Rubber-stamped by Tim Hatcher.
577
578         Add licenses for xcconfig files.
579
580         * Configurations/Base.xcconfig:
581         * Configurations/DebugRelease.xcconfig:
582         * Configurations/FeatureDefines.xcconfig:
583         * Configurations/Version.xcconfig:
584         * Configurations/WebCore.xcconfig:
585
586 2009-04-20  Eric Roman  <eroman@chromium.org>
587
588         Reviewed by Dimitri Glazkov.
589
590         https://bugs.webkit.org/show_bug.cgi?id=25261
591         Implement the V8 binding for DOMWindow.event similarly to JSC, by using
592         the custom getter boilerplate from the IDL file. 
593         Also, stub out DOMWindow.crypto which is defined by the idl.
594
595         * bindings/v8/V8AbstractEventListener.cpp:
596         (WebCore::V8AbstractEventListener::invokeEventHandler):
597         * bindings/v8/custom/V8DOMWindowCustom.cpp:
598         (WebCore::ACCESSOR_GETTER):
599
600 2009-04-20  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
601
602         Reviewed by Xan Lopez.
603
604         https://bugs.webkit.org/show_bug.cgi?id=25243
605         Crash when data:// loads are cancelled
606
607         Properly handle cancellation of the load for data:// loads. This
608         fixes crashing in the followin test:
609
610         plugins/return-error-from-new-stream-callback-in-full-frame-plugin.html
611
612         * platform/network/soup/ResourceHandleSoup.cpp:
613         (WebCore::parseDataUrl):
614
615 2009-04-19  Dan Bernstein  <mitz@apple.com>
616
617         - maybe fix release builds
618
619         * dom/ScriptElement.cpp:
620         (WebCore::ScriptElementData::notifyFinished):
621
622 2009-04-19  Dan Bernstein  <mitz@apple.com>
623
624         - not fix release builds
625
626         * dom/Document.cpp:
627         (WebCore::Document::executeScriptSoonTimerFired):
628
629 2009-04-19  Dan Bernstein  <mitz@apple.com>
630
631         Reviewed by Mark Rowe.
632
633         - fix <rdar://problem/6734365> REGRESSION eBay "Save this search" link
634           does nothing the second time search results are opened
635
636         Test: fast/dom/HTMLScriptElement/nested-execution.html
637
638         Instead of executing scripts as soon as they finish loading, which may
639         happen synchronously during execution of another script, defer their
640         execution until the next run loop iteration, using a queue that is
641         similar to the HTML5 notion of the "list of scripts that will execute as
642         soon as possible", and in my testing was consistent with how Firefox
643         behaved.
644
645         * dom/Document.cpp:
646         (WebCore::Document::Document): Initialize m_executeScriptSoonTimer.
647         (WebCore::Document::~Document): deref() script elements in
648         m_scriptsToExecuteSoon.
649         (WebCore::Document::executeScriptSoonTimerFired): Added. Executes the
650         scripts in m_scriptsToExecuteSoon and deref()s them.
651         (WebCore::Document::executeScriptSoon): Added. Appends to
652         m_scriptsToExecuteSoon and ref()s the script element, which keeps the
653         ScriptElementData alive as well.
654         * dom/Document.h:
655         * dom/ScriptElement.cpp:
656         (WebCore::ScriptElementData::ScriptElementData): Initialize m_requested.
657         (WebCore::ScriptElementData::requestScript): Set m_requested to true, to
658         prevent further load requests.
659         (WebCore::ScriptElementData::execute): Added. Moved the code from
660         notifyFinished() which should not execute synchronously here, to be
661         called by the Document on a 0-interval timer.
662         (WebCore::ScriptElementData::notifyFinished): Moved the code to
663         dispatch events and evaluate the script, which should not execute
664         synchronously, out of here.
665         (WebCore::ScriptElementData::ignoresLoadRequest): Changed to test for
666         m_requested instead of m_cachedScript, because the latter is cleared
667         before the script is evaluated.
668         * dom/ScriptElement.h:
669
670 2009-04-19  Oliver Hunt  <oliver@apple.com>
671
672         Reviewed by Antti Koivisto and Darin Adler.
673
674         <rdar://problem/6127705> Excessive memory consumption on image load failure
675
676         When we fail to decode an image we clear most of the image data, but not the
677         input data itself, which can be backed by a CFData object that itself holds onto
678         a few hundred Kbs of memory.  This patch merely ensures that this buffer gets
679         cleared.
680
681         * loader/CachedImage.cpp:
682         (WebCore::CachedImage::error):
683
684 2009-04-19  Darin Adler  <darin@apple.com>
685
686         Reviewed by Sam Weinig.
687
688         Add hooks so sudden termination will not cause loss of icons or local storage.
689         rdar://problem/5951701
690
691         * loader/icon/IconDatabase.cpp: Marked various constants static to give them
692         internal linkage.
693         (WebCore::IconDatabase::IconDatabase): Added initial value for m_syncTimer.
694         Removed unneeded initial value for m_defaultIconRecord. Changed assertion to
695         work cross-platform.
696         (WebCore::IconDatabase::wakeSyncThread): Added disableSuddenTermination, so
697         we won't terminate until the sync thread has done its thing.
698         (WebCore::IconDatabase::scheduleOrDeferSyncTimer): Added disableSuddenTermination,
699         so we won't terminate if we have an outstanding sync timer.
700         (WebCore::IconDatabase::syncTimerFired): Added enableSuddenTermination, to
701         balance the one in scheduleOrDeferSyncTimer.
702         (WebCore::IconDatabase::syncThreadMainLoop): Added enableSuddenTermination, to
703         balance the one in wakeSyncThread.
704         (WebCore::IconDatabase::deleteAllPreparedStatements): Use clear() instead of set(0).
705
706         * loader/icon/IconDatabase.h: Use a Timer instead of an OwnPtr<Timer>.
707
708         * storage/LocalStorageArea.cpp:
709         (WebCore::LocalStorageArea::scheduleFinalSync): Added disableSuddenTermination.
710         (WebCore::LocalStorageArea::scheduleItemForSync): Ditto.
711         (WebCore::LocalStorageArea::scheduleClear): Ditto.
712         (WebCore::LocalStorageArea::syncTimerFired): Added a disableSuddenTermination if
713         we schedule a performSync callback for later and an unconditional
714         enableSuddenTermination to balance the ones in the schedule calls above.
715         (WebCore::LocalStorageArea::sync): Factored out the work of the sync function so it
716         can continue to use early return idiom.
717         (WebCore::LocalStorageArea::performSync): Added a call to enableSuddenTermination.
718
719         * storage/LocalStorageArea.h: Added declaration of the sync function.
720
721 2009-04-19  David Kilzer  <ddkilzer@apple.com>
722
723         Make FEATURE_DEFINES completely dynamic
724
725         Reviewed by Darin Adler.
726
727         Make FEATURE_DEFINES depend on individual ENABLE_FEATURE_NAME
728         variables for each feature, making it possible to remove all
729         knowledge of FEATURE_DEFINES from build-webkit.
730
731         * Configurations/FeatureDefines.xcconfig: Extract a variable
732         from FEATURE_DEFINES for each feature setting.
733
734 2009-04-18  Geoffrey Garen  <ggaren@apple.com>
735
736         Reviewed by Alexey Proskuryakov.
737
738         More fix for https://bugs.webkit.org/show_bug.cgi?id=21260
739         Unbounded memory growth when churning elements with anonymous event handler functions
740         
741         Removed a little more complexity from event handler creation and destruction.
742         
743         Removed the jsProtectedEventListeners, jsProtectedInlineEventListeners,
744         and jsInlineEventListeners maps, and all the code for managing them.
745         
746         ProtectedEventListeners don't exist anymore, so they're easy to nix.
747         
748         Inline EventListeners do still exist, but there's no reason to track
749         them in a map. The map exists to enable 'removeEventListener' to associate
750         a unique JSEventListener with a given JavaScript function. But the
751         'removeEventListener' API only works with non-inline event listeners!
752         
753         * bindings/js/JSDOMGlobalObject.cpp:
754         (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject):
755         (WebCore::JSDOMGlobalObject::findJSEventListener):
756         (WebCore::JSDOMGlobalObject::findOrCreateJSEventListener):
757         (WebCore::JSDOMGlobalObject::createJSInlineEventListener):
758         * bindings/js/JSDOMGlobalObject.h:
759         * bindings/js/JSEventListener.cpp:
760         (WebCore::JSEventListener::JSEventListener):
761         (WebCore::JSEventListener::clearJSFunctionInline):
762         * bindings/js/JSLazyEventListener.cpp:
763         (WebCore::JSLazyEventListener::~JSLazyEventListener):
764         (WebCore::JSLazyEventListener::parseCode):
765         * bindings/scripts/CodeGeneratorJS.pm:
766
767 2009-04-18  Dan Bernstein  <mitz@apple.com>
768
769         - try to fix the Windows build
770
771         * editing/VisiblePosition.cpp:
772         (WebCore::VisiblePosition::characterAfter):
773
774 2009-04-18  Dan Bernstein  <mitz@apple.com>
775
776         - revert the previous change, which was to a file that the Windows
777           port does not even use
778
779         * icu/unicode/utf16.h:
780
781 2009-04-18  Dan Bernstein  <mitz@apple.com>
782
783         Reviewed by Geoffrey Garen.
784
785         - try to fix the Windows build
786
787         * icu/unicode/utf16.h:
788
789 2009-04-18  Simon Fraser  <simon.fraser@apple.com>
790
791         Reviewed by Antti Koivisto.
792         
793         https://bugs.webkit.org/show_bug.cgi?id=25066
794         
795         When a <video> element gained a RenderLayer via opacity, reflection etc., the
796         layer hierarchy was not correctly updated because RenderMedia skipped a level
797         when asked for its children; it skipped m_controlsShadowRoot's renderer, which
798         actually has a layer.
799
800         Test: fast/layers/video-layer.html
801
802         * rendering/MediaControlElements.cpp:
803         (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement):
804         Don't manually call setParent() on the renderer. It will happen later
805         as a result of addChild().
806         
807         * rendering/RenderMedia.cpp:
808         (WebCore::RenderMedia::createControlsShadowRoot):
809         Add m_controlsShadowRoot's renderer as a child. 
810
811         * rendering/RenderMedia.h:
812         (WebCore::RenderMedia::children):
813         Now maintain a RenderObjectChildList, m_children, and remove the unneeded
814         removeChild() method. Make the two children() methods inline.
815
816         * rendering/RenderObject.cpp:
817         (WebCore::RenderObject::moveLayers):
818         Assert if moveLayers() is called with an oldParent that is not the
819         layer's actual parent (which would have revealed this bug).
820
821 2009-04-18  Geoffrey Garen  <ggaren@apple.com>
822
823         Reviewed by Cameron Zwarich.
824
825         Fixed a layout test failure, caused by my last check-in
826         (fast/dom/script-element-gc.html).
827
828         * bindings/js/JSDOMBinding.cpp:
829         (WebCore::isObservableThroughDOM):
830         * html/HTMLScriptElement.h:
831         (WebCore::HTMLScriptElement::haveFiredLoadEvent): Treat script elements
832         just like image elements: if a script element is loading, mark its JS
833         wrapper, even if the element is not in the document.
834
835 2009-04-18  Jian Li  <jianli@chromium.org>
836
837         Reviewed by Dimitri Glazkov.
838
839         https://bugs.webkit.org/show_bug.cgi?id=25170
840         Upstream V8WorkerCustom.cpp and V8WorkerContextCustom.cpp for V8 bindings.
841
842         * bindings/v8/WorkerContextExecutionProxy.cpp:
843         (WebCore::WorkerContextExecutionProxy::findOrCreateEventListener):
844         * bindings/v8/WorkerContextExecutionProxy.h:
845         * bindings/v8/custom/V8WorkerContextCustom.cpp: Added.
846         * bindings/v8/custom/V8WorkerCustom.cpp: Added.
847
848 2009-04-18  Jian Li  <jianli@chromium.org>
849
850         Reviewed by Dimitri Glazkov.
851
852         https://bugs.webkit.org/post_bug.cg://bugs.webkit.org/show_bug.cgi?id=25167 
853         Change createHiddenXHRDependency and removeHiddenXHRDependency so that they can be used by other custom code in V8 bindings.
854
855         * bindings/v8/V8Utilities.cpp: Renamed from WebCore/bindings/v8/V8XMLHttpRequestUtilities.cpp.
856         (WebCore::createHiddenDependency):
857         (WebCore::removeHiddenDependency):
858         * bindings/v8/V8Utilities.h: Renamed from WebCore/bindings/v8/V8XMLHttpRequestUtilities.h.
859         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
860         (WebCore::ACCESSOR_SETTER):
861         (WebCore::CALLBACK_FUNC_DECL):
862         * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp:
863         (WebCore::ACCESSOR_SETTER):
864         (WebCore::CALLBACK_FUNC_DECL):
865
866 2009-04-18  Drew Wilson  <amw@apple.com>
867
868         <rdar://problem/6781407> VisiblePosition.characterAfter should return UChar32
869
870         Reviewed by Dan Bernstein.
871
872         No test case since there is no change in behavior.
873
874         * editing/VisiblePosition.cpp:
875         (WebCore::VisiblePosition::characterAfter): Now handles surrogate
876         pairs correctly and returns a UChar32.
877         * editing/VisiblePosition.h:
878         (WebCore::VisiblePosition::characterBefore): Now returns a UChar32.
879         * editing/visible_units.cpp:
880         (WebCore::endOfFirstWordBoundaryContext): Renamed
881         firstNonComplexContextLineBreak() to this. Changed it to use the
882         generic requiresContextForWordBoundary() instead of
883         hasLineBreakingPropertyComplexContext().
884         (WebCore::startOfLastWordBoundaryContext): Replaces
885         lastNonComplexContextLineBreak(), but returns the offset of
886         the character after the last character that does not require
887         context for word breaking. Also changed to use
888         requiresContextForWordBoundary().
889         (WebCore::previousBoundary): Updated for the above changes in
890         names and semantics, and changed to use
891         requiresContextForWordBoundary().
892         (WebCore::nextBoundary): Ditto.
893         (WebCore::startWordBoundary): Ditto.
894         (WebCore::endWordBoundary): Ditto.
895         (WebCore::previousWordPositionBoundary): Ditto.
896         (WebCore::nextWordPositionBoundary): Ditto.
897         * platform/text/TextBoundaries.h:
898         (WebCore::requiresContextForWordBoundary): Added.
899         * platform/text/mac/TextBoundaries.mm:
900
901 2009-04-18  Geoffrey Garen  <ggaren@apple.com>
902
903         Reviewed by Cameron Zwarich.
904
905         Fixed <rdar://problem/6797442> | https://bugs.webkit.org/show_bug.cgi?id=25285
906         REGRESSION (r42569): Profiles cannot be selected in inspector profiler
907         
908         EventListeners are shared; RegisteredEventListeners are not. Therefore,
909         when a node wrapper needs to invalidate the node's JS event listeners,
910         it should invalidate its RegisteredEventListeners, not its EventListeners.
911         Otherwise, it might invalidate an EventListener shared by another node.
912
913         * dom/RegisteredEventListener.h:
914         (WebCore::invalidateEventListeners): ditto
915
916 2009-04-18  Pierre d'Herbemont  <pdherbemont@apple.com>
917
918         Reviewed by Mark Rowe.
919
920         <rdar://problem/6781295> video.buffered and video.seekable are not
921         the same. video.buffered should return only what is buffered and
922         not what is seekable
923
924         * WebCore.base.exp: Added wkQTMovieMaxTimeSeekable.
925
926         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
927         (WebCore::MediaPlayerPrivate::maxTimeSeekable): Return wkQTMovieMaxTimeSeekable.
928
929         * platform/mac/WebCoreSystemInterface.h: Add wkQTMovieMaxTimeSeekable.
930         * platform/mac/WebCoreSystemInterface.mm: Ditto.
931
932 2009-04-18  Pierre d'Herbemont  <pdherbemont@apple.com>
933
934         Reviewed by Adele Peterson.
935
936         <rdar://problem/6747241> work around QTKit no longer reaching
937         QTMovieLoadStateComplete
938
939         * WebCore.base.exp: Export wkQTMovieMaxTimeLoadedChangeNotification.
940
941         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
942         (WebCore::MediaPlayerPrivate::createQTMovie): observe QTMovieMaxTimeLoadedChangeNotification.
943         (WebCore::MediaPlayerPrivate::updateStates): compare duuration() with maxTimeLoaded() instead of
944         using QTMovieLoadStateComplete to determine if a movie are fully loaded.
945
946         * platform/mac/WebCoreSystemInterface.h: Add wkQTMovieMaxTimeLoadedChangeNotification.
947         * platform/mac/WebCoreSystemInterface.mm: Ditto.
948
949 2009-04-18  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
950
951         Reviewed by George Staikos.
952
953         Make WML work again, most regressions test were failing.
954
955         * dom/Document.cpp: Be sure to create WML elements in WML namespace. Otherwhise hasTagName() comparisions fail.
956         (WebCore::Document::createElement):
957         * wml/WMLCardElement.cpp: Add ASSERT(hasTagName(cardTag)) to catch errors like this in future.
958         (WebCore::WMLCardElement::WMLCardElement):
959         * wml/WMLTagNames.in: Wrap comment in #if 0/#endif blocks, to silence the generation script.
960
961 2009-04-17  Justin Garcia  <justin.garcia@apple.com>
962
963         Reviewed by Dan Bernstein.
964
965         https://bugs.webkit.org/show_bug.cgi?id=25277
966         If there is no line wrapping, a caret can leave its containing block but it shouldn't leave its root line box
967         
968         Also added code to handle a caret wider than one pixel.
969         
970         Added fast/inline/25277.html and fast/inline/25277-2.html
971
972         * rendering/RenderText.cpp:
973         (WebCore::RenderText::localCaretRect): Distribute a caret's width to either side of the offset,
974         so that a caret between two characters doesn't hang over one character more than the other.
975         If there is no wrapping, the caret can leave its containing block, but not its root line box.
976
977 2009-04-17  Geoffrey Garen  <ggaren@apple.com>
978
979         Reviewed by Oliver Hunt.
980
981         More fix for https://bugs.webkit.org/show_bug.cgi?id=21260
982         Unbounded memory growth when churning elements with anonymous event handler functions
983         
984         Some refactoring of "inline" event listeners.
985         
986         Renames:
987             dispatchEventForType => dispatchEvent
988             setWindowInlineEventListenerForTypeAndAttribute => setWindowInlineEventListener
989             removeInlineEventListenerForType => clearInlineEventListener
990             setInlineEventListenerForType => setInlineEventListener
991             inlineEventListenerForType => getInlineEventListener
992
993         * bindings/js/JSLazyEventListener.cpp:
994         (WebCore::eventParameterName):
995         (WebCore::JSLazyEventListener::JSLazyEventListener):
996         (WebCore::createInlineEventListener):
997         * bindings/js/JSLazyEventListener.h: Added two helper functions for
998         creating "inline" event listeners. These replace Document::createEventListener,
999         and abstract the creation of JS event listeners for DOM attributes out
1000         of the DOM. Removed legacy JSProtectedEventListener constructor code for
1001         adding the event listener's function to a map, since lazy event listeners
1002         don't have functions at construction time.
1003
1004         * dom/Document.cpp:
1005         (WebCore::Document::setFocusedNode):
1006         * dom/Document.h:
1007         (WebCore::Document::isSVGDocument):
1008         * dom/Element.cpp:
1009         (WebCore::Element::setWindowInlineEventListener):
1010         * dom/Element.h: Updated for renames. Nixed Document::createEventListener,
1011         mentioned above. Moved setWindowInlineEventListenerForTypeAndAttribute
1012         to Element, for simplicity.
1013
1014         * dom/InputElement.cpp:
1015         (WebCore::InputElement::setValueFromRenderer):
1016         * dom/Node.cpp:
1017         (WebCore::Node::dispatchFocusEvent):
1018         (WebCore::Node::dispatchBlurEvent):
1019         (WebCore::Node::dispatchEvent):
1020         (WebCore::Node::clearInlineEventListener):
1021         (WebCore::Node::setInlineEventListener):
1022         (WebCore::Node::getInlineEventListener):
1023         (WebCore::Node::onabort):
1024         (WebCore::Node::setOnabort):
1025         (WebCore::Node::etc.):
1026         * dom/Node.h: Updated for renames.
1027         
1028         * editing/ReplaceSelectionCommand.cpp:
1029         (WebCore::ReplacementFragment::ReplacementFragment): Updated for renames.
1030         
1031         Updated these files for renames, and to use the new createInlineEventListener
1032         helper function:
1033
1034         * html/HTMLBodyElement.cpp:
1035         (WebCore::HTMLBodyElement::parseMappedAttribute):
1036         * html/HTMLButtonElement.cpp:
1037         (WebCore::HTMLButtonElement::parseMappedAttribute):
1038         * html/HTMLElement.cpp:
1039         (WebCore::HTMLElement::parseMappedAttribute):
1040         * html/HTMLFormControlElement.cpp:
1041         (WebCore::HTMLFormControlElement::onChange):
1042         * html/HTMLFormElement.cpp:
1043         (WebCore::HTMLFormElement::prepareSubmit):
1044         (WebCore::HTMLFormElement::reset):
1045         (WebCore::HTMLFormElement::parseMappedAttribute):
1046         * html/HTMLFrameElementBase.cpp:
1047         (WebCore::HTMLFrameElementBase::parseMappedAttribute):
1048         * html/HTMLFrameSetElement.cpp:
1049         (WebCore::HTMLFrameSetElement::parseMappedAttribute):
1050         * html/HTMLImageElement.cpp:
1051         (WebCore::HTMLImageElement::parseMappedAttribute):
1052         * html/HTMLImageLoader.cpp:
1053         (WebCore::HTMLImageLoader::dispatchLoadEvent):
1054         * html/HTMLInputElement.cpp:
1055         (WebCore::HTMLInputElement::parseMappedAttribute):
1056         (WebCore::HTMLInputElement::onSearch):
1057         * html/HTMLMediaElement.cpp:
1058         (WebCore::HTMLMediaElement::loadInternal):
1059         * html/HTMLObjectElement.cpp:
1060         (WebCore::HTMLObjectElement::parseMappedAttribute):
1061         * html/HTMLScriptElement.cpp:
1062         (WebCore::HTMLScriptElement::parseMappedAttribute):
1063         (WebCore::HTMLScriptElement::dispatchLoadEvent):
1064         (WebCore::HTMLScriptElement::dispatchErrorEvent):
1065         * html/HTMLSelectElement.cpp:
1066         (WebCore::HTMLSelectElement::parseMappedAttribute):
1067         * html/HTMLTextAreaElement.cpp:
1068         (WebCore::HTMLTextAreaElement::parseMappedAttribute):
1069         * html/HTMLTokenizer.cpp:
1070         (WebCore::HTMLTokenizer::notifyFinished):
1071         * page/AccessibilityRenderObject.cpp:
1072         (WebCore::AccessibilityRenderObject::mouseButtonListener):
1073         * page/DOMWindow.cpp:
1074         * page/DOMWindow.h:
1075         (WebCore::DOMWindow::eventListeners):
1076         * page/EventHandler.cpp:
1077         (WebCore::EventHandler::canMouseDownStartSelect):
1078         (WebCore::EventHandler::canMouseDragExtendSelect):
1079         (WebCore::EventHandler::sendScrollEvent):
1080         * page/Page.cpp:
1081         (WebCore::networkStateChanged):
1082         * rendering/RenderListBox.cpp:
1083         (WebCore::RenderListBox::valueChanged):
1084         * rendering/RenderTextControl.cpp:
1085         (WebCore::RenderTextControl::selectionChanged):
1086         * svg/SVGElement.cpp:
1087         (WebCore::SVGElement::parseMappedAttribute):
1088         * svg/SVGElementInstance.cpp:
1089         * svg/SVGImageLoader.cpp:
1090         (WebCore::SVGImageLoader::dispatchLoadEvent):
1091         * svg/SVGSVGElement.cpp:
1092         (WebCore::SVGSVGElement::parseMappedAttribute):
1093         * svg/SVGScriptElement.cpp:
1094         (WebCore::SVGScriptElement::dispatchErrorEvent):
1095         * wml/WMLInputElement.cpp:
1096         (WebCore::WMLInputElement::defaultEventHandler):
1097
1098 2009-04-17  David Kilzer  <ddkilzer@apple.com>
1099
1100         Simplify FEATURE_DEFINES definition
1101
1102         Reviewed by Darin Adler.
1103
1104         This moves FEATURE_DEFINES and its related ENABLE_FEATURE_NAME
1105         variables to their own FeatureDefines.xcconfig file.  It also
1106         extracts a new ENABLE_GEOLOCATION variable so that
1107         FEATURE_DEFINES only needs to be defined once.
1108
1109         * Configurations/FeatureDefines.xcconfig: Added.
1110         * Configurations/WebCore.xcconfig: Removed definition of
1111         ENABLE_SVG_DOM_OBJC_BINDINGS and FEATURE_DEFINES.  Added include
1112         of FeatureDefines.xcconfig.
1113         * WebCore.xcodeproj/project.pbxproj: Added
1114         FeatureDefines.xcconfig file.
1115         * bindings/scripts/CodeGeneratorObjC.pm: When creating a list of
1116         command-line macro definitions, split on one-or-more spaces
1117         instead of a single space since the FEATURE_DEFINES macro may
1118         now contain more than one space between macros if some macros
1119         aren't defined.
1120
1121 2009-04-17  Brady Eidson  <beidson@apple.com>
1122
1123         Reviewed by Mark Rowe
1124
1125         <rdar://problem/6786999> Tiger WebKit shouldn't try to POST on back/forward without nagging.
1126
1127         * platform/network/mac/ResourceHandleMac.mm:
1128         (WebCore::ResourceHandle::willLoadFromCache):
1129
1130 2009-04-17  Darin Adler  <darin@apple.com>
1131
1132         Reviewed by Timothy Hatcher.
1133
1134         Added sudden termination functions that can be called without involving
1135         the page or client.
1136
1137         * GNUmakefile.am: Added SuddenTermination.h.
1138         * WebCore.vcproj/WebCore.vcproj: Ditto.
1139         * WebCore.xcodeproj/project.pbxproj: Ditto. Also added SuddenTermination.mm.
1140
1141         * platform/SuddenTermination.h: Added.
1142         * platform/mac/SuddenTermination.mm: Added.
1143
1144 2009-04-17  Eric Seidel  <eric@webkit.org>
1145
1146         Reviewed by Simon Fraser.
1147
1148         Move more code into RenderSVGModelObject
1149
1150         needsLayer() already returns false from RenderSVGModelObject
1151         lineHeight and baselinePosition are from days of RenderPath having RenderBox parents.
1152
1153         I also added comments to explain how focus rings work (now that I understand)
1154         I got rid of two more uses of m_absoluteBounds (nearly dead!)
1155
1156         * rendering/RenderPath.cpp:
1157         * rendering/RenderPath.h:
1158         * rendering/RenderSVGContainer.cpp:
1159         (WebCore::RenderSVGContainer::paint):
1160         (WebCore::RenderSVGContainer::addFocusRingRects):
1161         * rendering/RenderSVGContainer.h:
1162         * rendering/RenderSVGModelObject.cpp:
1163         (WebCore::RenderSVGModelObject::absoluteRects):
1164         (WebCore::RenderSVGModelObject::absoluteQuads):
1165         * rendering/RenderSVGModelObject.h:
1166
1167 2009-04-16  Peter Kasting  <pkasting@google.com>
1168
1169         Reviewed by Adele Peterson.
1170
1171         https://bugs.webkit.org/show_bug.cgi?id=25238
1172         Invalidate the hovered scrollbar part when resetting the pressed part,
1173         since once there is no pressed part we can draw a hovered state.
1174
1175         * platform/Scrollbar.cpp:
1176         (WebCore::Scrollbar::setHoveredPart):
1177         (WebCore::Scrollbar::setPressedPart):
1178
1179 2009-04-16  Darin Fisher  <darin@chromium.org>
1180
1181         Reviewed by Darin Adler.
1182
1183         https://bugs.webkit.org/show_bug.cgi?id=25223
1184         REGRESSION: Back button after form submission to the same URL fails to navigate.
1185
1186         Test: http/tests/navigation/post-goback-same-url.html
1187
1188         * loader/FrameLoader.cpp:
1189         (WebCore::FrameLoader::loadItem): Check if the page we are leaving has
1190         FormData.
1191
1192 2009-04-17  Nikolas Zimmermann  <nikolas.zimmerman@torchmobile.com>
1193
1194         Not reviewed. Fix WML enabled builds.
1195
1196         * rendering/RenderTableRow.cpp: Remove dead code, which is no longer necessary.
1197         (WebCore::RenderTableRow::addChild):
1198         * wml/WMLInputElement.cpp: Apply same fix HTMLInputElement received. Covert RenderObject's to RenderTextControl where needed.
1199         (WebCore::WMLInputElement::defaultEventHandler):
1200
1201 2009-04-17  Pierre d'Herbemont  <pdherbemont@apple.com>
1202
1203         Reviewed by Simon Fraser.
1204
1205         Add support for the media element 'played' attribute.
1206         This involves support of "normalized TimeRanges" as described by
1207         the spec.
1208
1209         Test: media/video-played.html
1210
1211         * html/HTMLMediaElement.cpp:
1212         (WebCore::HTMLMediaElement::HTMLMediaElement): Renamed 
1213         m_currentTimeDuringSeek->m_lastSeekTime. Added m_playing and m_playedTimeRanges.
1214         (WebCore::HTMLMediaElement::loadInternal): Reset m_playing, m_lastSeekTime, and
1215         m_playedTimeRanges
1216         (WebCore::HTMLMediaElement::seek): Set current time to m_playedTimeRanges
1217         (WebCore::HTMLMediaElement::currentTime): m_currentTimeDuringSeek -> m_lastSeekTime
1218         (WebCore::HTMLMediaElement::played): Returns m_playedTimeRanges.
1219         (WebCore::HTMLMediaElement::updatePlayState): Add the new played time ranges when pausing. 
1220         Set the m_playing flag.
1221         * html/HTMLMediaElement.h:
1222
1223         * html/TimeRanges.cpp:
1224         (TimeRanges::add): Merge range(s) if overlap.
1225         * html/TimeRanges.h: Add various helpers (below).
1226         (WebCore::TimeRanges::Range::isPointInRange): Added.
1227         (WebCore::TimeRanges::Range::isOverlappingRange): Ditto.
1228         (WebCore::TimeRanges::Range::unionWithOverlappingRange): Ditto.
1229         (WebCore::TimeRanges::Range::isBeforeRange): Ditto.
1230
1231 2009-04-17  Darin Adler  <darin@apple.com>
1232
1233         Reviewed by Antti Koivisto.
1234
1235         Bug 25210: don't use ObjC methods to wrap/unwrap DOM objects with ObjC
1236         https://bugs.webkit.org/show_bug.cgi?id=25210
1237
1238         * WebCore.base.exp: Export the core and kit function overloads that are used
1239         in WebKit. Also resorted this file.
1240
1241         * WebCore.xcodeproj/project.pbxproj: Re-added DOMHTMLCanvasElement.h to fix
1242         a strange problem with the file type.
1243
1244         * bindings/objc/DOM.mm: Removed the many extraneous includes. Added new includes
1245         so we can use and implement the new core and kit functions. Import DOMInternal.h
1246         first so it can do its public/private magic.
1247         (-[DOMNode _rootObject]): Changed to use early-return style.
1248         (kitClass): Added. Tells the wrapper generator what kind of node class to create
1249         to wrap DOM nodes. This has the code that used to be in the _wrapNode method.
1250         (kit): Added. Takes an EventTarget and makes the appropriate type of wrapper,
1251         dpending on whether it's a Node or an SVGElementInstance. This replace methods
1252         that used to be on both of those classes.
1253         (-[DOMNode boundingBox]): Changed to use early return, and the core function.
1254         (-[DOMNode lineBoxRects]): Ditto.
1255         (-[DOMNode renderedImage]): Ditto.
1256         (-[DOMRange boundingBox]): Ditto.
1257         (-[DOMRange lineBoxRects]): Ditto.
1258         (-[DOMElement image]): Ditto.
1259         (-[DOMElement _font]): Ditto.
1260         (-[DOMElement _imageTIFFRepresentation]): Ditto.
1261         (-[DOMElement _getURLAttribute:]): Ditto.
1262         (-[DOMElement isFocused]): Ditto.
1263         (kit): Hand-wrote the version of this for NodeFilter, since it's a protocol,
1264         not a class in the binding.
1265         (core): Ditto.
1266         (-[DOMNodeFilter acceptNode:]): Use core.
1267
1268         * bindings/objc/DOMAbstractView.mm:
1269         (-[DOMAbstractView document]): Use kit.
1270         (-[DOMAbstractView _disconnectFrame]): Call removeDOMWrapper, which is no longer
1271         in the WebCore namespace, since it's headed for WebKit in the future.
1272         (core): Hand-wrote the version of this for DOMAbstractView.mm, since we store
1273         a pointer to the Frame, not the DMWindow.
1274         (kit): Ditto.
1275
1276         * bindings/objc/DOMCSS.mm:
1277         (kitClass): Added. Tells the wrapper generator what kind of node class to create
1278         to wrap CSS objects. This has the code that used to be in the _wrapStyleSheet,
1279         _wrapCSSRule, and _wrapCSSValue methods.
1280
1281         * bindings/objc/DOMEvents.mm:
1282         (kitClass): Added. Tells the wrapper generator what kind of node class to create
1283         to wrap event objects. This has the code that used to be in the _wrapEvent methods.
1284
1285         * bindings/objc/DOMHTML.mm:
1286         (-[DOMHTMLDocument createDocumentFragmentWithMarkupString:baseURL:]): Use kit and core.
1287         (-[DOMHTMLDocument createDocumentFragmentWithText:]): Ditto.
1288         (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]): Ditto.
1289         (-[DOMHTMLInputElement _rectOnScreen]): Ditto.
1290         (-[DOMHTMLInputElement _replaceCharactersInRange:withString:selectingFromIndex:]): Ditto.
1291         (-[DOMHTMLInputElement _selectedRange]): Ditto.
1292         (-[DOMHTMLInputElement _setAutofilled:]): Ditto.
1293         (-[DOMHTMLSelectElement _activateItemAtIndex:]): Ditto.
1294         (-[DOMHTMLInputElement _isEdited]): Ditto.
1295         (-[DOMHTMLTextAreaElement _isEdited]): Ditto.
1296         (kitClass): Added. Gives HTMLOptionCollection objects an appropriate wrapper.
1297
1298         * bindings/objc/DOMInternal.h: Removed most of the imports. There's no reason
1299         to have this header include all the other internal DOM headers. Removed unneeded
1300         interfaces, including the redeclaration of _init in DOMObject, since it's already
1301         inherited from WebScriptObject. Moved all the functions out of the WebCore
1302         namespace since this code is destined for WebKit, which doesn't use a namespace.
1303         Added kit and core functions for the two classes that live in this header.
1304
1305         * bindings/objc/DOMInternal.mm:
1306         (-[WebScriptObject _initializeScriptDOMNodeImp]): Use core.
1307
1308         * bindings/objc/DOMObject.h: Made the _internal field be private instead of
1309         protected. This also allows the "#define private public" trick to be used to
1310         make the field accessible inside the bindings code.
1311
1312         * bindings/objc/DOMObject.mm:
1313         (-[DOMObject dealloc]): Updated for namespace change.
1314         (-[DOMObject sheet]): Use core and kit functions.
1315
1316         * bindings/objc/DOMRGBColor.mm:
1317         (-[DOMRGBColor dealloc]): Updated for namespace change.
1318         (-[DOMRGBColor red]): Use kit function.
1319         (-[DOMRGBColor green]): Ditto.
1320         (-[DOMRGBColor blue]): Ditto.
1321         (-[DOMRGBColor alpha]): Ditto.
1322         (core): Added. Replaces the _RGBColor method.
1323         (kit): Added. Replaces the _wrapRGBColor method.
1324
1325         * bindings/objc/DOMSVGPathSegInternal.mm:
1326         (kitClass): Added. Replaces the _wrapSVGPathSeg method.
1327
1328         * bindings/objc/DOMUtility.mm:
1329         (JSC::createDOMWrapper): Use kit function.
1330         (createDOMWrapper): Ditto.
1331
1332         * bindings/objc/DOMXPath.mm:
1333         (core): Added. Replaces the _xpathNSResolver method.
1334         (kit): Added. Replaces the _wrapXPathNSResolver method.
1335
1336         * bindings/objc/ObjCEventListener.mm:
1337         (WebCore::ObjCEventListener::find): Changed to use early return.
1338         (WebCore::ObjCEventListener::handleEvent): Use kit function.
1339
1340         * bindings/objc/ObjCNodeFilterCondition.mm:
1341         (WebCore::ObjCNodeFilterCondition::acceptNode): Use kit function.
1342
1343         * bindings/objc/WebScriptObject.mm:
1344         (+[WebScriptObject scriptObjectForJSObject:originRootObject:rootObject:]):
1345         Updated for namespace change.
1346
1347         * bindings/scripts/CodeGeneratorObjC.pm: Changed spelling of "license"
1348         to U.S. spelling. Removed GetObjCTypeMaker, GetObjCTypeGetterName,
1349         GetInternalTypeGetterSignature, and GetInternalTypeMakerSignature.
1350         Changed includes to conform to new scheme. Generate core and kit
1351         functions instead of methods and calls to those functions. Added a new
1352         attribute, Polymorphic, to indicate classes that have derived subclasses.
1353         Removed the old ObjCCustomInternalImpl attribute.
1354
1355         * css/CSSRule.idl: Use Polymorphic attribute, so core and kit functions
1356         will be generated, with kit calling kitClass. This requires less hand-
1357         written code than the old ObjCCustomInternalImpl.
1358         * css/CSSValue.idl: Ditto.
1359         * css/StyleSheet.idl: Ditto.
1360         * dom/Event.idl: Ditto.
1361         * dom/Node.idl: Ditto.
1362         * html/HTMLCollection.idl: Ditto.
1363         * svg/SVGPathSeg.idl: Ditto.
1364
1365         * editing/TextAffinity.h: Moved kit and core functions out of the
1366         WebCore namespace since this code is destined for WebKit, which
1367         doesn't use a namespace
1368
1369         * platform/mac/ClipboardMac.mm:
1370         (WebCore::ClipboardMac::declareAndWriteDragImage): Use kit function.
1371
1372         * platform/mac/DragDataMac.mm:
1373         (WebCore::DragData::asFragment): Use core function.
1374
1375         * platform/mac/PasteboardMac.mm:
1376         (WebCore::Pasteboard::writeSelection): Use kit function.
1377
1378         * svg/SVGElementInstance.idl: Removed now-unneeded ObjCCustomInternalImpl
1379         function. This can be generated in a standard way now.
1380         * svg/SVGViewSpec.idl: Ditto.
1381
1382 2009-04-17  Brady Eidson  <beidson@apple.com>
1383
1384         Reviewed by Maciej Stachowiak
1385
1386         <rdar://problem/5753299> "Private Browsing" doesn't affect HTML 5 Database storage
1387
1388         If the Page is in private browsing mode when a statement is queued up, flag that 
1389         statement as read-only.
1390
1391         It would be better to set the read-only flag on the database thread when it actually
1392         executes, but that would either require making Settings access a lock-protected operation
1393         or involve a synchronous callback to the WebCore thread, neither of which seem worth it.
1394         If it becomes an issue in practice, we can revisit this later.
1395
1396         Test: storage/private-browsing-readonly.html
1397
1398         * storage/Database.cpp:
1399         (WebCore::Database::setAuthorizerReadOnly):
1400         * storage/Database.h:
1401
1402         * storage/DatabaseAuthorizer.cpp:  For all action types that would alter the database,
1403           deny when in read-only mode.
1404         (WebCore::DatabaseAuthorizer::reset):
1405         (WebCore::DatabaseAuthorizer::createTable):
1406         (WebCore::DatabaseAuthorizer::dropTable):
1407         (WebCore::DatabaseAuthorizer::allowAlterTable):
1408         (WebCore::DatabaseAuthorizer::createIndex):
1409         (WebCore::DatabaseAuthorizer::dropIndex):
1410         (WebCore::DatabaseAuthorizer::createTrigger):
1411         (WebCore::DatabaseAuthorizer::dropTrigger):
1412         (WebCore::DatabaseAuthorizer::createVTable):
1413         (WebCore::DatabaseAuthorizer::dropVTable):
1414         (WebCore::DatabaseAuthorizer::allowDelete):
1415         (WebCore::DatabaseAuthorizer::allowInsert):
1416         (WebCore::DatabaseAuthorizer::allowUpdate):
1417         (WebCore::DatabaseAuthorizer::setReadOnly):
1418         * storage/DatabaseAuthorizer.h:
1419
1420         * storage/SQLStatement.cpp:
1421         (WebCore::SQLStatement::create): Add a m_readOnly flag.
1422         (WebCore::SQLStatement::SQLStatement): Ditto.
1423         (WebCore::SQLStatement::execute): If m_readOnly is set, tell the authorizer to change
1424           to read-only mode.
1425         * storage/SQLStatement.h:
1426
1427         * storage/SQLTransaction.cpp:
1428         (WebCore::SQLTransaction::executeSQL): Flag the statement as read-only if the Page is
1429           currently in private browsing mode.
1430
1431 2009-04-17  Eric Seidel  <eric@webkit.org>
1432
1433         Reviewed by Antti Koivisto.
1434
1435         Move RenderPath and RenderSVGContainer onto a unified clippedOverflowRectForRepaint
1436         https://bugs.webkit.org/show_bug.cgi?id=25268
1437
1438         Lots of minus lines.  Now we're sharing more sane code
1439         (which will respect -webkit-transforms! and scroll offsets correctly)
1440
1441         Which means this fixes:
1442         https://bugs.webkit.org/show_bug.cgi?id=20769 and
1443         https://bugs.webkit.org/show_bug.cgi?id=21968 too!
1444
1445         We're no longer expanding the paint rect "for anti-aliasing", since
1446         I can't find a case where that's required.  If it is, repaintRectInLocalCoordinates()
1447         should be fixed to handle those cases instead of here.
1448
1449         This fixes svg/custom/scroll-hit-test (now that we respect scroll offsets when repainting)
1450         as well as improves our focus ring drawing seen in svg/custom/focus-ring
1451         focus rings are now closer to transformed content by a couple pixels (they were needlessly outset by the antialiasing hack)
1452         Also, it fixes the dumped rects for markers, causing a progression in svg/custom/marker-overflow-clip
1453
1454         * rendering/RenderPath.cpp:
1455         (WebCore::RenderPath::repaintRectInLocalCoordinates):
1456         (WebCore::RenderPath::setPath):
1457         * rendering/RenderPath.h:
1458         * rendering/RenderSVGContainer.cpp:
1459         (WebCore::RenderSVGContainer::repaintRectInLocalCoordinates):
1460         * rendering/RenderSVGContainer.h:
1461         * rendering/RenderSVGModelObject.cpp:
1462         (WebCore::RenderSVGModelObject::clippedOverflowRectForRepaint):
1463         (WebCore::RenderSVGModelObject::computeRectForRepaint):
1464         * rendering/RenderSVGModelObject.h:
1465         * rendering/RenderSVGRoot.cpp:
1466         (WebCore::RenderSVGRoot::computeRectForRepaint):
1467         * rendering/RenderSVGRoot.h:
1468
1469 2009-04-17  Chris Fleizach  <cfleizach@apple.com>
1470
1471         Reviewed by Darin Adler.
1472
1473         Bug 25259: AX: VoiceOver cmd-cntl-space does not follow the google.com->more link
1474         https://bugs.webkit.org/show_bug.cgi?id=25259
1475   
1476         When a node becomes visible or hidden, accessibility needs to be told to update.
1477
1478         Test: accessibility/visible-elements.html
1479
1480         * rendering/RenderObject.cpp:
1481         (WebCore::RenderObject::styleWillChange):
1482
1483 2009-04-17  Kevin Ollivier  <kevino@theolliviers.com>
1484
1485         wx build fix, added missing header.
1486
1487         * platform/graphics/wx/TransformationMatrixWx.cpp:
1488
1489 2009-04-17  Simon Hausmann  <simon.hausmann@nokia.com>
1490
1491         Unreviewed build fix.
1492
1493         Fix the build with enabled SVG filters
1494
1495         * rendering/RenderSVGModelObject.cpp: Include SVGResourceFilter.h.
1496
1497 2009-04-16  Eric Roman  <eroman@chromium.org>
1498
1499         Reviewed by Dimitri Glazkov.
1500
1501         https://bugs.webkit.org/show_bug.cgi?id=25196
1502         Add a missing V8DOMMap include.
1503
1504         * bindings/v8/WorkerScriptController.cpp: Included V8DOMMap.h.
1505
1506 2009-04-16  Dimitri Glazkov  <dglazkov@chromium.org>
1507
1508         Reviewed by Darin Fisher.
1509
1510         https://bugs.webkit.org/show_bug.cgi?id=25260
1511         Finish V8 custom bindings for InspectorController.
1512
1513         * bindings/v8/custom/V8InspectorControllerCustom.cpp:
1514         (WebCore::CALLBACK_FUNC_DECL): Added.
1515
1516 2009-04-16  Kevin Watters  <kevinwatters@gmail.com>
1517
1518         Reviewed by Kevin Ollivier.
1519
1520         Switch to wxGraphicsBitmap when using wxGraphicsContext so that we're not doing
1521         unnecessary conversions internally when drawing bitmaps.
1522         
1523         https://bugs.webkit.org/show_bug.cgi?id=25248
1524
1525         * platform/graphics/ImageSource.h:
1526         * platform/graphics/wx/ImageSourceWx.cpp:
1527         (WebCore::ImageSource::createFrameAtIndex):
1528         * platform/graphics/wx/ImageWx.cpp:
1529         (WebCore::BitmapImage::draw):
1530         (WebCore::BitmapImage::drawPattern):
1531
1532 2009-04-16  Justin Garcia  <justin.garcia@apple.com>
1533
1534         Reviewed by Dan Bernstein.
1535
1536         Performing a block style change in an editable root that contains only a br adds a newline
1537         https://bugs.webkit.org/show_bug.cgi?id=25256
1538
1539         * editing/CompositeEditCommand.cpp:
1540         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Fix a bad check for an root
1541         block that didn't handle a root that contained a placeholder.
1542
1543 2009-04-16  Eric Seidel  <eric@webkit.org>
1544
1545         Reviewed by Simon Fraser.
1546
1547         Fix computeContainerBoundingBox to respect viewport translations
1548         https://bugs.webkit.org/show_bug.cgi?id=25254
1549
1550         Previously computeContainerBoundingBox was just adding the viewportTranslation.
1551         Which, although it has a confusing name, only contains the scale and translation
1552         for the viewBox/preserveAspectRatio adjustment.  It does not contain the
1553         translation for the x/y offset of the viewport.
1554         localToParentTransform() does contain this offset, so we use that instead
1555         of the previous hacky code.
1556
1557         * rendering/RenderSVGContainer.h:
1558         * rendering/RenderSVGViewportContainer.h:
1559         * rendering/SVGRenderSupport.cpp:
1560         (WebCore::computeContainerBoundingBox):
1561
1562 2009-04-16  Eric Seidel  <eric@webkit.org>
1563
1564         Reviewed by Simon Fraser.
1565
1566         Add a localToParentTransform() method which includes the
1567         full transform between local and parent local coordinates.
1568         https://bugs.webkit.org/show_bug.cgi?id=25226
1569
1570         Moved m_localTransform up into RenderSVGTransformableContainer
1571         and added a comment to RenderSVGViewportContainer to make it more
1572         clear that it does not have a localTransform().
1573
1574         This patch reveals two more failed design decisions:
1575         1.  Use of RenderBox::absoluteTransform() to mean "absoluteTransform()
1576             including only my localTransform()" callers are probably using it
1577             incorrectly anyway and are just masking bugs in the confused code.
1578         2.  computeContainerBoundingBox does not include viewport translations in
1579             its computed bounding box, so bounding boxes will be off for parents of
1580             inner <svg> elements.  I'll fix this an updated the results in a separate change.
1581
1582         No functional changes, thus no tests.
1583
1584         * rendering/RenderObject.cpp:
1585         (WebCore::RenderObject::localToParentTransform):
1586         (WebCore::RenderObject::absoluteTransform):
1587         * rendering/RenderObject.h:
1588         * rendering/RenderSVGContainer.cpp:
1589         (WebCore::RenderSVGContainer::layout):
1590         * rendering/RenderSVGContainer.h:
1591         (WebCore::RenderSVGContainer::viewportTransform):
1592         * rendering/RenderSVGHiddenContainer.cpp:
1593         * rendering/RenderSVGHiddenContainer.h:
1594         (WebCore::RenderSVGHiddenContainer::absoluteTransform):
1595         * rendering/RenderSVGRoot.cpp:
1596         (WebCore::RenderSVGRoot::localToParentTransform):
1597         (WebCore::RenderSVGRoot::absoluteTransform):
1598         * rendering/RenderSVGRoot.h:
1599         * rendering/RenderSVGTransformableContainer.cpp:
1600         (WebCore::RenderSVGTransformableContainer::localToParentTransform):
1601         (WebCore::RenderSVGTransformableContainer::localTransform):
1602         * rendering/RenderSVGTransformableContainer.h:
1603         * rendering/RenderSVGViewportContainer.cpp:
1604         (WebCore::RenderSVGViewportContainer::localToParentTransform):
1605         (WebCore::RenderSVGViewportContainer::absoluteTransform):
1606         * rendering/RenderSVGViewportContainer.h:
1607         * rendering/SVGRenderSupport.cpp:
1608         (WebCore::computeContainerBoundingBox):
1609
1610 2009-04-16  Adam Langley  <agl@google.com>
1611
1612         Reviewed by Darin Fisher.
1613
1614         Fix Chromium's rendering of <option> elements inside of <optgroups>.
1615
1616         https://bugs.webkit.org/show_bug.cgi?id=25244
1617
1618         Test (will included as a manual test by https://bugs.webkit.org/show_bug.cgi?id=24900):
1619
1620         <select>
1621           <optgroup label="Should be bold">
1622             <option>Should not be bold</option>
1623           </optgroup>
1624         </select>
1625
1626         * css/themeWin.css: adding comments
1627         * platform/chromium/PopupMenuChromium.cpp:
1628         (WebCore::PopupListBox::getRowFont): use menuStyle() rather than the item's style
1629
1630 2009-04-16  Eric Roman  <eroman@chromium.org>
1631
1632         Reviewed by Alexey Proskuryakov.
1633
1634         https://bugs.webkit.org/show_bug.cgi?id=25218
1635
1636         Make DOMWindow::inlineEventListenerForType not have the "inline"
1637         keyword. As this method gets used outside of DOMWindow.
1638
1639         * page/DOMWindow.cpp:
1640         (WebCore::DOMWindow::inlineEventListenerForType):
1641
1642 2009-04-16  Greg Bolsinga  <bolsinga@apple.com>
1643
1644         Reviewed by Antti Koivisto.
1645
1646         Fix <rdar://problem/6766969>
1647         
1648         When deferred repaints are enabled and being reset and there is a active
1649         timer, stop the timer and do the deferred repaints immediately.
1650
1651         * page/FrameView.cpp:
1652         (WebCore::FrameView::resetDeferredRepaintDelay):
1653
1654 2009-04-16  Xan Lopez  <xlopez@igalia.com>
1655
1656         Reviewed by Sam Weinig.
1657
1658         https://bugs.webkit.org/show_bug.cgi?id=25241
1659         Remove superfluous NotImplemented.h includes.
1660
1661         * html/CanvasRenderingContext2D.cpp:
1662         * html/CanvasStyle.cpp:
1663         * page/AccessibilityRenderObject.cpp:
1664         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
1665         * platform/graphics/GraphicsContext.cpp:
1666         * platform/graphics/cairo/ImageBufferCairo.cpp:
1667         * platform/graphics/cairo/PathCairo.cpp:
1668         * platform/graphics/chromium/SimpleFontDataLinux.cpp:
1669         * platform/graphics/gtk/FontGtk.cpp:
1670         * platform/graphics/gtk/IconGtk.cpp:
1671         * platform/graphics/qt/IconQt.cpp:
1672         * platform/graphics/qt/ImageQt.cpp:
1673         * platform/graphics/qt/ImageSourceQt.cpp:
1674         * platform/graphics/skia/ImageBufferSkia.cpp:
1675         * platform/graphics/skia/ImageSkia.cpp:
1676         * platform/graphics/win/ColorSafari.cpp:
1677         * platform/graphics/win/FontWin.cpp:
1678         * platform/graphics/win/GraphicsContextCGWin.cpp:
1679         * platform/graphics/win/GraphicsContextCairoWin.cpp:
1680         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
1681         * platform/graphics/wx/ImageWx.cpp:
1682         * platform/graphics/wx/TransformationMatrixWx.cpp:
1683         * platform/gtk/PlatformScreenGtk.cpp:
1684         * platform/gtk/PopupMenuGtk.cpp:
1685         * platform/gtk/ScrollViewGtk.cpp:
1686         * platform/gtk/ScrollbarGtk.cpp:
1687         * platform/network/cf/ResourceHandleCFNet.cpp:
1688         * platform/posix/FileSystemPOSIX.cpp:
1689         * platform/qt/DragDataQt.cpp:
1690         * platform/qt/FileSystemQt.cpp:
1691         * platform/qt/Localizations.cpp:
1692         * platform/qt/PopupMenuQt.cpp:
1693         * platform/win/EditorWin.cpp:
1694         * platform/win/PasteboardWin.cpp:
1695         * platform/wx/KeyboardEventWx.cpp:
1696         * platform/wx/PopupMenuWx.cpp:
1697         * platform/wx/SharedTimerWx.cpp:
1698         * plugins/gtk/PluginViewGtk.cpp:
1699         * plugins/mac/PluginPackageMac.cpp:
1700         * plugins/qt/PluginPackageQt.cpp:
1701         * plugins/win/PluginViewWin.cpp:
1702         * rendering/RenderThemeChromiumLinux.cpp:
1703         * svg/graphics/SVGImage.cpp:
1704
1705 2009-04-16  Geoffrey Garen  <ggaren@apple.com>
1706
1707         Reviewed by Sam Weinig.
1708
1709         More fix for https://bugs.webkit.org/show_bug.cgi?id=21260
1710         Unbounded memory growth when churning elements with anonymous event handler functions
1711         
1712         Some cleanup in event handling code.
1713
1714         * bindings/js/JSDOMGlobalObject.cpp:
1715         * bindings/js/JSDOMGlobalObject.h: Removed findJSProtectedEventListener
1716         and findJSProtectedEventListener because they are now unused.
1717
1718         * bindings/js/JSEventListener.cpp:
1719         * bindings/js/JSEventListener.h:
1720         (WebCore::JSEventListener::clearGlobalObject):
1721         * bindings/js/JSLazyEventListener.cpp:
1722         (WebCore::JSLazyEventListener::JSLazyEventListener):
1723         (WebCore::JSLazyEventListener::~JSLazyEventListener):
1724         (WebCore::JSLazyEventListener::globalObject):
1725         * bindings/js/JSLazyEventListener.h:
1726         (WebCore::JSLazyEventListener::clearGlobalObject): Nixed JSProtectedEventListener,
1727         and merged it with JSLazyEventListener, the only remaining event listener
1728         that still GC-protects its function and global object.
1729
1730         * bindings/js/ScriptController.cpp:
1731         (WebCore::ScriptController::ScriptController):
1732         * bindings/js/ScriptController.h:
1733         (WebCore::ScriptController::setEventHandlerLineNumber):
1734         (WebCore::ScriptController::eventHandlerLineNumber): Renamed handlerLineno =>
1735         handlerLineNumber, because anything less would be uncivilized. Removed
1736         createInlineEventListener because it mostly did irrelevent work, so it
1737         just got in the way of understanding how event handler creation works.
1738
1739         * dom/Document.cpp:
1740         (WebCore::Document::createEventListener):
1741         * dom/XMLTokenizerLibxml2.cpp:
1742         (WebCore::XMLTokenizer::startElementNs):
1743         * html/HTMLTokenizer.cpp:
1744         (WebCore::HTMLTokenizer::processToken): Ditto.
1745
1746 2009-04-16  Beth Dakin  <bdakin@apple.com>
1747
1748         Reviewed by Dave Hyatt.
1749
1750         Fix for https://bugs.webkit.org/show_bug.cgi?id=20765 Website 
1751         crashes on load due to messy HTML in search form
1752         -and corresponding-
1753         <rdar://problem/6210633>
1754
1755         Before this patch, <form>s were allowed to sit inside tables 
1756         without being wrapped by anonymous table parts. There was also a 
1757         concept that such a form could be "demoted" and would not be 
1758         allowed to have any children. This patch has the HTML parser mark 
1759         form elements that have been demoted as such, and then the demoted 
1760         forms are not given renderers. I also removed the code that allowed 
1761         forms to sit in tables without anonymous table sections. So now any 
1762         forms that do manage to get a renderer inside a table will also be 
1763         wrapped with appropriate table parts.
1764
1765         * html/HTMLFormElement.cpp:
1766         (WebCore::HTMLFormElement::HTMLFormElement):
1767         (WebCore::HTMLFormElement::rendererIsNeeded):
1768         * html/HTMLFormElement.h:
1769         (WebCore::HTMLFormElement::setDemoted):
1770         (WebCore::HTMLFormElement::isDemoted):
1771         * html/HTMLParser.cpp:
1772         (WebCore::HTMLParser::insertNode):
1773         * rendering/RenderTable.cpp:
1774         (WebCore::RenderTable::addChild):
1775         * rendering/RenderTableRow.cpp:
1776         (WebCore::RenderTableRow::addChild):
1777         * rendering/RenderTableSection.cpp:
1778         (WebCore::RenderTableSection::addChild):
1779
1780 2009-04-16  Xiaomei Ji  <xji@chromium.org>
1781
1782         Reviewed by Simon Fraser.
1783
1784         Fix https://bugs.webkit.org/show_bug.cgi?id=24527
1785         caret does not paint the first time you focus on a 0px right padding RTL div
1786
1787         Test: fast/forms/caret-rtl.html
1788
1789         * rendering/RenderBlock.cpp:
1790         (WebCore::RenderBlock::localCaretRect): When calculating x-axis if 
1791         alignment is alignRight, we need to subtract the caretWidth so that the
1792         caret at IntRect(x, y, caretWidth, height) is inside the block.
1793
1794 2009-04-16  Justin Garcia  <justin.garcia@apple.com>
1795
1796         Reviewed by Simon Fraser.
1797
1798         https://bugs.webkit.org/show_bug.cgi?id=25228
1799         SelectionController::absoluteCaretBounds returns an inflated caret (the caret repaint rect)
1800         
1801         Return the bounds of the transformed caret, not the transformed repaint rect for the caret (which is inflated).
1802
1803         * editing/SelectionController.cpp:
1804         (WebCore::SelectionController::localCaretRect):
1805         (WebCore::SelectionController::absoluteBoundsForLocalRect):
1806         (WebCore::SelectionController::caretRepaintRect):
1807         (WebCore::SelectionController::recomputeCaretRect):
1808         * editing/SelectionController.h:
1809
1810 2009-04-16  Pierre d'Herbemont  <pdherbemont@apple.com>
1811
1812         Reviewed by Simon Fraser.
1813
1814         https://bugs.webkit.org/show_bug.cgi?id=25187
1815         Bug 25187: <video> may not be rendered upon certain racy conditions
1816
1817         Always create the video renderer when the load state reaches QTMovieLoadStateLoaded and
1818         the element is visible, not just when the movie has just been opened.
1819
1820         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1821         (WebCore::MediaPlayerPrivate::updateStates): Make sure we do not make false
1822         assumption on the state changes order. Create the renderer if none is present,
1823         when movie is loaded instead.
1824
1825 2009-04-16  Eric Seidel  <eric@webkit.org>
1826
1827         Reviewed by Geoffrey Garen.
1828
1829         Add filterBoundingBox() to RenderSVGModelObject to share a tiny bit of code
1830
1831         RenderSVGModelObject has much more interesting code it can share,
1832         but I'm just trying to get the commits out of my local branch and into
1833         the repository in any order I can. :)  This one was small.
1834
1835         This will be used by the unified RenderSVGModelObject
1836         clippedOverflowRectForRepaint patch coming soon.
1837
1838         * rendering/RenderPath.cpp:
1839         (WebCore::RenderPath::clippedOverflowRectForRepaint):
1840         * rendering/RenderSVGContainer.cpp:
1841         (WebCore::RenderSVGContainer::clippedOverflowRectForRepaint):
1842         * rendering/RenderSVGModelObject.cpp:
1843         (WebCore::RenderSVGModelObject::filterBoundingBox):
1844         * rendering/RenderSVGModelObject.h:
1845
1846 2009-04-16  Geoffrey Garen  <ggaren@apple.com>
1847
1848         Reviewed by Eric Seidel and Adam Roben.
1849
1850         More fix for https://bugs.webkit.org/show_bug.cgi?id=21260
1851         Unbounded memory growth when churning elements with anonymous event handler functions
1852         
1853         Simplified some EventHandler creation code.
1854         
1855         Removed a pile of code whose sole purpose was to allow SVG event handlers
1856         to supply a parameter named "evt" instead of the normal "event", and
1857         replaced it with a single parameter to JSLazyEventListener's constructor
1858         specifying the parameter name to use.
1859
1860         * bindings/js/JSDOMWindowBase.h:
1861         * bindings/js/JSLazyEventListener.cpp:
1862         (WebCore::JSLazyEventListener::JSLazyEventListener):
1863         (WebCore::JSLazyEventListener::parseCode):
1864         * bindings/js/JSLazyEventListener.h:
1865         (WebCore::JSLazyEventListener::create):
1866         * bindings/js/ScriptController.cpp:
1867         (WebCore::ScriptController::createInlineEventListener):
1868         * bindings/js/ScriptController.h:
1869         * dom/Document.cpp:
1870         (WebCore::Document::createEventListener):
1871
1872 2009-04-15  Eric Seidel  <eric@webkit.org>
1873
1874         Reviewed by David Hyatt.
1875
1876         Split out objectBoundingBox and repaintRectInLocalCoordinates from relativeBBox
1877         in preparation for simplifying (and fixing) repaint logic in the SVG rendering tree.
1878         https://bugs.webkit.org/show_bug.cgi?id=25224
1879
1880         objectBoundingBox() matches the SVG 1.1 concept of a "bounding box"
1881
1882         repaintRectInLocalCoordinates() should return the a rect covering all painted content.
1883         However, repaintRectInLocalCoordinates() still only returns the "stroke bounding box"
1884         in this patch.  In a future patch, repaintRectInLocalCoordinates will be fixed to return
1885         a rect covering all painted content.  In order to avoid changing several hundred layout test results, I've left
1886         the behavior as-is for now.  The returned rect is used by various repaintRectInLocalCoordinates
1887         implementations and sometimes adjusted to include all painted content, but not always, and
1888         the places where the adjustments are made are sometimes wrong.  Again, will be fixed in
1889         an upcoming patch.
1890
1891         This patch discovered a bug in Font::drawTextUsingSVGFont, which is probably causing
1892         bounding-box relative gradients on SVGFont glyphs to not paint correctly.
1893         I chose not to try and fix the bug in this patch and instead left a FIXME.
1894
1895         This patch also discovered that at least tspan.getBBox() is broken.  This
1896         along with the foreignObject.getBBox() change will be tested (and fixed) in a
1897         later patch.  https://bugs.webkit.org/show_bug.cgi?id=25225
1898
1899         No change in behavior (besides the above mentioned foreignObject.getBBox()), thus no tests.
1900
1901         * rendering/RenderForeignObject.cpp:
1902         (WebCore::RenderForeignObject::objectBoundingBox): this is a behavior improvement for getBBox() test case coming in a later patch
1903         (WebCore::RenderForeignObject::repaintRectInLocalCoordinates): only really used for layout test results, might some day be used for repaint.
1904         * rendering/RenderForeignObject.h:
1905         * rendering/RenderObject.cpp:
1906         (WebCore::RenderObject::objectBoundingBox): new methods, ASSERT if used but not implemented.
1907         (WebCore::RenderObject::repaintRectInLocalCoordinates):
1908         * rendering/RenderObject.h:
1909         * rendering/RenderPath.cpp:
1910         (WebCore::RenderPath::objectBoundingBox):
1911         (WebCore::RenderPath::repaintRectInLocalCoordinates):
1912         (WebCore::RenderPath::clippedOverflowRectForRepaint):
1913         (WebCore::RenderPath::lineHeight):
1914         (WebCore::RenderPath::baselinePosition):
1915         (WebCore::RenderPath::paint):
1916         (WebCore::RenderPath::addFocusRingRects):
1917         * rendering/RenderPath.h:
1918         * rendering/RenderSVGContainer.cpp:
1919         (WebCore::RenderSVGContainer::paint):
1920         (WebCore::RenderSVGContainer::objectBoundingBox):
1921         (WebCore::RenderSVGContainer::repaintRectInLocalCoordinates):
1922         * rendering/RenderSVGContainer.h:
1923         * rendering/RenderSVGGradientStop.h:
1924         (WebCore::RenderSVGGradientStop::objectBoundingBox):
1925         (WebCore::RenderSVGGradientStop::repaintRectInLocalCoordinates):
1926         * rendering/RenderSVGHiddenContainer.cpp:
1927         (WebCore::RenderSVGHiddenContainer::objectBoundingBox):
1928         (WebCore::RenderSVGHiddenContainer::repaintRectInLocalCoordinates):
1929         * rendering/RenderSVGHiddenContainer.h:
1930         * rendering/RenderSVGImage.cpp:
1931         (WebCore::RenderSVGImage::objectBoundingBox):
1932         (WebCore::RenderSVGImage::repaintRectInLocalCoordinates):
1933         (WebCore::RenderSVGImage::calculateAbsoluteBounds):
1934         (WebCore::RenderSVGImage::addFocusRingRects):
1935         * rendering/RenderSVGImage.h:
1936         * rendering/RenderSVGRoot.cpp:
1937         (WebCore::RenderSVGRoot::paint):
1938         (WebCore::RenderSVGRoot::objectBoundingBox):
1939         (WebCore::RenderSVGRoot::repaintRectInLocalCoordinates):
1940         * rendering/RenderSVGRoot.h:
1941         * rendering/RenderSVGTSpan.h:
1942         (WebCore::RenderSVGTSpan::objectBoundingBox):
1943         (WebCore::RenderSVGTSpan::repaintRectInLocalCoordinates):
1944         * rendering/RenderSVGText.cpp:
1945         (WebCore::RenderSVGText::clippedOverflowRectForRepaint):
1946         (WebCore::RenderSVGText::absoluteRects):
1947         (WebCore::RenderSVGText::absoluteQuads):
1948         (WebCore::RenderSVGText::objectBoundingBox):
1949         (WebCore::RenderSVGText::repaintRectInLocalCoordinates):
1950         * rendering/RenderSVGText.h:
1951         * rendering/RenderSVGViewportContainer.cpp:
1952         (WebCore::RenderSVGViewportContainer::viewportTransform):
1953         * rendering/SVGRenderSupport.cpp:
1954         (WebCore::computeContainerBoundingBox):
1955         * rendering/SVGRenderSupport.h:
1956         * rendering/SVGRenderTreeAsText.cpp:
1957         (WebCore::operator<<):
1958         * svg/SVGFont.cpp:
1959         (WebCore::Font::drawTextUsingSVGFont):
1960         * svg/SVGLocatable.cpp:
1961         (WebCore::SVGLocatable::getBBox):
1962         * svg/SVGPatternElement.cpp:
1963         (WebCore::SVGPatternElement::buildPattern):
1964         * svg/graphics/SVGPaintServerGradient.cpp:
1965         (WebCore::createMaskAndSwapContextForTextGradient):
1966         (WebCore::clipToTextMask):
1967         (WebCore::SVGPaintServerGradient::setup):
1968         * svg/graphics/SVGPaintServerPattern.cpp:
1969         (WebCore::SVGPaintServerPattern::setup):
1970
1971 2009-04-16  Dan Bernstein  <mitz@apple.com>
1972
1973         Reviewed by Darin Adler.
1974
1975         - fix <rdar://problem/6032139> Table cell widths calculated
1976           incorrectly on table that uses table-layout:fixed, colspans, and a mix
1977           of percentage and pixel widths
1978
1979         Test: fast/table/fixed-granular-cols.html
1980
1981         The incorrect widths resulted from incorrect handling of the case where
1982         the <col> elements are more granular than the table cells.
1983
1984         * rendering/FixedTableLayout.cpp:
1985         (WebCore::FixedTableLayout::calcWidthArray): When processing <col>
1986         elements, append effective columns or split existing effective columns
1987         as needed.
1988
1989 2009-04-16  Alexey Proskuryakov  <ap@webkit.org>
1990
1991         <rdar://problem/6795285> Infinite recursion in ResourceHandle::receivedRequestToContinueWithoutCredential
1992
1993         Rolled out <http://trac.webkit.org/projects/webkit/changeset/42536> - the two instances of
1994         authentication challenge are different, after all. Added a FIXME comment about a possible
1995         future improvement.
1996
1997         * platform/network/ResourceHandle.cpp:
1998         (WebCore::ResourceHandle::clearAuthentication):
1999         * platform/network/ResourceHandleInternal.h:
2000         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2001         * platform/network/cf/ResourceHandleCFNet.cpp:
2002         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2003         (WebCore::ResourceHandle::receivedCredential):
2004         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
2005         (WebCore::ResourceHandle::receivedCancellation):
2006         * platform/network/mac/ResourceHandleMac.mm:
2007         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2008         (WebCore::ResourceHandle::didCancelAuthenticationChallenge):
2009         (WebCore::ResourceHandle::receivedCredential):
2010         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
2011         (WebCore::ResourceHandle::receivedCancellation):
2012
2013 2009-04-15  Geoffrey Garen  <ggaren@apple.com>
2014
2015         Reviewed by Sam Weinig.
2016         
2017         More fix for https://bugs.webkit.org/show_bug.cgi?id=21260
2018         Unbounded memory growth when churning elements with anonymous event handler functions
2019
2020         Also fixed <rdar://problem/6792909> WebInspector crashes when reloading
2021         a page with breakpoints set
2022         
2023         * bindings/js/JSEventListener.cpp:
2024         (WebCore::JSEventListener::clearJSFunctionInline):
2025         (WebCore::JSEventListener::markJSFunction):
2026         * bindings/js/JSEventListener.h: Actually clear our function and global
2027         object pointers when our client instructs us to. (Oops!) Also, mark
2028         our global object while we still intend to use it.
2029
2030         * bindings/js/JSSVGElementInstanceCustom.cpp:
2031         (WebCore::JSSVGElementInstance::mark):
2032         (WebCore::toJS):
2033         * bindings/scripts/CodeGeneratorJS.pm:
2034         * svg/SVGElementInstance.idl: For every SVGElementInstance wrapper, ensure
2035         that the corresponding element also has a wrapper, to keep its event
2036         listeners alive.
2037
2038 2009-04-15  Dimitri Glazkov  <dglazkov@chromium.org>
2039
2040         Reviewed by Darin Fisher.
2041
2042         https://bugs.webkit.org/show_bug.cgi?id=25201
2043         Add ScriptFunctionCall/ScriptObject for V8.
2044
2045         * bindings/v8/ScriptFunctionCall.cpp: Added.
2046         * bindings/v8/ScriptFunctionCall.h: Added.
2047         * bindings/v8/ScriptObject.cpp: Added.
2048         * bindings/v8/ScriptObject.h: Added.
2049         * bindings/v8/ScriptObjectQuarantine.cpp: Added.
2050         * bindings/v8/ScriptObjectQuarantine.h: Added.
2051         * bindings/v8/ScriptScope.cpp: Added.
2052         * bindings/v8/ScriptScope.h: Added.
2053         * bindings/v8/ScriptState.h:
2054         (WebCore::ScriptState::ScriptState): Added new constructors.
2055         (WebCore::ScriptState::frame): Added Frame ptr accessor.
2056         * bindings/v8/ScriptString.h:
2057         (WebCore::ScriptString::ScriptString): Added default constructor.
2058         * bindings/v8/ScriptValue.h:
2059         (WebCore::ScriptValue::isEqual): Added.
2060
2061 2009-04-15  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2062
2063         Unreviewed build fix. Add RenderSVGModelObject.* to GTK+'s build.
2064
2065         * GNUmakefile.am:
2066
2067 2009-04-15  Steve Falkenburg  <sfalken@apple.com>
2068
2069         <rdar://problem/6785760> WebCore should use a maximum of 6 connections per host, not 4
2070
2071         Reviewed by Adam Roben.
2072
2073         * platform/network/ResourceRequestBase.cpp:
2074         * platform/network/cf/ResourceRequestCFNet.cpp:
2075         (WebCore::initializeMaximumHTTPConnectionCountPerHost):
2076
2077 2009-04-15  Sam Weinig  <sam@webkit.org>
2078
2079         Reviewed by Mark Rowe.
2080
2081         Add special casing to bindings generator so that custom functions
2082         starting with xml or xslt conform to WebKit style guidelines.
2083
2084         * bindings/js/JSDOMWindowCustom.cpp:
2085         (WebCore::JSDOMWindow::xmlHttpRequest):
2086         (WebCore::JSDOMWindow::xsltProcessor):
2087         * bindings/scripts/CodeGenerator.pm:
2088
2089 2009-04-15  Eric Seidel  <eric@webkit.org>
2090
2091         Reviewed by Simon Fraser.
2092
2093         Add minimal RenderSVGModelObject and make RenderPath and RenderSVGContainer use it.
2094         https://bugs.webkit.org/show_bug.cgi?id=25221
2095         
2096         RenderSVGModelObject is the base rendering class for things which live
2097         in the SVG rendering tree.  Not all SVG renders are RenderSVGModelObjects yet.
2098         
2099         More patches coming.  This is just adding the class, future patches
2100         will pull more logic out of RenderPath and RenderSVGContainer into RenderSVGModelObject.
2101
2102         * WebCore.pro:
2103         * WebCore.scons:
2104         * WebCore.vcproj/WebCore.vcproj:
2105         * WebCore.xcodeproj/project.pbxproj:
2106         * rendering/RenderPath.cpp:
2107         (WebCore::RenderPath::RenderPath):
2108         * rendering/RenderPath.h:
2109         * rendering/RenderSVGContainer.cpp:
2110         (WebCore::RenderSVGContainer::RenderSVGContainer):
2111         * rendering/RenderSVGContainer.h:
2112         * rendering/RenderSVGModelObject.cpp: Added.
2113         (WebCore::RenderSVGModelObject::RenderSVGModelObject):
2114         * rendering/RenderSVGModelObject.h: Added.
2115         (WebCore::RenderSVGModelObject::requiresLayer):
2116         * rendering/RenderTreeAsText.cpp:
2117         * rendering/SVGRenderTreeAsText.cpp:
2118
2119 2009-04-15  Eric Seidel  <eric@webkit.org>
2120
2121         Reviewed by Simon Fraser.
2122
2123         Remove more dead code from RenderSVGHiddenContainer.
2124
2125         lineHeight and baselinePosition used to be on RenderSVGContainer
2126         (of which this is a subclass) because RenderSVGContainer used
2127         to be a RenderBox and always the renderer for <svg>
2128         Now <svg> uses RenderSVGRoot when needing a RenderBox (inside HTML)
2129         and RenderSVGViewportContainer (when inside SVG content)
2130         so there is no need for RenderSVGHiddenContainer to have these HTML-specific methods.
2131
2132         * rendering/RenderSVGHiddenContainer.cpp:
2133         * rendering/RenderSVGHiddenContainer.h:
2134
2135 2009-04-15  Eric Seidel  <eric@webkit.org>
2136
2137         Reviewed by Simon Fraser.
2138
2139         Remove unneeded (broken) code from SVG renderers
2140         https://bugs.webkit.org/show_bug.cgi?id=25214
2141
2142         Mostly due to my historical confusions about the render tree
2143         and some methods not being removed after classes were split.
2144
2145         RenderSVGRoot is an RenderBox and should just use all the
2146         standard RenderBox methods for inspector and repaint rects.
2147
2148         RenderSVGContainer is *not* a RenderBox (any more) and thus
2149         doesn't need lineHeight or width/height or calcBounds.
2150
2151         RenderSVGViewportContainer had some broken code which tried
2152         to see if the click was inside the container at all, but it
2153         was using width/height metrics based off of the containing
2154         block (from calcWidth) which is wrong (since its real
2155         width/height are from its containing viewport not containing block).
2156
2157         * rendering/RenderSVGContainer.cpp:
2158         (WebCore::RenderSVGContainer::RenderSVGContainer):
2159         (WebCore::RenderSVGContainer::layout):
2160         * rendering/RenderSVGContainer.h:
2161         * rendering/RenderSVGRoot.cpp:
2162         * rendering/RenderSVGRoot.h:
2163         * rendering/RenderSVGViewportContainer.cpp:
2164         (WebCore::RenderSVGViewportContainer::layout):
2165         (WebCore::RenderSVGViewportContainer::nodeAtPoint):
2166
2167 2009-04-15  Eric Seidel  <eric@webkit.org>
2168
2169         Reviewed by Simon Fraser and Sam Weinig.
2170
2171         https://bugs.webkit.org/show_bug.cgi?id=25217
2172         Simplify nearestViewportElement and farthestViewportElement using isViewportElement and a for loop
2173         Add ASSERT(element) to all these functions since they should never be passed a null element.
2174
2175         * svg/SVGLocatable.cpp:
2176         (WebCore::isViewportElement):
2177         (WebCore::SVGLocatable::nearestViewportElement):
2178         (WebCore::SVGLocatable::farthestViewportElement):
2179         (WebCore::SVGLocatable::getBBox):
2180         (WebCore::SVGLocatable::getCTM):
2181         (WebCore::SVGLocatable::getScreenCTM):
2182
2183 2009-04-15  Sam Weinig  <sam@webkit.org>
2184
2185         Reviewed by Anders Carlsson.
2186
2187         Remove support for the ObjCIvar extended attribute from the Objective-C
2188         bindings generator.  It is not used anymore.
2189
2190         * bindings/scripts/CodeGeneratorObjC.pm:
2191
2192 2009-04-15  Justin Garcia  <justin.garcia@apple.com>
2193
2194         Reviewed by Dan Bernstein.
2195
2196         https://bugs.webkit.org/show_bug.cgi?id=25204
2197         Create a fast path for ReplaceSelectionCommand that merges text nodes
2198         
2199         During simple pastes, where we're just pasting a text node into a run of text, we would split the current
2200         text and insert the new node in between.  This is slow and we hit this bug:
2201
2202         https://bugs.webkit.org/show_bug.cgi?id=6148
2203
2204         in the layout and rendering code where adjacent text nodes don't shape correctly in Arabic.
2205         
2206         This change creates a fast path for ReplaceSelectionCommand that inserts text directly into the
2207         text node that holds the selection (very similar to the fast path we wrote for InsertTextCommand).
2208
2209         * editing/ReplaceSelectionCommand.cpp:
2210         (WebCore::ReplaceSelectionCommand::doApply):
2211         (WebCore::ReplaceSelectionCommand::performTrivialReplace):
2212         * editing/ReplaceSelectionCommand.h:
2213         * editing/TextIterator.cpp:
2214
2215 2009-04-15  Adam Langley  <agl@google.com>
2216
2217         Reviewed by Darin Fisher.
2218
2219         Move VDMX parsing into the Chromium Linux port.
2220
2221         https://bugs.webkit.org/show_bug.cgi?id=25116
2222
2223         VDMX tables are optional tables in TrueType fonts which contain the
2224         exact pixel height of a given font at a given pel size. In order to
2225         match Windows font metrics we have to use these numbers.
2226
2227         Previously, the parsing was performed in Skia. As part of the merge
2228         with upstream Skia, an interface for getting table data from a font
2229         has been added to Skia and we're moving the parsing into WebKit.
2230
2231         This does not change any layout tests.
2232
2233         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
2234         (WebCore::FontPlatformData::uniqueID):
2235         * platform/graphics/chromium/FontPlatformDataLinux.h:
2236         * platform/graphics/chromium/FontTrueTypeLinux.cpp: Added.
2237         * platform/graphics/chromium/FontTrueTypeLinux.h: Added.
2238         * platform/graphics/chromium/SimpleFontDataLinux.cpp:
2239         (WebCore::SimpleFontData::platformInit):
2240         (WebCore::SimpleFontData::platformWidthForGlyph):
2241
2242 2009-04-15  Stephen White  <senorblanco@chromium.org>
2243
2244         Reviewed by Dimitri Glazkov.
2245
2246         https://bugs.webkit.org/show_bug.cgi?id=25180
2247
2248         Restore stroked outlines to PlatformContextSkia::drawRect().
2249         These were removed inadvertently in r41805, aka
2250         https://bugs.webkit.org/show_bug.cgi?id=24662.
2251         SkRect is { left, top, right, bottom }, not { left, top, width, height }.
2252
2253         * platform/graphics/skia/PlatformContextSkia.cpp:
2254         (PlatformContextSkia::drawRect):
2255
2256 2009-04-15  Dan Bernstein  <mitz@apple.com>
2257
2258         Reviewed by Dave Hyatt.
2259
2260         - fix <rdar://problem/6777374> Generated content with display: run-in
2261           causes a crash
2262
2263         Test: fast/runin/generated.html
2264
2265         * rendering/RenderBlock.cpp:
2266         (WebCore::RenderBlock::handleRunInChild): Check if the run-in block is
2267         generated, and if so, make the RenderInline anonymous instead of passing
2268         a 0 node to the RenderInline constructor. If the run-in itself is
2269         generated, do move :before and :after children from the block into the
2270         inline, as they will not be regenerated. Changed nested ifs into early
2271         returns.
2272
2273 2009-04-15  Eric Roman  <eroman@chromium.org>
2274
2275         Reviewed by Geoffrey Garen.
2276
2277         https://bugs.webkit.org/show_bug.cgi?id=25192
2278
2279         Expose DOMWindow::removeInlineEventListenerForType and
2280         DOMWindow::inlineEventListenerForType as public.
2281
2282         * page/DOMWindow.h:
2283
2284 2009-04-14  Eric Roman  <eroman@chromium.org>
2285
2286         Reviewed by Darin Adler.
2287
2288         https://bugs.webkit.org/show_bug.cgi?id=25198
2289
2290         Wrap RegisteredEventListener's markEventListeners and invalidateEventListeners
2291         in a USE(JSC), since it doesn't compile with V8 bindings.
2292
2293         * dom/RegisteredEventListener.h:
2294
2295 2009-04-15  Eric Roman  <eroman@chromium.org>
2296
2297         Reviewed by Darin Adler.
2298
2299         https://bugs.webkit.org/show_bug.cgi?id=25194
2300
2301         Fix a caller of Settings::javaScriptCanOpenWindowsAutomatically() to
2302         use the new name.
2303
2304         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2305
2306 2009-04-14  Alexey Proskuryakov  <ap@webkit.org>
2307
2308         Rubber-stamped by Darin Adler.
2309
2310         Don't keep platform objects for authentication challenge in ResourceHandleInternal.
2311         We already have a copy in AuthenticationChallenge object.
2312
2313         * platform/network/ResourceHandle.cpp:
2314         (WebCore::ResourceHandle::clearAuthentication):
2315         * platform/network/ResourceHandleInternal.h:
2316         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2317         * platform/network/cf/ResourceHandleCFNet.cpp:
2318         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2319         (WebCore::ResourceHandle::receivedCredential):
2320         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
2321         (WebCore::ResourceHandle::receivedCancellation):
2322         * platform/network/mac/ResourceHandleMac.mm:
2323         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2324         (WebCore::ResourceHandle::didCancelAuthenticationChallenge):
2325         (WebCore::ResourceHandle::receivedCredential):
2326         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
2327         (WebCore::ResourceHandle::receivedCancellation):
2328
2329 2009-04-14  Geoffrey Garen  <ggaren@apple.com>
2330
2331         Reviewed by Sam Weinig.
2332
2333         Nixed some now-defunct autogeneration code.
2334
2335         * bindings/scripts/CodeGeneratorJS.pm:
2336
2337 2009-04-14  Eric Carlson  <eric.carlson@apple.com>
2338
2339         Reviewed by Alexey Proskuryakov.
2340         
2341         Fix <rdar://problem/6755724> <audio> and <video> elements can reference local 
2342         file:/// URLs from remote in Safari
2343
2344         Tests: http/tests/security/local-video-poster-from-remote.html
2345                http/tests/security/local-video-source-from-remote.html
2346                http/tests/security/local-video-src-from-remote.html
2347
2348         * html/HTMLMediaElement.cpp:
2349         (WebCore::HTMLMediaElement::loadResource): Don't pass url to media engine unless loader->canLoad()
2350         says it is OK.
2351
2352 2009-04-14  Sam Weinig  <sam@webkit.org>
2353
2354         Reviewed by Darin Adler.
2355
2356         Part of <rdar://problem/6150868>
2357         Fix incorrect handling of content that needs to go into the head element
2358         once the head element has been removed.
2359
2360         Test: fast/parser/head-content-after-head-removal.html
2361
2362         * html/HTMLParser.cpp:
2363         (WebCore::HTMLParser::HTMLParser): Remove unneeded initializer of m_head.
2364         (WebCore::HTMLParser::handleError): Update since m_head is now a RefPtr.
2365         (WebCore::HTMLParser::createHead): Ditto.
2366         * html/HTMLParser.h: Make m_head a RefPtr.
2367
2368 2009-04-14  Geoffrey Garen  <ggaren@apple.com>
2369
2370         Used svn merge -r42529:42528 to roll out my last patch because it broke
2371         the build.
2372
2373         * bindings/js/JSDOMGlobalObject.cpp:
2374         (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject):
2375         (WebCore::JSDOMGlobalObject::findJSProtectedEventListener):
2376         (WebCore::JSDOMGlobalObject::findOrCreateJSProtectedEventListener):
2377         (WebCore::JSDOMGlobalObject::jsProtectedEventListeners):
2378         (WebCore::JSDOMGlobalObject::jsProtectedInlineEventListeners):
2379         * bindings/js/JSDOMGlobalObject.h:
2380
2381 2009-04-14  Geoffrey Garen  <ggaren@apple.com>
2382
2383         Reviewed by Sam Weinig.
2384
2385         Nixed some now-dead code related to protected event listeners.
2386
2387         * bindings/js/JSDOMGlobalObject.cpp:
2388         (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject):
2389         * bindings/js/JSDOMGlobalObject.h:
2390
2391 2009-04-14  Geoffrey Garen  <ggaren@apple.com>
2392
2393         Reviewed by Sam Weinig.
2394
2395         More fix for https://bugs.webkit.org/show_bug.cgi?id=21260
2396         Unbounded memory growth when churning elements with anonymous event handler functions
2397
2398         Stop using protected event listeners on SVGElementInstance.
2399
2400         * bindings/js/JSSVGElementInstanceCustom.cpp:
2401         (WebCore::JSSVGElementInstance::mark): Mark our event listeners, since
2402         they're not protected anymore.
2403
2404         (WebCore::JSSVGElementInstance::addEventListener):
2405         (WebCore::JSSVGElementInstance::removeEventListener): Make unprotected
2406         event listeners, since we mark them now.
2407
2408         * bindings/scripts/CodeGeneratorJS.pm: Autogenerate event listener
2409         invalidation for SVGElementInstance.
2410
2411         * svg/SVGElementInstance.h:
2412         (WebCore::SVGElementInstance::eventListeners): Added an accessor, for
2413         the sake of autogenerated code.
2414
2415         * svg/SVGElementInstance.idl: Removed the ProtectedEventListener attribute
2416         from event listener properties. Added a CustomMarkFunction attribute,
2417         since we need to mark our event listeners.
2418
2419 2009-04-14  Steve Falkenburg  <sfalken@apple.com>
2420
2421         Windows build fix.
2422
2423         * WebCore.vcproj/WebCore.vcproj:
2424
2425 2009-04-14  Steve Falkenburg  <sfalken@apple.com>
2426
2427         Add header guards to WebCore forwarding headers.
2428         
2429         Speeds up WebCore debug build on Windows by 12% on my system,
2430         since Visual Studio appears to not optimize for standard header
2431         guards in included files.
2432         
2433         Rubber stamped by Ada Chan.
2434
2435         * ForwardingHeaders/debugger/Debugger.h:
2436         * ForwardingHeaders/debugger/DebuggerActivation.h:
2437         * ForwardingHeaders/debugger/DebuggerCallFrame.h:
2438         * ForwardingHeaders/interpreter/CallFrame.h:
2439         * ForwardingHeaders/interpreter/Interpreter.h:
2440         * ForwardingHeaders/masm/X86Assembler.h:
2441         * ForwardingHeaders/parser/Parser.h:
2442         * ForwardingHeaders/parser/SourceCode.h:
2443         * ForwardingHeaders/parser/SourceProvider.h:
2444         * ForwardingHeaders/pcre/pcre.h:
2445         * ForwardingHeaders/profiler/Profile.h:
2446         * ForwardingHeaders/profiler/ProfileNode.h:
2447         * ForwardingHeaders/profiler/Profiler.h:
2448         * ForwardingHeaders/runtime/ArgList.h:
2449         * ForwardingHeaders/runtime/ArrayPrototype.h:
2450         * ForwardingHeaders/runtime/BooleanObject.h:
2451         * ForwardingHeaders/runtime/CallData.h:
2452         * ForwardingHeaders/runtime/Collector.h:
2453         * ForwardingHeaders/runtime/CollectorHeapIterator.h:
2454         * ForwardingHeaders/runtime/Completion.h:
2455         * ForwardingHeaders/runtime/ConstructData.h:
2456         * ForwardingHeaders/runtime/DateInstance.h:
2457         * ForwardingHeaders/runtime/Error.h:
2458         * ForwardingHeaders/runtime/FunctionConstructor.h:
2459         * ForwardingHeaders/runtime/FunctionPrototype.h:
2460         * ForwardingHeaders/runtime/Identifier.h:
2461         * ForwardingHeaders/runtime/InitializeThreading.h:
2462         * ForwardingHeaders/runtime/InternalFunction.h:
2463         * ForwardingHeaders/runtime/JSArray.h:
2464         * ForwardingHeaders/runtime/JSByteArray.h:
2465         * ForwardingHeaders/runtime/JSFunction.h:
2466         * ForwardingHeaders/runtime/JSGlobalData.h:
2467         * ForwardingHeaders/runtime/JSGlobalObject.h:
2468         * ForwardingHeaders/runtime/JSLock.h:
2469         * ForwardingHeaders/runtime/JSNumberCell.h:
2470         * ForwardingHeaders/runtime/JSObject.h:
2471         * ForwardingHeaders/runtime/JSString.h:
2472         * ForwardingHeaders/runtime/JSValue.h:
2473         * ForwardingHeaders/runtime/Lookup.h:
2474         * ForwardingHeaders/runtime/ObjectPrototype.h:
2475         * ForwardingHeaders/runtime/Operations.h:
2476         * ForwardingHeaders/runtime/PropertyMap.h:
2477         * ForwardingHeaders/runtime/PropertyNameArray.h:
2478         * ForwardingHeaders/runtime/Protect.h:
2479         * ForwardingHeaders/runtime/PrototypeFunction.h:
2480         * ForwardingHeaders/runtime/StringObject.h:
2481         * ForwardingHeaders/runtime/StringObjectThatMasqueradesAsUndefined.h:
2482         * ForwardingHeaders/runtime/StringPrototype.h:
2483         * ForwardingHeaders/runtime/Structure.h:
2484         * ForwardingHeaders/runtime/SymbolTable.h:
2485         * ForwardingHeaders/runtime/UString.h:
2486         * ForwardingHeaders/wrec/WREC.h:
2487         * ForwardingHeaders/wtf/ASCIICType.h:
2488         * ForwardingHeaders/wtf/AlwaysInline.h:
2489         * ForwardingHeaders/wtf/Assertions.h:
2490         * ForwardingHeaders/wtf/ByteArray.h:
2491         * ForwardingHeaders/wtf/CurrentTime.h:
2492         * ForwardingHeaders/wtf/Deque.h:
2493         * ForwardingHeaders/wtf/DisallowCType.h:
2494         * ForwardingHeaders/wtf/FastMalloc.h:
2495         * ForwardingHeaders/wtf/Forward.h:
2496         * ForwardingHeaders/wtf/GetPtr.h:
2497         * ForwardingHeaders/wtf/HashCountedSet.h:
2498         * ForwardingHeaders/wtf/HashFunctions.h:
2499         * ForwardingHeaders/wtf/HashMap.h:
2500         * ForwardingHeaders/wtf/HashSet.h:
2501         * ForwardingHeaders/wtf/HashTable.h:
2502         * ForwardingHeaders/wtf/HashTraits.h:
2503         * ForwardingHeaders/wtf/ListHashSet.h:
2504         * ForwardingHeaders/wtf/ListRefPtr.h:
2505         * ForwardingHeaders/wtf/Locker.h:
2506         * ForwardingHeaders/wtf/MainThread.h:
2507         * ForwardingHeaders/wtf/MathExtras.h:
2508         * ForwardingHeaders/wtf/MessageQueue.h:
2509         * ForwardingHeaders/wtf/Noncopyable.h:
2510         * ForwardingHeaders/wtf/NotFound.h:
2511         * ForwardingHeaders/wtf/OwnArrayPtr.h:
2512         * ForwardingHeaders/wtf/OwnPtr.h:
2513         * ForwardingHeaders/wtf/PassRefPtr.h:
2514         * ForwardingHeaders/wtf/Platform.h:
2515         * ForwardingHeaders/wtf/PtrAndFlags.h:
2516         * ForwardingHeaders/wtf/RandomNumber.h:
2517         * ForwardingHeaders/wtf/RefCounted.h:
2518         * ForwardingHeaders/wtf/RefCountedLeakCounter.h:
2519         * ForwardingHeaders/wtf/RefPtr.h:
2520         * ForwardingHeaders/wtf/RetainPtr.h:
2521         * ForwardingHeaders/wtf/StdLibExtras.h:
2522         * ForwardingHeaders/wtf/StringExtras.h:
2523         * ForwardingHeaders/wtf/ThreadSpecific.h:
2524         * ForwardingHeaders/wtf/Threading.h:
2525         * ForwardingHeaders/wtf/TypeTraits.h:
2526         * ForwardingHeaders/wtf/UnusedParam.h:
2527         * ForwardingHeaders/wtf/Vector.h:
2528         * ForwardingHeaders/wtf/VectorTraits.h:
2529         * ForwardingHeaders/wtf/dtoa.h:
2530         * ForwardingHeaders/wtf/unicode/Collator.h:
2531         * ForwardingHeaders/wtf/unicode/UTF8.h:
2532         * ForwardingHeaders/wtf/unicode/Unicode.h:
2533         * ForwardingHeaders/wtf/unicode/icu/UnicodeIcu.h:
2534
2535 2009-04-14  Sam Weinig  <sam@webkit.org>
2536
2537         Reviewed by Adele Peterson.
2538
2539         Use a template function to generalize the way we create non-caching
2540         JS function getters.
2541
2542         * bindings/js/JSDOMWindowCustom.cpp:
2543         * bindings/js/JSDOMWindowCustom.h:
2544         (WebCore::nonCachingStaticFunctionGetter):
2545         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
2546
2547 2009-04-14  Benjamin C Meyer  <benjamin.meyer@torchmobile.com>
2548
2549         Reviewed by George Staikos.
2550
2551         https://bugs.webkit.org/show_bug.cgi?id=25099
2552
2553         When creating a QNetworkRequest make sure to populate the
2554         CacheLoadControlAttribute with the value set by the ResourceRequest::cachePolicy() so that the cache will be used as WebKit expects.
2555
2556         * WebKit/qt/tests/qwebpage/tst_qwebpage.cpp:
2557         (tst_QWebPage::requestCache):
2558
2559         * platform/network/qt/ResourceRequestQt.cpp:
2560         (WebCore::ResourceRequest::toNetworkRequest):
2561
2562 2009-04-14  Timothy Hatcher  <timothy@apple.com>
2563
2564         Fix a world leak caused by opening the Web Inspector. This was
2565         a regression caused by the InspectorController becoming refcounted.
2566
2567         <rdar://problem/6782944>
2568
2569         Reviewed by Darin Adler.
2570
2571         * bindings/js/ScriptObject.cpp:
2572         (WebCore::ScriptGlobalObject::get): Renamed to better match the
2573         other functions.
2574         (WebCore::ScriptGlobalObject::remove): Added. Deletes the property.
2575         * bindings/js/ScriptObject.h:
2576         * inspector/InspectorController.cpp:
2577         (WebCore::InspectorController::~InspectorController): Do less work
2578         at destruction time since the object lifetime is tied to JS GC.
2579         Assert that inspectedPageDestroyed cleared everything needed.
2580         (WebCore::InspectorController::inspectedPageDestroyed): Do most
2581         of the work that ~InspectorController was doing.
2582         (WebCore::InspectorController::scriptObjectReady): Renamed getObject.
2583
2584 2009-04-14  Antony Sargent  <asargent@chromium.org>
2585
2586         Reviewed by Dimitri Glazkov.
2587
2588         This is some cleanup motivated by the crash in http://crbug.com/9775 , which 
2589         happens because of calling window.open inside a window.onload handler. 
2590
2591         These changes are just part of the fix, along with some asserts to help prevent
2592         breakage on future changes. 
2593
2594         https://bugs.webkit.org/show_bug.cgi?id=25132
2595
2596         * bindings/v8/V8EventListenerList.cpp:
2597         (WebCore::V8EventListenerList::add):
2598         (WebCore::V8EventListenerList::remove):
2599         (WebCore::V8EventListenerList::clear):
2600         * bindings/v8/V8EventListenerList.h:
2601         (WebCore::V8EventListenerList::size):
2602
2603 2009-04-14  Evan Martin  <evan@chromium.org>
2604
2605         Reviewed by Darin Adler.
2606
2607         https://bugs.webkit.org/show_bug.cgi?id=25142
2608         Fix a race that can occur between flex and the perl script that parses
2609         its output.
2610
2611         * css/maketokenizer: Consume all input.
2612
2613 2009-04-14  Rohit Rao  <rohitrao@google.com>
2614
2615         Reviewed by Dan Bernstein.
2616
2617         https://bugs.webkit.org/show_bug.cgi?id=25184
2618         Do not change the text color for selected text in Mac Chromium.
2619
2620         * rendering/RenderThemeChromiumMac.h:
2621         (WebCore::RenderThemeChromiumMac::supportsSelectionForegroundColors):
2622         Now returns false, matching the behavior of Safari on Mac.
2623
2624 2009-04-14  Justin Garcia  <justin.garcia@apple.com>
2625
2626         Reviewed by Eric Seidel.
2627
2628         https://bugs.webkit.org/show_bug.cgi?id=25172
2629         Extra partial layout during the first keypress in an empty block
2630         
2631         Determining if a placeholder needs to be removed requires the creation of a VisiblePosition 
2632         which was triggering layout before we were finished modifying the DOM for the insert operation.
2633         
2634         Find out if we need to remove a placeholder near the start of the operation, and if we do remember 
2635         where it's located.  Then, later, remove it along with all of the other DOM operations we perform.
2636         
2637         Renamed lineBreakExistsAtPosition to lineBreakExistsAtVisiblePosition and added a lineBreakExistsAtPosition
2638         that takes in a Position.  In InsertTextCommand, we can use the latter, since we normalize manually.
2639         
2640         removePlaceholderAt now takes in a Position that it assumes has already been checked for a placeholder.
2641         
2642         No test added as this only effects performance.
2643
2644         * editing/BreakBlockquoteCommand.cpp:
2645         (WebCore::BreakBlockquoteCommand::doApply):
2646         * editing/CompositeEditCommand.cpp:
2647         (WebCore::CompositeEditCommand::removePlaceholderAt):
2648         (WebCore::CompositeEditCommand::moveParagraphs):
2649         (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph):
2650         (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
2651         * editing/CompositeEditCommand.h:
2652         * editing/DeleteSelectionCommand.cpp:
2653         (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
2654         (WebCore::DeleteSelectionCommand::doApply):
2655         * editing/FormatBlockCommand.cpp:
2656         (WebCore::FormatBlockCommand::doApply):
2657         * editing/InsertLineBreakCommand.cpp:
2658         (WebCore::InsertLineBreakCommand::doApply):
2659         * editing/InsertParagraphSeparatorCommand.cpp:
2660         (WebCore::InsertParagraphSeparatorCommand::doApply):
2661         * editing/InsertTextCommand.cpp:
2662         (WebCore::InsertTextCommand::input):
2663         * editing/htmlediting.cpp:
2664         (WebCore::lineBreakExistsAtVisiblePosition):
2665         (WebCore::lineBreakExistsAtPosition):
2666         * editing/htmlediting.h:
2667
2668 2009-04-14  Adam Roben  <aroben@apple.com>
2669
2670         Remove support for profile-guided optimization on Windows
2671
2672         Rubber-stamped by Steve Falkenburg.
2673
2674         * WebCore.vcproj/WebCore.vcproj: Removed the Release_PGO
2675         configuration.
2676
2677 2009-04-14  Dmitry Titov  <dimich@chromium.org>
2678
2679         Reviewed by Dimitri Glazkov.
2680
2681         https://bugs.webkit.org/show_bug.cgi?id=25163
2682         Upstream fix for releasing v8 objects on worker thread termination in Chromium.
2683
2684         * bindings/v8/V8DOMMap.cpp:
2685         (WebCore::domDataList): Now uses Vector instead of HashMap.
2686         (WebCore::domDataListMutex):
2687         (WebCore::ThreadSpecificDOMData::ThreadSpecificDOMData):  remove usage of currentThread();
2688         (WebCore::ThreadSpecificDOMData::~ThreadSpecificDOMData): ditto.
2689         (WebCore::NonMainThreadSpecificDOMData::~NonMainThreadSpecificDOMData): moved call to removeAllDOMObjectsInCurrentThread() to ~WorkerScriptController.
2690         (WebCore::handleWeakObjectInOwningThread):
2691         (WebCore::derefDelayedObjects):
2692         (WebCore::removeAllDOMObjectsInCurrentThread): not static anymore.
2693         * bindings/v8/V8DOMMap.h:
2694         * bindings/v8/WorkerContextExecutionProxy.cpp:
2695         (WebCore::WorkerContextExecutionProxy::dispose): removed code that avoided dual-dereference of WorkerContext.
2696         (WebCore::WorkerContextExecutionProxy::initContextIfNeeded): this ref() is countered in removeAllDOMObjectsInCurrentThread(), when the WorkerContext is removed from the v8 map.
2697         * bindings/v8/WorkerScriptController.cpp:
2698         (WebCore::WorkerScriptController::~WorkerScriptController):
2699
2700 2009-04-14  Adam Roben  <aroben@apple.com>
2701
2702         Fix Bug 25183: Split up WebCore.vcproj's settings into vsprops files
2703
2704         <https://bugs.webkit.org/show_bug.cgi?id=25183>
2705
2706         WebCore.vcproj now uses a set of .vsprops files to store most of its
2707         settings.
2708
2709         Reviewed by Darin Adler.
2710
2711         * WebCore.vcproj/WebCore.vcproj: Moved settings from here into the new
2712         .vsprops files.
2713
2714         * WebCore.vcproj/WebCoreCFNetwork.vsprops: Added. Contains settings
2715         for ports that build against CFNetwork.
2716         * WebCore.vcproj/WebCoreCG.vsprops: Added. Contains settings for ports
2717         that build against CoreGraphics.
2718         * WebCore.vcproj/WebCoreCURL.vsprops: Added. Contains settings for
2719         ports that build against libcurl.
2720         * WebCore.vcproj/WebCoreCairo.vsprops: Added. Contains settings for
2721         ports that build against Cairo.
2722         * WebCore.vcproj/WebCoreCommon.vsprops: Added. Contains settings
2723         shared by all ports.
2724         * WebCore.vcproj/WebCoreMediaQT.vsprops: Added. Contains settings for
2725         ports that use QTMovieWin to implement the MediaPlayerPrivate
2726         interface.
2727         * WebCore.vcproj/WebCorePthreads.vsprops: Added. Contains settings for
2728         ports that build against pthreads.
2729
2730 2009-04-14  Alexey Proskuryakov  <ap@webkit.org>
2731
2732         Reviewed by Darin Adler.
2733
2734         http/tests/xmlhttprequest/basic-auth.html fails on Tiger.
2735
2736         Turns out that NSURLCredentialPersistenceNone doesn't work on Tiger, so we have to use
2737         session persistence.
2738
2739         * platform/network/mac/ResourceHandleMac.mm:
2740         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Route the credential through
2741         receivedCredential(), ensuring that the Tiger-specific need to use session credentials
2742         is honored.
2743         (WebCore::ResourceHandle::receivedCredential): On Tiger, change PersistenceNone to
2744         PersistenceForSession, because the former doesn't work.
2745
2746 2009-04-14  Adele Peterson  <adele@apple.com>
2747
2748         Reviewed by Darin Adler.
2749
2750         Fix for <rdar://problem/6703873> Triple-click quoted line and type Return creates an extra quoted blank line
2751
2752         Test: editing/inserting/6703873.html
2753
2754         * editing/BreakBlockquoteCommand.cpp: (WebCore::BreakBlockquoteCommand::doApply):
2755         If the startNode's original parent is now empty, we can remove it.  Its already been cloned and copied with the startNode,
2756         so we only need to keep it around if it actually holds some original content, otherwise it will look like an extra empty 
2757         container in the document.
2758
2759 2009-04-14  Xan Lopez  <xlopez@igalia.com>
2760
2761         Reviewed by Holger Freyther.
2762
2763         https://bugs.webkit.org/show_bug.cgi?id=21546
2764         [GTK] ATK accessibility enhancements
2765
2766         Add a proper implementation of AtkText::get_text and
2767         AtkText::get_character_count, which takes into account non
2768         TextControl text. With this the 'Text' field in Accerciser's
2769         Interface Viewer is filled correctly.
2770
2771         * page/gtk/AccessibilityObjectWrapperAtk.cpp:
2772
2773 2009-04-14  Xan Lopez  <xlopez@igalia.com>
2774
2775         Reviewed by Holger Freyther.
2776
2777         https://bugs.webkit.org/show_bug.cgi?id=21546
2778         [GTK] ATK accessibility enhancements
2779
2780         Remove some dead code and g_return_if_fail from static functions.
2781
2782         * page/gtk/AccessibilityObjectWrapperAtk.cpp:
2783
2784 2009-04-14  Xan Lopez  <xlopez@igalia.com>
2785
2786         Reviewed by Holger Freyther.
2787
2788         https://bugs.webkit.org/show_bug.cgi?id=21546
2789         [GTK] ATK accessibility enhancements
2790
2791         Also implement text interface for StaticTextRole, which covers
2792         most of the text in web pages.
2793
2794         * page/gtk/AccessibilityObjectWrapperAtk.cpp:
2795
2796 2009-04-14  Alexey Proskuryakov  <ap@webkit.org>
2797
2798         Another Windows build fix.
2799
2800         * platform/network/cf/ResourceHandleCFNet.cpp:
2801         (WebCore::WebCoreSynchronousLoader::load):
2802
2803 2009-04-14  Alexey Proskuryakov  <ap@webkit.org>
2804
2805         Windows build fix.
2806
2807         * platform/network/cf/ResourceHandleCFNet.cpp:
2808         (WebCore::WebCoreSynchronousLoader::willSendRequest):
2809         (WebCore::WebCoreSynchronousLoader::didReceiveChallenge):
2810
2811 2009-04-13  Alexey Proskuryakov  <ap@webkit.org>
2812
2813         Reviewed by Sam Weinig.
2814
2815         <rdar://problem/6698851> Implement XMLHttpRequest withCredentials attribute
2816
2817         * WebCore.xcodeproj/project.pbxproj: Made ThreadableLoader.h private, as enum definitions
2818         from it are now used in otehr private headers.
2819
2820         * xml/XMLHttpRequest.h:
2821         * xml/XMLHttpRequest.idl:
2822         Added withCredentials attribute. When it is false (default), neither credentials nor cookies
2823         are sent with cross origin requests, When it is true, those are sent, but the server needs
2824         to allow handling results via Access-Control-Allow-Credentials header. It was always possible
2825         to send a cross-site request with credentials via IFRAME or IMG, so this just adds a way to
2826         read results, as long as the server reports that it's allowed.
2827         Having the default set to false ensures that requests won't fail unexpectedly because of
2828         stored credentials and cookies for other resources in the target protection space.
2829
2830         * xml/XMLHttpRequest.cpp:
2831         (WebCore::XMLHttpRequest::loadRequestSynchronously): Allow stored credentials for same origin
2832         requests, and for cross origin ones that have withCredentials attribute set. Such code already
2833         existed for cookies (but it's simpler, because we could just set a ResourceRequest flag).
2834         (WebCore::XMLHttpRequest::loadRequestAsynchronously): Ditto.
2835
2836         * platform/network/ResourceHandle.h: Added willSendRequest() - just like for other callbacks,
2837         is is easier to have code in the class. Also, loadResourceSynchronously() now takes a
2838         StoredCredentials option, matching async case.
2839
2840         * platform/network/ResourceHandleClient.h:
2841         (WebCore::ResourceHandleClient::receivedCredential): Removed. This method could never be
2842         called, and no client used it.
2843         (WebCore::ResourceHandleClient::receivedRequestToContinueWithoutCredential): Ditto.
2844
2845         * platform/network/ResourceHandleInternal.h:
2846         (WebCore::ResourceHandleInternal::ResourceHandleInternal): Split username and password out
2847         of request URL. We want to always get a callback for credentials to manage them in WebCore,
2848         so network back-end shouldn't see them too early.
2849
2850         * platform/network/ResourceRequestBase.cpp:
2851         (WebCore::ResourceRequestBase::removeCredentials):
2852         * platform/network/ResourceRequestBase.h:
2853         Added a removeCredentials() method that removes login and password parts from request URL.
2854
2855         * platform/network/mac/ResourceHandleMac.mm:
2856         (WebCoreCredentialStorage): Added a simple storage class for per-session credentials.
2857         (WebCore::ResourceHandle::loadResourceSynchronously): Pass allowStoredCredentials through.
2858         (WebCore::ResourceHandle::willSendRequest): On a redirect, credentials should be replaced.
2859         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Try credentials from the URL
2860         and per-session credentials. Code was partially moved from Obj-C callback.
2861         (WebCore::ResourceHandle::receivedCredential): Intercept per-session credentials and store
2862         them in WebCore storage.
2863         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]): Don't
2864         store the redirected URL - we only needed credentials, which are now stored separately.
2865         (-[WebCoreResourceHandleAsDelegate connection:didReceiveAuthenticationChallenge:]): Removed
2866         code that was setting credentials from URL. First, the code is now in ResourceHandle, and
2867         also, it wasn't actually needed in Leopard release before this patch, see <rdar://problem/5298142>.
2868         (-[WebCoreSynchronousLoader dealloc]): Release credentials. Note that unlike ResourceHandle,
2869         this class still needs to track URL for checking whether a redirect is allowed. This is
2870         not a great solution, and we should unify client code to use the same checks in sync and
2871         async cases.
2872         (-[WebCoreSynchronousLoader connection:willSendRequest:redirectResponse:]): Just like in
2873         async case, put credentials aside to ensure that network back-end asks for them.
2874         (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Use credentials
2875         from URL, or from WebCore storage.
2876         (-[WebCoreSynchronousLoader connectionShouldUseCredentialStorage:]): Don't use stored
2877         credentials when not allowed to.
2878         (+[WebCoreSynchronousLoader loadRequest:allowStoredCredentials:returningResponse:error:]):
2879         Put credentials aside to ensure that network back-end asks for them.
2880
2881         * platform/network/cf/ResourceHandleCFNet.cpp:
2882         (WebCore::WebCoreCredentialStorage::set):
2883         (WebCore::WebCoreCredentialStorage::get):
2884         (WebCore::willSendRequest):
2885         (WebCore::ResourceHandle::start):
2886         (WebCore::ResourceHandle::willSendRequest):
2887         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2888         (WebCore::ResourceHandle::receivedCredential):
2889         (WebCore::ResourceHandle::loadResourceSynchronously):
2890         (WebCore::WebCoreSynchronousLoader::willSendRequest):
2891         (WebCore::WebCoreSynchronousLoader::didReceiveChallenge):
2892         (WebCore::WebCoreSynchronousLoader::shouldUseCredentialStorage):
2893         (WebCore::WebCoreSynchronousLoader::load):
2894         Same changes as in Mac case.
2895
2896         * platform/network/curl/ResourceHandleCurl.cpp:
2897         (WebCore::ResourceHandle::loadResourceSynchronously):
2898         * platform/network/qt/ResourceHandleQt.cpp:
2899         (WebCore::ResourceHandle::loadResourceSynchronously):
2900         * platform/network/soup/ResourceHandleSoup.cpp:
2901         (WebCore::ResourceHandle::loadResourceSynchronously):
2902         Trying not to break the build.
2903
2904         * dom/XMLTokenizerLibxml2.cpp: (WebCore::openFunc):
2905         * xml/XSLTProcessor.cpp: (WebCore::docLoaderFunc):
2906         Unconditionally allow stored credentials for these, as they only support same origin loads.
2907
2908         * workers/WorkerContext.cpp: (WebCore::WorkerContext::importScripts):
2909         WorkerContext.importScripts() can be cross-origin, but sending credentials with it is no worse
2910         than sending them with <script src=...>, so this is also unconditionally allowed.
2911
2912         * loader/DocumentThreadableLoader.cpp:
2913         (WebCore::DocumentThreadableLoader::loadResourceSynchronously): Pass through storedCredentials.
2914         (WebCore::DocumentThreadableLoader::create): Ditto.
2915         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Save storedCredentials and
2916         sameOrigin flags foruse in callbacks.
2917         (WebCore::DocumentThreadableLoader::willSendRequest): Assert that loaders aren't all confused.
2918         (WebCore::DocumentThreadableLoader::didSendData): Ditto.
2919         (WebCore::DocumentThreadableLoader::didReceiveResponse): Ditto.
2920         (WebCore::DocumentThreadableLoader::didReceiveData): Ditto.
2921         (WebCore::DocumentThreadableLoader::didFinishLoading): Ditto.
2922         (WebCore::DocumentThreadableLoader::didFail): Ditto.
2923         (WebCore::DocumentThreadableLoader::getShouldUseCredentialStorage): Don't use credential
2924         storage if that's not allowed by the code that invoked DocumentThreadableLoader.
2925         (WebCore::DocumentThreadableLoader::didReceiveAuthenticationChallenge): Simulate a failure
2926         and cancel the request if we are about to ask the user for credentials for a cross-origin
2927         request, which is forbidden by CORS (and would have been very confusing if allowed).
2928         (WebCore::DocumentThreadableLoader::receivedCancellation): Assert that loaders aren't all confused.
2929
2930         * loader/DocumentThreadableLoader.h: Updated for the new flags (storedCredentials and
2931         sameOrigin) that affect the loader. Eventually, we need to move all CORS logic from XHR here.
2932
2933         * loader/ThreadableLoader.h: (StoredCredentials): Added another flag that affects loader
2934         behavior. We should combine all of these into a structure, and use it for sync requests, too.
2935
2936         * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadResourceSynchronously):
2937         * loader/FrameLoader.h:
2938         * loader/ThreadableLoader.cpp:
2939         (WebCore::ThreadableLoader::create):
2940         (WebCore::ThreadableLoader::loadResourceSynchronously):
2941         * loader/WorkerThreadableLoader.cpp:
2942         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
2943         (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
2944         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
2945         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
2946         * loader/WorkerThreadableLoader.h:
2947         (WebCore::WorkerThreadableLoader::create):
2948         Pass through storedCredentials.
2949
2950 2009-04-13  David Hyatt  <hyatt@apple.com>
2951
2952         Reviewed by Cameron Zwarich.
2953
2954         Remove an outdated comment in ScrollView.h
2955
2956         * platform/ScrollView.h:
2957
2958 2009-04-13  Eric Carlson  <eric.carlson@apple.com>
2959
2960         Reviewed by Mark Rowe.
2961
2962         https://bugs.webkit.org/show_bug.cgi?id=25177
2963
2964         QTTrack's -media method always return NULL in 64-bit QTKit, so
2965         MediaPlayerPrivate::disableUnsupportedTracks should use 
2966         QTTrackMediaTypeAttribute to get a track's type.
2967
2968         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2969         (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
2970
2971 2009-04-13  Geoffrey Garen  <ggaren@apple.com>
2972
2973         Reviewed by Cameron Zwarich.
2974
2975         More fix for https://bugs.webkit.org/show_bug.cgi?id=21260
2976         Unbounded memory growth when churning elements with anonymous event handler functions
2977
2978         Stop using protected event listeners on the window object.
2979
2980         * bindings/js/JSDOMWindowCustom.cpp:
2981         (WebCore::JSDOMWindow::mark): Mark our event listeners, since they're
2982         no longer protected.
2983
2984         (WebCore::JSDOMWindow::addEventListener):
2985         (WebCore::JSDOMWindow::removeEventListener): Create unprotected event
2986         listeners, since we mark them now.
2987
2988         * bindings/js/JSEventListener.h: Made some functions public so
2989         DOMWindow could call them.
2990
2991         * bindings/js/JSNodeCustom.cpp: Moved markEventListeners to a header,
2992         so it could be shared.
2993
2994         * bindings/scripts/CodeGeneratorJS.pm: Generate event listener marking
2995         and invalidating code for the DOMWindow.
2996
2997         * dom/RegisteredEventListener.h:
2998         (WebCore::markEventListeners):
2999         (WebCore::invalidateEventListeners): Added helper functions.
3000
3001         * page/DOMWindow.idl: Make the window's event listener attributes not
3002         protected.
3003
3004 2009-04-13  Eric Carlson  <eric.carlson@apple.com>
3005
3006         Reviewed by Mark Rowe.
3007         
3008         https://bugs.webkit.org/show_bug.cgi?id=25155
3009
3010         OS X standalone media documents should not switch from <video> to <embed> when 
3011         QTKit load state is QTMovieLoadStateLoading as that happens frequently when a loading
3012         with a slow network connection or when a movie is not saved fast-start.
3013
3014         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3015         (WebCore::MediaPlayerPrivate::updateStates): Don't open movie with plug-in when QTKit's
3016         loadstate is QTMovieLoadStateLoading, wait until it drops below QTMovieLoadStateError.
3017
3018 2009-04-13  Dmitry Titov  <dimich@chromium.org>
3019
3020         Reviewed by Darin Adler.
3021
3022         https://bugs.webkit.org/show_bug.cgi?id=24453
3023         REGRESSION: If setTimeout is called on a iframe's window, the DOM changes to
3024         the main document that timer callback makes are not flushed.
3025
3026         * bindings/js/ScheduledAction.cpp:
3027         (WebCore::ScheduledAction::execute):
3028         Use Document::updateStyleForAllDocuments() instead of document->updateStyleIfNeeded()
3029         since timers may affect documents other then their own.
3030
3031 2009-04-13  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
3032
3033         Reviewed by David Hyatt.
3034
3035         Check document for nullity to avoid crashing on GTK+, when
3036         creating the WebView.
3037
3038         * page/FrameView.cpp:
3039         (WebCore::FrameView::needsLayout):
3040
3041 2009-04-13  Ada Chan  <adachan@apple.com>
3042
3043         Forgot to capitalize the "US".
3044
3045         * platform/text/win/TextBreakIteratorInternalICUWin.cpp:
3046         (WebCore::currentTextBreakLocaleID):
3047
3048 2009-04-13  Ada Chan  <adachan@apple.com>
3049
3050         <rdar://problem/6564956> URL field double-click selects entire domain, rather than single word or entire URL
3051         Revert back to the old word breaking behavior by using en_US_POSIX locale.        
3052
3053         Reviewed by Steve Falkenburg.
3054
3055         * platform/text/win/TextBreakIteratorInternalICUWin.cpp:
3056         (WebCore::currentTextBreakLocaleID):
3057
3058 2009-04-13  Darin Adler  <darin@apple.com>
3059
3060         Reviewed by Dan Bernstein.
3061
3062         * platform/cf/BinaryPropertyList.cpp: Added comment.
3063         * platform/cf/BinaryPropertyList.h: Fixed mistakes in comments.
3064
3065 2009-04-13  Darin Adler  <darin@apple.com>
3066
3067         Reviewed by Dan Bernstein.
3068
3069         Bug 25158: hit testing doesn't work right in some cases involving anonymous blocks
3070         https://bugs.webkit.org/show_bug.cgi?id=25158
3071         rdar://problem/6769693
3072
3073         Test: editing/selection/click-after-nested-block.html
3074
3075         * rendering/RenderBlock.cpp:
3076         (WebCore::isChildHitTestCandidate): Added. Helper so the two loops in positionForPoint
3077         can share code.
3078         (WebCore::RenderBlock::positionForPoint): Removed unneeded special case for first
3079         child box. Changed special case for last child box to propertly handle the various
3080         types of child box that are not hit test candidates (the same ones already handled
3081         by the hit test loop below), adding in a loop so we find the last candidate.
3082
3083 2009-04-13  David Hyatt  <hyatt@apple.com>
3084
3085         Reviewed by Sam Weinig.
3086
3087         Fix for https://bugs.webkit.org/show_bug.cgi?id=25125.  Rework scrolling so that a layout happens first when
3088         it's already needed so that the code doesn't end up making bad decisions based off invalid document sizes.
3089
3090         * WebCore.base.exp:
3091         * page/FrameView.h:
3092         (WebCore::FrameView::visibleContentsResized):
3093         * platform/ScrollView.cpp:
3094         (WebCore::ScrollView::ScrollView):
3095         (WebCore::ScrollView::updateScrollbars):
3096         * platform/ScrollView.h:
3097
3098 2009-04-13  Adam Roben  <aroben@apple.com>
3099
3100         Add SharedBuffer::wrapCFData
3101
3102         This is the CF-equivalent of wrapNSData.
3103
3104         Reviewed by Brady Eidson.
3105
3106         * platform/SharedBuffer.h:
3107         * platform/cf/SharedBufferCF.cpp:
3108         (WebCore::SharedBuffer::wrapCFData):
3109
3110 2009-04-13  Dan Bernstein  <mitz@apple.com>
3111
3112         - build fix
3113
3114         * page/EventHandler.cpp:
3115         (WebCore::documentPointForWindowPoint):
3116
3117 2009-04-13  Antti Koivisto  <antti@apple.com>
3118
3119         Reviewed by Darin Adler.
3120
3121         <rdar://problem/6740294> Increase the connection count per host
3122         
3123         Try to use six connections per host if possible.
3124
3125         * WebCore.base.exp:
3126         * loader/loader.cpp:
3127         (WebCore::Loader::Loader):
3128         * platform/mac/WebCoreSystemInterface.h:
3129         * platform/mac/WebCoreSystemInterface.mm:
3130         * platform/network/ResourceRequestBase.cpp:
3131         (WebCore::initMaximumHTTPConnectionCountPerHost):
3132         * platform/network/ResourceRequestBase.h:
3133         * platform/network/mac/ResourceRequestMac.mm:
3134         (WebCore::initMaximumHTTPConnectionCountPerHost):
3135
3136 2009-04-13  Justin Garcia  <justin.garcia@apple.com>
3137
3138         Reviewed by Adele Peterson.
3139
3140         https://bugs.webkit.org/show_bug.cgi?id=25153
3141         Can't place the caret into text field that scrolls the window on focus
3142         
3143         We refetch the target node in the shadow node case, and when we do so the window coordinate for the mouse event may
3144         be invalid because of scrolling that the focus handler did.  Cache the document point (that we derived from the window
3145         coordinate) and use that any time we refetch.
3146
3147         * page/EventHandler.cpp:
3148         (WebCore::documentPointForWindowPoint):
3149         (WebCore::EventHandler::handleMousePressEvent):
3150         (WebCore::EventHandler::prepareMouseEvent):
3151
3152 2009-04-13  Sam Weinig  <sam@webkit.org>
3153
3154         Reviewed by Geoffrey Garen.
3155
3156         Rename JavaScriptCanOpenWindowsAutomatically to javaScriptCanOpenWindowsAutomatically
3157         to conform to our style guidelines.
3158
3159         * page/DOMWindow.cpp:
3160         (WebCore::DOMWindow::allowPopUp):
3161         * page/Settings.h:
3162         (WebCore::Settings::javaScriptCanOpenWindowsAutomatically):
3163
3164 2009-04-13  Geoffrey Garen  <ggaren@apple.com>
3165
3166         Mac build fix: Made another header private.
3167
3168         * WebCore.xcodeproj/project.pbxproj:
3169
3170 2009-04-13  Jian Li  <jianli@chromium.org>
3171
3172         Reviewed by Darin Fisher.
3173
3174         https://bugs.webkit.org/show_bug.cgi?id=25121
3175         Upstream changes to handle error messages from V8 when running worker script.
3176
3177         * bindings/v8/WorkerContextExecutionProxy.cpp:
3178         (WebCore::reportFatalErrorInV8):
3179         (WebCore::handleConsoleMessage):
3180         (WebCore::WorkerContextExecutionProxy::WorkerContextExecutionProxy):
3181         (WebCore::WorkerContextExecutionProxy::dispose):
3182         (WebCore::WorkerContextExecutionProxy::initV8IfNeeded):
3183         (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
3184         (WebCore::WorkerContextExecutionProxy::evaluate):
3185         * bindings/v8/WorkerContextExecutionProxy.h:
3186
3187 2009-04-13  Geoffrey Garen  <ggaren@apple.com>
3188
3189         Build fix: Made setInlineEventListenerForType not inline, since Document
3190         calls it now. Made RegisteredEventListener.h a private header on Mac,
3191         so WebKit can use it.
3192
3193         * page/DOMWindow.cpp:
3194         (WebCore::DOMWindow::setInlineEventListenerForType):
3195
3196 2009-04-13  Dan Bernstein  <mitz@apple.com>
3197
3198         Reviewed by Sam Weinig.
3199
3200         - fix <rdar://problem/6404439> REGRESSION: Overlapping text and other
3201           layout issues in View Sample feature of MYOB FIrstEdge v3
3202
3203         * page/Navigator.cpp:
3204         (WebCore::shouldHideFourDot): Added "tdqm_loader.js" to the list of
3205         JavaScript files this quirk applies to.
3206
3207 2009-04-13  Sam Weinig  <sam@webkit.org>
3208
3209         Reviewed by Oliver Hunt.
3210
3211         Move open and showModalDialog functions out of JSDOMWindowBase
3212         and into JSDOMWindow by partially generating them.
3213
3214         This slightly changes the behavior of getting window.showModalDialog
3215         when the embedding app does not support it to return undefined regardless
3216         of shadowing.  This should not be an issue in a practice, but will be addressed
3217         when we add a generic way to handle runtime specialization of property
3218         access.
3219
3220         * DerivedSources.make: Remove JSDOMWindowBase.lut.h
3221         * WebCore.xcodeproj/project.pbxproj: Ditto.
3222         * bindings/js/JSDOMWindowBase.cpp:
3223         (WebCore::):
3224         (WebCore::JSDOMWindowBase::getOwnPropertySlot): Move canShowModalDialog check from
3225         here to JSDOMWindow::customGetOwnPropertySlot.
3226         (WebCore::JSDOMWindowBase::put): Remove dead code.
3227         * bindings/js/JSDOMWindowCustom.cpp:
3228         (WebCore::createWindow):
3229         (WebCore::JSDOMWindow::open):
3230         (WebCore::JSDOMWindow::showModalDialog):
3231         * bindings/js/JSDOMWindowCustom.h:
3232         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
3233         * page/DOMWindow.cpp:
3234         (WebCore::DOMWindow::parseModalDialogFeatures): Move from JSDOMWindowBase.
3235         (WebCore::DOMWindow::allowPopUp): Ditto.
3236         (WebCore::DOMWindow::canShowModalDialog): Ditto.
3237         (WebCore::DOMWindow::canShowModalDialogNow): Ditto.
3238         * page/DOMWindow.h:
3239         * page/DOMWindow.idl:
3240
3241 2009-04-13  Geoffrey Garen  <ggaren@apple.com>
3242
3243         Reviewed by Sam Weinig.
3244
3245         Moved storage for window event listeners into the window object.
3246
3247         * bindings/js/JSDOMWindowCustom.cpp:
3248         (WebCore::JSDOMWindow::addEventListener):
3249         (WebCore::JSDOMWindow::removeEventListener): Add / remove window event
3250         listeners to / from the window object.
3251
3252         * dom/Document.cpp:
3253         (WebCore::Document::removeAllEventListeners):
3254         (WebCore::Document::clear):
3255         (WebCore::Document::setWindowInlineEventListenerForTypeAndAttribute): Moved
3256         a bunch of code to the DOMWindow class, and left behind a few calls through
3257         to DOMWindow, to support legacy clients. (Eventually, these will go away, too.)
3258
3259         * dom/Document.h: ditto.
3260
3261         * dom/Node.cpp:
3262         (WebCore::Node::dispatchGenericEvent):
3263         (WebCore::Node::dispatchWindowEvent): Dipatch window events on the window
3264         object, not the document.
3265
3266         * dom/Node.h:
3267         * dom/RegisteredEventListener.h: Moved RegisteredEventListenerVector
3268         declaration, since it's required in more places now.
3269
3270         * history/CachedFrame.cpp:
3271         (WebCore::CachedFrame::clear): Updated for rename. Also, remove event
3272         listeners before detaching and clearing the document's window pointer,
3273         since the the document needs its window pointer in order to tell the window
3274         to clear its event listeners.
3275
3276         * loader/FrameLoader.cpp:
3277         (WebCore::FrameLoader::stopLoading):
3278         (WebCore::FrameLoader::canCachePageContainingThisFrame):
3279         (WebCore::FrameLoader::logCanCacheFrameDecision): Updated for rename, and
3280         movement of window event listeners into the window.
3281
3282         * loader/ImageDocument.cpp:
3283         (WebCore::ImageDocument::createDocumentStructure): Updated for movement
3284         of window event listeners into the window.
3285
3286         * page/DOMWindow.cpp:
3287         (WebCore::DOMWindow::handleEvent):
3288         (WebCore::DOMWindow::addEventListener):
3289         (WebCore::DOMWindow::removeEventListener):
3290         (WebCore::DOMWindow::removeAllEventListeners):
3291         (WebCore::DOMWindow::hasEventListener):
3292         (WebCore::DOMWindow::setInlineEventListenerForType):
3293         (WebCore::DOMWindow::removeInlineEventListenerForType):
3294         (WebCore::DOMWindow::inlineEventListenerForType):
3295         (WebCore::DOMWindow::addPendingFrameUnloadEventCount):
3296         (WebCore::DOMWindow::removePendingFrameUnloadEventCount):
3297         (WebCore::DOMWindow::addPendingFrameBeforeUnloadEventCount):
3298         (WebCore::DOMWindow::removePendingFrameBeforeUnloadEventCount):
3299         * page/DOMWindow.h: Moved a bunch of code to the DOMWindow class, from the Document.
3300
3301         * page/Frame.cpp:
3302         (WebCore::Frame::shouldClose): Updated for movement of window event listeners into the window.
3303
3304 2009-04-13  Greg Bolsinga  <bolsinga@apple.com>
3305
3306         Reviewed by Sam Weinig.
3307
3308         https://bugs.webkit.org/show_bug.cgi?id=25149
3309
3310         The Geolocation timer needs to start after the UA has granted permission.
3311
3312         * bindings/js/JSGeolocationCustom.cpp: Use PassRefPtr<PositionOptions>
3313         (WebCore::JSGeolocation::getCurrentPosition):
3314         (WebCore::JSGeolocation::watchPosition):
3315         * page/Geolocation.cpp: Add a RefPtr<PositionOptions> so it can be used
3316         later when the timer is started. Change PositionOptions* to PassRefPtr<PositionOptions>
3317         where needed.
3318         (WebCore::Geolocation::GeoNotifier::GeoNotifier):
3319         (WebCore::Geolocation::GeoNotifier::startTimer):
3320         (WebCore::Geolocation::getCurrentPosition):
3321         (WebCore::Geolocation::watchPosition):
3322         (WebCore::Geolocation::setIsAllowed): Start the timer is the UA allows
3323         (WebCore::Geolocation::startTimer):
3324         (WebCore::Geolocation::startTimersForOneShots):
3325         (WebCore::Geolocation::startTimersForWatchers):
3326         (WebCore::Geolocation::startTimers):
3327         * page/Geolocation.h:
3328         (WebCore::Geolocation::GeoNotifier::create):
3329
3330 2009-04-13  Pamela Greene  <pam@chromium.org>
3331
3332         Reviewed by Darin Fisher.
3333
3334         Fix Chromium (V8) build by renaming methods to match changes
3335         in http://trac.webkit.org/changeset/42377.
3336
3337         https://bugs.webkit.org/show_bug.cgi?id=25141
3338
3339         * bindings/v8/ScheduledAction.cpp:
3340      (WebCore::ScheduledAction::execute): updateRendering() -> updateStyleIfNeeded()
3341         * bindings/v8/V8AbstractEventListener.cpp:
3342         (WebCore::V8AbstractEventListener::handleEvent): updateDocumentsRendering() -> updateStyleForAllDocuments()
3343
3344 2009-04-13  Darin Fisher  <darin@chromium.org>
3345
3346         Reviewed by Darin Adler.
3347
3348         https://bugs.webkit.org/show_bug.cgi?id=25136
3349         CRASH in DocumentLoader::removeSubresourceLoader due to null m_frame
3350
3351         Test: fast/frames/frame-unload-crash.html
3352
3353         * loader/DocumentLoader.cpp:
3354         (WebCore::DocumentLoader::updateLoading): Added null check of m_frame.
3355
3356 2009-04-13  Sam Weinig  <sam@webkit.org>
3357
3358         Reviewed by Tim Hatcher.
3359
3360         Put the MessagePort constructor back in ENABLE_CHANNEL_MESSAGING.
3361
3362         * page/DOMWindow.idl:
3363
3364 2009-04-13  Greg Bolsinga  <bolsinga@apple.com>
3365
3366         Fix GTK build break.
3367
3368         * platform/gtk/GeolocationServiceGtk.cpp:
3369         (WebCore::GeolocationServiceGtk::updatePosition):
3370
3371 2009-04-13  David Hyatt  <hyatt@apple.com>
3372
3373         Reviewed by Darin Adler and Dan Bernstein.
3374
3375         Assertion in updateStyleForAllDocuments.  Make sure to unscheduleStyleRecalc when an object goes into
3376         the page cache.  Disallow scheduling of style recalcs on a document that is already in the page cache.
3377         Schedule a style recalc if needed when an object comes out of the page cache.
3378
3379         * dom/Document.cpp:
3380         (WebCore::Document::scheduleStyleRecalc):
3381         (WebCore::Document::setInPageCache):
3382
3383 2009-04-13  Timothy Hatcher  <timothy@apple.com>
3384
3385         Correctly sort (program) scripts in the Scripts panel popup menu.
3386
3387         Reviewed by Ada Chan.
3388
3389         * inspector/front-end/ScriptsPanel.js:
3390         (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu): Refactor the code
3391         and sort "(program)" options by the sourceID to maintain some order.
3392         * inspector/front-end/utilities.js:
3393         (indexOfObjectInListSortedByFunction): Fix a bug where identical objects would cause
3394         an incorrect return value that confuses insertionIndexForObjectInListSortedByFunction.
3395         Just set 'first' and break so the correct result will be returned.
3396
3397 2009-04-13  Greg Bolsinga  <bolsinga@apple.com>
3398
3399         Reviewed by Darin Adler.
3400
3401         https://bugs.webkit.org/show_bug.cgi?id=24770
3402         
3403         Add custom code for Coordinates that returns null when required by the
3404         Geolocation spec.
3405         
3406         http://dev.w3.org/geo/api/spec-source.html#coordinates
3407
3408         * WebCore.xcodeproj/project.pbxproj:
3409         * bindings/js/JSCoordinatesCustom.cpp: Added.
3410         (WebCore::JSCoordinates::altitude): returns null if the value cannot be provided.
3411         (WebCore::JSCoordinates::altitudeAccuracy): Ditto
3412         (WebCore::JSCoordinates::heading): Ditto
3413         (WebCore::JSCoordinates::speed): Ditto
3414         * page/Coordinates.h:
3415         (WebCore::Coordinates::create): Add 'canProvide' parameters and values
3416         (WebCore::Coordinates::canProvideAltitude):
3417         (WebCore::Coordinates::canProvideAltitudeAccuracy):
3418         (WebCore::Coordinates::canProvideHeading):
3419         (WebCore::Coordinates::canProvideSpeed):
3420         (WebCore::Coordinates::Coordinates):
3421         * page/Coordinates.idl: specify custom getters
3422         * platform/mac/GeolocationServiceMac.mm: Set the values correctly if they cannot be provided.
3423         (-[WebCoreCoreLocationObserver locationManager:didUpdateToLocation:fromLocation:]):
3424
3425 2009-04-13  Adele Peterson  <adele@apple.com>
3426
3427         Reviewed by Darin Adler.
3428
3429         Fix for <rdar://problem/5510537> Typing return at start of block quote yields empty quoted line
3430
3431         Test: editing/inserting/5510537.html
3432
3433         * editing/BreakBlockquoteCommand.cpp: (WebCore::BreakBlockquoteCommand::doApply): If the break insertion position
3434         is at the beginning of the topmost quote, then just insert the <br> before the blockquote.  Otherwise, if the break
3435         insertion position is at the beginning of any quote, adjust the position so the break comes before the current quote level
3436         so we don't end up with an empty line in that quote in addition to the new line we're adding with the <br>.
3437
3438 2009-04-11  Darin Adler  <darin@apple.com>
3439
3440         Reviewed by Dan Bernstein.
3441
3442         Fix problem when encoding history files with duplicate integer arrays near the end of the file.
3443         This results in an assertion failure, and if assertions are turned off, corrupted output.
3444
3445         When writing an integer array it's important not to add an object reference to the
3446         aggregate buffer. The writing of the array does not depend on the aggregate buffer. But,
3447         more importantly, it's possible this instance integer array is a duplicate and won't be
3448         written out. If so, there's no guarantee there's enough space in the aggregate buffer to
3449         store the object references (the references will be ignored). In some cases the aggregate
3450         buffer can then overrun the data being written; normally this is prevented by the fact that
3451         the data being written will include a copy of the aggregate buffer.
3452
3453         Also removed a bit of unneeded dead code to handle the integer -1.
3454
3455         * platform/cf/BinaryPropertyList.cpp:
3456         (WebCore::BinaryPropertyListPlan::BinaryPropertyListPlan): Removed unneeded
3457         m_integerNegativeOneObjectReference, since property lists support only non-negative integers.
3458         (WebCore::BinaryPropertyListPlan::writeInteger): Removed support for
3459         m_integerNegativeOneObjectReference.
3460         (WebCore::BinaryPropertyListPlan::integerObjectReference): Ditto.
3461         (WebCore::BinaryPropertyListSerializer::writeIntegerWithoutAddingAggregateObjectReference):
3462         Added. Factored out most of writeInteger, for use in writeIntegerArray, without calling
3463         addAggregateObjectReference.
3464         (WebCore::BinaryPropertyListSerializer::writeInteger): Changed to call the new
3465         writeIntegerWithoutAddingAggregateObjectReference function.
3466         (WebCore::BinaryPropertyListSerializer::writeIntegerArray): Call the new
3467         writeIntegerWithoutAddingAggregateObjectReference function and therefore remove the
3468         code to save and restore m_currentAggregateBufferByte, which is no longer needed.
3469
3470 2009-04-13  Holger Hans Peter Freyther  <zecke@selfish.org>
3471
3472         Unreviewed Qt build fix.
3473
3474         * platform/graphics/qt/FontQt.cpp:
3475         (WebCore::Font::floatWidthForComplexText):
3476
3477 2009-04-12  Sam Weinig  <sam@webkit.org>
3478
3479         Reviewed by Mark Rowe.
3480
3481         Move the event and crypto attributes and the captureEvents and releaseEvents
3482         functions out of JSDOMWindowBase by partially generating them.
3483
3484         * bindings/js/JSDOMGlobalObject.cpp:
3485         (WebCore::JSDOMGlobalObject::currentEvent): Make const.
3486         * bindings/js/JSDOMGlobalObject.h:
3487         * bindings/js/JSDOMWindowBase.cpp:
3488         * bindings/js/JSDOMWindowCustom.cpp:
3489         (WebCore::JSDOMWindow::crypto): Not implemented.
3490         (WebCore::JSDOMWindow::event):
3491         (WebCore::JSDOMWindow::captureEvents): Not implemented.
3492         (WebCore::JSDOMWindow::releaseEvents): Ditto.
3493         * page/DOMWindow.idl:
3494
3495 2009-04-12  Sam Weinig  <sam@webkit.org>
3496
3497         Reviewed by Mark Rowe.
3498
3499         Move more attributes out of JSDOMWindowBase by
3500         partially generating them.
3501
3502         - Expose the MessagePort constructor.
3503
3504         * bindings/js/JSDOMGlobalObject.h:
3505         (WebCore::getDOMConstructor):
3506         * bindings/js/JSDOMWindowBase.cpp:
3507         (setJSDOMWindowBaseEvent):
3508         * bindings/js/JSDOMWindowCustom.cpp:
3509         (WebCore::JSDOMWindow::image):
3510         (WebCore::JSDOMWindow::option):
3511         (WebCore::JSDOMWindow::audio):
3512         (WebCore::JSDOMWindow::webKitPoint):
3513         (WebCore::JSDOMWindow::webKitCSSMatrix):
3514         (WebCore::JSDOMWindow::xMLHttpRequest):
3515         (WebCore::JSDOMWindow::xSLTProcessor):
3516         (WebCore::JSDOMWindow::messageChannel):
3517         (WebCore::JSDOMWindow::worker):
3518         * page/DOMWindow.idl:
3519
3520 2009-04-12  Timothy Hatcher  <timothy@apple.com>
3521
3522         A resource's filename is not correct after a redirect in the Inspector.
3523
3524         Reviewed by Dan Bernstein.
3525
3526         * inspector/InspectorResource.cpp:
3527         (WebCore::InspectorResource::updateScriptObject): Fix a typo in the
3528         lastPathComponent property name.
3529
3530 2009-04-12  Adele Peterson  <adele@apple.com>
3531
3532         Reviewed by Darin Adler.
3533
3534         Test: editing/inserting/6609479-1.html
3535
3536         Follow-up to <rdar://problem/6609479>.
3537
3538         Before my last change, a Mail blockquote would've been broken up earlier, and you would've been guaranteed that the inserted content
3539         was at the start of a paragraph.  Now we need to check for that explicitly, and only merge the start of the inserted content if it is 
3540         at the start of a paragraph.
3541
3542         * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::shouldMergeStart):
3543
3544 2009-04-11  Adele Peterson  <adele@apple.com>
3545
3546         Reviewed by Dan Bernstein.
3547
3548         Fix for <rdar://problem/6609479> Pressing return inside a table cell that's inside quoted content will split the table
3549
3550         Test: editing/inserting/6609479.html
3551
3552         Don't break a blockquote if pasting or inserting into a table.
3553
3554         * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply):
3555         * editing/TypingCommand.cpp: (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent):
3556
3557 2009-04-11  Dan Bernstein  <mitz@apple.com>
3558
3559         Reviewed by Darin Adler.
3560
3561         - fix <rdar://problem/6643103> Unscaled values from body.scrollHeight
3562
3563         Test: fast/css/zoom-body-scroll.html
3564
3565         Adjust scroll{Left,Top,Width,Height} values for zoom in getters and
3566         setters.
3567
3568         * html/HTMLBodyElement.cpp:
3569         (WebCore::adjustForZoom):
3570         (WebCore::HTMLBodyElement::scrollLeft):
3571         (WebCore::HTMLBodyElement::setScrollLeft):
3572         (WebCore::HTMLBodyElement::scrollTop):
3573         (WebCore::HTMLBodyElement::setScrollTop):
3574         (WebCore::HTMLBodyElement::scrollHeight):
3575         (WebCore::HTMLBodyElement::scrollWidth):
3576
3577 2009-04-10  Timothy Hatcher  <timothy@apple.com>
3578
3579         Allow page navigation and reload while stopped at a breakpoint.
3580
3581         <rdar://problem/6781108> Having a breakpoint active prevents page reload
3582
3583         Reviewed by Darin Adler.
3584
3585         * inspector/InspectorController.cpp:
3586         (WebCore::InspectorController::didContinue): Call the resumedScript function.
3587         * inspector/InspectorController.h: Added didContinue.
3588         * inspector/JavaScriptDebugListener.h: Ditto.
3589         * inspector/JavaScriptDebugServer.cpp:
3590         (WebCore::JavaScriptDebugServer::pauseIfNeeded): Call didContinue on the listeners.
3591         * inspector/front-end/ScriptsPanel.js:
3592         (WebInspector.ScriptsPanel.prototype.debuggerResumed): Update the interface and state.
3593         * inspector/front-end/inspector.js:
3594         (WebInspector.resumedScript): Call ScriptsPanel.debuggerResumed.
3595         * loader/FrameLoader.cpp:
3596         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Call resumeDebugger.
3597
3598 2009-04-10  Sam Weinig  <sam@webkit.org>
3599
3600         Reviewed by Adele Peterson.
3601
3602         Remove unused include for JSLock.
3603
3604         * page/mac/FrameMac.mm:
3605
3606 2009-04-10  Sam Weinig  <sam@webkit.org>
3607
3608         Reviewed by Darin Adler.
3609
3610         Add back the keepAlive timer for after the script execution to
3611         protect the callers of evaluate, as was part of the original intent
3612         of timer.
3613
3614         * bindings/js/ScriptController.cpp:
3615         (WebCore::ScriptController::evaluate):
3616         * page/mac/FrameMac.mm:
3617
3618 2009-04-10  Chris Marrin  <cmarrin@apple.com>
3619
3620         Reviewed by Simon Fraser.
3621
3622         Fixed https://bugs.webkit.org/show_bug.cgi?id=25137
3623
3624         If we reload, the animation controller sticks around and has
3625         a stale animation time. So the needed delay is computed wrong.
3626         I added a reset of the animation timer on load.
3627
3628         I did not do a test case because this only happens on reload so I
3629         couldn't make an automated test. I tried using an iframe and using
3630         reload() but that doesn't tickle the bug.
3631
3632         * dom/Document.cpp:
3633         (WebCore::Document::implicitOpen):
3634
3635 2009-04-10  Grace Kloba  <klobag@gmail.com>
3636
3637         Reviewed by Darin Adler.
3638
3639         Move WORKERS header files inside ENABLE(WORKERS).
3640         So if WORKERS is not enabled and the generated files are not generated, the build is still working.
3641
3642         * bindings/js/JSDOMGlobalObject.cpp:
3643         * bindings/js/JSMessageChannelConstructor.cpp:
3644         * bindings/js/ScheduledAction.cpp:
3645
3646 2009-04-10  Darin Adler  <darin@apple.com>
3647
3648         Reviewed by Brady Eidson.
3649
3650         <rdar://problem/6773515> crash in push_heap inside WebCore when printing
3651
3652         The crash was due to manipulating a timer on a different thread than the one it was created on.
3653         This adds some diagnostics so we'll catch that kind of mistake immediately.
3654
3655         * platform/Timer.cpp:
3656         (WebCore::TimerBase::TimerBase): Store the thread identifier in debug versions.
3657         (WebCore::TimerBase::start): Assert it's the same thread the timer was created on.
3658         (WebCore::TimerBase::stop): Ditto.
3659         (WebCore::TimerBase::isActive): Ditto.
3660         (WebCore::TimerBase::setNextFireTime): Ditto.
3661
3662         * platform/Timer.h: Added the thread identifier data member.
3663
3664 2009-04-10  Chris Marrin  <cmarrin@apple.com>
3665
3666         Reviewed by Dan Bernstein
3667
3668         https://bugs.webkit.org/show_bug.cgi?id=25108
3669
3670         If you remove a class with a transition while that transition is running
3671         the animation timer will continue to fire after the transition is finished.
3672         This has no visual indication, but it does drain the processor. And in some
3673         cases it might even cause a glitch in future animations. Unfortunately there
3674         is no way to test this without putting in printfs.
3675
3676         This happens because the animation logic is never traversed after a transition
3677         is removed, so we never get a chance to cleanup. So I added cleanup in the logic
3678         that fires the dispatch of the last style change when the animation finishes.
3679
3680         Test: transitions/remove-transition-style.html
3681
3682         * page/animation/AnimationController.cpp:
3683         (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
3684         * page/animation/CompositeAnimation.cpp:
3685         (WebCore::CompositeAnimation::updateTransitions):
3686         (WebCore::CompositeAnimation::animate):
3687         (WebCore::CompositeAnimation::cleanupFinishedAnimations):
3688         * page/animation/CompositeAnimation.h:
3689
3690 2009-04-10  Sam Weinig  <sam@webkit.org>
3691
3692         Reviewed by Geoffrey Garen.
3693
3694         Fix for <rdar://problem/6648858>
3695         CrashTracer: [REGRESSION(Safari 4)] 60 crashes in Safari at com.apple.WebCore • WebCore::ScriptController::evaluate + 241
3696
3697         The Frame (and therefore ScriptController) were being destroyed
3698         during JavaScript execution causing the JSDOMWindowShell to become
3699         null.
3700
3701         * bindings/js/ScriptController.cpp:
3702         (WebCore::ScriptController::evaluate): Use a RefPtr to protect the Frame
3703         instead of the keep-alive timer, since a nested event loop used from with-in 
3704         JavaScript execution could cause the timer to fire before returning.
3705
3706 2009-04-10  Dimitri Glazkov  <dglazkov@chromium.org>
3707
3708         Reviewed by Timothy Hatcher.
3709
3710         https://bugs.webkit.org/show_bug.cgi?id=25133
3711         Fix an error in InspectorController's bindings, clean up a few header
3712         includes, make empty object construction in ScriptObject less ambiguous.
3713
3714         * bindings/js/JSInspectorControllerCustom.cpp:
3715         (WebCore::JSInspectorController::setSetting): Send correct argument from
3716             the bindings.
3717         * bindings/js/ScriptObject.cpp:
3718         (WebCore::ScriptObject::createNew): Added.
3719         * bindings/js/ScriptObject.h: Removed constructor, added decl for createNew.
3720         * inspector/ConsoleMessage.cpp: Remove unused header.
3721         * inspector/ConsoleMessage.h: Ditto.
3722         * inspector/InspectorResource.cpp:
3723         (WebCore::createHeadersObject): Changed to use ScriptObject::createNew.
3724
3725 2009-04-10  Chris Marrin  <cmarrin@apple.com>
3726
3727         Reviewed by Simon Fraser.
3728
3729         Fixed https://bugs.webkit.org/show_bug.cgi?id=25134
3730
3731         This both fixes a bug where I was not sending in the right time
3732         to continue the animation and was not recomputing current time
3733         when coming out of suspend.
3734
3735         * page/animation/AnimationBase.cpp:
3736         (WebCore::AnimationBase::updateStateMachine):
3737         * page/animation/AnimationController.cpp:
3738         (WebCore::AnimationControllerPrivate::suspendAnimations):
3739         (WebCore::AnimationControllerPrivate::resumeAnimations):
3740
3741 2009-04-10  Adam Roben  <aroben@apple.com>
3742
3743         Give Windows's <select> popup menus drop shadows
3744
3745         Rubber-stamped by Steve Falkenburg.
3746
3747         No test possible.
3748
3749         * platform/win/PopupMenuWin.cpp:
3750         (WebCore::registerPopup): Use the CS_DROPSHADOW window class style.
3751
3752 2009-04-10  Timothy Hatcher  <timothy@apple.com>
3753
3754         Fix a bug in the Web Inspector where it would show scripts
3755         from previous pages when toggling the debugger off and back on.
3756
3757         https://bugs.webkit.org/show_bug.cgi?id=25095
3758         rdar://problem/6769970
3759
3760         Reviewed by John Sullivan.
3761
3762         * bindings/js/ScriptCachedFrameData.cpp:
3763         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData): Null out the
3764         debugger for the scriptController. This balances the attachDebugger
3765         that was already in ScriptCachedFrameData::restore.
3766         (WebCore::ScriptCachedFrameData::restore): Clean up an if statement.
3767         * bindings/js/ScriptController.cpp:
3768         (WebCore::ScriptController::clearWindowShell): Clear the debugger from
3769         the current window before setting the new window.
3770         * inspector/JavaScriptDebugServer.cpp:
3771         (WebCore::JavaScriptDebugServer::recompileAllJSFunctions): Only accumulate
3772         source providers for code associated this as the debugger.
3773
3774 2009-04-10  Pierre d'Herbemont  <pdherbemont@apple.com>
3775
3776         Reviewed by Adele Peterson.
3777
3778         <rdar://problem/6646998> Avoid starting QTKitServer if possible
3779         When possible avoid asking QTKit for the MIME types that require QTKitServer
3780         when running 64-bit.
3781
3782         * WebCore.base.exp: Added new entry point.
3783
3784         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3785         (WebCore::addFileTypesToCache): Add an NSArray of types to the cache.
3786         (WebCore::mimeCommonTypesCache): Add all "common" QTKit types to the cache.
3787         (WebCore::mimeModernTypesCache): Add only "modern" QTKit types to the cache (this list does 
3788         not start QTKitServer if it is not already running).
3789         (WebCore::MediaPlayerPrivate::getSupportedTypes): Refactored.
3790         (WebCore::MediaPlayerPrivate::supportsType): Look in list of "modern" types first to avoid
3791         starting QTKitServer if possible.
3792
3793         * platform/mac/WebCoreSystemInterface.h: Add wkQTIncludeOnlyModernMediaFileTypes.
3794         * platform/mac/WebCoreSystemInterface.mm: Ditto.
3795
3796 2009-04-10  Adam Roben  <aroben@apple.com>
3797
3798         Turn on window animations for <select> popup menus
3799
3800         We turned these off back when <select> popup menus were partially
3801         transparent. Now that they're opaque, there's no reason not to
3802         animate them.
3803
3804         Reviewed by Steve Falkenburg.
3805
3806         No test possible.
3807
3808         * platform/win/PopupMenuWin.cpp:
3809         (WebCore::PopupMenu::show): Remove the #ifdef that was disabling the
3810         window animation.
3811
3812 2009-04-10  Dan Bernstein  <mitz@apple.com>
3813
3814         Reviewed by Sam Weinig.
3815
3816         - fix a regression from r42379 which made zero-width characters affect
3817           line height
3818
3819         Test: fixes fast/text/wide-zero-width-space.html
3820
3821         * platform/graphics/mac/FontMacATSUI.mm:
3822         (WebCore::overrideLayoutOperation): Add to the fallback font list set
3823         here, and only if the glyph is not zero-width...
3824         (WebCore::ATSULayoutParameters::initialize): ...instead of doing it
3825         here. This matches WidthIterator's behavior.
3826
3827 2009-04-10  Darin Fisher  <darin@chromium.org>
3828
3829         Fixing build bustage caused by warnings being treated as errors.
3830         1- A local variable was only be used inside a debug assertion, which
3831            caused grief for the release build.
3832         2- Missing initializer for member 'DocumentMarker::activeMatch'
3833
3834         * dom/Document.cpp:
3835         (WebCore::Document::addMarker):
3836         (WebCore::Document::setMarkersActive):
3837
3838 2009-04-10  Finnur Thorarinsson  <finnur.webkit@gmail.com>
3839
3840         Reviewed by John Sullivan.
3841
3842         Fixing: https://bugs.webkit.org/show_bug.cgi?id=25117
3843         (TextMatches don't have a concept of active match)
3844
3845         For the ports that use the DocumentMarker as highlighting for FindInPage it is
3846         useful to have a flag that specifies which marker is active, so it can be drawn
3847         in a different color.
3848
3849         This allows me to remove the hack to use the SelectionController to highlight
3850         the active match (in the ChromiumWin port).
3851
3852         * dom/Document.cpp:
3853         (WebCore::Document::setMarkersActive):
3854         * dom/Document.h:
3855         * dom/DocumentMarker.h:
3856         * rendering/InlineTextBox.cpp:
3857         (WebCore::InlineTextBox::paintTextMatchMarker):
3858         * rendering/RenderTheme.cpp:
3859         (WebCore::RenderTheme::platformActiveTextSearchHighlightColor):
3860         (WebCore::RenderTheme::platformInactiveTextSearchHighlightColor):
3861         * rendering/RenderTheme.h:
3862         * rendering/RenderThemeChromiumWin.cpp:
3863         (WebCore::RenderThemeChromiumWin::platformActiveSelectionBackgroundColor):
3864         (WebCore::RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor):
3865         (WebCore::RenderThemeChromiumWin::platformActiveTextSearchHighlightColor):
3866         (WebCore::RenderThemeChromiumWin::platformInactiveTextSearchHighlightColor):
3867         * rendering/RenderThemeChromiumWin.h:
3868
3869 2009-04-10  Pamela Greene  <pam@chromium.org>
3870
3871         Reviewed by Dimitri Glazkov.
3872
3873         Build fix for Chromium.
3874         https://bugs.webkit.org/show_bug.cgi?id=12440
3875
3876         * page/chromium/FrameChromium.cpp:
3877         (WebCore::computePageRectsForFrame): change docWidth() to overflowWidth()
3878
3879 2009-04-09  David Hyatt  <hyatt@apple.com>
3880
3881         Reviewed by Oliver Hunt
3882
3883         Add a timer for style recalc (similar to the one used for scheduling layouts).  For now in order
3884         to reduce the risk of regressions, I have left in all the synchronous machinery for updating style
3885         following DOM events and JavaScript timeouts.  Eventually these calls will be removed.
3886
3887         Where the timer will really kick in and be useful is for clients that do style changes from
3888         Objective-C DOM bindings or that execute JavaScript to manipulate style from the JavaScriptCore C API.
3889
3890         * dom/ContainerNode.cpp:
3891         (WebCore::ContainerNode::insertBefore):
3892         (WebCore::ContainerNode::replaceChild):
3893         (WebCore::ContainerNode::removeChild):
3894         (WebCore::ContainerNode::appendChild):
3895         * dom/Document.cpp:
3896         (WebCore::Document::Document):
3897         (WebCore::Document::~Document):
3898         (WebCore::Document::scheduleStyleRecalc):
3899         (WebCore::Document::unscheduleStyleRecalc):
3900         (WebCore::Document::styleRecalcTimerFired):
3901         (WebCore::Document::updateStyleForAllDocuments):
3902         (WebCore::Document::detach):
3903         * dom/Document.h:
3904         * dom/Node.cpp:
3905         (WebCore::Node::setNeedsStyleRecalc):
3906         (WebCore::Node::lazyAttach):
3907
3908 2009-04-09  Oliver Hunt  <oliver@apple.com>
3909
3910         Reviewed by Gavin Barraclough.
3911
3912         <rdar://problem/6586787> JS debugger does not work in 64-bit
3913
3914         Don't truncate the source id in JSCallFrame
3915
3916         * inspector/JavaScriptCallFrame.h:
3917
3918 2009-04-09  Adam Roben  <aroben@apple.com>
3919
3920         Start compiling HistoryPropertyList on Windows
3921
3922         Reviewed by Darin Adler.
3923
3924         * WebCore.vcproj/WebCore.vcproj: Added HistoryPropertyList and its
3925         dependencies to the project. Copy headers from history/cf to
3926         $WebKitOutputDir.
3927         * history/cf/HistoryPropertyList.cpp: Added StringExtras.h so that
3928         this file will compile on Windows.
3929
3930 2009-04-09  Dan Bernstein  <mitz@apple.com>
3931
3932         Reviewed by Dave Hyatt.
3933
3934         - fix <rdar://problem/6166612> Text boxes' metrics should be based on
3935           the actual fonts used in them, not just the primary font
3936
3937         Covered by many existing layout tests
3938
3939         * platform/graphics/Font.cpp:
3940         (WebCore::Font::floatWidth): Added a fallbackFonts parameter. If the
3941         platform supports collecting fallback fonts in its complex font path
3942         and fallbackFonts is not null, all fallback fonts used for the text run
3943         will be added to it.
3944
3945         * platform/graphics/Font.h:
3946         (WebCore::Font::width): Ditto.
3947
3948         * platform/graphics/FontFastPath.cpp:
3949         (WebCore::Font::glyphDataForCharacter): Removed an unnecessary namespace
3950         qualifier.
3951         (WebCore::Font::floatWidthForSimpleText): Added a fallbackFonts
3952         parameter, which is passed down to WidthIterator.
3953
3954         * platform/graphics/WidthIterator.cpp:
3955         (WebCore::WidthIterator::WidthIterator): Added a fallbackFonts parameter
3956         and used it to initialize the m_fallbackFonts member.
3957         (WebCore::WidthIterator::advance): Track the fonts being used and add
3958         any fallback fonts to the m_fallbackFonts set. Make sure to only add
3959         non-small-caps fonts.
3960
3961         * platform/graphics/WidthIterator.h:
3962
3963         * platform/graphics/chromium/FontChromiumWin.cpp:
3964         (WebCore::Font::canReturnFallbackFontsForComplexText): Added an
3965         implementation that returns false, meaning this platform's
3966         implementation of floatWidthForComplexText() does not populate the
3967         fallbackFonts set.
3968         (WebCore::Font::floatWidthForComplexText): Updated for the new
3969         prototype.
3970
3971         * platform/graphics/chromium/FontLinux.cpp: Ditto.
3972
3973         * platform/graphics/gtk/FontGtk.cpp: Ditto.
3974
3975         * platform/graphics/mac/CoreTextController.cpp:
3976         (WebCore::CoreTextController::CoreTextController): Added a fallbackFonts
3977         parameter and used it to initialize the m_fallbackFonts member.
3978         (WebCore::CoreTextController::collectCoreTextRunsForCharacters): Add
3979         fallback fonts to m_fallbackFonts.
3980
3981         * platform/graphics/mac/CoreTextController.h:
3982
3983         * platform/graphics/mac/FontMac.mm:
3984         (WebCore::Font::canReturnFallbackFontsForComplexText): Added an
3985         implementation that returns true, indicating that the Mac
3986         implementations of floatWidthForComplexText() populate the fallbackFonts
3987         set.
3988         * platform/graphics/mac/FontMacATSUI.mm:
3989         (WebCore::ATSULayoutParameters::ATSULayoutParameters): Added a
3990         fallbackFonts parameter and used it to initialize the m_fallbackFonts
3991         member.
3992         (WebCore::ATSULayoutParameters::initialize): Add fallback fonts to
3993         m_fallbackFonts.
3994         (WebCore::Font::floatWidthForComplexText): Added a fallbackFonts
3995         parameter, which is passed down to ATSULayoutParameters.
3996
3997         * platform/graphics/mac/FontMacCoreText.cpp:
3998         (WebCore::Font::floatWidthForComplexText): Added a fallbackFonts
3999         parameter, which is passed down to CoreTextController.
4000
4001         * platform/graphics/win/FontWin.cpp:
4002         (WebCore::Font::canReturnFallbackFontsForComplexText): Added an
4003         implementation that returns true, indicating that the
4004         UniscribeController-based implementations of floatWidthForComplexText()
4005         populate the fallbackFonts set.
4006         (WebCore::Font::floatWidthForComplexText): Added a fallbackFonts
4007         parameter, which is passed down to UniscribeController.
4008
4009         * platform/graphics/win/UniscribeController.cpp:
4010         (WebCore::UniscribeController::UniscribeController): Added a
4011         fallbackfonts parameter and used it to initialize m_fallbackFonts.
4012         (WebCore::UniscribeController::advance): Add fallback fonts to
4013         m_fallbackFonts.
4014
4015         * platform/graphics/win/UniscribeController.h:
4016         
4017         * platform/graphics/wx/FontWx.cpp:
4018         (WebCore::Font::canReturnFallbackFontsForComplexText): Added an
4019         implementation that returns false, meaning this platform's
4020         implementation of floatWidthForComplexText() does not populate the
4021         fallbackFonts set.
4022         (WebCore::Font::floatWidthForComplexText): Updated for the new
4023         prototype.
4024
4025         * rendering/InlineFlowBox.cpp:
4026         (WebCore::InlineFlowBox::computeLogicalBoxHeights): For an InlineTextBox
4027         with multiple fonts, compute a common baseline and line height by
4028         considering all fonts' ascents and descents (and line spacing, if
4029         applicable).
4030
4031         * rendering/InlineTextBox.cpp:
4032         (WebCore::InlineTextBox::setFallbackFonts): Added. Temporarily stores
4033         the set of fallback fonts in a vector.
4034         (WebCore::InlineTextBox::takeFallbackFonts): Added. Returns the fallback
4035         fonts previously stored and removes them from storage.
4036
4037         * rendering/InlineTextBox.h:
4038
4039         * rendering/RenderText.cpp:
4040         (WebCore::RenderText::RenderText): Initialized the
4041         m_knownNotToUseFallbackFonts to false.
4042         (WebCore::RenderText::styleDidChange): Reset
4043         m_knownNotToUseFallbackFonts to false if the style difference is such that
4044         affects layout.
4045         (WebCore::RenderText::widthFromCache): Added a fallbackFonts parameter,
4046         which is passed down to Font::width().
4047         (WebCore::RenderText::trimmedPrefWidths): Updated for the change to
4048         widthFromCache().
4049         (WebCore::RenderText::calcPrefWidths): Made this call a private version
4050         of calcPrefWidths() that takes a fallbackFonts parameter and set the
4051         m_knownNotToUseFallbackFonts to true if the set comes back empty.
4052         The private version passes the fallbackFonts set to widthFromCache().
4053         (WebCore::RenderText::setText): Reset m_knownNotToUseFallbackFonts to
4054         false.
4055         (WebCore::RenderText::createFallbackFontMetricsBox): Added.
4056         (WebCore::RenderText::width): Added a fallbackFonts parameter, which is
4057         passed down to calcPrefWidths(), widthFromCache() and Font::width().
4058         Set m_knownNotToUseFallbackFonts to true when appropriate.
4059
4060         * rendering/RenderText.h:
4061
4062         * rendering/bidi.cpp:
4063         (WebCore::RenderBlock::constructLine): Added an assertion and a continue
4064         statement to remove one level of indentation.
4065         (WebCore::RenderBlock::computeHorizontalPositionsForLine): Temporarily
4066         store the set of fallback fonts in the InlineTextBox.
4067         (WebCore::RenderBlock::computeVerticalPositionsForLine): Added an
4068         assertion.
4069
4070 2009-04-09  David Hyatt  <hyatt@apple.com>
4071
4072         Reviewed by Adam Roben
4073
4074         Rename all of the changed()/setChanged()/setDocumentChanged() methods to mention style recalc
4075         explicitly instead.
4076
4077         * bindings/js/JSCustomPositionCallback.cpp:
4078         (WebCore::JSCustomPositionCallback::handleEvent):
4079         * bindings/js/JSCustomPositionErrorCallback.cpp:
4080         (WebCore::JSCustomPositionErrorCallback::handleEvent):
4081         * bindings/js/JSCustomSQLStatementCallback.cpp:
4082         (WebCore::JSCustomSQLStatementCallback::handleEvent):
4083         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
4084         (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
4085         * bindings/js/JSCustomSQLTransactionCallback.cpp:
4086         (WebCore::JSCustomSQLTransactionCallback::handleEvent):
4087         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
4088         (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
4089         * bindings/js/JSCustomVoidCallback.cpp:
4090         (WebCore::JSCustomVoidCallback::handleEvent):
4091         * bindings/js/JSCustomXPathNSResolver.cpp:
4092         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
4093         * bindings/js/JSEventListener.cpp:
4094         (WebCore::JSAbstractEventListener::handleEvent):
4095         * bindings/js/ScheduledAction.cpp:
4096         (WebCore::ScheduledAction::execute):
4097         * bindings/js/ScriptControllerMac.mm:
4098         (WebCore::updateStyleIfNeededForBindings):
4099         (WebCore::ScriptController::initJavaJSBindings):
4100         * css/CSSMutableStyleDeclaration.cpp:
4101         (WebCore::CSSMutableStyleDeclaration::removeProperty):
4102         (WebCore::CSSMutableStyleDeclaration::setNeedsStyleRecalc):
4103         (WebCore::CSSMutableStyleDeclaration::setProperty):
4104         (WebCore::CSSMutableStyleDeclaration::setStringProperty):
4105         (WebCore::CSSMutableStyleDeclaration::setImageProperty):
4106         (WebCore::CSSMutableStyleDeclaration::parseDeclaration):
4107         (WebCore::CSSMutableStyleDeclaration::addParsedProperties):
4108         (WebCore::CSSMutableStyleDeclaration::setCssText):
4109         (WebCore::CSSMutableStyleDeclaration::merge):
4110         (WebCore::CSSMutableStyleDeclaration::removePropertiesInSet):
4111         * css/CSSMutableStyleDeclaration.h:
4112         * css/CSSStyleSelector.cpp:
4113         (WebCore::CSSStyleSelector::SelectorChecker::allVisitedStateChanged):
4114         (WebCore::CSSStyleSelector::SelectorChecker::visitedStateChanged):
4115         * css/CSSVariablesDeclaration.cpp:
4116         (WebCore::CSSVariablesDeclaration::removeVariable):
4117         (WebCore::CSSVariablesDeclaration::setVariable):
4118         (WebCore::CSSVariablesDeclaration::setNeedsStyleRecalc):
4119         * css/CSSVariablesDeclaration.h:
4120         * dom/ContainerNode.cpp:
4121         (WebCore::ContainerNode::insertBefore):
4122         (WebCore::ContainerNode::replaceChild):
4123         (WebCore::ContainerNode::removeChild):
4124         (WebCore::ContainerNode::appendChild):
4125         (WebCore::ContainerNode::detach):
4126         (WebCore::ContainerNode::setFocus):
4127         (WebCore::ContainerNode::setActive):
4128         (WebCore::ContainerNode::setHovered):
4129         * dom/Document.cpp:
4130         (WebCore::Document::Document):
4131         (WebCore::Document::~Document):
4132         (WebCore::Document::scheduleStyleRecalc):
4133         (WebCore::Document::unscheduleStyleRecalc):
4134         (WebCore::Document::recalcStyle):
4135         (WebCore::Document::updateStyleIfNeeded):
4136         (WebCore::Document::updateStyleForAllDocuments):
4137         (WebCore::Document::updateLayout):
4138         (WebCore::Document::implicitClose):
4139         (WebCore::Document::prepareMouseEvent):
4140         (WebCore::Document::setFocusedNode):
4141         (WebCore::Document::setCSSTarget):
4142         * dom/Document.h:
4143         * dom/Element.cpp:
4144         (WebCore::Element::recalcStyle):
4145         (WebCore::checkForSiblingStyleChanges):
4146         * dom/InputElement.cpp:
4147         (WebCore::InputElement::parseMaxLengthAttribute):
4148         * dom/MouseRelatedEvent.cpp:
4149         (WebCore::MouseRelatedEvent::receivedTarget):
4150         * dom/Node.cpp:
4151         (WebCore::Node::Node):
4152         (WebCore::Node::setNeedsStyleRecalc):
4153         (WebCore::Node::lazyAttach):
4154         (WebCore::Node::dispatchGenericEvent):
4155         * dom/Node.h:
4156         (WebCore::Node::needsStyleRecalc):
4157         (WebCore::Node::childNeedsStyleRecalc):
4158         (WebCore::Node::setChildNeedsStyleRecalc):
4159         * dom/OptionElement.cpp:
4160         (WebCore::OptionElement::setSelectedState):
4161         * dom/ScriptElement.cpp:
4162         (WebCore::ScriptElementData::evaluateScript):
4163         * dom/StyledElement.cpp:
4164         (WebCore::StyledElement::attributeChanged):