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