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