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