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