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