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