JavaScriptCore:
[WebKit-https.git] / WebCore / ChangeLog
1 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
2
3         Reviewed by Sam Weinig.
4         
5         Updated for JavaScriptCore rename.
6
7         * ForwardingHeaders/interpreter/CallFrame.h: Copied from WebCore/ForwardingHeaders/runtime/ExecState.h.
8         * ForwardingHeaders/runtime/ExecState.h: Removed.
9         * bindings/objc/WebScriptObject.mm:
10         * bridge/c/c_instance.cpp:
11         * bridge/jni/jni_jsobject.mm:
12         * dom/Node.cpp:
13         * dom/NodeFilter.cpp:
14         * dom/NodeIterator.cpp:
15         * dom/TreeWalker.cpp:
16         * inspector/JavaScriptCallFrame.h:
17
18 2008-11-17  Pierre-Olivier Latour  <pol@apple.com>
19
20         Reviewed by Sam Weinig.
21
22         Added functionality to AnimationController to allow pausing a running
23         animation or transition at a given time for testing purposes.
24
25         https://bugs.webkit.org/show_bug.cgi?id=21261
26
27         Tests: animations/animation-drt-api.html
28                transitions/transition-drt-api.html
29
30         * WebCore.base.exp:
31         * WebCore.xcodeproj/project.pbxproj:
32         * page/animation/AnimationBase.cpp:
33         (WebCore::AnimationBase::updateStateMachine):
34         (WebCore::AnimationBase::progress):
35         (WebCore::AnimationBase::pauseAtTime):
36         * page/animation/AnimationBase.h:
37         * page/animation/AnimationController.cpp:
38         (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
39         (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
40         (WebCore::AnimationController::pauseAnimationAtTime):
41         (WebCore::AnimationController::pauseTransitionAtTime):
42         * page/animation/AnimationController.h:
43         * page/animation/CompositeAnimation.cpp:
44         (WebCore::CompositeAnimationPrivate::isAnimating):
45         (WebCore::CompositeAnimationPrivate::pauseAnimationAtTime):
46         (WebCore::CompositeAnimationPrivate::pauseTransitionAtTime):
47         (WebCore::CompositeAnimation::pauseAnimationAtTime):
48         (WebCore::CompositeAnimation::pauseTransitionAtTime):
49         * page/animation/CompositeAnimation.h:
50         * page/animation/ImplicitAnimation.cpp:
51         (WebCore::ImplicitAnimation::animate):
52
53 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
54
55         Reviewed by Sam Weinig.
56         
57         Updated for JavaScriptCore renames.
58
59         * ForwardingHeaders/VM: Removed.
60         * ForwardingHeaders/VM/Machine.h: Removed.
61         * ForwardingHeaders/interpreter: Added.
62         * ForwardingHeaders/interpreter/Interpreter.h: Copied from ForwardingHeaders/VM/Machine.h.
63         * WebCore.pro:
64         * bindings/js/JSXMLHttpRequestCustom.cpp:
65         * page/Console.cpp:
66         * webcore-base.bkl:
67
68 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
69
70         Reviewed by Sam Weinig.
71
72         Updated for JavaScriptCore renames.
73
74         * ForwardingHeaders/runtime/Interpreter.h: Removed.
75         * WebCore.vcproj/WebCore.vcproj:
76         * bindings/js/JSDOMBinding.h:
77         * bindings/js/WorkerScriptController.cpp:
78         * bindings/objc/WebScriptObject.mm:
79         * bridge/NP_jsobject.cpp:
80         * bridge/jni/jni_jsobject.mm:
81         * html/CanvasRenderingContext2D.cpp:
82         * inspector/JavaScriptCallFrame.cpp:
83         * page/Console.cpp:
84
85 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
86
87         Not reviewed.
88
89         Try to fix wx build.
90
91         * webcore-base.bkl:
92
93 2008-11-17  Greg Bolsinga  <bolsinga@apple.com>
94
95         Reviewed by Darin Adler.
96
97         https://bugs.webkit.org/show_bug.cgi?id=21810
98         Remove use of static C++ objects that are destroyed at exit time (destructors)
99
100         Find some missing DEFINE_STATIC_LOCAL use cases.
101         
102         * bindings/js/JSSVGPODTypeWrapper.h:
103         (WebCore::PODTypeWrapperCacheInfoTraits::emptyValue):
104         (WebCore::JSSVGDynamicPODTypeWrapperCache::dynamicWrapperHashMap):
105         * dom/make_names.pl: Generate code to use DEFINE_STATIC_LOCAL.
106         * page/AccessibilityRenderObject.cpp:
107         (WebCore::RoleEntry::): This method is only called once, so the array does not have to be static.
108         * platform/graphics/FontCache.cpp:
109         (WebCore::FontPlatformDataCacheKeyTraits::emptyValue):
110         (WebCore::FontDataCacheKeyTraits::emptyValue):
111         * rendering/style/RenderStyle.h:
112         (WebCore::InheritedFlags::initialTransform):
113
114 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
115
116         Not reviewed.
117
118         Try to fix Qt build.
119
120         * WebCore.pro:
121
122 2008-11-16  Simon Fraser  <simon.fraser@apple.com>
123
124         Reviewed by Dan Bernstein
125
126         https://bugs.webkit.org/show_bug.cgi?id=22118
127         
128         Fix resize corner tracking in transformed elements by using 
129         mapping the point into local coords using absoluteToLocal,
130         rather than convertToLayerCoords.
131         
132         Test: fast/css/resize-corner-tracking-transformed.html
133
134         * page/EventHandler.h:
135         * rendering/RenderLayer.cpp:
136         (WebCore::RenderLayer::absoluteToContents):
137         (WebCore::RenderLayer::offsetFromResizeCorner):
138         (WebCore::RenderLayer::isPointInResizeControl):
139         * rendering/RenderLayer.h:
140
141 2008-11-16  Geoffrey Garen  <ggaren@apple.com>
142
143         Not reviewed.
144
145         Try to fix Qt build.
146
147         * WebCore.pro:
148
149 2008-11-16  Greg Bolsinga  <bolsinga@apple.com>
150
151         Reviewed by Geoffrey Garen.
152
153         Use RefPtr and PassRefPtr where appropriate.
154
155         * loader/FTPDirectoryDocument.cpp:
156         (WebCore::createTemplateDocumentData):
157
158 2008-11-16  Greg Bolsinga  <bolsinga@apple.com>
159
160         Fix build break for real.
161
162         * loader/FTPDirectoryDocument.cpp:
163         (WebCore::createTemplateDocumentData):
164
165 2008-11-16  Greg Bolsinga  <bolsinga@apple.com>
166
167         Fix build break and bug.
168
169         * loader/FTPDirectoryDocument.cpp:
170         (WebCore::createTemplateDocumentData):
171
172 2008-11-16  Greg Bolsinga  <bolsinga@apple.com>
173
174         Reviewed by Darin Adler.
175
176         https://bugs.webkit.org/show_bug.cgi?id=21810
177         Remove use of static C++ objects that are destroyed at exit time (destructors)
178
179         Use DEFINE_STATIC_LOCAL for static RetainPtr<T>, RefPtr<T>. Add additional
180         uses of DEFINE_STATIC_LOCAL where appropriate.
181
182         * html/HTMLTableElement.cpp:
183         (WebCore::HTMLTableElement::addSharedCellBordersDecl): new the AtomicStrings
184         * loader/CachedImage.cpp:
185         (WebCore::brokenImage):
186         (WebCore::nullImage):
187         * loader/FTPDirectoryDocument.cpp:
188         (WebCore::_createTemplateDocumentData): Created so accessor has one line initialization
189         (WebCore::FTPDirectoryTokenizer::loadDocumentTemplate):
190         * loader/icon/IconDatabase.cpp:
191         (WebCore::loadDefaultIconRecord):
192         * page/AccessibilityObject.cpp:
193         (WebCore::AccessibilityObject::actionVerb):
194         * page/AccessibilityRenderObject.cpp:
195         (WebCore::AccessibilityRenderObject::actionVerb):
196         * page/mac/EventHandlerMac.mm:
197         (WebCore::currentEvent):
198         * platform/ScrollView.cpp:
199         (WebCore::ScrollView::paint):
200         * platform/graphics/Image.cpp:
201         (WebCore::Image::nullImage):
202         * platform/graphics/mac/ColorMac.mm:
203         (WebCore::nsColor):
204         * platform/graphics/mac/FontCacheMac.mm: new the Strings
205         (WebCore::FontCache::getSimilarFontPlatformData):
206         * platform/graphics/mac/GraphicsContextMac.mm:
207         (WebCore::_createPatternColor): Created so accessor has one line initialization
208         (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
209         * platform/graphics/mac/SimpleFontDataMac.mm:
210         (WebCore::webFallbackFontFamily):
211         * platform/mac/PasteboardMac.mm:
212         (WebCore::writableTypesForURL):
213         (WebCore::createWritableTypesForImage): Created so accessor has one line initialization
214         (WebCore::writableTypesForImage):
215         (WebCore::stripAttachmentCharacters):
216         * rendering/RenderLayer.cpp:
217         (WebCore::RenderLayer::paintResizer):
218
219 2008-11-16  Holger Hans Peter Freyther  <zecke@selfish.org>
220
221         Reviewed by Darin Adler.
222
223         Do not spit Curl errors into the stdout as this is used by DRT
224
225         We have failing tests results due the curl errors printed to stdout,
226         move them to stderr to be able to pass those tests.
227
228         * platform/network/curl/ResourceHandleManager.cpp:
229         (WebCore::ResourceHandleManager::startJob):
230
231 2008-11-16  Holger Hans Peter Freyther  <zecke@selfish.org>
232
233         - fix the Gtk+ build
234
235         * GNUmakefile.am:
236
237 2008-11-16  Darin Adler  <darin@apple.com>
238
239         - try to fix Qt build
240
241         * WebCore.pro: Add the worker-related source files.
242
243 2008-11-16  Darin Adler  <darin@apple.com>
244
245         Suggested by Alexey Proskuryakov.
246
247         - fix the GTK build another way
248
249         * GNUmakefile.am: Add the worker-related source files.
250         * bindings/js/JSEventTarget.cpp: Take the #if back out.
251
252 2008-11-16  Darin Adler  <darin@apple.com>
253
254         - try to fix GTK build
255
256         * bindings/js/JSEventTarget.cpp: Put worker includes inside an #if.
257
258 2008-11-16  Darin Adler  <darin@apple.com>
259
260         Reviewed by Dan Bernstein.
261
262         - https://bugs.webkit.org/show_bug.cgi?id=22295
263           track which history items are from page load failures
264
265         * history/HistoryItem.cpp: Sort includes, add newly needed ones, and remove
266         no-longer-needed ones.
267         (WebCore::HistoryItem::HistoryItem): Initialize m_lastVisitWasFailure to false.
268         (WebCore::HistoryItem::showTreeWithIndent): Rewrote to avoid appending to a
269         String, since that's not efficient.
270
271         * history/HistoryItem.h: Removed unneeded includes. Added lastVisitWasFailure,
272         setLastVisitWasFailure, and m_lastVisitWasFailure.
273
274         * history/mac/HistoryItemMac.mm: Add newly-needed include
275         (WebCore::HistoryItem::setTransientProperty): Rewrote to avoid keeping a
276         m_transientProperties map around when it is empty.
277
278         * loader/FrameLoader.cpp:
279         (WebCore::FrameLoader::createHistoryItem): Call setLastVisitWasFailure when
280         the page was unreachable or an HTTP page with a status code that indicates
281         failure.
282
283 2008-11-16  Yong Li  <yong.li@torchmobile.com>
284
285         Reviewed by Timothy Hatcher.
286         Landed by George Staikos.
287
288         Optimization: don't relayout, repaint, or emit a DOM event if the
289         scroll event didn't scroll anywhere.
290
291         * rendering/RenderLayer.cpp:
292         (WebCore::RenderLayer::scrollToOffset): add early exit
293
294 2008-11-16  Alexey Proskuryakov  <ap@webkit.org>
295
296         Reviewed by Dan Bernstein.
297
298         https://bugs.webkit.org/show_bug.cgi?id=22290
299         Remove cross-heap GC and MessagePort multi-threading support
300
301         It is broken (and may not be implementable at all), and no longer needed, as we
302         don't use MessagePorts for communication with workers any more.
303
304         * bindings/js/JSDOMBinding.cpp:
305         * bindings/js/JSDOMBinding.h:
306         * bindings/js/JSDOMWindowBase.cpp:
307         * bindings/js/JSDOMWindowBase.h:
308         Removed cross-heap GC implementation.
309
310         * dom/MessagePort.cpp:
311         (WebCore::MessagePort::hasPendingActivity):
312         * dom/MessagePort.h:
313         Made objects RefCounted instead of ThreadSafeShared, added FIXME comments for code that is
314         unnecessarily complicated for single threaded case.
315
316 2008-11-14  Alexey Proskuryakov  <ap@webkit.org>
317
318         Reviewed by Maciej Stachowiak.
319
320         https://bugs.webkit.org/show_bug.cgi?id=22266
321         Stop using MessagePort for communication with workers
322
323         The current MessagePort specification is not well suited for being implemented in a
324         multi-threaded or multi-process environment, and this doesn't appear to be easily fixable.
325         This patch implements a simpler Mozilla API for workers instead.
326
327         * WebCore.xcodeproj/project.pbxproj:
328         * DerivedSources.make:
329         * bindings/js/JSDOMWindowBase.cpp: (jsDOMWindowBaseWorker):
330         * bindings/js/JSDedicatedWorkerConstructor.cpp: Removed.
331         * bindings/js/JSDedicatedWorkerConstructor.h: Removed.
332         * bindings/js/JSDedicatedWorkerCustom.cpp: Removed.
333         * bindings/js/JSWorkerConstructor.cpp: Copied from WebCore/bindings/js/JSDedicatedWorkerConstructor.cpp.
334         * bindings/js/JSWorkerConstructor.h: Copied from WebCore/bindings/js/JSDedicatedWorkerConstructor.h.
335         * bindings/js/JSWorkerCustom.cpp: Copied from WebCore/bindings/js/JSDedicatedWorkerCustom.cpp.
336         * dom/DedicatedWorker.cpp: Removed.
337         * dom/DedicatedWorker.h: Removed.
338         * dom/DedicatedWorker.idl: Removed.
339         Renamed DedicatedWorker to Worker to match Mozilla and current WHATWG cpec.
340
341         * bindings/js/JSEventListener.cpp: (WebCore::JSAbstractEventListener::handleEvent):
342         Clear worker exceptions to avoid hitting an assertion.
343
344         * dom/EventTarget.cpp: (WebCore::EventTarget::toWorker):
345         * dom/EventTarget.h:
346         * bindings/js/JSEventTarget.cpp: (WebCore::toJS):
347         WorkerContext is now an EventTarget, too.
348
349         * bindings/js/JSWorkerContext.cpp: Removed onconnect, constructors for MessageChannel and
350         MessagePort. Added postMessage() and onmessage.
351
352         * dom/ScriptExecutionContext.cpp: (WebCore::performTask): Do not reference ScriptExecutionContext
353         when posting a task - this operation is not thread safe. It is also not necessary any more,
354         as the context is kept alive by WorkerMessagingProxy.
355
356         * dom/Worker.cpp: Copied from WebCore/dom/DedicatedWorker.cpp.
357         (WebCore::Worker::Worker): Start loading the script right away - there is no reason to do
358         that on a timer.
359         (WebCore::Worker::~Worker): Notify messaging proxy.
360         (WebCore::Worker::postMessage): Just ask the proxy to post the message.
361         (WebCore::Worker::notifyFinished): Notify messaging proxy when a thread object becomes
362         available. Also, it is now safe to unsetPendingActivity(), making the object collectable.
363         I'm not sure if this is the right lifetime for workers, as unreachable workers with event
364         listeners should probably be kept alive, but it at least lets the object be collected.
365         (WebCore::Worker::addEventListener): Added an EventTarget implementation.
366         (WebCore::Worker::removeEventListener): Added an EventTarget implementation.
367         (WebCore::Worker::dispatchEvent): Added an EventTarget implementation.
368
369         * dom/Worker.h: Copied from WebCore/dom/DedicatedWorker.h.
370         * dom/Worker.idl: Copied from WebCore/dom/DedicatedWorker.idl.
371         Removed onclose, made an EventListener. Actual messaging is now handled by WorkerMessagingProxy.
372
373         * dom/WorkerContext.cpp:
374         (WebCore::WorkerContext::~WorkerContext): Notify messaging proxy that the context was shut
375         down successfully.
376         (WebCore::WorkerContext::postMessage): Added. Post the message via messaging proxy.
377
378         * dom/WorkerContext.h: Added postMessage and onmessage, removed onconnect.
379
380         * dom/WorkerMessagingProxy.cpp: Added.
381         * dom/WorkerMessagingProxy.h: Added.
382         This new class implements actual messaging. It is notified when a Worker is garbage collected,
383         and asks the thread to shut down. It also owns the thread object, and references script
384         execution context, making it safe to post messages to it remotely.
385
386         * dom/WorkerThread.cpp:
387         * dom/WorkerThread.h:
388         Keep a reference to messaging proxy, not to Worker itself. Also, the thread object no longer
389         keeps itself alive - it is now the job of messaging proxy.
390
391 2008-11-15  Darin Adler  <darin@apple.com>
392
393         Rubber stamped by Geoff Garen.
394
395         - do the long-planned StructureID -> Structure rename
396
397         * ForwardingHeaders/runtime/Structure.h: Copied from WebCore/ForwardingHeaders/runtime/StructureID.h.
398         * ForwardingHeaders/runtime/StructureID.h: Removed.
399         * bindings/js/JSAudioConstructor.cpp:
400         (WebCore::JSAudioConstructor::JSAudioConstructor):
401         * bindings/js/JSDOMBinding.cpp:
402         (WebCore::getCachedDOMStructure):
403         (WebCore::cacheDOMStructure):
404         * bindings/js/JSDOMBinding.h:
405         (WebCore::DOMObject::DOMObject):
406         (WebCore::getDOMStructure):
407         * bindings/js/JSDOMGlobalObject.cpp:
408         (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
409         * bindings/js/JSDOMGlobalObject.h:
410         * bindings/js/JSDOMWindowBase.cpp:
411         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
412         * bindings/js/JSDOMWindowBase.h:
413         * bindings/js/JSDOMWindowShell.cpp:
414         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
415         (WebCore::JSDOMWindowShell::setWindow):
416         * bindings/js/JSDOMWindowShell.h:
417         (WebCore::JSDOMWindowShell::createStructure):
418         * bindings/js/JSDedicatedWorkerConstructor.cpp:
419         (WebCore::JSDedicatedWorkerConstructor::JSDedicatedWorkerConstructor):
420         * bindings/js/JSHTMLAllCollection.h:
421         (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
422         (WebCore::JSHTMLAllCollection::createStructure):
423         * bindings/js/JSImageConstructor.cpp:
424         (WebCore::JSImageConstructor::JSImageConstructor):
425         * bindings/js/JSInspectedObjectWrapper.cpp:
426         (WebCore::JSInspectedObjectWrapper::wrap):
427         (WebCore::JSInspectedObjectWrapper::JSInspectedObjectWrapper):
428         * bindings/js/JSInspectedObjectWrapper.h:
429         * bindings/js/JSInspectorCallbackWrapper.cpp:
430         (WebCore::leakInspectorCallbackWrapperStructure):
431         (WebCore::JSInspectorCallbackWrapper::wrap):
432         (WebCore::JSInspectorCallbackWrapper::JSInspectorCallbackWrapper):
433         * bindings/js/JSInspectorCallbackWrapper.h:
434         * bindings/js/JSMessageChannelConstructor.cpp:
435         (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor):
436         * bindings/js/JSNamedNodesCollection.h:
437         (WebCore::JSNamedNodesCollection::createStructure):
438         * bindings/js/JSOptionConstructor.cpp:
439         (WebCore::JSOptionConstructor::JSOptionConstructor):
440         * bindings/js/JSQuarantinedObjectWrapper.cpp:
441         (WebCore::JSQuarantinedObjectWrapper::JSQuarantinedObjectWrapper):
442         * bindings/js/JSQuarantinedObjectWrapper.h:
443         (WebCore::JSQuarantinedObjectWrapper::createStructure):
444         * bindings/js/JSRGBColor.h:
445         (WebCore::JSRGBColor::createStructure):
446         * bindings/js/JSWorkerContext.cpp:
447         (WebCore::createJSWorkerContextStructure):
448         (WebCore::JSWorkerContext::JSWorkerContext):
449         (WebCore::JSWorkerContext::createPrototype):
450         * bindings/js/JSWorkerContext.h:
451         (WebCore::JSWorkerContext::createStructure):
452         (WebCore::JSWorkerContextPrototype::JSWorkerContextPrototype):
453         (WebCore::JSWorkerContextPrototype::createStructure):
454         * bindings/js/JSXMLHttpRequestConstructor.cpp:
455         (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
456         * bindings/js/JSXSLTProcessorConstructor.cpp:
457         (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
458         * bindings/scripts/CodeGeneratorJS.pm:
459         * bridge/objc/objc_runtime.h:
460         (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
461         * bridge/qt/qt_runtime.cpp:
462         (JSC::Bindings::QtConnectionObject::execute):
463         * bridge/qt/qt_runtime.h:
464         (JSC::Bindings::QtRuntimeMethod::createStructure):
465         * bridge/runtime_array.h:
466         (JSC::RuntimeArray::createStructure):
467         * bridge/runtime_method.h:
468         (JSC::RuntimeMethod::createStructure):
469         * bridge/runtime_object.cpp:
470         (JSC::RuntimeObjectImp::RuntimeObjectImp):
471         * bridge/runtime_object.h:
472         (JSC::RuntimeObjectImp::createStructure):
473
474 2008-11-15  Darin Adler  <darin@apple.com>
475
476         Reviewed by Dan Bernstein.
477
478         - fix just-introduced crash in the svg/custom/svg-fonts-in-html.html test
479
480         This gets rid of the crash. It restores the behavior of the CG case from before Dirk
481         Shulze removed the platorm-dependent code, but perhaps it should be changed further
482         in the future so that the default for no style is "no stroke". I think the patch is
483         fine for fill.
484
485         * svg/graphics/SVGPaintServerSolid.cpp:
486         (WebCore::SVGPaintServerSolid::setup): Added null checks for svgStyle.
487         (WebCore::SVGPaintServerSolid::renderPath): Added null checks for style and svgStyle.
488
489 2008-11-15  Kevin Ollivier  <kevino@theolliviers.com>
490
491         Reviewed by Timothy Hatcher.
492
493         Initialize m_networkStateChangedFunction to 0 as otherwise the check for null will fail.
494         
495         https://bugs.webkit.org/show_bug.cgi?id=22284
496
497         * platform/network/NetworkStateNotifier.h:
498         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
499
500 2008-11-15  Dirk Schulze  <krit@webkit.org>
501
502         Reviewed by Geoffrey Garen.
503
504         r38426 caused a wrong drawing of a LayoutTest. Use another
505         way to set the color to pass this test again.
506
507         * svg/graphics/SVGPaintServerSolid.cpp:
508         (WebCore::SVGPaintServerSolid::setup):
509
510 2008-11-15  Dirk Schulze  <krit@webkit.org>
511
512         Reviewed by Darin Adler.
513
514         Removed platform dependent code on SVGPaintServerSolid.
515
516         * GNUmakefile.am:
517         * WebCore.pro:
518         * WebCore.vcproj/WebCore.vcproj:
519         * WebCore.xcodeproj/project.pbxproj:
520         * svg/graphics/SVGPaintServerSolid.cpp:
521         (WebCore::SVGPaintServerSolid::setup):
522         (WebCore::SVGPaintServerSolid::renderPath):
523         * svg/graphics/SVGPaintServerSolid.h:
524         * svg/graphics/cairo/SVGPaintServerSolidCairo.cpp: Removed.
525         * svg/graphics/cg/SVGPaintServerSolidCg.cpp: Removed.
526         * svg/graphics/qt/SVGPaintServerSolidQt.cpp: Removed.
527
528 2008-11-15  Geoffrey Garen  <ggaren@apple.com>
529
530         Reviewed by Sam Weinig.
531         
532         Updated for JavaScriptCore renames.
533
534         * bindings/js/JSNodeCustom.cpp:
535         (WebCore::JSNode::mark):
536         * bindings/js/JSXMLHttpRequestCustom.cpp:
537         (WebCore::JSXMLHttpRequest::send):
538         * bindings/js/ScriptController.cpp:
539         (WebCore::ScriptController::evaluate):
540         * bindings/js/WorkerScriptController.cpp:
541         (WebCore::WorkerScriptController::evaluate):
542         * bindings/objc/WebScriptObject.mm:
543         (-[WebScriptObject evaluateWebScript:]):
544         * bridge/NP_jsobject.cpp:
545         (_NPN_Evaluate):
546         * bridge/jni/jni_jsobject.mm:
547         (JavaJSObject::eval):
548         * page/Console.cpp:
549         (WebCore::retrieveLastCaller):
550         (WebCore::Console::trace):
551
552 2008-11-14  Greg Bolsinga  <bolsinga@apple.com>
553
554         Reviewed by Darin Adler.
555
556         https://bugs.webkit.org/show_bug.cgi?id=21810
557         Remove use of static C++ objects that are destroyed at exit time (destructors)
558
559         Create DEFINE_STATIC_LOCAL macro. Change static local objects to leak to avoid 
560         exit-time destructor. Update code that was changed to fix this issue that ran 
561         into a gcc bug (<rdar://problem/6354696> Codegen issue with C++ static reference 
562         in gcc build 5465). Also typdefs for template types needed to be added in some 
563         cases so the type could make it through the macro successfully.
564
565         Basically code of the form:
566         static T m;
567         becomes:
568         DEFINE_STATIC_LOCAL(T, m, ());
569
570         Also any code of the form:
571         static T& m = *new T;
572         also becomes:
573         DEFINE_STATIC_LOCAL(T, m, ());
574
575         * ForwardingHeaders/wtf/StdLibExtras.h: Added.
576         * bindings/js/GCController.cpp:
577         (WebCore::gcController):
578         * bindings/js/JSDOMBinding.cpp:
579         (WebCore::wrapperSet):
580         * bindings/js/JSInspectedObjectWrapper.cpp:
581         (WebCore::wrappers):
582         * bindings/js/JSInspectorCallbackWrapper.cpp:
583         (WebCore::wrappers):
584         * bindings/js/JSNavigatorCustom.cpp:
585         (WebCore::needsYouTubeQuirk):
586         * bridge/runtime_root.cpp:
587         (JSC::Bindings::rootObjectSet):
588         * css/CSSMutableStyleDeclaration.cpp:
589         (WebCore::initShorthandMap):
590         (WebCore::CSSMutableStyleDeclaration::removeProperty):
591         * css/CSSPrimitiveValue.cpp:
592         (WebCore::CSSPrimitiveValue::cssText):
593         * css/CSSSelector.cpp:
594         (WebCore::CSSSelector::extractPseudoType):
595         * css/CSSStyleSelector.cpp:
596         (WebCore::screenEval):
597         (WebCore::printEval):
598         * dom/DOMImplementation.cpp:
599         (WebCore::addString):
600         (WebCore::isSVG10Feature):
601         (WebCore::isSVG11Feature):
602         (WebCore::DOMImplementation::isXMLMIMEType):
603         * dom/Document.cpp:
604         (WebCore::Document::hasPrefixNamespaceMismatch):
605         * dom/ScriptElement.cpp:
606         (WebCore::isSupportedJavaScriptLanguage):
607         * editing/ApplyStyleCommand.cpp:
608         (WebCore::styleSpanClassString):
609         * editing/HTMLInterchange.cpp:
610         (WebCore::):
611         * editing/IndentOutdentCommand.cpp:
612         (WebCore::indentBlockquoteString):
613         * editing/ReplaceSelectionCommand.cpp:
614         (WebCore::isInterchangeNewlineNode):
615         (WebCore::isInterchangeConvertedSpaceSpan):
616         * editing/htmlediting.cpp:
617         (WebCore::stringWithRebalancedWhitespace):
618         (WebCore::nonBreakingSpaceString):
619         * editing/markup.cpp:
620         (WebCore::appendAttributeValue):
621         (WebCore::appendEscapedContent):
622         (WebCore::shouldAddNamespaceAttr):
623         (WebCore::appendNamespace):
624         (WebCore::appendStartMarkup):
625         (WebCore::createMarkup):
626         * html/HTMLButtonElement.cpp:
627         (WebCore::HTMLButtonElement::type):
628         * html/HTMLElement.cpp:
629         (WebCore::HTMLElement::isRecognizedTagName):
630         (WebCore::inlineTagList):
631         (WebCore::blockTagList):
632         * html/HTMLFieldSetElement.cpp:
633         (WebCore::HTMLFieldSetElement::type):
634         * html/HTMLInputElement.cpp:
635         (WebCore::HTMLInputElement::type):
636         * html/HTMLKeygenElement.cpp:
637         (WebCore::HTMLKeygenElement::type):
638         * html/HTMLLegendElement.cpp:
639         (WebCore::HTMLLegendElement::type):
640         * html/HTMLOptGroupElement.cpp:
641         (WebCore::HTMLOptGroupElement::type):
642         * html/HTMLOptionElement.cpp:
643         (WebCore::HTMLOptionElement::type):
644         * html/HTMLParser.cpp:
645         (WebCore::HTMLParser::getNode):
646         (WebCore::HTMLParser::isHeaderTag):
647         (WebCore::HTMLParser::isResidualStyleTag):
648         (WebCore::HTMLParser::isAffectedByResidualStyle):
649         * html/HTMLSelectElement.cpp:
650         (WebCore::HTMLSelectElement::type):
651         * html/HTMLTextAreaElement.cpp:
652         (WebCore::HTMLTextAreaElement::type):
653         * inspector/InspectorController.cpp:
654         (WebCore::platform):
655         * inspector/JavaScriptDebugServer.cpp:
656         (WebCore::JavaScriptDebugServer::shared):
657         * inspector/JavaScriptProfile.cpp:
658         (WebCore::profileCache):
659         * inspector/JavaScriptProfileNode.cpp:
660         (WebCore::profileNodeCache):
661         * loader/FrameLoader.cpp:
662         (WebCore::localSchemes):
663         * loader/appcache/ApplicationCacheStorage.cpp:
664         (WebCore::cacheStorage):
665         * loader/archive/ArchiveFactory.cpp:
666         (WebCore::archiveMIMETypes):
667         (WebCore::ArchiveFactory::registerKnownArchiveMIMETypes):
668         * loader/icon/IconDatabase.cpp:
669         (WebCore::IconDatabase::defaultDatabaseFilename):
670         * page/EventHandler.cpp:
671         (WebCore::EventHandler::dragState):
672         * page/Frame.cpp:
673         (WebCore::createRegExpForLabels):
674         (WebCore::keepAliveSet):
675         * page/Page.cpp:
676         (WebCore::Page::groupName):
677         * page/SecurityOrigin.cpp:
678         (WebCore::isDefaultPortForProtocol):
679         (WebCore::SecurityOrigin::databaseIdentifier):
680         * page/mac/FrameMac.mm:
681         (WebCore::regExpForLabels):
682         * platform/KURL.cpp:
683         (WebCore::blankURL):
684         * platform/graphics/FontCache.cpp:
685         (WebCore::alternateFamilyName):
686         * platform/graphics/mac/FontCacheMac.mm:
687         (WebCore::FontCache::getSimilarFontPlatformData):
688         (WebCore::FontCache::getLastResortFallbackFont):
689         * platform/mac/CursorMac.mm:
690         (WebCore::leakNamedCursor):
691         (WebCore::pointerCursor):
692         (WebCore::crossCursor):
693         (WebCore::handCursor):
694         (WebCore::moveCursor):
695         (WebCore::verticalTextCursor):
696         (WebCore::cellCursor):
697         (WebCore::contextMenuCursor):
698         (WebCore::aliasCursor):
699         (WebCore::zoomInCursor):
700         (WebCore::zoomOutCursor):
701         (WebCore::copyCursor):
702         (WebCore::noneCursor):
703         (WebCore::progressCursor):
704         (WebCore::noDropCursor):
705         (WebCore::notAllowedCursor):
706         (WebCore::iBeamCursor):
707         (WebCore::waitCursor):
708         (WebCore::helpCursor):
709         (WebCore::eastResizeCursor):
710         (WebCore::northResizeCursor):
711         (WebCore::northEastResizeCursor):
712         (WebCore::northWestResizeCursor):
713         (WebCore::southResizeCursor):
714         (WebCore::southEastResizeCursor):
715         (WebCore::southWestResizeCursor):
716         (WebCore::westResizeCursor):
717         (WebCore::northSouthResizeCursor):
718         (WebCore::eastWestResizeCursor):
719         (WebCore::northEastSouthWestResizeCursor):
720         (WebCore::northWestSouthEastResizeCursor):
721         (WebCore::columnResizeCursor):
722         (WebCore::rowResizeCursor):
723         (WebCore::grabCursor):
724         (WebCore::grabbingCursor):
725         * platform/mac/ScrollbarThemeMac.mm:
726         (WebCore::ScrollbarTheme::nativeTheme):
727         * platform/mac/ThemeMac.mm:
728         (WebCore::platformTheme):
729         * platform/mac/ThreadCheck.mm:
730         (WebCoreReportThreadViolation):
731         * platform/network/NetworkStateNotifier.cpp:
732         (WebCore::networkStateNotifier):
733         * platform/network/mac/FormDataStreamMac.mm:
734         (WebCore::getStreamFormDataMap):
735         (WebCore::getStreamResourceHandleMap):
736         * platform/network/mac/ResourceResponseMac.mm:
737         (WebCore::ResourceResponse::platformLazyInit):
738         * platform/text/TextEncoding.cpp:
739         (WebCore::TextEncoding::isJapanese):
740         * plugins/PluginMainThreadScheduler.cpp:
741         (WebCore::PluginMainThreadScheduler::scheduler):
742         * rendering/RenderBlock.cpp:
743         (WebCore::continuationOutlineTable):
744         (WebCore::RenderBlock::addContinuationWithOutline):
745         (WebCore::RenderBlock::paintContinuationOutlines):
746         * rendering/RenderCounter.cpp:
747         (WebCore::counterMaps):
748         * rendering/RenderFlexibleBox.cpp:
749         (WebCore::RenderFlexibleBox::layoutVerticalBox):
750         * rendering/RenderListItem.cpp:
751         (WebCore::RenderListItem::markerText):
752         * rendering/RenderScrollbarTheme.cpp:
753         (WebCore::RenderScrollbarTheme::renderScrollbarTheme):
754         * rendering/RenderThemeMac.mm:
755         (WebCore::RenderThemeMac::systemFont):
756         * rendering/bidi.cpp:
757         (WebCore::RenderBlock::checkLinesForTextOverflow):
758         * rendering/style/RenderStyle.cpp:
759         (WebCore::RenderStyle::initialDashboardRegions):
760         (WebCore::RenderStyle::noneDashboardRegions):
761         * storage/Database.cpp:
762         (WebCore::guidMutex):
763         (WebCore::guidToVersionMap):
764         (WebCore::guidToDatabaseMap):
765         (WebCore::Database::databaseInfoTableName):
766         (WebCore::databaseVersionKey):
767         (WebCore::Database::getVersionFromDatabase):
768         (WebCore::Database::setVersionInDatabase):
769         (WebCore::guidForOriginAndName):
770         * storage/DatabaseTracker.cpp:
771         (WebCore::DatabaseTracker::tracker):
772         (WebCore::notificationMutex):
773         (WebCore::notificationQueue):
774         * storage/LocalStorage.cpp:
775         (WebCore::localStorageMap):
776         * svg/SVGAnimateMotionElement.cpp:
777         (WebCore::SVGAnimateMotionElement::rotateMode):
778         * svg/SVGAnimationElement.cpp:
779         (WebCore::SVGAnimationElement::calcMode):
780         (WebCore::SVGAnimationElement::attributeType):
781         (WebCore::SVGAnimationElement::isAdditive):
782         (WebCore::SVGAnimationElement::isAccumulated):
783         * svg/SVGLangSpace.cpp:
784         (WebCore::SVGLangSpace::xmlspace):
785         * svg/SVGSVGElement.cpp:
786         (WebCore::SVGSVGElement::contentScriptType):
787         (WebCore::SVGSVGElement::contentStyleType):
788         * svg/SVGStyleElement.cpp:
789         (WebCore::SVGStyleElement::type):
790         (WebCore::SVGStyleElement::media):
791         * svg/SVGTextContentElement.cpp:
792         (WebCore::SVGTextContentElement::parseMappedAttribute):
793         * svg/animation/SVGSMILElement.cpp:
794         (WebCore::SVGSMILElement::parseClockValue):
795         (WebCore::SVGSMILElement::restart):
796         (WebCore::SVGSMILElement::fill):
797         (WebCore::SVGSMILElement::repeatCount):
798         (WebCore::SVGSMILElement::notifyDependentsIntervalChanged):
799         * svg/graphics/SVGResource.cpp:
800         (WebCore::clientMap):
801         (WebCore::SVGResource::removeClient):
802         * svg/graphics/SVGResourceMarker.cpp:
803         (WebCore::SVGResourceMarker::draw):
804         * xml/XMLHttpRequest.cpp:
805         (WebCore::PreflightResultCacheItem::PreflightResultCacheItem):
806         (WebCore::preflightResultCache):
807         (WebCore::appendPreflightResultCacheEntry):
808         (WebCore::isSafeRequestHeader):
809         (WebCore::isOnAccessControlResponseHeaderWhitelist):
810         (WebCore::XMLHttpRequest::didReceiveResponsePreflight):
811         * xml/XPathExpressionNode.cpp:
812         (WebCore::XPath::Expression::evaluationContext):
813         * xml/XPathParser.cpp:
814         (WebCore::XPath::setUpAxisNamesMap):
815         (WebCore::XPath::isAxisName):
816         (WebCore::XPath::isNodeTypeName):
817         * xml/XPathValue.cpp:
818         (WebCore::XPath::Value::toNodeSet):
819
820 2008-11-14  Dan Bernstein  <mitz@apple.com>
821
822         - attempt to fix the Qt build
823
824         * platform/qt/Localizations.cpp:
825         (WebCore::contextMenuItemTagTextDirectionMenu): Added. Maybe this string
826         needs to go somewhere else in addition to here.
827
828 2008-11-14  Kevin Ollivier  <kevino@theolliviers.com>
829
830         wx build fix.
831
832         * platform/wx/LocalizedStringsWx.cpp:
833         (WebCore::contextMenuItemTagTextDirectionMenu):
834
835 2008-11-14  Dan Bernstein  <mitz@apple.com>
836
837         Reviewed by Darin Adler.
838
839         - <rdar://problem/6234307> Support action methods for setting and clearing character-level directionality
840         - WebCore part of <rdar://problem/6234337> Add a Text Direction menu to the default context menu when appropriate
841
842         * WebCore.base.exp: Exported
843         WebCore::Settings::setTextDirectionSubmenuInclusionBehavior().
844
845         * editing/ApplyStyleCommand.cpp:
846         (StyleChange::init): Changed to always include the direction property
847         in the result if the unicode-bidi property is included.
848         (ApplyStyleCommand::splitAncestorsWithUnicodeBidi): Added. Finds the
849         highest ancestor of the given node that establishes bidi embedding. If
850         that embedding agrees with the given allowed direction, finds the
851         second-highest embedding ancestor. Splits all nodes through that
852         ancestor. If the highest embedding ancestor did not need to be split,
853         it is returned.
854         (ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock): Added. Removes
855         bidi embedding attributes and styles from all ancestors of the given
856         node up to its enclosing block or the given node.
857         (ApplyStyleCommand::applyInlineStyle): Added code to handle the
858         unicode-bidi property. Applying style the includes this property
859         involves removing all bidi embedding in effect, except  for one-level
860         embedding that agrees with the desired embedding, then applying the
861         desired embedding where it is not already in effect.
862         (ApplyStyleCommand::applyInlineStyleToRange): Factored out from
863         applyInlineStyle().
864         (ApplyStyleCommand::removeHTMLBidiEmbeddingStyle): Added. Removed the
865         "dir" attribute if necessary and the element if it becomes an unstyled
866         style span.
867         (ApplyStyleCommand::removeCSSStyle): Changed to remove the direction
868         property when removing the unicode-bidi property.
869         (ApplyStyleCommand::removeInlineStyle): Added a call to
870         removeHTMLBidiEmbeddingStyle().
871
872         * editing/ApplyStyleCommand.h:
873         * editing/Editor.cpp:
874         (Editor::textDirectionForSelection): Added. Returns the character-level
875         writing direction of the selection if it is uniform and simple (at most
876         one level of embedding).
877         (Editor::hasBidiSelection): Added. Returns true if the selection lies
878         entirely within a single block, and that block has direction:rtl or
879         contains any inline boxes with non-zero bidi embedding level.
880
881         * editing/Editor.h:
882         * editing/EditorCommand.cpp:
883         (stateTextWritingDirection): Added this helper function for deciding
884         the state of Text Direction submenu items.
885         (executeMakeTextWritingDirectionLeftToRight): Added. Applies
886         "unicode-bidi: embed; direction: ltr;".
887         (executeMakeTextWritingDirectionNatural): Added. Applies
888         "unicode-bidi: normal;"
889         (executeMakeTextWritingDirectionRightToLeft): Added. Applies
890         "unicode-bidi: embed; direction: rtl;".
891         (stateTextWritingDirectionLeftToRight): Added.
892         (stateTextWritingDirectionNatural): Added.
893         (stateTextWritingDirectionRightToLeft): Added.
894         (createCommandMap): Added "MakeTextWritingDirectionLeftToRight",
895         "MakeTextWritingDirectionNatural",
896         and "MakeTextWritingDirectionRightToLeft".
897
898         * editing/InsertTextCommand.cpp:
899         (InsertTextCommand::input): Added code to maintain the unicode-bidi
900         and direction properties in the typing style. Even if they have the
901         same values as the computed style at the caret, they need to be included
902         in the typing style so that inserted text will not inherit any nested
903         embedding.
904
905         * page/ContextMenuController.cpp:
906         (ContextMenuController::contextMenuItemSelected): Added calls to
907         the editor for the text direction menu items.
908
909         * page/Frame.cpp
910         (Frame::computeAndSetTypingStyle): Added code to maintain the
911         unicode-bidi and direction properties in the typing style.
912
913         * page/Settings.cpp:
914         (Settings::setTextDirectionSubmenuInclusionBehavior): Added this setter.
915
916         * page/Settings.h: Added a TextDirectionSubmenuInclusionBehavior enum,
917         an m_textDirectionSubmenuInclusionBehavior member, and accessors.
918
919         * page/mac/WebCoreViewFactory.h:
920         * platform/ContextMenu.cpp:
921         (WebCore::createAndAppendTextDirectionSubMenu): Added.
922         (ContextMenu::populate): Added the Text Direction submenu item based on
923         the inclusion behavior and the existence of a bidi selection.
924         (ContextMenu::checkOrEnableIfNeeded): Added code for the text direction
925         menu items.
926
927         * platform/ContextMenuItem.h:
928         * platform/LocalizedStrings.h: Declared
929         contextMenuItemTagTextDirectionMenu().
930
931         * platform/mac/LocalizedStringsMac.mm: Defined
932         contextMenuItemTagTextDirectionMenu().
933
934         * rendering/RenderBlock.cpp:
935         (RenderBlock::containsNonZeroBidiLevel): Added.
936         * rendering/RenderBlock.h:
937
938 2008-11-14  Greg Bolsinga  <bolsinga@apple.com>
939
940         Reviewed by Darin Adler.
941
942         https://bugs.webkit.org/show_bug.cgi?id=22264
943         Need to update to latest Geolocation spec (13 November 2008)
944         
945         Update to new error code constants and values.
946
947         * page/Geolocation.cpp: Use new named ErrorCode enums
948         (WebCore::Geolocation::GeoNotifier::timerFired):
949         (WebCore::Geolocation::getCurrentPosition):
950         (WebCore::Geolocation::watchPosition):
951         * page/PositionError.h: Have ErrorCode enum names match new error constant names and values
952         (WebCore::PositionError::):
953         * page/PositionError.idl: Add new named error constants
954
955 2008-11-14  Beth Dakin  <bdakin@apple.com>
956
957         Reviewed by Justin Garcia.
958
959         Fix (again) for <rdar://problem/5089327> Too much indentation when 
960         pasting quoted paragraphs
961
962         This patch goes back to Justin's original approach to fix this bug, 
963         written in revision 38273. That fix was mostly rolled out by 
964         revision 38310 because of styling issues created by the addition of 
965         extra blockquote nodes. This patch again goes back to Justin's 
966         original fix because of cases we discovered the newer fix could not 
967         possibly cover. This version of the patch minimizes the styling 
968         issues of extra blockquotes by opting into the merge start code. 
969
970         * editing/ReplaceSelectionCommand.cpp:
971         (WebCore::hasMatchingQuoteLevel): We want shouldMergeStart to 
972         return true when the quoting level of the end of the inserted 
973         content matches the quoting level of the end of the existing 
974         content.
975         (WebCore::ReplaceSelectionCommand::shouldMergeStart): Now calls 
976         hasMatchingQuoteLevel
977         (WebCore::ReplaceSelectionCommand::doApply):
978
979 2008-11-14  Dirk Schulze  <vbs85@gmx.de>
980
981         Reviewed by Eric Seidel.
982
983         Made SVGResourceClipper platform independent.
984         https://bugs.webkit.org/show_bug.cgi?id=21444
985
986         * GNUmakefile.am:
987         * WebCore.pro:
988         * WebCore.vcproj/WebCore.vcproj:
989         * WebCore.xcodeproj/project.pbxproj:
990         * platform/graphics/GraphicsContext.h:
991         * platform/graphics/cairo/GraphicsContextCairo.cpp:
992         (WebCore::GraphicsContext::clipPath):
993         * platform/graphics/cg/GraphicsContextCG.cpp:
994         (WebCore::GraphicsContext::clipPath):
995         * platform/graphics/qt/GraphicsContextQt.cpp:
996         (WebCore::GraphicsContext::addPath):
997         (WebCore::GraphicsContext::clipPath):
998         * svg/graphics/SVGResourceClipper.cpp:
999         (WebCore::SVGResourceClipper::applyClip):
1000         * svg/graphics/cairo/SVGResourceClipperCairo.cpp: Removed.
1001         * svg/graphics/cg/SVGResourceClipperCg.cpp: Removed.
1002         * svg/graphics/qt/SVGResourceClipperQt.cpp: Removed.
1003
1004 2008-11-14  Antti Koivisto  <antti@apple.com>
1005
1006         Reviewed by Anders Carlsson.
1007
1008         Combine loadFrameRequestWithFormState to loadFrameRequestWithFormAndValues.
1009
1010         * loader/FrameLoader.cpp:
1011         (WebCore::FrameLoader::loadFrameRequestWithFormAndValues):
1012         * loader/FrameLoader.h:
1013
1014 2008-11-14  Sam Weinig  <sam@webkit.org>
1015
1016         Reviewed by Eric Seidel.
1017
1018         Remove unneeded forward declaration.
1019
1020         * plugins/Plugin.h:
1021
1022 2008-11-14  Darin Fisher  <darin@chromium.org>
1023
1024         Reviewed by Darin Adler.
1025
1026         https://bugs.webkit.org/show_bug.cgi?id=22251
1027         HTMLCanvasElement.cpp unnecessarily includes runtime/Interpreter.h
1028
1029         * html/HTMLCanvasElement.cpp:
1030
1031 2008-11-14  Yael Aharon  <yael.aharon@nokia.com>
1032
1033         Reviewed by Simon Hausmann.
1034
1035         Add new files from the Qt port to the build.
1036
1037         * WebCore.pro:
1038
1039 2008-11-14  Yael Aharon  <yael.aharon@nokia.com>
1040
1041         Reviewed by Simon Hausmann.
1042
1043         Made DatabaseTracker::hasEntryForOrigin() public. This allows the Qt
1044         port to apply a default quota only if there is no entry in the
1045         database for a given origin yet.
1046
1047         * storage/DatabaseTracker.h:
1048
1049 2008-11-14  Yael Aharon  <yael.aharon@nokia.com>
1050
1051         Reviewed by Simon Hausmann.
1052
1053         Make it possible to get the cache directory set in the application
1054         cache storage.
1055
1056         * loader/appcache/ApplicationCacheStorage.cpp:
1057         (WebCore::ApplicationCacheStorage::cacheDirectory): Added.
1058         * loader/appcache/ApplicationCacheStorage.h:
1059
1060 2008-11-14  Justin Garcia  <justin.garcia@apple.com>
1061
1062         Reviewed by Beth Dakin.
1063
1064         <rdar://problem/4230923> "Make Plain Text" doesn't reset text alignment in single paragraph messages
1065         
1066         When applying block styles, we would add block properties to the body element, and Mail's
1067         Make Plain Text feature isn't equipped to remove those.  This could have been fixed on our side,
1068         but this change has the advantage that it fixes the bug on Tiger, where Mail does not plan future updates.
1069         
1070         We have code that puts the paragraphs that we're operating on into blocks of their own before
1071         adding or removing block properties from the blocks that enclose them.  We need to run this code 
1072         when the enclosing block is the body element.
1073         
1074         * editing/CompositeEditCommand.cpp:
1075         (WebCore::CompositeEditCommand::insertNewDefaultParagraphElementAt): Added, moved code from moveParagraphContents
1076         to here.
1077         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Renamed some variables for clarity.
1078         Added a few comments.  Fixed bug by not bailing out when the block about to be used is the body element.
1079         * editing/CompositeEditCommand.h:
1080
1081 2008-11-14  Cameron Zwarich  <zwarich@apple.com>
1082
1083         Reviewed by Darin Adler.
1084
1085         Bug 22245: Move wtf/dtoa.h into the WTF namespace
1086         <https://bugs.webkit.org/show_bug.cgi?id=22245>
1087
1088         Move wtf/dtoa.h into the WTF namespace from the JSC namespace.
1089
1090         * platform/text/String.cpp:
1091         (WebCore::charactersToDouble):
1092
1093 2008-11-14  Tor Arne Vestbø  <tavestbo@trolltech.com>
1094
1095         Rubber-stamped by Simon Hausmann.
1096
1097         Make sure Qt scrollbars follow the style with regard to context menus
1098
1099         * platform/qt/ScrollbarQt.cpp:
1100         (WebCore::Scrollbar::contextMenu):
1101
1102 2008-11-14  Tor Arne Vestbø  <tavestbo@trolltech.com>
1103
1104         Rubber-stamped by Simon Hausmann.
1105
1106         Make scrollbar look active when the window is active on Qt/Mac
1107
1108         * platform/qt/ScrollbarThemeQt.cpp:
1109         (WebCore::styleOptionSlider):
1110         (WebCore::ScrollbarThemeQt::paint):
1111
1112 2008-11-13  Eric Seidel  <eric@webkit.org>
1113
1114         Reviewed by Adam Roben.
1115
1116         Add a basic Scons-based build system for building
1117         Chromium-Mac WebCore.
1118         https://bugs.webkit.org/show_bug.cgi?id=21991
1119
1120         The build currently fails due to missing files from our
1121         platform directory (platform skia and platform chromium)
1122         I will be sending those up shortly in separate patches.
1123         I expect it will be a while before our WebCore build links.
1124
1125         * SConstruct: Added.
1126         * WebCore.scons: Added.
1127
1128 2008-11-13  Darin Fisher  <darin@chromium.org>
1129
1130         Reviewed by Darin Adler.
1131
1132         https://bugs.webkit.org/show_bug.cgi?id=22248
1133         AtomicString.cpp uses JSC types outside of #if USE(JSC)
1134
1135         * platform/text/AtomicString.cpp:
1136         (WebCore::AtomicString::add):
1137         
1138 2008-11-13  Justin Garcia  <justin.garcia@apple.com>
1139
1140         Reviewed by Darin Adler.
1141         
1142         https://bugs.webkit.org/show_bug.cgi?id=18620
1143         Long hang under TextIterator::advance() when loading http://www.lsvd.de/
1144
1145         A huge section at the beginning of this document is invisible.  As we iterate through it,
1146         we create VisiblePositions unnecessarily.
1147
1148         * editing/TextIterator.cpp:
1149         (WebCore::TextIterator::shouldRepresentNodeOffsetZero): Don't proceed to VisiblePosition 
1150         creation if m_node is unrendered or invisible.  The answers wouldn't have much meaning 
1151         and would be wasteful.  Also fixed some comments to reflect the fact that this function
1152         isn't specifically about emitting a newline.
1153
1154 2008-11-13  Pierre-Olivier Latour  <pol@apple.com>
1155
1156         Reviewed by Sam Weinig.
1157
1158         Remove unused or unnecessary code from AnimationBase class.
1159
1160         * page/animation/AnimationBase.cpp:
1161         (WebCore::AnimationBase::AnimationBase):
1162         (WebCore::AnimationBase::playStatePlaying):
1163         * page/animation/AnimationBase.h:
1164
1165 2008-11-12  Tor Arne Vestbø  <tavestbo@trolltech.com>
1166
1167         Reviewed by Simon Hausmann.
1168
1169         Inital implementation of PluginPackage and PluginView for Mac NPAPI support in WebCore
1170
1171         Currently only used by QtWebKit. See also:
1172
1173         https://bugs.webkit.org/show_bug.cgi?id=21427
1174
1175         * WebCore.pro:
1176         * platform/qt/TemporaryLinkStubs.cpp:
1177         (PluginView::userAgentStatic):
1178         (PluginView::getValueStatic):
1179         * plugins/PluginView.cpp:
1180         (WebCore::PluginView::handleEvent):
1181         (WebCore::PluginView::setValue):
1182         (WebCore::PluginView::PluginView):
1183         * plugins/PluginView.h:
1184         (WebCore::PluginView::setPlatformPluginWidget):
1185         * plugins/mac/PluginPackageMac.cpp: Added.
1186         (WebCore::PluginPackage::determineQuirks):
1187         (WebCore::readPListFile):
1188         (WebCore::stringListFromResourceId):
1189         (WebCore::PluginPackage::fetchInfo):
1190         (WebCore::PluginPackage::load):
1191         (WebCore::PluginPackage::hash):
1192         (WebCore::PluginPackage::equal):
1193         (WebCore::PluginPackage::compareFileVersion):
1194         * plugins/mac/PluginViewMac.cpp: Added.
1195         (WebCore::nativeWindowFor):
1196         (WebCore::cgHandleFor):
1197         (WebCore::topLevelOffsetFor):
1198         (WebCore::PluginView::init):
1199         (WebCore::PluginView::~PluginView):
1200         (WebCore::PluginView::stop):
1201         (WebCore::PluginView::getValueStatic):
1202         (WebCore::PluginView::getValue):
1203         (WebCore::PluginView::setParent):
1204         (WebCore::PluginView::show):
1205         (WebCore::PluginView::hide):
1206         (WebCore::PluginView::setFocus):
1207         (WebCore::PluginView::setParentVisible):
1208         (WebCore::PluginView::setNPWindowRect):
1209         (WebCore::PluginView::setNPWindowIfNeeded):
1210         (WebCore::PluginView::updatePluginWidget):
1211         (WebCore::PluginView::paint):
1212         (WebCore::PluginView::invalidateRect):
1213         (WebCore::PluginView::invalidateRegion):
1214         (WebCore::PluginView::forceRedraw):
1215         (WebCore::PluginView::handleMouseEvent):
1216         (WebCore::PluginView::handleKeyboardEvent):
1217         (WebCore::PluginView::nullEventTimerFired):
1218         (WebCore::modifiersForEvent):
1219         (WebCore::PluginView::globalMousePosForPlugin):
1220         (WebCore::PluginView::dispatchNPEvent):
1221         (WebCore::PluginView::userAgent):
1222         (WebCore::PluginView::userAgentStatic):
1223         (WebCore::PluginView::handlePostReadFile):
1224
1225 2008-11-12  Alexey Proskuryakov  <ap@webkit.org>
1226
1227         Reviewed by Darin Adler.
1228
1229         https://bugs.webkit.org/show_bug.cgi?id=22200
1230         Crash when close event is dispatched to MessagePort due to document destruction
1231
1232         Test: fast/events/message-port-onclose.html
1233
1234         * dom/MessagePort.cpp: (WebCore::MessagePort::contextDestroyed):
1235         Don't dispatch close event, even though HTML5 currently says that we should. It is not
1236         right for GC to have observable effects.
1237
1238 2008-11-12  Alexey Proskuryakov  <ap@webkit.org>
1239
1240         Reviewed by Darin Adler.
1241
1242         https://bugs.webkit.org/show_bug.cgi?id=22203
1243         Implement Worker messaging
1244
1245         No test cases included, because this functionality is disabled by default.
1246
1247         The implementation is known to still have many race condition, but works quite well for
1248         testing.
1249
1250         * WebCore.xcodeproj/project.pbxproj: Added WorkerTask.{h,cpp}.
1251
1252         * bindings/js/JSDOMBinding.cpp:
1253         (WebCore::markActiveObjectsForContext): Re-worded comments a little.
1254         (WebCore::markCrossHeapDependentObjectsForContext): Existing cross-heap GC protocol was
1255         incorrect, changed it to a much simpler (but still incorrect) version.
1256
1257         * dom/WorkerTask.cpp: Added.
1258         (WebCore::WorkerTask::~WorkerTask):
1259         * dom/WorkerTask.h: Added.
1260         Tasks posted to workers implement this new interface.
1261
1262         * bindings/js/JSDedicatedWorkerCustom.cpp:
1263         (WebCore::JSDedicatedWorker::mark):
1264         (WebCore::JSDedicatedWorker::connect):
1265         * dom/DedicatedWorker.h:
1266         * dom/DedicatedWorker.idl:
1267         Auto-generate event listener attributes. Renamed startConversation() to connect(), tracking
1268         WHATWG discussions.
1269
1270         * dom/DedicatedWorker.cpp:
1271         (WebCore::WorkerConnectTask::WorkerConnectTask): A task that performs worker-side connect()
1272         operations.
1273         (WebCore::DedicatedWorker::DedicatedWorker): Initialize WorkerThread pointer.
1274         (WebCore::DedicatedWorker::connect): Connect() creates a pair of entangled ports, and posts
1275         one to worker. Since message port registration in ScriptExecutionContext is not thread safe,
1276         this port starts with a null context pointer.
1277         (WebCore::DedicatedWorker::notifyFinished): Since Worker methods should work immediately
1278         after creation, we have to queue tasks until after a WorkerThread object is created. Then we
1279         forward all queued tasks to its queue.
1280
1281         * dom/EventTarget.cpp: (WebCore::EventTarget::toWorkerContext):
1282         * dom/EventTarget.h:
1283         * bindings/js/JSEventTarget.cpp: (WebCore::toJS):
1284         Added cases for WorkerContext, which is now an EventTarget, too.
1285
1286         * bindings/js/JSWorkerContext.h: Added JSWorkerContext::put() to make onconnect settable.
1287         * bindings/js/JSWorkerContext.cpp:
1288         (WebCore::JSWorkerContext::mark): Mark event listeners.
1289         (WebCore::JSWorkerContext::createPrototype): Fixed a typo, use the right StructureID.
1290         (WebCore::JSWorkerContext::put): Implemented.
1291         (WebCore::jsWorkerContextPrototypeFunctionAddEventListener): Added an EventTarget implementation.
1292         (WebCore::jsWorkerContextPrototypeFunctionRemoveEventListener): Ditto.
1293         (WebCore::jsWorkerContextPrototypeFunctionDispatchEvent): Ditto.
1294         (WebCore::jsWorkerContextOnconnect): Added.
1295         (WebCore::setJSWorkerContextOnconnect): Added.
1296
1297         * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::evaluate):
1298         Made it actually work by adding necessary setup.
1299
1300         * bindings/js/WorkerScriptController.h: (WebCore::WorkerScriptController::initScriptIfNeeded):
1301         Check the right variable - it is the wrapper that may not be initialized yet.
1302
1303         * dom/ActiveDOMObject.cpp:
1304         (WebCore::ActiveDOMObject::ActiveDOMObject):
1305         (WebCore::ActiveDOMObject::~ActiveDOMObject):
1306         Assert being called from the correct thread, as active DOM object tracking is not thread safe.
1307
1308         * dom/ScriptExecutionContext.h: Added a Task interface and a postTask() method, to be used
1309         for asynchronously executing tasks in context's thread.
1310
1311         * dom/ScriptExecutionContext.cpp:
1312         (WebCore::ProcessMessagesSoonTask): Changed from a Timer to a Task
1313         (WebCore::ScriptExecutionContext::ScriptExecutionContext): Removed m_firedMessagePortTimer.
1314         It was an optimization that couldn't be easily preserved without introducing race conditions
1315         in multithreading case.
1316         (WebCore::ScriptExecutionContext::processMessagePortMessagesSoon): Use postTask().
1317         (WebCore::ScriptExecutionContext::dispatchMessagePortEvents): Added a comment explaining
1318         why it's OK to not ref() ports in a frozen copy.
1319         (WebCore::ScriptExecutionContext::createdMessagePort): Assert that we're not being called
1320         from a wrong thread.
1321         (WebCore::ScriptExecutionContext::destroyedMessagePort): Ditto.
1322         (WebCore::ScriptExecutionContextTaskTimer): Part of
1323         ScriptExecutionContext::Task implementation - use Timer if posting from main thread to main
1324         thread.
1325         (WebCore::ScriptExecutionContextTaskWorkerTask): Another part - use WorkerTask if posting
1326         to a worker.
1327         (WebCore::PerformTaskContext::PerformTaskContext): Finally, use callOnMainThread() if posting
1328         to main thread from a secondary one.
1329         (WebCore::performTask): A helper function for callOnMainThread().
1330         (WebCore::ScriptExecutionContext::postTask): Use one of the above implementations.
1331
1332         * dom/MessagePort.h: Fixed message queue to keep EventData pointers - otherwise, we would
1333         ref/deref EventData::message from different threads, which is not allowed.
1334
1335         * dom/MessagePort.cpp:
1336         (WebCore::MessagePortCloseEventTask): Use a task instead of a timer to work across threads.
1337         (WebCore::MessagePort::EventData::create): Updated for EventData being refcountable now.
1338         (WebCore::MessagePort::EventData::EventData): Ditto.
1339         (WebCore::MessagePort::MessagePort): ScriptExecutionContext is now allowed to be null at
1340         first, because we need to create ports for posting to other threads, and it is not possible
1341         to register in a context from another thread.
1342         (WebCore::MessagePort::clone): Always create ports with null contexts - it is now message
1343         receiver's job to set the context.
1344         (WebCore::MessagePort::postMessage): Enable posting to ports that are not attached to any
1345         context yet.
1346         (WebCore::MessagePort::startConversation): Ditto. Data port is always posted unattached.
1347         (WebCore::MessagePort::contextDestroyed): Assert that we had a context.
1348         (WebCore::MessagePort::attachToContext): Called when receiving a data port to register in
1349         context.
1350         (WebCore::MessagePort::scriptExecutionContext): Moved from header, as the function is virtual.
1351         (WebCore::MessagePort::dispatchMessages): Attach data port to receiving context. Use postTask().
1352         (WebCore::MessagePort::queueCloseEvent): Use postTask().
1353         (WebCore::MessagePort::hasPendingActivity): Reworded comment a little. As mentioned above,
1354         MessagePort cross-heap GC is still quite wrong.
1355
1356         * dom/WorkerContext.h: Made WorkerContext an event target, added onconnect attribute.
1357         * dom/WorkerContext.cpp: Keep a pointer to WorkerThread. It is only used for debug assertions
1358         now, but there is no harm in tracking it in release builds, too.
1359
1360         * dom/WorkerThread.cpp:
1361         (WebCore::WorkerThread::create): WorkerThread is refcountable, construct with create().
1362         (WebCore::WorkerThread::workerThread): Implemented a message loop.
1363         * dom/WorkerThread.h:
1364         (WebCore::WorkerThread::threadID): Also only used for assertions.
1365         (WebCore::WorkerThread::messageQueue): Return a reference to queue, so clients can post to it.
1366
1367         * page/DOMWindow.cpp:
1368         (WebCore::DOMWindow::postMessage): MessagePort::clone() no longer takes a context, as it
1369         always sets it to null.
1370         (WebCore::DOMWindow::postMessageTimerFired): Attach data port to receiving context.
1371
1372 2008-11-12  Dirk Schulze  <vbs85@gmx.de>
1373
1374         Reviewed Darin Adler.
1375
1376         use strokeColor.alpha() instead of fillColor.alpha()
1377         on GraphicsContext::strokePath()
1378
1379         [Canvas] Transparent fillStyle stops line rendering
1380         https://bugs.webkit.org/show_bug.cgi?id=21888
1381
1382         Test: fast/canvas/canvas-stroke-empty-fill.html
1383
1384         * ChangeLog:
1385         * platform/graphics/cg/GraphicsContextCG.cpp:
1386         (WebCore::GraphicsContext::strokePath):
1387
1388 2008-11-12  Stephanie  <slewis@apple.com>
1389
1390         Reviewed by Mark Rowe.
1391
1392         Fix context leak in XSLStyleSheets.
1393         See bug https://bugs.webkit.org/show_bug.cgi?id=15715
1394
1395         * xml/XSLStyleSheet.cpp:
1396         (WebCore::XSLStyleSheet::parseString):
1397
1398 2008-11-12  Alp Toker  <alp@nuanti.com>
1399
1400         autotools: List web worker-related headers needed for a successful
1401         build. distcheck is passing again with this change.
1402
1403         * GNUmakefile.am:
1404
1405 2008-11-12  Alp Toker  <alp@nuanti.com>
1406
1407         autotools build system fix-up only. Add FloatQuad.h to the source
1408         lists and sort them.
1409
1410         * GNUmakefile.am:
1411
1412 2008-11-12  Alp Toker  <alp@nuanti.com>
1413
1414         Build fixes for r38346. FloatQuad.cpp is missing:
1415
1416         1) #include "config.h"
1417         2) #include <algorithm> for various mathematical definitions it uses.
1418
1419         * platform/graphics/FloatQuad.cpp:
1420
1421 2008-11-12  Simon Fraser  <simon.fraser@apple.com>
1422
1423         Reviewed by Dan Bernstein
1424
1425         https://bugs.webkit.org/show_bug.cgi?id=22212
1426
1427         Rename absoluteOutlineBox() to absoluteOutlineBounds(), to indicate that
1428         it may be the bounding outline box of a transformed element, and fix it
1429         to respect transforms by mapping the outline box to an absolute quad and
1430         taking the enclosing rect.
1431         
1432         RenderBox::localToAbsoluteQuad() can no longer assert that there is no
1433         LayoutState, but LayoutState cannot be used during quad mapping (it knows
1434         nothing about transforms).
1435         
1436         Finally, fix a bug in RenderBox::localToAbsoluteQuad() which was getting
1437         borderTopExtra() from the object, rather than its container (as localToAbsolute()
1438         does).
1439         
1440         Test: fast/repaint/transform-absolute-child.html
1441
1442         * rendering/RenderBlock.cpp:
1443         (WebCore::RenderBlock::layoutBlock):
1444         * rendering/RenderBox.cpp:
1445         (WebCore::RenderBox::localToAbsoluteQuad):
1446         * rendering/RenderFlexibleBox.cpp:
1447         (WebCore::RenderFlexibleBox::layoutBlock):
1448         * rendering/RenderForeignObject.cpp:
1449         (WebCore::RenderForeignObject::layout):
1450         * rendering/RenderLayer.cpp:
1451         (WebCore::RenderLayer::updateLayerPositions):
1452         (WebCore::RenderLayer::setHasVisibleContent):
1453         * rendering/RenderObject.cpp:
1454         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
1455         (WebCore::RenderObject::absoluteOutlineBounds):
1456         * rendering/RenderObject.h:
1457         * rendering/RenderPath.cpp:
1458         (WebCore::RenderPath::layout):
1459         * rendering/RenderReplaced.cpp:
1460         (WebCore::RenderReplaced::layout):
1461         * rendering/RenderSVGContainer.cpp:
1462         (WebCore::RenderSVGContainer::layout):
1463         * rendering/RenderSVGImage.cpp:
1464         (WebCore::RenderSVGImage::layout):
1465         * rendering/RenderSVGRoot.cpp:
1466         (WebCore::RenderSVGRoot::layout):
1467         * rendering/RenderSVGText.cpp:
1468         (WebCore::RenderSVGText::layout):
1469         * rendering/RenderSVGViewportContainer.cpp:
1470         (WebCore::RenderSVGViewportContainer::layout):
1471         * rendering/RenderTable.cpp:
1472         (WebCore::RenderTable::layout):
1473
1474 2008-11-12  Simon Fraser  <simon.fraser@apple.com>
1475
1476         Reviewed by Dave Hyatt
1477
1478         https://bugs.webkit.org/show_bug.cgi?id=21942
1479         https://bugs.webkit.org/show_bug.cgi?id=18557
1480         
1481         Add methods which can be used to map renderer-local rectangles
1482         to quads in absolute coordinates, taking transforms into account:
1483             localToAbsoluteQuad() converts a local rect into an absolute quad.
1484             collectAbsoluteLineBoxQuads() is an analogue of addLineBoxRects()
1485                 that works with quads.
1486             absoluteQuads() is an analogue of absoluteRects(), for quads.
1487         
1488         Use the quad methods to fix the inspector highlight for transformed
1489         elements.
1490
1491         * GNUmakefile.am:
1492         * WebCore.pro:
1493         * WebCore.vcproj/WebCore.vcproj:
1494         * WebCore.xcodeproj/project.pbxproj:
1495         * WebCoreSources.bkl:
1496         * inspector/InspectorController.cpp:
1497         (WebCore::drawOutlinedQuad):
1498         (WebCore::drawHighlightForBoxes):
1499         (WebCore::frameToMainFrameOffset):
1500         (WebCore::InspectorController::drawNodeHighlight):
1501         * platform/graphics/AffineTransform.cpp:
1502         (WebCore::AffineTransform::mapQuad):
1503         * platform/graphics/AffineTransform.h:
1504         * platform/graphics/FloatQuad.cpp: Added.
1505         (WebCore::min4):
1506         (WebCore::max4):
1507         (WebCore::FloatQuad::boundingBox):
1508         * platform/graphics/FloatQuad.h: Added.
1509         (WebCore::FloatQuad::FloatQuad):
1510         (WebCore::FloatQuad::p1):
1511         (WebCore::FloatQuad::p2):
1512         (WebCore::FloatQuad::p3):
1513         (WebCore::FloatQuad::p4):
1514         (WebCore::FloatQuad::setP1):
1515         (WebCore::FloatQuad::setP2):
1516         (WebCore::FloatQuad::setP3):
1517         (WebCore::FloatQuad::setP4):
1518         (WebCore::FloatQuad::isEmpty):
1519         (WebCore::FloatQuad::enclosingBoundingBox):
1520         (WebCore::FloatQuad::move):
1521         (WebCore::operator+=):
1522         (WebCore::operator-=):
1523         (WebCore::operator==):
1524         (WebCore::operator!=):
1525         * rendering/RenderBox.cpp:
1526         (WebCore::RenderBox::localToAbsoluteQuad):
1527         * rendering/RenderBox.h:
1528         * rendering/RenderContainer.cpp:
1529         (WebCore::RenderContainer::collectAbsoluteLineBoxQuads):
1530         * rendering/RenderContainer.h:
1531         * rendering/RenderInline.cpp:
1532         (WebCore::RenderInline::absoluteQuads):
1533         * rendering/RenderInline.h:
1534         * rendering/RenderObject.cpp:
1535         (WebCore::RenderObject::absoluteBoundingBoxRect):
1536         (WebCore::RenderObject::collectAbsoluteLineBoxQuads):
1537         (WebCore::RenderObject::absoluteQuads):
1538         (WebCore::RenderObject::localToAbsoluteQuad):
1539         (WebCore::RenderObject::absoluteContentQuad):
1540         * rendering/RenderObject.h:
1541         * rendering/RenderPath.cpp:
1542         (WebCore::RenderPath::absoluteQuads):
1543         * rendering/RenderPath.h:
1544         * rendering/RenderSVGContainer.cpp:
1545         (WebCore::RenderSVGContainer::absoluteQuads):
1546         * rendering/RenderSVGContainer.h:
1547         * rendering/RenderSVGHiddenContainer.cpp:
1548         (WebCore::RenderSVGHiddenContainer::absoluteQuads):
1549         * rendering/RenderSVGHiddenContainer.h:
1550         * rendering/RenderSVGImage.cpp:
1551         (WebCore::RenderSVGImage::calculateAbsoluteBounds):
1552         (WebCore::RenderSVGImage::absoluteQuads):
1553         * rendering/RenderSVGImage.h:
1554         * rendering/RenderSVGInlineText.cpp:
1555         (WebCore::RenderSVGInlineText::absoluteQuads):
1556         (WebCore::RenderSVGInlineText::computeAbsoluteRectForRange):
1557         * rendering/RenderSVGInlineText.h:
1558         * rendering/RenderSVGRoot.cpp:
1559         (WebCore::RenderSVGRoot::absoluteQuads):
1560         * rendering/RenderSVGRoot.h:
1561         * rendering/RenderSVGTSpan.cpp:
1562         (WebCore::RenderSVGTSpan::absoluteRects):
1563         (WebCore::RenderSVGTSpan::absoluteQuads):
1564         * rendering/RenderSVGTSpan.h:
1565         * rendering/RenderSVGText.cpp:
1566         (WebCore::RenderSVGText::absoluteRects):
1567         (WebCore::RenderSVGText::absoluteQuads):
1568         * rendering/RenderSVGText.h:
1569         * rendering/RenderSVGTextPath.cpp:
1570         (WebCore::RenderSVGTextPath::absoluteRects):
1571         (WebCore::RenderSVGTextPath::absoluteQuads):
1572         * rendering/RenderSVGTextPath.h:
1573         * rendering/RenderTableCell.cpp:
1574         (WebCore::RenderTableCell::localToAbsolute):
1575         (WebCore::RenderTableCell::localToAbsoluteQuad):
1576         * rendering/RenderTableCell.h:
1577         * rendering/RenderText.cpp:
1578         (WebCore::RenderText::absoluteQuads):
1579         (WebCore::RenderText::collectAbsoluteLineBoxQuads):
1580         * rendering/RenderText.h:
1581         * rendering/RenderView.cpp:
1582         (WebCore::RenderView::localToAbsoluteQuad):
1583         (WebCore::RenderView::absoluteQuads):
1584         * rendering/RenderView.h:
1585
1586 2008-11-12  Brent Fulgham <bfulgham@gmail.com>
1587
1588         Fix Bug 22178: Build errors in WebKit Cairo port
1589
1590         <https://bugs.webkit.org/show_bug.cgi?id=22178>
1591
1592         Reviewed by Mark Rowe.
1593
1594         * platform/graphics/cairo/PatternCairo.cpp: Correct build error under
1595         Visual Studio.
1596         (WebCore::Pattern::createPlatformPattern):
1597
1598 2008-11-12  Adam Roben  <aroben@apple.com>
1599
1600         Fix a typo in the include path for the Release_Cairo configuration
1601
1602         * WebCore.vcproj/WebCore.vcproj: Fixed "caro" -> "cairo" typo.
1603
1604 2008-11-12  Simon Fraser  <simon.fraser@apple.com>
1605
1606         Reviewed by Dave Hyatt
1607
1608         https://bugs.webkit.org/show_bug.cgi?id=17840
1609         Patch 2
1610         
1611         Code cleanup in RenderBox::computeAbsoluteRepaintRect().
1612
1613         * rendering/RenderBox.cpp:
1614         (WebCore::RenderBox::computeAbsoluteRepaintRect):
1615
1616 2008-11-12  Simon Fraser  <simon.fraser@apple.com>
1617
1618         Reviewed by Dave Hyatt
1619
1620         https://bugs.webkit.org/show_bug.cgi?id=17840
1621
1622         Fix repainting when the transform on a positioned element changes.
1623         In computeAbsoluteRepaintRect(), add the offsets due to relative positioning,
1624         and being in a positioned container after applying the transform to the local
1625         rect.
1626
1627         Tests: fast/repaint/transform-absolute-in-positioned-container.html
1628                fast/repaint/transform-relative-position.html
1629
1630         * rendering/RenderBox.cpp:
1631         (WebCore::RenderBox::computeAbsoluteRepaintRect):
1632
1633 2008-11-12  Justin Garcia  <justin.garcia@apple.com>
1634  
1635         Reviewed by Beth Dakin.
1636  
1637         <rdar://problem/5495723> Selecting and deleting quoted text quotes other text
1638         <rdar://problem/4775313> Deleting lines from the bottom of a messages leaves the last blank line quoted
1639         
1640         We don't want to merge into a block if it will mean changing the quote level of content after deleting 
1641         selections that contain a whole number paragraphs plus a line break, since it is unclear to most users 
1642         that such a selection actually ends at the start of the next paragraph.  Instead we want to completely
1643         remove the selected paragraph(s) and all evidence of the first one's quote level.  This matches TextEdit behavior 
1644         for indented paragraphs.
1645  
1646         * editing/DeleteSelectionCommand.cpp:
1647         (WebCore::DeleteSelectionCommand::initializePositionData): For the selections described above, do not
1648         try to merge after the deletion.  Instead try and prune the start block or blocks if they've been emptied
1649         so that we remove evidence of the deleted paragraphs' quote level.
1650         (WebCore::DeleteSelectionCommand::mergeParagraphs): Try and prune the start block(s) if necessary.  Also 
1651         make sure that the caret is placed correctly so that it ends up on the same line that the deleted selection 
1652         started on, instead of one higher.
1653         * editing/DeleteSelectionCommand.h:
1654         * editing/htmlediting.cpp:
1655         (WebCore::numEnclosingMailBlockquotes): Added.
1656         * editing/htmlediting.h:
1657
1658 2008-11-10  Tor Arne Vestbø  <tavestbo@trolltech.com>
1659
1660         Reviewed by Simon Hausmann.
1661
1662         Move _web_encodingForResource from WebKit into WebCore and change return type
1663
1664         This change is needed to implement NSAPI in WebCore for Mac, see:
1665
1666         https://bugs.webkit.org/show_bug.cgi?id=21427
1667
1668         * WebCore.base.exp:
1669         * platform/mac/WebCoreNSStringExtras.h:
1670         * platform/mac/WebCoreNSStringExtras.mm:
1671         (stringEncodingForResource):
1672
1673 2008-11-10  Tor Arne Vestbø  <tavestbo@trolltech.com>
1674
1675         Reviewed by Simon Hausmann.
1676
1677         Moved the implementation of _webkit_isCaseInsensitiveEqualToString to
1678         WebCore's WebCoreNSStringExtras as _stringIsCaseInsensitiveEqualToString.
1679
1680         This change is needed to implement NSAPI in WebCore for Mac, see:
1681
1682         https://bugs.webkit.org/show_bug.cgi?id=21427
1683
1684         * WebCore.base.exp:
1685         * platform/mac/WebCoreNSStringExtras.h:
1686         * platform/mac/WebCoreNSStringExtras.mm:
1687         (stringIsCaseInsensitiveEqualToString):
1688
1689 2008-11-11  Stephanie  <slewis@apple.com>
1690
1691         Reviewed by Dan Bernstein.
1692
1693         Null check image data before setting it as image source.
1694
1695         Test: fast/images/image-empty-data.html
1696
1697         * platform/graphics/BitmapImage.cpp:
1698         (WebCore::BitmapImage::destroyDecodedData):
1699
1700 2008-11-11  Adele Peterson  <adele@apple.com>
1701
1702         Reviewed by Tim Hatcher.
1703
1704         Remove ifdef so future OS versions can use the new delegate method.
1705
1706         * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::didSendBodyDataDelegateExists):
1707
1708 2008-11-11  Eric Seidel  <eric@webkit.org>
1709
1710         Reviewed by Antti Koivisto and Sam Weinig.
1711
1712         Clean up HTMLTokenizer a litle
1713         https://bugs.webkit.org/show_bug.cgi?id=22188
1714
1715         Rename pendingScripts to m_pendingScripts
1716         Rename scriptNode to m_scriptNode make the type specific
1717         Rename pendingSrc to m_pendingSrc
1718         Rename currentPrependingSrc to m_currentPrependingSrc
1719         Rename noMoreData to m_noMoreData and cBuffer to m_cBuffer
1720         Remove long-since-dead kdDebug and qDebug calls
1721         Rename brokenComments to m_brokenComments
1722         Remove HTMLTokenizer includes and document the rest
1723         Rename src to m_src
1724         Rename parser to m_parser and make it an OwnPtr
1725         Rename inWrite to m_inWrite and jsProxy to scriptController
1726         Rename brokenServer to m_brokenServer
1727         Rename buffer to m_buffer and dest to m_dest
1728         Rename size to m_bufferSize
1729         Rename attrName to m_attrName
1730         Rename searchStopper to m_searchStopper and searchStopperLen to m_searchStopperLen
1731         Rename scriptCode* to m_scriptCode* and change scriptCodeMax to m_scriptCodeCapacity
1732         Rename scriptStartLineno to m_currentScriptTagStartLineNumber and tagStartLineno to m_currentTagStartLineNumber
1733         Rename scriptSrc to m_scriptTagSrcAttrValue and scriptSrcCharset to m_scriptTagCharsetAttrValue -- a bit unwieldy, but more precise
1734         Rename flat to selfClosingTag
1735         Rename currToken to m_currentToken
1736
1737         * css/CSSParser.cpp:
1738         * dom/XMLTokenizer.cpp:
1739         * dom/XMLTokenizerLibxml2.cpp:
1740         * html/HTMLDocument.cpp:
1741         * html/HTMLElement.cpp:
1742         * html/HTMLFormControlElement.cpp:
1743         * html/HTMLParser.h:
1744         * html/HTMLTokenizer.cpp:
1745         (WebCore::Token::addAttribute):
1746         (WebCore::HTMLTokenizer::HTMLTokenizer):
1747         (WebCore::HTMLTokenizer::reset):
1748         (WebCore::HTMLTokenizer::begin):
1749         (WebCore::HTMLTokenizer::processListing):
1750         (WebCore::HTMLTokenizer::parseSpecial):
1751         (WebCore::HTMLTokenizer::scriptHandler):
1752         (WebCore::HTMLTokenizer::scriptExecution):
1753         (WebCore::HTMLTokenizer::parseComment):
1754         (WebCore::HTMLTokenizer::parseServer):
1755         (WebCore::HTMLTokenizer::parseProcessingInstruction):
1756         (WebCore::HTMLTokenizer::parseText):
1757         (WebCore::HTMLTokenizer::parseEntity):
1758         (WebCore::HTMLTokenizer::parseTag):
1759         (WebCore::HTMLTokenizer::write):
1760         (WebCore::HTMLTokenizer::processingData):
1761         (WebCore::HTMLTokenizer::end):
1762         (WebCore::HTMLTokenizer::finish):
1763         (WebCore::HTMLTokenizer::processToken):
1764         (WebCore::HTMLTokenizer::processDoctypeToken):
1765         (WebCore::HTMLTokenizer::~HTMLTokenizer):
1766         (WebCore::HTMLTokenizer::enlargeBuffer):
1767         (WebCore::HTMLTokenizer::enlargeScriptBuffer):
1768         (WebCore::HTMLTokenizer::notifyFinished):
1769         (WebCore::HTMLTokenizer::setSrc):
1770         * html/HTMLTokenizer.h:
1771         (WebCore::Token::Token):
1772         (WebCore::Token::reset):
1773         (WebCore::HTMLTokenizer::processingContentWrittenByScript):
1774         (WebCore::HTMLTokenizer::htmlParser):
1775         (WebCore::HTMLTokenizer::checkBuffer):
1776         (WebCore::HTMLTokenizer::checkScriptBuffer):
1777         * html/HTMLViewSourceDocument.h:
1778         * rendering/RenderBlock.cpp:
1779         (WebCore::RenderBlock::leftRelOffset):
1780         (WebCore::RenderBlock::rightRelOffset):
1781         (WebCore::RenderBlock::lineWidth):
1782         * xml/XSLTProcessor.cpp:
1783
1784 2008-11-11  Sam Weinig  <sam@webkit.org>
1785
1786         Reviewed by Dan Bernstein.
1787
1788         Fix for https://bugs.webkit.org/show_bug.cgi?id=22189
1789         Track CachedScript decoded data
1790
1791         We now track the decoded size of CachedScripts in the Cache allowing
1792         them to accounted for when deciding when to evict data.  The decoded
1793         data itself can be evicted when Cache pressure gets high enough through
1794         CachedScript::destroyDecodedData.
1795
1796         * loader/CachedResource.h:
1797         (WebCore::CachedResource::allClientsRemoved):
1798         (WebCore::CachedResource::destroyDecodedData):
1799         * loader/CachedScript.cpp:
1800         (WebCore::CachedScript::script):
1801         (WebCore::CachedScript::data):
1802         (WebCore::CachedScript::destroyDecodedData):
1803         * loader/CachedScript.h:
1804
1805 2008-11-11  Cameron Zwarich  <zwarich@apple.com>
1806
1807         Reviewed by Geoff Garen.
1808
1809         Remove pointless dependencies on the now-deleted kjs directory and
1810         mentions of it in comments that are no longer relevant.
1811
1812         * WebCore.pro:
1813         * webcore-base.bkl:
1814
1815 2008-11-11  Dan Bernstein  <mitz@apple.com>
1816
1817         Reviewed by Adam Roben.
1818
1819         WebCore part of adding a master volume control for media elements in a WebView
1820
1821         * WebCore.base.exp: Exported WebCore::Page::setMediaVolume().
1822         * dom/Document.cpp:
1823         (WebCore::Document::mediaVolumeDidChange): Added. Called by the Page
1824         when the media volume is changed.
1825         (WebCore::Document::registerForMediaVolumeCallbacks): Added. Allows
1826         elements to register for a callback when the media volume is changed.
1827         (WebCore::Document::unregisterForMediaVolumeCallbacks): Added. Allows
1828         elements to unregister for the callback.
1829         * dom/Document.h:
1830         * dom/Element.h:
1831         (WebCore::Element::mediaVolumeDidChange): Added an empty implementation.
1832         * html/HTMLMediaElement.cpp:
1833         (WebCore::HTMLMediaElement::HTMLMediaElement): Added a call to
1834         registerForMediaVolumeCallbacks().
1835         (WebCore::HTMLMediaElement::~HTMLMediaElement): Added a call to
1836         unregisterForMediaVolumeCallbacks().
1837         (WebCore::HTMLMediaElement::updateVolume): Changed to multiply the
1838         element's intrinsic volume by the master volume from the page.
1839         (WebCore::HTMLMediaElement::mediaVolumeDidChange): Added. Calls
1840         updateVolume().
1841         * html/HTMLMediaElement.h:
1842         * page/Page.cpp:
1843         (WebCore::Page::Page): Initialize m_mediaVolume to 1.
1844         (WebCore::Page::setMediaVolume): Added. Calls mediaVolumeDidChange() on
1845         every document in the page when the master volume changes.
1846         * page/Page.h:
1847         (WebCore::Page::mediaVolume): Added this getter.
1848
1849 2008-11-11  David Hyatt  <hyatt@apple.com>
1850
1851         https://bugs.webkit.org/show_bug.cgi?id=22182
1852
1853         Fix problems with scrollbars when the OS setting for clicks in the track jumping the thumb to that location
1854         is turned on.  Make sure to only jump the thumb if the click happens in the track.  Also fix some math
1855         errors when jumping the thumb that cause dragging after the jump to incorrectly jump the thumb again.
1856
1857         Reviewed by Adele
1858
1859         * platform/Scrollbar.cpp:
1860         (WebCore::Scrollbar::mouseDown):
1861
1862 2008-11-11  Beth Dakin  <bdakin@apple.com>
1863
1864         Reviewed by Darin Adler.
1865
1866         Fix for <rdar://problem/5089327> Too much indentation when pasting 
1867         quoted paragraphs
1868
1869         This patch re-addresses pasting blockquotes into blockquotes. It 
1870         backs out most of revision 38273. 38273 fixed the bug by inserting 
1871         the pasted content as a sibling blockquote node to the pre-existing 
1872         blockquote node. The problem with that is that by default, 
1873         blockquotes have a giant margin, so visually, this can be weird. 
1874         This patch instead inserts the pasted content as siblings of the 
1875         the content already inside the outer blockquote, and then removes 
1876         the blockquote node from the pasted content itself, so that it 
1877         doesn't nest itself into the outer blockquote.
1878         * editing/ReplaceSelectionCommand.cpp:
1879         (WebCore::ReplaceSelectionCommand::doApply):
1880
1881         Move contains() from Element to Node since there is nothing 
1882         Element-specific about it.
1883         * dom/Element.cpp:
1884         * dom/Element.h:
1885         * dom/Node.cpp:
1886         (WebCore::Node::contains):
1887         * dom/Node.h:
1888
1889 2008-11-11  David Hyatt  <hyatt@apple.com>
1890
1891         https://bugs.webkit.org/show_bug.cgi?id=17997
1892
1893         Stop using the new Leopard API tiling call for scaled tiles when drawing background images.  The method
1894         is buggy.  Fall back to using the slower (and more correct) pattern tiling that Tiger still uses.  This
1895         is a Leopard-only workaround, since the API has been fixed on Snow Leopard.
1896
1897         Reviewed by John Sullivan
1898
1899         * platform/graphics/cg/ImageCG.cpp:
1900         (WebCore::Image::drawPattern):
1901
1902 2008-11-10  David Hyatt  <hyatt@apple.com>
1903
1904         Disable the Aqua look for menu lists when full page zoom is turned on.  Because the control is buggy
1905         when scaling and because it's impossible to paint into an offscreen bitmap without completely rewriting
1906         how we draw the control on Mac, our only real option for now is to just switch to our styled look when zoomed.
1907
1908         Reviewed by Adam Roben
1909
1910         * rendering/RenderThemeMac.mm:
1911         (WebCore::RenderThemeMac::isControlStyled):
1912
1913 2008-11-11  Darin Adler  <darin@apple.com>
1914
1915         Reviewed by Dan Bernstein.
1916
1917         - https://bugs.webkit.org/show_bug.cgi?id=22160
1918         speculative fix for <rdar://problem/5995450> Nil deref because nextLinePosition
1919         (previousLinePosition, too) uses a nil node
1920
1921         * editing/visible_units.cpp:
1922         (WebCore::nextLinePosition): Use RenderObject::node instead of RenderObject::element
1923         to check editingIgnoresContent. It makes sense to use the associated DOM node for
1924         this, even in cases of anonymous content, and it avoids the case where element() can
1925         be 0.
1926         (WebCore::previousLinePosition): Ditto.
1927
1928 2008-11-11  Dirk Schulze  <vbs85@gmx.de>
1929
1930         Reviewed by Darin Adler.
1931
1932         Removed default: in applySpreadMethod. This causes the problems
1933         in radial gradients. We don't need CAIRO_EXTEND_NONE in SVG, Canvas
1934         or CSS.
1935
1936         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1937         (WebCore::applySpreadMethod):
1938
1939 2008-11-11  Ariya Hidayat  <ariya.hidayat@trolltech.com>
1940
1941         Reviewed by Tor Arne Vestbø.
1942
1943         Fix crash when rendering the file chooser.
1944         Also proper implementation for multi-selected files.
1945
1946         * platform/qt/FileChooserQt.cpp:
1947         (WebCore::FileChooser::basenameForWidth):
1948
1949 2008-11-11  Dirk Schulze  <vbs85@gmx.de>
1950
1951         Reviewed by Oliver Hunt.
1952
1953         PatternCairo needs to invert the pattern matrix because
1954         of transformation from user space to pattern space.
1955         Give a identity matrix to pattern for Qt and Cairo. Because the 
1956         context is transformed already.
1957
1958         [CAIRO][QT] Canvas transformations applied twice to Patterns
1959         https://bugs.webkit.org/show_bug.cgi?id=21555
1960
1961         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1962         (WebCore::GraphicsContext::fillPath):
1963         (WebCore::GraphicsContext::strokePath):
1964         * platform/graphics/cairo/PatternCairo.cpp:
1965         (WebCore::Pattern::createPlatformPattern):
1966         * platform/graphics/qt/GraphicsContextQt.cpp:
1967         (WebCore::GraphicsContext::strokePath):
1968         (WebCore::GraphicsContext::fillRect):
1969
1970 2008-11-10  Stephanie Lewis  <slewis@apple.com>
1971
1972         Reviewed by Dan Bernstein.
1973
1974         Clear the image source cache even if we haven't decoded any of the image data.
1975         We use the image source cache when calculating layout.
1976
1977         * loader/Cache.cpp:
1978         (WebCore::Cache::pruneDeadResources):
1979         * platform/graphics/BitmapImage.cpp:
1980         (WebCore::BitmapImage::destroyDecodedData):
1981
1982 2008-11-10  Adam Roben  <aroben@apple.com>
1983
1984         Fix Bug 22161: Assertion failure in RenderThemeWin::systemColor when
1985         loading microsoftpdc.com
1986
1987         <https://bugs.webkit.org/show_bug.cgi?id=22161>
1988
1989         Reviewed by Dan Bernstein.
1990
1991         Test: fast/css/outline-invert-assertion.html
1992
1993         * rendering/RenderThemeWin.cpp:
1994         (WebCore::RenderThemeWin::systemColor): If we can't determine a good
1995         Win32 system color to use, defer to RenderTheme instead of asserting.
1996         This matches what RenderThemeMac does.
1997
1998 2008-11-10  Justin Garcia  <justin.garcia@apple.com>
1999
2000         Reviewed by Beth Dakin.
2001
2002         <rdar://problem/4037481> REGRESSION (Mail): pasting quoted text 
2003         into quoted text yields double-quoting
2004         
2005         Don't nest inserted content in Mail blockquotes.  Perform a 
2006         BreakBlockquoteCommand if we're in
2007         one and insert the incoming fragment between the split blockquotes.
2008
2009         * editing/ReplaceSelectionCommand.cpp:
2010         (WebCore::ReplaceSelectionCommand::shouldMerge): Renamed from -> 
2011         source and to -> destination.
2012         (WebCore::ReplaceSelectionCommand::doApply):
2013
2014 2008-11-10  Adam Roben  <aroben@apple.com>
2015
2016         Fix Bug 22158: Would like to turn on WebCore logging channels via an
2017         environment variable
2018
2019         <https://bugs.webkit.org/show_bug.cgi?id=22158>
2020
2021         Logging channels can now be enabled by setting the WebCoreLogLevel
2022         environment variable to a hexadecimal number.
2023
2024         Reviewed by Anders Carlsson.
2025
2026         * WebCore.vcproj/WebCore.vcproj: Added LoggingWin.cpp.
2027         * platform/win/LoggingWin.cpp: Copied from WebCore/platform/mac/LoggingMac.mm.
2028         (WebCore::initializeWithUserDefault): Read in the WebCoreLogLevel
2029         environment variable, parse its value as a hexadecimal number, and
2030         turn the channel on/off based on whether the mask bit is set.
2031         (WebCore::InitializeLoggingChannelsIfNecessary): Initialize each
2032         logging channel in turn.
2033
2034 2008-11-10  Darin Adler  <darin@apple.com>
2035
2036         Reviewed by Adam Roben.
2037
2038         - fix https://bugs.webkit.org/show_bug.cgi?id=22103
2039           Changing fonts in preferences does not immediately update WebViews
2040
2041         This broke when the meaning of FrameView::invalidate changed.
2042         I changed setNeedsReapplyStyles to no longer depend on invalidate.
2043
2044         * dom/Document.cpp: (WebCore::Document::shouldScheduleLayout):
2045         Removed the part of this function that duplicated what's already in
2046         FrameView::needsLayout, since the copy here left out a few key things.
2047         For example, it didn't handle the fact that "needs reapply styles"
2048         counts as needing layout.
2049
2050         * page/Frame.cpp: (WebCore::Frame::setNeedsReapplyStyles): This called
2051         FrameView::invalidate before. There were two things wrong with that.
2052         1) It requested that the entire view repaint even if the style change
2053         didn't necessitate that. 2) FrameView::invalidate no longer causes any
2054         repainting at all in certain cases, because of Hyatt's changes to how
2055         widgets and the host window are involved in the repainting process.
2056         So call FrameView::scheduleRelayout instead, which is more precisely
2057         what we want and need here.
2058
2059         * page/FrameView.cpp:
2060         (WebCore::FrameView::scheduleRelayout): Add a call to needsLayout here
2061         so that Document::shouldScheduleLayout doesn't have to replicate the
2062         logic that's in needsLayout and can instead rely on the fact that it
2063         was already called.
2064         (WebCore::FrameView::needsLayout): Tweaked the comments and formatting
2065         in this function.
2066
2067 2008-11-10  Darin Adler  <darin@apple.com>
2068
2069         Reviewed by Adam Roben.
2070
2071         - speculative fix for <rdar://problem/5557243> crashes in Safari at
2072           WebCore::HTMLSelectElement::updateListBoxSelection + 280
2073
2074         * html/HTMLSelectElement.cpp:
2075         (WebCore::HTMLSelectElement::updateListBoxSelection):
2076         Check index against size of vector before indexing into the vector.
2077
2078 2008-11-10  Tom Cooksey  <thomas.cooksey@trolltech.com>
2079
2080         Reviewed by Tor Arne Vestbø.
2081
2082         Fix QtWebkit build failure on arm.
2083
2084         pen.widthF() is a qreal, which means it's a float on arm.
2085
2086         * platform/graphics/qt/GraphicsContextQt.cpp:
2087         (WebCore::GraphicsContext::setLineDash):
2088
2089 2008-11-10  Morten Sørvig  <msorvig@trolltech.com>
2090
2091         Reviewed by Simon Hausmann.
2092
2093         Improve mouse wheel scolling on Qt/Cocoa.
2094         Cocoa differs from Carbon (and other platforms I think) in that the
2095         mouse wheel events we get have a much higher acceleration factor.
2096
2097         This submit switches over to scroll-per-pixel from scroll-per-line
2098         for most of our scrolling views. This matches the native views
2099         and works well with the increased acceleration.
2100
2101         * platform/qt/WheelEventQt.cpp:
2102
2103 2008-11-09  Cameron Zwarich  <zwarich@apple.com>
2104
2105         Reviewed by Darin Adler.
2106
2107         Bug 19541: Null pointer in showModalDialog()
2108         <https://bugs.webkit.org/show_bug.cgi?id=19541>
2109
2110         Add null frame->page() checks to JSDOMWindowBase::canShowModalDialog()
2111         and JSDOMWindowBase::canShowModalDialogNow()C
2112
2113         * bindings/js/JSDOMWindowBase.cpp:
2114         (WebCore::canShowModalDialog):
2115         (WebCore::canShowModalDialogNow):
2116
2117 2008-11-09  Darin Adler  <darin@apple.com>
2118
2119         - try to fix Windows build
2120
2121         * platform/graphics/Color.cpp: For some reason MSVC doesn't follow the rules
2122         about needed a separate definition for static const integer data members.
2123         Until I get to the bottom of this, put the definitions inside an ifdef.
2124
2125 2008-11-09  David Kilzer  <ddkilzer@apple.com>
2126
2127         BUILD FIX: Qt build broke after r38235.
2128
2129         Added HAVE(ACCESSIBILITY) header guards to platform implementation
2130         source files.
2131
2132         * page/gtk/AccessibilityObjectAtk.cpp: Added HAVE(ACCESSIBILITY)
2133         guards.
2134         * page/gtk/AccessibilityObjectWrapperAtk.cpp: Ditto.
2135         * page/qt/AccessibilityObjectQt.cpp: Ditto.
2136         * page/win/AccessibilityObjectWin.cpp: Ditto.
2137         * page/wx/AccessibilityObjectWx.cpp: Ditto.
2138
2139 2008-11-09  Alexey Proskuryakov  <ap@webkit.org>
2140
2141         Reviewed by Darin Adler.
2142
2143         https://bugs.webkit.org/show_bug.cgi?id=22104
2144         Javascript URL percent encoding/decoding broken by some characters
2145
2146         Test: fast/loader/javascript-url-encoding-2.html
2147
2148         * platform/KURL.cpp: (WebCore::encodeRelativeString): Don't try to break down javascript URLs.
2149
2150 2008-11-09  Holger Hans Peter Freyther  <zecke@selfish.org>
2151
2152         Reviewed and tweaked by Darin Adler.
2153
2154         * platform/graphics/Color.cpp: Added definitions for the static data members
2155         in this class. Static data members need a definition, even when they are the
2156         simple integer constant kind that can be initialized in the header.
2157
2158 2008-11-08  Antti Koivisto  <antti@apple.com>
2159
2160         Reviewed by Sam Weinig.
2161         
2162         Fix https://bugs.webkit.org/show_bug.cgi?id=22141
2163         REGRESSION: Safari error page is not fully styled when loaded from cache
2164         
2165         Reset text decoder on flush so it does not pass through the BOM when it is reused.
2166
2167         Test: fast/encoding/css-cached-bom.html
2168
2169         * loader/TextResourceDecoder.cpp:
2170         (WebCore::TextResourceDecoder::flush):
2171
2172 2008-11-08  Kevin Ollivier  <kevino@theolliviers.com>
2173  
2174         Reviewed by Mark Rowe.
2175
2176         Send URL errors to stderr rather than stdout. While debugging wx DumpRenderTree,
2177         it was causing these errors to end up in the page's text representation.
2178
2179         * platform/network/curl/ResourceHandleManager.cpp:
2180         (WebCore::ResourceHandleManager::downloadTimerCallback):
2181
2182 2008-11-08  Kevin Ollivier  <kevino@theolliviers.com>
2183
2184         wx build fixes after addition of JSCore parser and bycompiler dirs. 
2185
2186         * webcore-base.bkl:
2187         * webcore-wx.bkl:
2188
2189 2008-11-08  Simon Fraser  <simon.fraser@apple.com>
2190
2191         Reviewed by Dan Bernstein
2192
2193         https://bugs.webkit.org/show_bug.cgi?id=21906
2194         
2195         Override addFocusRingRects() in RenderTextControl to avoid
2196         the RenderFlow behavior of recursing on descendent renderers.
2197         RenderTextControl should only ever need a simple focus rect.
2198         
2199         This fixes focus ring issues with transforms on text controls.
2200         
2201         Test: fast/transforms/transformed-focused-text-input.html
2202
2203         * rendering/RenderTextControl.cpp:
2204         (WebCore::RenderTextControl::addFocusRingRects):
2205         * rendering/RenderTextControl.h:
2206
2207 2008-11-08  Dimitri Dupuis-Latour  <dupuislatour@apple.com>
2208
2209         Make sure the icon thumbnail width/height is at least 1px in
2210         the Web Inspector's resource panel.
2211
2212         <rdar://problem/5988888>
2213
2214         Reviewed by Tim Hatcher.
2215
2216         * inspector/front-end/inspector.css:
2217
2218 2008-11-08  David Kilzer  <ddkilzer@apple.com>
2219
2220         Bug 22137: PLATFORM(MAC) build broken with HAVE(ACCESSIBILITY) disabled
2221
2222         <https://bugs.webkit.org/show_bug.cgi?id=22137>
2223
2224         Reviewed by Darin Adler.
2225
2226         * page/AccessibilityObject.h:
2227         (WebCore::AccessibilityObject::accessibilityIgnoreAttachment):
2228         Provide a default implementation when HAVE(ACCESSIBILITY) is false.
2229         * page/mac/AXObjectCacheMac.mm: Added HAVE(ACCESSIBILITY) guard.
2230         * page/mac/AccessibilityObjectMac.mm: Ditto.
2231         * page/mac/AccessibilityObjectWrapper.mm: Ditto.
2232
2233 2008-11-08  Dan Bernstein  <mitz@apple.com>
2234
2235         Reviewed by Darin Adler.
2236
2237         - WebCore part of adding WebPreferences for controlling databases and local storage
2238
2239         * WebCore.base.exp: Exported Settings::setDatabasesEnabled() and
2240         Settings::setLocalStorageEnabled().
2241         * page/DOMWindow.cpp:
2242         (WebCore::DOMWindow::localStorage): Changed to return 0 if local storage
2243         is disabled in settings.
2244         (WebCore::DOMWindow::openDatabase): Changed to return 0 if databases
2245         are disabled in settings.
2246         * page/Settings.cpp:
2247         (WebCore::Settings::Settings): Initialize m_databasesEnabled and
2248         m_localStorageEnabled.
2249         (WebCore::Settings::setDatabasesEnabled): Added.
2250         (WebCore::Settings::setLocalStorageEnabled): Added.
2251         * page/Settings.h:
2252         (WebCore::Settings::databasesEnabled): Added.
2253         (WebCore::Settings::localStorageEnabled): Added.
2254
2255 2008-11-07  Alp Toker  <alp@nuanti.com>
2256
2257         Fix build with bleeding edge GTK+ versions. GTK+ and other libraries
2258         now require that only their top-level header file is included.
2259
2260         Patch tested and still builds fine with older GTK+ versions (back to
2261         2.8).
2262
2263         Future WebKit GTK+ contributions are required to adhere to this
2264         policy.
2265
2266         * platform/gtk/FileSystemGtk.cpp:
2267         * platform/gtk/KeyEventGtk.cpp:
2268         * platform/gtk/MouseEventGtk.cpp:
2269         * platform/gtk/WheelEventGtk.cpp:
2270         * platform/gtk/gtkdrawing.h:
2271         * plugins/gtk/gtk2xtbin.c:
2272         * plugins/gtk/gtk2xtbin.h:
2273
2274 2008-11-07  Anders Carlsson  <andersca@apple.com>
2275
2276         Reviewed by Kevin Decker
2277
2278         Explicitly initialize the NPDrawingModelCoreAnimation.
2279
2280         * bridge/npapi.h:
2281
2282 2008-11-07  Alp Toker  <alp@nuanti.com>
2283
2284         autotools fix. Always use the configured perl binary (which may be
2285         different to the one in $PATH) when generating sources.
2286
2287         * GNUmakefile.am:
2288
2289 2008-11-07  Simon Fraser  <simon.fraser@apple.com>
2290
2291         Reviewed by Dan Bernstein
2292
2293         https://bugs.webkit.org/show_bug.cgi?id=22122
2294         
2295         Use a stack-based object to simplify the pushLayoutState/popLayoutState
2296         code. LayoutStateMaintainer either pushes in the constructor, or allows
2297         an explicit push() later. Both cases require an explicit pop().
2298
2299         * rendering/RenderBlock.cpp:
2300         (WebCore::RenderBlock::layoutBlock):
2301         (WebCore::RenderBlock::layoutOnlyPositionedObjects):
2302         * rendering/RenderContainer.cpp:
2303         (WebCore::RenderContainer::layout):
2304         * rendering/RenderFlexibleBox.cpp:
2305         (WebCore::RenderFlexibleBox::layoutBlock):
2306         * rendering/RenderTable.cpp:
2307         (WebCore::RenderTable::layout):
2308         * rendering/RenderTableRow.cpp:
2309         (WebCore::RenderTableRow::layout):
2310         * rendering/RenderTableSection.cpp:
2311         (WebCore::RenderTableSection::setCellWidths):
2312         (WebCore::RenderTableSection::calcRowHeight):
2313         (WebCore::RenderTableSection::layoutRows):
2314         * rendering/RenderView.h:
2315         (WebCore::LayoutStateMaintainer::LayoutStateMaintainer):
2316         (WebCore::LayoutStateMaintainer::~LayoutStateMaintainer):
2317         (WebCore::LayoutStateMaintainer::pop):
2318         (WebCore::LayoutStateMaintainer::push):
2319         (WebCore::LayoutStateMaintainer::didPush):
2320
2321 2008-11-07  Tor Arne Vestbø  <tavestbo@trolltech.com>
2322
2323         Fix the QtWebKit build on Mac
2324
2325         * platform/qt/TemporaryLinkStubs.cpp:
2326         (PluginView::invalidateRect):
2327
2328 2008-11-07  Tor Arne Vestbø  <tavestbo@trolltech.com>
2329
2330         Rubber-stamped by Simon Hausmann.
2331
2332         Don't allow Phonon's invisible video widget to keep the app running
2333
2334         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
2335         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
2336
2337 2008-11-07  Henrik Hartz  <henrik.hartz@nokia.com>
2338
2339         Reviewed by Simon Hausmann.
2340
2341         Fix valgrind warning about uninitialized lastStop variable.
2342
2343         * platform/graphics/qt/GradientQt.cpp:
2344         (WebCore::Gradient::platformGradient):
2345
2346 2008-11-07  Alexey Proskuryakov  <ap@webkit.org>
2347
2348         Reviewed by Maciej Stachowiak.
2349
2350         Fix layout test brokenness following r38211.
2351
2352         * page/EventHandler.cpp: (WebCore::EventHandler::handleAccessKey):
2353         Restore old Shift key behavior. We ignore Shift key state when matching access keys (which
2354         matches neither IE nor Firefox), and this patch made WebKit behave like Firefox
2355         inadvertently. This may or may not be a good thing, but it's certainly not something that
2356         should change by accident.
2357
2358 2008-11-06  Antti Koivisto  <antti@apple.com>
2359
2360         Eh, this trivial last minute change was wrong.
2361
2362         * loader/CachedCSSStyleSheet.cpp:
2363         (WebCore::CachedCSSStyleSheet::sheetText):
2364
2365 2008-11-06  Antti Koivisto  <antti@apple.com>
2366
2367         Reviewed by Dan Bernstein.
2368
2369         https://bugs.webkit.org/show_bug.cgi?id=22093
2370         
2371         Delaying the text decoding caused regression since the decoding
2372         also determines the encoding in case of @charset rule. 
2373         
2374         Decode immediately in data() and keep the decoded string around
2375         during the checkNotify().
2376
2377         * loader/CachedCSSStyleSheet.cpp:
2378         (WebCore::CachedCSSStyleSheet::sheetText):
2379         (WebCore::CachedCSSStyleSheet::data):
2380         * loader/CachedCSSStyleSheet.h:
2381
2382 2008-11-06  Alexey Proskuryakov  <ap@webkit.org>
2383
2384         Reviewed by Darin Adler.
2385
2386         https://bugs.webkit.org/show_bug.cgi?id=22097
2387         Expose MessageEvent constructor on WorkerContext
2388
2389         * bindings/js/JSWorkerContext.cpp:
2390         (WebCore::jsWorkerContextMessageEvent):
2391         (WebCore::setJSWorkerContextMessageEvent):
2392
2393 2008-11-06  Alexey Proskuryakov  <ap@webkit.org>
2394
2395         Reviewed by Darin Adler.
2396
2397         https://bugs.webkit.org/show_bug.cgi?id=21107
2398         <rdar://problem/6264219> New access key combination conflicts with VoiceOver
2399
2400         * page/EventHandler.h:
2401         * page/gtk/EventHandlerGtk.cpp:
2402         (WebCore::EventHandler::accessKeyModifiers):
2403         * page/qt/EventHandlerQt.cpp:
2404         (WebCore::EventHandler::accessKeyModifiers):
2405         * page/win/EventHandlerWin.cpp:
2406         (WebCore::EventHandler::accessKeyModifiers):
2407         * page/wx/EventHandlerWx.cpp:
2408         (WebCore::EventHandler::accessKeyModifiers):
2409         Access access key modifiers via a function, not a static variable.
2410
2411         * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::accessKeyModifiers):
2412         Use Ctrl when VoiceOver is enabled, because a conflict with Emacs-style key bindings is
2413         less troublesome than one with VO keys.
2414
2415         * page/EventHandler.cpp: (WebCore::EventHandler::handleAccessKey):
2416         Also fix an access key matching bug introduced in r32424 - Any superset of specified
2417         modifier set invoked access keys. We can use simple equality comparison instead because
2418         CapsLock is not part of modifiers(), so it doesn't need to be ignored explicitly.
2419
2420 2008-11-06  Anders Carlsson  <andersca@apple.com>
2421
2422         Reviewed by Kevin Decker.
2423
2424         https://bugs.webkit.org/show_bug.cgi?id=22115
2425         NPN_HasPropertyUPP and NPN_HasMethodUPP entries in NPNetscapeFuncs are NULL
2426
2427         Export _NPN_HasMethod and _NPN_HasProperty.
2428         
2429         * WebCore.NPAPI.exp:
2430
2431 2008-11-06  Simon Fraser  <simon.fraser@apple.com>
2432
2433         Reviewed by Antti Koivisto
2434
2435         https://bugs.webkit.org/show_bug.cgi?id=15678
2436         
2437         Fix transformed menu selects to show the popup in the correct
2438         location.
2439
2440         * rendering/RenderMenuList.cpp:
2441         (WebCore::RenderMenuList::showPopup):
2442
2443 2008-11-06  David Kilzer  <ddkilzer@apple.com>
2444
2445         BUILD FIX: Backed out r38189 (and r38203) for Xcode 3.0.
2446
2447         Apparently older versions of gcc have issues with this patch.
2448         Backing out a second time until the issues are resolved.
2449
2450 2008-11-06  Julien Chaffraix  <jchaffraix@pleyo.com>
2451
2452         Reviewed by Maciej Stachowiak.
2453
2454         Bug 21106: .in format discussed changes
2455         https://bugs.webkit.org/show_bug.cgi?id=21106
2456
2457         Include the namespace into the interfaceName.
2458
2459         * dom/make_names.pl: Do not append the namespace when
2460         using the interfaceName.
2461         * html/HTMLTagNames.in: Added namespace prefix for custom
2462         interfaceName.
2463         * svg/svgtags.in: Ditto.
2464
2465 2008-11-06  Cameron Zwarich  <zwarich@apple.com>
2466
2467         Reviewed by Geoff Garen.
2468
2469         Move the remaining files in the kjs subdirectory of JavaScriptCore to
2470         a new parser subdirectory, and remove the kjs subdirectory entirely.
2471
2472         * ForwardingHeaders/kjs: Removed.
2473         * ForwardingHeaders/kjs/Parser.h: Removed.
2474         * ForwardingHeaders/kjs/SavedBuiltins.h: Removed.
2475         * ForwardingHeaders/kjs/SourceCode.h: Removed.
2476         * ForwardingHeaders/kjs/SourceProvider.h: Removed.
2477         * ForwardingHeaders/parser: Added.
2478         * ForwardingHeaders/parser/Parser.h: Copied from ForwardingHeaders/kjs/Parser.h.
2479         * ForwardingHeaders/parser/SourceCode.h: Copied from ForwardingHeaders/kjs/SourceCode.h.
2480         * ForwardingHeaders/parser/SourceProvider.h: Copied from ForwardingHeaders/kjs/SourceProvider.h.
2481         * WebCore.pro:
2482         * WebCore.vcproj/WebCore.vcproj:
2483         * bindings/js/StringSourceProvider.h:
2484         * bindings/js/WorkerScriptController.cpp:
2485         * bridge/NP_jsobject.cpp:
2486         * bridge/jni/jni_jsobject.mm:
2487         * bridge/testbindings.pro:
2488         * inspector/JavaScriptDebugServer.cpp:
2489
2490 2008-11-06  David Kilzer  <ddkilzer@apple.com>
2491
2492         BUILD WAS NOT BROKEN: Rolling r38189 back in.
2493
2494         Please perform a clean build if you see crashes.
2495
2496 2008-11-06  David Kilzer  <ddkilzer@apple.com>
2497
2498         BUILD FIX: Backed out r38189 since it apparently broke the world.
2499
2500 2008-11-06  Chris Fleizach  <cfleizach@apple.com>
2501
2502         Reviewed by Beth Dakin.
2503
2504         Bug 22112: if a <body> has contenteditable=true, it should report a writable AXValue
2505         https://bugs.webkit.org/show_bug.cgi?id=22112
2506
2507         Test: accessibility/content-editable.html
2508
2509         * page/AccessibilityRenderObject.cpp:
2510         (WebCore::AccessibilityRenderObject::isReadOnly):
2511
2512 2008-11-06  Sam Weinig  <sam@webkit.org>
2513
2514         Reviewed by Alice Liu.
2515
2516         Fix failed assert at launch caused by unintialized data member on the mac.
2517
2518         * platform/network/mac/NetworkStateNotifierMac.cpp:
2519         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
2520
2521 2008-11-06  Steve Falkenburg  <sfalken@apple.com>
2522
2523         Fix failed assert at launch caused by unintialized data member.
2524         
2525         Reviewed by Maciej Stachowiak.
2526
2527         * platform/network/win/NetworkStateNotifierWin.cpp:
2528         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
2529
2530 2008-11-06  Simon Fraser  <simon.fraser@apple.com>
2531
2532         Reviewed by Antti Koivisto
2533
2534         https://bugs.webkit.org/show_bug.cgi?id=22109
2535         Make <input type="range"> work correctly with transforms
2536
2537         Test: fast/forms/slider-transformed.html
2538
2539         * html/HTMLInputElement.cpp:
2540         (WebCore::HTMLInputElement::defaultEventHandler):
2541             Compute a correct local point when the event is retargeted
2542         * rendering/RenderSlider.cpp:
2543         (WebCore::HTMLSliderThumbElement::defaultEventHandler):
2544             Compute m_initialClickPoint in slider-local coords, so that
2545             deltas are computed correctly with transforms
2546         (WebCore::RenderSlider::mouseEventIsInThumb):
2547             Rather than computing an absolute bounds for the thumb,
2548             convert the point to local coords and compare it with the border box.
2549
2550 2008-11-06  Greg Bolsinga  <bolsinga@apple.com>
2551
2552         Reviewed by Darin Adler.
2553
2554         Bug 21810: Remove use of static C++ objects that are destroyed at exit time (destructors)
2555         https://bugs.webkit.org/show_bug.cgi?id=21810
2556
2557         * bindings/js/GCController.cpp:
2558         (WebCore::gcController): Changed to leak an object to avoid an exit-time destructor.
2559         * bindings/js/JSDOMBinding.cpp:
2560         (WebCore::wrapperSet): Ditto
2561         * bindings/js/JSInspectedObjectWrapper.cpp:
2562         (WebCore::wrappers): Ditto
2563         * bindings/js/JSInspectorCallbackWrapper.cpp:
2564         (WebCore::wrappers): Ditto
2565         * bridge/runtime_root.cpp:
2566         (JSC::Bindings::rootObjectSet): Ditto
2567         * css/CSSMutableStyleDeclaration.cpp:
2568         (WebCore::CSSMutableStyleDeclaration::removeProperty): Ditto
2569         * css/CSSPrimitiveValue.cpp:
2570         (WebCore::CSSPrimitiveValue::cssText): Ditto
2571         * css/CSSSelector.cpp:
2572         (WebCore::CSSSelector::extractPseudoType): Ditto
2573         * css/CSSStyleSelector.cpp:
2574         (WebCore::screenEval): Ditto
2575         (WebCore::printEval): Ditto
2576         * dom/DOMImplementation.cpp:
2577         (WebCore::isSVG10Feature): Ditto
2578         (WebCore::isSVG11Feature): Ditto
2579         (WebCore::DOMImplementation::isXMLMIMEType): Ditto
2580         * dom/Document.cpp:
2581         (WebCore::Document::hasPrefixNamespaceMismatch): Ditto
2582         * dom/ScriptElement.cpp:
2583         (WebCore::isSupportedJavaScriptLanguage): Ditto
2584         * editing/ApplyStyleCommand.cpp:
2585         (WebCore::styleSpanClassString): Ditto
2586         * editing/HTMLInterchange.cpp:
2587         (WebCore::): Ditto
2588         * editing/IndentOutdentCommand.cpp:
2589         (WebCore::indentBlockquoteString): Ditto
2590         * editing/ReplaceSelectionCommand.cpp:
2591         (WebCore::isInterchangeNewlineNode): Ditto
2592         (WebCore::isInterchangeConvertedSpaceSpan): Ditto
2593         * editing/htmlediting.cpp:
2594         (WebCore::stringWithRebalancedWhitespace): Ditto
2595         (WebCore::nonBreakingSpaceString): Ditto
2596         * editing/markup.cpp:
2597         (WebCore::appendAttributeValue): Ditto
2598         (WebCore::appendEscapedContent): Ditto
2599         (WebCore::shouldAddNamespaceAttr): Ditto
2600         (WebCore::appendNamespace): Ditto
2601         (WebCore::appendStartMarkup): Ditto
2602         (WebCore::createMarkup): Ditto
2603         * html/HTMLButtonElement.cpp:
2604         (WebCore::HTMLButtonElement::type): Ditto
2605         * html/HTMLElement.cpp:
2606         (WebCore::HTMLElement::isRecognizedTagName): Ditto
2607         (WebCore::inlineTagList): Ditto
2608         (WebCore::blockTagList): Ditto
2609         * html/HTMLFieldSetElement.cpp:
2610         (WebCore::HTMLFieldSetElement::type): Ditto
2611         * html/HTMLInputElement.cpp:
2612         (WebCore::HTMLInputElement::type): Ditto
2613         * html/HTMLKeygenElement.cpp:
2614         (WebCore::HTMLKeygenElement::type): Ditto
2615         * html/HTMLLegendElement.cpp:
2616         (WebCore::HTMLLegendElement::type): Ditto
2617         * html/HTMLOptGroupElement.cpp:
2618         (WebCore::HTMLOptGroupElement::type): Ditto
2619         * html/HTMLOptionElement.cpp:
2620         (WebCore::HTMLOptionElement::type): Ditto
2621         * html/HTMLParser.cpp:
2622         (WebCore::HTMLParser::getNode): Ditto
2623         (WebCore::HTMLParser::isHeaderTag): Ditto
2624         (WebCore::HTMLParser::isResidualStyleTag): Ditto
2625         (WebCore::HTMLParser::isAffectedByResidualStyle): Ditto
2626         * html/HTMLSelectElement.cpp:
2627         (WebCore::HTMLSelectElement::type): Ditto
2628         * html/HTMLTextAreaElement.cpp:
2629         (WebCore::HTMLTextAreaElement::type): Ditto
2630         * inspector/InspectorController.cpp:
2631         (WebCore::platform): Ditto
2632         * inspector/JavaScriptDebugServer.cpp:
2633         (WebCore::JavaScriptDebugServer::shared): Ditto
2634         * inspector/JavaScriptProfile.cpp:
2635         (WebCore::profileCache): Ditto
2636         * inspector/JavaScriptProfileNode.cpp:
2637         (WebCore::profileNodeCache): Ditto
2638         * loader/FrameLoader.cpp:
2639         (WebCore::localSchemes): Ditto
2640         * loader/appcache/ApplicationCacheStorage.cpp:
2641         (WebCore::cacheStorage): Ditto
2642         * loader/archive/ArchiveFactory.cpp:
2643         (WebCore::archiveMIMETypes): Ditto
2644         * loader/icon/IconDatabase.cpp:
2645         (WebCore::IconDatabase::defaultDatabaseFilename): Ditto
2646         * page/EventHandler.cpp:
2647         (WebCore::EventHandler::dragState): Ditto
2648         * page/Frame.cpp:
2649         (WebCore::createRegExpForLabels): Ditto
2650         (WebCore::keepAliveSet): Ditto
2651         * page/Page.cpp:
2652         (WebCore::Page::groupName): Ditto
2653         * page/SecurityOrigin.cpp:
2654         (WebCore::isDefaultPortForProtocol): Ditto
2655         (WebCore::SecurityOrigin::databaseIdentifier): Ditto
2656         * page/mac/FrameMac.mm:
2657         (WebCore::regExpForLabels): Ditto
2658         * platform/KURL.cpp:
2659         (WebCore::blankURL): Ditto
2660         * platform/graphics/FontCache.cpp:
2661         (WebCore::alternateFamilyName): Ditto
2662         * platform/graphics/mac/FontCacheMac.mm:
2663         (WebCore::FontCache::getSimilarFontPlatformData): Ditto
2664         (WebCore::FontCache::getLastResortFallbackFont): Ditto
2665         * platform/mac/ScrollbarThemeMac.mm:
2666         (WebCore::ScrollbarTheme::nativeTheme): Ditto
2667         * platform/mac/ThemeMac.mm:
2668         (WebCore::platformTheme): Ditto
2669         * platform/mac/ThreadCheck.mm:
2670         (WebCoreReportThreadViolation): Ditto
2671         * platform/network/NetworkStateNotifier.cpp:
2672         (WebCore::networkStateNotifier): Ditto
2673         * platform/network/mac/FormDataStreamMac.mm:
2674         (WebCore::getStreamFormDataMap): Ditto
2675         (WebCore::getStreamResourceHandleMap): Ditto
2676         * platform/network/mac/ResourceResponseMac.mm:
2677         (WebCore::ResourceResponse::platformLazyInit): Ditto
2678         * platform/text/TextEncoding.cpp:
2679         (WebCore::TextEncoding::isJapanese): Ditto
2680         * rendering/RenderBlock.cpp:
2681         (WebCore::continuationOutlineTable): Ditto
2682         * rendering/RenderCounter.cpp:
2683         (WebCore::counterMaps): Ditto
2684         * rendering/RenderFlexibleBox.cpp:
2685         (WebCore::RenderFlexibleBox::layoutVerticalBox): Ditto
2686         * rendering/RenderListItem.cpp:
2687         (WebCore::RenderListItem::markerText): Ditto
2688         * rendering/RenderScrollbarTheme.cpp:
2689         (WebCore::RenderScrollbarTheme::renderScrollbarTheme): Ditto
2690         * rendering/RenderThemeMac.mm:
2691         (WebCore::RenderThemeMac::systemFont): Ditto
2692         * rendering/bidi.cpp:
2693         (WebCore::RenderBlock::checkLinesForTextOverflow): Ditto
2694         * rendering/style/RenderStyle.cpp:
2695         (WebCore::RenderStyle::initialDashboardRegions): Ditto
2696         (WebCore::RenderStyle::noneDashboardRegions): Ditto
2697         * storage/LocalStorage.cpp:
2698         (WebCore::localStorageMap): Ditto
2699         * svg/SVGAnimateMotionElement.cpp:
2700         (WebCore::SVGAnimateMotionElement::rotateMode): Ditto
2701         * svg/SVGAnimationElement.cpp:
2702         (WebCore::SVGAnimationElement::calcMode): Ditto
2703         (WebCore::SVGAnimationElement::attributeType): Ditto
2704         (WebCore::SVGAnimationElement::isAdditive): Ditto
2705         (WebCore::SVGAnimationElement::isAccumulated): Ditto
2706         * svg/SVGLangSpace.cpp:
2707         (WebCore::SVGLangSpace::xmlspace): Ditto
2708         * svg/SVGSVGElement.cpp:
2709         (WebCore::SVGSVGElement::contentScriptType): Ditto
2710         (WebCore::SVGSVGElement::contentStyleType): Ditto
2711         * svg/SVGStyleElement.cpp:
2712         (WebCore::SVGStyleElement::type): Ditto
2713         (WebCore::SVGStyleElement::media): Ditto
2714         * svg/SVGTextContentElement.cpp:
2715         (WebCore::SVGTextContentElement::parseMappedAttribute): Ditto
2716         * svg/animation/SVGSMILElement.cpp:
2717         (WebCore::SVGSMILElement::parseClockValue): Ditto
2718         (WebCore::SVGSMILElement::restart): Ditto
2719         (WebCore::SVGSMILElement::fill): Ditto
2720         (WebCore::SVGSMILElement::repeatCount): Ditto
2721         (WebCore::SVGSMILElement::notifyDependentsIntervalChanged): Ditto
2722         * svg/graphics/SVGResource.cpp:
2723         (WebCore::clientMap): Ditto
2724         * svg/graphics/SVGResourceMarker.cpp:
2725         (WebCore::SVGResourceMarker::draw): Ditto
2726         * xml/XMLHttpRequest.cpp:
2727         (WebCore::preflightResultCache): Ditto
2728         (WebCore::isSafeRequestHeader): Ditto
2729         (WebCore::isOnAccessControlResponseHeaderWhitelist): Ditto
2730         * xml/XPathExpressionNode.cpp:
2731         (WebCore::XPath::Expression::evaluationContext): Ditto
2732         * xml/XPathParser.cpp:
2733         (WebCore::XPath::isAxisName): Ditto
2734         (WebCore::XPath::isNodeTypeName): Ditto
2735         * xml/XPathValue.cpp:
2736         (WebCore::XPath::Value::toNodeSet): Ditto
2737
2738 2008-11-06  Tor Arne Vestbø  <tavestbo@trolltech.com>
2739
2740         Rubber-stamped by Simon Hausmann.
2741
2742         Remove a bunch of unused methods in the Qt media element implementation
2743
2744         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
2745         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
2746         * platform/graphics/qt/MediaPlayerPrivatePhonon.h:
2747
2748 2008-11-05  Simon Fraser  <simon.fraser@apple.com>
2749
2750         Reviewed by Dave Hyatt
2751
2752         https://bugs.webkit.org/show_bug.cgi?id=21870
2753         
2754         Implement absoluteToLocal() to convert a point from absolute
2755         to local coordinates, optionally taking transforms into account.
2756         
2757         Use this to set offsetX/offsetY in mouse events, thus fixing
2758         offsetX/offsetY in events on elements with transforms.
2759
2760         Test: fast/events/offsetX-offsetY.html
2761
2762         * dom/MouseRelatedEvent.cpp:
2763         (WebCore::MouseRelatedEvent::receivedTarget):
2764         * rendering/RenderBox.cpp:
2765         (WebCore::RenderBox::localToAbsolute):
2766         (WebCore::RenderBox::absoluteToLocal):
2767         (WebCore::RenderBox::offsetFromContainer):
2768         * rendering/RenderBox.h:
2769         * rendering/RenderObject.cpp:
2770         (WebCore::RenderObject::absoluteToLocal):
2771         * rendering/RenderObject.h:
2772         * rendering/RenderTableCell.cpp:
2773         (WebCore::RenderTableCell::localToAbsolute):
2774         (WebCore::RenderTableCell::absoluteToLocal):
2775         * rendering/RenderTableCell.h:
2776         * rendering/RenderView.cpp:
2777         (WebCore::RenderView::absoluteToLocal):
2778         * rendering/RenderView.h:
2779
2780 2008-11-06  Alp Toker  <alp@nuanti.com>
2781
2782         Reviewed by Cameron Zwarich.
2783
2784         https://bugs.webkit.org/show_bug.cgi?id=22067
2785         [GTK] Sun Java plugin segfaults at PluginPackage::createPackage()
2786
2787         null-check symbols loaded from plugin modules, initialize the function
2788         table (like Win already does) and update it with the latest
2789         additions. Adjust whitespace for easy diff'ing with the Win port code
2790         from which it was forked.
2791
2792         This fixes crashes with libnspr4.so and any other plugins that don't
2793         provide the symbols we expect.
2794
2795         * plugins/gtk/PluginPackageGtk.cpp:
2796         (WebCore::PluginPackage::fetchInfo):
2797         (WebCore::PluginPackage::load):
2798
2799 2008-11-06  Kristian Amlie  <kristian.amlie@nokia.com>
2800
2801         Reviewed by Simon Hausmann.
2802
2803         Removed dead (and broken) code from an ancient Symbian port.
2804
2805         * config.h:
2806         * platform/text/AtomicString.h:
2807         * platform/text/PlatformString.h:
2808
2809 2008-11-06  Kristian Amlie  <kristian.amlie@nokia.com>
2810
2811         Reviewed by Simon Hausmann.
2812
2813         Use QLibrary as PlatformModule when compiling with Qt for S60.
2814
2815         * platform/FileSystem.h:
2816
2817 2008-11-06  Kristian Amlie  <kristian.amlie@nokia.com>
2818
2819         Reviewed by Simon Hausmann.
2820
2821         Compile fix for Symbian.
2822         The snprintf function is defined in stdio.h, the inclusion
2823         of snprintf.h inside this PLATFORM(SYMBIAN) block does not
2824         compile.
2825
2826         * config.h:
2827
2828 2008-11-06  Kristian Amlie  <kristian.amlie@nokia.com>
2829
2830         Reviewed by Simon Hausmann.
2831
2832         Disable webkit plugins for Symbian.
2833
2834         * WebCore.pro:
2835
2836 2008-11-06  Tor Arne Vestbø  <tavestbo@trolltech.com>
2837
2838         Fix build break in debug mode when XSLT is not enabled
2839
2840         * loader/Cache.cpp:
2841         (WebCore::Cache::dumpStats):
2842
2843 2008-11-06  Tor Arne Vestbø  <tavestbo@trolltech.com>
2844
2845         Reviewed by Simon Hausmann.
2846
2847         Repaint video on UpdateRequest to prevent recursive painting
2848
2849         Calling QWidget::render() to update the video generates a paint
2850         event that's then picked up by the event filter once more :(
2851
2852         We're really only interested in updates from Phonon, which we
2853         get through the UpdateRequest for each new frame.
2854
2855         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
2856         (WebCore::MediaPlayerPrivate::eventFilter):
2857
2858 2008-11-06  Cameron Zwarich  <zwarich@apple.com>
2859
2860         Not reviewed.
2861
2862         Fix the WebCore build for some platforms by changing build scripts to
2863         account for the recent move of the create_hash_table script from the kjs
2864         subdirectory of JavaScriptCore to the root directory.
2865
2866         * WebCore.pro:
2867         * make-generated-sources.sh:
2868
2869 2008-11-06  Cameron Zwarich  <zwarich@apple.com>
2870
2871         Not reviewed.
2872
2873         Fix a case-sensitivity issue in Mac forwarding headers. Strangely
2874         enough, this does not always cause the build to break, even with a
2875         case-sensitive filesystem.
2876
2877         * ForwardingHeaders/runtime/Interpreter.h:
2878
2879 2008-11-05  Alexey Proskuryakov  <ap@webkit.org>
2880
2881         Reviewed by Maciej Stachowiak.
2882
2883         https://bugs.webkit.org/show_bug.cgi?id=22083
2884         MessageEvents cannot be used across threads
2885
2886         * dom/Event.idl:
2887         * dom/MessageEvent.idl:
2888         Add a NoStaticTables attribute - MessageEvent is used in worker threads, so static tables
2889         won't work.
2890
2891         * dom/MessagePort.cpp:
2892         (WebCore::MessagePort::EventData::EventData):
2893         (WebCore::MessagePort::EventData::~EventData):
2894         (WebCore::MessagePort::clone):
2895         (WebCore::MessagePort::postMessage):
2896         (WebCore::MessagePort::startConversation):
2897         (WebCore::MessagePort::dispatchMessages):
2898         * dom/MessagePort.h:
2899         Don't create a MessageEvent until dispatch time - messages can be posted across threads,
2900         but MessageEvents are tied to the thread that they were created in.
2901
2902 2008-11-05  Alexey Proskuryakov  <ap@webkit.org>
2903
2904         Reviewed by Darin Adler.
2905
2906         https://bugs.webkit.org/show_bug.cgi?id=22066
2907         Implement Worker global object
2908
2909         * DerivedSources.make: Added WorkerLocation IDL and JSWorkerContext lookup table.
2910
2911         * WebCore.xcodeproj/project.pbxproj: Only adding files to Mac project for now, as Worker
2912         support is still disabled by default.
2913
2914         * bindings/js/JSDOMGlobalObject.cpp: (WebCore::toJSDOMGlobalObject): Implemented Worker case.
2915
2916         * bindings/js/JSMessageChannelConstructor.cpp:
2917         (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor): Ditto.
2918
2919         * bindings/js/JSWorkerContext.cpp: Added.
2920         * bindings/js/JSWorkerContext.h: Added.
2921         * bindings/js/WorkerScriptController.cpp: Added.
2922         * bindings/js/WorkerScriptController.h: Added.
2923         * dom/WorkerContext.cpp: Added.
2924         * dom/WorkerContext.h: Added.
2925         Added an implementation of worker contexts.
2926
2927         * dom/DedicatedWorker.cpp:
2928         (WebCore::DedicatedWorker::startLoad): Fixed a lifetime bug I saw on my tests.
2929         (WebCore::DedicatedWorker::notifyFinished): Create a thread. Currently, object ownership
2930         and lifetime is not clear at all.
2931
2932         * dom/WorkerLocation.cpp: Added.
2933         * dom/WorkerLocation.h: Added.
2934         * dom/WorkerLocation.idl: Added.
2935         Added WorkerLocation, which is one of the objects available to workers.
2936
2937         * dom/WorkerThread.cpp: Added.
2938         (WebCore::WorkerThread::WorkerThread):
2939         (WebCore::WorkerThread::start):
2940         (WebCore::WorkerThread::workerThreadStart):
2941         (WebCore::WorkerThread::workerThread):
2942         * dom/WorkerThread.h: Added.
2943         (WebCore::WorkerThread::create):
2944         Run some code in a worker thread (no message loop yet).
2945
2946 2008-11-05  Antti Koivisto  <antti@apple.com>
2947
2948         Reviewed by Dan Bernstein.
2949         
2950         https://bugs.webkit.org/show_bug.cgi?id=22093
2951         Don't keep decoded stylesheet data in cache
2952         
2953         <rdar://problem/6343588>
2954
2955         Don't keep decoded stylesheet string around in the cache. There are no sharing benefits and
2956         performance benefits are negligible (no measured PLT impact). Reduces memory consumption of
2957         style sheet data in cache by 2/3 in common case.  
2958
2959         * loader/CachedCSSStyleSheet.cpp:
2960         (WebCore::CachedCSSStyleSheet::sheetText):
2961         (WebCore::CachedCSSStyleSheet::data):
2962         * loader/CachedCSSStyleSheet.h:
2963
2964 2008-11-05  David Kilzer  <ddkilzer@apple.com>
2965
2966         Bug 21596: WebCore::Cache should use parsed Pragma and Cache-Control headers
2967
2968         <https://bugs.webkit.org/show_bug.cgi?id=21596>
2969
2970         Reviewed by Antti.
2971
2972         This patch adds real parsing for Pragma and Cache-Control headers
2973         based on RFC 2616, Sections 2, 14.9 and 14.32.  It also adds some
2974         new String and StringImpl methods to assist with the parsing.
2975
2976         * loader/Cache.cpp:
2977         (WebCore::Cache::dumpStats): Added.  Convenience method for dumping
2978         stats outside of Safari.
2979         * loader/Cache.h: Declared dumpStats().
2980
2981         * loader/CachedResource.cpp:
2982         (WebCore::CachedResource::mustRevalidate): Updated to use
2983         ResourceResponseBase::cacheControlDirectives() instead of substring
2984         matching of the entire Cache-Control header.
2985
2986         * loader/loader.cpp:
2987         (WebCore::Loader::Host::didReceiveResponse): Used the local
2988         'resource' variable instead of 'request->cachedResource()'.
2989
2990         * platform/network/ResourceResponseBase.cpp:
2991         (WebCore::ResourceResponseBase::setHTTPHeaderField): Set
2992         m_haveParsedCacheControlHeader to false when a "Cache-Control"
2993         header is set.  Ditto for m_haveParsedPragmaHeader and "Pragma".
2994         (WebCore::ResourceResponseBase::parsePragmaDirectives): Added.
2995         Provides parsed Pragma header directives.
2996         (WebCore::ResourceResponseBase::parseCacheControlDirectives): Added.
2997         Provides parsed Cache-Control header directives.
2998         (WebCore::isCacheHeaderSeparator): Added.  Returns true if a
2999         character is a separator character per RFC 2616, Section 2.2, else
3000         returns false.
3001         (WebCore::isControlCharacter): Added.  Returns true if a character
3002         is a control character per RFC 2616 Section 2.2, else returns false.
3003         (WebCore::trimToNextSeparator): Added.  Returns a string truncated
3004         at the first separator character per isCacheHeaderSeparator().
3005         (WebCore::parseCacheHeader): Added.  This is the main parsing
3006         routine for both Cache-Control and Pragma headers.
3007         (WebCore::parseCacheControlDirectiveValues): Added.  This splits
3008         certain Cache-Control directive values into a vector of strings.
3009         * platform/network/ResourceResponseBase.h:
3010         (WebCore::CacheControlDirectiveMap): Added.  Typedef for a parsed
3011         Cache-Control header.
3012         (WebCore::PragmaDirectiveMap): Added.  Typedef for a parsed Pragma
3013         header.
3014         (WebCore::ResourceResponseBase::parsePragmaDirectives): Added
3015         declaration.
3016         (WebCore::ResourceResponseBase::parseCacheControlDirectives): Ditto.
3017         (WebCore::ResourceResponseBase::m_haveParsedCacheControlHeader):
3018         Added.  Boolean to describe when the "Cache-Control" header needs to
3019         be reparsed.
3020         (WebCore::ResourceResponseBase::m_haveParsedPragmaHeader):  Added.
3021         Boolean to describe when the "Pragma" header needs to be reparsed.
3022         (WebCore::ResourceResponseBase::m_cacheControlDirectiveMap): Added.
3023         Cached map to hold parsed "Cache-Control" headers.
3024         (WebCore::ResourceResponseBase::m_pragmaDirectiveMap): Added.
3025         Cached map to hold parsed "Pragma" headers.
3026
3027         * platform/text/PlatformString.h:
3028         (WebCore::String::find): Added.  Returns the first match based on
3029         the character-matching function pointer passed in.
3030         (WebCore::String::removeCharacters): Added declaration.
3031         (WebCore::find): Added.  Inline method that takes a character-
3032         matching function pointer.  Called by StringImpl::find().
3033         * platform/text/String.cpp:
3034         (WebCore::String::removeCharacters): Added.  Calls
3035         StringImpl::removeCharacters().
3036         * platform/text/StringImpl.cpp:
3037         (WebCore::StringImpl::removeCharacters): Added.  Returns a string
3038         with all characters removed that match the character-matching
3039         function pointer passed in.  If there is no change to the string, it
3040         returns itself.  Based heavily on StringImpl::simplifyWhitespace().
3041         (WebCore::StringImpl::find): Added.  Calls WebCore::find().
3042         * platform/text/StringImpl.h:
3043         (WebCore::FindMatchFunctionPtr): Added.  Typedef for a character-
3044         matching function pointer.
3045         (WebCore::StringImpl::removeCharacters): Added declaration.
3046         (WebCore::StringImpl::find): Ditto.
3047
3048 2008-11-05  Justin Garcia  <justin.garcia@apple.com>
3049
3050         Reviewed by Beth Dakin.
3051
3052         <rdar://problem/5480736> In Mail and Gmail, copied indented text pastes with line break
3053         
3054         As a rule, we don't allow merges out of blockquotes.  In the bug, we are inserting a text node 
3055         between two blockquotes.  Because the start merge moves the text node into a blockquote, when we
3056         determine whether or not we should do the end merge, it incorrectly appears as though the end merge 
3057         is merging out of a blockquote.  The fix is to determine whether or not we should do the end merge
3058         before we do the start merge, so that the start merge doesn't effect our decision.
3059
3060         * editing/ReplaceSelectionCommand.cpp:
3061         (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand): Initialize the new boolean.
3062         (WebCore::ReplaceSelectionCommand::mergeEndIfNeeded): Moved code from doApply() here for clarity.
3063         (WebCore::ReplaceSelectionCommand::doApply): Set m_shouldMergeEnd before we do the start merge.
3064         * editing/ReplaceSelectionCommand.h: Added m_shouldMergeEnd.
3065
3066 2008-11-05  Cameron Zwarich  <zwarich@apple.com>
3067
3068         Not reviewed.
3069
3070         Speculatively fix the Windows build, even though these changes may not
3071         actually matter for anything in the build, because the Windows bots are
3072         behind.
3073
3074         * WebCore.vcproj/WebCore.vcproj:
3075
3076 2008-11-05  Cameron Zwarich  <zwarich@apple.com>
3077
3078         Not reviewed.
3079
3080         Fix the Qt build.
3081
3082         * bridge/qt/qt_class.cpp:
3083         * bridge/qt/qt_runtime.h:
3084
3085 2008-11-05  Cameron Zwarich  <zwarich@apple.com>
3086
3087         Rubber-stamped by Sam Weinig.
3088
3089         Move more files to the runtime subdirectory of JavaScriptCore.
3090
3091         * ForwardingHeaders/kjs/collector.h: Removed.
3092         * ForwardingHeaders/kjs/completion.h: Removed.
3093         * ForwardingHeaders/kjs/identifier.h: Removed.
3094         * ForwardingHeaders/kjs/interpreter.h: Removed.
3095         * ForwardingHeaders/kjs/lookup.h: Removed.
3096         * ForwardingHeaders/kjs/operations.h: Removed.
3097         * ForwardingHeaders/kjs/protect.h: Removed.
3098         * ForwardingHeaders/kjs/ustring.h: Removed.
3099         * ForwardingHeaders/runtime/Collector.h: Copied from ForwardingHeaders/kjs/collector.h.
3100         * ForwardingHeaders/runtime/Completion.h: Copied from ForwardingHeaders/kjs/completion.h.
3101         * ForwardingHeaders/runtime/Identifier.h: Copied from ForwardingHeaders/kjs/identifier.h.
3102         * ForwardingHeaders/runtime/Interpreter.h: Copied from ForwardingHeaders/kjs/interpreter.h.
3103         * ForwardingHeaders/runtime/Lookup.h: Copied from ForwardingHeaders/kjs/lookup.h.
3104         * ForwardingHeaders/runtime/Operations.h: Copied from ForwardingHeaders/kjs/operations.h.
3105         * ForwardingHeaders/runtime/Protect.h: Copied from ForwardingHeaders/kjs/protect.h.
3106         * ForwardingHeaders/runtime/UString.h: Copied from ForwardingHeaders/kjs/ustring.h.
3107         * bindings/js/GCController.cpp:
3108         * bindings/js/JSCustomPositionCallback.h:
3109         * bindings/js/JSCustomPositionErrorCallback.h:
3110         * bindings/js/JSCustomSQLStatementCallback.h:
3111         * bindings/js/JSCustomSQLStatementErrorCallback.h:
3112         * bindings/js/JSCustomSQLTransactionErrorCallback.h:
3113         * bindings/js/JSCustomVoidCallback.h:
3114         * bindings/js/JSDOMBinding.h:
3115         * bindings/js/JSDOMWindowBase.h:
3116         * bindings/js/JSEventListener.h:
3117         * bindings/js/ScheduledAction.h:
3118         * bindings/js/ScriptController.cpp:
3119         * bindings/js/ScriptController.h:
3120         * bindings/objc/WebScriptObject.mm:
3121         * bindings/scripts/CodeGeneratorJS.pm:
3122         * bridge/NP_jsobject.cpp:
3123         * bridge/c/c_class.cpp:
3124         * bridge/jni/jni_class.cpp:
3125         * bridge/jni/jni_jsobject.mm:
3126         * bridge/npruntime.cpp:
3127         * bridge/runtime_root.h:
3128         * history/CachedPage.h:
3129         * html/CanvasRenderingContext2D.cpp:
3130         * html/HTMLCanvasElement.cpp:
3131         * inspector/InspectorController.cpp:
3132         * inspector/JavaScriptCallFrame.cpp:
3133         * page/Console.cpp:
3134         * page/Page.cpp:
3135         * platform/text/AtomicString.cpp:
3136         * platform/text/PlatformString.h:
3137
3138 2008-11-05  Sam Weinig  <sam@webkit.org>
3139
3140         Reviewed by Anders Carlsson.
3141
3142         Fix https://bugs.webkit.org/show_bug.cgi?id=22085
3143         The Plugin JS object should expose item() and namedItem() methods to match Firefox
3144
3145         * bindings/js/JSPluginCustom.cpp:
3146         (WebCore::JSPlugin::nameGetter):
3147         * plugins/Plugin.cpp:
3148         (WebCore::Plugin::namedItem):
3149         * plugins/Plugin.h:
3150         * plugins/Plugin.idl:
3151
3152 2008-11-05  Alexey Proskuryakov  <ap@webkit.org>
3153
3154         Reviewed by Maciej Stachowiak.
3155
3156         https://bugs.webkit.org/show_bug.cgi?id=21060
3157         Range#surroundContents incorrectly throws BAD_BOUNDARYPOINTS_ERR
3158
3159         Test: fast/dom/Range/surroundContents-check-boundary-points.html
3160
3161         * dom/Range.cpp: (WebCore::Range::surroundContents): Fix BAD_BOUNDARYPOINTS_ERR checks.
3162
3163 2008-11-05  Anders Carlsson  <andersca@apple.com>
3164
3165         Reviewed by Dan Bernstein.
3166
3167         Remove two global destructors from CoreTextController.
3168         
3169         * platform/graphics/mac/CoreTextController.cpp:
3170         (WebCore::CoreTextController::collectCoreTextRunsForCharacters):
3171
3172 2008-11-05  Darin Fisher  <darin@chromium.org>
3173
3174         Reviewed by Darin Adler.
3175
3176         CRASH at Scrollbar::invalidateRect due to null m_client
3177         https://bugs.webkit.org/show_bug.cgi?id=22080
3178
3179         * platform/Scrollbar.cpp:
3180         (WebCore::Scrollbar::isWindowActive):
3181         (WebCore::Scrollbar::invalidateRect):
3182
3183 2008-11-04  Sam Weinig  <sam@webkit.org>
3184
3185         Reviewed by Simon Hausmann.
3186
3187         Fix https://bugs.webkit.org/show_bug.cgi?id=21648
3188         navigator.mimeTypes and navigator.plugins don't expose item and namedItem to JS
3189
3190         - Also adds constructors for Plugin, PluginArray, MimeType and MimeTypeArray.
3191
3192         * bindings/js/JSMimeTypeArrayCustom.cpp:
3193         (WebCore::JSMimeTypeArray::nameGetter):
3194         * bindings/js/JSPluginArrayCustom.cpp:
3195         (WebCore::JSPluginArray::nameGetter):
3196         * page/DOMWindow.idl:
3197         * plugins/MimeType.idl:
3198         * plugins/MimeTypeArray.cpp:
3199         (WebCore::MimeTypeArray::namedItem):
3200         * plugins/MimeTypeArray.h:
3201         * plugins/MimeTypeArray.idl:
3202         * plugins/Plugin.idl:
3203         * plugins/PluginArray.cpp:
3204         (WebCore::PluginArray::namedItem):
3205         * plugins/PluginArray.h:
3206         * plugins/PluginArray.idl:
3207
3208 2008-11-05  Steve Falkenburg  <sfalken@apple.com>
3209
3210         Build fix.
3211
3212         * plugins/PluginPackage.cpp:
3213
3214 2008-11-05  Jeff Cook  <cookiecaper@gmail.com>
3215
3216         Reviewed by Simon Hausmann and Tor Arne.
3217
3218         Fix crash in the Qt port when unloading swfdec and Flash 10
3219         by reordering window destruction and plugin stop.
3220
3221         See https://bugs.webkit.org/show_bug.cgi?id=20779
3222
3223         * plugins/qt/PluginViewQt.cpp:
3224         (WebCore::PluginView::stop):
3225
3226 2008-11-05  Simon Hausmann  <hausmann@webkit.org>
3227
3228         Reviewed by Tor Arne Vestbø
3229
3230         Fix loading of Flash 10 in the Qt port by faking the toolkit to be Gtk.
3231
3232         Otherwise Flash refuses to load and function :(
3233
3234         * plugins/PluginPackage.cpp:
3235         (WebCore::PluginPackage::determineQuirks):
3236         * plugins/PluginQuirkSet.h:
3237         (WebCore::):
3238         * plugins/qt/PluginViewQt.cpp:
3239         (WebCore::PluginView::getValue):
3240
3241 2008-11-05  Simon Hausmann  <hausmann@webkit.org>
3242
3243         Reviewed by Tor Arne Vestbø
3244
3245         Unify determineQuirks between the Qt and the Gtk PluginPackage.
3246         Share the code for parsing the module version from the description.
3247         This is currently used to determine Flash based quirks.
3248
3249         * plugins/PluginPackage.cpp:
3250         (WebCore::PluginPackage::createPackage):
3251         (WebCore::PluginPackage::determineQuirks):
3252         (WebCore::PluginPackage::determineModuleVersionFromDescription):
3253         * plugins/PluginPackage.h:
3254         * plugins/gtk/PluginPackageGtk.cpp:
3255         (WebCore::PluginPackage::fetchInfo):
3256         * plugins/qt/PluginPackageQt.cpp:
3257         (WebCore::PluginPackage::fetchInfo):
3258
3259 2008-11-04  Cameron Zwarich  <zwarich@apple.com>
3260
3261         Rubber-stamped by Sam Weinig.
3262
3263         Move kjs/dtoa.h to the wtf subdirectory of JavaScriptCore.
3264
3265         * ForwardingHeaders/kjs/dtoa.h: Removed.
3266         * ForwardingHeaders/wtf/dtoa.h: Copied from ForwardingHeaders/kjs/dtoa.h.
3267         * css/CSSParser.cpp:
3268         * platform/text/String.cpp:
3269         * platform/text/StringImpl.cpp:
3270
3271 2008-11-04  Jonathan Haas  <myrdred@gmail.com>
3272
3273         Addiitonal tweaks and patch prep by Pamela Greene <pam@chromium.org>
3274
3275         Reviewed by Darin Adler.
3276
3277         Fixed an issue which could cause memory corruption using ToT libxml.
3278         See https://bugs.webkit.org/show_bug.cgi?id=15715
3279
3280         Test: fast/xsl/xslt-nested-stylesheets.xml
3281
3282         * xml/XSLImportRule.cpp:
3283         (WebCore::XSLImportRule::setXSLStyleSheet): Set parent rather than owner document
3284         * xml/XSLStyleSheet.cpp:
3285         (WebCore::XSLStyleSheet::XSLStyleSheet): Initialize m_parentStyleSheet
3286         (WebCore::XSLStyleSheet::parseString): Make all child stylesheets use parent's dictionary
3287         (WebCore::XSLStyleSheet::setParentStyleSheet): Added
3288         * xml/XSLStyleSheet.h: Added m_parentStyleSheet member
3289
3290 2008-11-04  Simon Fraser  <simon.fraser@apple.com>
3291
3292         No review.
3293
3294         Improved buid fix: include MathExtras.h to get roundf on all platforms.
3295
3296         * platform/graphics/FloatPoint.h:
3297
3298 2008-11-04  Brady Eidson  <beidson@apple.com>
3299
3300         Reviewed by John Sullivan
3301
3302         Add a simple "visited" method to HistoryItem for use by global history
3303
3304         * WebCore.base.exp:
3305
3306         * history/HistoryItem.cpp:
3307         (WebCore::HistoryItem::visited):  Update the title on the item, set last visited time,
3308           and bump the visit count.  All things that should happen when a url is visited again!
3309         * history/HistoryItem.h:
3310
3311 2008-11-04  Jan Michael Alonzo  <jmalonzo@webkit.org>
3312
3313         Build fix. Not reviewed.
3314
3315         * platform/graphics/FloatPoint.h: include math.h.
3316         reported by zdobersek in #webkit.
3317
3318 2008-11-04  Darin Fisher  <darin@chromium.org>
3319  
3320         Reviewed by Anders Carlsson.
3321  
3322         No need to clobber all ResourceRequest fields in FrameLoader::reload()
3323         https://bugs.webkit.org/show_bug.cgi?id=21949
3324  
3325         * loader/FrameLoader.cpp:
3326         (WebCore::FrameLoader::reload):
3327
3328 2008-11-04  Darin Adler  <darin@apple.com>
3329
3330         Reviewed by Tim Hatcher.
3331
3332         * storage/Database.cpp:
3333         (WebCore::databaseVersionKey): Tweaked formatting.
3334
3335 2008-11-03  Darin Adler  <darin@apple.com>
3336
3337         Reviewed by Tim Hatcher.
3338
3339         - https://bugs.webkit.org/show_bug.cgi?id=22061
3340           create script to check for exit-time destructors
3341
3342         * WebCore.xcodeproj/project.pbxproj: Added a script
3343         phase that runs the check-for-exit-time-destructors script.
3344
3345         * html/HTMLAttributeNames.in: Removed some unused attribute names.
3346
3347         * html/HTMLEmbedElement.cpp:
3348         (WebCore::HTMLEmbedElement::parseMappedAttribute): Removed code that
3349         sets the write-only m_pluginPage.
3350         * html/HTMLEmbedElement.h: Ditto.
3351
3352         * platform/mac/CursorMac.mm:
3353         (WebCore::leakNamedCursor): Changed to return a Cursor&.
3354         (WebCore::pointerCursor): Changed to leak an object to avoid an
3355         exit-time destructor.
3356         (WebCore::crossCursor): Ditto.
3357         (WebCore::handCursor): Ditto.
3358         (WebCore::moveCursor): Ditto.
3359         (WebCore::verticalTextCursor): Ditto.
3360         (WebCore::cellCursor): Ditto.
3361         (WebCore::contextMenuCursor): Ditto.
3362         (WebCore::aliasCursor): Ditto.
3363         (WebCore::zoomInCursor): Ditto.
3364         (WebCore::zoomOutCursor): Ditto.
3365         (WebCore::copyCursor): Ditto.
3366         (WebCore::noneCursor): Ditto.
3367         (WebCore::progressCursor): Ditto.
3368         (WebCore::noDropCursor): Ditto.
3369         (WebCore::notAllowedCursor): Ditto.
3370         (WebCore::iBeamCursor): Ditto.
3371         (WebCore::waitCursor): Ditto.
3372         (WebCore::helpCursor): Ditto.
3373         (WebCore::eastResizeCursor): Ditto.
3374         (WebCore::northResizeCursor): Ditto.
3375         (WebCore::northEastResizeCursor): Ditto.
3376         (WebCore::northWestResizeCursor): Ditto.
3377         (WebCore::southResizeCursor): Ditto.
3378         (WebCore::southEastResizeCursor): Ditto.
3379         (WebCore::southWestResizeCursor): Ditto.
3380         (WebCore::westResizeCursor): Ditto.
3381         (WebCore::northSouthResizeCursor): Ditto.
3382         (WebCore::eastWestResizeCursor): Ditto.
3383         (WebCore::northEastSouthWestResizeCursor): Ditto.
3384         (WebCore::northWestSouthEastResizeCursor): Ditto.
3385         (WebCore::columnResizeCursor): Ditto.
3386         (WebCore::rowResizeCursor): Ditto.
3387         (WebCore::grabCursor): Ditto.
3388         (WebCore::grabbingCursor): Ditto.
3389
3390         * storage/Database.cpp:
3391         (WebCore::guidMutex): Changed to leak an object to avoid an
3392         exit-time destructor. Also added a comment explaining why it's
3393         thread safe.
3394         (WebCore::guidToVersionMap): Ditto.
3395         (WebCore::guidToDatabaseMap): Ditto.
3396         (WebCore::Database::databaseInfoTableName): Ditto.
3397         (WebCore::databaseVersionKey): Ditto.
3398         (WebCore::Database::getVersionFromDatabase): Ditto.
3399         (WebCore::Database::setVersionInDatabase): Ditto.
3400         (WebCore::guidForOriginAndName): Ditto.
3401         * storage/DatabaseTracker.cpp:
3402         (WebCore::DatabaseTracker::tracker): Ditto.
3403         (WebCore::notificationMutex): Ditto.
3404         (WebCore::notificationQueue): Ditto.
3405         (WebCore::DatabaseTracker::notifyDatabasesChanged): Ditto.
3406
3407 2008-11-04  Simon Fraser  <simon.fraser@apple.com>
3408
3409         Reviewed by Dave Hyatt
3410
3411         https://bugs.webkit.org/show_bug.cgi?id=21941
3412
3413         Rename absolutePosition() to localToAbsolute(), and add the ability
3414         to optionally take transforms into account (which will eventually be the
3415         default behavior).
3416
3417         * WebCore.base.exp:
3418         * WebCore.xcodeproj/project.pbxproj:
3419         * dom/ContainerNode.cpp:
3420         (WebCore::ContainerNode::getUpperLeftCorner):
3421         (WebCore::ContainerNode::getLowerRightCorner):
3422         (WebCore::ContainerNode::getRect):
3423         * dom/ContainerNode.h:
3424         * dom/MouseRelatedEvent.cpp:
3425         (WebCore::MouseRelatedEvent::receivedTarget):
3426         * dom/Node.cpp:
3427         (WebCore::Node::getRect):
3428         * editing/SelectionController.cpp:
3429         (WebCore::SelectionController::layout):
3430         (WebCore::SelectionController::caretRect):
3431         * editing/visible_units.cpp:
3432         (WebCore::previousLinePosition):
3433         (WebCore::nextLinePosition):
3434         * html/HTMLAnchorElement.cpp:
3435         (WebCore::HTMLAnchorElement::isKeyboardFocusable):
3436         (WebCore::HTMLAnchorElement::defaultEventHandler):
3437         * html/HTMLAreaElement.cpp:
3438         (WebCore::HTMLAreaElement::getRect):
3439         * html/HTMLImageElement.cpp:
3440         (WebCore::HTMLImageElement::x):
3441         (WebCore::HTMLImageElement::y):
3442         * html/HTMLInputElement.cpp:
3443         (WebCore::HTMLInputElement::defaultEventHandler):
3444         * html/HTMLInputElement.h:
3445         * page/AccessibilityRenderObject.cpp:
3446         (WebCore::AccessibilityRenderObject::boundingBoxRect):
3447         * page/EventHandler.cpp:
3448         (WebCore::EventHandler::handleDrag):
3449         * platform/graphics/FloatPoint.h:
3450         (WebCore::roundedIntPoint):
3451         * platform/graphics/IntSize.h:
3452         (WebCore::IntSize::expand):
3453         * rendering/LayoutState.cpp:
3454         (WebCore::LayoutState::LayoutState):
3455         * rendering/RenderBlock.cpp:
3456         (WebCore::RenderBlock::layoutBlock):
3457         (WebCore::RenderBlock::paintObject):
3458         (WebCore::RenderBlock::selectionGapRects):
3459         (WebCore::RenderBlock::fillBlockSelectionGaps):
3460         (WebCore::RenderBlock::nodeAtPoint):
3461         (WebCore::RenderBlock::positionForCoordinates):
3462         * rendering/RenderBox.cpp:
3463         (WebCore::RenderBox::localToAbsolute):
3464         (WebCore::RenderBox::computeAbsoluteRepaintRect):
3465         (WebCore::RenderBox::caretRect):
3466         * rendering/RenderBox.h:
3467         (WebCore::RenderBox::relativePositionOffset):
3468         * rendering/RenderContainer.cpp:
3469         (WebCore::RenderContainer::addLineBoxRects):
3470         * rendering/RenderFlow.cpp:
3471         (WebCore::RenderFlow::absoluteClippedOverflowRect):
3472         (WebCore::RenderFlow::caretRect):
3473         (WebCore::RenderFlow::addFocusRingRects):
3474         * rendering/RenderLayer.cpp:
3475         (WebCore::RenderLayer::updateLayerPosition):
3476         (WebCore::RenderLayer::convertToLayerCoords):
3477         (WebCore::RenderLayer::addScrolledContentOffset):
3478         (WebCore::RenderLayer::subtractScrolledContentOffset):
3479         (WebCore::RenderLayer::scrollRectToVisible):
3480         * rendering/RenderLayer.h:
3481         (WebCore::RenderLayer::scrolledContentOffset):
3482         (WebCore::RenderLayer::relativePositionOffset):
3483         * rendering/RenderListBox.cpp:
3484         (WebCore::RenderListBox::panScroll):
3485         (WebCore::RenderListBox::scrollToward):
3486         * rendering/RenderListMarker.cpp:
3487         (WebCore::RenderListMarker::selectionRect):
3488         * rendering/RenderObject.cpp:
3489         (WebCore::RenderObject::absoluteBoundingBoxRect):
3490         (WebCore::RenderObject::computeAbsoluteRepaintRect):
3491         (WebCore::RenderObject::localToAbsolute):
3492         (WebCore::RenderObject::addDashboardRegions):
3493         (WebCore::RenderObject::absoluteContentBox):
3494         (WebCore::RenderObject::absoluteOutlineBox):
3495         * rendering/RenderObject.h:
3496         (WebCore::RenderObject::localToAbsoluteForContent):
3497         * rendering/RenderPart.cpp:
3498         (WebCore::RenderPart::updateWidgetPosition):
3499         * rendering/RenderReplaced.cpp:
3500         (WebCore::RenderReplaced::selectionRect):
3501         * rendering/RenderSVGInlineText.cpp:
3502         (WebCore::RenderSVGInlineText::computeAbsoluteRectForRange):
3503         * rendering/RenderSVGText.cpp:
3504         (WebCore::RenderSVGText::absoluteRects):
3505         * rendering/RenderTableCell.cpp:
3506         (WebCore::RenderTableCell::localToAbsolute):
3507         * rendering/RenderTableCell.h:
3508         * rendering/RenderText.cpp:
3509         (WebCore::RenderText::addLineBoxRects):
3510         (WebCore::RenderText::caretRect):
3511         (WebCore::RenderText::selectionRect):
3512         * rendering/RenderVideo.cpp:
3513         (WebCore::RenderVideo::updatePlayer):
3514         * rendering/RenderView.cpp:
3515         (WebCore::RenderView::localToAbsolute):
3516         * rendering/RenderView.h:
3517         * rendering/RenderWidget.cpp:
3518         (WebCore::RenderWidget::updateWidgetPosition):
3519         * svg/SVGSVGElement.cpp:
3520         (WebCore::SVGSVGElement::getScreenCTM):
3521
3522 2008-11-03  Yael Aharon  <yael.aharon@nokia.com>
3523
3524         Reviewed by Simon Hausmann.
3525
3526         Add methods for getting and setting user data on History Item.
3527         This change is limited to QT port only. Tests were added in
3528         the patch for https://bugs.webkit.org/show_bug.cgi?id=21864.
3529
3530         Minor change by Simon: made the functions inline and added a missing
3531         const.
3532
3533         * history/HistoryItem.h:
3534
3535 2008-11-01  Alexey Proskuryakov  <ap@webkit.org>
3536
3537         Reviewed by Darin Adler.
3538
3539         https://bugs.webkit.org/show_bug.cgi?id=22030
3540         Make EventNames usable from multiple threads
3541
3542         * platform/text/AtomicString.cpp:
3543         (WebCore::stringTable):
3544         (WebCore::AtomicString::add):
3545         (WebCore::AtomicString::remove):
3546         (WebCore::AtomicString::find):
3547         (WebCore::AtomicString::init):
3548         * platform/text/AtomicString.h:
3549         Atomic string table is now per-thread. Individual strings cannot be shared between threads,
3550         so global AtomicString constants cannot be used from threads other than the main one.
3551
3552         * dom/EventNames.cpp:
3553         (WebCore::EventNames::EventNames):
3554         (WebCore::eventNames):
3555         (WebCore::EventNames::init):
3556         * dom/EventNames.h:
3557         Made EventNames a ThreadSpecific struct. Individual event names are now accessed as
3558         eventNames().fooEvent, not EventNames::fooEvent. This makes EventNames usable from all
3559         threads.
3560
3561         * WebCore.base.exp:
3562         * bindings/js/JSDOMWindowBase.cpp:
3563         * bindings/js/JSEventListener.cpp:
3564         * bindings/js/ScriptController.cpp:
3565         (WebCore::ScriptController::processingUserGesture):
3566         * dom/BeforeTextInsertedEvent.cpp:
3567         (WebCore::BeforeTextInsertedEvent::BeforeTextInsertedEvent):
3568         * dom/BeforeUnloadEvent.cpp:
3569         (WebCore::BeforeUnloadEvent::BeforeUnloadEvent):
3570         * dom/CharacterData.cpp:
3571         (WebCore::CharacterData::dispatchModifiedEvent):
3572         * dom/ContainerNode.cpp:
3573         (WebCore::dispatchChildInsertionEvents):
3574         (WebCore::dispatchChildRemovalEvents):
3575         * dom/DedicatedWorker.cpp:
3576         (WebCore::DedicatedWorker::dispatchErrorEvent):
3577         * dom/Document.cpp:
3578         (WebCore::Document::implicitClose):
3579         (WebCore::Document::setFocusedNode):
3580         (WebCore::Document::addListenerTypeIfNeeded):
3581         (WebCore::Document::removeWindowInlineEventListenerForType):
3582         (WebCore::Document::addWindowEventListener):
3583         (WebCore::Document::removeWindowEventListener):
3584         (WebCore::Document::finishedParsing):
3585         * dom/EventTargetNode.cpp:
3586         (WebCore::EventTargetNode::dispatchGenericEvent):
3587         (WebCore::EventTargetNode::dispatchSubtreeModifiedEvent):
3588         (WebCore::EventTargetNode::dispatchWindowEvent):
3589         (WebCore::EventTargetNode::dispatchUIEvent):