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