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