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