005adafee7889a1b92f30d7b0f8efd0e7fbe6844
[WebKit-https.git] / WebCore / ChangeLog
1 2008-04-17  Antti Koivisto  <antti@apple.com>
2
3         Reviewed by Oliver.
4         
5         https://bugs.webkit.org/show_bug.cgi?id=18573
6
7         Implement supplemental transforms and use them for <animateMotion> instead of the transform list.
8         This will allow <animateTransform> and <animateMotion> combine properly.
9
10         * svg/SVGAnimateMotionElement.cpp:
11         (WebCore::SVGAnimateMotionElement::resetToBaseValue):
12         (WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
13         (WebCore::SVGAnimateMotionElement::applyResultsToTarget):
14         * svg/SVGElement.h:
15         (WebCore::SVGElement::supplementalTransform):
16         * svg/SVGStyledTransformableElement.cpp:
17         (WebCore::SVGStyledTransformableElement::animatedLocalTransform):
18         * svg/SVGStyledTransformableElement.h:
19         (WebCore::SVGStyledTransformableElement::supplementalTransform):
20         * svg/SVGTextElement.cpp:
21         (WebCore::SVGTextElement::animatedLocalTransform):
22         * svg/SVGTextElement.h:
23         (WebCore::SVGTextElement::supplementalTransform):
24
25 2008-04-17  Antti Koivisto  <antti@apple.com>
26
27         Reviewed by Oliver.
28
29         Implement calcMode=paced.
30         
31         Tested by SVG testsuite tests
32         animate-elem-11-t.svg
33         animate-elem-15-t.svg
34         animate-elem-82-t.svg
35
36         * svg/SVGAnimateElement.cpp:
37         (WebCore::SVGAnimateElement::calculateDistance):
38         * svg/SVGAnimateElement.h:
39         * svg/SVGAnimateMotionElement.cpp:
40         (WebCore::SVGAnimateMotionElement::calculateDistance):
41         * svg/SVGAnimateMotionElement.h:
42         * svg/SVGAnimateTransformElement.cpp:
43         (WebCore::SVGAnimateTransformElement::calculateDistance):
44         * svg/SVGAnimateTransformElement.h:
45         * svg/SVGAnimationElement.cpp:
46         (WebCore::SVGAnimationElement::calculateKeyTimesForCalcModePaced):
47         (WebCore::SVGAnimationElement::startedActiveInterval):
48         * svg/SVGAnimationElement.h:
49         (WebCore::SVGAnimationElement::calculateDistance):
50
51 2008-04-17  David Hyatt  <hyatt@apple.com>
52
53         Fix a leak in ImageBuffer's clearImage method.
54
55         Reviewed by olliej
56
57         * platform/graphics/ImageBuffer.h:
58         (WebCore::ImageBuffer::clearImage):
59
60 2008-04-17  Antti Koivisto  <antti@apple.com>
61
62         Reviewed by Eric.
63         
64         https://bugs.webkit.org/show_bug.cgi?id=12438
65
66         More SVG animation:
67         
68         - Make multiple additive animations work
69         - Support animating <use> instance trees
70
71         * svg/SVGAnimateColorElement.cpp:
72         (WebCore::SVGAnimateColorElement::SVGAnimateColorElement):
73         * svg/SVGAnimateColorElement.h:
74         
75         Made this AnimateElement subclass. All functionality is now provided by AnimateElement.
76         
77         * svg/SVGAnimateElement.cpp:
78         (WebCore::SVGAnimateElement::determinePropertyType):
79         (WebCore::SVGAnimateElement::calculateAnimatedValue):
80         (WebCore::SVGAnimateElement::calculateFromAndToValues):
81         (WebCore::SVGAnimateElement::calculateFromAndByValues):
82         (WebCore::SVGAnimateElement::resetToBaseValue):
83         (WebCore::SVGAnimateElement::applyResultsToTarget):
84         * svg/SVGAnimateElement.h:
85         * svg/SVGAnimateMotionElement.cpp:
86         (WebCore::SVGAnimateMotionElement::resetToBaseValue):
87         (WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
88         (WebCore::SVGAnimateMotionElement::applyResultsToTarget):
89         * svg/SVGAnimateMotionElement.h:
90         * svg/SVGAnimateTransformElement.cpp:
91         (WebCore::SVGAnimateTransformElement::resetToBaseValue):
92         (WebCore::SVGAnimateTransformElement::calculateAnimatedValue):
93         (WebCore::SVGAnimateTransformElement::calculateFromAndByValues):
94         (WebCore::SVGAnimateTransformElement::applyResultsToTarget):
95         * svg/SVGAnimateTransformElement.h:
96         
97         Switch to new model where
98         - resetToBaseValue() resets the animated value back to the base value
99         - calculateAnimatedValue() computes the value and adds it to the element used for accumulation
100         - applyResultsToTarget() sets the computed value the target element
101         
102         * svg/SVGAnimationElement.cpp:
103         (WebCore::SVGAnimationElement::fromValue):
104         (WebCore::SVGAnimationElement::attributeIsCSS):
105         (WebCore::SVGAnimationElement::targetAttributeIsCSS):
106         (WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue):
107         
108         Update instances too.
109         
110         (WebCore::SVGAnimationElement::startedActiveInterval):
111         (WebCore::SVGAnimationElement::updateAnimation):
112         (WebCore::SVGAnimationElement::endedActiveInterval):
113         * svg/SVGAnimationElement.h:
114         * svg/SVGSVGElement.cpp:
115         (WebCore::SVGSVGElement::SVGSVGElement):
116         * svg/SVGSetElement.cpp:
117         (WebCore::SVGSetElement::SVGSetElement):
118         * svg/SVGSetElement.h:
119         
120         Made this AnimateElement subclass. All functionality is now provided by AnimateElement.
121         
122         * svg/animation/SMILTimeContainer.cpp:
123         (WebCore::SMILTimeContainer::SMILTimeContainer):
124         (WebCore::SMILTimeContainer::unschedule):
125         (WebCore::SMILTimeContainer::updateDocumentOrderIndexes):
126         (WebCore::PriorityCompare::PriorityCompare):
127         (WebCore::PriorityCompare::operator()):
128         (WebCore::SMILTimeContainer::sortByPriority):
129         (WebCore::applyOrderSortFunction):
130         (WebCore::sortByApplyOrder):
131         (WebCore::SMILTimeContainer::baseValueFor):
132         (WebCore::SMILTimeContainer::updateAnimations):
133         * svg/animation/SMILTimeContainer.h:
134         (WebCore::SMILTimeContainer::create):
135         (WebCore::SMILTimeContainer::setDocumentOrderIndexesDirty):
136         
137         Do additive animation with the following steps
138         - sort active animations based on their priority (begin time, document order).
139         - if not yet saved for each (element, attribute) pair save the base value.
140         - lowest priority animation for each (element, attribute) acts as the result element.
141         - animation results are resolved in priority order and results are accumulated to the result element.
142         - after all active animations have been processed the values in result elements are applied to the target elements.
143         
144         * svg/animation/SVGSMILElement.cpp:
145         (WebCore::SVGSMILElement::SVGSMILElement):
146         (WebCore::SVGSMILElement::insertedIntoDocument):
147         
148         Invalidate document order index.
149         
150         (WebCore::SVGSMILElement::attributeName):
151         (WebCore::SVGSMILElement::isInactive):
152         (WebCore::SVGSMILElement::isFrozen):
153         (WebCore::SVGSMILElement::beginListChanged):
154         (WebCore::SVGSMILElement::determineActiveState):
155         (WebCore::SVGSMILElement::isContributing):
156         (WebCore::SVGSMILElement::progress):
157         
158         Take care that animations in frozen state still contribute to the total. Since we now build the result starting
159         from the base value, fill="replace" works magically simply by not contributing anything.
160         
161         * svg/animation/SVGSMILElement.h:
162         (WebCore::SVGSMILElement::previousIntervalBegin):
163         (WebCore::SVGSMILElement::documentOrderIndex):
164         (WebCore::SVGSMILElement::setDocumentOrderIndex):
165
166 2008-04-17  Jon Honeycutt  <jhoneycutt@apple.com>
167
168         Reviewed by mrowe.
169
170         Define HAVE_ACCESSIBILITY in a way that WebKit and WebCore can see it.
171
172         * config.h: Remove HAVE_ACCESSIBILITY.
173         * page/AccessibilityObject.h: Include wtf/Platform.h to pick up
174         HAVE_ACCESSIBILITY.
175
176 2008-04-17  Jon Honeycutt  <jhoneycutt@apple.com>
177
178         Reviewed by aliu.
179
180         * page/AccessibilityObject.cpp:
181         (WebCore::AccessibilityObject::layoutCount): Check isRenderView() before
182         casting to RenderView.
183
184 2008-04-17  Antti Koivisto  <antti@apple.com>
185
186         Reviewed by Oliver.
187         
188         Fix https://bugs.webkit.org/show_bug.cgi?id=18551
189         Bug 18551: REGRESSION (r31801?): Crash in ContainerNode::removedFromDocument on many SVG tests under guard malloc
190         
191         Freeing a RefPtr that is the last ref to the parent from removedFromDocument() is a bad idea.
192
193         Caching the target element is too dangerous, let's simply not do it. Getting it is very cheap anyway.
194
195         * svg/animation/SVGSMILElement.cpp:
196         (WebCore::SVGSMILElement::removedFromDocument):
197         (WebCore::SVGSMILElement::attributeChanged):
198         (WebCore::SVGSMILElement::targetElement):
199         * svg/animation/SVGSMILElement.h:
200
201 2008-04-17  Sam Weinig  <sam@webkit.org>
202
203         Reviewed by Anders Carlsson.
204
205         Autogenerate the XMLHttpRequest javascript binding.
206
207         * GNUmakefile.am:
208         * WebCore.pro:
209         * WebCore.vcproj/WebCore.vcproj:
210         * WebCoreSources.bkl:
211         * DerivedSources.make:
212         * WebCore.xcodeproj/project.pbxproj:
213         * bindings/js/JSDOMWindowBase.cpp:
214         * bindings/js/JSXMLHttpRequest.cpp: Removed.
215         * bindings/js/JSXMLHttpRequest.h: Removed.
216         * bindings/js/JSXMLHttpRequestConstructor.cpp: Added.
217         (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
218         (WebCore::JSXMLHttpRequestConstructor::implementsConstruct):
219         (WebCore::JSXMLHttpRequestConstructor::construct):
220         * bindings/js/JSXMLHttpRequestConstructor.h: Added.
221         (WebCore::JSXMLHttpRequestConstructor::classInfo):
222         * bindings/js/JSXMLHttpRequestCustom.cpp: Added.
223         (WebCore::JSXMLHttpRequest::mark):
224         (WebCore::JSXMLHttpRequest::onreadystatechange):
225         (WebCore::JSXMLHttpRequest::setOnreadystatechange):
226         (WebCore::JSXMLHttpRequest::onload):
227         (WebCore::JSXMLHttpRequest::setOnload):
228         (WebCore::JSXMLHttpRequest::responseXML):
229         (WebCore::JSXMLHttpRequest::open):
230         (WebCore::JSXMLHttpRequest::setRequestHeader):
231         (WebCore::JSXMLHttpRequest::send):
232         (WebCore::JSXMLHttpRequest::getResponseHeader):
233         (WebCore::JSXMLHttpRequest::overrideMimeType):
234         (WebCore::JSXMLHttpRequest::addEventListener):
235         (WebCore::JSXMLHttpRequest::removeEventListener):
236         (WebCore::JSXMLHttpRequest::dispatchEvent):
237         * xml/XMLHttpRequest.cpp:
238         (WebCore::XMLHttpRequest::readyState):
239         (WebCore::XMLHttpRequest::responseText):
240         * xml/XMLHttpRequest.h:
241         * xml/XMLHttpRequest.idl: Added.
242
243 2008-04-17  Brady Eidson  <beidson@apple.com>
244
245         Reviewed by Anders
246
247         The SessionStorage for a Page has to be copied every time a new Page is created.
248
249         I thought I had the right choke point for creating new Pages at FrameLoader::createWindow(),
250         but it just so happens there was another - in the ContextMenuController.
251
252         The *real* choke point for this, then, is in the Chrome itself.
253
254         * loader/FrameLoader.cpp:
255         (WebCore::FrameLoader::createWindow): Don't do the SessionStorage copy here...
256
257         * page/Chrome.cpp:
258         (WebCore::Chrome::createWindow): Do it here, instead!
259
260 2008-04-17  Alice Liu  <alice.liu@apple.com>
261
262         Reviewed by Jon Honeycutt.
263
264         Added some asserts to catch undesirable usage of setWrapper and addChildren.
265         * page/AccessibilityObject.cpp:
266         (WebCore::AccessibilityObject::addChildren):
267         * page/AccessibilityObject.h:
268         (WebCore::AccessibilityObject::setWrapper):
269
270 2008-04-17  Brady Eidson  <beidson@apple.com>
271
272         Reviewed by the Mitzpettel
273
274         Before things get much more intertwined, move away from a global LocalStorage model
275         to a per-PageGroup LocalStorage model.
276
277         * page/DOMWindow.cpp:
278         (WebCore::DOMWindow::localStorage): Get it from the current PageGroup, not the global
279           LocalStorage (which doesn't exist anymore).
280
281         * page/Page.cpp:
282         * page/PageGroup.cpp:
283         (WebCore::PageGroup::localStorage): Create a LocalStorage object on demand.
284         * page/PageGroup.h:
285
286         * storage/LocalStorage.cpp:
287         (WebCore::LocalStorage::LocalStorage): Hold a back pointer to the owning PageGroup.
288         (WebCore::LocalStorage::storageArea):
289         * storage/LocalStorage.h:
290         (WebCore::LocalStorage::create):
291
292         * storage/LocalStorageArea.cpp:
293         (WebCore::LocalStorageArea::LocalStorageArea): Hold a back pointer to the owning LocalStorage.
294         * storage/LocalStorageArea.h:
295         (WebCore::LocalStorageArea::create):
296
297 2008-04-17  Anders Carlsson  <andersca@apple.com>
298
299         Fix indentation.
300         
301         * loader/DocumentLoader.cpp:
302         (WebCore::DocumentLoader::scheduleArchiveLoad):
303
304 2008-04-17  Anders Carlsson  <andersca@apple.com>
305
306         Reviewed by Brady.
307
308         When in the web archive debug mode, don't call didFail immediately. Instead,
309         add the loader to the substitute resource map, but with a null resource, which
310         indicates to substituteResourceDeliveryTimerFired that the load should fail.
311         
312         * loader/DocumentLoader.cpp:
313         (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
314         (WebCore::DocumentLoader::scheduleArchiveLoad):
315         * loader/ResourceLoader.cpp:
316         (WebCore::ResourceLoader::load):
317
318 2008-04-17  Anders Carlsson  <andersca@apple.com>
319
320         Reviewed by Sam.
321
322         Add JS bindings for the DOMApplicationCache object.
323         
324         * bindings/js/JSDOMApplicationCacheCustom.cpp:
325         (WebCore::JSDOMApplicationCache::add):
326         (WebCore::JSDOMApplicationCache::remove):
327         (WebCore::JSDOMApplicationCache::addEventListener):
328         (WebCore::JSDOMApplicationCache::removeEventListener):
329         (WebCore::JSDOMApplicationCache::dispatchEvent):
330         (WebCore::JSDOMApplicationCache::setOnchecking):
331         (WebCore::JSDOMApplicationCache::onchecking):
332         (WebCore::JSDOMApplicationCache::setOnerror):
333         (WebCore::JSDOMApplicationCache::onerror):
334         (WebCore::JSDOMApplicationCache::setOnnoupdate):
335         (WebCore::JSDOMApplicationCache::onnoupdate):
336         (WebCore::JSDOMApplicationCache::setOndownloading):
337         (WebCore::JSDOMApplicationCache::ondownloading):
338         (WebCore::JSDOMApplicationCache::setOnprogress):
339         (WebCore::JSDOMApplicationCache::onprogress):
340         (WebCore::JSDOMApplicationCache::setOnupdateready):
341         (WebCore::JSDOMApplicationCache::onupdateready):
342         (WebCore::JSDOMApplicationCache::setOncached):
343         (WebCore::JSDOMApplicationCache::oncached):
344         (WebCore::JSDOMApplicationCache::mark):
345         * bindings/js/JSDOMWindowCustom.cpp:
346         (WebCore::JSDOMWindow::mark):
347         * bindings/js/JSEventTargetBase.cpp:
348         (WebCore::toJS):
349         * loader/appcache/DOMApplicationCache.idl:
350         * page/DOMWindow.idl:
351
352 2008-04-17 Eric Carlson  <eric.carlson@apple.com> 
353
354         Reviewed by Adele. 
355
356         Fix for <rdar://problem/5861642> QTMovieWin returns uninitialized values
357
358         * platform/graphics/win/QTMovieWin.cpp:
359         (QTMovieWin::rate):
360         (QTMovieWin::setRate):
361         (QTMovieWin::setVolume):
362         (QTMovieWin::getNaturalSize):
363
364 2008-04-17  Marco Barisione  <marco.barisione@collabora.co.uk>
365
366         Reviewed by Alp Toker.
367
368         http://bugs.webkit.org/show_bug.cgi?id=18335
369         Pango font backend unable to display japanese properly
370
371         Different fonts can have different glyph indices, so we need to pass
372         the right font when retrieving a glyph index.
373
374         * platform/graphics/gtk/GlyphPageTreeNodePango.cpp:
375         (WebCore::pango_font_get_glyph): Temporarily override the font in the
376         PangoAnalysis passed to pango_shape.
377
378 2008-04-17  Anders Carlsson  <andersca@apple.com>
379
380         According to Sam and David, it's "topLevel", not "toplevel".
381         
382         * loader/DocumentLoader.cpp:
383         (WebCore::DocumentLoader::topLevelApplicationCache):
384         * loader/DocumentLoader.h:
385         * loader/appcache/DOMApplicationCache.cpp:
386         (WebCore::DOMApplicationCache::associatedCache):
387
388 2008-04-17  Anders Carlsson  <andersca@apple.com>
389
390         Reviewed by Sam.
391
392         Add DOMApplicationCache implementation.
393         
394         * dom/EventNames.h:
395         Add new event names.
396         
397         * dom/EventTarget.cpp:
398         (WebCore::EventTarget::toDOMApplicationCache):
399         * dom/EventTarget.h:
400         Add EventTarget conversion method.
401         
402         * loader/appcache/ApplicationCacheGroup.h:
403         (WebCore::ApplicationCacheGroup::):
404         (WebCore::ApplicationCacheGroup::status):
405         (WebCore::ApplicationCacheGroup::update):
406         (WebCore::ApplicationCacheGroup::newestCache):
407         Add more stubs.
408         
409         * loader/appcache/DOMApplicationCache.cpp:
410         * loader/appcache/DOMApplicationCache.h:
411
412         * page/DOMWindow.cpp:
413         (WebCore::DOMWindow::clear):
414         (WebCore::DOMWindow::applicationCache):
415         * page/DOMWindow.h:
416         (WebCore::DOMWindow::optionalApplicationCache):
417         Add ApplicationCache member.
418         
419 2008-04-17  Anders Carlsson  <andersca@apple.com>
420
421         Build fix.
422
423         * WebCore.vcproj/WebCore.vcproj:
424
425 2008-04-17  Dean Jackson  <dino@apple.com>
426
427         Reviewed by Hyatt.
428
429         Fix for <rdar://problem/5849968> translate method should have Y=0 when only X is present
430
431         Test: fast/css/transform-default-parameter.html
432
433         * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty):
434         translate function with only X parameter now leaves the Y parameter as zero.
435
436 2008-04-17  Anders Carlsson  <andersca@apple.com>
437
438         Reviewed by Sam.
439         
440         Add plumbing for associating document loaders with application caches.
441         
442         * loader/DocumentLoader.cpp:
443         (WebCore::DocumentLoader::DocumentLoader):
444         (WebCore::DocumentLoader::~DocumentLoader):
445         (WebCore::DocumentLoader::originalURL):
446         (WebCore::DocumentLoader::requestURL):
447         (WebCore::DocumentLoader::responseURL):
448         (WebCore::DocumentLoader::responseMIMEType):
449         (WebCore::DocumentLoader::setCandidateApplicationCacheGroup):
450         (WebCore::DocumentLoader::setApplicationCache):
451         (WebCore::DocumentLoader::toplevelApplicationCache):
452         * loader/DocumentLoader.h:
453         (WebCore::DocumentLoader::candidateApplicationCacheGroup):
454         (WebCore::DocumentLoader::applicationCache):
455         * loader/appcache/ApplicationCacheGroup.h:
456         (WebCore::ApplicationCacheGroup::documentLoaderDestroyed):
457
458 2008-04-17  Adam Roben  <aroben@apple.com>
459
460         Fix Bug 18544: REGRESSION (r31951): Two fast/xsl tests crash
461
462         <https://bugs.webkit.org/show_bug.cgi?id=18544>
463
464         r31951 changed XSLTProcessor::parseErrorFunc to expect a Console* as
465         the context parameter. The caller in XSLTProcessor was changed, but
466         the one in XSLStyleSheet was missed.
467
468         Reviewed by Alexey Proskuryakov.
469
470         * xml/XSLStyleSheet.cpp:
471         (WebCore::XSLStyleSheet::parseString): Pass the Console as the context
472         to parseErrorFunc.
473
474 2008-04-17  Adam Roben  <aroben@apple.com>
475
476         Windows build fix after r31981
477
478         * dom/Document.idl: Omit getCSSCanvasContext from the COM bindings.
479
480 2008-04-17  Ariya Hidayat  <ariya.hidayat@trolltech.com>
481
482         Reviewed by Simon.
483
484         Implemented getFileModificationTime and pathGetFileName for the Qt port.
485
486         * platform/qt/FileSystemQt.cpp:
487         (WebCore::getFileModificationTime):
488
489 2008-04-17  Mark Rowe  <mrowe@apple.com>
490
491         Fix the non-Mac builds that I broke with my Mac build fix.
492
493         * css/CSSMutableStyleDeclaration.cpp:
494         (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue): Explicitly use the size_t version of max
495         to avoid making assumptions about sizeof(size_t).
496
497 2008-04-17  Mark Rowe  <mrowe@apple.com>
498
499         Rubber-stamped by Dan Bernstein.
500
501         Fix the Mac build.
502
503         * css/CSSMutableStyleDeclaration.cpp:
504         (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue): Update to use size_t in place of unsigned.
505         * dom/NamedNodeMap.h: Ditto.
506         * page/AccessibilityObject.h: Forward-declare AccessibilityObjectWrapper in the non-Objective-C case too.
507
508 2008-04-16  Jon Honeycutt  <jhoneycutt@apple.com>
509
510         Reviewed by Darin.
511
512         Use size_t instead of unsigned where appropriate.
513
514         * css/CSSValueList.h:
515         * dom/NamedAttrMap.h:
516         * rendering/RenderStyle.h:
517
518 2008-04-15  Jon Honeycutt  <jhoneycutt@apple.com>
519
520         Reviewed by Darin.
521
522         Add some methods to check AccessibilityObject state.
523
524         * page/AccessibilityObject.cpp:
525         (WebCore::AccessibilityObject::AccessibilityObject): Assert that the
526         passed renderer is not null.
527         (WebCore::AccessibilityObject::isPasswordField): Refactored to use early
528         return.
529         (WebCore::AccessibilityObject::isPressed): Return true if this is a
530         button in the pressed state.
531         (WebCore::AccessibilityObject::isIndeterminate): Return true if this is
532         a tri-state checkbox in the indeterminate state.
533         (WebCore::AccessibilityObject::isChecked): True if this is a radio
534         button or checkbox in the checked state.
535         (WebCore::AccessibilityObject::isHovered): True if object is currently
536         under the mouse cursor.
537         (WebCore::AccessibilityObject::isMultiSelect): True if this is a select
538         element capable of multi-select.
539         (WebCore::AccessibilityObject::isReadOnly): False if this object has
540         editable content.
541         (WebCore::AccessibilityObject::isOffScreen): True if this object is not
542         in the visible portion of the view.
543         * page/AccessibilityObject.h: Grouped methods into is-state and is-kind.
544
545 2008-04-15  Jon Honeycutt  <jhoneycutt@apple.com>
546
547         Reviewed by Darin.
548
549         Add AccessibilityObjectWrapper to Windows.
550
551         * WebCore.vcproj/WebCore.vcproj: Add AccessibilityObjectWrapperWin.h
552         * page/AccessibilityObject.h: Include COMPtr.h,
553         AccessibilityObjectWrapperWin.h on Windows. Define wrapper() and
554         setWrapper() if accessibility is present. Add an m_wrapper on Windows.
555         * page/AccessibilityObject.cpp:
556         (WebCore::AccessibilityObject::detach): Clear m_wrapper if
557         accessibility is present.
558         * page/win/AccessibilityObjectWrapperWin.h: Added; defines a wrapper for
559         AccessibilityObjects on Windows.
560         (WebCore::AccessibilityObjectWrapper::attached): Return true if attached
561         to an object.
562         (WebCore::AccessibilityObjectWrapper::accessibilityObject): Return the
563         wrapped object.
564         (WebCore::AccessibilityObjectWrapper::AccessibilityObjectWrapper):
565
566 2008-04-15  Jon Honeycutt  <jhoneycutt@apple.com>
567
568         Reviewed by Darin.
569
570         Add AXObjectCache to Windows.
571
572         * WebCore.vcproj/WebCore.vcproj: Add AXObjectCacheWin.cpp.
573         * page/AXObjectCache.h: Add handleFocusedUIElementChanged definition to
574         non-Mac platforms, and added stub for it. Replace PLATFORM(MAC)
575         conditional with HAVE(ACCESSIBILITY) for stubs.
576         (WebCore::AXObjectCache::enableAccessibility):
577         (WebCore::AXObjectCache::accessibilityEnabled):
578         * page/win/AXObjectCacheWin.cpp: Added; contains stubs for the methods
579         below.
580         (WebCore::AXObjectCache::detachWrapper):
581         (WebCore::AXObjectCache::attachWrapper):
582         (WebCore::AXObjectCache::postNotification):
583         (WebCore::AXObjectCache::postNotificationToElement):
584         * config.h: Define HAVE_ACCESSIBILITY on Mac and Windows.
585
586 2008-04-15  Jon Honeycutt  <jhoneycutt@apple.com>
587
588         Reviewed by Darin.
589
590         * WebCore.vcproj/WebCore.vcproj: Fix path to AXObjectCache.h.
591
592 2008-04-16  Brady Eidson  <beidson@apple.com>
593
594         Reviewed by Darin Adler
595
596         Merge the StorageAreaClient into the StorageArea class itself as pure virtual methods.
597         Add "LocalStorageArea" and "SessionStorageArea" implementations, and have SessionStorage
598         and LocalStorage instantiate the appropriate type of StorageArea object.
599
600         This purpose of this change is because while adding the persistent store to LocalStorage,
601         it became obvious that the client approach wasn't scaling well.  Additionally, a StorageArea
602         backing a local storage area required vastly different data members compared to one backing
603         a session storage area.
604
605         This will be much cleaner going forward.
606
607         * GNUmakefile.am:
608         * WebCore.pro:
609         * WebCore.vcproj/WebCore.vcproj:
610         * WebCore.xcodeproj/project.pbxproj:
611         * WebCoreSources.bkl:
612
613         * storage/LocalStorage.cpp:
614         (WebCore::LocalStorage::storageArea):
615         * storage/LocalStorage.h:
616
617         * storage/LocalStorageArea.cpp: Added.
618         (WebCore::LocalStorageArea::LocalStorageArea):
619         (WebCore::LocalStorageArea::itemChanged):
620         (WebCore::LocalStorageArea::itemRemoved):
621         (WebCore::LocalStorageArea::dispatchStorageEvent):
622         * storage/LocalStorageArea.h: Added.
623         (WebCore::LocalStorageArea::create):
624
625         * storage/SessionStorage.cpp:
626         (WebCore::SessionStorage::copy):
627         (WebCore::SessionStorage::storageArea):
628         * storage/SessionStorage.h:
629
630         * storage/SessionStorageArea.cpp: Added.
631         (WebCore::SessionStorageArea::copy):
632         (WebCore::SessionStorageArea::SessionStorageArea):
633         (WebCore::SessionStorageArea::itemChanged):
634         (WebCore::SessionStorageArea::itemRemoved):
635         (WebCore::SessionStorageArea::dispatchStorageEvent):
636         * storage/SessionStorageArea.h: Added.
637         (WebCore::SessionStorageArea::create):
638         (WebCore::SessionStorageArea::page):
639
640         * storage/StorageArea.cpp:
641         (WebCore::StorageArea::StorageArea):
642         (WebCore::StorageArea::setItem):
643         (WebCore::StorageArea::removeItem):
644         (WebCore::StorageArea::storageMap):
645         * storage/StorageArea.h:
646
647         * storage/StorageAreaClient.h: Removed.
648
649 2008-04-16  David Hyatt  <hyatt@apple.com>
650
651         Add support for the ability to draw directly into CSS images using CanvasRenderingContext2D.
652
653         Reviewed by olliej
654
655         Added fast/canvas/canvas-bg.html
656
657         * GNUmakefile.am:
658         * WebCore.pro:
659         * WebCore.vcproj/WebCore.vcproj:
660         * WebCore.xcodeproj/project.pbxproj:
661         * WebCoreSources.bkl:
662         * css/CSSCanvasValue.cpp: Added.
663         (WebCore::CSSCanvasValue::~CSSCanvasValue):
664         (WebCore::CSSCanvasValue::cssText):
665         (WebCore::CSSCanvasValue::canvasChanged):
666         (WebCore::CSSCanvasValue::canvasResized):
667         (WebCore::CSSCanvasValue::fixedSize):
668         (WebCore::CSSCanvasValue::element):
669         (WebCore::CSSCanvasValue::image):
670         * css/CSSCanvasValue.h: Added.
671         (WebCore::CSSCanvasValue::CSSCanvasValue):
672         (WebCore::CSSCanvasValue::isFixedSize):
673         (WebCore::CSSCanvasValue::setName):
674         * css/CSSGradientValue.cpp:
675         * css/CSSGradientValue.h:
676         * css/CSSImageGeneratorValue.cpp:
677         (WebCore::CSSImageGeneratorValue::generatedImage):
678         * css/CSSImageGeneratorValue.h:
679         (WebCore::CSSImageGeneratorValue::isFixedSize):
680         (WebCore::CSSImageGeneratorValue::fixedSize):
681         * css/CSSParser.cpp:
682         (WebCore::CSSParser::parseContent):
683         (WebCore::CSSParser::parseBackgroundImage):
684         (WebCore::CSSParser::parseBorderImage):
685         (WebCore::CSSParser::parseCanvas):
686         * css/CSSParser.h:
687         * dom/Document.cpp:
688         (WebCore::Document::getCSSCanvasContext):
689         (WebCore::Document::getCSSCanvasElement):
690         * dom/Document.h:
691         * dom/Document.idl:
692         * html/HTMLCanvasElement.cpp:
693         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
694         (WebCore::HTMLCanvasElement::reset):
695         * html/HTMLCanvasElement.h:
696         (WebCore::HTMLCanvasElement::setSize):
697         * rendering/RenderBox.cpp:
698         (WebCore::RenderBox::calculateBackgroundSize):
699         (WebCore::RenderBox::imageChanged):
700         * rendering/RenderBox.h:
701         * rendering/RenderImage.cpp:
702         (WebCore::RenderImage::imageChanged):
703         * rendering/RenderImage.h:
704         (WebCore::RenderImage::imagePtr):
705         (WebCore::RenderImage::intrinsicSizeChanged):
706         * rendering/RenderImageGeneratedContent.h:
707         (WebCore::RenderImageGeneratedContent::imageSize):
708         (WebCore::RenderImageGeneratedContent::imagePtr):
709         * rendering/RenderListMarker.cpp:
710         (WebCore::RenderListMarker::layout):
711         (WebCore::RenderListMarker::imageChanged):
712         (WebCore::RenderListMarker::calcPrefWidths):
713         (WebCore::RenderListMarker::getRelativeMarkerRect):
714         * rendering/RenderListMarker.h:
715         * rendering/RenderObject.cpp:
716         (WebCore::RenderObject::paintBorderImage):
717         (WebCore::RenderObject::imageChanged):
718         * rendering/RenderObject.h:
719         (WebCore::RenderObject::imageChanged):
720         * rendering/RenderSVGImage.cpp:
721         (WebCore::RenderSVGImage::imageChanged):
722         * rendering/RenderSVGImage.h:
723         * rendering/RenderStyle.cpp:
724         (WebCore::StyleCachedImage::imageSize):
725         (WebCore::StyleGeneratedImage::imageSize):
726         * rendering/RenderStyle.h:
727         (WebCore::StyleCachedImage::data):
728         (WebCore::StyleGeneratedImage::StyleGeneratedImage):
729         (WebCore::StyleGeneratedImage::data):
730         (WebCore::StyleGeneratedImage::imageHasRelativeWidth):
731         (WebCore::StyleGeneratedImage::imageHasRelativeHeight):
732         (WebCore::StyleGeneratedImage::usesImageContainerSize):
733         * rendering/RenderTableCol.cpp:
734         (WebCore::RenderTableCol::imageChanged):
735         * rendering/RenderTableCol.h:
736         * rendering/RenderTableRow.cpp:
737         (WebCore::RenderTableRow::imageChanged):
738         * rendering/RenderTableRow.h:
739         * rendering/RenderTableSection.cpp:
740         (WebCore::RenderTableSection::imageChanged):
741         * rendering/RenderTableSection.h:
742
743 2008-04-16  Anders Carlsson  <andersca@apple.com>
744
745         Reviewed by Darin.
746
747         Add manifest parser.
748
749         * loader/appcache/ManifestParser.cpp:
750         (WebCore::):
751         (WebCore::parseManifest):
752         * loader/appcache/ManifestParser.h:
753         * platform/text/CharacterNames.h:
754
755 2008-04-16  Darin Adler  <darin@apple.com>
756
757         Reviewed by Mitz.
758
759         - fix <rdar://problem/5858617> REGRESSION (r21452-Safari 3.1):
760           Safari does not find words containing ß (German letter sharp-s)
761
762         Test: fast/text/find-case-folding.html
763
764         * platform/text/StringImpl.cpp:
765         (WebCore::StringImpl::foldCase):
766         Pass the folded length to foldCase rather than the original string length.
767         Without this, we get an error code every time.
768
769 2008-04-16  Anders Carlsson  <andersca@apple.com>
770
771         Fix build.
772         
773         * loader/appcache/ApplicationCache.cpp:
774         (WebCore::ApplicationCache::ApplicationCache):
775         (WebCore::ApplicationCache::setManifestResource):
776         (WebCore::ApplicationCache::addResource):
777
778 2008-04-16  Anders Carlsson  <andersca@apple.com>
779
780         Reviewed by Darin.
781
782         Add new protocolHostAndPortAreEqual function.
783         
784         * platform/KURL.cpp:
785         (WebCore::KURL::host):
786         (WebCore::KURL::setHost):
787         (WebCore::KURL::setHostAndPort):
788         (WebCore::protocolHostAndPortAreEqual):
789         * platform/KURL.h:
790         (WebCore::KURL::hostStart):
791
792 2008-04-16  Anders Carlsson  <andersca@apple.com>
793
794         Reviewed by Sam.
795         
796         Fix some style nits.
797         
798         * loader/appcache/ApplicationCache.cpp:
799         (WebCore::ApplicationCache::ApplicationCache):
800         (WebCore::ApplicationCache::setManifestResource):
801         (WebCore::ApplicationCache::addResource):
802         (WebCore::ApplicationCache::removeResource):
803         (WebCore::ApplicationCache::dump):
804         * loader/appcache/ApplicationCacheGroup.h:
805
806 2008-04-16  Anders Carlsson  <andersca@apple.com>
807
808         Reviewed by Brady and Sam.
809
810         Add ApplicationCache implementation. Stub out ApplicationCacheGroup methods
811         needed by ApplicationCache.
812         
813         * loader/appcache/ApplicationCache.cpp:
814         (WebCore::ApplicationCache::ApplicationCache):
815         (WebCore::ApplicationCache::~ApplicationCache):
816         (WebCore::ApplicationCache::setManifestResource):
817         (WebCore::ApplicationCache::addResource):
818         (WebCore::ApplicationCache::removeResource):
819         (WebCore::ApplicationCache::resourceForURL):
820         (WebCore::ApplicationCache::resourceForRequest):
821         (WebCore::ApplicationCache::numDynamicEntries):
822         (WebCore::ApplicationCache::dynamicEntry):
823         (WebCore::ApplicationCache::addDynamicEntry):
824         (WebCore::ApplicationCache::removeDynamicEntry):
825         (WebCore::ApplicationCache::setOnlineWhitelist):
826         (WebCore::ApplicationCache::isURLInOnlineWhitelist):
827         (WebCore::ApplicationCache::dump):
828         * loader/appcache/ApplicationCache.h:
829         (WebCore::ApplicationCache::create):
830         (WebCore::ApplicationCache::manifestResource):
831         (WebCore::ApplicationCache::group):
832         (WebCore::ApplicationCache::begin):
833         (WebCore::ApplicationCache::end):
834         * loader/appcache/ApplicationCacheGroup.h:
835         (WebCore::ApplicationCacheGroup::manifestURL):
836         (WebCore::ApplicationCacheGroup::cacheDestroyed):
837
838 2008-04-16  Adam Roben  <aroben@apple.com>
839
840         Fix Bug 18505: REGRESSION: Search is disabled and not functional
841
842         <https://bugs.webkit.org/show_bug.cgi?id=18505>
843
844         Reviewed by Tim Hatcher.
845
846         * page/inspector/ResourcesPanel.js:
847         (WebInspector.ResourcesPanel.sourceFrameForResource): Added.
848         * page/inspector/inspector.css: Added back rules for the search field
849         that were removed in r31736.
850         * page/inspector/inspector.html:
851           - Removed the disabled attribute from the search field
852           - Added back the #searchResults and #searchResultsResizer divs which
853             were removed in r31736
854         * page/inspector/inspector.js:
855         (WebInspector.set showingSearchResults): Updated for class rename
856         panels -> main-panels.
857         (WebInspector.loaded): Added back the mousedown event listener for the
858         search results resizer that was removed in r31736.
859         (WebInspector.searchResultsResizerDrag): Updated for class rename
860         panels -> main-panels.
861         (WebInspector.performSearch):
862           - Changed to use sourceFrameForResource
863           - Changed to use showResource
864           - Changed to save/restore the focused element around the setting of
865             the current panel
866           - Changed to get the source document from the match range instead of
867             by crawling back up to the source view
868           - Changed to bind the onselect handlers to this so that we can
869             access the Elements/Resources panels
870
871 2008-04-16  Brady Eidson  <beidson@apple.com>
872
873         Reviewed by Sam Weinig
874
875         Changing ThreadSafeShared to start with a ref count of 1, so updating all users to
876         adoptRef() that initial reference.
877
878         * bindings/js/JSCustomSQLStatementCallback.h:
879         (WebCore::JSCustomSQLStatementCallback::create):
880         * bindings/js/JSCustomSQLStatementErrorCallback.h:
881         (WebCore::JSCustomSQLStatementErrorCallback::create):
882         * bindings/js/JSCustomSQLTransactionCallback.h:
883         (WebCore::JSCustomSQLTransactionCallback::create):
884         * bindings/js/JSCustomSQLTransactionErrorCallback.h:
885         (WebCore::JSCustomSQLTransactionErrorCallback::create):
886
887         * bindings/js/JSDatabaseCustom.cpp:
888         (WebCore::JSDatabase::changeVersion):
889         (WebCore::JSDatabase::transaction):
890
891         * bindings/js/JSSQLTransactionCustom.cpp:
892         (WebCore::JSSQLTransaction::executeSql):
893
894         * dom/Document.cpp:
895         (WebCore::Document::databaseThread):
896
897         * platform/SecurityOrigin.cpp:
898         (WebCore::SecurityOrigin::create):
899
900         * platform/sql/SQLiteAuthorizer.h:
901         (WebCore::SQLiteAuthorizer::create):
902         (WebCore::SQLiteAuthorizer::SQLiteAuthorizer):
903
904         * storage/ChangeVersionWrapper.cpp:
905         (WebCore::ChangeVersionWrapper::performPreflight):
906         (WebCore::ChangeVersionWrapper::performPostflight):
907         * storage/ChangeVersionWrapper.h:
908         (WebCore::ChangeVersionWrapper::create):
909
910         * storage/Database.cpp:
911         (WebCore::Database::openAndVerifyVersion):
912         (WebCore::Database::markAsDeletedAndClose):
913         (WebCore::Database::changeVersion):
914         (WebCore::Database::transaction):
915         (WebCore::Database::scheduleTransaction):
916         (WebCore::Database::scheduleTransactionStep):
917         (WebCore::Database::tableNames):
918
919         * storage/DatabaseAuthorizer.h:
920         (WebCore::DatabaseAuthorizer::create):
921
922         * storage/DatabaseTask.h:
923         (WebCore::DatabaseOpenTask::create):
924         (WebCore::DatabaseCloseTask::create):
925         (WebCore::DatabaseTransactionTask::create):
926         (WebCore::DatabaseTableNamesTask::create):
927
928         * storage/DatabaseThread.cpp:
929         (WebCore::DatabaseThread::scheduleTask): Change to take a PassRefPtr instead of raw
930         (WebCore::DatabaseThread::scheduleImmediateTask): Ditto
931         * storage/DatabaseThread.h:
932         (WebCore::DatabaseThread::create):
933
934         * storage/SQLError.h:
935         (WebCore::SQLError::create):
936         (WebCore::SQLError::SQLError):
937
938         * storage/SQLResultSet.h:
939         (WebCore::SQLResultSet::create):
940
941         * storage/SQLStatement.cpp:
942         (WebCore::SQLStatement::create):
943         (WebCore::SQLStatement::execute):
944         (WebCore::SQLStatement::setDatabaseDeletedError):
945         (WebCore::SQLStatement::setVersionMismatchedError):
946         (WebCore::SQLStatement::setFailureDueToQuota):
947         * storage/SQLStatement.h:
948
949         * storage/SQLTransaction.cpp:
950         (WebCore::SQLTransaction::create):
951         (WebCore::SQLTransaction::executeSQL):
952         (WebCore::SQLTransaction::openTransactionAndPreflight):
953         (WebCore::SQLTransaction::deliverTransactionCallback):
954         (WebCore::SQLTransaction::handleCurrentStatementError):
955         (WebCore::SQLTransaction::deliverStatementCallback):
956         (WebCore::SQLTransaction::postflightAndCommit):
957         * storage/SQLTransaction.h:
958
959 2008-04-16  Anders Carlsson  <andersca@apple.com>
960
961         Reviewed by Adam and Brady.
962         
963         Add implementation of ApplicationCacheResource.
964         
965         * loader/appcache/ApplicationCacheResource.cpp:
966         (WebCore::ApplicationCacheResource::ApplicationCacheResource):
967         (WebCore::ApplicationCacheResource::dumpType):
968         * loader/appcache/ApplicationCacheResource.h:
969         (WebCore::ApplicationCacheResource::):
970         (WebCore::ApplicationCacheResource::create):
971         (WebCore::ApplicationCacheResource::type):
972         (WebCore::ApplicationCacheResource::addType):
973
974 2008-04-16  Timothy Hatcher  <timothy@apple.com>
975
976         Fixes an issue where the source for a resource that had errors would
977         not be shown because the view was created before the resource load
978         finished. The right view is now created, even if the resource isn't 
979         finished. The SourceView just makes sure to not load the source until
980         the resource is finished. Only if the category changes, does the view
981         need to be recreated.
982
983         Reviewed by Adam Roben.
984
985         * page/inspector/Resource.js:
986         (WebInspector.Resource.prototype.set category): Call recreateViewForResourceIfNeeded.
987         * page/inspector/ResourcesPanel.js:
988         (WebInspector.ResourcesPanel.prototype.recreateViewForResourceIfNeeded):
989         Added. Tries to make a new view, if the view is the same prototype of the
990         previous view, return early. If they differ, close and detach the old view
991         and associate the resource with the new view. Calling updateErrorsAndWarnings
992         is needed, because the errors and warnings that might have been added to the
993         previous view will be lost, so make the tree element match.
994         (WebInspector.Resource.prototype._createResourceView): Always create a view
995         that matches the resource category. Ignore the loading and failed status.
996         * page/inspector/SourceView.js:
997         (WebInspector.SourceView.prototype.setupSourceFrameIfNeeded): Don't setup the
998         frame if the resource hasn't finished or if the load failed.
999
1000 2008-04-16  Timothy Hatcher  <timothy@apple.com>
1001
1002         Adds a console formatter for Error objects. So typing a expression in the
1003         console that ends in an exception will print meaningful info. Also calling
1004         console.{log,error,warn,info} with an error object will output nicely.
1005
1006         Reviewed by Adam Roben.
1007
1008         * page/inspector/Console.js:
1009         (WebInspector.Console.prototype._formaterror): Added. Formats an error
1010         object by showing it like other exceptions, with a clickable file URL.
1011
1012 2008-04-16  Timothy Hatcher  <timothy@apple.com>
1013
1014         Refactors code that updates the errors and warnings count in the
1015         resources sidebar so other functions can easily trigger updates.
1016
1017         Reviewed by Adam Roben.
1018
1019         * page/inspector/ResourcesPanel.js:
1020         (WebInspector.ResourcesPanel.prototype.addMessageToResource): Call updateErrorsAndWarnings.
1021         Removes code that updates the bubbleText and class names.
1022         (WebInspector.ResourcesPanel.prototype.clearMessages): Ditto.
1023         (WebInspector.ResourceSidebarTreeElement.prototype.updateErrorsAndWarnings):
1024         Added. Updates the bubbleText and adds or removes the class names
1025         depending on if the values are zero.
1026
1027 2008-04-16  Antti Koivisto  <antti@apple.com>
1028
1029         Reviewed by Alexey.
1030         
1031         Fix <rdar://problem/5863728>
1032         REGRESSION: Garbage character shown in temperatures in the Weather widget (encoding issue with degree symbol)
1033         
1034         Parse the encoding attribute in PreloadScanner.
1035
1036         Test: fast/encoding/script-preload-encoding.html
1037
1038         * html/PreloadScanner.cpp:
1039         (WebCore::PreloadScanner::processAttribute):
1040         (WebCore::PreloadScanner::emitTag):
1041         (WebCore::PreloadScanner::emitCSSRule):
1042         * html/PreloadScanner.h:
1043         * loader/DocLoader.cpp:
1044         (WebCore::DocLoader::preload):
1045         * loader/DocLoader.h:
1046
1047 2008-04-16  Anders Carlsson  <andersca@apple.com>
1048
1049         Reviewed by Adam.
1050
1051         Generate the DOMApplicationCache JS wrapper, add JSDOMApplicationCacheCustom.cpp and 
1052         fix typos in the #if line.
1053         
1054         * DerivedSources.make:
1055         * WebCore.vcproj/WebCore.vcproj:
1056         * WebCore.xcodeproj/project.pbxproj:
1057         * bindings/js/JSDOMApplicationCacheCustom.cpp: Added.
1058         * loader/appcache/ApplicationCache.cpp:
1059         * loader/appcache/ApplicationCache.h:
1060         * loader/appcache/ApplicationCacheGroup.cpp:
1061         * loader/appcache/ApplicationCacheGroup.h:
1062         * loader/appcache/ApplicationCacheResource.cpp:
1063         * loader/appcache/ApplicationCacheResource.h:
1064         * loader/appcache/DOMApplicationCache.cpp:
1065         * loader/appcache/DOMApplicationCache.h:
1066         * loader/appcache/DOMApplicationCache.idl:
1067         * loader/appcache/ManifestParser.cpp:
1068         * loader/appcache/ManifestParser.h:
1069
1070 2008-04-16  Sam Weinig  <sam@webkit.org>
1071
1072         Reviewed by Geoffrey Garen.
1073
1074         - To keep the behavior of the WebKit and JavaScriptCore API's the same,
1075           we need to hide the fact that the global object and the window object
1076           are no longer the same thing, and the the global object now changes on
1077           navigations.  To do this, only the wrapper should ever be exposed.  This
1078           fixes the two remaining spots where the internal global object is exposed,
1079           the windowScriptObject returned from [WebFrame windowObject] and the object
1080           return by calling JSContextGetGlobalObject on [WebFrame globalContext]
1081
1082         * bindings/js/JSDOMWindowWrapper.cpp:
1083         (WebCore::JSDOMWindowWrapper::putWithAttributes):
1084         * bindings/js/JSDOMWindowWrapper.h:
1085         Forward this new method so that JSObjectSetProperty doesn't set properties on the 
1086         wrapper.
1087
1088         * page/mac/FrameMac.mm:
1089         (WebCore::Frame::windowScriptObject):
1090         Return the wrapper instead of the global object.
1091
1092 2008-04-16  David Hyatt  <hyatt@apple.com>
1093
1094         Eliminate the paintBuffer and drawImage(ImageBuffer*) methods from GraphicsContext* in favor of just
1095         snagging an Image* from the ImageBuffer and drawing that instead.
1096
1097         Enhance canvas with a CanvasObserver so that notifications of dirtying or resizing can be tracked by
1098         a consumer.
1099
1100         Reviewed by olliej
1101
1102         * html/CanvasRenderingContext2D.cpp:
1103         (WebCore::CanvasRenderingContext2D::drawImage):
1104         * html/HTMLCanvasElement.cpp:
1105         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
1106         (WebCore::HTMLCanvasElement::willDraw):
1107         (WebCore::HTMLCanvasElement::reset):
1108         (WebCore::HTMLCanvasElement::paint):
1109         * html/HTMLCanvasElement.h:
1110         (WebCore::CanvasObserver::~CanvasObserver):
1111         (WebCore::HTMLCanvasElement::setSize):
1112         (WebCore::HTMLCanvasElement::setObserver):
1113         * platform/graphics/GraphicsContext.cpp:
1114         (WebCore::GraphicsContext::drawImage):
1115         (WebCore::GraphicsContext::drawTiledImage):
1116         * platform/graphics/GraphicsContext.h:
1117         * platform/graphics/ImageBuffer.h:
1118         (WebCore::ImageBuffer::clearImage):
1119         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1120         * platform/graphics/cg/GraphicsContextCG.cpp:
1121         * platform/graphics/cg/ImageCG.cpp:
1122         (WebCore::BitmapImage::draw):
1123         (WebCore::Image::drawPattern):
1124         * platform/graphics/cg/ImageSourceCG.cpp:
1125         (WebCore::ImageSource::createFrameAtIndex):
1126         * platform/graphics/qt/GraphicsContextQt.cpp:
1127         * platform/graphics/wx/GraphicsContextWx.cpp:
1128
1129 2008-04-16  Steve Falkenburg  <sfalken@apple.com>
1130
1131         Improve timer latency/resolution.
1132                 
1133         The primary timing mechanism is now CreateTimerQueueTimer, with a PostMessage from
1134         the callback proc.  This event will be delivered sooner than if we used SetTimer(),
1135         since it is higher priority than other messages.
1136         
1137         If there is an input message pending, we'll use we SetTimer() based timers to avoid
1138         starving user input.
1139
1140         Don't call PostMessage immediately on all timers < 10ms.  Only call immediately if
1141         timer is already expired.  This avoids the case where no timers would be processed,
1142         causing the timer to be re-posted via the slower SetTimer method.
1143
1144         Don't call PostMessage immediately if there's a pending WM_PAINT, since
1145         we don't want to starve all paints when bombarded with a continuous stream of low
1146         duration timers.
1147
1148         Removed reentrancy check, since we're now looking for specific starvation cases,
1149         and will typically defer non-expired timers through CreateTimerQueueTimer.
1150
1151         The reason Windows wouldn't starve paints in favor of timers with the old code:
1152         When we went to reset the timer when it fired, the timer reset code treated this as a
1153         reentrant timer, causing us to hit the slow SetTimer code rather than calling PostMessage,
1154         even for timers expiring in < 10ms.  I corrected that, exposing the paint starvation problem.
1155
1156         Use timeBeginPeriod/timeEndPeriod to improve resolution of system timers.
1157         Limit this resolution change to within 20ms of the last high resolution timer request.
1158                         
1159         Corrected GetQueueStatus to check for specific input (and paint) messages rather than
1160         checking QS_ALLINPUT.  Contrary to its name, QS_ALLINPUT actually indicates interest
1161         in ALL queued messages, not just input messages.
1162         
1163         Fix SetTimer/KillTimer calls to pass our window handle.
1164
1165         Reviewed by Brady.
1166
1167         * platform/win/SharedTimerWin.cpp:
1168         (WebCore::):
1169         (WebCore::TimerWindowWndProc):
1170         (WebCore::queueTimerProc):
1171         (WebCore::setSharedTimerFireTime):
1172         (WebCore::stopSharedTimer):
1173
1174 2008-04-16  Adam Roben  <aroben@apple.com>
1175
1176         Fix console-log-formatting to truly test formatting an undefined value
1177
1178         Exceptions thrown by the test will also now be shown as errors.
1179
1180         Reviewed by Tim Hatcher.
1181
1182         * manual-tests/inspector/console-log-formatting.html:
1183         (test): Use console.error to report exceptions.
1184         (runTests): Use window.noSuchVariable instead of just noSuchVariable
1185         to avoid an exception.
1186
1187 2008-04-16  Anatoli Papirovski  <apapirovski@mac.com>
1188
1189         Reviewed by David.
1190
1191         Optimized the calculation of background-size.
1192
1193         * rendering/RenderBox.cpp:
1194         (WebCore::RenderBox::calculateBackgroundSize):
1195
1196 2008-04-16  Adam Roben  <aroben@apple.com>
1197
1198         Fix Bug 17228: console.{log,warn,info,error} should support format
1199         strings, variable arguments
1200
1201         <https://bugs.webkit.org/show_bug.cgi?id=17228>
1202         <rdar://problem/5732828>
1203
1204         Reviewed by Tim Hatcher.
1205
1206         Test: manual-tests/inspector/console-log-formatting.html
1207
1208         * page/inspector/Console.js:
1209         (WebInspector.ConsoleMessage): Pass any extra arguments down to
1210         _format.
1211         (WebInspector.ConsoleMessage._format): This method constructs
1212         this.formattedMessage. We treat the first parameter as a format
1213         string. Any parameters that have not been used after substituting into
1214         the format string are concatenated together, separated by spaces.
1215         (WebInspector.ConsoleMessage.toMessageElement): Updated to use
1216         this.formattedMessage.
1217         (WebInspector.ConsoleMessage.toString): Ditto.
1218
1219 2008-04-15  Adam Roben  <aroben@apple.com>
1220
1221         Make String.format return an array of unused substitutions
1222
1223         String.format now returns an object with two properties:
1224         formattedResult and unusedSubstitutions.
1225
1226         Reviewed by Tim Hatcher.
1227
1228         * page/inspector/utilities.js:
1229         (String.vsprintf): Updated for changes to String.format. We throw away
1230         the array of unused substitutions.
1231         (String.format): Changed to keep track of which substitutions are used
1232         when formatting. We then return both the formatted result and the
1233         array of unused substitutions.
1234
1235 2008-04-15  Adam Roben  <aroben@apple.com>
1236
1237         Generalize String.format some more
1238
1239         String.format now takes an initial value and an append function which
1240         it uses to build the result. Each time a token is processed,
1241         append(valueSoFar, newValue) is called.
1242
1243         Reviewed by Tim Hatcher.
1244
1245         * page/inspector/utilities.js:
1246         (String.vsprintf): Pass the empty string for the initial value, and
1247         a function that concatenates two strings as the append function.
1248         (String.format): Use initialValue and append to build the result
1249         instead of only working with strings.
1250
1251 2008-04-15  Adam Roben  <aroben@apple.com>
1252
1253         Add String.format
1254
1255         String.format is a more generic form of String.vsprintf that takes a
1256         set of formatter functions, one for each supported format specifier.
1257         Each formatter function is passed the relevant token and substitution
1258         value, and returns the formatted result.
1259
1260         Reviewed by Tim Hatcher.
1261
1262         * page/inspector/utilities.js:
1263         (String.standardFormatters): Added.
1264         (String.vsprintf): Changed to call through to String.format.
1265         (String.format): Added. Most of the code came from String.vsprintf,
1266         except that we use the passed-in formatters to format the
1267         substitutions rather than hard-coding how to handle each format
1268         specifier.
1269
1270 2008-04-15  Adam Roben  <aroben@apple.com>
1271
1272         Refactor String.vsprintf to separate tokenizing and substituting
1273
1274         This will eventually be useful for the various console methods that
1275         take a format string.
1276
1277         Reviewed by Tim Hatcher.
1278
1279         * page/inspector/utilities.js:
1280         (String.tokenizeFormatString): Added. This uses the format parsing
1281         code from String.vsprintf but just returns an array of "string" and
1282         "specifier" tokens.
1283         (String.vsprintf): Now calls String.tokenizeFormatString and processes
1284         the tokens one at a time.
1285
1286 2008-04-15  Adam Roben  <aroben@apple.com>
1287
1288         Pass all arguments to console.{log,warn,info,error} into the Inspector's JS
1289
1290         Part of Bug 17228: console.{log,warn,info,error} should support format
1291         strings, variable arguments
1292         <http://bugs.webkit.org/show_bug.cgi?id=17228>
1293         <rdar://problem/5732828>
1294
1295         We don't use the extra arguments yet.
1296
1297         Reviewed by Tim Hatcher.
1298
1299         * page/Console.cpp:
1300         (WebCore::Console::error): Pass the arguments list to
1301         InspectorController.
1302         (WebCore::Console::info): Ditto.
1303         (WebCore::Console::log): Ditto.
1304         (WebCore::Console::warn): Ditto.
1305         * page/InspectorController.cpp:
1306         (WebCore::ConsoleMessage::ConsoleMessage): Added a new constructor
1307         that takes an ExecState and a List instead of a String. We wrap and
1308         store the JSValues from the List in a Vector<ProtectedPtr<JSValue> >.
1309         (WebCore::InspectorController::addMessageToConsole): Added an overload
1310         that takes an ExecState and a List.
1311         (WebCore::InspectorController::addConsoleMessage): Moved code here
1312         from addMessageToConsole. Both overloads of addMessageToConsole now
1313         call this helper method.
1314         (WebCore::InspectorController::addScriptConsoleMessage): Updated for
1315         the new parameter order of WebInspector.ConsoleMessage. If the
1316         ConsoleMessage has a non-empty wrappedArguments Vector, we use that
1317         instead of the ConsoleMessage's message String.
1318         * page/InspectorController.h:
1319         * page/inspector/Console.js:
1320         (WebInspector.ConsoleMessage): Removed the explicit message parameter.
1321         We now get the message from the unnamed 5th parameter.
1322         * page/inspector/Resource.js: Updated for the change to
1323         WebInspector.ConsoleMessage's parameter order.
1324
1325 2008-04-15  Adam Roben  <aroben@apple.com>
1326
1327         Change calls to Chrome::addMessageToConsole to use Console::addMessage
1328
1329         Part of Bug 17228: console.{log,warn,info,error} should support format
1330         strings, variable arguments
1331         <http://bugs.webkit.org/show_bug.cgi?id=17228>
1332         <rdar://problem/5732828>
1333
1334         Console now takes care of calling ChromeClient::addMessageToConsole
1335         for the appropriate messages (i.e., just messages from JavaScript). If
1336         you ever want to add a message to the console, Console is the place to
1337         do it.
1338
1339         Reviewed by Darin Adler.
1340
1341         * WebCore.xcodeproj/project.pbxproj: Mark Console.h Private.
1342         * page/Chrome.cpp: Removed addMessageToConsole
1343         * page/Chrome.h: Moved MessageSource/MessageLevel to Console.h.
1344         * page/Console.cpp:
1345         (WebCore::Console::addMessage): Added. Calls
1346         ChromeClient::addMessageToConsole for JS messages, and calls
1347         InspectorController::addMessageToConsole for all messages.
1348         (WebCore::Console::error): Changed to call directly to
1349         InspectorController in addition to ChromeClient.
1350         (WebCore::Console::info): Ditto.
1351         (WebCore::Console::log): Ditto.
1352         (WebCore::Console::warn): Ditto.
1353         * page/Console.h: Added MessageSource/MessageLevel enums from Chrome.h.
1354
1355 2008-04-15  Adam Roben  <aroben@apple.com>
1356
1357         Pass JSConsole's arguments unmodified to Console
1358
1359         Part of Bug 17228: console.{log,warn,info,error} should support format
1360         strings, variable arguments
1361         <http://bugs.webkit.org/show_bug.cgi?id=17228>
1362         <rdar://problem/5732828>
1363
1364         All of JSConsole's methods are now custom, so that we can pass the
1365         arguments unmodified to Console. Console now handles calling
1366         toString() on the first argument. Later it will pass the arguments off
1367         to InspectorController.
1368
1369         There should be no behavioral changes caused by this patch.
1370
1371         Reviewed by Darin Adler.
1372
1373         * ForwardingHeaders/kjs/list.h: Added.
1374         * GNUmakefile.am: Added JSConsoleCustom.cpp to the project.
1375         * WebCore.pro: Ditto.
1376         * WebCore.vcproj/WebCore.vcproj: Ditto.
1377         * WebCore.xcodeproj/project.pbxproj: Ditto.
1378         * WebCoreSources.bkl: Ditto.
1379         * bindings/js/JSConsoleCustom.cpp: Added.
1380         (WebCore::JSConsole::error):
1381         (WebCore::JSConsole::info):
1382         (WebCore::JSConsole::log):
1383         (WebCore::JSConsole::warn):
1384         * page/Console.cpp: Changed all methods to take an ExecState* and a
1385         const List&. The first item in the List is toString()ed and passed to
1386         Chrome.
1387         (WebCore::Console::error):
1388         (WebCore::Console::info):
1389         (WebCore::Console::log):
1390         (WebCore::Console::warn):
1391         * page/Console.h:
1392         * page/Console.idl:
1393
1394 2008-04-16  Sam Weinig  <sam@webkit.org>
1395
1396         Reviewed by Darin Adler.
1397
1398         Rename kjs_strtod to KJS::strtod.
1399
1400         * platform/text/String.cpp:
1401         (WebCore::charactersToDouble):
1402
1403 2008-04-16  Alexey Proskuryakov  <ap@webkit.org>
1404
1405         Reviewed by Adam.
1406
1407         http://bugs.webkit.org/show_bug.cgi?id=18259
1408         XML+XSLT pages in iframe contains document.location of a parent window
1409
1410         Test: fast/xsl/subframe-location.html
1411
1412         * xml/XSLTProcessor.cpp:
1413         (WebCore::XSLTProcessor::createDocumentFromSource): Set resulting document URL before opening
1414         it, so that the document loader picks a correct URL, too.
1415
1416 2008-04-16  Dan Bernstein  <mitz@apple.com>
1417
1418         Rubber-stamped by John Sullivan.
1419
1420         - remove unreachable code which was added in r8802
1421
1422         * rendering/RenderText.cpp:
1423         (WebCore::RenderText::caretRect):
1424
1425 2008-04-15  Timothy Hatcher  <timothy@apple.com>
1426
1427         Adds a script resource icon. Update the CSS icon to better match the script icon.
1428
1429         https://bugs.webkit.org/show_bug.cgi?id=18499
1430
1431         Rubber-stamped by Adele Peterson.
1432
1433         * page/inspector/Images/resourceCSSIcon.png: Updated.
1434         * page/inspector/Images/resourceJSIcon.png: Added.
1435         * page/inspector/inspector.css: Changed the script icon rule to reference the new image.
1436
1437 2008-04-16  Eric Seidel  <eric@webkit.org>
1438
1439         Reviewed by hyatt.
1440
1441         Fix leaky ImageBuffer code.
1442
1443         * platform/graphics/GeneratedImage.cpp:
1444         (WebCore::GeneratedImage::drawPattern):
1445         * platform/graphics/ImageBuffer.h:
1446         * platform/graphics/cg/ImageBufferCG.cpp:
1447         (WebCore::ImageBuffer::image):
1448
1449 2008-04-15  Justin Garcia  <justin.garcia@apple.com>
1450
1451         Reviewed by Oliver.
1452
1453         <rdar://problem/5665299> REGRESSION (r27369): Paste text into a contenteditable div creates a contenteditable div for each line (16661)
1454
1455         * editing/markup.cpp:
1456         (WebCore::createFragmentFromText): Don't use clones of the enclosing block to hold
1457         paragraphs if the enclosing block is the root editable element.
1458
1459 2008-04-15  Mark Rowe  <mrowe@apple.com>
1460
1461         Reviewed by Jon Honeycutt.
1462
1463         Don't treat the misnamed NSAccessibilitySortButtonRole as an accessibility role.  It is really
1464         a subrole of NSAccessibilityButtonRole.  As it is not used inside WebCore there is no change in
1465         behaviour as a result of doing this.  This fixes <rdar://problem/5866444>.
1466
1467         * page/AccessibilityObject.cpp:
1468         (WebCore::AccessibilityObject::canSetFocusAttribute): Remove SortButtonRole as it is unused.
1469         * page/AccessibilityObject.h: Ditto.
1470         (WebCore::):
1471         * page/mac/AccessibilityObjectWrapper.mm:
1472         (RoleEntry::):
1473
1474 2008-04-15  Anders Carlsson  <andersca@apple.com>
1475
1476         Fix leaks seen on bot.
1477         
1478         * loader/SubstituteResource.h:
1479         (WebCore::SubstituteResource::~SubstituteResource):
1480         Add a virtual destructor.
1481
1482 2008-04-15  Brady Eidson  <beidson@apple.com>
1483
1484         Reviewed by Anders Carlsson
1485
1486         Fix for <rdar://problem/5820819> - Crash sometime occurs when interrupting a load.
1487
1488         Each SubresourceLoader has a client.  That client is often a Loader::Host object.  
1489         The Loader/Host/CachedResource system predates our ref-counting and ownership models, and therefore manages
1490         object lifetime manually.
1491
1492         The cause of this crash was that we would sometimes call "didFail()" on a Host object twice - Once when 
1493         beginning the new navigation, and once when the new navigation is committed.
1494
1495         The problem is after the first time Host::didFail() gets called, the Host is almost always deleted shortly 
1496         thereafter.  But the SubresourceLoader had a dangling pointer to the Host which is now invalid.
1497
1498         I explored a few options to fix this bug.  The one that was most obviously "clean" was to call cancel() on
1499         the SubresourceLoader itself, which would end up calling Host::didFail() and doing the appropriate cache
1500         cleanup.
1501
1502         This problem with that approach was that it had other side effects - when you cut off a load that had already
1503         partially displayed in the WebView, images that hadn't finished loading would be invalidated and immediately
1504         turn into broken image icons.  This was visually jarring and pretty unacceptable. 
1505
1506         So I decided to follow a much simpler approach, which was to have the Host clear the client pointer from each
1507         SubresourceLoader before it forgets about it.  This leaves things the same visually and fixes the crash.
1508
1509         Note that the layout test for this - if possible - will require other enhancements to DRT including possibly 
1510         adding support for window.stop(). That task is non-trivial, and is documented in <rdar://problem/5061826> 
1511
1512         * loader/SubresourceLoader.h:
1513         (WebCore::SubresourceLoader::clearClient): Add a method to clear the SubresourceLoaderClient.  This is 
1514           perfectly safe to do on an in-flight SubresourceLoader as they are already designed to be client-less,
1515           and already null-check the client before calling it.
1516
1517         * loader/loader.cpp:
1518         (WebCore::Loader::Host::didFail): The SubresourceLoader itself might not be finished loading and might decide 
1519           to call into its client later.  Since the client has no guaranteed lifetime and is liable to be deleted 
1520           after didFail() is called, call clearClient() on the SubresourceLoader so such an invalid call can't happen.
1521
1522 2008-04-15  Anders Carlsson  <andersca@apple.com>
1523
1524         Reviewed by Adam.
1525
1526         Add empty files for the application cache.
1527         
1528         * Configurations/WebCore.xcconfig:
1529         * WebCore.vcproj/WebCore.vcproj:
1530         * WebCore.vcproj/build-generated-files.sh:
1531         Add ENABLE_OFFLINE_WEB_APPLICATIONS to FEATURE_DEFINES.
1532         
1533         * WebCore.xcodeproj/project.pbxproj:
1534         * loader/appcache: Added.
1535         * loader/appcache/ApplicationCache.cpp: Added.
1536         * loader/appcache/ApplicationCache.h: Added.
1537         * loader/appcache/ApplicationCacheGroup.cpp: Added.
1538         * loader/appcache/ApplicationCacheGroup.h: Added.
1539         * loader/appcache/ApplicationCacheResource.cpp: Added.
1540         * loader/appcache/ApplicationCacheResource.h: Added.
1541         * loader/appcache/DOMApplicationCache.cpp: Added.
1542         * loader/appcache/DOMApplicationCache.h: Added.
1543         * loader/appcache/DOMApplicationCache.idl: Added.
1544         * loader/appcache/ManifestParser.cpp: Added.
1545         * loader/appcache/ManifestParser.h: Added.
1546
1547 2008-04-15  Kevin McCullough  <kmccullough@apple.com>
1548
1549         Reviewed by Tim.
1550
1551         - <rdar://problem/5792587> AJAX (XMLHttpRequest) support for the Inspector (17776)
1552         - Add XMLHttpRequest support to the inspector.
1553
1554         * English.lproj/InspectorLocalizedStrings.js: Specify capitalization
1555         instead of using text-transform because XHR must capitalize all the letters.
1556         * page/inspector/Resource.js: Assume XHRs are textType even though this
1557         may not always be true.
1558         Also add the XHR category and let all mime types be consistent with it.
1559         * page/inspector/ResourcesPanel.js: Set the XHR category color.
1560         * page/inspector/inspector.css: Make XHRs yellow and fonts red because
1561         XHRs are more common than fonts and yellow next to orange (scripts) is
1562         not as harsh on the eyes as red next to orange.
1563         * page/inspector/inspector.js: Specify capitalization again.
1564
1565 2008-04-15  David Hyatt  <hyatt@apple.com>
1566
1567         Fix the zoom property so that it works properly with font-size.
1568
1569         Reviewed by John Sullivan
1570
1571         Added fast/css/zoom-font-size.html
1572
1573         * css/CSSStyleSelector.cpp:
1574         (WebCore::CSSStyleSelector::updateFont):
1575         (WebCore::CSSStyleSelector::applyProperty):
1576         (WebCore::CSSStyleSelector::checkForZoomChange):
1577         * css/CSSStyleSelector.h:
1578
1579 2008-04-15  Timothy Hatcher  <timothy@apple.com>
1580
1581         Fixes the bug where a resource view could still be shown after the inspected
1582         page navigates to another page.
1583
1584         https://bugs.webkit.org/show_bug.cgi?id=18517
1585
1586         Reviewed by Adam Roben.
1587
1588         * page/inspector/ResourcesPanel.js:
1589         (WebInspector.ResourcesPanel.prototype.reset): Close the visible resource.
1590         Iterate over all the resources and zero errors and warnings and delete the
1591         resource view and tree element. Removes all children of resourceViews. Passes
1592         true to _updateGraphDividersIfNeeded to force an immediate update.
1593         (WebInspector.ResourcesPanel.prototype.removeResource): Added. Closes
1594         the resource view if it is visible. Removes the resource from the _resources
1595         array. Removes the tree element from the outline tree. Zeros out the errors
1596         and warnings properties. Deletes the tree element and resource view properties.
1597         (WebInspector.ResourcesPanel.prototype.closeVisibleResource): Null check
1598         this._calculator for times when reset is called before the calculator is set.
1599         * page/inspector/inspector.js:
1600         (WebInspector.removeResource): Call ResourcesPanel.removeResource.
1601
1602 2008-04-15  Anders Carlsson  <andersca@apple.com>
1603
1604         Reviewed by Adam.
1605
1606         Rename "archive" to "substitute" in a couple of places.
1607         
1608         * loader/DocumentLoader.cpp:
1609         (WebCore::DocumentLoader::DocumentLoader):
1610         (WebCore::DocumentLoader::clearArchiveResources):
1611         (WebCore::DocumentLoader::deliverSubstituteResourcesAfterDelay):
1612         (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
1613         (WebCore::DocumentLoader::isSubstituteLoadPending):
1614         (WebCore::DocumentLoader::cancelPendingSubstituteLoad):
1615         (WebCore::DocumentLoader::scheduleArchiveLoad):
1616         (WebCore::DocumentLoader::setDefersLoading):
1617         * loader/DocumentLoader.h:
1618         * loader/ResourceLoader.cpp:
1619         (WebCore::ResourceLoader::load):
1620         (WebCore::ResourceLoader::didCancel):
1621
1622 2008-04-15  Anders Carlsson  <andersca@apple.com>
1623
1624         Reviewed by Adam.
1625
1626         Move the URL, response and data to SubstituteResource.
1627         
1628         * loader/SubstituteResource.h:
1629         (WebCore::SubstituteResource::url):
1630         (WebCore::SubstituteResource::response):
1631         (WebCore::SubstituteResource::data):
1632         (WebCore::SubstituteResource::SubstituteResource):
1633         * loader/archive/ArchiveResource.cpp:
1634         (WebCore::ArchiveResource::ArchiveResource):
1635         * loader/archive/ArchiveResource.h:
1636         (WebCore::ArchiveResource::frameName):
1637
1638 2008-04-15  David Hyatt  <hyatt@apple.com>
1639
1640         https://bugs.webkit.org/show_bug.cgi?id=18467
1641
1642         Make sure to ignore zoom:0.  That is not supposed to actually do anything.  It's a hack in IE
1643         to cause an element to set "hasLayout."
1644
1645         Reviewed by Anders
1646
1647         Added fast/css/zoom-property-parsing.html
1648
1649         * css/CSSParser.cpp:
1650         (WebCore::CSSParser::parseValue):
1651         * css/CSSStyleSelector.cpp:
1652         (WebCore::CSSStyleSelector::applyProperty):
1653
1654 2008-04-15  Anders Carlsson  <andersca@apple.com>
1655
1656         Reviewed by Adam.
1657
1658         Add a (currently empty) SubstituteResource class and make ArchiveResource inherit from it.
1659         
1660         * WebCore.vcproj/WebCore.vcproj:
1661         * WebCore.xcodeproj/project.pbxproj:
1662         * loader/SubstituteResource.h: Added.
1663         * loader/archive/ArchiveResource.h:
1664
1665 2008-04-15  Antti Koivisto  <antti@apple.com>
1666
1667         Reviewed by Geoff.
1668
1669         Fix <rdar://problem/5862921>
1670         REGRESSION: Leak in SVGSVGElement::SVGSVGElement
1671         
1672         In these strange days RefCounted starts with count of one.
1673
1674         * svg/SVGSVGElement.cpp:
1675         (WebCore::SVGSVGElement::SVGSVGElement):
1676         * svg/animation/SMILTimeContainer.h:
1677         (WebCore::SMILTimeContainer::create):
1678
1679 2008-04-15  Anatoli Papirovski  <apapirovski@mac.com>
1680
1681         Reviewed by hyatt
1682
1683         [CSS1, CSS3] Fixed the background-origin calculation for root elements
1684         (background-size and background-position are affected), r10794
1685         [CSS3] Fixed the background-size transformation where width is specified in percentage and height is left to auto
1686
1687         Test: fast/backgrounds/background-origin-root-element.html
1688
1689         * rendering/RenderBox.cpp:
1690         (WebCore::RenderBox::calculateBackgroundSize):
1691         (WebCore::RenderBox::calculateBackgroundImageGeometry):
1692
1693 2008-04-15  Timothy Hatcher  <timothy@apple.com>
1694
1695         Fixes the regression where the error and warning counts did not show up in the Resources
1696         sidebar next to resources.
1697
1698         https://bugs.webkit.org/show_bug.cgi?id=18494
1699
1700         Reviewed by Adam Roben.
1701
1702         * page/inspector/ResourcesPanel.js:
1703         (WebInspector.ResourcesPanel.prototype.addMessageToResource): Increment errors or warnings
1704         on the resource. Set the bubbleText to the total of the errors and warnings. Add a error
1705         or warning class to the bubble.
1706         (WebInspector.ResourcesPanel.prototype.clearMessages): Zero out the errors and warnings
1707         properties on each resource. Set the bubbleText back to an empty string.
1708         * page/inspector/SidebarTreeElement.js:
1709         (WebInspector.SidebarTreeElement): Create a statusElement.
1710         (WebInspector.SidebarTreeElement.prototype.get bubbleText): Return _bubbleText.
1711         (WebInspector.SidebarTreeElement.prototype.set bubbleText): Create bubbleElement if needed.
1712         Assign the value to _bubbleText and bubbleElement.textContent.
1713         (WebInspector.SidebarTreeElement.prototype.onattach): Append statusElement to _listItemNode.
1714         * page/inspector/inspector.css: Style rules for bubbles and status elements.
1715
1716 2008-04-15  Timothy Hatcher  <timothy@apple.com>
1717
1718         Fixes the regression where error and warning bubbles would not be added
1719         to the source view of a resource.
1720
1721         https://bugs.webkit.org/show_bug.cgi?id=18495
1722
1723         Reviewed by Adam Roben.
1724
1725         * css/view-source.css:
1726         (.webkit-html-message-bubble): Add a min-height to make sure the border-radius
1727         has enough room to apply.
1728         * page/inspector/Console.js:
1729         (WebInspector.Console.prototype.addMessage): Removed code that added messages
1730         to resource panels and incremented error and warning counts on resources.
1731         Now just call ResourcesPanel.addMessageToResource after assigning the resource
1732         to the console message.
1733         (WebInspector.Console.prototype.clearMessages): Removed code that cleared error
1734         and warning counts from resources an call ResourcesPanel.clearMessages.
1735         * page/inspector/ResourcesPanel.js:
1736         (WebInspector.ResourcesPanel.prototype.addMessageToResource): Call addMessage
1737         on the resource's view, if it is implemented.
1738         (WebInspector.ResourcesPanel.prototype.clearMessages): Call clearMessages
1739         on all the resource views for the ones that implement it.
1740         (WebInspector.ResourcesPanel.prototype.refreshResource): Call _resourceView
1741         to make the resource's view if needed. Use a local view variable.
1742         (WebInspector.ResourcesPanel.prototype._resourceView): Added helper function
1743         to create a resource view if needed.
1744         * page/inspector/SourceView.js:
1745         (WebInspector.SourceView.prototype.setupSourceFrameIfNeeded): Delete the 
1746         _frameNeedsSetup property at the beginning to prevent recursion. Get the
1747         length of the messages array when assigning the local length variable.
1748         (WebInspector.SourceView.prototype.addMessage): Renamed from addMessageToSource.
1749         (WebInspector.SourceView.prototype.clearMessages): Added. Clear all the message
1750         bubbles that might be sprinkled in the source. Also clears the messages array.
1751         (WebInspector.SourceView.prototype._addMessageToSource): Create the image
1752         element in the Inspector's document so we can use relative image URLs. Then
1753         adopt the image element into the frame's document.
1754
1755 2008-04-15  Brady Eidson  <beidson@apple.com>
1756
1757         Reviewed by Anders
1758
1759         Hook up event dispatching for window.localStorage changes.
1760
1761         Tests: storage/domstorage/localstorage/enumerate-storage.html
1762                storage/domstorage/localstorage/iframe-events.html
1763                storage/domstorage/localstorage/index-get-and-set.html
1764                storage/domstorage/localstorage/onstorage-attribute-markup.html
1765                storage/domstorage/localstorage/onstorage-attribute-setattribute.html
1766                storage/domstorage/localstorage/simple-events.html
1767                storage/domstorage/localstorage/simple-usage.html
1768                storage/domstorage/localstorage/window-open.html
1769
1770         * storage/LocalStorage.cpp:
1771         (WebCore::LocalStorage::dispatchStorageEvent): Walk every Page in the PageGroup, adding
1772           each Frame that matches the storage area's security origin to a Vector.  Then dispatch
1773           the StorageEvent to each Frame in the Vector
1774
1775         * storage/SessionStorage.cpp:
1776         (WebCore::SessionStorage::dispatchStorageEvent): Adopt the technique used in LocalStorage,
1777           which is to only add the Frames to the Vector if their security origin matches
1778
1779 2008-04-15  Olivier Goffart  <ogoffart@trolltech.com>
1780
1781         Reviewed by Simon.
1782
1783         Fixes: copy to clipboard when selecting, and paste when clicking with the middle button
1784
1785         * platform/Pasteboard.h: Added Qt-specific selection mode
1786         * platform/qt/PasteboardQt.cpp: Choose the clipboard or the selecton
1787         according to the selection mode
1788         (WebCore::Pasteboard::writeSelection):
1789         (WebCore::Pasteboard::plainText):
1790         (WebCore::Pasteboard::documentFragment):
1791         (WebCore::Pasteboard::writeURL):
1792         (WebCore::Pasteboard::clear):
1793         (WebCore::Pasteboard::isSelectionMode):
1794
1795 2008-04-15  Andre Poenitz  <andre.poenitz@trolltech.com>
1796
1797         Reviewed by Simon.
1798
1799         Fix compilation with Qt namespaces
1800
1801         Qt can be configured to have all of its classes inside a specified namespaces.
1802         This is for example used in plugin/component environments like Eclipse.
1803
1804         This change makes it possible to let the Qt port compile against a namespaced
1805         Qt by the use of macros Qt provides to properly forward declare Qt classes in
1806         the namespace.
1807
1808         * WebCore.pro:
1809         * bridge/qt/qt_class.h:
1810         * bridge/qt/qt_instance.h:
1811         * html/HTMLCanvasElement.h:
1812         * platform/DragData.h:
1813         * platform/DragImage.h:
1814         * platform/KURL.h:
1815         * platform/PlatformKeyboardEvent.h:
1816         * platform/PlatformMouseEvent.h:
1817         * platform/PlatformWheelEvent.h:
1818         * platform/Widget.h:
1819         * platform/graphics/Color.h:
1820         * platform/graphics/FloatPoint.h:
1821         * platform/graphics/FloatRect.h:
1822         * platform/graphics/Gradient.h:
1823         * platform/graphics/GraphicsContext.h:
1824         * platform/graphics/ImageBuffer.h:
1825         * platform/graphics/ImageSource.h:
1826         * platform/graphics/IntPoint.h:
1827         * platform/graphics/IntRect.h:
1828         * platform/graphics/IntSize.h:
1829         * platform/graphics/Path.h:
1830         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
1831         * platform/graphics/qt/MediaPlayerPrivatePhonon.h:
1832         * platform/network/qt/QNetworkReplyHandler.h:
1833         * platform/network/qt/ResourceRequest.h:
1834         * platform/qt/ClipboardQt.h:
1835         * platform/qt/RenderThemeQt.h:
1836         * platform/text/PlatformString.h:
1837         * platform/text/qt/TextCodecQt.h:
1838         * svg/graphics/SVGPaintServer.h:
1839         * svg/graphics/SVGPaintServerGradient.h:
1840
1841 2008-04-14  Brady Eidson  <beidson@apple.com>
1842
1843         Reviewed by Anders
1844
1845         Lay the underpinnings for LocalStorage.
1846
1847         For now, this just exposes window.localStorage to the dom which returns an in-memory Storage object, much
1848         like SessionStorage.  The primary difference at this point is that the object returned is shared globally,
1849         and isn't copied for new top-level browsing contexts like SessionStorage.
1850
1851         Later, I'll add proper event dispatch and a persistent storage backing.
1852
1853         * GNUmakefile.am:
1854         * WebCore.base.exp:
1855         * WebCore.pro:
1856         * WebCore.vcproj/WebCore.vcproj:
1857         * WebCore.xcodeproj/project.pbxproj:
1858         * WebCoreSources.bkl:
1859
1860         * bindings/js/JSDOMWindowCustom.cpp:
1861         (WebCore::JSDOMWindow::mark): Mark the optionalLocalStorage
1862
1863         * page/DOMWindow.cpp:
1864         (WebCore::DOMWindow::clear):
1865         (WebCore::DOMWindow::localStorage):
1866         * page/DOMWindow.h:
1867         (WebCore::DOMWindow::optionalLocalStorage):
1868
1869         * storage/LocalStorage.cpp: Added.
1870         (WebCore::LocalStorage::sharedLocalStorage):
1871         (WebCore::LocalStorage::LocalStorage):
1872         (WebCore::LocalStorage::storageArea):
1873         (WebCore::LocalStorage::itemChanged):
1874         (WebCore::LocalStorage::itemRemoved):
1875         (WebCore::LocalStorage::dispatchStorageEvent):
1876         * storage/LocalStorage.h: Added.
1877
1878         * storage/SessionStorage.cpp: Refactor to use the client interface for event dispatching for sessionStorage objects
1879         (WebCore::SessionStorage::SessionStorage):
1880         (WebCore::SessionStorage::copy):
1881         (WebCore::SessionStorage::storageArea):
1882         (WebCore::SessionStorage::itemChanged):
1883         (WebCore::SessionStorage::itemRemoved):
1884         (WebCore::SessionStorage::dispatchStorageEvent):
1885         * storage/SessionStorage.h:
1886
1887         * storage/StorageArea.cpp: Add a client parameter, and call to the client when an item is changed or removed.
1888         (WebCore::StorageArea::create):
1889         (WebCore::StorageArea::StorageArea):
1890         (WebCore::StorageArea::copy):
1891         (WebCore::StorageArea::setItem):
1892         (WebCore::StorageArea::removeItem):
1893         (WebCore::StorageArea::setClient):
1894         * storage/StorageArea.h:
1895         (WebCore::StorageArea::page):
1896         (WebCore::StorageArea::securityOrigin):
1897
1898         * storage/StorageAreaClient.h: Added.  Break out "itemChanged" and "itemRemoved" to a StorageAreaClient
1899           This way, both SessionStorage and LocalStorage areas can have different behavior on changes with
1900           that behavior managed from a central location.
1901         (WebCore::StorageAreaClient::~StorageAreaClient):
1902         (WebCore::StorageAreaClient::StorageAreaClient):
1903         (WebCore::StorageAreaClient::itemChanged):
1904         (WebCore::StorageAreaClient::itemRemoved):
1905
1906 2008-04-14  Brady Eidson  <beidson@apple.com>
1907
1908         Reviewed by Anders
1909
1910         Add a hidden pref to debug WebArchive loading.  With this pref on, when loading a WebArchive,
1911         if the resource isn't in the ArchiveResourceCollection, the loader will not fall back to the 
1912         network and will instead fail the load with a "cannot show URL" error.
1913
1914         * loader/ResourceLoader.cpp:
1915         (WebCore::ResourceLoader::load): Do the check here.
1916
1917         * page/Settings.cpp:
1918         (WebCore::Settings::Settings):
1919         (WebCore::Settings::setWebArchiveDebugModeEnabled):
1920         * page/Settings.h:
1921         (WebCore::Settings::webArchiveDebugModeEnabled):
1922
1923 2008-04-14  Antti Koivisto  <antti@apple.com>
1924
1925         Reviewed by Eric.
1926
1927         Some preparations for additive animations and animations in <use>.
1928         - Disallow animation elements in instance trees.
1929         - Fix buggy SVGUseElement::removeDisallowedElementsFromSubtree(), make it 
1930           public and static
1931         - Invoke it from SVGElementInstance::updateInstance() to clean up the instance tree
1932           there as well.
1933         - Add mechanism for blocking instance updates when an animation changes
1934           the referenced tree.
1935         
1936         The added assert in SVGSMILElement::insertedIntoDocument() verifies the fixes
1937         with the existing test cases.
1938
1939         * svg/SVGAElement.cpp:
1940         (WebCore::SVGAElement::defaultEventHandler):
1941         * svg/SVGElementInstance.cpp:
1942         (WebCore::SVGElementInstance::updateInstance):
1943         * svg/SVGStyledElement.cpp:
1944         (WebCore::SVGStyledElement::updateElementInstance):
1945         (WebCore::SVGStyledElement::setInstanceUpdatesBlocked):
1946         * svg/SVGStyledElement.h:
1947         * svg/SVGUseElement.cpp:
1948         (WebCore::isDisallowedElement):
1949         (WebCore::SVGUseElement::removeDisallowedElementsFromSubtree):
1950         * svg/SVGUseElement.h:
1951         * svg/animation/SVGSMILElement.cpp:
1952         (WebCore::SVGSMILElement::insertedIntoDocument):
1953         (WebCore::SVGSMILElement::isSMILElement):
1954         (WebCore::SVGSMILElement::connectConditions):
1955         (WebCore::SVGSMILElement::disconnectConditions):
1956         * svg/animation/SVGSMILElement.h:
1957
1958 2008-04-14  Adam Roben  <aroben@apple.com>
1959
1960         Don't let the inspected page overwrite properties of JS objects in the
1961         Inspector
1962
1963         <https://bugs.webkit.org/show_bug.cgi?id=16011>
1964         <rdar://problem/5604409>
1965
1966         <https://bugs.webkit.org/show_bug.cgi?id=16837>
1967         <rdar://problem/5813850>
1968
1969         Reviewed by Sam Weinig and Geoff Garen.
1970
1971         Tests (contributed by Adam Barth and Collin Jackson):
1972         manual-tests/inspector-wrappers
1973
1974         * GNUmakefile.am:
1975         * WebCore.pro:
1976         * WebCore.vcproj/WebCore.vcproj:
1977         * WebCore.xcodeproj/project.pbxproj:
1978         * WebCoreSources.bkl:
1979         Added new files to the projects.
1980
1981         * bindings/js/JSQuarantinedObjectWrapper.cpp: Added.
1982         (WebCore::):
1983         (WebCore::JSQuarantinedObjectWrapper::asWrapper): Converts a JSValue
1984         into a JSQuarantinedObjectWrapper, if the JSValue is in fact a
1985         JSQuarantinedObjectWrapper.
1986         (WebCore::JSQuarantinedObjectWrapper::cachedValueGetter): Callback to
1987         be used with PropertySlot.
1988         (WebCore::JSQuarantinedObjectWrapper::JSQuarantinedObjectWrapper):
1989         Hold onto the object we're wrapping and its global object. Pass the
1990         wrapped prototype up to the JSObject constructor.
1991         (WebCore::JSQuarantinedObjectWrapper::~JSQuarantinedObjectWrapper):
1992         (WebCore::JSQuarantinedObjectWrapper::unwrappedExecStateMatches):
1993         Returns true if our underlying object originated from the same global
1994         object as the passed-in ExecState.
1995         (WebCore::JSQuarantinedObjectWrapper::unwrappedExecState):
1996         (WebCore::JSQuarantinedObjectWrapper::transferExceptionToExecState):
1997         Wraps and moves an exception from our underlying ExecState to the
1998         passed-in one.
1999         (WebCore::JSQuarantinedObjectWrapper::mark): Marks ourselves and the
2000         objects we're holding references to.
2001
2002         (WebCore::JSQuarantinedObjectWrapper::getOwnPropertySlot):
2003         (WebCore::JSQuarantinedObjectWrapper::put):
2004         (WebCore::JSQuarantinedObjectWrapper::deleteProperty):
2005         (WebCore::JSQuarantinedObjectWrapper::implementsConstruct):
2006         (WebCore::JSQuarantinedObjectWrapper::construct):
2007         (WebCore::JSQuarantinedObjectWrapper::implementsHasInstance):
2008         (WebCore::JSQuarantinedObjectWrapper::hasInstance):
2009         (WebCore::JSQuarantinedObjectWrapper::implementsCall):
2010         (WebCore::JSQuarantinedObjectWrapper::callAsFunction):
2011         (WebCore::JSQuarantinedObjectWrapper::getPropertyNames):
2012         JSObject overrides. These each check the appropriate permission before
2013         allowing the call to proceed. We wrap all outgoing values using
2014         m_wrapOutgoingValue, and we prepare all incoming values with the
2015         virtual prepareIncomingValue function. If an exception is raised when
2016         calling the underlying object, we transfer the exception in wrapped
2017         form to the passed-in ExecState.
2018
2019         * bindings/js/JSQuarantinedObjectWrapper.h: Added.
2020         (WebCore::JSQuarantinedObjectWrapper::unwrappedObject):
2021         (WebCore::JSQuarantinedObjectWrapper::className): We return the
2022         underlying object's class name so that we can successfully masquerade
2023         as that underlying object when, e.g., Object.prototype.toString is
2024         called on us.
2025         (WebCore::JSQuarantinedObjectWrapper::classInfo):
2026
2027         (WebCore::JSQuarantinedObjectWrapper::allowsGetProperty):
2028         (WebCore::JSQuarantinedObjectWrapper::allowsSetProperty):
2029         (WebCore::JSQuarantinedObjectWrapper::allowsDeleteProperty):
2030         (WebCore::JSQuarantinedObjectWrapper::allowsConstruct):
2031         (WebCore::JSQuarantinedObjectWrapper::allowsHasInstance):
2032         (WebCore::JSQuarantinedObjectWrapper::allowsCallAsFunction):
2033         (WebCore::JSQuarantinedObjectWrapper::allowsGetPropertyNames):
2034         These virtual methods let subclasses define the allowed operations on
2035         the wrapped object. By default all operations are disabled.
2036
2037         * bindings/js/JSInspectedObjectWrapper.cpp: Added. This subclass of
2038         JSQuarantinedObjectWrapper is used to wrap objects from the inspected
2039         page being passed to the Inspector.
2040         (WebCore::wrappers):
2041         (WebCore::):
2042         (WebCore::JSInspectedObjectWrapper::wrap): Wraps the passed-in object
2043         if needed and returns the wrapper. If this object has been wrapped
2044         previously we'll return the old wrapper rather than make a new one.
2045         (WebCore::JSInspectedObjectWrapper::JSInspectedObjectWrapper): Add
2046         ourselves to the wrapper map.
2047         (WebCore::JSInspectedObjectWrapper::~JSInspectedObjectWrapper): Remove
2048         ourselves from the wrapper map.
2049         (WebCore::JSInspectedObjectWrapper::prepareIncomingValue): Ensure that
2050         any objects passed to the inspected object are either wrappers around
2051         objects from the inspected page (in which case we unwrap them so that
2052         the inspected page never sees the wrapper), or wrapped callbacks from
2053         the Inspector.
2054         * bindings/js/JSInspectedObjectWrapper.h: Added.
2055         (WebCore::JSInspectedObjectWrapper::classInfo):
2056         (WebCore::JSInspectedObjectWrapper::allowsGetProperty):
2057         (WebCore::JSInspectedObjectWrapper::allowsSetProperty):
2058         (WebCore::JSInspectedObjectWrapper::allowsDeleteProperty):
2059         (WebCore::JSInspectedObjectWrapper::allowsConstruct):
2060         (WebCore::JSInspectedObjectWrapper::allowsHasInstance):
2061         (WebCore::JSInspectedObjectWrapper::allowsCallAsFunction):
2062         (WebCore::JSInspectedObjectWrapper::allowsGetPropertyNames):
2063         These all return true so that the Inspector can use objects from the
2064         inspected page however it needs.
2065         (WebCore::JSInspectedObjectWrapper::wrapOutgoingValue): Wrap all
2066         outgoing values as JSInspectedObjectWrappers.
2067
2068         * bindings/js/JSInspectorCallbackWrapper.cpp: Added. This subclass of
2069         JSQuarantinedObjectWrapper is used to wrap callbacks that the
2070         Inspector passes to the inspected page (e.g., for event listeners or
2071         client-side storage callbacks).
2072         (WebCore::wrappers):
2073         (WebCore::):
2074         (WebCore::JSInspectorCallbackWrapper::wrap): Wraps the passed-in
2075         object if needed and returns the wrapper. If this object has been
2076         wrapped previously we'll return the old wrapper rather than make a new
2077         one.
2078         (WebCore::JSInspectorCallbackWrapper::JSInspectorCallbackWrapper): Add
2079         ourselves to the wrapper map.
2080         (WebCore::JSInspectorCallbackWrapper::~JSInspectorCallbackWrapper):
2081         Remove ourselves from the wrapper map.
2082         (WebCore::JSInspectorCallbackWrapper::prepareIncomingValue): Ensure
2083         that values passed from the inspected page to an Inspector callback
2084         are wrapped in JSInspectedObjectWrappers. We also allow the inspected
2085         page to pass ourselves in (which will happen in the case of a
2086         client-side storage callback, where the callback itself is passed as
2087         the `this` object). In this case we unwrap ourselves so that the
2088         Inspector doesn't have to deal with the wrapper.
2089         * bindings/js/JSInspectorCallbackWrapper.h: Added.
2090         (WebCore::JSInspectorCallbackWrapper::classInfo):
2091         (WebCore::JSInspectorCallbackWrapper::allowsCallAsFunction):
2092         This is the only allowed operation on a JSInspectorCallbackWrapper.
2093         (WebCore::JSInspectorCallbackWrapper::wrapOutgoingValue): Wrap all
2094         outgoing values as JSInspectorCallbackWrappers.
2095
2096         * page/InspectorController.cpp:
2097         (WebCore::getResourceDocumentNode): Wrap the Document before passing
2098         it to the Inspector.
2099         (WebCore::highlightDOMNode): Unwrap the Node that the Inspector passed
2100         to us.
2101         (WebCore::databaseTableNames): Unwrap the Database that the Inspector
2102         passed to us.
2103         (WebCore::inspectedWindow): Wrap the Window before passing it to the
2104         Inspector.
2105         (WebCore::InspectorController::focusNode): Wrap the Node before
2106         passing it to the Inspector.
2107         (WebCore::wrapCallback): Wraps the passed-in callback in a
2108         JSInspectorCallbackWrapper.
2109         (WebCore::InspectorController::addDatabaseScriptResource): Wrap the
2110         Database beore pasing it to the Inspector.
2111         (WebCore::InspectorController::windowScriptObjectAvailable): Add the
2112         new wrapCallback function to the InspectorController JS object.
2113
2114         * page/inspector/ElementsPanel.js:
2115         (WebInspector.ElementsPanel.reset): Wrap the contentLoaded callback.
2116
2117         * page/inspector/DatabaseQueryView.js:
2118         (WebInspector.DatabaseQueryView._enterKeyPressed):
2119         * page/inspector/DatabaseTableView.js:
2120         (WebInspector.DatabaseTableView.update):
2121         Pass null instead of an empty array to executeSql since we're no
2122         longer allowed to pass any unwrapped objects to the inspected page.
2123         We now wrap all callbacks being passed to the inspected page using
2124         InspectorController.wrapCallback.
2125
2126 2008-04-14  Adam Roben  <aroben@apple.com>
2127
2128         Use prototypes/constructors from the inspected page when operating on
2129         objects from the inspected page
2130
2131         Reviewed by Tim Hatcher.
2132
2133         * page/inspector/Console.js:
2134         (WebInspector.ConsolePanel._format): Use the Node constructor from the
2135         inspected Window with the instanceof operator.
2136         * page/inspector/ElementsPanel.js:
2137         (WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Use the
2138         Element prototype from the inspected Window instead of the Element
2139         prototype from this Window.
2140         * page/inspector/inspector.js:
2141         (WebInspector.performSearch): Ditto for Document prototype.
2142         * page/inspector/utilities.js:
2143         (Object.type): Now takes an optional Window parameter that is used to
2144         find the built-in constructors.
2145
2146 2008-04-14  Adam Roben  <aroben@apple.com>
2147
2148         Don't store objects from the Inspector on CSSStyleRules from the
2149         inspected page
2150
2151         Reviewed by Tim Hatcher.
2152
2153         * page/inspector/StylesSidebarPane.js:
2154         (WebInspector.StylesSidebarPane.update): Don't store raw CSSStyleRules
2155         from the inspected page in the styleRules array. Instead, always use a
2156         wrapper object. This will keep us from setting Inspector objects as
2157         properties of inspected objects.
2158
2159 2008-04-14  Timothy Hatcher  <timothy@apple.com>
2160
2161         Fixes a regression where clicking a resource URL in the Console would not
2162         show the resource in the Resources panel.
2163
2164         https://bugs.webkit.org/show_bug.cgi?id=18493
2165
2166         Reviewed by Adam Roben.
2167
2168         * page/inspector/Console.js:
2169         (WebInspector.Console.prototype._messagesClicked): Removed console-message-url
2170         handling to show resources. This is now handled by WebInspector.showResourceForURL.
2171         (WebInspector.ConsoleMessage.prototype.toMessageElement): Add the webkit-html-resource-link
2172         class name to the URL anchor. Also add the line number as a property to the anchor.
2173         * page/inspector/ResourcesPanel.js:
2174         (WebInspector.ResourcesPanel): Add a reference to the tree element to each calculator.
2175         (WebInspector.ResourcesPanel.prototype.showResource): Select and reveal the resource in
2176         the sidebar. Call showLine on the resource view if it is implemented.
2177         (WebInspector.ResourcesPanel.prototype.closeVisibleResource): Select the current calculator's
2178         tree element in the sidebar.
2179         (WebInspector.ResourcesPanel.prototype._graphSelected): Call closeVisibleResource after
2180         the calculator changes since closeVisibleResource uses the calculator.
2181         * page/inspector/SourceView.js:
2182         (WebInspector.SourceView.prototype.sourceRow): Early return if the line is null/zero.
2183         (WebInspector.SourceView.prototype.showLine):  Renamed from showSourceLine.
2184         * page/inspector/inspector.css:
2185         (body.console-visible #main-panels): Made the bottom 24px to match
2186         the height of #main-status-bar.
2187         (.console-message-url): Make the color important so it wins over
2188         the .webkit-html-resource-link rule.
2189         (.resource-view .resource-view-content): Made more generic from .image
2190         so all resource views get sized correctly.
2191         (.resource-view.image .resource-view-content): Removed.
2192         * page/inspector/inspector.js:
2193         (WebInspector.documentClick): Pass the line number from the anchor to
2194         WebInspector.showResourceForURL.
2195         (WebInspector.showResourceForURL): Add line number support. Pass the line
2196         to ResourcesPanel.showResource.
2197         (WebInspector.addMainEventListeners): Use bind for the event listeners.
2198
2199 2008-04-14  Xan Lopez  <xan@gnome.org>
2200
2201         Reviewed by Alp Toker.
2202
2203         http://bugs.webkit.org/show_bug.cgi?id=17917
2204         Bug 17917: Cookie support for HTTP soup backend
2205
2206         Initial implementation of cookies for the http soup backend.
2207
2208         Moved CookieJarGtk to CookieJarSoup in network/soup and left the original
2209         one as CookieJarCurl in network/curl.
2210
2211         * GNUmakefile.am:
2212         * platform/CookieJar.h:
2213         * platform/network/curl/CookieJarCurl.cpp: Renamed from WebCore/platform/gtk/CookieJarGtk.cpp.
2214         (WebCore::setCookies):
2215         (WebCore::cookies):
2216         * platform/network/soup/CookieJarSoup.cpp: Added.
2217         (WebCore::getCookieJar):
2218         (WebCore::setCookies):
2219         (WebCore::cookies):
2220         * platform/network/soup/ResourceHandleSoup.cpp:
2221         (WebCore::ResourceHandle::start):
2222
2223 2008-04-14  Holger Freyther  <zecke@selfish.org>
2224
2225         Reviewed by Alp Toker.
2226
2227         https://bugs.webkit.org/show_bug.cgi?id=18411
2228         Enable Page caching and create FrameViews on the fly
2229
2230         Create the FrameView on the fly and cache pages
2231
2232         - Keep a copy of the GtkAdjustment to be able to reuse it for the
2233           FrameViews
2234         - Do not initially create a FrameView and update the WebKit code to
2235           cope with not having a view.
2236         - Cache seven pages by default.
2237
2238         * platform/gtk/ScrollViewGtk.cpp:
2239         (WebCore::ScrollView::setGtkAdjustments):
2240
2241 2008-04-14  David Hyatt  <hyatt@apple.com>
2242
2243         Add a new optimized layout path for positioned objects that move.  Also avoid always marking the <html>
2244         object for layout when it has a percentage height, since the RenderView already does that when its size
2245         changes.
2246
2247         Reviewed by mjs
2248
2249         * rendering/RenderBlock.cpp:
2250         (WebCore::RenderBlock::layoutBlockChildren):
2251         (WebCore::RenderBlock::layoutPositionedObjects):
2252         * rendering/RenderBox.h:
2253         (WebCore::RenderBox::layoutDoingPositionedMovementOnly):
2254         * rendering/RenderObject.cpp:
2255         (WebCore::RenderObject::RenderObject):
2256         (WebCore::RenderObject::setNeedsLayout):
2257         (WebCore::RenderObject::setChildNeedsLayout):
2258         (WebCore::RenderObject::setNeedsPositionedMovementLayout):
2259         (WebCore::RenderObject::setStyle):
2260         * rendering/RenderObject.h:
2261         (WebCore::RenderObject::needsLayout):
2262         (WebCore::RenderObject::needsPositionedMovementLayoutOnly):
2263         (WebCore::RenderObject::layoutDoingPositionedMovementOnly):
2264         * rendering/RenderStyle.cpp:
2265         (WebCore::positionedObjectMoved):
2266         (WebCore::RenderStyle::diff):
2267         * rendering/RenderStyle.h:
2268         (WebCore::RenderStyle::):
2269
2270 2008-04-14  David Hyatt  <hyatt@apple.com>
2271
2272         Add support for gradients in the CSS content property.
2273
2274         Reviewed by olliej
2275
2276         Added fast/gradients/generated-gradients.html
2277
2278         * GNUmakefile.am:
2279         * WebCore.pro:
2280         * WebCore.vcproj/WebCore.vcproj:
2281         * WebCore.xcodeproj/project.pbxproj:
2282         * WebCoreSources.bkl:
2283         * css/CSSParser.cpp:
2284         (WebCore::CSSParser::parseContent):
2285         * css/CSSStyleSelector.cpp:
2286         (WebCore::CSSStyleSelector::applyProperty):
2287         (WebCore::CSSStyleSelector::styleImage):
2288         (WebCore::CSSStyleSelector::mapBackgroundImage):
2289         * css/CSSStyleSelector.h:
2290         * html/HTMLImageElement.cpp:
2291         (WebCore::HTMLImageElement::attach):
2292         * rendering/RenderContainer.cpp:
2293         (WebCore::RenderContainer::updateBeforeAfterContentForContainer):
2294         * rendering/RenderImage.cpp:
2295         (WebCore::RenderImage::RenderImage):
2296         (WebCore::RenderImage::setCachedImage):
2297         (WebCore::RenderImage::paintReplaced):
2298         (WebCore::RenderImage::calcReplacedWidth):
2299         (WebCore::RenderImage::calcReplacedHeight):
2300         (WebCore::RenderImage::calcAspectRatioWidth):
2301         (WebCore::RenderImage::calcAspectRatioHeight):
2302         * rendering/RenderImage.h:
2303         (WebCore::RenderImage::hasImage):
2304         (WebCore::RenderImage::image):
2305         (WebCore::RenderImage::errorOccurred):
2306         (WebCore::RenderImage::usesImageContainerSize):
2307         (WebCore::RenderImage::setImageContainerSize):
2308         (WebCore::RenderImage::imageHasRelativeWidth):
2309         (WebCore::RenderImage::imageHasRelativeHeight):
2310         (WebCore::RenderImage::imageSize):
2311         * rendering/RenderImageGeneratedContent.cpp: Added.
2312         (WebCore::RenderImageGeneratedContent::RenderImageGeneratedContent):
2313         (WebCore::RenderImageGeneratedContent::~RenderImageGeneratedContent):
2314         (WebCore::RenderImageGeneratedContent::setStyleImage):
2315         * rendering/RenderImageGeneratedContent.h: Added.
2316         (WebCore::RenderImageGeneratedContent::hasImage):
2317         (WebCore::RenderImageGeneratedContent::image):
2318         (WebCore::RenderImageGeneratedContent::errorOccurred):
2319         (WebCore::RenderImageGeneratedContent::usesImageContainerSize):
2320         (WebCore::RenderImageGeneratedContent::setImageContainerSize):
2321         (WebCore::RenderImageGeneratedContent::imageHasRelativeWidth):
2322         (WebCore::RenderImageGeneratedContent::imageHasRelativeHeight):
2323         (WebCore::RenderImageGeneratedContent::imageSize):
2324         * rendering/RenderObject.cpp:
2325         (WebCore::RenderObject::createObject):
2326         * rendering/RenderStyle.cpp:
2327         (WebCore::StyleCachedImage::imageHasRelativeWidth):
2328         (WebCore::StyleCachedImage::imageHasRelativeHeight):
2329         (WebCore::StyleCachedImage::usesImageContainerSize):
2330         (WebCore::RenderStyle::contentDataEquivalent):
2331         (WebCore::RenderStyle::setContent):
2332         (WebCore::ContentData::clear):
2333         * rendering/RenderStyle.h:
2334         (WebCore::StyleGeneratedImage::imageHasRelativeWidth):
2335         (WebCore::StyleGeneratedImage::imageHasRelativeHeight):
2336         (WebCore::StyleGeneratedImage::usesImageContainerSize):
2337         (WebCore::BackgroundLayer::setBackgroundImage):
2338         (WebCore::ContentData::):
2339         (WebCore::RenderStyle::setListStyleImage):
2340
2341 2008-04-14  Brady Eidson  <beidson@apple.com>
2342
2343         Reviewed by Sam, but Anders too, and he was more thorough in his review
2344         and thats the only reason Sam beat him
2345
2346         Swap the Page and SecurityOrigin arguments when creating a StorageArea.
2347
2348         SecurityOrigin is really the primary identifying characteristic of a StorageArea,
2349         and StorageAreas that represent LocalStorage won't have an owner Page.
2350
2351         * storage/SessionStorage.cpp:
2352         (WebCore::SessionStorage::copy):
2353         (WebCore::SessionStorage::storageArea):
2354
2355         * storage/StorageArea.cpp:
2356         (WebCore::StorageArea::create):
2357         (WebCore::StorageArea::StorageArea):
2358         (WebCore::StorageArea::copy):
2359         (WebCore::StorageArea::dispatchStorageEvent): Null check m_page here, as in the future
2360           it might be null
2361         * storage/StorageArea.h:
2362
2363 2008-04-14  Timothy Hatcher  <timothy@apple.com>
2364
2365         Add support for changing the sort order of the resources. The two sorting
2366         methods supported current are Time and Size.
2367
2368         Reviewed by Adam Roben.
2369
2370         * page/inspector/Images/statusbarMenuButton.png: Added.
2371         * page/inspector/Images/statusbarMenuButtonSelected.png: Added.
2372         * page/inspector/ResourcesPanel.js:
2373         (WebInspector.ResourcesPanel): Create the status bar menu button and
2374         setup the event listener to call _changeSortingFunction. Each option in
2375         the select references a sorting function.
2376         (WebInspector.ResourcesPanel.get statusBarItems): Add the sorting menu to the
2377         items returned.
2378         (WebInspector.ResourcesPanel._changeSortingFunction): Set the sorting function
2379         to the selected option's function in the sorting menu.
2380         * page/inspector/inspector.css: Added CSS rules for select elements in status bars.
2381
2382 2008-04-14  Timothy Hatcher  <timothy@apple.com>
2383
2384         Add support for toggling between small and large resource rows
2385         in the Resources panel.
2386
2387         Reviewed by Adam Roben.
2388
2389         * English.lproj/InspectorLocalizedStrings.js: Added new tooltip string.
2390         * page/inspector/Images/largerResourcesButtons.png: Added.
2391         * page/inspector/Images/resourceDocumentIconSmall.png: Added.
2392         * page/inspector/Images/resourcePlainIconSmall.png: Added.
2393         * page/inspector/ResourcesPanel.js:
2394         (WebInspector.ResourcesPanel): Create the status bar button and
2395         setup the event listener to call _toggleLargerResources.
2396         (WebInspector.ResourcesPanel.get statusBarItems): Return the status bar button.
2397         (WebInspector.ResourcesPanel._toggleLargerResources): Toggle the class names
2398         for the resources children list and the status bar button.
2399         * page/inspector/inspector.css: New style rules for small resources
2400         and the status bar item.
2401
2402 2008-04-14  Chris Fleizach  <cfleizach@apple.com>
2403
2404         Reviewed by Darin Adler
2405
2406         <rdar://problem/5854572> REGRESSION: AXPosition seems to be flipped in nightly build
2407         AX was using the wrong method to determine the view to use to create the screen position 
2408
2409         * page/AccessibilityObject.cpp:
2410         (WebCore::AccessibilityObject::documentFrameView):
2411         * page/mac/AccessibilityObjectWrapper.mm:
2412         (-[AccessibilityObjectWrapper position]):
2413
2414 2008-04-14  David Smith  <catfish.man@gmail.com>
2415
2416         Reviewed by Timothy Hatcher.
2417         
2418         - Fix https://bugs.webkit.org/show_bug.cgi?id=14258
2419         Response time vs. download time should be shown in the network profile
2420
2421         * page/inspector/Resource.js: Change the sorting function to sort by response received time.
2422         * page/inspector/ResourcesPanel.js: Hook up the existing infrastructure to two bars instead of one; one for the total time, one for the time post-response.
2423         * page/inspector/inspector.css: Add a new rule to make the waiting bar have a lower opacity, and change the total bar opacity to handle the overlap
2424
2425 2008-04-14  Julien Chaffraix  <jchaffraix@webkit.org>
2426
2427         Reviewed by Ap.
2428
2429         Bug 17403: WebKit Creates Invalid Xhtml Links with Ajax
2430         http://bugs.webkit.org/show_bug.cgi?id=17403
2431
2432         The previous code had callbacks for the normal parsing (full document) and fragment parsing.
2433         The difference was induced by the method we were using which did not accept a xmlParserCtxt.
2434         The code has been refactored to allow us to share the callbacks between the different cases.
2435         A drawback is that we have to use xmlParseContent which is an internal libxml method and thus
2436         some internal intialization is done in WebCore.
2437
2438         Test: fast/parser/ampersand-escaped-parseXMLFragment.xhtml
2439
2440         * dom/XMLTokenizer.cpp:
2441         (WebCore::createStringParser): Moved didInit in the global scope as it is shared by the
2442         2 create methods.
2443
2444         (WebCore::createMemoryParser): Create a memory parser similar to the previous code.
2445         Initialize the xmlParserContext to call xmlParseContent in parseXMLDocumentFragment.
2446
2447         (WebCore::XMLTokenizer::initializeParserContext): Check m_parsingFragment to know
2448         which create method to call.
2449
2450         * dom/XMLTokenizer.h: Added parseXMLDocumentFragment as a friend of XMLTokenizer.
2451
2452 2008-04-14  Rob Buis  <buis@kde.org>
2453
2454         Reviewed by Eric.
2455
2456         http://bugs.webkit.org/show_bug.cgi?id=18230
2457         tspan in link not working
2458
2459         Implement SVG Errata: "The 'a' element may contain any
2460         element that its parent may contain, except itself."
2461
2462         * svg/SVGAElement.cpp:
2463         (WebCore::SVGAElement::childShouldCreateRenderer):
2464
2465 2008-04-13  David Hyatt  <hyatt@apple.com>
2466
2467         Fix for bug 18466, WebKit exhibits slow performance on Opera DHTML benchmark.  Improve layout's rect
2468         invalidation code to only invalidate a single unioned rect once enough individual little rects have
2469         been detected.
2470
2471         Reviewed by olliej
2472
2473         * page/FrameView.cpp:
2474         (WebCore::FrameViewPrivate::reset):
2475         (WebCore::FrameView::layout):
2476         (WebCore::FrameView::repaintRectangle):
2477         (WebCore::FrameView::beginDeferredRepaints):
2478         (WebCore::FrameView::endDeferredRepaints):
2479         * page/FrameView.h:
2480
2481 2008-04-13  Eric Seidel  <eric@webkit.org>
2482
2483         Reviewed by Oliver.
2484
2485         Fix spelling error in function name, no test case.
2486
2487         * svg/SVGTextContentElement.cpp:
2488         (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback):
2489
2490 2008-04-13  Eric Seidel  <eric@webkit.org>
2491
2492         Reviewed by Oliver.
2493
2494         Build fix for +SVG_ANIMATION -SVG_FOREIGN_OBJECT build, no tests.
2495
2496         * svg/SVGAnimateMotionElement.cpp:
2497         (WebCore::SVGAnimateMotionElement::hasValidTarget):
2498
2499 2008-04-13  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
2500
2501         Reviewed by Oliver Hunt.
2502
2503         http://bugs.webkit.org/show_bug.cgi?id=18239
2504         [Gtk] Build breaks if SVG is enabled but SVG Fonts disabled
2505
2506         * svg/SVGAltGlyphElement.idl: Add SVG_FONTS in Conditional
2507
2508 2008-04-13  Julien Chaffraix  <jchaffraix@webkit.org>
2509
2510         Reviewed by David.
2511
2512         More SVG filters build fix.
2513
2514         * svg/graphics/filters/SVGFEImage.cpp:
2515         (WebCore::SVGFEImage::~SVGFEImage):
2516         (WebCore::SVGFEImage::setCachedImage):
2517
2518 2008-04-13  David Hyatt  <hyatt@apple.com>
2519
2520         Fix build bustage on the filters SVG code path (not built by default).
2521
2522         * svg/SVGFEImageElement.cpp:
2523         (WebCore::SVGFEImageElement::~SVGFEImageElement):
2524         (WebCore::SVGFEImageElement::parseMappedAttribute):
2525
2526 2008-04-13  Dan Winship  <danw@gnome.org>
2527
2528         Reviewed by Alp Toker.
2529
2530         http://bugs.webkit.org/show_bug.cgi?id=18391
2531         return body data incrementally from libsoup backend
2532
2533         Fix libsoup backend to pass data to the loader incrementally
2534         rather than all at once at the end.
2535
2536         * platform/network/soup/ResourceHandleSoup.cpp
2537         (ResourceHandle::start): connect to "got-headers" and "got-chunk"
2538         signals on the message
2539         (gotHeadersCallback): call client->didReceiveResponse() from here
2540         (gotChunkCallback): call client->didReceiveData() from here
2541         (finishedCallback): renamed from dataCallback. mostly just calls
2542         client->didFinishLoading() now.
2543
2544 2008-04-13  Dan Bernstein  <mitz@apple.com>
2545
2546         Reviewed by Jessica Kahn.
2547
2548         - remove duplicate condition in canHaveChildrenForEditing()
2549
2550         * editing/htmlediting.cpp:
2551         (WebCore::canHaveChildrenForEditing):
2552
2553 2008-04-13  Dan Bernstein  <mitz@apple.com>
2554
2555         Reviewed by Darin Adler.
2556
2557         - fix http://bugs.webkit.org/show_bug.cgi?id=18307
2558           <rdar://problem/5842546> REGRESSION (r31620): Incorrect Hiragino Kaku Gothic, font-weight:500
2559
2560         Test: fast/css/font-weight-1.html
2561
2562         * platform/graphics/mac/FontCacheMac.mm:
2563         (WebCore::toAppKitFontWeight): Adjusted the mapping to cover the AppKit
2564         weight range from 2 to 12, because AppKit weight 1 never occurs. The
2565         new mapping matches font-weight: n00 to ISO weight Wn.
2566         * platform/mac/WebFontCache.mm:
2567         (betterChoice): Changed the midpoint used when deciding between two
2568         candidates that deviate from the desired weight by the same amount.
2569
2570 2008-04-12  David Hyatt  <hyatt@apple.com>
2571
2572         Memory management cleanup for the new StyleCachedImage and StyleGeneratedImage classes.  Make the back end
2573         values hold refptrs to cached front end values.  This will avoid malloc churn as RenderStyles get
2574         re-resolved.
2575
2576         Reviewed by olliej
2577
2578         * css/CSSCursorImageValue.cpp:
2579         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
2580         (WebCore::CSSCursorImageValue::cachedImage):
2581         * css/CSSCursorImageValue.h:
2582         * css/CSSImageGeneratorValue.cpp:
2583         (WebCore::CSSImageGeneratorValue::CSSImageGeneratorValue):
2584         (WebCore::CSSImageGeneratorValue::generatedImage):
2585         * css/CSSImageGeneratorValue.h:
2586         * css/CSSImageValue.cpp:
2587         (WebCore::CSSImageValue::CSSImageValue):
2588         (WebCore::CSSImageValue::~CSSImageValue):
2589         (WebCore::CSSImageValue::cachedImage):
2590         * css/CSSImageValue.h:
2591         * css/CSSStyleSelector.cpp:
2592         (WebCore::CSSStyleSelector::applyProperty):
2593         (WebCore::CSSStyleSelector::createStyleImage):
2594         * css/CSSStyleSelector.h:
2595         * rendering/RenderStyle.h:
2596         (WebCore::StyleCachedImage::cachedImage):
2597         (WebCore::StyleGeneratedImage::StyleGeneratedImage):
2598         (WebCore::StyleGeneratedImage::data):
2599
2600 2008-04-12  Julien Chaffraix  <jchaffraix@webkit.org>
2601
2602         Not reviewed, Qt build fix.
2603
2604         * dom/XMLTokenizer.cpp:
2605        (WebCore::XMLTokenizer::parseEndElement):
2606         * platform/graphics/qt/GraphicsContextQt.cpp:
2607         (WebCore::GraphicsContext::clip):
2608         * platform/qt/ClipboardQt.cpp:
2609         (WebCore::ClipboardQt::setDragImage):
2610
2611 2008-04-12  David Hyatt  <hyatt@apple.com>
2612
2613         Add support for list-style-image gradients.  Also improve the image comparisons between two RenderStyles        
2614         to not mistakenly believe that images have changed.
2615
2616         Reviewed by olliej
2617
2618         Added fast/gradients/list-item-gradient.html
2619
2620         * css/CSSComputedStyleDeclaration.cpp:
2621         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2622         * css/CSSParser.cpp:
2623         (WebCore::CSSParser::parseValue):
2624         * css/CSSStyleSelector.cpp:
2625         (WebCore::CSSStyleSelector::applyProperty):
2626         (WebCore::CSSStyleSelector::createStyleImage):
2627         * rendering/RenderListMarker.cpp:
2628         (WebCore::RenderListMarker::RenderListMarker):
2629         (WebCore::RenderListMarker::paint):
2630         (WebCore::RenderListMarker::imageChanged):
2631         (WebCore::RenderListMarker::calcPrefWidths):
2632         * rendering/RenderListMarker.h:
2633         * rendering/RenderStyle.cpp:
2634         (WebCore::imagesEquivalent):
2635         (WebCore::BorderImage::operator==):
2636         (WebCore::StyleCachedImage::errorOccurred):
2637         (WebCore::BackgroundLayer::operator==):
2638         (WebCore::StyleInheritedData::StyleInheritedData):
2639         (WebCore::cursorDataEquivalent):
2640         (WebCore::StyleInheritedData::operator==):
2641         (WebCore::RenderStyle::diff):
2642         * rendering/RenderStyle.h:
2643         (WebCore::StyleImage::errorOccurred):
2644         (WebCore::RenderStyle::listStyleImage):
2645         (WebCore::RenderStyle::setListStyleImage):
2646         (WebCore::RenderStyle::initialListStyleImage):
2647
2648 2008-04-12  Dan Bernstein  <mitz@apple.com>
2649
2650         - Windows build fix
2651
2652         * platform/win/ClipboardWin.cpp:
2653         (WebCore::ClipboardWin::setDragImage):
2654
2655 2008-04-12  Kevin Ollivier  <kevino@theolliviers.com>
2656
2657         wx build fix. Update clip to take a FloatRect.
2658
2659         * platform/graphics/wx/GraphicsContextWx.cpp:
2660         (WebCore::GraphicsContext::clip):
2661
2662 2008-04-12  David Hyatt  <hyatt@apple.com>
2663
2664         Add gradient support to border-image (even though it's mostly just weird).
2665
2666         Reviewed by Dan
2667
2668         Added fast/gradients/border-image-gradient.html
2669               fast/gradients/border-image-gradient-sides-and-corners.html
2670
2671         * css/CSSBorderImageValue.h:
2672         (WebCore::CSSBorderImageValue::imageValue):
2673         * css/CSSStyleSelector.cpp:
2674         (WebCore::CSSStyleSelector::applyProperty):
2675         * platform/graphics/GeneratedImage.cpp:
2676         (WebCore::GeneratedImage::draw):
2677         * rendering/InlineFlowBox.cpp:
2678         (WebCore::InlineFlowBox::paintBoxDecorations):
2679         * rendering/RenderBox.cpp:
2680         (WebCore::RenderBox::imageChanged):
2681         * rendering/RenderObject.cpp:
2682         (WebCore::RenderObject::mustRepaintBackgroundOrBorder):
2683         (WebCore::RenderObject::paintBorderImage):
2684         (WebCore::RenderObject::paintBorder):
2685         (WebCore::RenderObject::updateBackgroundImages):
2686         (WebCore::RenderObject::arenaDelete):
2687         * rendering/RenderStyle.cpp:
2688         (WebCore::StyleCachedImage::isLoaded):
2689         * rendering/RenderStyle.h:
2690         (WebCore::StyleImage::isLoaded):
2691         (WebCore::BorderImage::image):
2692
2693 2008-04-11  Dan Bernstein  <mitz@apple.com>
2694
2695         Reviewed by Dave Hyatt.
2696
2697         - fix a regression from r31324 which caused most Arabic text to render
2698           as missing glyphs
2699
2700         Test: svg/W3C-SVG-1.1/fonts-glyph-02-t.svg
2701
2702         * svg/SVGFont.cpp:
2703         (WebCore::SVGTextRunWalker::walk): Changed to always process characters
2704         in logical order and therefore dispatch the callbacks with a logically-
2705         ordered glyph stream. Changed the call to isCompatibleGlyph() to check
2706         for compatibility only with the range of characters the candidate glyph
2707         is derived from rather than with the entire lookup range. Changed to
2708         mark the <missing-glyph> glyph identifier as valid, to facilitate the
2709         use of invalid glyph identifiers to mark font fallback.
2710         (WebCore::drawTextUsingSVGFontCallback): Changed to only append the
2711         glyph identifier to a vector.
2712         (WebCore::drawTextMissingGlyphCallback): Changed to only append the
2713         character to a vector and append an invalid glyph identifier to the
2714         glyph vector.
2715         (WebCore::Font::drawTextUsingSVGFont): Moved the drawing from the
2716         callbacks into this function, iterating over the glyph and fallback
2717         characters vector in visual order.
2718
2719 2008-04-11  Dirk Schulze <vbs85@gmx.de>
2720
2721         Reviewed by eseidel.
2722
2723         Attempt to fix Cairo build.
2724
2725         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2726         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
2727
2728 2008-04-11  David Hyatt  <hyatt@apple.com>
2729
2730         Rename CachedResource's ref/deref methods to addClient/removeClient.  This matches the new
2731         StyleImage class and is a more accurate description of what those methods really do.
2732
2733         Reviewed by olliej
2734
2735         * WebCore.base.exp:
2736         * css/CSSCursorImageValue.cpp:
2737         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
2738         * css/CSSFontFaceSource.cpp:
2739         (WebCore::CSSFontFaceSource::CSSFontFaceSource):
2740         (WebCore::CSSFontFaceSource::~CSSFontFaceSource):
2741         * css/CSSImageValue.cpp:
2742         (WebCore::CSSImageValue::~CSSImageValue):
2743         (WebCore::CSSImageValue::image):
2744         * css/CSSImportRule.cpp:
2745         (WebCore::CSSImportRule::~CSSImportRule):
2746         (WebCore::CSSImportRule::insertedIntoParent):
2747         * dom/ProcessingInstruction.cpp:
2748         (WebCore::ProcessingInstruction::~ProcessingInstruction):
2749         (WebCore::ProcessingInstruction::checkStyleSheet):
2750         (WebCore::ProcessingInstruction::parseStyleSheet):
2751         * dom/XMLTokenizer.cpp:
2752         (WebCore::XMLTokenizer::~XMLTokenizer):
2753         (WebCore::XMLTokenizer::endElementNs):
2754         (WebCore::XMLTokenizer::notifyFinished):
2755         * html/CanvasPattern.cpp:
2756         (WebCore::CanvasPattern::CanvasPattern):
2757         (WebCore::CanvasPattern::~CanvasPattern):
2758         * html/HTMLImageLoader.cpp:
2759         (WebCore::HTMLImageLoader::~HTMLImageLoader):
2760         (WebCore::HTMLImageLoader::setImage):
2761         (WebCore::HTMLImageLoader::updateFromElement):
2762         * html/HTMLLinkElement.cpp:
2763         (WebCore::HTMLLinkElement::~HTMLLinkElement):
2764         (WebCore::HTMLLinkElement::process):
2765         * html/HTMLScriptElement.cpp:
2766         (WebCore::HTMLScriptElement::~HTMLScriptElement):
2767         (WebCore::HTMLScriptElement::parseMappedAttribute):
2768         (WebCore::HTMLScriptElement::insertedIntoDocument):
2769         (WebCore::HTMLScriptElement::removedFromDocument):
2770         (WebCore::HTMLScriptElement::notifyFinished):
2771         * html/HTMLTokenizer.cpp:
2772         (WebCore::HTMLTokenizer::reset):
2773         (WebCore::HTMLTokenizer::scriptHandler):
2774         (WebCore::HTMLTokenizer::notifyFinished):
2775         * loader/CachedCSSStyleSheet.cpp:
2776         (WebCore::CachedCSSStyleSheet::addClient):
2777         * loader/CachedCSSStyleSheet.h:
2778         * loader/CachedFont.cpp:
2779         (WebCore::CachedFont::addClient):
2780         * loader/CachedFont.h:
2781         * loader/CachedImage.cpp:
2782         (WebCore::CachedImage::addClient):
2783         * loader/CachedImage.h:
2784         * loader/CachedResource.cpp:
2785         (WebCore::CachedResource::addClient):
2786         (WebCore::CachedResource::removeClient):
2787         * loader/CachedResource.h:
2788         * loader/CachedScript.cpp:
2789         (WebCore::CachedScript::addClient):
2790         * loader/CachedScript.h:
2791         * loader/CachedXBLDocument.h:
2792         * loader/CachedXSLStyleSheet.cpp:
2793         (WebCore::CachedXSLStyleSheet::addClient):
2794         * loader/CachedXSLStyleSheet.h:
2795         * loader/mac/UserStyleSheetLoader.cpp:
2796         (UserStyleSheetLoader::UserStyleSheetLoader):
2797         (UserStyleSheetLoader::~UserStyleSheetLoader):
2798         * platform/mac/ClipboardMac.mm:
2799         (WebCore::ClipboardMac::setDragImage):
2800         * rendering/RenderImage.cpp:
2801         (WebCore::RenderImage::~RenderImage):
2802         (WebCore::RenderImage::setCachedImage):
2803         * rendering/RenderListMarker.cpp:
2804         (WebCore::RenderListMarker::~RenderListMarker):
2805         (WebCore::RenderListMarker::setStyle):
2806         * rendering/RenderObject.cpp:
2807         (WebCore::RenderObject::updateBackgroundImages):
2808         (WebCore::RenderObject::arenaDelete):
2809         * rendering/RenderStyle.cpp:
2810         (WebCore::StyleCachedImage::addClient):
2811         (WebCore::StyleCachedImage::removeClient):
2812         * svg/SVGImageLoader.cpp:
2813         (WebCore::SVGImageLoader::updateFromElement):
2814         * xml/XSLImportRule.cpp:
2815         (WebCore::XSLImportRule::~XSLImportRule):
2816         (WebCore::XSLImportRule::loadSheet):
2817
2818 2008-04-11  David Hyatt  <hyatt@apple.com>
2819
2820         This patch adds support for CSS gradients as background images.  RenderStyles now hold a StyleImage
2821         RefPtr, which is a wrapper for two types of images: CachedImages (loaded from URLs) and generated images
2822         (patterns created on the fly such as gradients).
2823
2824         All of the features of <canvas> are supported: gradients can be linear or radial, have multiple stops, and
2825         can specify their points as percentages (for reusable gradients across different box sizes).
2826
2827         Reviewed by olliej
2828
2829         Added fast/gradients/simple-gradients.html
2830
2831         * WebCore.xcodeproj/project.pbxproj:
2832         * css/CSSBorderImageValue.cpp:
2833         (WebCore::CSSBorderImageValue::CSSBorderImageValue):
2834         * css/CSSBorderImageValue.h:
2835         (WebCore::CSSBorderImageValue::imageValue):
2836         (WebCore::CSSBorderImageValue::generatorValue):
2837         * css/CSSComputedStyleDeclaration.cpp:
2838         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2839         * css/CSSGradientValue.cpp: Added.
2840         (WebCore::CSSGradientValue::cssText):
2841         (WebCore::CSSGradientValue::createGradient):
2842         (WebCore::CSSGradientValue::image):
2843         (WebCore::compareStops):
2844         (WebCore::CSSGradientValue::sortStopsIfNeeded):
2845         (WebCore::CSSGradientValue::resolvePoint):
2846         (WebCore::CSSGradientValue::resolveRadius):
2847         * css/CSSGradientValue.h: Added.
2848         (WebCore::):
2849         (WebCore::CSSGradientColorStop::CSSGradientColorStop):
2850         (WebCore::CSSGradientValue::CSSGradientValue):
2851         (WebCore::CSSGradientValue::type):
2852         (WebCore::CSSGradientValue::setType):
2853         (WebCore::CSSGradientValue::setFirstX):
2854         (WebCore::CSSGradientValue::setFirstY):
2855         (WebCore::CSSGradientValue::setSecondX):
2856         (WebCore::CSSGradientValue::setSecondY):
2857         (WebCore::CSSGradientValue::setFirstRadius):
2858         (WebCore::CSSGradientValue::setSecondRadius):
2859         (WebCore::CSSGradientValue::addStop):
2860         * css/CSSImageGeneratorValue.cpp: Added.
2861         (WebCore::CSSImageGeneratorValue::~CSSImageGeneratorValue):
2862         (WebCore::CSSImageGeneratorValue::addClient):
2863         (WebCore::CSSImageGeneratorValue::removeClient):
2864         (WebCore::CSSImageGeneratorValue::getImage):
2865         (WebCore::CSSImageGeneratorValue::putImage):
2866         * css/CSSImageGeneratorValue.h: Added.
2867         (WebCore::CSSImageGeneratorValue::isImageGeneratorValue):
2868         * css/CSSImageValue.h:
2869         (WebCore::CSSImageValue::isImageValue):
2870         * css/CSSParser.cpp:
2871         (WebCore::CSSParser::parseBackgroundImage):
2872         (WebCore::BorderImageParseContext::commitImage):
2873         (WebCore::CSSParser::parseBorderImage):
2874         (WebCore::parseGradientPoint):
2875         (WebCore::parseGradientColorStop):
2876         (WebCore::CSSParser::parseGradient):
2877         * css/CSSParser.h:
2878         * css/CSSStyleSelector.cpp:
2879         (WebCore::CSSStyleSelector::applyProperty):
2880         (WebCore::CSSStyleSelector::createStyleImage):
2881         (WebCore::CSSStyleSelector::mapBackgroundImage):
2882         * css/CSSStyleSelector.h:
2883         * css/CSSValue.h:
2884         (WebCore::CSSValue::isImageValue):
2885         (WebCore::CSSValue::isImageGeneratorValue):
2886         * html/CanvasRenderingContext2D.cpp:
2887         (WebCore::CanvasRenderingContext2D::isPointInPath):
2888         * platform/graphics/BitmapImage.cpp:
2889         (WebCore::BitmapImage::BitmapImage):
2890         (WebCore::BitmapImage::dataChanged):
2891         (WebCore::BitmapImage::frameCount):
2892         * platform/graphics/BitmapImage.h:
2893         * platform/graphics/GraphicsContext.cpp:
2894         (WebCore::GraphicsContext::clipToImageBuffer):
2895         * platform/graphics/GraphicsContext.h:
2896         * platform/graphics/ImageBuffer.h:
2897         (WebCore::ImageBuffer::cgImage):
2898         (WebCore::ImageBuffer::image):
2899         * platform/graphics/cg/GraphicsContextCG.cpp:
2900         (WebCore::GraphicsContext::clipToImageBuffer):
2901         (WebCore::GraphicsContext::paintBuffer):
2902         (WebCore::GraphicsContext::drawImage):
2903         * platform/graphics/cg/ImageBufferCG.cpp:
2904         (WebCore::ImageBuffer::create):
2905         (WebCore::ImageBuffer::ImageBuffer):
2906         (WebCore::ImageBuffer::~ImageBuffer):
2907         (WebCore::ImageBuffer::image):
2908         (WebCore::ImageBuffer::getImageData):
2909         (WebCore::ImageBuffer::putImageData):
2910         (WebCore::ImageBuffer::toDataURL):
2911         * platform/graphics/cg/ImageCG.cpp:
2912         (WebCore::BitmapImage::BitmapImage):
2913         (WebCore::BitmapImage::draw):
2914         (WebCore::Image::drawPattern):
2915         * platform/graphics/qt/ImageQt.cpp:
2916         (WebCore::BitmapImage::BitmapImage):
2917         * rendering/InlineFlowBox.cpp:
2918         (WebCore::InlineFlowBox::paintBackground):
2919         * rendering/RenderBox.cpp:
2920         (WebCore::RenderBox::calculateBackgroundSize):
2921         (WebCore::RenderBox::imageChanged):
2922         (WebCore::RenderBox::paintBackgroundExtended):
2923         * rendering/RenderObject.cpp:
2924         (WebCore::RenderObject::mustRepaintBackgroundOrBorder):
2925         (WebCore::RenderObject::updateBackgroundImages):
2926         (WebCore::RenderObject::arenaDelete):
2927         * rendering/RenderStyle.cpp:
2928         (WebCore::StyleCachedImage::cssValue):
2929         (WebCore::StyleCachedImage::canRender):
2930         (WebCore::StyleCachedImage::imageSize):
2931         (WebCore::StyleCachedImage::setImageContainerSize):
2932         (WebCore::StyleCachedImage::addClient):
2933         (WebCore::StyleCachedImage::removeClient):
2934         (WebCore::StyleCachedImage::image):
2935         (WebCore::StyleGeneratedImage::cssValue):
2936         (WebCore::StyleGeneratedImage::imageSize):
2937         (WebCore::StyleGeneratedImage::setImageContainerSize):
2938         (WebCore::StyleGeneratedImage::addClient):
2939         (WebCore::StyleGeneratedImage::removeClient):
2940         (WebCore::StyleGeneratedImage::image):
2941         * rendering/RenderStyle.h:
2942         (WebCore::StyleImage::StyleImage):
2943         (WebCore::StyleImage::~StyleImage):
2944         (WebCore::StyleImage::operator==):
2945         (WebCore::StyleImage::canRender):
2946         (WebCore::StyleImage::isCachedImage):
2947         (WebCore::StyleImage::isGeneratedImage):
2948         (WebCore::StyleCachedImage::StyleCachedImage):
2949         (WebCore::StyleCachedImage::data):
2950         (WebCore::StyleCachedImage::isCachedImage):
2951         (WebCore::StyleGeneratedImage::StyleGeneratedImage):
2952         (WebCore::StyleGeneratedImage::data):
2953         (WebCore::StyleGeneratedImage::isGeneratedImage):
2954         (WebCore::BackgroundLayer::backgroundImage):
2955         (WebCore::BackgroundLayer::setBackgroundImage):
2956         (WebCore::BackgroundLayer::containsImage):
2957         (WebCore::RenderStyle::backgroundImage):
2958         (WebCore::RenderStyle::initialBackgroundImage):
2959         * svg/graphics/cg/SVGPaintServerGradientCg.cpp:
2960         (WebCore::SVGPaintServerGradient::teardown):
2961         * svg/graphics/cg/SVGResourceMaskerCg.mm:
2962         (WebCore::SVGResourceMasker::applyMask):
2963
2964 2008-04-11  Dan Bernstein  <mitz@apple.com>
2965
2966         Reviewed by Oliver Hunt.
2967
2968         - add SVGGlyphMap.h to project files
2969
2970         * WebCore.vcproj/WebCore.vcproj:
2971         * WebCore.xcodeproj/project.pbxproj:
2972
2973 2008-04-11  Anders Carlsson  <andersca@apple.com>
2974
2975         Fix release build.
2976         
2977         * WebCore.base.exp:
2978         
2979         * loader/archive/ArchiveResource.h:
2980         (WebCore::ArchiveResource::response):
2981         This should be const.
2982
2983 2008-04-11  Antti Koivisto  <antti@apple.com>
2984
2985         Try to fix Qt build.
2986
2987         * svg/animation/SMILTime.cpp:
2988
2989 2008-04-11  Anders Carlsson  <andersca@apple.com>
2990
2991         Reviewed by Brady.
2992
2993         Don't create the ArchiveResource response lazily.
2994         
2995         * loader/archive/ArchiveResource.cpp:
2996         (WebCore::ArchiveResource::ArchiveResource):
2997         * loader/archive/ArchiveResource.h:
2998         (WebCore::ArchiveResource::response):
2999
3000 2008-04-11  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
3001
3002         Reviewed by Mark Rowe.
3003
3004         Added missing '\' in the svg include path
3005
3006         * GNUmakefile.am:
3007
3008 2008-04-11  Antti Koivisto  <antti@apple.com>
3009
3010         Another attempted Qt build fix.
3011
3012         * WebCore.pro:
3013
3014 2008-04-11  Antti Koivisto  <antti@apple.com>
3015
3016         Reviewed by Oliver.
3017
3018         Fix build when SVG is enabled but SVG_ANIMATION is not.
3019
3020         * ChangeLog:
3021         * bindings/js/JSSVGElementWrapperFactory.cpp:
3022         * bindings/objc/DOM.mm:
3023         (WebCore::createElementClassMap):
3024         * svg/SVGAElement.cpp:
3025         (WebCore::SVGAElement::defaultEventHandler):
3026         * svg/SVGAnimateColorElement.cpp:
3027         * svg/SVGAnimateColorElement.h:
3028         * svg/SVGAnimateColorElement.idl:
3029         * svg/SVGAnimateMotionElement.h:
3030         * svg/SVGAnimationElement.cpp:
3031         (WebCore::SVGAnimationElement::animationMode):
3032         * svg/SVGAnimationElement.h:
3033         * svg/SVGAnimationElement.idl:
3034         * svg/SVGSetElement.cpp:
3035         * svg/SVGSetElement.h:
3036         * svg/SVGSetElement.idl:
3037         * svg/animation/SMILTimeContainer.cpp:
3038         (WebCore::SMILTimeContainer::begin):
3039         (WebCore::SMILTimeContainer::pause):
3040         (WebCore::SMILTimeContainer::resume):
3041         (WebCore::SMILTimeContainer::elapsed):
3042         (WebCore::SMILTimeContainer::isPaused):
3043         (WebCore::SMILTimeContainer::timerFired):
3044         * svg/animation/SMILTimeContainer.h:
3045         * svg/animation/SVGSMILElement.cpp:
3046         * svg/animation/SVGSMILElement.h:
3047         * svg/svgtags.in:
3048
3049 2008-04-11  Anders Carlsson  <andersca@apple.com>
3050
3051         Reviewed by Brady.
3052
3053         Move archive loading from FrameLoader to DocumentLoader.
3054         
3055         * loader/DocumentLoader.cpp:
3056         (WebCore::DocumentLoader::DocumentLoader):
3057         (WebCore::DocumentLoader::clearArchiveResources):
3058         (WebCore::DocumentLoader::deliverArchivedResourcesAfterDelay):
3059         (WebCore::DocumentLoader::archiveResourceDeliveryTimerFired):
3060         (WebCore::DocumentLoader::isArchiveLoadPending):
3061         (WebCore::DocumentLoader::cancelPendingArchiveLoad):
3062         (WebCore::DocumentLoader::scheduleArchiveLoad):
3063         (WebCore::DocumentLoader::setDefersLoading):
3064         * loader/DocumentLoader.h:
3065         * loader/FrameLoader.cpp:
3066         (WebCore::FrameLoader::FrameLoader):
3067         (WebCore::FrameLoader::setDefersLoading):
3068         (WebCore::FrameLoader::stopAllLoaders):
3069         * loader/FrameLoader.h:
3070         * loader/ResourceLoader.cpp:
3071         (WebCore::ResourceLoader::load):
3072         (WebCore::ResourceLoader::didCancel):
3073
3074 2008-04-11  Timothy Hatcher  <timothy@apple.com>
3075
3076         Fixes the regression where the DOM tree does not update when navigating
3077         to another page with the Inspector open.
3078
3079         https://bugs.webkit.org/show_bug.cgi?id=18418
3080
3081         Reviewed by Adam Roben.
3082
3083         * page/inspector/ElementsPanel.js:
3084         (WebInspector.ElementsPanel.prototype.reset): If the inspected document does not have a
3085         firstChild yet, add an event listener for DOMContentLoaded. The event listener just sets
3086         a proeprty that a polling functions looks for then triggers the reset.
3087         (WebInspector.ElementsPanel.prototype._focusedNodeChanged): Always call updateStyles with
3088         forceUpdate as true. This makes sure the Styles pane clears when there isn't a focused node.
3089
3090 2008-04-11  Dan Bernstein  <mitz@apple.com>
3091
3092         Reviewed by Timothy Hatcher.
3093
3094         - fix http://bugs.webkit.org/show_bug.cgi?id=18412
3095           Inspector truncates text when editing a CSS property
3096
3097         * page/inspector/inspector.css:
3098
3099 2008-04-11  Antti Koivisto  <antti@apple.com>
3100
3101         Try to fix Qt build by including some headers.
3102
3103         * ChangeLog:
3104         * platform/graphics/UnitBezier.h:
3105         * svg/SVGAnimationElement.cpp:
3106         * svg/animation/SMILTime.h:
3107         * svg/animation/SVGSMILElement.cpp:
3108
3109 2008-04-11  Antti Koivisto  <antti@apple.com>
3110
3111         Try to fix Windows build by switching to std::sort().
3112
3113         * svg/animation/SVGSMILElement.cpp:
3114         (WebCore::sortTimeList):
3115
3116 2008-04-11  Rob Buis  <buis@kde.org>
3117
3118         Reviewed by Eric.
3119
3120         http://bugs.webkit.org/show_bug.cgi?id=18340
3121         Elements with display="none" in a <clipPath> still contribute to clipping path
3122
3123         Skip elements in clip-path container that have display=none specified.
3124
3125         * svg/SVGClipPathElement.cpp:
3126         (WebCore::SVGClipPathElement::canvasResource):
3127
3128 2008-04-10  Antti Koivisto  <antti@apple.com>
3129
3130         Reviewed by Eric.
3131
3132         Redo the SVG animation support.
3133         
3134         It does
3135         - Full SMIL interval timing model including syncbase and event base timing (the hard part).
3136         - CSS and XML attribute animation.
3137         - Linear, discrete and spline calcModes.
3138         - Values animation with keyTimes and keySplines.
3139         - Link activated animations.
3140         - Pretty good support for <animate> and <set> animations
3141         - Basic support for <animateColor>, <animateMotion> and <animateTransform>.
3142
3143         This passes some 35 of the 56 tests in W3C SVG animation test suite, a bunch more
3144         with some subtest failures.
3145
3146         What is still missing
3147         - Additive animation with multiple animations operating on the same property. This is a
3148           major architectural feature in animation code. It shouldn't be too hard to add.
3149         - Only <animate> implements accumulate.
3150         - <animateMotion> does not do paths, keypoints, rotate.
3151         - <animateTransform> does not work correctly in all cases
3152         - calcMode paced is missing.
3153         - repeat, beginEvent, endEvent are missing.
3154         - accesskey() is missing.
3155         - JS does not see correct values for baseVal/animVal, changing values that are being
3156           animted for a script produces wrong results. This problem needs to be solved outside
3157           the animation code.
3158         - Some other stuff I forgot or do not know about.
3159
3160         * GNUmakefile.am:
3161         * WebCore.pro:
3162         * WebCore.vcproj/WebCore.vcproj:
3163         * WebCore.xcodeproj/project.pbxproj:
3164         * dom/Document.cpp:
3165         * history/CachedPage.cpp:
3166         (WebCore::CachedPage::CachedPage):
3167         
3168         Use cache notification mechanism to start/stop animations.
3169
3170         * svg/SVGAElement.cpp:
3171         (WebCore::SVGAElement::defaultEventHandler):
3172         
3173         Start target animation on link activation.
3174         
3175         * svg/SVGAnimateColorElement.cpp:
3176         (WebCore::SVGAnimateColorElement::applyAnimatedValueToElement):
3177         (WebCore::SVGAnimateColorElement::updateAnimatedValue):
3178         (WebCore::SVGAnimateColorElement::calculateFromAndToValues):
3179         (WebCore::SVGAnimateColorElement::calculateFromAndByValues):
3180         * svg/SVGAnimateColorElement.h:
3181         * svg/SVGAnimateElement.cpp:
3182         (WebCore::SVGAnimateElement::SVGAnimateElement):
3183         (WebCore::parseNumberValueAndUnit):
3184         (WebCore::SVGAnimateElement::applyAnimatedValueToElement):
3185         (WebCore::SVGAnimateElement::updateAnimatedValue):
3186         (WebCore::isColorAttribute):
3187         (WebCore::SVGAnimateElement::calculateFromAndToValues):
3188         (WebCore::SVGAnimateElement::calculateFromAndByValues):
3189         * svg/SVGAnimateElement.h:
3190         (WebCore::SVGAnimateElement::):
3191         * svg/SVGAnimateMotionElement.cpp:
3192         (WebCore::SVGAnimateMotionElement::SVGAnimateMotionElement):
3193         (WebCore::SVGAnimateMotionElement::parseMappedAttribute):
3194         (WebCore::SVGAnimateMotionElement::updateAnimatedValue):
3195         (WebCore::parsePoint):
3196         (WebCore::SVGAnimateMotionElement::calculateFromAndToValues):
3197         (WebCore::SVGAnimateMotionElement::calculateFromAndByValues):
3198         (WebCore::SVGAnimateMotionElement::applyAnimatedValueToElement):
3199         (WebCore::SVGAnimateMotionElement::startedActiveInterval):
3200         * svg/SVGAnimateMotionElement.h:
3201         * svg/SVGAnimateTransformElement.cpp:
3202         (WebCore::SVGAnimateTransformElement::SVGAnimateTransformElement):
3203         (WebCore::SVGAnimateTransformElement::hasValidTarget):
3204         (WebCore::SVGAnimateTransformElement::updateAnimatedValue):
3205         (WebCore::transformListFor):
3206         (WebCore::SVGAnimateTransformElement::applyAnimatedValueToElement):
3207         (WebCore::SVGAnimateTransformElement::calculateFromAndToValues):
3208         (WebCore::SVGAnimateTransformElement::calculateFromAndByValues):
3209         (WebCore::SVGAnimateTransformElement::startedActiveInterval):
3210         (WebCore::SVGAnimateTransformElement::parseTransformValue):
3211         * svg/SVGAnimateTransformElement.h:
3212         
3213         Concrete anmation element classes.
3214         
3215         * svg/SVGAnimationElement.cpp:
3216         (WebCore::SVGAnimationElement::SVGAnimationElement):
3217         (WebCore::SVGAnimationElement::~SVGAnimationElement):
3218         (WebCore::parseKeyTimes):
3219         (WebCore::parseKeySplines):
3220         (WebCore::SVGAnimationElement::parseMappedAttribute):
3221         (WebCore::SVGAnimationElement::attributeChanged):
3222         (WebCore::SVGAnimationElement::getStartTime):
3223         (WebCore::SVGAnimationElement::getCurrentTime):
3224         (WebCore::SVGAnimationElement::getSimpleDuration):
3225         (WebCore::SVGAnimationElement::beginElement):
3226         (WebCore::SVGAnimationElement::beginElementAt):
3227         (WebCore::SVGAnimationElement::endElement):
3228         (WebCore::SVGAnimationElement::endElementAt):
3229         (WebCore::SVGAnimationElement::animationMode):
3230         (WebCore::SVGAnimationElement::calcMode):
3231         (WebCore::SVGAnimationElement::attributeType):
3232         (WebCore::SVGAnimationElement::toValue):
3233         (WebCore::SVGAnimationElement::byValue):
3234         (WebCore::SVGAnimationElement::fromValue):
3235         (WebCore::SVGAnimationElement::attributeName):
3236         (WebCore::SVGAnimationElement::isAdditive):
3237         (WebCore::SVGAnimationElement::isAccumulated):
3238         (WebCore::SVGAnimationElement::hasValidTarget):
3239         (WebCore::SVGAnimationElement::targetAttributeIsCSS):
3240         (WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue):
3241         (WebCore::SVGAnimationElement::targetAttributeBaseValue):
3242         (WebCore::solveEpsilon):
3243         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
3244         (WebCore::SVGAnimationElement::startedActiveInterval):
3245         (WebCore::SVGAnimationElement::applyAnimation):
3246         (WebCore::SVGAnimationElement::unapplyAnimation):
3247         (WebCore::SVGAnimationElement::endedActiveInterval):
3248         * svg/SVGAnimationElement.h:
3249         (WebCore::SVGAnimationElement::):
3250         
3251         This is pretty much a complete rewrite of the SVGAnimationElement. Timing related functionality
3252         was refactored to SMILTimingElement class that this class now inherits.
3253         
3254         * svg/SVGDocumentExtensions.cpp:
3255         (WebCore::SVGDocumentExtensions::startAnimations):
3256         * svg/SVGElement.cpp:
3257         (WebCore::SVGElement::ownerSVGElement):
3258         * svg/SVGSVGElement.cpp:
3259         
3260         We need to reach the <svg> element from <use> too so go out from the shadow tree.
3261         
3262         (WebCore::SVGSVGElement::SVGSVGElement):
3263         (WebCore::SVGSVGElement::~SVGSVGElement):
3264         (WebCore::SVGSVGElement::pauseAnimations):
3265         (WebCore::SVGSVGElement::unpauseAnimations):
3266         (WebCore::SVGSVGElement::animationsPaused):
3267         (WebCore::SVGSVGElement::getCurrentTime):
3268         (WebCore::SVGSVGElement::willSaveToCache):
3269         (WebCore::SVGSVGElement::willRestoreFromCache):
3270         * svg/SVGSVGElement.h:
3271         (WebCore::SVGSVGElement::timeContainer):
3272         * svg/SVGSetElement.cpp:
3273         (WebCore::SVGSetElement::applyAnimatedValueToElement):
3274         (WebCore::SVGSetElement::calculateFromAndToValues):
3275         (WebCore::SVGSetElement::calculateFromAndByValues):
3276         (WebCore::SVGSetElement::updateAnimatedValue):
3277         * svg/SVGSetElement.h:
3278         
3279         Concrete anmation element classes.
3280         
3281         * svg/SVGTimer.cpp: Removed.
3282         * svg/SVGTimer.h: Removed.
3283         * svg/SVGUseElement.cpp:
3284         (WebCore::SVGUseElement::removedFromDocument):
3285         * svg/TimeScheduler.cpp: Removed.
3286         * svg/TimeScheduler.h: Removed.
3287         
3288         Replaced these with SMILTimeContainer class.
3289         
3290         * svg/animation: Added.
3291         * svg/animation/SMILTime.cpp: Added.
3292         (WebCore::operator+):
3293         (WebCore::operator-):
3294         (WebCore::operator*):
3295         * svg/animation/SMILTime.h: Added.
3296         (WebCore::SMILTime::SMILTime):
3297         (WebCore::SMILTime::unresolved):
3298         (WebCore::SMILTime::indefinite):
3299         (WebCore::SMILTime::operator=):
3300         (WebCore::SMILTime::value):
3301         (WebCore::SMILTime::isFinite):
3302         (WebCore::SMILTime::isIndefinite):
3303         (WebCore::SMILTime::isUnresolved):
3304         (WebCore::operator==):
3305         (WebCore::operator!=):
3306         (WebCore::operator>):
3307         (WebCore::operator<):
3308         (WebCore::operator>=):
3309         (WebCore::operator<=):
3310         (WebCore::max):
3311         (WebCore::min):
3312         
3313         A floating point number with special values "indefinite" and "unresolved". Defines math for those.
3314         
3315         * svg/animation/SMILTimeContainer.cpp: Added.
3316         (WebCore::SMILTimeContainer::SMILTimeContainer):
3317         (WebCore::SMILTimeContainer::schedule):
3318         (WebCore::SMILTimeContainer::unschedule):
3319         (WebCore::SMILTimeContainer::elapsed):
3320         (WebCore::SMILTimeContainer::isActive):
3321         (WebCore::SMILTimeContainer::isPaused):
3322         (WebCore::SMILTimeContainer::begin):
3323         (WebCore::SMILTimeContainer::pause):
3324         (WebCore::SMILTimeContainer::resume):
3325         (WebCore::SMILTimeContainer::startTimer):
3326         (WebCore::SMILTimeContainer::timerFired):
3327         (WebCore::SMILTimeContainer::updateAnimations):
3328         * svg/animation/SMILTimeContainer.h: Added.
3329         
3330         Manages the clock and time line for active animations in a document.
3331         
3332         * svg/animation/SVGSMILElement.cpp: Added.
3333         (WebCore::ConditionEventListener::ConditionEventListener):
3334         (WebCore::ConditionEventListener::handleEvent):
3335         (WebCore::SVGSMILElement::Condition::Condition):
3336         (WebCore::SVGSMILElement::SVGSMILElement):
3337         (WebCore::SVGSMILElement::~SVGSMILElement):
3338         (WebCore::SVGSMILElement::insertedIntoDocument):
3339         (WebCore::SVGSMILElement::removedFromDocument):
3340         (WebCore::SVGSMILElement::finishParsingChildren):
3341         (WebCore::SVGSMILElement::parseOffsetValue):
3342         (WebCore::SVGSMILElement::parseClockValue):
3343         (WebCore::smilTimeSortFunction):
3344         (WebCore::sortTimeList):
3345         (WebCore::SVGSMILElement::parseCondition):
3346         (WebCore::SVGSMILElement::isTimingElement):
3347         (WebCore::SVGSMILElement::parseBeginOrEnd):
3348         (WebCore::SVGSMILElement::parseMappedAttribute):
3349         (WebCore::SVGSMILElement::attributeChanged):
3350         (WebCore::SVGSMILElement::connectConditions):
3351         (WebCore::SVGSMILElement::disconnectConditions):
3352         (WebCore::SVGSMILElement::reschedule):
3353         (WebCore::SVGSMILElement::targetElement):
3354         (WebCore::SVGSMILElement::elapsed):
3355         (WebCore::SVGSMILElement::restart):
3356         (WebCore::SVGSMILElement::fill):
3357         (WebCore::SVGSMILElement::xlinkHref):
3358         (WebCore::SVGSMILElement::dur):
3359         (WebCore::SVGSMILElement::repeatDur):
3360         (WebCore::SVGSMILElement::repeatCount):
3361         (WebCore::SVGSMILElement::maxValue):
3362         (WebCore::SVGSMILElement::minValue):
3363         (WebCore::SVGSMILElement::simpleDuration):
3364         (WebCore::SVGSMILElement::addBeginTime):
3365         (WebCore::SVGSMILElement::addEndTime):
3366         (WebCore::SVGSMILElement::findInstanceTime):
3367         (WebCore::SVGSMILElement::repeatingDuration):
3368         (WebCore::SVGSMILElement::resolveActiveEnd):
3369         (WebCore::SVGSMILElement::resolveInterval):
3370         (WebCore::SVGSMILElement::resolveFirstInterval):
3371         (WebCore::SVGSMILElement::resolveNextInterval):
3372         (WebCore::SVGSMILElement::nextProgressTime):
3373         (WebCore::SVGSMILElement::beginListChanged):
3374         (WebCore::SVGSMILElement::endListChanged):
3375         (WebCore::SVGSMILElement::checkRestart):
3376         (WebCore::SVGSMILElement::calculateAnimationPercentAndRepeat):
3377         (WebCore::SVGSMILElement::calculateNextProgressTime):
3378         (WebCore::SVGSMILElement::determineActiveState):
3379         (WebCore::SVGSMILElement::progress):
3380         (WebCore::SVGSMILElement::notifyDependentsIntervalChanged):
3381         (WebCore::SVGSMILElement::createInstanceTimesFromSyncbase):
3382         (WebCore::SVGSMILElement::addTimeDependent):
3383         (WebCore::SVGSMILElement::removeTimeDependent):
3384         (WebCore::SVGSMILElement::handleConditionEvent):
3385         (WebCore::SVGSMILElement::beginByLinkActivation):
3386         * svg/animation/SVGSMILElement.h: Added.
3387         (WebCore::SVGSMILElement::timeContainer):
3388         (WebCore::SVGSMILElement::):
3389         (WebCore::SVGSMILElement::intervalBegin):
3390         (WebCore::SVGSMILElement::intervalEnd):
3391         (WebCore::SVGSMILElement::Condition::):
3392         
3393             This abstract class implements the SMIL timing model. As an output it produces calls
3394             to these virtual functions:
3395         
3396             virtual void startedActiveInterval() = 0;
3397             virtual void applyAnimation(float percent, unsigned repeat) = 0;
3398             virtual void unapplyAnimation() = 0;
3399             virtual void endedActiveInterval() = 0;
3400
3401 2008-04-10  Antti Koivisto  <antti@apple.com>
3402
3403         Reviewed by Eric.
3404
3405         Move CurveData out from AnimationController.cpp and rename
3406         it to UnitBezier. This makes it possible to reuse this nice class from the 
3407         SVG animation code.
3408
3409         * WebCore.vcproj/WebCore.vcproj:
3410         * WebCore.xcodeproj/project.pbxproj:
3411         * page/AnimationController.cpp:
3412         (WebCore::solveCubicBezierFunction):
3413         * platform/graphics/UnitBezier.h: Added.
3414         (WebCore::UnitBezier::UnitBezier):
3415         (WebCore::UnitBezier::sampleCurveX):
3416         (WebCore::UnitBezier::sampleCurveY):
3417         (WebCore::UnitBezier::sampleCurveDerivativeX):
3418         (WebCore::UnitBezier::solveCurveX):
3419         (WebCore::UnitBezier::solve):
3420
3421 2008-04-10  Brady Eidson  <beidson@apple.com>
3422
3423         Reviewed by Sam Weinig
3424
3425         The name "OriginStorage" never felt right to a few of us.  The HTML5 spec refers to our 
3426         concept of "OriginStorage" as a "storage area", which makes more sense here.
3427
3428         This patch is basically:
3429         s/OriginStorage/StorageArea/
3430
3431         * GNUmakefile.am:
3432         * WebCore.pro:
3433         * WebCore.vcproj/WebCore.vcproj:
3434         * WebCore.xcodeproj/project.pbxproj:
3435         * WebCoreSources.bkl:
3436
3437         * loader/FrameLoader.cpp:
3438
3439         * page/DOMWindow.cpp:
3440         (WebCore::DOMWindow::sessionStorage):
3441         * page/Page.cpp:
3442
3443         * storage/OriginStorage.cpp: Removed.
3444         * storage/OriginStorage.h: Removed.
3445
3446         * storage/SessionStorage.cpp:
3447         (WebCore::SessionStorage::copy):
3448         (WebCore::SessionStorage::storageArea):
3449         * storage/SessionStorage.h:
3450
3451         * storage/Storage.cpp:
3452         (WebCore::Storage::create):
3453         (WebCore::Storage::Storage):
3454         (WebCore::Storage::length):
3455         (WebCore::Storage::key):
3456         (WebCore::Storage::getItem):
3457         (WebCore::Storage::setItem):
3458         (WebCore::Storage::removeItem):
3459         (WebCore::Storage::contains):
3460         * storage/Storage.h:
3461
3462         * storage/StorageArea.cpp: Copied from storage/OriginStorage.cpp.
3463         (WebCore::StorageArea::create):
3464         (WebCore::StorageArea::StorageArea):
3465         (WebCore::StorageArea::~StorageArea):
3466         (WebCore::StorageArea::copy):
3467         (WebCore::StorageArea::length):
3468         (WebCore::StorageArea::key):
3469         (WebCore::StorageArea::getItem):
3470         (WebCore::StorageArea::setItem):
3471         (WebCore::StorageArea::removeItem):
3472         (WebCore::StorageArea::contains):
3473         (WebCore::StorageArea::dispatchStorageEvent):
3474         * storage/StorageArea.h: Copied from storage/OriginStorage.h.
3475
3476 2008-04-10  Xan Lopez  <xan@gnome.org>
3477
3478         Reviewed by Alp Toker.
3479
3480         http://bugs.webkit.org/show_bug.cgi?id=18342
3481         Bug #18342 - Add logging to HTTP soup backend
3482         
3483         Add soup logging facilities to HTTP soup backend.
3484         Enable defining WEBKIT_SOUP_LOGGING, with values from
3485         0 to 3 for more verbosity.
3486         
3487         * platform/network/soup/ResourceHandleSoup.cpp:
3488         (WebCore::ResourceHandle::start):
3489
3490 2008-04-10  Timothy Hatcher  <timothy@apple.com>
3491
3492         Fixes floating point precision in the Resources graph labels by using String.sprintf to
3493         format the values. Also makes the image view use Number.bytesToString when showing the file
3494         size. Makes Number.bytesToString and Number.secondsToString take an optional formatter function
3495         so the Inspector can pass WebInspector.UIString, so the format strings can be localized.
3496
3497         https://bugs.webkit.org/show_bug.cgi?id=18381
3498         https://bugs.webkit.org/show_bug.cgi?id=14333
3499
3500         Reviewed by Adam Roben.
3501
3502         * English.lproj/InspectorLocalizedStrings.js: Added the new strings.
3503         * page/inspector/ImageView.js:
3504         (WebInspector.ImageView): Use Number.bytesToString to format this.resource.contentLength.
3505         * page/inspector/ResourcesPanel.js:
3506         (WebInspector.ResourceTransferTimeCalculator.prototype.formatValue): Pass WebInspector.UIString
3507         to Number.secondsToString.
3508         (WebInspector.ResourceTransferSizeCalculator.prototype.formatValue): Pass WebInspector.UIString
3509         to Number.bytesToString.
3510         * page/inspector/utilities.js:
3511         (Number.secondsToString): Added a formatterFunction argument. Use the formatter and format strings
3512         to control the number precision.
3513         (Number.bytesToString): Ditto.
3514
3515 2008-04-010  Alice Liu  <alice.liu@apple.com>
3516
3517         Reviewed by Dan Bernstein.
3518
3519         Fixed <rdar://5815856> CrashTracer: [USER] 8384 crashes in WebCore::Widget::getView const + 6
3520
3521         Test: fast/events/mouseout-dead-subframe.html
3522
3523         * page/EventHandler.cpp:
3524         dispatching a mouse event can change the document structure, necessitating
3525         a check for whether we still want to pass the event to the pre-determined subframe 
3526         (WebCore::EventHandler::handleMouseMoveEvent):
3527
3528 2008-04-10  Antti Koivisto  <antti@apple.com>
3529
3530         Reviewed by Eric.
3531
3532         Fix scale transform. This will be tested by the animation test suite when
3533         SVG animation support lands.
3534
3535         * svg/SVGTransformDistance.cpp:
3536         (WebCore::SVGTransformDistance::SVGTransformDistance):
3537
3538 2008-04-10  David Hyatt  <hyatt@apple.com>
3539
3540         Add a gradient fillRect method to GraphicsContext.  This is implemented only in the CG port.  I stubbed
3541         out a method in GraphicsContext.cpp with notImplemented().  Other platforms will need to add their own
3542         gradient fill methods.
3543
3544         Reviewed by aroben
3545
3546         * platform/graphics/GraphicsContext.cpp:
3547         (WebCore::GraphicsContext::fillRect):
3548         * platform/graphics/GraphicsContext.h:
3549         * platform/graphics/cg/GraphicsContextCG.cpp:
3550         (WebCore::GraphicsContext::fillRect):
3551
3552 2008-04-10  David Hyatt  <hyatt@apple.com>
3553
3554         Gradient improvements.  Support for adding color stops by Color and not just by String.  Add the ability to mark
3555         stops as already being sorted.
3556
3557         Reviewed by aroben
3558
3559         * platform/graphics/Gradient.cpp:
3560         (WebCore::Gradient::addColorStop):
3561         * platform/graphics/Gradient.h:
3562         (WebCore::Gradient::setStopsSorted):
3563
3564 2008-04-10  Timothy Hatcher  <timothy@apple.com>
3565
3566         Fixes the build where some wtf headers would not be copied due
3567         to a bug in some older versions of Xcode.
3568
3569         Rubber-stamped by Adam Roben.
3570
3571         * WebCore.xcodeproj/project.pbxproj: Adds a new script phase to handle
3572         the copying of the icu and ForwardingHeaders folder to WebCore's PrivateHeaders.
3573         Removes the old copy files phase and the icu and ForwardingHeaders folder references.
3574
3575 2008-04-09  Brady Eidson  <beidson@apple.com>
3576
3577         Reviewed by Mitz Pettel
3578
3579         Add the "onstorage" attribute for the body element to provide easy setup of StorageEvent handling.
3580
3581         Tests: storage/domstorage/sessionstorage/onstorage-attribute-markup.html
3582                storage/domstorage/sessionstorage/onstorage-attribute-setattribute.html
3583
3584         * html/HTMLAttributeNames.in: Added "onstorage"
3585         * html/HTMLBodyElement.cpp:
3586         (WebCore::HTMLBodyElement::parseMappedAttribute): Handle this attribute on the body element *only*
3587           because that's where the HTML5 spec says StorageEvents go.  This might change in the future
3588
3589 2008-04-09  Antti Koivisto  <antti@apple.com>
3590
3591         Reviewed by Mitz.
3592
3593         Remove a less-than-critical bit from Node and replace it with a hash. Those bits are valuable!
3594
3595         Also moved setting of the guard to dispatchSimulatedClick for better consistency. 
3596         No one else calls dispatchSimulatedMouseEvent() currently and this is really a click() specific behavior.
3597
3598         * dom/EventTargetNode.cpp:
3599         (WebCore::EventTargetNode::dispatchSimulatedMouseEvent):
3600         (WebCore::EventTargetNode::dispatchSimulatedClick):
3601         * dom/Node.cpp:
3602         (WebCore::Node::Node):
3603         * dom/Node.h:
3604
3605 2008-04-09  Sam Weinig  <sam@webkit.org>
3606
3607         Reviewed by Geoffrey Garen.
3608
3609         Fix for https://bugs.webkit.org/show_bug.cgi?id=18389
3610         Crash in JSDOMWindowWrapper::mark loading digg.com
3611
3612         - Add a null check to JSDOMWindowWrapper::mark for the case when the collector
3613           runs during its allocation.
3614         - Cleans up the creation of the window to be a little more straight forward.
3615
3616         * bindings/js/JSDOMWindowBase.cpp:
3617         (WebCore::JSDOMWindowBasePrivate::JSDOMWindowBasePrivate):
3618         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
3619         (WebCore::JSDOMWindowBase::clear):
3620         (WebCore::JSDOMWindowBase::wrapper):
3621         * bindings/js/JSDOMWindowBase.h:
3622         * bindings/js/JSDOMWindowWrapper.cpp:
3623         (WebCore::JSDOMWindowWrapper::JSDOMWindowWrapper):
3624         (WebCore::JSDOMWindowWrapper::mark):
3625         * bindings/js/JSDOMWindowWrapper.h:
3626         * bindings/js/kjs_proxy.cpp:
3627         (WebCore::KJSProxy::initScript):
3628         * bindings/scripts/CodeGeneratorJS.pm:
3629
3630 2008-04-09  Brady Eidson  <beidson@apple.com>
3631
3632         Rubberstamped by Mitzpettel
3633
3634         Added HTMLAttributeNames.in and HTMLTagNames.in to the xcodeproj for easy editing, 
3635         and sorted the html group
3636
3637         * WebCore.xcodeproj/project.pbxproj:
3638
3639 2008-04-09  Brent Fulgham  <bfulgham@gmail.com>
3640
3641         Reviewed by Mitz.
3642
3643         Correct build regression in Windows (Cairo) build due to changes
3644         in FontDescription.h signature.  (see http://bugs.webkit.org/show_bug.cgi?id=18394)
3645
3646         * rendering/RenderThemeWin.cpp:  Change for new font methods.
3647         (WebCore::RenderThemeWin::systemFont):
3648
3649 2008-04-09  Brady Eidson  <beidson@apple.com>
3650
3651         Reviewed by Sam Weinig
3652
3653         When enumerating a Storage object, the Storage built-ins should not be included, but the 
3654         prototype chain SHOULD be included.
3655
3656         * bindings/js/JSStorageCustom.cpp:
3657         (WebCore::JSStorage::customGetPropertyNames): Return false so the prototype chain is walked
3658
3659         * storage/Storage.idl: Mark all built-ins as "DontEnum"
3660
3661 2008-04-09  Brady Eidson  <beidson@apple.com>
3662
3663         Reviewed by Adam Roben
3664
3665         Per the HTML5 spec, enumerating a Storage object should walk the keys in the storage area, 
3666         and should not return the built-in properties.
3667
3668         Test: storage/domstorage/sessionstorage/enumerate-storage.html
3669
3670         * bindings/js/JSLocationCustom.cpp:
3671         (WebCore::JSLocation::customGetPropertyNames): Removed the name from an unused parameter
3672
3673         * bindings/js/JSStorageCustom.cpp:
3674         (WebCore::JSStorage::customGetPropertyNames): Copy all of the keys into the property names array
3675
3676         * storage/Storage.idl: Add CustomGetPropertyNames
3677
3678 2008-04-09  Timothy Hatcher  <timothy@apple.com>
3679
3680         Fixes the regression where resource time/size pills do not
3681         update during a load in the Inspector.
3682
3683         http://bugs.webkit.org/show_bug.cgi?id=18374
3684
3685         Reviewed by John Sullivan.
3686
3687         * page/inspector/ResourcesPanel.js:
3688         (ResourcesPanel.prototype.show): Remove an unneeded call to _updateGraphBars,
3689         since _updateSidebarWidth already calls _updateGraphBars.
3690         (ResourcesPanel.prototype.addResource): Call updateGraphSideWidth.
3691         (ResourcesPanel.prototype._updateGraphBars): Ditto.
3692         (ResourceSidebarTreeElement.prototype.updateGraphSideWidth): Update the
3693         style for graphSideElement with the passed in width.
3694
3695 2008-04-09  Antti Koivisto  <antti@apple.com>
3696
3697         Reviewed by Mitz.
3698
3699         Avoid unnecessary calls to virtual updateStyleAttributeIfNeeded() method.
3700         - do the the checking in call sites instead of inside the function
3701         - rename to updateStyleAttribute()
3702         - use namedAttrMap directly (for getting id attribute) in insertedIntoDocument/removedFromDocument 
3703           to avoid calling attributes() which may trigger style attribute update.
3704         
3705         * dom/Element.cpp:
3706         (WebCore::Element::attributes):
3707         (WebCore::Element::getAttribute):
3708         (WebCore::Element::hasAttributes):
3709         (WebCore::Element::insertedIntoDocument):
3710         (WebCore::Element::removedFromDocument):
3711         * dom/Element.h:
3712         (WebCore::Element::updateStyleAttribute):
3713         * dom/NamedAttrMap.cpp:
3714         (WebCore::NamedAttrMap::addAttribute):
3715         * dom/StyledElement.cpp:
3716         (WebCore::StyledElement::updateStyleAttribute):
3717         * dom/StyledElement.h:
3718
3719 2008-04-09  Timothy Hatcher  <timothy@apple.com>
3720
3721         A more complete fix for: can't drag the Web Inspector when grabbing
3722         in the toolbar area. Makes dragging under the search field in the
3723         empty space work again.
3724
3725         http://bugs.webkit.org/show_bug.cgi?id=18373
3726
3727         Reviewed by Adam Roben.
3728
3729         * page/inspector/inspector.js:
3730         (WebInspector.toolbarDragStart): Prevent dragging if the event target
3731         is a toggleable toolbar item. Allow dragging when the target is a
3732         normal toolbar item.
3733
3734 2008-04-08  Sam Weinig  <sam@webkit.org>
3735
3736         Reviewed by Timothy Hatcher.
3737
3738         Fix for http://bugs.webkit.org/show_bug.cgi?id=18373
3739         REGRESSION: Can't drag the Web Inspector when grabbing in the toolbar area
3740
3741         * page/inspector/inspector.css:
3742
3743 2008-04-08  Christian Persch  <chpe@gnome.org>
3744
3745         Reviewed by Alp Toker.
3746
3747         http://bugs.webkit.org/show_bug.cgi?id=18360
3748         "missing sentinel" warnings in PluginDatabaseGtk.cpp
3749
3750         Use NULL, not 0 as sentinel in varargs calls.
3751
3752         * plugins/gtk/PluginDatabaseGtk.cpp:
3753         (WebCore::PluginDatabase::getPluginPathsInDirectories):
3754         (WebCore::PluginDatabase::defaultPluginDirectories):
3755
3756 2008-04-04  Sam Weinig  <sam@webkit.org>
3757
3758         Reviewed by Geoffrey Garen.
3759
3760         First step in implementing the "split window"
3761
3762         - This patch takes the first step in changing the window navigation model
3763           from clearing the window properties on navigation, to replacing
3764           an inner window.  This is necessary to safely perform security checks
3765           using the lexical global object.
3766
3767           This first step adds a new class called JSDOMWindowWrapper, which wraps
3768           the real window object.  All JS calls that would go to the window object
3769           now go to it, which it forwards to the current inner window.  To accomplish
3770           this, the wrapper window is used as the ThisValue wherever the window was used
3771           before.
3772
3773         * WebCore.base.exp:
3774         * WebCore.xcodeproj/project.pbxproj:
3775         * bindings/js/JSDOMWindowBase.cpp:
3776         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
3777         (WebCore::JSDOMWindowBase::clear): Reset the wrapper windows prototype too.
3778         (WebCore::JSDOMWindowBase::toThisObject):
3779         (WebCore::JSDOMWindowBase::wrapper):
3780         (WebCore::windowProtoFuncAToB):
3781         (WebCore::windowProtoFuncBToA):
3782         (WebCore::windowProtoFuncOpen):
3783         (WebCore::windowProtoFuncSetTimeout):
3784         (WebCore::windowProtoFuncClearTimeout):
3785         (WebCore::windowProtoFuncSetInterval):
3786         (WebCore::windowProtoFuncAddEventListener):
3787         (WebCore::windowProtoFuncRemoveEventListener):
3788         (WebCore::windowProtoFuncShowModalDialog):
3789         (WebCore::windowProtoFuncNotImplemented):
3790         (WebCore::toJS):
3791         * bindings/js/JSDOMWindowBase.h:
3792         Fix to expect the wrapper as the thisObj.
3793         * bindings/js/JSDOMWindowCustom.cpp:
3794         (WebCore::JSDOMWindow::postMessage):
3795         (WebCore::toDOMWindow):
3796         * bindings/js/JSDOMWindowWrapper.cpp: Added.
3797         (WebCore::):
3798         (WebCore::JSDOMWindowWrapper::JSDOMWindowWrapper):
3799         (WebCore::JSDOMWindowWrapper::~JSDOMWindowWrapper):
3800         (WebCore::JSDOMWindowWrapper::mark):
3801         (WebCore::JSDOMWindowWrapper::className):
3802         (WebCore::JSDOMWindowWrapper::getOwnPropertySlot):
3803         (WebCore::JSDOMWindowWrapper::put):
3804         (WebCore::JSDOMWindowWrapper::deleteProperty):
3805         (WebCore::JSDOMWindowWrapper::getPropertyNames):
3806         (WebCore::JSDOMWindowWrapper::getPropertyAttributes):
3807         (WebCore::JSDOMWindowWrapper::defineGetter):
3808         (WebCore::JSDOMWindowWrapper::defineSetter):
3809         (WebCore::JSDOMWindowWrapper::lookupGetter):
3810         (WebCore::JSDOMWindowWrapper::lookupSetter):
3811         (WebCore::JSDOMWindowWrapper::toGlobalObject):
3812         (WebCore::JSDOMWindowWrapper::impl):
3813         (WebCore::JSDOMWindowWrapper::disconnectFrame):
3814         (WebCore::JSDOMWindowWrapper::clear):
3815         (WebCore::toJS):
3816         * bindings/js/JSDOMWindowWrapper.h: Added.
3817         (WebCore::JSDOMWindowWrapper::innerWindow):
3818         (WebCore::JSDOMWindowWrapper::setInnerWindow):
3819         (WebCore::JSDOMWindowWrapper::classInfo):
3820         Forward methods to the innerWindow.
3821         * bindings/js/JSHTMLDocumentCustom.cpp:
3822         (WebCore::JSHTMLDocument::open):
3823         * bindings/js/ScheduledAction.cpp:
3824         (WebCore::ScheduledAction::execute):
3825         * bindings/js/kjs_events.cpp:
3826         (WebCore::JSAbstractEventListener::handleEvent):
3827         * bindings/js/kjs_proxy.cpp:
3828         (WebCore::KJSProxy::~KJSProxy):
3829         (WebCore::KJSProxy::evaluate):
3830         (WebCore::KJSProxy::clear):
3831         (WebCore::KJSProxy::initScript):
3832         (WebCore::KJSProxy::clearDocumentWrapper):
3833         (WebCore::KJSProxy::processingUserGesture):
3834         (WebCore::KJSProxy::attachDebugger):
3835         * bindings/js/kjs_proxy.h:
3836         (WebCore::KJSProxy::haveWindowWrapper):
3837         (WebCore::KJSProxy::windowWrapper):
3838         (WebCore::KJSProxy::globalObject):
3839         (WebCore::KJSProxy::initScriptIfNeeded):
3840         Hold onto the wrapper window instead of global object.  As a convenience,
3841         keep the globalObject() as a forward to the inner window.
3842         * bindings/objc/DOMUtility.mm:
3843         (KJS::createDOMWrapper):
3844         * bindings/scripts/CodeGeneratorJS.pm:
3845         * dom/Document.cpp:
3846         (WebCore::Document::domWindow):
3847         * dom/Document.h:
3848         (WebCore::Document::defaultView):
3849         * loader/FrameLoader.cpp:
3850         (WebCore::FrameLoader::dispatchWindowObjectAvailable):
3851         * page/DOMWindow.idl:
3852         * page/Frame.cpp:
3853         (WebCore::Frame::~Frame):
3854         (WebCore::Frame::pageDestroyed):
3855
3856 2008-04-08  Brady Eidson  <beidson@apple.com>
3857
3858         Encourage Windows to rebuild - AGAIN...
3859
3860         * WebCore.vcproj/build-generated-files.sh:
3861         * bindings/scripts/CodeGenerator.pm:
3862         * bindings/scripts/CodeGeneratorJS.pm:
3863         * config.h:
3864
3865 2008-04-08  Brady Eidson  <beidson@apple.com>
3866
3867         OMG release builds didn't have this flag Windows build bots I'm so 
3868         sorry will you ever forgive me?
3869
3870         (Found by Stephanie, rubberstamped and landed by Brady)
3871
3872         * WebCore.vcproj/WebCore.vcproj: Add ENABLE_DOM_STORAGE for release builds
3873
3874 2008-04-08  Timothy Hatcher  <timothy@apple.com>
3875
3876         Fixes a crash in KJS::JSValue::toObject when closing
3877         Safari with Inspector open.
3878
3879         http://bugs.webkit.org/show_bug.cgi?id=18371
3880
3881         Reviewed by Adam Roben.
3882
3883         * page/InspectorController.cpp:
3884         (WebCore::inspectedWindow): NULL check the result of toJSDOMWindow.
3885         Return JSNull if JSDOMWindow is 0.
3886         * page/inspector/ElementsPanel.js:
3887         (ElementsPanel.prototype.reset): NULL check the result of
3888         InspectorController.inspectedWindow.
3889
3890 2008-04-08  Adam Roben  <aroben@apple.com>
3891
3892         Wx build fix
3893
3894         * webcore-wx.bkl: Removed entry for non-existent file.
3895
3896 2008-04-08  Adam Roben  <aroben@apple.com>
3897
3898         qmake build fixes
3899
3900         * WebCore.pro: Removed entries for non-existent files.
3901
3902 2008-04-08  Brady Eidson  <beidson@apple.com>
3903
3904         Rubberstamped by Adam Roben
3905         
3906         Touch some files to *strongly* encourage Windows to rebuilt with DOM_STORAGE enabled
3907
3908         * WebCore.vcproj/build-generated-files.sh:
3909         * bindings/scripts/CodeGenerator.pm:
3910         * config.h:
3911
3912 2008-04-08  Timothy Hatcher  <timothy@apple.com>
3913
3914         Implements the majority of the Inspector UI refresh as shown at:
3915         http://trac.webkit.org/projects/webkit/wiki/ProposedWebInspectorUIRefresh
3916
3917         http://bugs.webkit.org/show_bug.cgi?id=17773
3918
3919         A few areas that have not been re-implemented with the new UI are:
3920         * Search and search results.
3921         * Request and response headers in the Resources panel.
3922         * Changing the sorting, grouping or toggling small rows in Resources.
3923         * Image and font previews in the icon of resources.
3924
3925         Reviewed by Adam Roben.
3926
3927         * English.lproj/InspectorLocalizedStrings.js: Updated to match actual strings.
3928         * WebCore.vcproj/WebCore.vcproj: Added new files.
3929         * page/InspectorController.cpp:
3930         (WebCore::InspectorController::setWindowVisible): Call resetScriptObjects()
3931         instead of individual clear functions.
3932         (WebCore::InspectorController::populateScriptObjects): Renamed from
3933         populateScriptResources.
3934         (WebCore::InspectorController::addDatabaseScriptResource): Call
3935         addDatabase instead of addResource.
3936         (WebCore::InspectorController::removeDatabaseScriptResource): Call
3937         removeDatabase instead of removeResource.
3938         (WebCore::InspectorController::resetScriptObjects): Renamed from
3939         clearScriptResources.
3940         (WebCore::InspectorController::didCommitLoad): Call resetScriptObjects()
3941         instead of individual clear functions.
3942         * page/InspectorController.h: Rename functions.
3943         * page/inspector/Console.js: Changed the object name to Console from
3944         ConsolePanel. Made it inherit the prototype from View. Added code
3945         to animate in and out.
3946         * page/inspector/Database.js: Removed title updating and Resource
3947         pseudo-subclassing. Made more of a Model object that just encapsulates
3948         data. Add a getter for table names.
3949         * page/inspector/DatabaseQueryView.js: Added. Implements the view seen
3950         when selecting a Database in the DatabasesPanel. Implemented as an
3951         interactive console-like area.
3952         * page/inspector/DatabaseTableView.js: Added. Implements the view seen
3953         when selecting a Database Table in the DatabasesPanel. Matches the old
3954         Browse view of Database panels.
3955         * page/inspector/DatabasesPanel.js: Changed the object name to DatabasesPanel
3956         from DatabasePanel. Implements a panel that shows a sidebar of Databases
3957         and Database Tables.
3958         * page/inspector/ElementsPanel.js:  Changed the object name to ElementsPanel
3959         from DocumentPanel. Implements the DOM tree that shows the DOM rooted at the
3960         main resource.
3961         * page/inspector/FontView.js: Use this.contentElement instead of this.element.
3962         * page/inspector/ImageView.js: Ditto.
3963         * page/inspector/Images/clearConsoleButtons.png: Added.
3964         * page/inspector/Images/consoleButtons.png: Added.
3965         * page/inspector/Images/darkShadow.png: Flipped.
3966         * page/inspector/Images/database.png: Modified to be 32x32.
3967         * page/inspector/Images/databaseTable.png: Added.
3968         * page/inspector/Images/databasesIcon.png: Added.
3969         * page/inspector/Images/disclosureTriangleSmallDown.png: Added.
3970         * page/inspector/Images/disclosureTriangleSmallDownBlack.png: Added.
3971         * page/inspector/Images/disclosureTriangleSmallDownWhite.png: Added.
3972         * page/inspector/Images/disclosureTriangleSmallRight.png: Added.
3973         * page/inspector/Images/disclosureTriangleSmallRightBlack.png: Added.
3974         * page/inspector/Images/disclosureTriangleSmallRightDown.png: Added.
3975         * page/inspector/Images/disclosureTriangleSmallRightDownBlack.png: Added.
3976         * page/inspector/Images/disclosureTriangleSmallRightDownWhite.png: Added.
3977         * page/inspector/Images/disclosureTriangleSmallRightWhite.png: Added.
3978         * page/inspector/Images/dockButtons.png: Added.
3979         * page/inspector/Images/elementsIcon.png: Added.
3980         * page/inspector/Images/gradientHighlightBottom.png:
3981         * page/inspector/Images/resourceCSSIcon.png: Added.
3982         * page/inspector/Images/resourceDocumentIcon.png: Added.
3983         * page/inspector/Images/resourcePlainIcon.png: Added.
3984         * page/inspector/Images/resourcesIcon.png: Added.
3985         * page/inspector/Images/resourcesSizeGraphIcon.png: Added.
3986         * page/inspector/Images/resourcesTimeGraphIcon.png: Added.
3987         * page/inspector/Images/scriptsIcon.png: Added.
3988         * page/inspector/Images/segment.png: Modified to fit the taller status bar.
3989         * page/inspector/Images/segmentEnd.png: Ditto.
3990         * page/inspector/Images/segmentHover.png: Ditto.
3991         * page/inspector/Images/segmentHoverEnd.png: Ditto.
3992         * page/inspector/Images/segmentSelected.png: Ditto.
3993         * page/inspector/Images/segmentSelectedEnd.png: Ditto.
3994         * page/inspector/Images/sidebarSelectionBackground.png: Added.
3995         * page/inspector/Images/sidebarSelectionBackgroundFocused.png: Added.
3996         * page/inspector/Images/sidebarSelectionBackgroundInactive.png: Added.
3997         * page/inspector/Images/sidebarSmallSelectionBackground.png: Added.
3998         * page/inspector/Images/sidebarSmallSelectionBackgroundFocused.png: Added.
3999         * page/inspector/Images/sidebarSmallSelectionBackgroundInactive.png: Added.
4000         * page/inspector/Images/statusbarBackground.png: Added.
4001         * page/inspector/Images/statusbarBottomBackground.png: Added.
4002         * page/inspector/Images/statusbarButtons.png: Added.
4003         * page/inspector/Images/statusbarResizerVertical.png: Added.
4004         * page/inspector/Images/toolbarItemSelected.png: Added.
4005         * page/inspector/Panel.js: Added support for toolbar items and status bar items.
4006         Inherits from the View prototype.
4007         * page/inspector/Resource.js: Removed title updating and the ResourceTreeElement.
4008         Made more of a Model object that just encapsulates data.
4009         * page/inspector/ResourceCategory.js: Removed the ResourceCategoryTreeElement.
4010         Made more of a Model object that just encapsulates data.
4011         * page/inspector/ResourceView.js: A simple base object for Resource views
4012         shown in ResourcesPanel. Inherits from the View prototype.
4013         * page/inspector/ResourcesPanel.js: Changed the object name to ResourcesPanel
4014         from NetworkPanel. Implements the timeline graph, size graph and resource
4015         viewing by using ResourceViews.
4016         * page/inspector/SidebarTreeElement.js: Added. Inherits from TreeElement and implements
4017         a section element and a regular element that has an icon, title and optional subtitle.
4018         * page/inspector/SourceView.js: Use this.contentElement instead of this.element.
4019         * page/inspector/StylesSidebarPane.js: Null check WebInspector.mainResource.
4020         * page/inspector/View.js: Added. A simple object to manage showing and hiding an element.
4021         * page/inspector/WebKit.qrc: Added new files.
4022         * page/inspector/inspector.css: New and changed style rules to support the new UI.
4023         * page/inspector/inspector.html: New and changed HTML for the UI. The search field
4024         is disabled until search is reimplemented.
4025         * page/inspector/inspector.js: Removed code related to the sidebar and back-forward lists.
4026         Also removed code related to navigation to panels. Added code to instantiate the new
4027         panels and setup the toolbar.
4028
4029 2008-04-08  Dan Bernstein  <mitz@apple.com>
4030
4031         Reviewed by Antti Koivisto.
4032
4033         - fix a regression from r31313 which made the inspector highlight and
4034           yellow find highlight for table cells with extra top appear in the
4035           wrong position
4036
4037         * rendering/LayoutState.cpp:
4038         (WebCore::LayoutState::LayoutState): Changed absolutePosition() to
4039         absolutePositionForContent(), to get the right position for children of
4040         table cells. This is the correct fix for this part of r31313.
4041         * rendering/RenderBox.cpp:
4042         (WebCore::RenderBox::absolutePosition): Reverted the change from r31313
4043         by changing absolutePosition() to absolutePositionForContent() here too.
4044         * rendering/RenderObject.h:
4045         (WebCore::RenderObject::absolutePositionForContent): Changed to return
4046         the result from absolutePosition().
4047         * rendering/RenderTableCell.cpp:
4048         (WebCore::RenderTableCell::absoluteClippedOverflowRect): Turned the
4049         "else" case into an early return.
4050         (WebCore::RenderTableCell::absolutePosition): Reverted the change from
4051         r31313.
4052
4053 2008-04-08  Dan Bernstein  <mitz@apple.com>
4054
4055         Reviewed by Antti Koivisto.
4056
4057         - fix http://bugs.webkit.org/show_bug.cgi?id=18172
4058           REGRESSION (r31114-31132): Page renders structured almost horizontally (at flickr.com)
4059
4060         Test: fast/block/float/br-with-clear-2.html
4061
4062         * rendering/bidi.cpp:
4063         (WebCore::RenderBlock::layoutInlineChildren): The existing code for
4064         handling a float-clearing <br> in incremental layout had several bugs in
4065         it: it only applied when the <br> was on the last line of the block; it
4066         assumed that the <br> was always the rightmost box on the line (which is
4067         false in right-to-left runs); and in some places it looked at the last
4068         child of the block instead of the last box on the line. Fixed these
4069         bugs.
4070
4071 2008-04-08  Adam Roben  <aroben@apple.com>
4072
4073         Mac build fix
4074
4075         * WebCore.xcodeproj/project.pbxproj: Removed MainThread* files which
4076         were moved to WTF.
4077
4078 2008-04-08  Timothy Hatcher  <timothy@apple.com>
4079
4080         Change WebInspector.elementDragStart and WebInspector.elementDragEnd to have more
4081         state, so calling elementDragEnd does not need the listener functions. Also makes
4082         calling elementDragStart again without elementDragEnd work correctly.
4083
4084         Reviewed by Adam Roben.
4085
4086         * page/inspector/ElementsPanel.js:
4087         (DocumentPanel.prototype.rightSidebarResizerDragStart): Just call WebInspector.elementDragStart.
4088         Removed code that stored away the listeners now that elementDragStart does it.
4089         (DocumentPanel.prototype.rightSidebarResizerDragEnd): Just call WebInspector.elementDragEnd.
4090         Removed code that deleted listeners properties now that elementDragEnd does it.
4091         * page/inspector/inspector.js:
4092         (WebInspector.sidebarResizerDragEnd): Pass less arguments to elementDragEnd.
4093         (WebInspector.searchResultsResizerDragEnd): Ditto.
4094         (WebInspector.elementDragStart): Store the listeners as private properties on WebInspector.
4095         If the properties are already defined, call elementDragEnd first.
4096         (WebInspector.elementDragEnd): Remove the event listeners using the stored properties.
4097         Delete the private listener properties.
4098
4099 2008-04-08  Adam Roben  <aroben@apple.com>
4100
4101         Build fix
4102
4103         * ForwardingHeaders/wtf/MainThread.h: Added. Forgot to commit this.
4104
4105 2008-04-08  Adam Roben  <aroben@apple.com>
4106
4107         Move callOnMainThread to WTF
4108
4109         Reviewed by Alexey Proskuryakov.
4110
4111         * GNUmakefile.am:
4112         * WebCore.pro:
4113         * WebCore.vcproj/WebCore.vcproj:
4114         * WebCoreSources.bkl:
4115         Removed MainThread files.
4116
4117         * bindings/js/JSCustomSQLTransactionCallback.cpp:
4118         * loader/icon/IconDatabase.cpp:
4119         (WebCore::iconDatabase):
4120         * storage/Database.cpp:
4121         (WebCore::Database::Database):
4122         * storage/DatabaseTracker.cpp:
4123         Updated #includes and replaced calls to
4124         WebCore::initializeThreadingAndMainThread with calls to
4125         KJS::initializeThreading.
4126
4127         * platform/MainThread.cpp: Removed.
4128         * platform/MainThread.h: Removed.
4129         * platform/gtk/MainThreadGtk.cpp: Removed.
4130         * platform/mac/MainThreadMac.mm: Removed.
4131         * platform/qt/MainThreadQt.cpp: Removed.
4132         * platform/win/MainThreadWin.cpp: Removed.
4133         * platform/wx/MainThreadWx.cpp: Removed.
4134
4135 2008-04-07  Timothy Hatcher  <timothy@apple.com>
4136
4137         Makes the Network timeline graph resource sizes on the bar graph
4138         when Transfer Size is selected.
4139
4140         http://bugs.webkit.org/show_bug.cgi?id=18351
4141
4142         Reviewed by Adam Roben.
4143
4144         * page/inspector/Resource.js:
4145         (WebInspector.Resource.CompareByTime): Array sorting function for time.
4146         Copied from WebInspector.NetworkPanel.timelineEntryCompare.
4147
4148         * page/inspector/ResourcesPanel.js:
4149         (WebInspector.NetworkPanel): Set the selectedIndex of graphModeSelectElement to
4150         make Transfer Time the default graph.
4151         (WebInspector.NetworkPanel.prototype.changeGraphMode): Call calculator.reset,
4152         _refreshAllResources and _updateGraphDividersIfNeeded.
4153         (WebInspector.NetworkPanel.prototype.get totalDuration): Removed.
4154         (WebInspector.NetworkPanel.prototype._updateGraphBoundriesIfNeeded): Removed boundary
4155         checking code and just call calculator.updateBoundries.
4156         (WebInspector.NetworkPanel.prototype._updateGraphDividersIfNeeded): Add a force argument.
4157         Use calculator.boundarySpan when computing the slice. If the slice is NaN, don't make a label.
4158         Ask the calculator to format the label values for each slice.
4159         (WebInspector.NetworkPanel.prototype.clearTimeline): Call calculator.reset.
4160         (WebInspector.NetworkPanel.timelineEntryCompare): Call WebInspector.Resource.CompareByTime.
4161
4162         (WebInspector.NetworkTimelineEntry.prototype.refresh): Ask the panel's calculator to compute
4163         bar graph percentages for a resource. Use those percentages to change the bar style.
4164
4165         (WebInspector.ResourceCalculator): Renamed from WebInspector.TimelineValueCalculator.
4166         (WebInspector.ResourceCalculator.prototype.computeSummaryValues): Changed the Array.forEach
4167         to a normal for loop. Work with resources instead of TimelineEntries.
4168         (WebInspector.ResourceCalculator.prototype.computeBarGraphPercentages): Return basic bar graph
4169         percents with start always being zero.