WebCore:
[WebKit-https.git] / WebCore / ChangeLog
1 2008-04-28  Brady Eidson <beidson@apple.com>
2
3         Reviewed by Sam Weinig
4
5         Add Storage.clear(), per updates to HTML5
6
7         Tests: storage/domstorage/localstorage/clear.html
8                storage/domstorage/sessionstorage/clear.html
9
10         * storage/LocalStorageArea.cpp:
11         (WebCore::LocalStorageArea::areaCleared):
12         * storage/LocalStorageArea.h:
13
14         * storage/SessionStorageArea.cpp:
15         (WebCore::SessionStorageArea::areaCleared):
16         * storage/SessionStorageArea.h:
17
18         * storage/Storage.cpp:
19         (WebCore::Storage::clear):
20         * storage/Storage.h:
21         * storage/Storage.idl:
22
23         * storage/StorageArea.cpp:
24         (WebCore::StorageArea::internalClear):
25         * storage/StorageArea.h:
26         (WebCore::StorageArea::clear):
27
28 2008-04-28  Adele Peterson  <adele@apple.com>
29
30         Reviewed by Dan Bernstein, Tim Hatcher, Anders Carlsson, and Darin Adler.
31
32         WebCore part of fix for <rdar://problem/3709505>
33         Safari should have a way to upload bundles from the file upload control (as zip)
34
35         * WebCore.base.exp: Added symbols.
36
37         * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::formData): Ask the application if a file will need to be replaced before it's uploaded.
38           It will also give the replacement filename which is used to determine the correct mime-type and to construct the correct header.
39
40         * loader/FrameLoader.cpp:
41         (WebCore::FrameLoader::submitForm): Asks the application to generate any files for the form data before a form submission starts.
42         (WebCore::FrameLoader::loadItem): ditto.
43         * loader/ResourceLoader.cpp:
44         (WebCore::ResourceLoader::didReceiveResponse): Tells the FormData from the request to remove any generated files if it needs to.
45         (WebCore::ResourceLoader::didCancel): ditto.
46         (WebCore::ResourceLoader::didFail): ditto.
47
48         * platform/network/FormData.cpp:
49         (WebCore::FormData::FormData): Initializes m_hasGeneratedFiles, which keeps track of whether there are files that will need to be removed.
50         (WebCore::FormData::~FormData): Added.  Assert that there are no files that need to be removed, but if there are, release builds will still remove them here.
51         (WebCore::FormData::appendFile): Passes along a shouldGenerateFile flag to the FormDataElement.
52         (WebCore::FormData::generateFiles): Added. Iterates through the FormDataElements, and using the ChromeClient pointer, asks the application to
53          create any compressed files so the FormDataElements can store the paths.
54         (WebCore::FormData::removeGeneratedFilesIfNeeded): Added.  Removes generated files and their directories (if empty).
55         * platform/network/FormData.h:
56         (WebCore::FormDataElement::FormDataElement): Added a boolean to track whether the file will need to be generated,
57          and a string to hold the path of the generated file.
58
59         * platform/network/mac/FormDataStreamMac.mm:
60         (WebCore::advanceCurrentStream): Uses the generated file path instead of the original file path when streaming the file.
61         (WebCore::setHTTPBody): Uses the generated file path when determining the size of the file to be uploaded.
62
63         * platform/FileSystem.h: Added directoryName.
64         * platform/posix/FileSystemPOSIX.cpp: (WebCore::directoryName): Added.
65         * platform/gtk/FileSystemGtk.cpp: (WebCore::directoryName): Added empty implementation.
66         * platform/qt/FileSystemQt.cpp: (WebCore::directoryName): ditto.
67         * platform/win/FileSystemWin.cpp: (WebCore::directoryName): ditto.
68         * platform/wx/FileSystemWx.cpp: (WebCore::directoryName): ditto.
69
70         Added new ChromeClient methods to give the application control over the file compression for uploading.
71         * page/Chrome.cpp:
72         (WebCore::ChromeClient::shouldReplaceWithGeneratedFileForUpload): Added a default implementation.
73         (WebCore::ChromeClient::generateReplacementFile): ditto.
74         * page/ChromeClient.h:
75
76 2008-04-28  Anders Carlsson  <andersca@apple.com>
77
78         Reviewed by Sam, Mark, Adele and Darin.
79
80         Add a (currently not called) method for opening the application cache database.
81         
82         * WebCore.base.exp:
83         * loader/appcache/ApplicationCacheStorage.cpp:
84         (WebCore::ApplicationCacheStorage::setCacheDirectory):
85         (WebCore::ApplicationCacheStorage::openDatabase):
86         * loader/appcache/ApplicationCacheStorage.h:
87
88 2008-04-28  Alice Liu  <alice.liu@apple.com>
89
90         Reviewed by Darin.
91
92         Fix <rdar://problem/4911289> Add tabindex property to all children 
93         of HTMLElement (7138)
94         http://bugs.webkit.org/show_bug.cgi?id=7138
95
96         Test: fast/events/tabindex-focus-blur-all.html
97
98         * WebCore.xcodeproj/project.pbxproj:
99         * bindings/objc/DOMPrivate.h:
100         -DOMHTMLLabelElementPrivate.h and DOMHTMLLegendElementPrivate.h are no
101          longer needed
102
103         * bindings/objc/PublicDOMInterfaces.h:
104         -Moving focus, blur, tabindex to HTMLElement from its descendants.
105
106         * dom/Node.cpp:
107         (WebCore::Node::Node):
108         (WebCore::Node::isFocusable):
109         (WebCore::Node::isKeyboardFocusable):
110         -The concept of being focusable now needs to account for tabindex
111         attribute.
112
113         * dom/Node.h:
114         -Need to use a bit to keep track of whether tabindex was explicitly set
115          to 0 or was just initialized to 0.
116         (WebCore::Node::tabIndex):
117         -Make this virtual so that Anchors and GenericFormElements can determine
118          tabindex without accounting for focusability
119         (WebCore::Node::setTabIndexExplicitly):
120         -Renamed setTabIndex() to setTabIndexExplicitly() so as not to hide
121          behind and/or be confused for HTMLElement::setTabIndex
122
123         * html/HTMLAnchorElement.cpp:
124         * html/HTMLAnchorElement.h:
125         (WebCore::HTMLAnchorElement::tabIndex):
126         * html/HTMLGenericFormElement.cpp:
127         * html/HTMLGenericFormElement.h:
128         (WebCore::HTMLGenericFormElement::tabIndex):
129         -Anchors and form elements are normally focusable, and need to avert the
130          check for focusability in HTMLElement::tabIndex
131          because tabIndex could be queried before a first layout happens.
132
133         * html/HTMLElement.cpp:
134         (WebCore::HTMLElement::parseMappedAttribute):
135         -Function Node::setTabIndex changed to Node::setTabIndexExplicitly
136         (WebCore::HTMLElement::isFocusable):
137         -The concept of being focusable now needs to account for tabindex
138          attribute.
139         (WebCore::HTMLElement::tabIndex):
140         -HTML5 specifies that querying tabindex for elements that aren't
141          focusable shall return -1
142         (WebCore::HTMLElement::setTabIndex):
143         -New default implementation
144         * html/HTMLElement.h:
145
146         * html/HTMLLegendElement.cpp:
147         (WebCore::HTMLLegendElement::focus):
148         -Now with HTML5's enhanced specification of tabindex, legend elements
149          themselves shall focus (if they should), and not the first form element 
150          they encapsulate.  This matches Firefox behavior.  HTMLLabelElements
151          still forward focus to the encapsulated element.  This also matches
152          other browsers. 
153
154         * html/HTMLAreaElement.cpp:
155         (WebCore::HTMLAreaElement::isFocusable):
156         * html/HTMLAreaElement.h:
157         -HTMLAreaElement isn't subject to the same focusability requirements as
158          its parent, HTMLAnchorElement. Default HTMLElement implementation is
159          desired.  
160
161         * html/HTMLFieldSetElement.cpp:
162         (WebCore::HTMLFieldSetElement::isFocusable):
163         * html/HTMLLegendElement.cpp:
164         (WebCore::HTMLLegendElement::isFocusable):
165         * html/HTMLOptGroupElement.cpp:
166         (WebCore::HTMLOptGroupElement::isFocusable):
167         * html/HTMLOptionElement.cpp:
168         (WebCore::HTMLOptionElement::isFocusable):
169         -These elements aren't subject to the same focusability requirements as
170          their parent, HTMLGenericFormElement. Default HTMLElement 
171          implementation is desired.  
172
173         * html/HTMLAnchorElement.idl:
174         * html/HTMLAreaElement.idl:
175         * html/HTMLButtonElement.idl:
176         * html/HTMLElement.idl:
177         * html/HTMLInputElement.idl:
178         * html/HTMLLabelElement.idl:
179         * html/HTMLLegendElement.idl:
180         * html/HTMLObjectElement.idl:
181         * html/HTMLSelectElement.idl:
182         * html/HTMLTextAreaElement.idl:
183         -Moving tabindex attribute, focus and blur methods from descendants of
184          HTMLElement to HTMLElement
185
186 2008-04-28  Dan Bernstein  <mitz@apple.com>
187
188         Reviewed by Dave Hyatt.
189
190         - support multiple box- and text-shadows
191
192         Tests: fast/css/shadow-multiple.html
193                fast/repaint/shadow-multiple-horizontal.html
194                fast/repaint/shadow-multiple-strict-horizontal.html
195                fast/repaint/shadow-multiple-strict-vertical.html
196                fast/repaint/shadow-multiple-vertical.html
197
198         * css/CSSComputedStyleDeclaration.cpp:
199         (WebCore::valueForShadow): Changed to account for reversing the order
200         of the shadow values in the ShadowData list.
201
202         * css/CSSValueList.cpp:
203         (WebCore::CSSValueList::prepend): Added.
204         * css/CSSValueList.h:
205
206         * rendering/InlineFlowBox.cpp:
207         (WebCore::InlineFlowBox::placeBoxesHorizontally): Changed to account for
208         all shadows in overflow calculation.
209         (WebCore::InlineFlowBox::placeBoxesVertically): Ditto.
210         (WebCore::InlineFlowBox::paint): Changed to account for all shadows
211         when testing for intersection with the damage rect.
212         (WebCore::InlineFlowBox::paintTextDecorations): Changed to paint all
213         shadows.
214
215         * rendering/InlineTextBox.cpp:
216         (WebCore::paintTextWithShadows): Factored out from paint() and changed
217         to paint all shadows.
218         (WebCore::InlineTextBox::paint): Moved the text painting code out to
219         paintTextWithShadows(). Changed to not paint shadows for markers and
220         composition underlines and in "force black text" mode.
221         (WebCore::InlineTextBox::paintSelection):
222         (WebCore::InlineTextBox::paintCompositionBackground):
223         (WebCore::InlineTextBox::paintDecoration): Changed to paint all shadows.
224         * rendering/InlineTextBox.h: Changed some public methods to private
225         or protected.
226
227         * rendering/RenderBlock.cpp:
228         (WebCore::RenderBlock::overflowHeight): Changed to account for all
229         shadows.
230         (WebCore::RenderBlock::overflowWidth): Ditto.
231         (WebCore::RenderBlock::overflowLeft): Ditto.
232         (WebCore::RenderBlock::overflowTop): Ditto.
233         (WebCore::RenderBlock::overflowRect): Ditto.
234         (WebCore::RenderBlock::layoutBlock): Ditto.
235
236         * rendering/RenderFlexibleBox.cpp:
237         (WebCore::RenderFlexibleBox::layoutBlock): Ditto.
238
239         * rendering/RenderLayer.cpp:
240         (WebCore::RenderLayer::calculateRects): Ditto.
241
242         * rendering/RenderObject.cpp:
243         (WebCore::RenderObject::paintBoxShadow): Changed to paint all shadows.
244         Changed to avoid clipping out the box if it has a fully opaque
245         background.
246         (WebCore::RenderObject::repaintAfterLayoutIfNeeded): Changed to account
247         for all shadows.
248         (WebCore::RenderObject::selectionForegroundColor): Cleaned up.
249         (WebCore::RenderObject::adjustRectForOutlineAndShadow): Changed to
250         account for all shadows.
251
252         * rendering/RenderReplaced.cpp:
253         (WebCore::RenderReplaced::adjustOverflowForBoxShadow): Ditto.
254
255         * rendering/RenderStyle.cpp:
256         (WebCore::RenderStyle::setTextShadow): Changed to prepend when adding
257         so that the stacking order of shadows when painting will be "first o
258         top".
259         (WebCore::RenderStyle::setBoxShadow): Ditto.
260
261         * rendering/RenderTable.cpp:
262         (WebCore::RenderTable::layout): Changed to account for all shadows.
263
264 2008-04-28  Adam Roben  <aroben@apple.com>
265
266         Fix some more Windows build errors in COMPtr
267
268         * platform/win/COMPtr.h:
269         (WTF::): Define DefaultHash<COMPtr<P> > by using PtrHash<COMPtr<P> >,
270         which is just a copy of PtrHash<RefPtr<P> >.
271
272 2008-04-28  Adam Roben  <aroben@apple.com>
273
274         Fix some Windows build errors in COMPtr
275
276         * platform/win/COMPtr.h: Explicitly name the WTF namespace when using
277         HashTableDeletedValueType.
278
279 2008-04-28  Adam Roben  <aroben@apple.com>
280
281         Fix some Windows build errors in FontPlatfomrData
282
283         * platform/graphics/win/FontPlatformData.h: Removed the Deleted
284         constructor and replaced it with a HashTableDeletedValueType
285         constructor. Also added isHashTableDeletedValue() and
286         hashTableDeletedFontValue().
287
288 2008-04-28  David Hyatt  <hyatt@apple.com>
289
290         https://bugs.webkit.org/show_bug.cgi?id=18780
291
292         Canvas can't draw itself into its own buffer.  Make sure the dirtying call comes after the image()
293         has been accessed.  Technically willDraw should be renamed to didDraw and all calls should be moved
294         to after draws have occurred (since if the draw op itself wants to reference the image it shouldn't get
295         a dirty copy either), but I'll take that up with olliej when he wakes up. :)
296
297         Reviewed by Dan Bernstein
298
299         Added fast/canvas/canvasDrawsIntoSelf.html
300
301         * html/CanvasRenderingContext2D.cpp:
302         (WebCore::CanvasRenderingContext2D::drawImage):
303
304 2008-04-28  Alexey Proskuryakov  <ap@webkit.org>
305
306         Reviewed by Geoff Garen.
307
308         <rdar://problem/5825192> Replace use of Gestalt with BSD sysctl
309
310         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
311         (WebCore::MediaPlayerPrivate::isAvailable): There is no need to check QuickTime version post-Tiger,
312         as it will never be below 7.3 again. This change may make library loading happen earlier in
313         some cases, hopefully, that's not a big deal.
314
315 2008-04-25  Alexey Proskuryakov  <ap@webkit.org>
316
317         Reviewed by Darin.
318
319         Fix run-webkit-tests --threading
320         and provisionally fix <https://bugs.webkit.org/show_bug.cgi?id=18661>
321         Proxy server issue in Sunday's Nightly
322
323         Adjusted for JavaScriptCore changes: added a new member to ClassInfo objects, turned
324         ClassInfo::propHashTable into a function, made getPropertyAttributes() take an ExecState pointer.
325
326         * bindings/js/JSAudioConstructor.cpp:
327         (WebCore::):
328         * bindings/js/JSDOMWindowBase.cpp:
329         (WebCore::):
330         * bindings/js/JSDOMWindowCustom.cpp:
331         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
332         * bindings/js/JSDOMWindowWrapper.cpp:
333         (WebCore::):
334         (WebCore::JSDOMWindowWrapper::getPropertyAttributes):
335         * bindings/js/JSDOMWindowWrapper.h:
336         * bindings/js/JSEventTargetBase.h:
337         (WebCore::JSEventTargetPrototype::classInfo):
338         * bindings/js/JSHTMLInputElementBase.cpp:
339         (WebCore::):
340         * bindings/js/JSHTMLOptionElementConstructor.cpp:
341         (WebCore::):
342         * bindings/js/JSHistoryCustom.cpp:
343         (WebCore::JSHistory::customGetOwnPropertySlot):
344         * bindings/js/JSImageConstructor.cpp:
345         (WebCore::):
346         * bindings/js/JSInspectedObjectWrapper.cpp:
347         (WebCore::):
348         * bindings/js/JSInspectorCallbackWrapper.cpp:
349         (WebCore::):
350         * bindings/js/JSLocationCustom.cpp:
351         (WebCore::JSLocation::customGetOwnPropertySlot):
352         (WebCore::JSLocation::customPut):
353         * bindings/js/JSNamedNodesCollection.cpp:
354         (WebCore::):
355         * bindings/js/JSQuarantinedObjectWrapper.cpp:
356         (WebCore::):
357         * bindings/js/JSRGBColor.cpp:
358         (WebCore::):
359         * bindings/js/JSStorageCustom.cpp:
360         (WebCore::JSStorage::customPut):
361         * bindings/js/JSXMLHttpRequestConstructor.cpp:
362         (WebCore::):
363         * bindings/js/JSXSLTProcessor.cpp:
364         (WebCore::):
365         * bindings/scripts/CodeGeneratorJS.pm:
366         * bridge/objc/objc_runtime.mm:
367         * bridge/runtime_array.cpp:
368         * bridge/runtime_object.cpp:
369
370 2008-04-28  David Hyatt  <hyatt@apple.com>
371
372         https://bugs.webkit.org/show_bug.cgi?id=18779
373
374         The arguments in drawImage were reversed when I switched away from the image buffer method.
375
376         Reviewed by Tim Hatcher
377
378         Added fast/canvas/drawImage.html
379
380         * html/CanvasRenderingContext2D.cpp:
381         (WebCore::CanvasRenderingContext2D::drawImage):
382
383 2008-04-28  Holger Hans Peter Freyther  <zecke@selfish.org>
384
385         Reviewed by Simon.
386
387         Fix the crash on http://www.orad.pl. We called end too early.
388
389         1. we need a ::write that will pause the parser due a pending
390         script
391         2. we need a second write to queue data (tricky part)
392         3. we need to get a finish call (document loaded)
393         4. we resume the script and parse, schedule loading of a new script
394         and have called end
395         5. we resume the new script and we get a crash
396
397         This bug is hard to trigger, e.g. if the web server is only allowing
398         one connection per client/IP. This is why we need to sleep in the scripts. We
399         want to make sure that the page is first fully received before serving the
400         scripts.
401
402         Test: http/tests/misc/xmltokenizer-do-not-crash.pl
403
404         * dom/XMLTokenizer.cpp:
405
406 2008-04-28  Ariya Hidayat  <ahidayat@trolltech.com>
407
408         Reviewed by Simon.
409
410         Fix rounded corner on combo box with CSS border
411
412         * platform/qt/RenderThemeQt.cpp:
413         (WebCore::RenderThemeQt::adjustMenuListButtonStyle):
414
415 2008-04-28  Ariya Hidayat  <ahidayat@trolltech.com>
416
417         Reviewed by Simon.
418
419         Fix CSS border does not show up for combo boxes
420
421         Do not clear the border when painting the combo box for 'select' form element
422
423         * platform/qt/RenderThemeQt.cpp:
424
425 2008-04-28  Olivier Goffart  <ogoffart@trolltech.com>
426
427         Reviewed by Simon.
428
429         Avoid comparing to 0 in qFuzzyCompare for increased
430         numeric stability.
431
432         * platform/graphics/qt/PathQt.cpp:
433         (WebCore::Path::addArc):
434
435 2008-04-28  Benjamin Meyer  <bmeyer@trolltech.com>
436
437         Reviewed by Simon.
438
439         Fixes: Pages returning 404 with content are not displayed.
440
441         A web page that returns 404 can still have content.
442
443         * platform/network/qt/QNetworkReplyHandler.cpp:
444         (WebCore::QNetworkReplyHandler::finish):
445
446 2008-04-28  Paul Olav Tvete  <paul@trolltech.com>
447
448         Reviewed by Simon.
449
450         Fix compiler warning; Avoid the implicity QString(const char *)
451         constructor
452
453         * platform/qt/RenderThemeQt.cpp:
454         (WebCore::RenderThemeQt::fallbackStyle):
455
456 2008-04-28  Tor Arne Vestbø  <tavestbo@trolltech.com>
457
458         Reviewed by Simon.
459
460         Prevent middle-click from triggering open URL from clipboard when the event has already been accepted.
461
462         * platform/qt/PlatformScrollBarQt.cpp:
463         (WebCore::PlatformScrollbar::handleMousePressEvent):
464
465 2008-04-28  Tor Arne Vestbø  <tavestbo@trolltech.com>
466
467         Reviewed by Simon.
468
469         Fix scrollbar behavior in QtWebKit to match QScrollBar.
470
471         Right click context menu is now supported, along with
472         middle click to center slider thumb over mouse cursor.
473
474         * platform/qt/PlatformScrollBar.h:
475         * platform/qt/PlatformScrollBarQt.cpp:
476         (tr):
477         (WebCore::PlatformScrollbar::pixelPosToRangeValue):
478         (WebCore::PlatformScrollbar::handleMousePressEvent):
479         (WebCore::PlatformScrollbar::handleMouseReleaseEvent):
480         (WebCore::PlatformScrollbar::handleContextMenuEvent):
481
482 2008-04-28  Tor Arne Vestbø  <tavestbo@trolltech.com>
483
484         Reviewed by Simon.
485
486         Implemented channel-based logging for QtWebKit.
487
488         Comma-separated log channels are read from the QT_WEBKIT_LOG environment variable.
489         Warnings for notImplemented() is still output by default, but can be disabled
490         by setting DISABLE_NI_WARNINGS=1.
491
492         * WebCore.pro:
493         * platform/NotImplemented.h:
494         * platform/qt/LoggingQt.cpp: Added.
495         (WebCore::getChannelFromName):
496         (WebCore::InitializeLoggingChannelsIfNecessary):
497
498 2008-04-28  Simon Hausmann  <shausman@trolltech.com>
499
500         Reviewed by Holger.
501
502         Fixes: Popups/Context menu in WebKit appearing at the wrong location when embedded in the graphics view or using multiple screens
503
504         Give the popups the right parent widget and the right coordinates relative within the parent.
505
506         * platform/qt/PopupMenuQt.cpp:
507         (WebCore::PopupMenu::show):
508
509 2008-04-28  Tor Arne Vestbø  <tavestbo@trolltech.com>
510
511         Reviewed by Simon.
512
513         Fixes: Tabbing to a checkbox/button doesn't work on Win/X11
514
515         Respect platform settings for tabbing to all controls.
516
517         * page/qt/EventHandlerQt.cpp:
518
519 2008-04-28  Tor Arne Vestbø  <tavestbo@trolltech.com>
520
521         Reviewed by Simon.
522
523         First part of the fix for tabbing to a checkbox/button doesn't work on Win/X11
524
525         Draw controls instead of pimitive elements, to get focus rects for free.
526
527         * platform/qt/RenderThemeQt.cpp:
528         (WebCore::RenderThemeQt::paintButton):
529
530 2008-04-28  Lincoln Ramsay  <lincoln.ramsay@trolltech.com>
531
532         Reviewed by Simon.
533
534         Compile when QT_NO_CLIPBOARD is defined.
535
536         * platform/qt/ClipboardQt.cpp:
537         (WebCore::ClipboardQt::ClipboardQt):
538         (WebCore::ClipboardQt::clearData):
539         (WebCore::ClipboardQt::clearAllData):
540         (WebCore::ClipboardQt::setData):
541         (WebCore::ClipboardQt::declareAndWriteDragImage):
542         (WebCore::ClipboardQt::writeURL):
543         (WebCore::ClipboardQt::writeRange):
544         * platform/qt/PasteboardQt.cpp:
545         (WebCore::Pasteboard::writeSelection):
546         (WebCore::Pasteboard::plainText):
547         (WebCore::Pasteboard::documentFragment):
548         (WebCore::Pasteboard::writeURL):
549         (WebCore::Pasteboard::writeImage):
550
551 2008-04-28  Ariya Hidayat  <ariya.hidayat@trolltech.com>
552
553         Reviewed by Simon.
554
555         Draw the arrow button on the styled combo box using the fallback ("Windows") style
556
557         * platform/qt/RenderThemeQt.cpp:
558         (WebCore::RenderThemeQt::RenderThemeQt):
559         (WebCore::RenderThemeQt::~RenderThemeQt):
560         (WebCore::RenderThemeQt::fallbackStyle):
561         (WebCore::RenderThemeQt::paintMenuListButton):
562         (WebCore::RenderThemeQt::adjustMenuListButtonStyle):
563         * platform/qt/RenderThemeQt.h:
564
565 2008-04-28  Simon Hausmann  <hausmann@webkit.org>
566
567         Reviewed by Holger.
568
569         Fix positioning of native widgets (plugins).
570
571         Correctly convert the coordinates of the Widget in Widget::setFrameGeometry()
572         to be relative to the containing toplevel QWidget using convertToContainingWindow().
573
574         Note: convertToContainingWindow() takes child coordinates.
575
576         * platform/qt/WidgetQt.cpp:
577         (WebCore::Widget::frameGeometry):
578         (WebCore::Widget::setFrameGeometry):
579
580 2008-04-28  Holger Hans Peter Freyther  <zecke@selfish.org>
581
582         Reviewed by Simon.
583
584         plugins: fix scrolling issues
585
586         When scrolling you can see artefacts that remain on the screen, they
587         seem to originate from the backingstore handling. I'm not entirely sure
588         where they come from, my workarounds involved a
589         data->m_widget->parentWidget()->update() call in Widget::geometryChanged or
590         handling widgets with a native QWidget embedded like web pages with a
591         static background. This needs more investigations, I think the ScrollView
592         change is cleaner than the brute force in Widget::geometryChanged
593
594         Focus handling seems to be broken as well and needs further work, we don't
595         clip plugin QWidgets and they can draw out of their bounds, e.g. on the ScrollBar,
596         the z-order is likely not honored as well.
597
598         * platform/ScrollView.h:
599         * platform/qt/ScrollViewQt.cpp:
600         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
601         (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
602         (WebCore::ScrollView::addChild):
603         (WebCore::ScrollView::removeChild):
604         (WebCore::ScrollView::incrementNativeWidgetCount):
605         (WebCore::ScrollView::decrementNativeWidgetCount):
606         (WebCore::ScrollView::hasNativeWidgets):
607
608 2008-04-28  Holger Hans Peter Freyther  <zecke@selfish.org>
609
610         Reviewed by Simon.
611
612         Add manual test to test placement of QWidgets in iframe's
613
614         * manual-tests/qt/main.html: Added.
615         * manual-tests/qt/qtplugin.html: Added.
616
617 2008-04-28  Simon Hausmann  <hausmann@webkit.org>
618
619         Fix the build with ENABLE_DATABASE=0 (Qt/Windows) by including
620         SecurityOrigin.h. It's used in the file and also implicitly included
621         through the database headers.
622
623         * page/DOMWindow.cpp:
624
625 2008-04-28  Simon Hausmann  <hausmann@webkit.org>
626
627         Prospective Wx build fix.
628
629         * platform/graphics/wx/FontPlatformData.h:
630
631 2008-04-28  Simon Hausmann  <hausmann@webkit.org>
632
633         Reviewed by Alp.
634
635         Gtk build fix, similar to the changes done in r32609.
636
637         * platform/graphics/gtk/FontPlatformData.h:
638         (WebCore::FontPlatformData::FontPlatformData):
639         (WebCore::FontPlatformData::isHashTableDeletedValue):
640         (WebCore::FontPlatformData::hashTableDeletedFontValue):
641
642 2008-04-28  Simon Hausmann  <hausmann@webkit.org>
643
644         Prospective build fix. After r32609 it seems the workaround here
645         is not needed anymore. With gcc 4.2/4.3 before 32609 the workaround
646         is needed for compilation, after 32609 compilation only succeeds
647         without the workaround.
648
649         * plugins/PluginPackage.h: Removed workaround of extra StorageTraits
650         specification for the custom hash function of PluginPackage used in
651         PluginSet.
652
653 2008-04-28  Tor Arne Vestbø  <tavestbo@trolltech.com>
654
655         Reviewed by Simon.
656
657         https://bugs.webkit.org/show_bug.cgi?id=18713
658
659         Fix scrollbar painting issues in QtWebKit.
660
661         Hovering and click-draging outside of the scrollbar would
662         produce unexpected and inconcistent results. We also didn't
663         pass on leave-events to the underlying WebKit code, which
664         was nessecary to implement the paint fix.
665
666         * platform/qt/PlatformScrollBarQt.cpp:
667         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
668         (WebCore::PlatformScrollbar::handleMouseOutEvent):
669         (WebCore::PlatformScrollbar::handleMouseReleaseEvent):
670
671 2008-04-27  Oliver Hunt  <oliver@apple.com>
672
673         Reviewed by Maciej.
674
675         Bug 17173: HTML5 Canvas API requires us to ignore certain operations
676         <https://bugs.webkit.org/show_bug.cgi?id=17173>
677
678         This fixes the semantics of a number of Canvas functions to match
679         the new HTML5 non-throwing semantics.
680
681         Test: fast/canvas/canvas-path-with-inf-nan-dimensions.html
682
683         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
684         (WebCore::JSCanvasRenderingContext2D::strokeRect):
685         * html/CanvasRenderingContext2D.cpp:
686         (WebCore::CanvasRenderingContext2D::moveTo):
687         (WebCore::CanvasRenderingContext2D::lineTo):
688         (WebCore::CanvasRenderingContext2D::quadraticCurveTo):
689         (WebCore::CanvasRenderingContext2D::bezierCurveTo):
690         (WebCore::CanvasRenderingContext2D::arcTo):
691         (WebCore::CanvasRenderingContext2D::arc):
692         (WebCore::validateRectForCanvas):
693         (WebCore::CanvasRenderingContext2D::rect):
694         (WebCore::CanvasRenderingContext2D::clearRect):
695         (WebCore::CanvasRenderingContext2D::fillRect):
696         (WebCore::CanvasRenderingContext2D::strokeRect):
697         * html/CanvasRenderingContext2D.h:
698         * html/CanvasRenderingContext2D.idl:
699
700 2008-04-27  Rob Buis  <buis@kde.org>
701
702         Reviewed by Adele.
703
704         https://bugs.webkit.org/show_bug.cgi?id=18652
705         onchange events don't seem to fire for input[type=range] controls.
706
707         Fire changeEvent when dragging the slider.
708
709         Test: fast/forms/slider-onchange-event.html
710
711         * rendering/RenderSlider.cpp:
712         (WebCore::RenderSlider::valueChanged):
713
714 2008-04-25  Darin Adler  <darin@apple.com>
715
716         Reviewed by Maciej.
717
718         - update for compatibility with HashTable that no longer has optimization to share
719           implementation between hash tables with integers, pointers, RefPtr, and String
720           objects as keys
721
722         * bindings/js/JSSVGPODTypeWrapper.h:
723         (WebCore::PODTypeReadWriteHashInfo::PODTypeReadWriteHashInfo): Added constructor
724         for HashTableDeletedValue.
725         (WebCore::PODTypeReadWriteHashInfo::isHashTableDeletedValue): Added.
726         (WebCore::PODTypeReadWriteHashInfoTraits::constructDeletedValue): Added.
727         (WebCore::PODTypeReadWriteHashInfoTraits::isDeletedValue): Added.
728
729         * dom/Document.cpp: Made changedDocuments internal to the file rather than a
730         static data member of Document.
731         (WebCore::FormElementKey::ref): Removed unneeded check for deleted value -- this
732         will never be called on a deleted element.
733         (WebCore::FormElementKey::deref): Ditto.
734
735         * dom/Document.h: Added HashTableDeletedValue constructor and isHashTableDeletedValue
736         to FormElementKey. Changed FormElementKeyHashTraits to use construct/isDeletedValue.
737         Got rid of the changedDocuments data member. Changed iconURL to be an inline that
738         returns a const String&.
739
740         * dom/StyledElement.cpp: Changed MappedAttributeKeyTraits to use
741         construct/isDeletedValue.
742
743         * page/mac/AXObjectCacheMac.mm:
744         (WebCore::AXObjectCache::getAXID): Call isDeletedValue instead of deletedValue.
745
746         * platform/SecurityOriginHash.h: Added overload so that SecurityOriginHash can work
747         with raw pointers as well as RefPt (helpful with the new RefPtrHashMap). Eliminated
748         SecurityOriginTraits, since we can now use the default traits. Changed the value of
749         safeToCompareToEmptyOrDeleted to false, since it's not safe to compare a deleted
750         value using this hash function. I don't think it was safe before either; I'm not sure
751         why it didn't cause a problem before.
752
753         * platform/cf/SchedulePair.h: Removed SchedulePairTraits -- custom traits are no
754         longer needed.
755
756         * platform/graphics/FontCache.cpp:
757         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey): Added constructor
758         for HashTableDeletedValue.
759         (WebCore::FontPlatformDataCacheKey::isHashTableDeletedValue): Added.
760         (WebCore::FontPlatformDataCacheKey::hashTableDeletedSize): Added.
761         (WebCore::FontPlatformDataCacheKeyTraits::constructDeletedValue): Added.
762         (WebCore::FontPlatformDataCacheKeyTraits::isDeletedValue): Added.
763         (WebCore::FontDataCacheKeyTraits::constructDeletedValue): Added.
764         (WebCore::FontDataCacheKeyTraits::isDeletedValue): Added.
765
766         * platform/graphics/IntSizeHash.h: Changed HashTraits<IntSize> to use
767         construct/isDeletedValue.
768
769         * platform/graphics/mac/FontPlatformData.h:
770         (WebCore::FontPlatformData::FontPlatformData): Added constructor for
771         HashTableDeletedValue.
772         (WebCore::FontPlatformData::isHashTableDeletedValue): Added.
773         (WebCore::FontPlatformData::hashTableDeletedFontValue): Added.
774
775         * platform/text/PlatformString.h:
776         (WebCore::String::swap): Added. Avoids any refcount churn when swapping two strings.
777         (WebCore::String::String): Added constructor for HashTableDeletedValue.
778         (WebCore::String::isHashTableDeletedValue): Added.
779         (WebCore::swap): Added. Avoids any refcount churn when swapping two strings.
780
781         * platform/text/StringHash.h: Changed specialization of HashTraits for
782         WebCore::String to use the deleted value now defined in that class and removed
783         the code to do ref/deref. Removed HashKeyStorageTraits specializations.
784         
785         * platform/win/COMPtr.h: Changed specialization of HashTraits for
786         COMPtr to use the deleted value now defined in that class and removed
787         the code to do ref/deref. Removed HashKeyStorageTraits specializations.
788         (COMPtr::COMPtr): Added constructor for HashTableDeletedValue.
789         (COMPtr::isHashTableDeletedValue): Added.
790         (COMPtr::query): Removed inline keyword not needed since functions defined in the
791         class definition are automatically marked inline.
792         (COMPtr::hashTableDeletedValue): Added.
793
794         * storage/DatabaseTracker.h: Removed now-unneeded SecurityOriginTraits.
795         * storage/LocalStorage.h: Ditto.
796         * storage/OriginQuotaManager.h: Ditto.
797         * storage/SessionStorage.h: Ditto.
798
799         * svg/SVGAnimatedTemplate.h:
800         (WebCore::SVGAnimatedTypeWrapperKey::SVGAnimatedTypeWrapperKey): Added constructor
801         for HashTableDeletedValue.
802         (WebCore::SVGAnimatedTypeWrapperKey::isHashTableDeletedValue): Added.
803         (WebCore::SVGAnimatedTypeWrapperKeyHashTraits::constructDeletedValue): Added.
804         (WebCore::SVGAnimatedTypeWrapperKeyHashTraits::isDeletedValue): Added.
805
806 2008-04-27  Mark Rowe  <mrowe@apple.com>
807
808         Reviewed by Tim Hatcher.
809
810         Initialize the extra member of the xmlEntity struct when using libxml2 >= 2.6.27.
811
812         * dom/XMLTokenizer.cpp:
813         (WebCore::):
814
815 2008-04-27  Dan Bernstein  <mitz@apple.com>
816
817         Reviewed by Darin Adler.
818
819         - fix https://bugs.webkit.org/show_bug.cgi?id=3729
820           <rdar://problem/4036353> REGRESSION: arrow keys move insertion bar backwards in RTL text
821
822         Test: editing/selection/move-left-right.html
823
824         * editing/SelectionController.cpp:
825         (WebCore::SelectionController::modifyMovingRight): Added. Currently
826         implemented for character granularity, all other being treated as
827         "forward".
828         (WebCore::SelectionController::modifyMovingForward): Renamed
829         modifyMovingRightForward() to this.
830         (WebCore::SelectionController::modifyMovingLeft): Added. Currently
831         implemented for character granularity, all other being treated as
832         "backward".
833         (WebCore::SelectionController::modifyMovingBackward): Renamed
834         modifyMovingLeftBackward() to this.
835         (WebCore::SelectionController::modify): Changed to call either the
836         visual (left/right) or logical (backward/forward) methods depending on
837         the 'dir' argument for moves.
838         * editing/SelectionController.h:
839         * editing/VisiblePosition.cpp:
840         (WebCore::VisiblePosition::leftVisuallyDistinctCandidate): Added.
841         (WebCore::VisiblePosition::left): Added.
842         (WebCore::VisiblePosition::rightVisuallyDistinctCandidate): Added.
843         (WebCore::VisiblePosition::right): Added.
844         * editing/VisiblePosition.h:
845
846 2008-04-27  Sam Weinig  <sam@webkit.org>
847
848         Reviewed by Maciej Stachowiak.
849
850         Fix for <rdar://problem/5893385> Need to provide access to the CanvasRenderingContext2D prototype
851         Add a JS constructor for CanvasRenderingContext2D.
852
853         * html/CanvasRenderingContext2D.idl:
854         * page/DOMWindow.idl:
855
856 2008-04-26  Adam Barth  <hk9565@gmail.com>
857
858         Reviewed by Adam Roben and Sam Weinig.
859
860         Fixes bug http://bugs.webkit.org/show_bug.cgi?id=17331
861         Fixes bug http://bugs.webkit.org/show_bug.cgi?id=16848
862         
863         Updates postMessage implementation to match HTML 5 specification:
864         1) Adds origin parameter to postMessage.
865         2) Removes domain and uri attributes of MessageEvent in favor of
866            origin attribute.
867
868         In order to do this correctly, we need to distinguish between hosts and domains
869         in the SecurityOrigin class. There are now three ways to compare security origins:
870         1) isSameSchemeHostPort compares scheme, host, and port, and is used for postMessage
871         2) equal compares all aspects of the security origin, and is used for hash keys
872         3) canAccess understands the semantics of schemes such as file:// and data:// URLs,
873            and should be used for scripting access checks.
874
875         Changed SecurityOrigin::toString() to generate identifiers that are suitable for 
876         being used as a MessageEvent's origin property. In the future, they could be used 
877         as database string identifiers as well. Re-used KURL parser to parse serialized 
878         SecurityOrigins.
879
880         Collin Jackson <collinj-webkit@collinjackson.com> also contributed to this patch.
881         
882         Tests: http/tests/security/postMessage/invalid-origin-throws-exception.html
883                http/tests/security/postMessage/javascript-page-still-sends-origin.html
884                http/tests/security/postMessage/origin-unaffected-by-base-tag.html
885                http/tests/security/postMessage/origin-unaffected-by-document-domain.html
886                http/tests/security/postMessage/target-origin.html
887
888         * WebCore.base.exp:
889         * bindings/js/JSDOMWindowCustom.cpp:
890         (WebCore::JSDOMWindow::postMessage):
891         * dom/Document.cpp:
892         (WebCore::Document::domain):
893         * dom/MessageEvent.cpp:
894         (WebCore::MessageEvent::MessageEvent):
895         (WebCore::MessageEvent::initMessageEvent):
896         * dom/MessageEvent.h:
897         (WebCore::MessageEvent::origin):
898         * dom/MessageEvent.idl:
899         * html/CanvasRenderingContext2D.cpp:
900         (WebCore::CanvasRenderingContext2D::checkOrigin):
901         (WebCore::CanvasRenderingContext2D::createPattern):
902         * page/DOMWindow.cpp:
903         (WebCore::DOMWindow::postMessage):
904         * page/DOMWindow.h:
905         * page/DOMWindow.idl:
906         * platform/SecurityOrigin.cpp:
907         (WebCore::SecurityOrigin::SecurityOrigin):
908         (WebCore::SecurityOrigin::create):
909         (WebCore::SecurityOrigin::createForFrame):
910         (WebCore::SecurityOrigin::copy):
911         (WebCore::SecurityOrigin::setDomainFromDOM):
912         (WebCore::SecurityOrigin::canAccess):
913         (WebCore::SecurityOrigin::isSecureTransitionTo):
914         (WebCore::SecurityOrigin::toString):
915         (WebCore::SecurityOrigin::createFromString):
916         (WebCore::SecurityOrigin::createFromDatabaseIdentifier):
917         (WebCore::SecurityOrigin::databaseIdentifier):
918         (WebCore::SecurityOrigin::equal):
919         (WebCore::SecurityOrigin::isSameSchemeHostPort):
920         * platform/SecurityOrigin.h:
921         (WebCore::SecurityOrigin::host):
922         (WebCore::SecurityOrigin::domain):
923         * platform/SecurityOriginHash.h:
924         (WebCore::SecurityOriginTraits::deletedValue):
925         * storage/DatabaseTracker.cpp:
926         (WebCore::DatabaseTracker::hasEntryForDatabase):
927         (WebCore::DatabaseTracker::originPath):
928         (WebCore::DatabaseTracker::fullPathForDatabase):
929         (WebCore::DatabaseTracker::populateOrigins):
930         (WebCore::DatabaseTracker::databaseNamesForOrigin):
931         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
932         (WebCore::DatabaseTracker::setDatabaseDetails):
933         (WebCore::DatabaseTracker::setQuota):
934         (WebCore::DatabaseTracker::addDatabase):
935         (WebCore::DatabaseTracker::deleteOrigin):
936         (WebCore::DatabaseTracker::deleteDatabase):
937
938 2008-04-26  Kevin Ollivier  <kevino@theolliviers.com>
939
940         wx build fix. Add the AX*ActionVerb functions to the wx build.
941         
942         * platform/wx/LocalizedStringsWx.cpp:
943         (WebCore::AXButtonActionVerb):
944         (WebCore::AXRadioButtonActionVerb):
945         (WebCore::AXTextFieldActionVerb):
946         (WebCore::AXCheckedCheckBoxActionVerb):
947         (WebCore::AXUncheckedCheckBoxActionVerb):
948         (WebCore::AXLinkActionVerb):
949
950 2008-04-26  Robin Dunn  <robin@alldunn.com>
951
952         Reviewed by Kevin Ollivier.
953
954         wx build fix. Add needed wx includes for compilation.
955
956         https://bugs.webkit.org/show_bug.cgi?id=18758
957
958         * platform/wx/FileSystemWx.cpp:
959
960 2008-04-26  Anatoli Papirovski  <apapirovski@mac.com>
961
962         Reviewed by Dave Hyatt.
963
964         Fix for https://bugs.webkit.org/show_bug.cgi?id=18583
965         WebKit should ignore declarations with a negative value for
966         line-height and font-size, including in the shorthand font form.
967
968         Tests: fast/css/font-size-negative.html
969                fast/css/line-height-negative.html
970
971         * css/CSSParser.cpp:
972         (WebCore::CSSParser::parseValue):
973         (WebCore::CSSParser::parseFont):
974
975 2008-04-25  Anders Carlsson  <andersca@apple.com>
976
977         Reviewed by Sam.
978
979         Add empty ApplicationCacheStorage class.
980         
981         * WebCore.vcproj/WebCore.vcproj:
982         * WebCore.xcodeproj/project.pbxproj:
983         * loader/appcache/ApplicationCacheStorage.cpp: Added.
984         (WebCore::cacheStorage):
985         * loader/appcache/ApplicationCacheStorage.h: Added.
986
987 2008-04-24  Sam Weinig  <sam@webkit.org>
988
989         Reviewed by Geoffrey Garen.
990
991         Replace the JSDOMWindow with a new one instead of clearing it.
992
993         * bindings/js/JSDOMWindowBase.cpp:
994         (WebCore::JSDOMWindowBase::clear):
995         Don't reset the window.
996
997         * bindings/js/kjs_proxy.cpp:
998         (WebCore::KJSProxy::clear):
999         Replace the current JSDOMWindow stored in the wrapper window
1000         with a new one.
1001
1002         * history/CachedPage.cpp:
1003         (WebCore::CachedPage::CachedPage):
1004         (WebCore::CachedPage::restore):
1005         (WebCore::CachedPage::clear):
1006         * history/CachedPage.h:
1007         Instead of storing the builtins, properties and localstorage in
1008         special holding structs, store the entire JSDOMWindow.
1009
1010         For the case of a page that has no JSDOMWindow before it's first
1011         navigation, has one created while it is in the cache and is then
1012         navigated back, create a new JSDOMWindow to keep the assumption
1013         in JSDOMWindowWrapper that it always has the correct window.
1014
1015         * loader/FrameLoader.cpp:
1016         (WebCore::FrameLoader::clear):
1017         We must clear the DOMWindow first, so that we create a new JSDOMWindow,
1018         it gets a new one.
1019
1020         * page/Frame.cpp:
1021         (WebCore::Frame::clearDOMWindow):
1022         Null out the domWindow so that on the next access, a new one is
1023         created.
1024
1025 2008-04-25  Sam Weinig  <sam@webkit.org>
1026
1027         Reviewed by Mark Rowe.
1028
1029         The EventListeners need to operate and store JSDOMWindows, not JSDOMWrapperWindows.
1030
1031         * bindings/js/JSDOMWindowBase.cpp:
1032         (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
1033         (WebCore::JSDOMWindowBase::findOrCreateJSEventListener):
1034         (WebCore::JSDOMWindowBase::findOrCreateJSUnprotectedEventListener):
1035         * bindings/js/JSSVGLazyEventListener.cpp:
1036         (WebCore::JSSVGLazyEventListener::JSSVGLazyEventListener):
1037         * bindings/js/JSSVGLazyEventListener.h:
1038         * bindings/js/kjs_events.cpp:
1039         (WebCore::JSAbstractEventListener::handleEvent):
1040         (WebCore::JSUnprotectedEventListener::JSUnprotectedEventListener):
1041         (WebCore::JSUnprotectedEventListener::~JSUnprotectedEventListener):
1042         (WebCore::JSUnprotectedEventListener::window):
1043         (WebCore::JSUnprotectedEventListener::clearWindow):
1044         (WebCore::JSEventListener::JSEventListener):
1045         (WebCore::JSEventListener::~JSEventListener):
1046         (WebCore::JSEventListener::window):
1047         (WebCore::JSEventListener::clearWindow):
1048         (WebCore::JSLazyEventListener::JSLazyEventListener):
1049         (WebCore::JSLazyEventListener::parseCode):
1050         * bindings/js/kjs_events.h:
1051         * bindings/js/kjs_proxy.cpp:
1052         (WebCore::KJSProxy::createHTMLEventHandler):
1053         (WebCore::KJSProxy::createSVGEventHandler):
1054
1055 2008-04-25  Mark Rowe  <mrowe@apple.com>
1056
1057         Rubber-stamped by Sam Weinig.
1058
1059         Add some content to an empty ICU header file to prevent verification errors.
1060
1061         * icu/unicode/utf_old.h:
1062
1063 2008-04-25  Anders Carlsson  <andersca@apple.com>
1064
1065         Fix tyop.
1066         
1067         * loader/DocumentLoader.cpp:
1068         (WebCore::DocumentLoader::scheduleApplicationCacheLoad):
1069
1070 2008-04-25  Anders Carlsson  <andersca@apple.com>
1071
1072         Reviewed by Sam.
1073
1074         Add and honor offlineWebApplicationCacheEnabled setting.
1075         
1076         * WebCore.base.exp:
1077         * loader/DocumentLoader.cpp:
1078         (WebCore::DocumentLoader::scheduleApplicationCacheLoad):
1079         * loader/MainResourceLoader.cpp:
1080         (WebCore::MainResourceLoader::load):
1081         * loader/appcache/ApplicationCacheGroup.cpp:
1082         (WebCore::ApplicationCacheGroup::selectCache):
1083         (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
1084         * page/Settings.cpp:
1085         (WebCore::Settings::Settings):
1086         (WebCore::Settings::setOfflineWebApplicationCacheEnabled):
1087         * page/Settings.h:
1088         (WebCore::Settings::offlineWebApplicationCacheEnabled):
1089
1090 2008-04-25  Anders Carlsson  <andersca@apple.com>
1091
1092         Reviewed by Adam.
1093
1094         <rdar://problem/5629139>
1095         PluginInfoStoreWin needs to implement pluginNameForMIMEType().
1096         
1097         * plugins/PluginInfoStore.cpp:
1098         (WebCore::PluginInfoStore::pluginNameForMIMEType):
1099
1100 2008-04-25  Tor Arne Vestbø  <tavestbo@trolltech.com>
1101
1102         Reviewed by Simon.
1103
1104         Respect antialiasing hint when drawing focus rects.
1105
1106         * platform/graphics/qt/GraphicsContextQt.cpp:
1107         (WebCore::GraphicsContext::drawFocusRing):
1108
1109 2008-04-25  Holger Hans Peter Freyther  <zecke@selfish.org>
1110
1111         Reviewed by Simon.
1112
1113         networking: Use Qt::QueuedConnection in QNetworkReplyHandler
1114
1115         Make sure we leave the networking backend before calling
1116         into WebCore. Otheriwse we might return to the networking
1117         backend when it is already deleted.
1118
1119         * platform/network/qt/QNetworkReplyHandler.cpp:
1120         (WebCore::FormDataIODevice::setParent):
1121         (WebCore::QNetworkReplyHandler::start):
1122
1123 2008-04-25  Tor Arne Vestbø  <tavestbo@trolltech.com>
1124
1125         Reviewed by Simon.
1126
1127         Fix propagation of mouse double click events.
1128
1129         Treat a mouse double click as a regular mouse press with just a different click count.
1130
1131         * platform/qt/PlatformMouseEventQt.cpp:
1132         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1133
1134 2008-04-25  Tor Arne Vestbø  <tavestbo@trolltech.com>
1135
1136         Reviewed by Simon.
1137
1138         Fixes: Fix strange button sizes (push, radio, and check) in QtWebKit.
1139
1140         We now use pixel metrics instead of fixed sizes for the
1141         button margins, or if the style supports layout rects we
1142         use the delta between the content rect and the layout rect.
1143
1144         In adition we compensate for the difference between the size
1145         for content and the actual layout rect (if supported) by
1146         reporting back the layout rect to WebKit for page layout,
1147         and then inflating the rect we actually paint to.
1148
1149         * platform/qt/RenderThemeQt.cpp:
1150         (WebCore::StylePainter::StylePainter):
1151         (WebCore::StylePainter::~StylePainter):
1152         (WebCore::RenderThemeQt::RenderThemeQt):
1153         (WebCore::inflateButtonRect):
1154         (WebCore::RenderThemeQt::adjustRepaintRect):
1155         (WebCore::RenderThemeQt::isControlStyled):
1156         (WebCore::computeSizeBasedOnStyle):
1157         (WebCore::RenderThemeQt::setCheckboxSize):
1158         (WebCore::RenderThemeQt::paintCheckbox):
1159         (WebCore::RenderThemeQt::setRadioSize):
1160         (WebCore::RenderThemeQt::adjustButtonStyle):
1161         (WebCore::RenderThemeQt::setButtonSize):
1162         (WebCore::RenderThemeQt::setButtonPadding):
1163         (WebCore::RenderThemeQt::paintButton):
1164         (WebCore::RenderThemeQt::adjustMenuListStyle):
1165         (WebCore::RenderThemeQt::setPopupPadding):
1166         (WebCore::RenderThemeQt::paintMenuList):
1167         * platform/qt/RenderThemeQt.h:
1168
1169 2008-04-25  Benjamin Meyer  <bmeyer@trolltech.com>
1170
1171         Reviewed by Holger.
1172
1173         Fixes: Valgrind warnings about uninitilized variables used in jumps
1174
1175         * rendering/RenderText.cpp:
1176         (WebCore::RenderText::trimmedPrefWidths):
1177
1178 2008-04-25  Warwick Allison  <warwick@trolltech.com>
1179
1180         Reviewed by Simon.
1181
1182         Added simple getter function to PlatformScrollBar to return the
1183         maximum value. Needed in the WebKit/qt API.
1184
1185         * platform/qt/PlatformScrollBar.h:
1186
1187 2008-04-25  Benjamin Meyer  <bmeyer@trolltech.com>
1188
1189         Reviewed by Holger, Simon.
1190
1191         Implement NoDrop, ZoomIn, and ZoomOut cursors
1192
1193         * Resources/WebKitResources.qrc:
1194         * platform/qt/CursorQt.cpp:
1195         (WebCore::noDropCursor):
1196         (WebCore::notAllowedCursor):
1197         (WebCore::zoomInCursor):
1198         (WebCore::zoomOutCursor):
1199
1200 2008-04-25  Holger Hans Peter Freyther  <zecke@selfish.org>
1201
1202         Reviewed by Simon.
1203
1204         Handle the ListboxAppearance as 'TextField' as well. We are mainly interested in the background.
1205
1206         RenderBox will call us to paint the outline/background, it is handled the same as a
1207         TextAreaAppearance in RenderTheme, handle it the same in the RenderThemeQt
1208
1209         * platform/qt/RenderThemeQt.cpp:
1210         (WebCore::RenderThemeQt::paintTextField):
1211
1212 2008-04-25  Holger Hans Peter Freyther  <zecke@selfish.org>
1213
1214         Reviewed by Simon.
1215
1216         No reason to exit the application when we can not paint something. Replace the Q_ASSERT
1217         with a runtime check. Return true to indicate that we did not handle the painting
1218         of this element.
1219
1220         * platform/qt/RenderThemeQt.cpp:
1221         (WebCore::RenderThemeQt::paintTextField):
1222
1223 2008-04-25  Holger Hans Peter Freyther  <zecke@selfish.org>
1224
1225         Reviewed by Simon.
1226
1227         Correct the comment. We are in painTextField and don't paint a button.
1228
1229         * platform/qt/RenderThemeQt.cpp:
1230         (WebCore::RenderThemeQt::paintTextField):
1231
1232 2008-04-25  Holger Hans Peter Freyther  <zecke@selfish.org>
1233
1234         Reviewed by Simon.
1235
1236         Allow ListboxAppearance to take focus as well. Stolen from Tor Arne
1237
1238         * platform/qt/RenderThemeQt.cpp:
1239         (WebCore::RenderThemeQt::supportsFocus):
1240
1241 2008-04-25  Simon Hausmann  <hausmann@webkit.org>
1242
1243         Reviewed by Holger.
1244
1245         Remove debug output.
1246
1247         * platform/network/qt/ResourceHandleQt.cpp:
1248         (WebCore::ResourceHandle::loadResourceSynchronously):
1249
1250 2008-04-25  Holger Hans Peter Freyther  <zecke@selfish.org>
1251
1252         Reviewed by Simon.
1253
1254         Change the string for searchableIndexIntroduction() to match the mac
1255         and pass http/tests/misc/isindex-formdata.html
1256
1257         * platform/qt/Localizations.cpp:
1258
1259 2008-04-25  Simon Hausmann  <hausmann@webkit.org>
1260
1261         Reviewed by Holger.
1262
1263         When we encounter a new/unknown HTTP request type report it back to WebCore as loading error.
1264
1265         * platform/network/qt/QNetworkReplyHandler.cpp:
1266         (WebCore::QNetworkReplyHandler::start):
1267
1268 2008-04-25  Benjamin Meyer  <bmeyer@trolltech.com>
1269
1270         Reviewed by Simon.
1271
1272         Fix crash in the networking layer.
1273
1274         Set the m_reply to null right after calling deleteLater().
1275
1276         * platform/network/qt/QNetworkReplyHandler.cpp:
1277         (WebCore::QNetworkReplyHandler::finish):
1278
1279 2008-04-24  Mark Rowe  <mrowe@apple.com>
1280
1281         Rubber-stamped by Oliver Hunt.
1282
1283         * WebCore.base.exp: Remove two symbols from the export list that don't need to be exported.
1284
1285 2008-04-24  Dan Bernstein  <mitz@apple.com>
1286
1287         Reviewed by Dave Hyatt.
1288
1289         - fix https://bugs.webkit.org/show_bug.cgi?id=18722
1290           <rdar://problem/5888360> REGRESSION (3.1 -> TOT): Webkit Nightly Build crashes when visiting i has a hotdog
1291
1292         Test: fast/dynamic/float-remove-above-line.html
1293
1294         * rendering/bidi.cpp:
1295         (WebCore::RenderBlock::layoutInlineChildren): Avoid adding floats that
1296         do not intrude into the line to its floats vector. When such floats go
1297         away, they do not dirty the line (because they do not intersect with it)
1298         and having it keep them in its floats vector is what caused the crash.
1299
1300 2008-04-24  Justin Garcia  <justin.garcia@apple.com>
1301
1302         Reviewed by John Sullivan.
1303         
1304         It is possible, despite our safeguards, for createMarkup to iterate past the end of the Range
1305         that is passed to it.  Added a null check to prevent crashes in this situation (we won't crash but
1306         we will create too much markup), and added an ASSERT to hopefully catch the scenario in a debugger 
1307         and help us understand what's going on.
1308
1309         * editing/markup.cpp:
1310         (WebCore::createMarkup):
1311
1312 2008-04-24  Mark Rowe  <mrowe@apple.com>
1313
1314         Reviewed by Sam Weinig.
1315
1316         Remove code for calculating the glyph cache size.
1317
1318         * WebCore.base.exp: Remove unused symbol.
1319         * platform/graphics/mac/FontCacheMac.mm: Remove code that is unused now that we do not compute the glyph cache size.
1320         * platform/mac/WebCoreSystemInterface.h: Remove unused symbol.
1321         * platform/mac/WebCoreSystemInterface.mm: Ditto.
1322
1323 2008-04-24  Mark Rowe  <mrowe@apple.com>
1324
1325         Reviewed by Sam Weinig.
1326
1327         Add a definition of BUILDING_ON_LEOPARD to complement BUILDING_ON_TIGER.
1328
1329         * WebCorePrefix.h:
1330
1331 2008-04-24  Cameron McCormack  <cam@mcc.id.au>
1332
1333         Reviewed by Maciej Stachowiak.
1334
1335         Ensure that changes to rx="" and ry="" attributes on an SVG <rect>
1336         element cause a relayout.
1337
1338         Test: svg/dom/SVGRectElement/rect-modify-rx.svg
1339
1340         * svg/SVGRectElement.cpp:
1341         (WebCore::SVGRectElement::svgAttributeChanged): Call needsLayout()
1342         when the attribute is rx or ry.
1343         (WebCore::SVGRectElement::hasRelativeValues): Return true when the
1344         attribute is rx or ry, since they also can have relative values.
1345
1346 2008-04-24  Adam Barth  <hk9565@gmail.com>
1347
1348         Reviewed by Sam Weinig.
1349
1350         Update the XMLHttpRequest header black list to match the spec.
1351
1352         * xml/XMLHttpRequest.cpp:
1353         (WebCore::isSafeRequestHeader):
1354
1355 2008-04-22  Feng Qian  <ian.eng.webkit@gmail.com>
1356
1357         Reviewed by Geoff Garen.
1358
1359         Fix https://bugs.webkit.org/show_bug.cgi?id=18677
1360         Bug 18677: Synchronous event dispatch confuses the popup blocker into incorrectly blocking chat popups in gmail.com.
1361
1362         Test: fast/events/nested-window-event.html
1363
1364         * bindings/js/kjs_events.cpp:
1365         (WebCore::JSAbstractEventListener::handleEvent): Save and restore the current event around the event dispatch.
1366
1367 2008-04-24  Brady Eidson  <beidson@apple.com>
1368
1369         Reviewed by Teh Mitzpettel
1370
1371         Make it so PageGroups know what their own name is.
1372
1373         * WebCore.base.exp:
1374
1375         * page/Page.cpp:
1376         (WebCore::Page::setGroupName):
1377         (WebCore::Page::groupName):
1378         * page/Page.h:
1379
1380         * page/PageGroup.cpp: Move the PageGroupMap into the PageGroup class.
1381         (WebCore::PageGroup::PageGroup): Added a c'tor that takes the group name as an argument instead of
1382           the initial Page.
1383         (WebCore::PageGroup::pageGroup): Handles creating and mapping names to groups
1384         * page/PageGroup.h:
1385         (WebCore::PageGroup::name):
1386
1387 2008-04-24  Adele Peterson  <adele@apple.com>
1388
1389         Reviewed by Darin.
1390
1391         Consolidate two versions of pathGetFileName.
1392
1393         * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::formData): Call FileSystem.h version of pathGetFileName and removed the static helper function.
1394         * platform/posix/FileSystemPOSIX.cpp: (WebCore::pathGetFileName): Moved general case from HTMLFormElement version here.
1395           If other platforms relied on that default they should implement this function for their platform specific version of FileSystem.cpp
1396         * platform/win/FileSystemWin.cpp: (WebCore::pathGetFileName): Moved win implementation from HTMLFormElement here.
1397         * platform/wx/FileSystemWx.cpp: (WebCore::pathGetFileName): Moved wx implementation from HTMLFormElement here.
1398
1399 2008-04-24  Anders Carlsson  <andersca@apple.com>
1400
1401         Windows build fix.
1402         
1403         * html/HTMLFormElement.cpp:
1404         (WebCore::pathGetFilename):
1405
1406 2008-04-24  Anders Carlsson  <andersca@apple.com>
1407
1408         Don't crash when the string is empty.
1409         
1410         * html/HTMLMediaElement.cpp:
1411         (WebCore::parseTimeOffset):
1412
1413 2008-04-24  Dan Bernstein  <mitz@apple.com>
1414
1415         Reviewed by Darin Adler.
1416
1417         - preparation for https://bugs.webkit.org/show_bug.cgi?id=3729
1418           <rdar://problem/4036353> REGRESSION: arrow keys move insertion bar backwards in RTL text
1419
1420         The three main changes in this patch are:
1421
1422         1) Making all inline boxes know their bidi level, instead of just text
1423            boxes knowing whether their bidi level is odd or even. This is
1424            required for the next change.
1425
1426         2) Replacing RenderObject::inlineBox() with
1427            Position::getInlineBoxAndOffset() in recognition of the fact that the
1428            inline box containing the primary caret for a position in a given
1429            node may belong to a different node's renderer.
1430
1431         3) Changing RenderObject::caretRect() to take an InlineBox parameter,
1432            and changing callers to call VisiblePosition::caretRect(), which
1433            locates the inline box, then calls caretRect() on the renderer for
1434            that box. This, combined with the previous change, ensures that the
1435            primary caret is rendered at the right place for positions that
1436            lie on a directionality boundary.
1437
1438         Test: platform/mac/editing/input/caret-primary-bidi.html
1439
1440         * WebCore.base.exp: Added the VisiblePosition(Node*, int, EAffinity)
1441         constructor and VisiblePosition::caretRect(), and sorted.
1442
1443         * dom/Position.cpp:
1444         (WebCore::nextRenderedEditable): Adjusted for the removal of
1445         RenderObject::inlineBox().
1446         (WebCore::previousRenderedEditable): Ditto.
1447         (WebCore::Position::rendersInDifferentPosition): Ditto.
1448         (WebCore::Position::getInlineBoxAndOffset): Added. Gets the inline box
1449         and the offset within that box at which the primary caret for this
1450         position should render.
1451
1452         * dom/Position.h:
1453
1454         * editing/DeleteSelectionCommand.cpp:
1455         (WebCore::DeleteSelectionCommand::mergeParagraphs): Changed to call
1456         VisiblePosition::caretRect() instead of calling the RenderObject method.
1457
1458         * editing/SelectionController.cpp:
1459         (WebCore::caretY): Ditto.
1460         (WebCore::SelectionController::xPosForVerticalArrowNavigation): Ditto.
1461         (WebCore::SelectionController::layout): Ditto.
1462
1463         * editing/VisiblePosition.cpp:
1464         (WebCore::VisiblePosition::caretRect): Changed to call
1465         getInlineBoxAndOffset() to get the correct inline box and call the
1466         renderer for that box.
1467
1468         * editing/VisiblePosition.h:
1469         (WebCore::VisiblePosition::getInlineBoxAndOffset): Added convenience
1470         methods for getting the inline box and caret offset for a visible
1471         position, accounting for its affinity.
1472
1473         * editing/visible_units.cpp:
1474         (WebCore::rootBoxForLine): Changed to use getInlineBoxAndOffset()
1475         instead of RenderObject::inlineBox().
1476         (WebCore::startPositionForLine):
1477         (WebCore::endPositionForLine):
1478         (WebCore::previousLinePosition): Ditto.
1479         (WebCore::nextLinePosition): Ditto.
1480
1481         * page/AccessibilityObject.cpp:
1482         (WebCore::updateAXLineStartForVisiblePosition): Ditto.
1483
1484         * page/Frame.cpp:
1485         (WebCore::Frame::firstRectForRange): Ditto.
1486
1487         * rendering/InlineBox.cpp:
1488         (WebCore::InlineBox::caretMinOffset): Changed to forward to the
1489         renderer.
1490         (WebCore::InlineBox::caretMaxOffset): Ditto.
1491         * rendering/InlineBox.h: Replaced the m_reversed bit, intended for use
1492         in InlineTextBox only, with six bits of the bidi level of the box,
1493         intended for use in all leaf inline boxes.
1494         (WebCore::InlineBox::InlineBox): Added missing initializer for
1495         m_dirOverride and initialized the bidi level.
1496         (WebCore::InlineBox::bidiLevel): Added this accessor.
1497         (WebCore::InlineBox::setBidiLevel): Ditto.
1498         (WebCore::InlineBox::direction): Ditto.
1499         (WebCore::InlineBox::caretLeftmostOffset): Added this convenience
1500         method.
1501         (WebCore::InlineBox::caretRightmostOffset): Ditto.
1502
1503         * rendering/InlineTextBox.cpp: Replaced all references to m_reversed
1504         with checking of direction().
1505         (WebCore::InlineTextBox::selectionRect):
1506         (WebCore::InlineTextBox::placeEllipsisBox):
1507         (WebCore::InlineTextBox::paint):
1508         (WebCore::InlineTextBox::paintSelection):
1509         (WebCore::InlineTextBox::paintCompositionBackground):
1510         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
1511         (WebCore::InlineTextBox::paintTextMatchMarker):
1512         (WebCore::InlineTextBox::textPos):
1513         (WebCore::InlineTextBox::offsetForPosition):
1514         (WebCore::InlineTextBox::positionForOffset):
1515
1516         * rendering/RenderBR.cpp: Removed inlineBox().
1517         * rendering/RenderBR.h: Ditto.
1518
1519         * rendering/RenderBox.cpp:
1520         (WebCore::RenderBox::caretRect): Changed to take an inline box and
1521         account for the direction of the box (or the renderer) in positioning
1522         the caret: in right-to-left boxes, the "before" position is to the right
1523         while "after" is to the left.
1524         * rendering/RenderBox.h:
1525
1526         * rendering/RenderFlow.cpp:
1527         (WebCore::RenderFlow::caretRect): Updated the signature.
1528         * rendering/RenderFlow.h:
1529
1530         * rendering/RenderObject.cpp:
1531         (WebCore::RenderObject::caretRect): Updated the signature.
1532         (WebCore::RenderObject::caretMaxOffset): Changed to return the child
1533         node count (or 1 if there are no children) for replaced elements, such
1534         as <select>s.
1535         * rendering/RenderObject.h:
1536
1537         * rendering/RenderReplaced.cpp: Removed caretMinOffset() and
1538         caretMaxOffset() because the base class implementation does the right
1539         thing for replaced objects now.
1540         * rendering/RenderReplaced.h:
1541
1542         * rendering/RenderSVGInlineText.cpp:
1543         (WebCore::RenderSVGInlineText::caretRect): Updated the signature.
1544         (WebCore::RenderSVGInlineText::positionForCoordinates): Updated for
1545         the change from m_reversed to direction().
1546         * rendering/RenderSVGInlineText.h:
1547
1548         * rendering/RenderText.cpp:
1549         (WebCore::RenderText::caretRect): Changed to take an inline box and
1550         removed the code that used to find the inline for the given position.
1551         Changed use of m_reversed to use direction().
1552         (WebCore::RenderText::position): Changed use of m_reversed to use
1553         direction().
1554         * rendering/RenderText.h:
1555
1556         * rendering/RenderTextControl.cpp:
1557         (WebCore::RenderTextControl::textWithHardLineBreaks): Adjusted for the
1558         removal of RenderObject::inlineBox().
1559
1560         * rendering/RenderTreeAsText.cpp:
1561         (WebCore::writeTextRun): Changed to use direction() instead of
1562         m_reversed.
1563
1564         * rendering/SVGInlineTextBox.cpp: Ditto.
1565         (WebCore::SVGInlineTextBox::calculateGlyphBoundaries):
1566         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::chunkPortionCallback):
1567         (WebCore::SVGInlineTextBox::svgCharacterHitsPosition):
1568
1569         * rendering/SVGRenderTreeAsText.cpp: Ditto.
1570         (WebCore::writeSVGInlineTextBox):
1571
1572         * rendering/SVGRootInlineBox.cpp: Ditto.
1573         (WebCore::svgTextRunForInlineTextBox):
1574         (WebCore::cummulatedWidthOrHeightOfTextChunk):
1575         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
1576
1577         * rendering/bidi.cpp:
1578         (WebCore::RenderBlock::constructLine): Made this function set the
1579         bidi level on all leaf boxes.
1580
1581         * svg/SVGTextContentElement.cpp: Changed to use direction() instead of
1582         m_reversed.
1583         (WebCore::cumulativeCharacterRangeLength):
1584         (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback):
1585
1586 2008-04-24  Sam Weinig  <sam@webkit.org>
1587
1588         Fix the world.
1589
1590         * bindings/js/kjs_proxy.cpp:
1591         (WebCore::KJSProxy::clear):
1592
1593 2008-04-24  Darin Adler  <darin@apple.com>
1594
1595         Reviewed by Geoff.
1596
1597         - fix crash in regression test where we'd ask a frame for a user agent string
1598           after the WebView was already closed
1599
1600         * loader/FrameLoader.cpp:
1601         (WebCore::FrameLoader::scheduleHTTPRedirection): Quietly do nothing if this is
1602         called on a frame that's already detached from its page.
1603         (WebCore::FrameLoader::scheduleLocationChange): Ditto.
1604         (WebCore::FrameLoader::scheduleRefresh): Ditto.
1605         (WebCore::FrameLoader::scheduleHistoryNavigation): Ditto.
1606         (WebCore::FrameLoader::redirectionTimerFired): Assert that this is never called
1607         for a frame that's already detached from its page.
1608         (WebCore::FrameLoader::scheduleRedirection): Ditto.
1609         (WebCore::FrameLoader::startRedirectionTimer): Ditto.
1610
1611 2008-04-23  Timothy Hatcher  <timothy@apple.com>
1612
1613         Add a new callFunction helper function to remove duplicate code
1614         for calling JavaScript functions with arguments.
1615
1616         Reviewed by Darin Adler.
1617
1618         * page/InspectorController.cpp:
1619         (WebCore::InspectorController::callSimpleFunction): Call callFunction.
1620         (WebCore::InspectorController::callFunction): Extended version of the original
1621         callSimpleFunction, with script function arguments and an exception argument.
1622         (WebCore::InspectorController::focusNode): Use callFunction.
1623         (WebCore::InspectorController::addScriptResource): Ditto.
1624         (WebCore::InspectorController::removeScriptResource): Ditto.
1625         (WebCore::InspectorController::addDatabaseScriptResource): Ditto.
1626         (WebCore::InspectorController::removeDatabaseScriptResource): Ditto.
1627         (WebCore::InspectorController::addScriptConsoleMessage): Ditto.
1628         * page/InspectorController.h: Add callFunction.
1629
1630 2008-04-24  Anders Carlsson  <andersca@apple.com>
1631
1632         Reviewed by Sam.
1633
1634         Change some String arguments to be const references instead.
1635         
1636         * css/CSSRule.cpp:
1637         (WebCore::CSSRule::setCssText):
1638         * css/CSSRule.h:
1639         * html/HTMLFormElement.cpp:
1640         (WebCore::pathGetFilename):
1641         * html/HTMLMediaElement.cpp:
1642         (WebCore::parseTimeOffset):
1643         * page/EditorClient.h:
1644         * platform/SecurityOrigin.cpp:
1645         (WebCore::isDefaultPortForProtocol):
1646         * platform/graphics/MediaPlayer.cpp:
1647         (WebCore::MediaPlayer::load):
1648         * platform/graphics/MediaPlayer.h:
1649         * rendering/MediaControlElements.cpp:
1650         (WebCore::MediaControlInputElement::MediaControlInputElement):
1651         * rendering/MediaControlElements.h:
1652         * svg/animation/SVGSMILElement.cpp:
1653         (WebCore::SVGSMILElement::Condition::Condition):
1654         * svg/animation/SVGSMILElement.h:
1655         * svg/graphics/SVGImageEmptyClients.h:
1656         (WebCore::SVGEmptyEditorClient::shouldInsertText):
1657         * xml/XSLTProcessor.cpp:
1658         (WebCore::createFragmentFromSource):
1659
1660 2008-04-24  Justin Garcia  <justin.garcia@apple.com>
1661
1662         Reviewed by Darin Adler.
1663
1664         <rdar://problem/5604313> FormatBlock to apply an h1 also inserts a style span around the first letter (16004)
1665         
1666         * editing/TextIterator.cpp:
1667         (WebCore::TextIterator::advance): We emit an extra newline when leaving a
1668         block element that has atypical margin/padding. When we emit the extra newline, 
1669         it needs to be positioned after that block's contents, not after the block. 
1670         This is how we position the first newline, too, since the range for emitted newlines 
1671         should start where the line break begins visually.
1672
1673 2008-04-24  Anders Carlsson  <andersca@apple.com>
1674
1675         Reviewed by Adam.
1676
1677         Only avoid implicit entries when doing the initial caching.
1678         
1679         * loader/appcache/ApplicationCacheGroup.cpp:
1680         (WebCore::ApplicationCacheGroup::didReceiveResponse):
1681         (WebCore::ApplicationCacheGroup::startLoadingEntry):
1682
1683 2008-04-24  Kevin McCullough  <kmccullough@apple.com>
1684
1685         Reviewed by Adam and Sam.
1686
1687         -<rdar://problem/5770054> JavaScript profiler (10928)
1688         -Only profile the page group that starts profiling to avoid profiling
1689         tools that shouldn't be profiled unless explicitly requested to.
1690
1691         * bindings/js/kjs_proxy.cpp: When a new global object is created set its
1692         page group identifier.
1693         (WebCore::KJSProxy::clear):
1694         (WebCore::KJSProxy::initScript):
1695         * page/Console.cpp: When calling console.profile set the identifier of
1696         the page group being profiled.
1697         (WebCore::Console::profile):
1698         * page/PageGroup.cpp: Implement unique identifiers.
1699         (WebCore::getUniqueIdentifier):
1700         (WebCore::PageGroup::PageGroup):
1701         * page/PageGroup.h: Ditto.
1702         (WebCore::PageGroup::identifier):
1703
1704 2008-04-24  John Sullivan  <sullivan@apple.com>
1705
1706         Mac buid fix
1707
1708         * page/mac/WebCoreViewFactory.h:
1709         add declarations of six new AX methods that were added to LocalizedStrings.h
1710         
1711         * platform/mac/LocalizedStringsMac.mm:
1712         (WebCore::AXButtonActionVerb):
1713         implement by calling through to WebCoreViewFactory as we do with the other functions here
1714         (WebCore::AXRadioButtonActionVerb):
1715         ditto
1716         (WebCore::AXTextFieldActionVerb):
1717         ditto
1718         (WebCore::AXCheckedCheckBoxActionVerb):
1719         ditto
1720         (WebCore::AXUncheckedCheckBoxActionVerb):
1721         ditto
1722         (WebCore::AXLinkActionVerb):
1723         ditto
1724
1725 2008-04-24  Simon Hausmann  <hausmann@webkit.org>
1726
1727         Rubber-stamped by Lars
1728
1729         Fix text rendering in -reverse mode on Qt/Mac.
1730
1731         For Font::width() don't use a plain QFontMetrics object but also the properly
1732         setup QTextLayout that has the RTL/LTR force flags set.
1733
1734         * platform/graphics/qt/FontQt.cpp:
1735         (WebCore::Font::width):
1736
1737 2008-04-24  Tor Arne Vestbø  <tavestbo@trolltech.com>
1738
1739         Reviewed by Simon.
1740
1741         Don't do anti-aliasing for arcs, lines and rects, but continue to anti-alias
1742         all drawing primitives in the HTML Canvas element.
1743
1744         This speeds up drawing of dashed outlines significantly.
1745
1746         Also preserve the anti-aliasing renderhint for transparency layers and
1747         get rid of the mostly unused device pointer.
1748
1749         * platform/graphics/qt/GraphicsContextQt.cpp:
1750         (WebCore::TransparencyLayer::TransparencyLayer):
1751         (WebCore::GraphicsContextPlatformPrivate::p):
1752         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
1753         (WebCore::GraphicsContext::beginTransparencyLayer):
1754         (WebCore::GraphicsContext::drawRect):
1755         (WebCore::GraphicsContext::drawLine):
1756         (WebCore::GraphicsContext::strokeArc):
1757
1758 2008-04-24  Paul Olav Tvete <paul@trolltech.com>
1759
1760         Reviewed by Simon.
1761
1762         Fix various compiler warnings related to QString(const char *)
1763         construction by using QLatin1String.
1764
1765         * bridge/qt/qt_instance.cpp:
1766         (KJS::Bindings::QtField::valueFromInstance):
1767         (KJS::Bindings::QtField::setValueToInstance):
1768         * dom/XMLTokenizer.cpp:
1769         (WebCore::):
1770         * platform/graphics/qt/PathQt.cpp:
1771         (WebCore::Path::debugString):
1772
1773 2008-04-24  Morten Johan Sørvig  <msorvig@trolltech.com>
1774
1775         Reviewed by Simon.
1776
1777         Work around QMacStyle bug in repainting the vertical scrollbar.
1778
1779         We draw the scrollbar using HITheme but somehow the translation and the
1780         clipping we previously set using ClipCGContextToRegion is ignored. Drawing
1781         without the translation fixes the clip.
1782
1783         * platform/qt/PlatformScrollBarQt.cpp:
1784         (WebCore::PlatformScrollbar::paint):
1785
1786 2008-04-24  Holger Hans Peter Freyther  <zecke@selfish.org>
1787
1788         Reviewed by Simon.
1789
1790         * Set an expiration date for local files as we do not know what will happen
1791         to these files (in contrast to a http server with max-age and other headers)
1792         * Remember the time when we started the job and use that for the expiration date
1793         * QNetworkManager does not handle expiration at all, we might want to set the
1794         expiration for all downloads but this will be a performance nightmare.
1795
1796         * platform/network/qt/QNetworkReplyHandler.cpp:
1797         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
1798         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
1799         (WebCore::QNetworkReplyHandler::start):
1800         * platform/network/qt/QNetworkReplyHandler.h:
1801
1802 2008-04-24  Simon Hausmann  <hausmann@webkit.org>
1803
1804         Fix the Gtk and Qt builds.
1805
1806         Added missing localization stubs for accessibility.
1807
1808         * platform/gtk/LocalizedStringsGtk.cpp:
1809         (WebCore::AXButtonActionVerb):
1810         (WebCore::AXRadioButtonActionVerb):
1811         (WebCore::AXTextFieldActionVerb):
1812         (WebCore::AXCheckedCheckBoxActionVerb):
1813         (WebCore::AXUncheckedCheckBoxActionVerb):
1814         (WebCore::AXLinkActionVerb):
1815         * platform/qt/Localizations.cpp:
1816         (WebCore::AXButtonActionVerb):
1817         (WebCore::AXRadioButtonActionVerb):
1818         (WebCore::AXTextFieldActionVerb):
1819         (WebCore::AXCheckedCheckBoxActionVerb):
1820         (WebCore::AXUncheckedCheckBoxActionVerb):
1821         (WebCore::AXLinkActionVerb):
1822
1823 2008-04-24  Olivier Goffart  <ogoffart@trolltech.com>
1824
1825         Reviewed by Simon
1826
1827         Fix various compiler warnings in the Qt port.
1828
1829         * platform/graphics/qt/ImageQt.cpp:
1830         (loadResourcePixmap):
1831         * platform/qt/CookieJarQt.cpp:
1832         (WebCore::cookies):
1833         * platform/qt/ScrollViewQt.cpp:
1834         (WebCore::ScrollView::wheelEvent):
1835         * plugins/qt/PluginDataQt.cpp:
1836         (WebCore::PluginData::initPlugins):
1837
1838 2008-04-24  Andre Poenitz  <andre.poenitz@trolltech.com>
1839
1840         Reviewed by Simon.
1841
1842         Removed spurious QHideEvent forward declaration.
1843
1844         * platform/qt/QWebPopup.h:
1845
1846 2008-04-24  Tor Arne Vestbø  <tavestbo@trolltech.com>
1847
1848         Reviewed by Simon.
1849
1850         Render text areas using Qt (ensures proper style).
1851
1852         * platform/qt/RenderThemeQt.cpp:
1853         (WebCore::RenderThemeQt::paintTextField):
1854         (WebCore::RenderThemeQt::adjustTextFieldStyle):
1855         (WebCore::RenderThemeQt::paintTextArea):
1856         (WebCore::RenderThemeQt::supportsFocus):
1857         * platform/qt/RenderThemeQt.h:
1858
1859 2008-04-24  Tor Arne Vestbø  <tavestbo@trolltech.com>
1860
1861         Reviewed by Simon.
1862
1863         Make mouse wheel events over scrollbars behave the same as in Qt, i.e. both
1864         horizontal and vertical wheel events will scroll the view in the orientation
1865         of the scrollbar underneath the cursor.
1866
1867         * platform/qt/ScrollViewQt.cpp:
1868         (WebCore::ScrollView::paint):
1869         (WebCore::ScrollView::wheelEvent):
1870
1871 2008-04-23  Jon Honeycutt  <jhoneycutt@apple.com>
1872
1873         Reviewed by Brady.
1874
1875         * page/AccessibilityObject.cpp:
1876         (WebCore::AccessibilityObject::press): Return false if this object
1877         doesn't have an action element associated with it.
1878         * page/AccessibilityObject.h: Added a performDefaultAction() method,
1879         which just calls press(). Marked press() const and changed its return
1880         type to bool.
1881
1882 2008-04-23  Jon Honeycutt  <jhoneycutt@apple.com>
1883
1884         Reviewed by Adam.
1885
1886         Don't allow a hit test to return an AccessibilityObject that should be
1887         ignored.
1888
1889         * page/AccessibilityObject.cpp:
1890         (WebCore::AccessibilityObject::doAccessibilityHitTest): If this result
1891         object's accessibility is ignored, return the parent unignored object.
1892
1893 2008-04-23  Jon Honeycutt  <jhoneycutt@apple.com>
1894
1895         Reviewed by Adam.
1896
1897         Fix a crash when performing a hit test on an AccessibilityObject with
1898         no layer (e.g., an AccessibilityObject for a RenderText object).
1899
1900         * page/AccessibilityObject.cpp:
1901         (WebCore::AccessibilityObject::doAccessibilityHitTest): Added a null
1902         check for layer. Removed a null check for m_renderer, which shouldn't
1903         occur.
1904
1905 2008-04-23  Jon Honeycutt  <jhoneycutt@apple.com>
1906
1907         * page/AccessibilityObject.cpp:
1908         (WebCore::AccessibilityObject::boundingBoxRect): Added FIXME about this
1909         method not working correctly for objects with CSS transforms applied.
1910
1911 2008-04-23  Jon Honeycutt  <jhoneycutt@apple.com>
1912
1913         Reviewed by Adam.
1914
1915         Implement contentsToScreen() and screenToContents() on Windows.
1916
1917         * platform/ScrollView.h: Make these declarations conditional on
1918         HAVE(ACCESSIBILITY) instead of PLATFORM(MAC).
1919         * platform/win/ScrollViewWin.cpp:
1920         (WebCore::ScrollView::contentsToScreen): Translate from coordinates
1921         relative to the ScrollView to coordinates relative to the screen. Do
1922         this by getting the offset of the ScrollView in screen coordinates and
1923         moving the rect by this amount.
1924         (WebCore::ScrollView::screenToContents): Translate from coordinates
1925         relative to the screen to coordinates relative to the ScrollView.
1926
1927 2008-04-23  Jon Honeycutt  <jhoneycutt@apple.com>
1928
1929         Reviewed by Oliver.
1930
1931         Add a method to get a localized, human-readable string stating this
1932         object's default action, e.g., a button's default action is "press."
1933
1934         * page/AccessibilityObject.cpp:
1935         (WebCore::AccessibilityObject::actionVerb): Added.
1936         * page/AccessibilityObject.h: Added declaration for actionVerb().
1937         * platform/LocalizedStrings.h: Added declarations for:
1938             AXButtonActionVerb()
1939             AXRadioButtonActionVerb()
1940             AXTextFieldActionVerb()
1941             AXCheckedCheckBoxActionVerb()
1942             AXUncheckedCheckBoxActionVerb()
1943             AXLinkActionVerb()
1944
1945 2008-04-24  Tor Arne Vestbø  <tavestbo@trolltech.com>
1946
1947         Reviewed by Simon.
1948
1949         Cleaned up copyright headers in the Qt port (removed misplaced class
1950         descriptions and fixed inconsistent whitespace and indentation).
1951
1952         * platform/graphics/qt/FontQt.cpp:
1953         * platform/qt/WheelEventQt.cpp:
1954
1955 2008-04-24  Tor Arne Vestbø  <tavestbo@trolltech.com>
1956
1957         Reviewed by Simon.
1958
1959         Disable vanlilla focus rings since Qt provides this as part of the style.
1960
1961         * platform/qt/RenderThemeQt.cpp:
1962
1963 2008-04-24  George Staikos  <george@staikos.net>
1964
1965         Reviewed by Simon.
1966
1967         This optimization in BitmapImage::drawPattern for the identity
1968         transform is bogus and causes incorrect results on sites like youtube.
1969
1970         * platform/graphics/qt/ImageQt.cpp:
1971         (WebCore::BitmapImage::drawPattern):
1972
1973 2008-04-23  Brady Eidson  <beidson@apple.com>
1974
1975         Reviewed by Jon Honeycutt
1976
1977         Preparing for making LocalStorageAreas persistent.
1978
1979         Since LocalStorageAreas will need to do a lot of additional work for each of the basic
1980         operations a Storage object supports, this patch makes the API entry points virtual so
1981         LocalStorageArea can override them.  The behavior for both Local and Session StorageAreas
1982         is unchanged with this patch, but LocalStorageArea will override them in the future.
1983
1984         * storage/StorageArea.cpp: Rename the implementations to internalFoo
1985         (WebCore::StorageArea::internalLength):
1986         (WebCore::StorageArea::internalKey):
1987         (WebCore::StorageArea::internalGetItem):
1988         (WebCore::StorageArea::internalSetItem):
1989         (WebCore::StorageArea::internalRemoveItem):
1990         (WebCore::StorageArea::internalContains):
1991
1992         * storage/StorageArea.h: Call internalFoo variants
1993         (WebCore::StorageArea::length):
1994         (WebCore::StorageArea::key):
1995         (WebCore::StorageArea::getItem):
1996         (WebCore::StorageArea::setItem):
1997         (WebCore::StorageArea::removeItem):
1998         (WebCore::StorageArea::contains):
1999
2000 2008-04-23  David Hyatt  <hyatt@apple.com>
2001
2002         Implement getComputedStyle for border-image.
2003
2004         Reviewed by Dan Bernstein
2005
2006         Added fast/css/getComputedStyle-border-image.html
2007
2008         * css/CSSComputedStyleDeclaration.cpp:
2009         (WebCore::):
2010         (WebCore::valueForRepeatRule):
2011         (WebCore::valueForNinePieceImage):
2012         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2013
2014 2008-04-22  Darin Adler  <darin@apple.com>
2015
2016         Reviewed by Anders.
2017
2018         - simplify use of HashTraits to prepare for some upcoming hash table changes
2019
2020         * page/AXObjectCache.h: Removed uneeded AXIDHashTraits, which are no different
2021         from the default hash traits for unsigned.
2022         * page/mac/AXObjectCacheMac.mm:
2023         (WebCore::AXObjectCache::removeAXID): Remove assertion that's already done
2024         by HashTable that the value is not the deleted value.
2025
2026         * platform/graphics/StringTruncator.cpp: Removed unneeded include.
2027         * svg/SVGFontFaceElement.cpp: Removed unneeded include.
2028
2029 2008-04-23  Kevin Ollivier  <kevino@theolliviers.com>
2030
2031         wx build fixes. Changing BackgroundLayer -> FillLayer and adding
2032         Frame::disconnectPlatformScriptObjects().
2033
2034         * platform/wx/RenderThemeWx.cpp:
2035         (WebCore::RenderThemeWx::isControlStyled):
2036         * platform/wx/TemporaryLinkStubs.cpp:
2037         (Frame::disconnectPlatformScriptObjects):
2038
2039 2008-04-23  David Hyatt  <hyatt@apple.com>
2040
2041         Add support for mask-box-image (similar to border-image).  This property enables a single image
2042         to overlay the entire mask area (with nine-piece slicing rules similar to border image).
2043
2044         Reviewed by Dan Bernstein
2045
2046         Added inline-mask-overlay.html, block-mask-overlay.html
2047
2048         * css/CSSComputedStyleDeclaration.cpp:
2049         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2050         * css/CSSParser.cpp:
2051         (WebCore::CSSParser::parseValue):
2052         (WebCore::CSSParser::parseBorderImage):
2053         * css/CSSPropertyNames.in:
2054         * css/CSSStyleSelector.cpp:
2055         (WebCore::CSSStyleSelector::applyProperty):
2056         * rendering/InlineFlowBox.cpp:
2057         (WebCore::InlineFlowBox::paintMask):
2058         * rendering/RenderBox.cpp:
2059         (WebCore::RenderBox::paintMask):
2060         * rendering/RenderFlow.cpp:
2061         (WebCore::RenderFlow::paintLines):
2062         * rendering/RenderObject.cpp:
2063         (WebCore::RenderObject::paintNinePieceImage):
2064         (WebCore::RenderObject::paintBorder):
2065         * rendering/RenderObject.h:
2066         * rendering/RenderStyle.cpp:
2067         (WebCore::NinePieceImage::operator==):
2068         * rendering/RenderStyle.h:
2069         (WebCore::):
2070         (WebCore::NinePieceImage::m_verticalRule):
2071         (WebCore::NinePieceImage::horizontalRule):
2072         (WebCore::NinePieceImage::verticalRule):
2073         (WebCore::RenderStyle::borderImage):
2074         (WebCore::RenderStyle::maskOverlayImage):
2075         (WebCore::RenderStyle::hasMask):
2076         (WebCore::RenderStyle::resetBorderImage):
2077         (WebCore::RenderStyle::setBorderImage):
2078         (WebCore::RenderStyle::setMaskOverlayImage):
2079         (WebCore::RenderStyle::initialNinePieceImage):
2080         * rendering/RenderTable.cpp:
2081         (WebCore::RenderTable::paintMask):
2082         * rendering/RenderTableCell.cpp:
2083         (WebCore::RenderTableCell::paintMask):
2084
2085 2008-04-23  Justin Garcia  <justin.garcia@apple.com>
2086
2087         Reviewed by Darin Adler.
2088
2089         <rdar://problem/5825350> OWA: Caret disappears when navigating with arrows keys in contenteditable div
2090
2091         * editing/htmlediting.cpp:
2092         (WebCore::firstEditablePositionAfterPositionInRoot): Return a null VisiblePosition if
2093         this function moves out of highestRoot.  Re-wrote so as to not duplicate code inside
2094         and outside of the while loop.
2095         (WebCore::lastEditablePositionBeforePositionInRoot): Ditto.
2096
2097 2008-04-23  Daniel Zucker  <zucker@wake3.com>
2098
2099         Reviewed by Adam Roben.
2100
2101         Fix build errors needed to compile Curl in Cairo build.  Add stubs for
2102         didReceiveAuthenticationChallenge, receivedCredential,
2103         receivedRequestToContinueWithoutCredential, and receivedCancellation.
2104         <https://bugs.webkit.org/show_bug.cgi?id=18468>
2105
2106         * platform/network/ResourceHandle.h:  
2107         * platform/network/curl/ResourceHandleCurl.cpp:
2108         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2109         (WebCore::ResourceHandle::receivedCredential):
2110         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
2111         (WebCore::ResourceHandle::receivedCancellation):
2112
2113 2008-04-23  Dan Bernstein  <mitz@apple.com>
2114
2115         Reviewed by Darin Adler.
2116
2117         - fix a bug where moving forward in bidirectional text skips over the
2118           position after the end of the line
2119
2120         Test: editing/selection/move-past-trailing-space.html
2121
2122         * dom/Position.cpp:
2123         (WebCore::Position::upstream): Changed the logic for identifying when a
2124         position is after the last character of a text box of a text node that
2125         continues on the next line, to make it work correctly when boxes are not
2126         laid out in logical order.
2127         (WebCore::Position::downstream): Ditto.
2128
2129 2008-04-23  Brad Hughes  <bhughes@trolltech.com>
2130
2131         Reviewed by Simon.
2132
2133         Fix release build with the intel compiler
2134
2135         Intel compiler can't compile qtwebkit with -O2 or -O1, so we're left with -O0
2136
2137         * WebCore.pro:
2138
2139 2008-04-22  Dan Bernstein  <mitz@apple.com>
2140
2141         Reviewed by Anders Carlsson.
2142
2143         - remove unused calls to Position::upstream()
2144
2145         * editing/InsertLineBreakCommand.cpp:
2146         (WebCore::InsertLineBreakCommand::insertNodeAfterPosition):
2147         (WebCore::InsertLineBreakCommand::insertNodeBeforePosition):
2148
2149 2008-04-22  Jon Honeycutt  <jhoneycutt@apple.com>
2150
2151         Reviewed by Sam.
2152
2153         Add a method to query which modifier keys the platform uses for access
2154         key actions.
2155
2156         * page/EventHandler.cpp:
2157         (WebCore::EventHandler::handleAccessKey): Bitwise and the event's
2158         modifier keys with the platform's access key modifier mask to determine
2159         whether this event can perform an access key action.
2160         * page/EventHandler.h: Added s_accessKeyModifiers, a platform-defined
2161         mask of modifier keys used for access key actions, and a getter.
2162         * page/mac/EventHandlerMac.mm: Use PlatformKeyboardEvent::CtrlKey for
2163         access key actions.
2164         * page/qt/EventHandlerQt.cpp: Same.
2165         * page/gtk/EventHandlerGtk.cpp: Use AltKey.
2166         * page/win/EventHandlerWin.cpp: Same.
2167         * page/wx/EventHandlerWx.cpp: Same.
2168         * platform/PlatformKeyboardEvent.h: Added an enum, ModifierKey.
2169         (WebCore::PlatformKeyboardEvent::):
2170         (WebCore::PlatformKeyboardEvent::modifiers): Return which modifier keys
2171         were active, a combination of ModifierKey values.
2172
2173 2008-04-22  Sam Weinig  <sam@webkit.org>
2174
2175         Reviewed by Maciej Stachowiak.
2176
2177         Make the KJSProxy and FrameLoader member variables instead of pointers
2178         in FramePrivate in a bid to do a little clean up before the last of the
2179         split window patches.  Also, make the KJSProxy not lazily created, as the
2180         real benefit comes from lazily creating the JSDOMWindowWrapper, which we
2181         still do.
2182
2183         * page/Frame.cpp:
2184         (WebCore::Frame::~Frame):
2185         (WebCore::Frame::init):
2186         (WebCore::Frame::loader):
2187         (WebCore::Frame::scriptProxy):
2188         (WebCore::Frame::document):
2189         (WebCore::Frame::setDocument):
2190         (WebCore::Frame::clearScriptProxy):
2191         (WebCore::Frame::pageDestroyed):
2192         (WebCore::FramePrivate::FramePrivate):
2193         (WebCore::FramePrivate::~FramePrivate):
2194         * page/FramePrivate.h:
2195
2196 2008-04-22  Anatoli Papirovski  <apapirovski@mac.com>
2197
2198         Reviewed by Dan Bernstein.
2199
2200         - fix https://bugs.webkit.org/show_bug.cgi?id=18584
2201         border-color, outline-color, column-color, -webkit-text-stroke-color,
2202         and -webkit-text-fill-color inheritance to correctly use parent's color
2203         if the parent's corresponding (border, outline, etc.)-color property
2204         wasn't set.
2205
2206         Test: fast/borders/border-color-inherit.html
2207
2208         * css/CSSStyleSelector.cpp:
2209         (WebCore::CSSStyleSelector::applyProperty):
2210
2211 2008-04-22  Alp Toker  <alp@nuanti.com>
2212
2213         Rubber-stamped by Dave Hyatt.
2214
2215         Move GraphicsContext::clipToImageBuffer() notImplemented() stub to
2216         GraphicsContextCairo.
2217
2218         * platform/graphics/GraphicsContext.cpp:
2219         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2220         (WebCore::GraphicsContext::clipToImageBuffer):
2221
2222 2008-04-22  David Hyatt  <hyatt@apple.com>
2223
2224         Add support for mask-composite to match background-composite.
2225
2226         Reviewed by Sam Weinig
2227
2228         Added fast/backgrounds/mask-composite.html
2229
2230         * css/CSSComputedStyleDeclaration.cpp:
2231         (WebCore::):
2232         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2233         * css/CSSParser.cpp:
2234         (WebCore::CSSParser::parseValue):
2235         (WebCore::CSSParser::parseFillProperty):
2236         * css/CSSPropertyNames.in:
2237         * css/CSSStyleSelector.cpp:
2238         (WebCore::CSSStyleSelector::applyProperty):
2239         * rendering/InlineFlowBox.cpp:
2240         (WebCore::InlineFlowBox::paintMask):
2241
2242 2008-04-22  David Hyatt  <hyatt@apple.com>
2243
2244         Fix for bug 18688, background-color stopped painting on inlines.  Fix a virtual function
2245         misnaming that led to the derived class not getting called properly.
2246
2247         Reviewed by Mark Rowe
2248
2249         * ChangeLog:
2250         * rendering/InlineFlowBox.cpp:
2251         (WebCore::InlineFlowBox::paintFillLayer):
2252         * rendering/RenderObject.h:
2253         (WebCore::RenderObject::paintFillLayerExtended):
2254
2255 2008-04-22  Brady Eidson  <beidson@apple.com>
2256
2257         Reviewed by Sam Weinig
2258
2259         <rdar://problem/5733282> and https://bugs.webkit.org/show_bug.cgi?id=18680
2260         Always loads default shortcut icon URL when an external <script> is referenced before the icon URL is set.
2261
2262         * dom/Document.cpp:
2263         (WebCore::Document::implicitClose): Call FrameLoader->startIconLoader() here, when the document is
2264           finished parsing.
2265
2266         * loader/FrameLoader.cpp:
2267         (WebCore::FrameLoader::endIfNotLoadingMainResource):  Don't start the icon load here, when the
2268           document is finished parsing.  This was often too early, as document parsing may be blocked
2269           on an external script and therefore the correct iconURL is not set yet.
2270           The isLoadingFromCachedPage() check was when we started the icon load based on *loading* instead parsing,
2271           and is now irrelevant.
2272         * loader/FrameLoader.h:  Make startIconLoader() public
2273
2274 2008-04-22  Antti Koivisto  <antti@apple.com>
2275
2276         Reviewed by Oliver.
2277
2278         Support keyPoints attribute of <animateMotion>.
2279         
2280         Tested by SVG test suite test
2281         animate-elem-33-t.svg
2282
2283         * svg/SVGAnimateMotionElement.cpp:
2284         (WebCore::SVGAnimateMotionElement::parseMappedAttribute):
2285         * svg/SVGAnimationElement.cpp:
2286         (WebCore::parseKeyTimes):
2287         (WebCore::SVGAnimationElement::parseMappedAttribute):
2288         (WebCore::SVGAnimationElement::calculatePercentForSpline):
2289         (WebCore::SVGAnimationElement::calculatePercentFromKeyPoints):
2290         (WebCore::SVGAnimationElement::currentValuesFromKeyPoints):
2291         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
2292         (WebCore::SVGAnimationElement::startedActiveInterval):
2293         (WebCore::SVGAnimationElement::updateAnimation):
2294         * svg/SVGAnimationElement.h:
2295
2296 2008-04-22  Holger Hans Peter Freyther  <zecke@selfish.org>
2297
2298         Unreviewed build fix.
2299
2300         Update WebKit.qrc to catch up with the addition and removal of images
2301         from page/inspector/Images in recent commits.
2302
2303         * page/inspector/WebKit.qrc:
2304
2305 2008-04-22  David Hyatt  <hyatt@apple.com>
2306
2307         Fix for <rdar://5589634>.
2308
2309         Implement CSS alpha masks.  The syntax is very similar to that used for backgrounds.  Multiple mask images
2310         can be specified, and each one can be tiled, positioned, etc.  The following new properties have been
2311         added (all of which are analogous to their background-* counterparts).
2312
2313         mask, mask-image, mask-clip, mask-origin, mask-repeat, mask-attachment, mask-position
2314
2315         The alpha values in the final composite image are used to determine how the mask applies (alpha of 1 = show,
2316         alpha of 0 = don't show).
2317
2318         SVG images and CSS gradients can also be used as masks.
2319
2320         Reviewed by Dan
2321
2322         Added fast/backgrounds/repeat/mask-negative-offset-repeat.html, fast/backgrounds/svg-as-mask.html
2323
2324         * css/CSSMutableStyleDeclaration.cpp:
2325         (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
2326         (WebCore::initShorthandMap):
2327         * css/CSSParser.cpp:
2328         (WebCore::CSSParser::parseFillProperty):
2329         (WebCore::CSSParser::parseTransformOrigin):
2330         * css/CSSStyleSelector.cpp:
2331         (WebCore::CSSStyleSelector::adjustRenderStyle):
2332         (WebCore::CSSStyleSelector::applyProperty):
2333         * rendering/InlineFlowBox.cpp:
2334         (WebCore::InlineFlowBox::paint):
2335         (WebCore::InlineFlowBox::paintFillLayers):
2336         (WebCore::InlineFlowBox::paintFillLayer):
2337         (WebCore::InlineFlowBox::paintBoxDecorations):
2338         (WebCore::InlineFlowBox::paintMask):
2339         * rendering/InlineFlowBox.h:
2340         * rendering/RenderBlock.cpp:
2341         (WebCore::RenderBlock::paint):
2342         (WebCore::RenderBlock::paintObject):
2343         * rendering/RenderBox.cpp:
2344         (WebCore::RenderBox::paintRootBoxDecorations):
2345         (WebCore::RenderBox::paintBoxDecorations):
2346         (WebCore::RenderBox::paintMask):
2347         (WebCore::RenderBox::paintFillLayers):
2348         (WebCore::RenderBox::paintFillLayer):
2349         (WebCore::RenderBox::paintFillLayerExtended):
2350         * rendering/RenderBox.h:
2351         * rendering/RenderFieldset.cpp:
2352         (WebCore::RenderFieldset::paintBoxDecorations):
2353         (WebCore::RenderFieldset::paintMask):
2354         * rendering/RenderFieldset.h:
2355         * rendering/RenderInline.cpp:
2356         (WebCore::RenderInline::requiresLayer):
2357         * rendering/RenderLayer.cpp:
2358         (WebCore::RenderLayer::isTransparent):
2359         (WebCore::RenderLayer::paintLayer):
2360         * rendering/RenderObject.cpp:
2361         (WebCore::RenderObject::requiresLayer):
2362         (WebCore::mustRepaintFillLayers):
2363         (WebCore::RenderObject::mustRepaintBackgroundOrBorder):
2364         (WebCore::RenderObject::setStyle):
2365         (WebCore::RenderObject::updateFillImages):
2366         * rendering/RenderObject.h:
2367         (WebCore::):
2368         (WebCore::RenderObject::hasMask):
2369         (WebCore::RenderObject::paintMask):
2370         (WebCore::RenderObject::paintFillExtended):
2371         * rendering/RenderReplaced.cpp:
2372         (WebCore::RenderReplaced::paint):
2373         * rendering/RenderStyle.cpp:
2374         (WebCore::FillLayer::FillLayer):
2375         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2376         * rendering/RenderStyle.h:
2377         (WebCore::FillLayer::initialFillComposite):
2378         (WebCore::FillLayer::initialFillSize):
2379         (WebCore::FillLayer::FillLayer):
2380         (WebCore::RenderStyle::hasMask):
2381         * rendering/RenderTable.cpp:
2382         (WebCore::RenderTable::paint):
2383         (WebCore::RenderTable::paintBoxDecorations):
2384         (WebCore::RenderTable::paintMask):
2385         * rendering/RenderTable.h:
2386         * rendering/RenderTableCell.cpp:
2387         (WebCore::RenderTableCell::requiresLayer):
2388         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
2389         (WebCore::RenderTableCell::paintMask):
2390         * rendering/RenderTableCell.h:
2391         * rendering/RenderWidget.cpp:
2392         (WebCore::RenderWidget::paint):
2393         * svg/graphics/SVGImage.cpp:
2394         (WebCore::SVGImage::draw):
2395         (WebCore::SVGImage::dataChanged):
2396
2397 2008-04-22  Sam Weinig  <sam@webkit.org>
2398
2399         Reviewed by Geoffrey Garen.
2400
2401         Make DOMAbstractView have a weak reference to the Frame instead of ref'ing
2402         the DOMWindow.
2403
2404         To ensure that the WindowScriptObject (which is a DOMAbstractView) stays valid
2405         after a navigation once the split window is completed, the DOMAbstractView must
2406         wrap the Frame instead of a DOMWindow since the DOMWindow will change.
2407
2408         * WebCore.xcodeproj/project.pbxproj:
2409         * bindings/objc/DOMAbstractView.mm: Added.
2410         (-[DOMAbstractView dealloc]):
2411         (-[DOMAbstractView finalize]):
2412         (-[DOMAbstractView document]):
2413         (-[DOMAbstractView _disconnectFrame]):
2414         (-[DOMAbstractView WebCore::]):
2415         (-[DOMAbstractView _initWithFrame:WebCore::]):
2416         (+[DOMAbstractView _wrapAbstractView:WebCore::]):
2417         Add custom implementation to implement weak reference semantics.
2418
2419         * bindings/objc/DOMAbstractViewFrame.h: Added.
2420         Declare the [DOMAbstractView _disconectFrame] selector.
2421         * bindings/objc/DOMInternal.h:
2422         Remove DOMRGBColor Internal category since it is now generated.
2423
2424         * bindings/objc/DOMUtility.mm:
2425         (KJS::createDOMWrapper):
2426         Don't ever create a DOMAbstractView from a JSDOMWindow, only from JSDOMWindowWrapper.
2427
2428         * bindings/scripts/CodeGeneratorObjC.pm:
2429         Generate internal header for IDLs that want custom implementations.
2430
2431         * css/RGBColor.idl:
2432         Make this a PODType as it really is in the implementation.
2433
2434         * page/AbstractView.idl:
2435         This now needs a custom objective-c binding implementation.
2436
2437         * page/Frame.cpp:
2438         (WebCore::Frame::~Frame):
2439         disconnect the weak frame reference in the WindowScriptObject.
2440
2441         * page/Frame.h:
2442         * page/gtk/FrameGtk.cpp:
2443         (WebCore::Frame::disconnectPlatformScriptObjects): Dummy implementation.
2444         * page/mac/FrameMac.mm:
2445         (WebCore::Frame::windowScriptObject): ASSERT that the windowScriptObject is a DOMAbstractView.
2446         (WebCore::Frame::disconnectPlatformScriptObjects): Disconnect the frame pointer from the windowScriptObject.
2447         * page/qt/FrameQt.cpp:
2448         (WebCore::Frame::disconnectPlatformScriptObjects): Dummy implementation.
2449         * page/win/FrameWin.cpp:
2450         (WebCore::Frame::disconnectPlatformScriptObjects): Ditto.
2451
2452 2008-04-22  Dan Bernstein  <mitz@apple.com>
2453
2454         Reviewed by Sam Weinig.
2455
2456         - preparation for https://bugs.webkit.org/show_bug.cgi?id=3729
2457           <rdar://problem/4036353> REGRESSION: arrow keys move insertion bar backwards in RTL text
2458
2459         * rendering/bidi.cpp:
2460         (WebCore::RenderBlock::layoutInlineChildren): Make sure to give the
2461         trailing white space a bidi level consistent with its position.
2462
2463 2008-04-22  Timothy Hatcher  <timothy@apple.com>
2464
2465         Remove many unused Web Inspector images.
2466
2467         Rubber-stamped by Adam Roben and Sam Weinig.
2468
2469         * page/inspector/Images/attachedShadow.png: Removed.
2470         * page/inspector/Images/backNormal.png: Removed.
2471         * page/inspector/Images/bottomShadow.png: Removed.
2472         * page/inspector/Images/breadcrumbBackground.png: Removed.
2473         * page/inspector/Images/console.png: Removed.
2474         * page/inspector/Images/databaseBrowserViewNormal.png: Removed.
2475         * page/inspector/Images/databaseBrowserViewNormalSelected.png: Removed.
2476         * page/inspector/Images/databaseBrowserViewSmall.png: Removed.
2477         * page/inspector/Images/databaseBrowserViewSmallSelected.png: Removed.
2478         * page/inspector/Images/databaseQueryViewNormal.png: Removed.
2479         * page/inspector/Images/databaseQueryViewNormalSelected.png: Removed.
2480         * page/inspector/Images/databaseQueryViewSmall.png: Removed.
2481         * page/inspector/Images/databaseQueryViewSmallSelected.png: Removed.
2482         * page/inspector/Images/disclosureDownPressed.png: Removed.
2483         * page/inspector/Images/disclosureRightDown.png: Removed.
2484         * page/inspector/Images/disclosureRightPressed.png: Removed.
2485         * page/inspector/Images/document.png: Removed.
2486         * page/inspector/Images/domViewNormal.png: Removed.
2487         * page/inspector/Images/domViewNormalSelected.png: Removed.
2488         * page/inspector/Images/domViewSmall.png: Removed.
2489         * page/inspector/Images/domViewSmallSelected.png: Removed.
2490         * page/inspector/Images/downTriangle.png: Removed.
2491         * page/inspector/Images/folder.png: Removed.
2492         * page/inspector/Images/forwardNormal.png: Removed.
2493         * page/inspector/Images/gradient.png: Removed.
2494         * page/inspector/Images/gradientHighlight.png: Removed.
2495         * page/inspector/Images/gradientHighlightBottom.png: Removed.
2496         * page/inspector/Images/hideStatusWidget.png: Removed.
2497         * page/inspector/Images/hideStatusWidgetPressed.png: Removed.
2498         * page/inspector/Images/network.png: Removed.
2499         * page/inspector/Images/plainDocument.png: Removed.
2500         * page/inspector/Images/popupArrows.png: Removed.
2501         * page/inspector/Images/popupArrowsBlack.png: Removed.
2502         * page/inspector/Images/reload.png: Removed.
2503         * page/inspector/Images/rightTriangle.png: Removed.
2504         * page/inspector/Images/showStatusWidget.png: Removed.
2505         * page/inspector/Images/showStatusWidgetPressed.png: Removed.
2506         * page/inspector/Images/sidbarItemBackground.png: Removed.
2507         * page/inspector/Images/sidebarActionWidget.png: Removed.
2508         * page/inspector/Images/sidebarActionWidgetPressed.png: Removed.
2509         * page/inspector/Images/sidebarAttachWidget.png: Removed.
2510         * page/inspector/Images/sidebarAttachWidgetPressed.png: Removed.
2511         * page/inspector/Images/sidebarDetachWidget.png: Removed.
2512         * page/inspector/Images/sidebarDetachWidgetPressed.png: Removed.
2513         * page/inspector/Images/sidebarResizeWidget.png: Removed.
2514         * page/inspector/Images/sidebarStatusAreaBackground.png: Removed.
2515         * page/inspector/Images/sourceViewNormal.png: Removed.
2516         * page/inspector/Images/sourceViewNormalSelected.png: Removed.
2517         * page/inspector/Images/sourceViewSmall.png: Removed.
2518         * page/inspector/Images/sourceViewSmallSelected.png: Removed.
2519         * page/inspector/Images/tab.png: Removed.
2520         * page/inspector/Images/tabSelected.png: Removed.
2521         * page/inspector/Images/toggleDown.png: Removed.
2522         * page/inspector/Images/toggleUp.png: Removed.
2523         * page/inspector/Images/toolbarButtonNormal.png: Removed.
2524         * page/inspector/Images/toolbarButtonNormalInactive.png: Removed.
2525         * page/inspector/Images/toolbarButtonNormalPressed.png: Removed.
2526         * page/inspector/Images/toolbarButtonNormalSelected.png: Removed.
2527         * page/inspector/Images/toolbarButtonNormalSelectedInactive.png: Removed.
2528         * page/inspector/Images/toolbarButtonSmall.png: Removed.
2529         * page/inspector/Images/toolbarButtonSmallInactive.png: Removed.
2530         * page/inspector/Images/toolbarButtonSmallPressed.png: Removed.
2531         * page/inspector/Images/toolbarButtonSmallSelected.png: Removed.
2532         * page/inspector/Images/toolbarButtonSmallSelectedInactive.png: Removed.
2533         * page/inspector/Images/toolbarPopupButtonNormal.png: Removed.
2534         * page/inspector/Images/toolbarPopupButtonNormalInactive.png: Removed.
2535         * page/inspector/Images/toolbarPopupButtonNormalPressed.png: Removed.
2536         * page/inspector/Images/toolbarPopupButtonSmall.png: Removed.
2537         * page/inspector/Images/toolbarPopupButtonSmallInactive.png: Removed.
2538         * page/inspector/Images/toolbarPopupButtonSmallPressed.png: Removed.
2539         * page/inspector/Images/toolbarSplitButtonDividerNormal.png: Removed.
2540         * page/inspector/Images/toolbarSplitButtonDividerNormalInactive.png: Removed.
2541         * page/inspector/Images/toolbarSplitButtonDividerSmall.png: Removed.
2542         * page/inspector/Images/toolbarSplitButtonDividerSmallInactive.png: Removed.
2543         * page/inspector/Images/treeLeftTriangleBlack.png: Removed.
2544
2545 2008-04-22  Anders Carlsson  <andersca@apple.com>
2546
2547         Reviewed by Darin.
2548
2549         Add NPN_Construct and NPN_PluginThreadAsyncCall declarations.
2550
2551         * bridge/npapi.h:
2552         * bridge/npruntime.h:
2553         * plugins/npfunctions.h:
2554
2555 2008-04-22  Alice Liu  <alice.liu@apple.com>
2556
2557         Reviewed by John Sullivan and Adam Roben.
2558
2559         Test: fast/events/tabindex-focus-chain.html
2560
2561         * dom/Document.cpp:
2562         (WebCore::Document::nextFocusableNode):
2563         (WebCore::Document::previousFocusableNode):
2564         If the focused node has been removed from the normal tabbing order,
2565         advancing focus from this node should advance to the next focusable
2566         node in tree order, and not start over at the beginning of the focus
2567         chain. 
2568
2569 2008-04-22  Timothy Hatcher  <timothy@apple.com>
2570
2571         Adds a debugger toggle button to the scripts status bar that will start
2572         and stop debugging of the inspected page.
2573
2574         Reviewed by Adam Roben.
2575
2576         * English.lproj/InspectorLocalizedStrings.js: Adds the two new tooltip strings.
2577         * page/InspectorController.cpp:
2578         (WebCore::debuggerAttached): Call InspectorController::debuggerAttached.
2579         (WebCore::InspectorController::InspectorController): Initialize
2580         m_debuggerAttached to false.
2581         (WebCore::InspectorController::windowScriptObjectAvailable): Add the debuggerAttached
2582         property to the InspectorController class.
2583         (WebCore::InspectorController::startDebuggingAndReloadInspectedPage):
2584         Set m_debuggerAttached to true.
2585         (WebCore::InspectorController::stopDebugging): Set m_debuggerAttached to false.
2586         * page/InspectorController.h:
2587         * page/inspector/Images/debuggingButtons.png: Added.
2588         * page/inspector/ScriptsPanel.js:
2589         (WebInspector.ScriptsPanel): Disable the pause button. Create the debugging
2590         button and setup the id, className and event listener. Call reset.
2591         (WebInspector.ScriptsPanel.prototype.get statusBarItems): Return an array
2592         (WebInspector.ScriptsPanel.prototype.reset): Call _updateDebuggerButtons.
2593         (WebInspector.ScriptsPanel.prototype._updateDebuggerButtons): Adjust the title of
2594         the debugging button to match what will happen when clicked. Change the style class,
2595         and toggle the disabled state of the pause button.
2596         (WebInspector.ScriptsPanel.prototype._toggleDebugging): Start or stop debugging
2597         depending on InspectorController.debuggerAttached().
2598         * page/inspector/inspector.css: Added style rules for the debugger button.
2599
2600 2008-04-21  Adam Roben  <aroben@apple.com>
2601
2602         Change PlatformWheelEvent to use GET_WHEEL_DELTA_WPARAM
2603
2604         Reviewed by Dan Bernstein.
2605
2606         * platform/win/WheelEventWin.cpp:
2607         (WebCore::PlatformWheelEvent::PlatformWheelEvent): Use
2608         GET_WHEEL_DELTA_WPARAM, which is documented way of getting the wheel
2609         delta (it is equivalent to what we were previously doing, however).
2610
2611 2008-04-22  Simon Hausmann  <hausmann@webkit.org>
2612
2613         Qt build fix.
2614
2615         Adjust the Qt resource file to removed image files.
2616
2617         * page/inspector/WebKit.qrc:
2618
2619 2008-04-21  Timothy Hatcher  <timothy@apple.com>
2620
2621         Use CSS gradients to replace many image files in the Web Inspector.
2622
2623         Rubber-stamped by Adam Roben.
2624
2625         * page/inspector/Images/alternateTableRows.png: Removed.
2626         * page/inspector/Images/darkShadow.png: Removed.
2627         * page/inspector/Images/paneHeader.png: Removed.
2628         * page/inspector/Images/paneHeaderActive.png: Removed.
2629         * page/inspector/Images/sidebarSelection.png: Removed.
2630         * page/inspector/Images/sidebarSelectionBackground.png: Removed.
2631         * page/inspector/Images/sidebarSelectionBackgroundFocused.png: Removed.
2632         * page/inspector/Images/sidebarSelectionBackgroundInactive.png: Removed.
2633         * page/inspector/Images/sidebarSelectionBlurred.png: Removed.
2634         * page/inspector/Images/sidebarSelectionBlurredTall.png: Removed.
2635         * page/inspector/Images/sidebarSelectionGray.png: Removed.
2636         * page/inspector/Images/sidebarSelectionGrayTall.png: Removed.
2637         * page/inspector/Images/sidebarSelectionTall.png: Removed.
2638         * page/inspector/Images/sidebarSmallSelectionBackground.png: Removed.
2639         * page/inspector/Images/sidebarSmallSelectionBackgroundFocused.png: Removed.
2640         * page/inspector/Images/sidebarSmallSelectionBackgroundInactive.png: Removed.
2641         * page/inspector/Images/toolbarBackground.png: Removed.
2642         * page/inspector/Images/toolbarBackgroundInactive.png: Removed.
2643         * page/inspector/inspector.css:
2644
2645 2008-04-22  Andre Poenitz  <andre.poenitz@trolltech.com>
2646
2647         Reviewed by Simon.
2648
2649         Remove compiler warnings on string literals used to construct QStrings
2650         in webkit.
2651
2652         * bridge/qt/qt_instance.cpp:
2653         (KJS::Bindings::QtField::valueFromInstance):
2654         (KJS::Bindings::QtField::setValueToInstance):
2655         * bridge/qt/qt_runtime.cpp:
2656         (KJS::Bindings::convertValueToQVariant):
2657         (KJS::Bindings::QtRuntimeConnectionMethod::callAsFunction):
2658
2659 2008-04-22  Tor Arne Vestbø  <tavestbo@trolltech.com>
2660
2661         Reviewed by Simon.
2662
2663         Fall back to last path component for suggested filename if the HTTP content disposition is not set.
2664
2665         * platform/network/qt/QNetworkReplyHandler.cpp:
2666         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
2667
2668 2008-04-22  Tor Arne Vestbø  <tavestbo@trolltech.com>
2669
2670         Reviewed by Simon.
2671
2672         Implemented the generation of the title string for images.
2673
2674         * platform/qt/Localizations.cpp:
2675
2676 2008-04-22  Simon Hausmann  <hausmann@webkit.org>
2677
2678         Qt build fix.
2679
2680         * platform/qt/RenderThemeQt.cpp: Adjust isControlStyled signature to
2681         the signature in the base class.
2682         * platform/qt/RenderThemeQt.h: Ditto.
2683
2684 2008-04-19  Jon Honeycutt  <jhoneycutt@apple.com>
2685
2686         Reviewed by Darin.
2687
2688         Add a method to get the AccessibilityObject's access key,
2689
2690         * page/AccessibilityObject.cpp:
2691         (WebCore::AccessibilityObject::accessKey): Added; returns the object's
2692         access key attribute.
2693         * page/AccessibilityObject.h: Added declaration for accessKey().
2694
2695 2008-04-21  Sam Weinig  <sam@webkit.org>
2696
2697         Reviewed by Anders Carlsson.
2698
2699         Fix numerous crashing tests.
2700
2701         * html/HTMLHtmlElement.cpp:
2702         (WebCore::HTMLHtmlElement::insertedIntoDocument): Null check document->frame().
2703
2704 2008-04-21  Dan Bernstein  <mitz@apple.com>
2705
2706         Reviewed by Darin Adler.
2707
2708         Tests: fast/media/implicit-media-all.html
2709                fast/media/monochrome.html
2710
2711         - allow implicit "all" media in media queries
2712         - use a value of 0 for the monochrome media feature on color displays
2713
2714         * css/CSSGrammar.y:
2715         * css/CSSParser.cpp:
2716         (WebCore::CSSParser::createFloatingMediaQuery):
2717         * css/CSSParser.h:
2718         * css/MediaQueryEvaluator.cpp:
2719         (WebCore::monochromeMediaFeatureEval):
2720
2721 2008-04-21  Brady Eidson  <beidson@apple.com>
2722
2723         Rockingly reviewed by Adele
2724
2725         Small StorageArea cleanups
2726
2727         * storage/SessionStorageArea.cpp:
2728         (WebCore::SessionStorageArea::copy): Pass "this" instead of the StorageMap belonging to this
2729         (WebCore::SessionStorageArea::SessionStorageArea):
2730         * storage/SessionStorageArea.h:
2731
2732         * storage/StorageArea.cpp:  Changed to not expose the StorageMap at all - it's dangerous to expose
2733           it since we rely explicitly on its ref-count
2734         (WebCore::StorageArea::StorageArea): Take another StorageArea as the c'tor argument and get the 
2735           StorageMap from that.
2736         (WebCore::StorageArea::setItem):  The previous comment/code here was bogus.  All JS objects passed in
2737           to this API are stringified, so there's no such thing as "null" for setItem()
2738         * storage/StorageArea.h:
2739
2740 2008-04-21  Justin Garcia  <justin.garcia@apple.com>
2741
2742         Reviewed by John Sullivan.
2743
2744         <rdar://problem/5803706> Pressing return at the end of a header doesn't break out of header (17460)
2745         
2746         If we're doing InsertParagraphSeparator at the end of a header element, do not clone it.
2747         Renamed m_useDefaultParagraphElement to m_mustUseDefaultParagraphElement, since now,
2748         when it is false, that does not necessarily mean that a default paragraph element
2749         will not be used.  Callers that passed false for this argument are OK with this.
2750
2751         * editing/InsertParagraphSeparatorCommand.cpp:
2752         (WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): 
2753         (WebCore::InsertParagraphSeparatorCommand::shouldUseDefaultParagraphElement):
2754         (WebCore::InsertParagraphSeparatorCommand::doApply):
2755         * editing/InsertParagraphSeparatorCommand.h:
2756
2757 2008-04-21  Anders Carlsson  <andersca@apple.com>
2758
2759         Reviewed by Adam.
2760
2761         Perform cache selection. If a main resource has a URL that exists in a cache, load it from there.
2762         
2763         * html/HTMLAttributeNames.in:
2764         Add manifest attribute.
2765         
2766         * html/HTMLHtmlElement.cpp:
2767         (WebCore::HTMLHtmlElement::insertedIntoDocument):
2768         * html/HTMLHtmlElement.h:
2769         Perform cache selection.
2770         
2771         * loader/MainResourceLoader.cpp:
2772         (WebCore::MainResourceLoader::load):
2773         * loader/appcache/ApplicationCacheGroup.cpp:
2774         (WebCore::cacheHostSet):
2775         (WebCore::urlHostHash):
2776         (WebCore::ApplicationCacheGroup::cacheForRequest):
2777         (WebCore::ApplicationCacheGroup::selectCache):
2778         * loader/appcache/ApplicationCacheGroup.h:
2779         * platform/KURL.h:
2780         (WebCore::KURL::hostStart):
2781         (WebCore::KURL::hostEnd):
2782
2783 2008-04-21  Mike Belshe  <mike@belshe.com>
2784
2785         Reviewed by eseidel and darin.  Landed by eseidel.
2786
2787         Fix broken optimization in createStrippingNullCharacters.
2788
2789         * platform/text/StringImpl.cpp:
2790         (WebCore::StringImpl::createStrippingNullCharacters):
2791
2792 2008-04-21  David Hyatt  <hyatt@apple.com>
2793
2794         Make the back end parsing of background properties generic.  Rename all the parsing functions from
2795         background -> fill.
2796
2797         Add a new set of properties for doing masks.  The code is now refactored so that the mask properties
2798         and the background properties share parsing routines.
2799
2800         Reviewed by Dan
2801
2802         * css/CSSComputedStyleDeclaration.cpp:
2803         (WebCore::):
2804         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2805         * css/CSSParser.cpp:
2806         (WebCore::CSSParser::parseValue):
2807         (WebCore::CSSParser::addFillValue):
2808         (WebCore::CSSParser::parseFillShorthand):
2809         (WebCore::CSSParser::parseFillImage):
2810         (WebCore::CSSParser::parseFillPositionXY):
2811         (WebCore::CSSParser::parseFillPosition):
2812         (WebCore::CSSParser::parseFillSize):
2813         (WebCore::CSSParser::parseFillProperty):
2814         (WebCore::CSSParser::parseTransformOrigin):
2815         * css/CSSParser.h:
2816         * css/CSSPropertyNames.in:
2817         * css/CSSStyleSelector.cpp:
2818         (WebCore::CSSStyleSelector::CSSStyleSelector):
2819         (WebCore::CSSStyleSelector::mapFillAttachment):
2820         (WebCore::CSSStyleSelector::mapFillClip):
2821         (WebCore::CSSStyleSelector::mapFillComposite):
2822         (WebCore::CSSStyleSelector::mapFillOrigin):
2823         (WebCore::CSSStyleSelector::mapFillImage):
2824         (WebCore::CSSStyleSelector::mapFillRepeat):
2825         (WebCore::CSSStyleSelector::mapFillSize):
2826         (WebCore::CSSStyleSelector::mapFillXPosition):
2827         (WebCore::CSSStyleSelector::mapFillYPosition):
2828         * rendering/RenderStyle.cpp:
2829         (WebCore::FillLayer::FillLayer):
2830         (WebCore::FillLayer::operator=):
2831         (WebCore::FillLayer::operator==):
2832         (WebCore::StyleBackgroundData::StyleBackgroundData):
2833         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2834         (WebCore::StyleRareNonInheritedData::operator==):
2835         (WebCore::RenderStyle::diff):
2836         * rendering/RenderStyle.h:
2837         (WebCore::LengthSize::LengthSize):
2838         (WebCore::):
2839         (WebCore::FillLayer::type):
2840         (WebCore::FillLayer::initialFillAttachment):
2841         (WebCore::FillLayer::initialFillClip):
2842         (WebCore::FillLayer::initialFillOrigin):
2843         (WebCore::FillLayer::initialFillRepeat):
2844         (WebCore::FillLayer::initialFillComposite):
2845         (WebCore::FillLayer::initialFillSize):
2846         (WebCore::FillLayer::initialFillXPosition):
2847         (WebCore::FillLayer::initialFillYPosition):
2848         (WebCore::FillLayer::initialFillImage):
2849         (WebCore::RenderStyle::maskImage):
2850         (WebCore::RenderStyle::maskRepeat):
2851         (WebCore::RenderStyle::maskComposite):
2852         (WebCore::RenderStyle::maskAttachment):
2853         (WebCore::RenderStyle::maskClip):
2854         (WebCore::RenderStyle::maskOrigin):
2855         (WebCore::RenderStyle::maskXPosition):
2856         (WebCore::RenderStyle::maskYPosition):
2857         (WebCore::RenderStyle::maskSize):
2858         (WebCore::RenderStyle::accessMaskLayers):
2859         (WebCore::RenderStyle::maskLayers):
2860         (WebCore::RenderStyle::clearBackgroundLayers):
2861         (WebCore::RenderStyle::clearMaskLayers):
2862         (WebCore::RenderStyle::inheritMaskLayers):
2863
2864 2008-04-21  Timothy Hatcher  <timothy@apple.com>
2865
2866         Fixes the issue were a Database view could still be visible after navigating to a new page.
2867
2868         Reviewed by Darin Adler.
2869
2870         * page/inspector/DatabasesPanel.js:
2871         (WebInspector.DatabasesPanel.prototype.reset): Delete the _tableViews and _queryView properties
2872         from all databases. Remove all the children from databaseViews.
2873
2874 2008-04-21  Timothy Hatcher  <timothy@apple.com>
2875
2876         Adds the ability to enter multi-line commands in the console by holding the
2877         alt/option key when pressing enter/return.
2878
2879         https://bugs.webkit.org/show_bug.cgi?id=18454
2880
2881         Reviewed by Darin Adler.
2882
2883         * page/inspector/Console.js:
2884         (WebInspector.Console.prototype._enterKeyPressed): Return early if the
2885         alt/option key is held when enter is pressed.
2886         * page/inspector/inspector.css:
2887         (.console-message-text): Added. Set white-space: pre-wrap.
2888
2889 2008-04-21  Timothy Hatcher  <timothy@apple.com>
2890
2891         Fixes the bug where the Database table names do not update when
2892         running the CREATE TABLE or DROP TABLE queries. Also makes the
2893         table names update every time the database is collapsed and expanded.
2894
2895         https://bugs.webkit.org/show_bug.cgi?id=18453
2896
2897         Reviewed by Darin Adler.
2898
2899         * page/inspector/DatabasesPanel.js:
2900         (WebInspector.DatabasesPanel.prototype.updateDatabaseTables):
2901         Set shouldRefreshChildren to true on the Database's tree element.
2902         The refreshChildren property was renamed to shouldRefreshChildren.
2903         (WebInspector.DatabaseSidebarTreeElement.prototype.oncollapse):
2904         Request a refresh after every collapse so the next expand will
2905         have an updated table list.
2906
2907 2008-04-21  Timothy Hatcher  <timothy@apple.com>
2908
2909         Adds INDEX to the list of completion words for the Databases query view.
2910
2911         https://bugs.webkit.org/show_bug.cgi?id=18452
2912
2913         Reviewed by Darin Adler.
2914
2915         * page/inspector/DatabaseQueryView.js:
2916         (WebInspector.DatabaseQueryView.prototype.completions): Split up "CREATE TABLE "
2917         and "DROP TABLE " into "CREATE ", "DROP ", "TABLE ". And added "INDEX ".
2918
2919 2008-04-21  Timothy Hatcher  <timothy@apple.com>
2920
2921         Adds the UI portions of the Scripts panel to the Web Inspector.
2922         The Scripts panel has not been added to the toolbar yet.
2923
2924         https://bugs.webkit.org/show_bug.cgi?id=18601
2925
2926         Reviewed by Adam Roben.
2927
2928         * English.lproj/InspectorLocalizedStrings.js: Changed "Show inherited properties"
2929         to "Show inherited". Adds new strings for the Scripts' panel tooltips.
2930         * page/inspector/BreakpointsSidebarPane.js: Added.
2931         * page/inspector/CallStackSidebarPane.js: Added.
2932         * page/inspector/Images/back.png: Added.
2933         * page/inspector/Images/debuggerContinue.png: Added.
2934         * page/inspector/Images/debuggerPause.png: Added.
2935         * page/inspector/Images/debuggerStepInto.png: Added.
2936         * page/inspector/Images/debuggerStepOut.png: Added.
2937         * page/inspector/Images/debuggerStepOver.png: Added.
2938         * page/inspector/Images/forward.png: Added.
2939         * page/inspector/Images/statusbarResizerHorizontal.png: Added.
2940         * page/inspector/PropertiesSection.js:
2941         (WebInspector.PropertiesSection): Flip the order the subtile is appended
2942         so it can float right in the CSS.
2943         * page/inspector/ScriptsPanel.js: Added.
2944         * page/inspector/StylesSidebarPane.js:
2945         (WebInspector.StylePropertiesSection): Changed "Show inherited properties"
2946         to "Show inherited".
2947         * page/inspector/inspector.css: Added new CSS rules for the Scripts panel. 
2948         Also changes the look of the section to match the mockup, this affects
2949         Styles and Properties in Elements.
2950         * page/inspector/inspector.html: Import new files.
2951         * page/inspector/inspector.js:
2952         (Preferences.minScriptsSidebarWidth): Added.
2953
2954 2008-04-21  Kevin McCullough  <kmccullough@apple.com>
2955
2956         Reviewed by Adam.
2957
2958         <rdar://problem/5770054> JavaScript profiler (10928)
2959         Took out debugging printing since we really want to hook into the
2960         inspector and not to print to the terminal.
2961
2962         * page/Console.cpp:
2963         (WebCore::Console::profileEnd):
2964
2965 2008-04-21  Sam Weinig  <sam@webkit.org>
2966
2967         Reviewed by Alexey Proskuryakov.
2968
2969         Fix up XMLHttpRequestProgressEvent.
2970
2971         * bindings/js/JSEventCustom.cpp:
2972         (WebCore::toJS):
2973         * xml/XMLHttpRequestProgressEvent.cpp:
2974         * xml/XMLHttpRequestProgressEvent.h:
2975
2976 2008-04-21  Adam Roben  <aroben@apple.com>
2977
2978         Fix Bug 18615: Crash in PluginPackage::hash
2979
2980         <https://bugs.webkit.org/show_bug.cgi?id=18615>
2981
2982         Reviewed by Anders Carlsson.
2983
2984         * plugins/PluginDatabase.cpp:
2985         (WebCore::PluginDatabase::refresh): Don't pass a null PluginPackage*
2986         to add().
2987
2988 2008-04-21  Anders Carlsson  <andersca@apple.com>
2989
2990         Reviewed by Adam.
2991
2992         Add cache group implementation.
2993
2994         * loader/DocumentLoader.cpp:
2995         (WebCore::DocumentLoader::scheduleApplicationCacheLoad):
2996         * loader/appcache/ApplicationCache.cpp:
2997         (WebCore::ApplicationCache::requestIsHTTPOrHTTPSGet):
2998         (WebCore::ApplicationCache::resourceForRequest):
2999         * loader/appcache/ApplicationCache.h:
3000         * loader/appcache/ApplicationCacheGroup.cpp:
3001         (WebCore::cacheGroupMap):
3002         (WebCore::ApplicationCacheGroup::ApplicationCacheGroup):
3003         (WebCore::ApplicationCacheGroup::selectCache):
3004         (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
3005         (WebCore::ApplicationCacheGroup::finishedLoadingMainResource):
3006         (WebCore::ApplicationCacheGroup::documentLoaderDestroyed):
3007         (WebCore::ApplicationCacheGroup::cacheDestroyed):
3008         (WebCore::ApplicationCacheGroup::update):
3009         (WebCore::ApplicationCacheGroup::didReceiveResponse):
3010         (WebCore::ApplicationCacheGroup::didReceiveData):
3011         (WebCore::ApplicationCacheGroup::didFinishLoading):
3012         (WebCore::ApplicationCacheGroup::didFail):
3013         (WebCore::ApplicationCacheGroup::didReceiveManifestResponse):
3014         (WebCore::ApplicationCacheGroup::didReceiveManifestData):
3015         (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
3016         (WebCore::ApplicationCacheGroup::cacheUpdateFailed):
3017         (WebCore::ApplicationCacheGroup::didFailToLoadManifest):
3018         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
3019         (WebCore::ApplicationCacheGroup::startLoadingEntry):
3020         (WebCore::ApplicationCacheGroup::addEntry):
3021         (WebCore::ApplicationCacheGroup::associateDocumentLoaderWithCache):
3022         (WebCore::ApplicationCacheGroup::callListenersOnAssociatedDocuments):
3023         (WebCore::ApplicationCacheGroup::callListeners):
3024         * loader/appcache/ApplicationCacheGroup.h:
3025         (WebCore::ApplicationCacheGroup::status):
3026         (WebCore::ApplicationCacheGroup::newestCache):
3027         * platform/KURL.h:
3028         (WebCore::KURL::hostStart):
3029         (WebCore::KURL::hostEnd):
3030
3031 2008-04-21  David Hyatt  <hyatt@apple.com>
3032
3033         Rename BackgroundLayer -> FillLayer in preparation for it being used for other types of fills.
3034
3035         Reviewed by Dan
3036
3037         * css/CSSComputedStyleDeclaration.cpp:
3038         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3039         * css/CSSPrimitiveValueMappings.h:
3040         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3041         (WebCore::CSSPrimitiveValue::operator EFillBox):
3042         (WebCore::CSSPrimitiveValue::operator EFillRepeat):
3043         * css/CSSStyleSelector.cpp:
3044         (WebCore::CSSStyleSelector::applyProperty):
3045         (WebCore::CSSStyleSelector::mapFillAttachment):
3046         (WebCore::CSSStyleSelector::mapFillClip):
3047         (WebCore::CSSStyleSelector::mapFillComposite):
3048         (WebCore::CSSStyleSelector::mapFillOrigin):
3049         (WebCore::CSSStyleSelector::mapFillImage):
3050         (WebCore::CSSStyleSelector::mapFillRepeat):
3051         (WebCore::CSSStyleSelector::mapFillSize):
3052         (WebCore::CSSStyleSelector::mapFillXPosition):
3053         (WebCore::CSSStyleSelector::mapFillYPosition):
3054         (WebCore::CSSStyleSelector::mapTransitionDuration):
3055         (WebCore::CSSStyleSelector::mapTransitionRepeatCount):
3056         (WebCore::CSSStyleSelector::mapTransitionTimingFunction):
3057         (WebCore::CSSStyleSelector::mapTransitionProperty):
3058         * css/CSSStyleSelector.h:
3059         * page/AnimationController.cpp:
3060         (WebCore::ImplicitAnimation::ImplicitAnimation):
3061         (WebCore::CompositeImplicitAnimation::animate):
3062         * rendering/InlineFlowBox.cpp:
3063         (WebCore::InlineFlowBox::paintBackgrounds):
3064         (WebCore::InlineFlowBox::paintBackground):
3065         * rendering/InlineFlowBox.h:
3066         * rendering/RenderBox.cpp:
3067         (WebCore::RenderBox::paintRootBoxDecorations):
3068         (WebCore::RenderBox::paintBackgrounds):
3069         (WebCore::RenderBox::paintBackground):
3070         (WebCore::RenderBox::calculateBackgroundSize):
3071         (WebCore::RenderBox::imageChanged):
3072         (WebCore::RenderBox::calculateBackgroundImageGeometry):
3073         (WebCore::RenderBox::paintBackgroundExtended):
3074         * rendering/RenderBox.h:
3075         * rendering/RenderObject.cpp:
3076         (WebCore::RenderObject::mustRepaintBackgroundOrBorder):
3077         (WebCore::RenderObject::updateBackgroundImages):
3078         (WebCore::RenderObject::arenaDelete):
3079         * rendering/RenderObject.h:
3080         (WebCore::RenderObject::paintBackgroundExtended):
3081         * rendering/RenderStyle.cpp:
3082         (WebCore::FillLayer::FillLayer):
3083         (WebCore::FillLayer::~FillLayer):
3084         (WebCore::FillLayer::operator=):
3085         (WebCore::FillLayer::operator==):
3086         (WebCore::FillLayer::fillUnsetProperties):
3087         (WebCore::FillLayer::cullEmptyLayers):
3088         (WebCore::Transition::fillUnsetProperties):
3089         * rendering/RenderStyle.h:
3090         (WebCore::):
3091         (WebCore::FillLayer::image):
3092         (WebCore::FillLayer::xPosition):
3093         (WebCore::FillLayer::yPosition):
3094         (WebCore::FillLayer::attachment):
3095         (WebCore::FillLayer::clip):
3096         (WebCore::FillLayer::origin):
3097         (WebCore::FillLayer::repeat):
3098         (WebCore::FillLayer::composite):
3099         (WebCore::FillLayer::size):
3100         (WebCore::FillLayer::next):
3101         (WebCore::FillLayer::isImageSet):
3102         (WebCore::FillLayer::isXPositionSet):
3103         (WebCore::FillLayer::isYPositionSet):
3104         (WebCore::FillLayer::isAttachmentSet):
3105         (WebCore::FillLayer::isClipSet):
3106         (WebCore::FillLayer::isOriginSet):
3107         (WebCore::FillLayer::isRepeatSet):
3108         (WebCore::FillLayer::isCompositeSet):
3109         (WebCore::FillLayer::isSizeSet):
3110         (WebCore::FillLayer::setImage):
3111         (WebCore::FillLayer::setXPosition):
3112         (WebCore::FillLayer::setYPosition):
3113         (WebCore::FillLayer::setAttachment):
3114         (WebCore::FillLayer::setClip):
3115         (WebCore::FillLayer::setOrigin):
3116         (WebCore::FillLayer::setRepeat):
3117         (WebCore::FillLayer::setComposite):
3118         (WebCore::FillLayer::setSize):
3119         (WebCore::FillLayer::clearImage):
3120         (WebCore::FillLayer::clearXPosition):
3121         (WebCore::FillLayer::clearYPosition):
3122         (WebCore::FillLayer::clearAttachment):
3123         (WebCore::FillLayer::clearClip):
3124         (WebCore::FillLayer::clearOrigin):
3125         (WebCore::FillLayer::clearRepeat):
3126         (WebCore::FillLayer::clearComposite):
3127         (WebCore::FillLayer::clearSize):
3128         (WebCore::FillLayer::setNext):
3129         (WebCore::FillLayer::operator!=):
3130         (WebCore::FillLayer::hasFixedImage):
3131         (WebCore::Transition::isDurationSet):
3132         (WebCore::Transition::isRepeatCountSet):
3133         (WebCore::Transition::isTimingFunctionSet):
3134         (WebCore::Transition::isPropertySet):
3135         (WebCore::Transition::clearDuration):
3136         (WebCore::Transition::clearRepeatCount):
3137         (WebCore::Transition::clearTimingFunction):
3138         (WebCore::Transition::clearProperty):
3139         (WebCore::Transition::duration):
3140         (WebCore::Transition::repeatCount):
3141         (WebCore::Transition::timingFunction):
3142         (WebCore::Transition::property):
3143         (WebCore::Transition::setDuration):
3144         (WebCore::Transition::setRepeatCount):
3145         (WebCore::Transition::setTimingFunction):
3146         (WebCore::Transition::setProperty):
3147         (WebCore::RenderStyle::NonInheritedFlags::operator==):
3148         (WebCore::RenderStyle::setBitDefaults):
3149         (WebCore::RenderStyle::backgroundRepeat):
3150         (WebCore::RenderStyle::backgroundComposite):
3151         (WebCore::RenderStyle::backgroundAttachment):
3152         (WebCore::RenderStyle::backgroundClip):
3153         (WebCore::RenderStyle::backgroundOrigin):
3154         (WebCore::RenderStyle::backgroundSize):
3155         (WebCore::RenderStyle::accessBackgroundLayers):
3156         (WebCore::RenderStyle::backgroundLayers):
3157         (WebCore::RenderStyle::clearBackgroundLayers):
3158         (WebCore::RenderStyle::inheritBackgroundLayers):
3159         (WebCore::RenderStyle::initialFillAttachment):
3160         (WebCore::RenderStyle::initialFillClip):
3161         (WebCore::RenderStyle::initialFillOrigin):
3162         (WebCore::RenderStyle::initialFillRepeat):
3163         (WebCore::RenderStyle::initialFillComposite):
3164         (WebCore::RenderStyle::initialFillSize):
3165         (WebCore::RenderStyle::initialFillXPosition):
3166         (WebCore::RenderStyle::initialFillYPosition):
3167         (WebCore::RenderStyle::initialFillImage):
3168         (WebCore::RenderStyle::initialWhiteSpace):
3169         (WebCore::RenderStyle::initialColor):
3170         * rendering/RenderTableCell.cpp:
3171         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
3172         * rendering/RenderTheme.cpp:
3173         (WebCore::RenderTheme::adjustStyle):
3174         (WebCore::RenderTheme::isControlStyled):
3175         * rendering/RenderTheme.h:
3176         * rendering/RenderThemeMac.h:
3177         * rendering/RenderThemeMac.mm:
3178         (WebCore::RenderThemeMac::isControlStyled):
3179
3180 2008-04-21  Julien Chaffraix  <jchaffraix@webkit.org>
3181
3182         Rubber-stamped by Ap.
3183
3184         Add 2 explicit casts.
3185         Fixes built on 64-bit machines (64-bit to 32-bit conversion warning).
3186
3187         * xml/XMLHttpRequest.cpp:
3188         (WebCore::XMLHttpRequest::dispatchProgressEvent):
3189
3190 2008-04-21  Anders Carlsson  <andersca@apple.com>
3191
3192         Reviewed by Adam.
3193
3194         Make it possible to load resources from the cache. 
3195         (Currently no documents are ever associated with a cache though.)
3196         
3197         * loader/DocumentLoader.cpp:
3198         (WebCore::DocumentLoader::setPrimaryLoadComplete):
3199         (WebCore::DocumentLoader::mainResourceApplicationCache):
3200         (WebCore::DocumentLoader::scheduleApplicationCacheLoad):
3201         * loader/DocumentLoader.h:
3202         * loader/MainResourceLoader.cpp:
3203         (WebCore::MainResourceLoader::didFinishLoading):
3204         (WebCore::MainResourceLoader::load):
3205         * loader/MainResourceLoader.h:
3206         (WebCore::MainResourceLoader::applicationCache):
3207         * loader/ResourceLoader.cpp:
3208         (WebCore::ResourceLoader::ResourceLoader):
3209         (WebCore::ResourceLoader::load):
3210         * loader/ResourceLoader.h:
3211         * loader/appcache/ApplicationCacheGroup.h:
3212         (WebCore::ApplicationCacheGroup::finishedLoadingMainResource):
3213
3214 2008-04-21  MorganL  <morganl.webkit@yahoo.com>
3215
3216         Reviewed by eseidel.  Landed by eseidel.
3217
3218         Add FrameLoader::policyDocumentLoader, and change
3219         provisionalDocumentLoader to have a const signature to be
3220         consistent with documentLoader and activeDocumentLoader.
3221
3222         * WebCore.base.exp:
3223         * WebCore.order:
3224         * loader/FrameLoader.cpp:
3225         (WebCore::FrameLoader::policyDocumentLoader):
3226         (WebCore::FrameLoader::provisionalDocumentLoader):
3227         * loader/FrameLoader.h:
3228
3229 2008-04-21  Julien Chaffraix  <jchaffraix@webkit.org>
3230
3231         Not reviewed, add missing files in my previous commit.
3232
3233         Test: http/tests/xmlhttprequest/infoOnProgressEvent.html
3234
3235         * xml/XMLHttpRequestProgressEvent.cpp: Added.
3236         (WebCore::XMLHttpRequestProgressEvent::XMLHttpRequestProgressEvent):
3237         (WebCore::XMLHttpRequestProgressEvent::position):
3238         (WebCore::XMLHttpRequestProgressEvent::totalSize):
3239         * xml/XMLHttpRequestProgressEvent.h: Added.
3240         (WebCore::XMLHttpRequestProgressEvent::isXMLHttpRequestProgressEvent):
3241         (WebCore::XMLHttpRequestProgressEvent::isProgressEvent):
3242         (WebCore::XMLHttpRequestProgressEvent::lengthComputable):
3243         (WebCore::XMLHttpRequestProgressEvent::loaded):
3244         (WebCore::XMLHttpRequestProgressEvent::total):
3245         * xml/XMLHttpRequestProgressEvent.idl: Added.
3246
3247 2008-04-21  Julien Chaffraix  <jchaffraix@webkit.org>
3248
3249         Reviewed by Ap.
3250
3251         Bug 13596: Implement .onprogress handler on XMLHttpRequest objects to support
3252         progressive download content length information.
3253
3254         - Add the onprogress attribute to XMLHttpRequest and the necessary bindings.
3255
3256         - We use a custom event XMLHttpRequestProgressEvent that is derived from ProgressEvent
3257          (as specified by the XHR2 specification) but also implement LSProgressEvent interface
3258          (to be compliant with Firefox event).
3259
3260         Test: http/tests/xmlhttprequest/infoOnProgressEvent.html
3261
3262         * DerivedSources.make:
3263         * GNUmakefile.am:
3264         * WebCore.pro:
3265         * WebCore.vcproj/WebCore.vcproj:
3266         * WebCore.xcodeproj/project.pbxproj:
3267         * WebCoreSources.bkl:
3268         * bindings/js/JSEventCustom.cpp:
3269         (WebCore::toJS):
3270         * bindings/js/JSXMLHttpRequestCustom.cpp:
3271         (WebCore::JSXMLHttpRequest::mark):
3272         (WebCore::JSXMLHttpRequest::onprogress):
3273         (WebCore::JSXMLHttpRequest::setOnprogress):
3274         * dom/Event.cpp:
3275         (WebCore::Event::isXMLHttpRequestProgressEvent):
3276         * dom/Event.h:
3277         * dom/ProgressEvent.h: Replaced 'private' by 'protected' to enable derivation.
3278         * xml/XMLHttpRequest.cpp:
3279         (WebCore::XMLHttpRequest::onProgressListener): onprogress getter.
3280         (WebCore::XMLHttpRequest::setOnProgressListener): onprogress setter.
3281         (WebCore::XMLHttpRequest::XMLHttpRequest): initialize m_receivedLength.
3282         (WebCore::XMLHttpRequest::internalAbort): reset m_receivedLength on abort.
3283         (WebCore::XMLHttpRequest::didReceiveData): add updateAndDispatchOnProgress call.
3284         (WebCore::XMLHttpRequest::updateAndDispatchOnProgress):
3285         (WebCore::XMLHttpRequest::dispatchProgressEvent):
3286         * xml/XMLHttpRequest.h:
3287         * xml/XMLHttpRequest.idl: Add onprogress event handler.
3288         * xml/XMLHttpRequestProgressEvent.cpp: Added.
3289         (WebCore::XMLHttpRequestProgressEvent::XMLHttpRequestProgressEvent):
3290         (WebCore::XMLHttpRequestProgressEvent::position):
3291         (WebCore::XMLHttpRequestProgressEvent::totalSize):
3292         The two previous methods are used for Firefox compatibility and map to the
3293         same value as the ProgressEvent methods (but they are deprecated and display
3294
3295         * xml/XMLHttpRequestProgressEvent.h: Added.
3296         (WebCore::XMLHttpRequestProgressEvent::isXMLHttpRequestProgressEvent):
3297         (WebCore::XMLHttpRequestProgressEvent::isProgressEvent):
3298         (WebCore::XMLHttpRequestProgressEvent::lengthComputable):
3299         (WebCore::XMLHttpRequestProgressEvent::loaded):
3300         (WebCore::XMLHttpRequestProgressEvent::total):
3301         * xml/XMLHttpRequestProgressEvent.idl: Added.
3302
3303 2008-04-21  Michael Goddard  <michael.goddard@trolltech.com>
3304
3305         Reviewed by Simon.
3306
3307         Better handle Qt binding object lifetime in JS.
3308         Add explicit marking of JS objects created for Qt
3309         bindings, and remove the gcProtect calls.
3310
3311         * bridge/qt/qt_class.cpp:
3312         (KJS::Bindings::QtClass::fallbackObject):
3313         * bridge/qt/qt_instance.cpp:
3314         (KJS::Bindings::QtRuntimeObjectImp::mark):
3315         (KJS::Bindings::QtInstance::~QtInstance):
3316         (KJS::Bindings::QtInstance::mark):
3317         (KJS::Bindings::QtInstance::invokeDefaultMethod):
3318         (KJS::Bindings::QtField::valueFromInstance):
3319         * bridge/qt/qt_instance.h:
3320
3321 2008-04-21  Michael Goddard  <michael.goddard@trolltech.com>
3322
3323         Reviewed by Simon.
3324
3325         Add better support for RuntimeArray type conversions.
3326         It seems that RuntimeArray claims to inherit ArrayInstance
3327         (in the JS sense), but the C++ class doesn't, so properly
3328         access RuntimeArrays.  Also, properly support turning
3329         a JS object into a QVariantMap, since we support the
3330         reverse.
3331
3332         * bridge/qt/qt_runtime.cpp:
3333         (KJS::Bindings::):
3334         (KJS::Bindings::operator<<):
3335         (KJS::Bindings::valueRealType):
3336         (KJS::Bindings::convertValueToQVariant):
3337         (KJS::Bindings::convertQVariantToValue):
3338
3339 2008-04-21  Simon Hausmann  <hausmann@webkit.org>
3340
3341         Reviewed by Holger.
3342
3343         Fix painting of text fields in the CleanLooks style.
3344
3345         The CleanLooks style calls painter->drawRect() and expects a painter
3346         that has no brush set. This is a fairly common assumption and therefore
3347         we now always set the brush to NoBrush before calling a style. This
3348         is done by centralizing the painter setup code into StylePainter
3349         and restore the old brush in the StylePainter destructor.
3350
3351         In addition for textfields it is not necessary anymore to draw
3352         PE_FrameLineEdit as we set the lineWidth in the style option correctly
3353         and it's the style responsibility (QCommonStyle usually) to draw
3354         PE_FrameLineEdit.
3355
3356         * platform/qt/RenderThemeQt.cpp:
3357         (WebCore::RenderThemeQt::paintButton):
3358         (WebCore::RenderThemeQt::paintTextField):
3359         (WebCore::RenderThemeQt::paintMenuList):
3360         (WebCore::StylePainter::StylePainter):
3361         (WebCore::StylePainter::~StylePainter):
3362         * platform/qt/RenderThemeQt.h:
3363         (WebCore::StylePainter::isValid):
3364         (WebCore::StylePainter::drawPrimitive):
3365         (WebCore::StylePainter::drawControl):
3366         (WebCore::StylePainter::drawComplexControl):
3367
3368 2008-04-21  Olivier Goffart  <ogoffart@trolltech.com>
3369
3370         Reviewed by Simon.
3371
3372         Fixes copy and paste of international characters.
3373
3374         When exporting HTML to the clipboard we need meta tags for now that confirm the
3375         conversion to utf-8 done inside QClipboard.
3376
3377         * platform/qt/PasteboardQt.cpp:
3378         (WebCore::Pasteboard::writeSelection):
3379
3380 2008-04-21  Olivier Goffart  <ogoffart@trolltech.com>
3381
3382         Reviewed by Simon.
3383
3384         Fixes: Copying on X11 doesn't always work in webkit
3385
3386         Calling QClipboard::clear right before QClipboard::setData create a race condition with klipper. So don't call QClipboard::clear since it's not required.
3387
3388         * platform/qt/PasteboardQt.cpp:
3389
3390 2008-04-21  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3391
3392         Reviewed by Simon.
3393
3394         * Assume that our lineedit has a frame. This is needed for the motif style
3395
3396         * platform/qt/RenderThemeQt.cpp:
3397         (WebCore::RenderThemeQt::paintTextField):
3398
3399 2008-04-21  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3400
3401         Reviewed by Simon.
3402
3403         * Follow the windows render theme when determining whether to style
3404         listboxes or not.
3405
3406         * platform/qt/RenderThemeQt.cpp:
3407         (WebCore::RenderThemeQt::isControlStyled):
3408
3409 2008-04-21  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3410
3411         Reviewed by Simon.
3412
3413         * Try to bring the notImplemented implementations closer together. This will
3414         print each unimplemted method name only once.
3415
3416         * We might want to change wtf/Assertions.cpp to use qDebug
3417
3418         * platform/NotImplemented.h:
3419
3420 2008-04-21  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3421
3422         Reviewed by Simon.
3423
3424         * Remove the special Qt ctor of BitmapImage as it did not work. The Bitmap returned
3425         0 as width and after intialising drawing would fail. BitmapImage relies on a proper
3426         ImageSource.
3427         * Instead of adding more special cases to BitmapImage create a new class called StillImage
3428         which is getting one QPixmap and is implementing Image::draw and Image::size. This is
3429         working well for the images created using Image::loadPlatformResource.
3430
3431         * platform/graphics/BitmapImage.h:
3432         * platform/graphics/qt/ImageQt.cpp:
3433         (WebCore::BitmapImage::initPlatformData):
3434         (WebCore::BitmapImage::getPixmap):
3435         (WebCore::StillImage::StillImage):
3436         (WebCore::StillImage::size):
3437         (WebCore::StillImage::getPixmap):
3438         (WebCore::StillImage::draw):
3439
3440 2008-04-21  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3441
3442         Reviewed by Simon.
3443
3444         * Package the Resources into a qrc
3445
3446         * Resources/WebKitResources.qrc: Added.
3447         * WebCore.pro:
3448
3449 2008-04-21  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3450
3451         Reviewed by Simon.
3452
3453         * Make sure every resource is available als png as well.
3454
3455         * Resources/deleteButton.png: Added.
3456         * Resources/deleteButtonPressed.png: Added.
3457         * Resources/missingImage.png: Added.
3458         * Resources/nullPlugin.png: Copied from WebKit/win/WebKit.vcproj/nullplugin.png.
3459         * Resources/textAreaResizeCorner.png: Added.
3460         * Resources/urlIcon.png: Copied from WebKit/win/WebKit.vcproj/urlIcon.png.
3461
3462 2008-04-20  Sriram Neelakandan  <sriram.neelakandan@gmail.com>
3463
3464         Reviewed by Alp Toker.
3465
3466         Implement FileSystemGtk's getFileModificationTime() with GLib.
3467
3468         * platform/gtk/FileSystemGtk.cpp:
3469         (WebCore::getFileModificationTime):
3470
3471 2008-04-20  Christian Persch  <chpe@gnome.org>
3472
3473         Reviewed by Alp Toker.
3474
3475         Bundle GTK+ Xt compatibility code from Mozilla. These files are used
3476         by all currently proposed GTK+ plugin patches and will make the
3477         proposed patches smaller and easier to review.
3478
3479         These files should be kept as close to the upstream versions as
3480         possible so fixes can be shared between projects and to ensure
3481         compatibility with the reference implementation.
3482
3483         * plugins/gtk/gtk2xtbin.c: Added.
3484         (xt_event_prepare):
3485         (xt_event_check):
3486         (xt_event_dispatch):
3487         (xt_event_polling_timer_callback):
3488         (gtk_xtbin_get_type):
3489         (gtk_xtbin_class_init):
3490         (gtk_xtbin_init):
3491         (gtk_xtbin_realize):
3492         (gtk_xtbin_new):
3493         (gtk_xtbin_set_position):
3494         (gtk_xtbin_resize):
3495         (gtk_xtbin_unrealize):
3496         (gtk_xtbin_destroy):
3497         (xt_client_init):
3498         (xt_client_create):
3499         (xt_client_unrealize):
3500         (xt_client_destroy):
3501         (xt_client_set_info):
3502         (xt_client_handle_xembed_message):
3503         (xt_client_event_handler):
3504         (send_xembed_message):
3505         (error_handler):
3506         (trap_errors):
3507         (untrap_error):
3508         (xt_client_focus_listener):
3509         (xt_add_focus_listener):
3510         (xt_remove_focus_listener):
3511         (xt_add_focus_listener_tree):
3512         * plugins/gtk/gtk2xtbin.h: Added.
3513
3514 2008-04-20  Dirk Schulze  <vbs85@gmx.de>
3515
3516         Reviewed by Alp Toker.
3517
3518         http://bugs.webkit.org/show_bug.cgi?id=15449
3519         [CAIRO] SVG gradients do not work properly
3520
3521         Fixed SVG-gradients in Cairo.
3522
3523         * svg/graphics/cairo/SVGPaintServerGradientCairo.cpp:
3524         (WebCore::SVGPaintServerGradient::setup):
3525
3526 2008-04-20  Simon Hausmann  <hausmann@webkit.org>
3527
3528         Reviewed by Alp Toker.
3529
3530         http://bugs.webkit.org/show_bug.cgi?id=18578
3531         Share the printing code between the Gtk and the Qt port
3532
3533         Share the printing code between the Gtk and the Qt port
3534         and added printing to the Qt WebKit API.
3535
3536         * GNUmakefile.am:
3537         * WebCore.pro:
3538         * page/PrintContext.cpp: Added.
3539         (WebCore::PrintContext::PrintContext):
3540         (WebCore::PrintContext::~PrintContext):
3541         (WebCore::PrintContext::pageCount):
3542         (WebCore::PrintContext::computePageRects):
3543         (WebCore::PrintContext::begin):
3544         (WebCore::PrintContext::spoolPage):
3545         * page/PrintContext.h: Added.
3546
3547 2008-04-19  Alp Toker  <alp@nuanti.com>
3548
3549         Reviewed by Mark Rowe.
3550
3551         Complete the Cairo (CSS) gradient implementation.
3552
3553         * platform/graphics/Gradient.h:
3554         * platform/graphics/cairo/GradientCairo.cpp:
3555         (WebCore::Gradient::platformDestroy):
3556         (WebCore::Gradient::fill):
3557
3558 2008-04-19  Alp Toker  <alp@nuanti.com>
3559
3560         Reviewed by Dave Hyatt.
3561
3562         Restore Cairo canvas support following the recent changes in
3563         BitmapImage and ImageBuffer integrating canvas with CSS. Some
3564         drawing regressions remain unfixed.
3565
3566         * platform/graphics/BitmapImage.h:
3567         * platform/graphics/ImageBuffer.h:
3568         * platform/graphics/cairo/ImageBufferCairo.cpp:
3569         (WebCore::ImageBuffer::image):
3570         * platform/graphics/cairo/ImageCairo.cpp:
3571         (WebCore::BitmapImage::BitmapImage):
3572         (WebCore::BitmapImage::draw):
3573         * platform/graphics/cairo/ImageSourceCairo.cpp:
3574         (WebCore::ImageSource::createFrameAtIndex):
3575
3576 2008-04-19  Dan Bernstein  <mitz@apple.com>
3577
3578         Reviewed by Dave Hyatt.
3579
3580         - fix additional cases of https://bugs.webkit.org/show_bug.cgi?id=17921
3581           namely cases where the trailing white space is already in a separate
3582           run but still needs to be re-ordered.
3583
3584         Test: fast/text/trailing-white-space-2.html
3585
3586         * platform/text/BidiResolver.h:
3587         (WebCore::::moveRunToEnd):
3588         (WebCore::::moveRunToBeginning):
3589         * rendering/bidi.cpp:
3590         (WebCore::RenderBlock::layoutInlineChildren):
3591
3592 2008-04-19  Alp Toker  <alp@nuanti.com>
3593
3594         Reviewed by Nikolas.
3595
3596         Add text shadow support for simple text in FontCairo.
3597
3598         * platform/graphics/cairo/FontCairo.cpp:
3599         (WebCore::Font::drawGlyphs):
3600
3601 2008-04-19  David Hyatt  <hyatt@apple.com>
3602
3603         Fix a minor typo in CSSGradientValue's cssText() method.
3604
3605         Reviewed by olliej
3606
3607         * css/CSSGradientValue.cpp:
3608         (WebCore::CSSGradientValue::cssText):
3609
3610 2008-04-19  Brady Eidson  <beidson@apple.com>
3611
3612         Reviewed by Tim Hatcher
3613
3614         Add LocalStorageDatabasePath to the settings for the location of persistent local storage.
3615
3616         * WebCore.base.exp:
3617
3618         * page/Settings.cpp:
3619         (WebCore::Settings::setLocalStorageDatabasePath):
3620         * page/Settings.h:
3621         (WebCore::Settings::localStorageDatabasePath):
3622
3623 2008-04-18 Jan  Michael Alonzo  <jmalonzo@unpluggable.com>
3624
3625         Reviewed by Alp Toker.
3626
3627         http://bugs.webkit.org/show_bug.cgi?id=16620
3628         [GTK] Autotools make dist and make check support
3629
3630         Cleanups.
3631
3632         * GNUmakefile.am:
3633
3634 2008-04-18  Jon Honeycutt  <jhoneycutt@apple.com>
3635
3636         Reviewed by Ollie.
3637
3638         Change when AccessibilityObject children are added.
3639
3640         Children are now added when children() is called if the children vector
3641         is not up to date. This removes the need for addChildren() and
3642         hasChildren() to be called from outside of AccessibilityObject.
3643
3644         * page/AccessibilityObject.cpp:
3645         (WebCore::AccessibilityObject::AccessibilityObject): Initialize
3646         m_haveChildren to false.
3647         (WebCore::AccessibilityObject::clearChildren): Set m_haveChildren to
3648         false.
3649         (WebCore::AccessibilityObject::children): If m_haveChildren is false,
3650         call addChildren().
3651         (WebCore::AccessibilityObject::addChildren): Set m_haveChildren to true.
3652         * page/AccessibilityObject.h: Removed hasChildren(). Made addChildren()
3653         private and const. Added m_haveChildren. Made m_children mutable so
3654         children() could modify it.
3655         * page/mac/AccessibilityObjectWrapper.mm:
3656         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]): Don't
3657         call hasChildren() or addChildren().
3658
3659 2008-04-18  Marco Barisione  <marco.barisione@collabora.co.uk>
3660
3661         Reviewed by Alexey.
3662
3663         http://bugs.webkit.org/show_bug.cgi?id=18357
3664         [GTK] Enter on buttons doesn't work
3665
3666         * platform/gtk/KeyEventGtk.cpp:
3667         (WebCore::singleCharacterString): Set the text of a keyboard event for
3668         GDK_ISO_Enter, GDK_KP_Enter, GDK_Return to "\r" instead of an empty
3669         string.
3670
3671 2008-04-18  Marco Barisione  <marco@barisione.org>
3672
3673         Reviewed by Alp Toker.
3674
3675         https://bugs.webkit.org/show_bug.cgi?id=18576
3676         [GTK] windowsKeyCodeForKeyEvent doesn't handle GDK_ISO_Enter and
3677         GDK_KP_Enter
3678
3679         * platform/gtk/KeyEventGtk.cpp:
3680         (WebCore::windowsKeyCodeForKeyEvent): handle GDK_ISO_Enter and
3681         GDK_KP_Enter in windowsKeyCodeForKeyEvent.
3682
3683 2008-04-18  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
3684
3685         Reviewed by Mark Rowe.
3686
3687         Gtk build fix.  Profiler.h does not live inside the kjs directory of JavaScriptCore
3688         so it doesn't make sense to include it as kjs/Profiler.h from WebCore.
3689
3690         * ForwardingHeaders/profiler/Profiler.h: Renamed from WebCore/ForwardingHeaders/kjs/Profiler.h.
3691         * page/Console.cpp:
3692
3693 2008-04-18  Antti Koivisto  <antti@apple.com>
3694
3695         Reviewed by Oliver.
3696
3697         Implement path animation for <animateMotion>.
3698         
3699         SVG test suite tests
3700         animate-elem-07-t.svg
3701         animate-elem-08-t.svg
3702         animate-elem-24-t.svg
3703         animate-elem-30-t.svg
3704
3705         * svg/SVGAnimateMotionElement.cpp:
3706         (WebCore::SVGAnimateMotionElement::SVGAnimateMotionElement):
3707         (WebCore::SVGAnimateMotionElement::hasValidTarget):
3708         (WebCore::SVGAnimateMotionElement::parseMappedAttribute):
3709         (WebCore::SVGAnimateMotionElement::rotateMode):
3710         (WebCore::SVGAnimateMotionElement::animationPath):
3711         (WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
3712         (WebCore::SVGAnimateMotionElement::applyResultsToTarget):
3713         * svg/SVGAnimateMotionElement.h:
3714         (WebCore::SVGAnimateMotionElement::):
3715         * svg/SVGAnimationElement.cpp:
3716         (WebCore::SVGAnimationElement::animationMode):
3717         (WebCore::SVGAnimationElement::startedActiveInterval):
3718         * svg/SVGAnimationElement.h:
3719         (WebCore::SVGAnimationElement::):
3720         (WebCore::SVGAnimationElement::calculateDistance):
3721         (WebCore::SVGAnimationElement::animationPath):
3722
3723 2008-04-11  Mark Rowe  <mrowe@apple.com>
3724
3725         Rubber-stamped by Antti Koivisto.
3726
3727         Silence GCC 4.3 warnings by removing extraneous consts.
3728
3729         * platform/graphics/Font.h:
3730         * platform/network/ResourceRequestBase.cpp:
3731         * platform/network/ResourceRequestBase.h:
3732
3733 2008-04-18  Brady Eidson  <beidson@apple.com>
3734
3735         Rubberstamped by Mark Rowe
3736
3737         Roll out http://trac.webkit.org/projects/webkit/changeset/32204 as it was an incorrect build fix.
3738         The feature in question was NOT database support.
3739
3740         The proper build fix was later applied by Mark in http://trac.webkit.org/projects/webkit/changeset/32225
3741
3742         * page/PageGroup.cpp:
3743         (WebCore::PageGroup::localStorage):
3744
3745 2008-04-18  Brady Eidson  <beidson@apple.com>
3746
3747         Reviewed by Darin and Sam
3748
3749         Don't forget PageGroups when their last Page goes away, as this hurts visited links and anything
3750         else that will be per-PageGroup in the future (such as LocalStorage).
3751
3752         This also fixes a leak, since PageGroups are ref-counted and therefore clearing the raw pointer out
3753         of the PageGroups map without manual deletion leaked it!
3754
3755         * page/Page.cpp:
3756         (WebCore::Page::setGroupName):
3757
3758 2008-04-18  Dan Bernstein  <mitz@apple.com>
3759
3760         Reviewed by Brady Eidson.
3761
3762         - fix <rdar://problem/5872671> REGRESSION (3.1.1-TOT): Repro crash going to Ortega Park home page
3763
3764         Test: fast/dynamic/5872671.html
3765
3766         * rendering/bidi.cpp:
3767         (WebCore::RenderBlock::layoutInlineChildren): Added a missing null
3768         check.
3769
3770 2008-04-18  Sam Weinig  <sam@webkit.org>
3771
3772         Rubber-stamped by Mark Rowe.
3773
3774         responseText and responseXML don't throw exceptions so they don't need an ExceptionCode parameter.
3775
3776         * bindings/js/JSXMLHttpRequestCustom.cpp:
3777         * xml/XMLHttpRequest.cpp:
3778         (WebCore::XMLHttpRequest::responseText):
3779         (WebCore::XMLHttpRequest::responseXML):
3780         * xml/XMLHttpRequest.h:
3781         * xml/XMLHttpRequest.idl:
3782
3783 2008-04-18  Kevin McCullough  <kmccullough@apple.com>
3784
3785         Reviewed by Sam.
3786
3787         - Build fix.
3788
3789         * page/Console.cpp:
3790         (WebCore::Console::profile):
3791         * page/Console.h:
3792         * page/Console.idl:
3793
3794 2008-04-18  Eric Seidel  <eric@webkit.org>
3795
3796         Reviewed by darin.
3797
3798         Fix probable crasher caused by invalid static_cast
3799         https://bugs.webkit.org/show_bug.cgi?id=18585
3800
3801         * page/Frame.cpp:
3802         (WebCore::Frame::contentRenderer):
3803         (WebCore::Frame::ownerRenderer):
3804         * rendering/RenderObject.h: sort the "is*" functions
3805         (WebCore::RenderObject::isApplet):
3806         (WebCore::RenderObject::isBR):
3807         (WebCore::RenderObject::isBlockFlow):
3808         (WebCore::RenderObject::isCounter):
3809         (WebCore::RenderObject::isFrame):
3810         (WebCore::RenderObject::isFrameSet):
3811         (WebCore::RenderObject::isImage):
3812         (WebCore::RenderObject::isInlineBlockOrInlineTable):
3813         (WebCore::RenderObject::isInlineFlow):
3814         (WebCore::RenderObject::isListBox):
3815         (WebCore::RenderObject::isListItem):
3816         (WebCore::RenderObject::isListMarker):
3817         (WebCore::RenderObject::isMedia):
3818         (WebCore::RenderObject::isMenuList):
3819         (WebCore::RenderObject::isRenderBlock):
3820         (WebCore::RenderObject::isRenderImage):
3821         (WebCore::RenderObject::isRenderInline):
3822         (WebCore::RenderObject::isRenderPart):
3823         (WebCore::RenderObject::isRenderView):
3824         (WebCore::RenderObject::isSlider):
3825         (WebCore::RenderObject::isTable):
3826         (WebCore::RenderObject::isTableCell):
3827         (WebCore::RenderObject::isTableCol):
3828         (WebCore::RenderObject::isTableRow):
3829         (WebCore::RenderObject::isTableSection):
3830         (WebCore::RenderObject::isTextArea):
3831         * rendering/RenderPart.h:
3832
3833 2008-04-17  Eric Seidel  <eric@webkit.org>
3834
3835         Reviewed by beth.
3836
3837         Rename Frame::renderer() to contentRenderer() and fix uses.
3838
3839         * WebCore.base.exp:
3840         * editing/Editor.cpp:
3841         (WebCore::Editor::respondToChangedContents):
3842         * loader/FrameLoader.cpp:
3843         (WebCore::FrameLoader::gotoAnchor):
3844         * page/DragController.cpp:
3845         (WebCore::DragController::canProcessDrag):
3846         (WebCore::DragController::mayStartDragAtEventLocation):
3847         (WebCore::DragController::startDrag):
3848         * page/EventHandler.cpp:
3849         (WebCore::EventHandler::eventMayStartDrag):
3850         (WebCore::EventHandler::updateSelectionForMouseDrag):
3851         (WebCore::EventHandler::hitTestResultAtPoint):
3852         (WebCore::EventHandler::hoverTimerFired):
3853         (WebCore::EventHandler::handleDrag):
3854         * page/Frame.cpp:
3855         (WebCore::Frame::selectionLayoutChanged):
3856         (WebCore::Frame::contentRenderer):
3857         (WebCore::Frame::paint):
3858         (WebCore::Frame::markAllMatchesForText):
3859         (WebCore::Frame::documentAtPoint):
3860         * page/Frame.h:
3861         * page/FrameView.cpp:
3862         (WebCore::FrameView::~FrameView):
3863         (WebCore::FrameView::adjustViewSize):
3864         (WebCore::FrameView::layout):
3865         (WebCore::FrameView::scheduleRelayoutOfSubtree):
3866         (WebCore::FrameView::needsLayout):
3867         (WebCore::FrameView::setNeedsLayout):
3868         (WebCore::FrameView::updateControlTints):
3869         * rendering/RenderTreeAsText.cpp:
3870         (WebCore::write):
3871         * svg/graphics/SVGImage.cpp:
3872         (WebCore::SVGImage::nativeImageForCurrentFrame):
3873
3874 2008-04-18  Antti Koivisto  <antti@apple.com>
3875
3876         Reviewed by Oliver.
3877
3878         https://bugs.webkit.org/show_bug.cgi?id=18551
3879         REGRESSION (r31801?): Crash in ContainerNode::removedFromDocument on many SVG tests
3880         
3881         Fix for test svg/W3C-SVG-1.1/animate-elem-62-t.svg which was still
3882         crashing under guard malloc after the previous fix.
3883         
3884         If the event base element was a parent of the current element, dereffing it during 
3885         removedFromDocument() would cause problems. Avoid this by not holding ref pointer
3886         to the event base but instead checking from the ref count of the event listener whether
3887         it is still alive and in need for unregistering.
3888         
3889         This shold not be a problem for syncbase pointers since those are always animation elements
3890         and leaf nodes.
3891
3892         * svg/animation/SVGSMILElement.cpp:
3893         (WebCore::ConditionEventListener::ConditionEventListener):
3894         (WebCore::ConditionEventListener::unregister):
3895         (WebCore::ConditionEventListener::handleEvent):
3896         (WebCore::SVGSMILElement::connectConditions):
3897         (WebCore::SVGSMILElement::disconnectConditions):
3898         (WebCore::SVGSMILElement::createInstanceTimesFromSyncbase):
3899         * svg/animation/SVGSMILElement.h:
3900
3901 2008-04-18  Kevin McCullough  <kmccullough@apple.com>
3902
3903         Reviewed by Sam and Adam.
3904
3905         -<rdar://problem/5770054> JavaScript profiler (10928)
3906         - Added support for console.profile() and console.profileEnd().
3907
3908         * ForwardingHeaders/kjs/FunctionCallProfile.h: Added.
3909         * ForwardingHeaders/kjs/Profiler.h: Added.
3910         * page/Console.cpp:
3911         (WebCore::Console::profile):
3912         (WebCore::Console::profileEnd):
3913         * page/Console.h:
3914         * page/Console.idl:
3915
3916 2008-04-18  Kevin Ollivier  <kevino@theolliviers.com>
3917
3918         wx build fix. Add the new loader/appcache files.
3919
3920         * WebCoreSources.bkl:
3921
3922 2008-04-18  Dan Bernstein  <mitz@apple.com>
3923
3924         Reviewed by Darin Adler.
3925
3926         - fix https://bugs.webkit.org/show_bug.cgi?id=17921
3927           Extra white space at the end of right-aligned or justified text with -webkit-line-break: after-white-space
3928
3929         Test: fast/text/trailing-white-space.html
3930
3931         Made trailing white space on the line always behave like it has the base
3932         bidi level of the block, meaning it will always go on the right (left)
3933         of the line in a left-to-right (right-to-left) block. Made the trailing
3934         white space vanish when it is next to a margin that the text should
3935         be touching, and made its width not count when computing the center
3936         point for center alignment.
3937
3938         * platform/text/BidiResolver.h:
3939         (WebCore::::prependRun): Added.
3940         * rendering/RenderBlock.h:
3941         * rendering/bidi.cpp:
3942         (WebCore::RenderBlock::computeHorizontalPositionsForLine): Changed the
3943         logicallyLastRun parameter to an optional trailingSpaceRun and changed
3944         the alignment logic to implement the above rules.
3945         (WebCore::RenderBlock::layoutInlineChildren): Added code to identify
3946         when there is trailing white space that needs to be split into its own
3947         run and optionally re-ordered.
3948         (WebCore::RenderBlock::findNextLineBreak): Removed code that split some
3949         trailing space into a separate run in one special case.
3950
3951 2008-04-10  Mark Rowe  <mrowe@apple.com>
3952
3953         Rubber-stamped by Brady Eidson.
3954
3955         Fix builds that do not have DOM storage enabled.
3956
3957         * page/DOMWindow.cpp:
3958         * page/Page.cpp:
3959         * page/PageGroup.cpp:
3960         * page/PageGroup.h:
3961
3962 2008-04-18  Timothy Hatcher  <timothy@apple.com>
3963
3964         Fixes the regression where style rules in the Inspector always show "inline stylesheet"
3965         for the source of the rule and not the URL or other sources.
3966
3967         https://bugs.webkit.org/show_bug.cgi?id=18592
3968
3969         Reviewed by Dan Bernstein.
3970
3971         * page/inspector/StylesSidebarPane.js:
3972         (WebInspector.StylesSidebarPane.prototype.update): Add parentStyleSheet to the anonymous obejct
3973         that we make for each matched rule. The parentStyleSheet property is used later to make the subtitle.
3974
3975 2008-04-18  Dean Jackson <dino@apple.com>
3976
3977         Fixed marquee suspension on wrong document. Passes current
3978         document into Frame::clearTimers.
3979
3980         Reviewed by hyatt.
3981
3982         * history/CachedPage.cpp:
3983         (WebCore::CachedPage::clear):
3984         * page/Frame.cpp:
3985         (WebCore::Frame::clearTimers):
3986         * page/Frame.h:
3987
3988 2008-04-18  Dean Jackson <dino@apple.com>
3989
3990         Add 'ease' timing function to transitions and
3991         make it the default. See latest specification proposal at:
3992         http://webkit.org/specs/CSSVisualEffects/CSSTransitions.html
3993
3994         Reviewed by hyatt.
3995
3996         NOTE: still working on a way to test animating/transitioning content
3997
3998         * css/CSSParser.cpp:
3999         (WebCore::CSSParser::parseTransitionTimingFunction):
4000         * css/CSSStyleSelector.cpp:
4001         (WebCore::CSSStyleSelector::mapTransitionTimingFunction):
4002         * css/CSSValueKeywords.in:
4003
4004 2008-04-18  Adam Roben  <aroben@apple.com>
4005
4006         Change JavaScriptDebugListener to use KJS::UString instead of
4007         WebCore::String
4008
4009         This should reduce the number of string allocations performed while
4010         debugging.
4011
4012         Reviewed by Tim Hatcher.
4013
4014         * page/InspectorController.cpp: Updated JavaScriptDebugListener
4015         functions.
4016         * page/InspectorController.h: Ditto.
4017         * page/JavaScriptDebugListener.h: Changed to use KJS::UString instead
4018         of WebCore::String.
4019         * page/JavaScriptDebugServer.cpp: Ditto.
4020         * platform/win/BString.cpp:
4021         (WebCore::BString::BString): Added a constructor that takes a
4022         KJS::UString.
4023         * platform/win/BString.h:
4024
4025 2008-04-18  Adam Roben  <aroben@apple.com>
4026
4027         Mac build fix
4028
4029         * WebCore.xcodeproj/project.pbxproj: Mark JavaScriptDebugListener.h
4030         private.
4031
4032 2008-04-18  Adam Roben  <aroben@apple.com>
4033
4034         Make InspectorController a JavaScriptDebugListener
4035
4036         I added two new functions to the InspectorController JS object:
4037         reloadInspectedPageAndStartDebugging and stopDebugging. These control
4038         when the InspectorController adds/removes itself to/from the
4039         JavaScriptDebugServer.
4040
4041         Reviewed by Tim Hatcher.
4042
4043         * page/InspectorController.cpp:
4044         (WebCore::reloadInspectedPageAndStartDebugging): Added. Just calls
4045         through to InspectorController.
4046         (WebCore::stopDebugging): Ditto.
4047         (WebCore::InspectorController::~InspectorController): Make sure we
4048         stop debugging before we are destroyed so the JavaScriptDebugServer
4049         won't be left with a stale pointer.
4050         (WebCore::InspectorController::windowScriptObjectAvailable): Added two
4051         new functions to our JS object.
4052         (WebCore::InspectorController::closeWindow): Stop debugging when the
4053         window closes.
4054         (WebCore::InspectorController::reloadInspectedPageAndStartDebugging):
4055         Added.
4056         (WebCore::InspectorController::stopDebugging): Added.
4057
4058         (WebCore::InspectorController::didParseSource):
4059         (WebCore::InspectorController::failedToParseSource):
4060         (WebCore::InspectorController::didEnterCallFrame):
4061         (WebCore::InspectorController::willExecuteStatement):
4062         (WebCore::InspectorController::willLeaveCallFrame):
4063         Added empty implementations of the JavaScriptDebugListener functions.
4064
4065         * page/InspectorController.h:
4066
4067 2008-04-17  Adam Roben  <aroben@apple.com>
4068
4069         Rename ExecState* instances from state to exec
4070
4071         Requested by Darin Adler and Sam Weinig.
4072
4073         * bindings/js/JSConsoleCustom.cpp:
4074
4075 2008-04-17  Adam Roben  <aroben@apple.com>
4076
4077         Clean up InspectorController's use of JSStringRef
4078
4079         All JSStringRef creation now happens through a helper function,
4080         jsStringRef, which takes either a const char* or a const String& and
4081         returns a JSRetainPtr<JSStringRef>.
4082
4083         Reviewed by Mitz Pettel.
4084
4085         * page/InspectorController.cpp:
4086         Added jsStringRef and converted all callers to
4087         JSStringCreateWithUTF8CString or JSStringCreateWithCharacters to use
4088         it.
4089
4090 2008-04-17  Adam Roben  <aroben@apple.com>
4091
4092         Add wrappers around InspectorClient::{show,close}Window
4093
4094         This will let us perform actions when the window is actually
4095         showing/closing (InspectorController::show doesn't always directly
4096         show the window).
4097
4098         Reviewed by Tim Hatcher.
4099
4100         * page/InspectorController.cpp:
4101         (WebCore::InspectorController::scriptObjectReady): Call showWindow()
4102         instead of m_client->showWindow().
4103         (WebCore::InspectorController::show): Ditto.
4104         (WebCore::InspectorController::close): Ditto for closeWindow().
4105         (WebCore::InspectorController::showWindow):
4106         (WebCore::InspectorController::closeWindow):
4107         * page/InspectorController.h:
4108
4109 2008-04-18  Simon Hausmann  <hausmann@webkit.org>
4110
4111         Reviewed by Holger.
4112
4113         Adapt to the API changes in WebKit/qt/
4114
4115         * platform/graphics/qt/ImageQt.cpp:
4116         (loadResourcePixmap):
4117
4118 2008-04-18  Ariya Hidayat  <ariya.hidayat@trolltech.com>
4119
4120         Reviewed by Adam Roben.
4121
4122         https://bugs.webkit.org/show_bug.cgi?id=18477
4123
4124         No resize indication is shown when moving/hovering over the frame
4125         border/splitter.
4126
4127         * page/EventHandler.cpp:
4128         (WebCore::EventHandler::selectCursor):
4129
4130 2008-04-18  Adam Roben  <aroben@apple.com>
4131
4132         Windows build fix
4133
4134         Same as before, but for fabs/fabsf.
4135
4136         * svg/SVGAnimateTransformElement.cpp:
4137         (WebCore::SVGAnimateTransformElement::calculateDistance): Changed to
4138         use fabsf and removed narrowPrecisionToFloat.
4139
4140 2008-04-18  Adam Roben  <aroben@apple.com>
4141
4142         Windows build fix
4143
4144         In MSVC, sqrt() has three overloads: float, double, and long
4145         double. In GCC, sqrt() is only for doubles. Both MSVC and GCC have
4146         sqrtf() to operate explicitly on floats.
4147
4148         * svg/SVGAnimateMotionElement.cpp:
4149         (WebCore::SVGAnimateMotionElement::calculateDistance): Changed to use
4150         sqrtf and removed narrowPrecisionToFloat.
4151         * svg/SVGAnimateTransformElement.cpp:
4152         (WebCore::SVGAnimateTransformElement::calculateDistance): Ditto.
4153
4154 2008-04-18  Simon Hausmann  <hausmann@webkit.org>
4155
4156         Fix the build without Database support (fixes the Qt/win build).
4157
4158         * page/PageGroup.cpp:
4159         (WebCore::PageGroup::localStorage):
4160
4161 2008-04-18  Simon Hausmann  <hausmann@webkit.org>
4162
4163         Fix the Gtk build on the build bot.
4164
4165         * GNUmakefile.am: Back out the previous LocalStorage, etc. additions
4166         as they're already listed in another sources group that wasn't used
4167         due to a local configure error.
4168
4169 2008-04-18  Simon Hausmann  <hausmann@webkit.org>
4170
4171         Prospective wx build fix.
4172
4173         * webcore-base.bkl: Add loader/appcache to include paths.
4174
4175 2008-04-18  Simon Hausmann  <hausmann@webkit.org>
4176
4177         Build fix. Back out previous #include fix for PageGroup.h as it broke
4178         the Mac build due to forwarding headers.
4179
4180         * page/PageGroup.h:
4181
4182 2008-04-18  Simon Hausmann  <hausmann@webkit.org>
4183
4184         Build fix for Qt and gcc 4.3.
4185
4186         * WebCore.pro: Added missing files and include paths, re-ordered
4187         the storage/ include path to avoid conflict of storage/LocalStorage.h
4188         with kjs/LocalStorage.h
4189         * page/PageGroup.h: Include LocalStorage.h instead of forward
4190         declaration to fix compilation with gcc 4.3.
4191
4192 2008-04-18  Simon Hausmann  <hausmann@webkit.org>
4193
4194         Build fix for Gtk and gcc 4.3.
4195
4196         * GNUmakefile.am: Added missing files and include paths.
4197         * storage/LocalStorage.h: Include LocalStorageArea.h instead of
4198         forward declaring it due to the HashMap use where gcc 4.3 needs to
4199         see the class.
4200
4201 2008-04-17  Antti Koivisto  <antti@apple.com>
4202
4203         Reviewed by Oliver.
4204         
4205         https://bugs.webkit.org/show_bug.cgi?id=18573
4206
4207         Implement supplemental transforms and use them for <animateMotion> instead of the transform list.
4208         This will allow <animateTransform> and <animateMotion> combine properly.
4209
4210         * svg/SVGAnimateMotionElement.cpp:
4211         (WebCore::SVGAnimateMotionElement::resetToBaseValue):
4212         (WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
4213         (WebCore::SVGAnimateMotionElement::applyResultsToTarget):
4214         * svg/SVGElement.h:
4215         (WebCore::SVGElement::supplementalTransform):
4216         * svg/SVGStyledTransformableElement.cpp:
4217         (WebCore::SVGStyledTransformableElement::animatedLocalTransform):
4218         * svg/SVGStyledTransformableElement.h:
4219         (WebCore::SVGStyledTransformableElement::supplementalTransform):
4220         * svg/SVGTextElement.cpp:
4221         (WebCore::SVGTextElement::animatedLocalTransform):
4222         * svg/SVGTextElement.h:
4223         (WebCore::SVGTextElement::supplementalTransform):
4224
4225 2008-04-17  Antti Koivisto  <antti@apple.com>
4226
4227         Reviewed by Oliver.
4228
4229         Implement calcMode=paced.
4230         
4231         Tested by SVG testsuite tests
4232         animate-elem-11-t.svg
4233         animate-elem-15-t.svg
4234         animate-elem-82-t.svg
4235
4236         * svg/SVGAnimateElement.cpp:
4237         (WebCore::SVGAnimateElement::calculateDistance):
4238         * svg/SVGAnimateElement.h:
4239         * svg/SVGAnimateMotionElement.cpp:
4240         (WebCore::SVGAnimateMotionElement::calculateDistance):
4241         * svg/SVGAnimateMotionElement.h:
4242         * svg/SVGAnimateTransformElement.cpp:
4243         (WebCore::SVGAnimateTransformElement::calculateDistance):
4244         * svg/SVGAnimateTransformElement.h:
4245         * svg/SVGAnimationElement.cpp:
4246         (WebCore::SVGAnimationElement::calculateKeyTimesForCalcModePaced):
4247         (WebCore::SVGAnimationElement::startedActiveInterval):
4248         * svg/SVGAnimationElement.h:
4249         (WebCore::SVGAnimationElement::calculateDistance):
4250