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