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