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