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