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