Fix fast/forms/form-post-urlencoded.html.
[WebKit-https.git] / WebCore / ChangeLog
1 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
2
3         Reviewed by Holger.
4
5         Fix fast/forms/form-post-urlencoded.html.
6         
7         Post requests on files don't really make sense, but for
8         fast/forms/form-post-urlencoded.html we still need to retrieve the file,
9         which means we map it to a Get instead.
10         
11
12         * platform/network/qt/QNetworkReplyHandler.cpp:
13         (WebCore::QNetworkReplyHandler::start):
14
15 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
16
17         Reviewed by Holger.
18
19         Make QNetworkReplyHandler::abort() more robust against multiple invocations.
20
21         During DRT runs I see cancel() being called on the same handle multiple times. Guard
22         against this a bit better by setting m_reply to 0 after we called abort() on it.
23
24         * platform/network/qt/QNetworkReplyHandler.cpp:
25         (WebCore::QNetworkReplyHandler::abort):
26
27 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
28
29         Reviewed by Simon.
30
31         * httpBody() can return 0 and other ports (cf/mac) check for this condition
32         * Looking at the cf/mac implementation we might need to call setHTTPBody somewhere
33         as well.
34         
35
36         WARNING: NO TEST CASES ADDED OR CHANGED
37
38         * platform/network/qt/QNetworkReplyHandler.cpp:
39         (WebCore::QNetworkReplyHandler::start):
40
41 2008-01-18  Prasanth Ullattil  <prasanth.ullattil@trolltech.com>
42
43         Reviewed by Simon Hausmann <hausmann@webkit.org>.
44
45         Fix compilation in Win64(3): Due to the size of size_t cast the return value explicitly to double() to make sure the right Value() constructor is called.
46
47         * xml/XPathFunctions.cpp:
48         (WebCore::XPath::FunCount::evaluate):
49
50 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
51
52         Reviewed by Simon.
53
54         * Remove our windowClipRect reimplementation and instead have our own
55         Widget::invalidate implementation that is invalidating
56         IntRect(0, 0, width(), height()) without trying to clip it (in contrast
57         to Widget::invalidateRect)
58
59         * platform/qt/PlatformScrollBar.h:
60         * platform/qt/PlatformScrollBarQt.cpp:
61         (WebCore::PlatformScrollbar::invalidate):
62
63 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
64
65         Reviewed by Simon.
66
67         * Change the coordinate transformation in the PlatformMouseEvent handlers
68         * We want to convert from coordinates of the containing window to our local
69         position on the scrollbar.
70
71         * platform/qt/PlatformScrollBarQt.cpp:
72         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
73         (WebCore::PlatformScrollbar::handleMousePressEvent):
74
75 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
76
77         Reviewed by Simon.
78
79         * Make the qDebug more usable. Do not have an additional newline and print
80         the untranslated coordinates as well.
81
82         * platform/qt/PlatformScrollBarQt.cpp:
83         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
84         (WebCore::PlatformScrollbar::handleMousePressEvent):
85
86 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
87
88         Reviewed by Simon.
89
90         * Dead code, remove it
91
92         * platform/qt/PlatformScrollBarQt.cpp:
93
94 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
95
96         Reviewed by Simon.
97
98         * Coding-Style fixes.
99
100         * platform/qt/PlatformScrollBarQt.cpp:
101         (WebCore::PlatformScrollbar::PlatformScrollbar):
102
103 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
104
105         Reviewed by Simon.
106
107         * Coding-Style fix
108
109         * platform/graphics/qt/ImageDecoderQt.cpp:
110         (WebCore::ImageDecoderQt::ReadContext::ReadContext):
111
112 2008-01-17  Geoffrey Garen  <ggaren@apple.com>
113
114         Reviewed by Darin Adler.
115
116         Fixed: lots of WebCore leaks reported when quitting Safari
117         
118         If we're quitting with a GC still scheduled, do the GC before quitting.
119         That way, WebCore's leak counters won't count objects that were
120         scheduled for GC.
121
122         * bindings/js/GCController.cpp:
123         (WebCore::GCController::~GCController):
124         (WebCore::GCController::garbageCollectNow):
125         * bindings/js/GCController.h:
126
127 2008-01-17  Alp Toker  <alp@atoker.com>
128
129         Reviewed by Oliver Hunt.
130
131         gdk_screen_get_font_options() returns NULL if no default options are
132         set so we always have to NULL check to avoid crashes later on since
133         Cairo doesn't accept NULL font options.
134
135         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
136         (WebCore::FontPlatformData::FontPlatformData):
137
138 2008-01-17  Antti Koivisto  <antti@apple.com>
139
140         Reviewed by Adele.
141
142         Windows fix for <rdar://problem/5605682>
143         Disallow streaming protocols for media elements
144         and <rdar://problem/5668711>
145         Limit the container and codec types that the <video> tag supports
146         
147         - Disable unsupported QuickTime tracks types. 
148         - Disallow streaming protocols (for now).
149
150         * WebCore.vcproj/WebCore.vcproj:
151         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
152         (WebCore::MediaPlayerPrivate::updateStates):
153         * platform/graphics/win/QTMovieWin.cpp:
154         (QTMovieWin::load):
155         (QTMovieWin::disableUnsupportedTracks):
156         * platform/graphics/win/QTMovieWin.h:
157
158 2008-01-17  Oliver Hunt  <oliver@apple.com>
159
160         Support smart copy and paste during drag and drop
161         
162         Reviewed by Alice
163         
164         In order for the drag and drop tests in Windows DRT to pass
165         we need to support smart cut and paste operations during
166         drag and drop on windows.
167         
168         There is no layout test as drag and drop is still unsupported
169         on windows.  Once supported smart drag/drop is tested by existing
170         tests
171
172         * platform/win/ClipboardUtilitiesWin.cpp:
173         (WebCore::smartPasteFormat):
174         * platform/win/ClipboardUtilitiesWin.h:
175         * platform/win/ClipboardWin.cpp:
176         (WebCore::ClipboardWin::writeRange):
177         * platform/win/DragDataWin.cpp:
178
179 2008-01-17  Oliver Hunt  <oliver@apple.com>
180
181         Reviewed by Anders.
182
183         <rdar://problem/5692940> Crash when attempting to get text properties in
184         SVG with no renderer
185
186         We use the element renderer to calculate the text element bounds,
187         however there was no check against the possibility of the text dimension
188         properties being requested on a element with no renderer (eg. unattached, 
189         display: none).
190
191         Test: svg/text/text-property-with-display-none.html
192
193         * svg/SVGTextContentElement.cpp:
194         (WebCore::rootInlineBoxForTextContentElement):
195
196 2008-01-17  Anders Carlsson  <andersca@apple.com>
197
198         Reviewed by Oliver.
199
200         <rdar://problem/5636742>
201         CrashTracer: [USER] 1302 crashes in Safari at com.apple.WebCore: WTF::Vector<char, 0ul>::reserveCapacity + 78
202         
203         When loading full-frame plug-ins, disable buffering data for the main resource loader. Otherwise, this can cause us
204         to crash when loading large files such as movies in the browser. We already do this for embedded plug-ins.
205         
206         * WebCore.base.exp:
207         * loader/DocumentLoader.h:
208         (WebCore::DocumentLoader::mainResourceLoader):
209         New accessor method.
210         
211         * loader/PluginDocument.cpp:
212         (WebCore::PluginTokenizer::writeRawData):
213         Disable buffering for the main resource loader.
214         
215         * loader/ResourceLoader.cpp:
216         (WebCore::ResourceLoader::setShouldBufferData):
217         * loader/ResourceLoader.h:
218         Have this free the buffer when disabling buffering.
219
220 2008-01-17  Adam Roben  <aroben@apple.com>
221
222         More Qt/GTK+ build fixing.
223
224         * platform/gtk/ScrollViewGtk.cpp:
225         * platform/qt/ScrollViewQt.cpp:
226
227 2008-01-17  Alexey Proskuryakov  <ap@webkit.org>
228
229         Reviewed by Darin.
230
231         http://bugs.webkit.org/show_bug.cgi?id=16902
232         <rdar://problem/5692566> fast/encoding/mailto-always-utf-8.html fails when run after
233         fast/dom/Window/window-property-shadowing.html
234
235         Test: fast/dom/Window/window-property-shadowing_.html
236
237         * loader/FrameLoader.cpp: (WebCore::FrameLoader::clear): Clear the frame name, too.
238
239 2008-01-17  Adam Roben  <aroben@apple.com>
240
241         Qt/GTK+ build fix.
242
243         * platform/gtk/ScrollViewGtk.cpp:
244         (WebCore::ScrollView::ScrollViewPrivate::isActive):
245         * platform/qt/ScrollViewQt.cpp:
246         (WebCore::ScrollView::ScrollViewPrivate::isActive):
247
248 2008-01-16  Adam Roben  <aroben@apple.com>
249
250         Update scroll bars/form controls when FocusController::isActive changes
251
252         Part of <rdar://5006915> Inactive look for Aqua controls
253
254         Reviewed by Darin.
255
256         All tests pass.
257
258         * page/FocusController.cpp:
259         (WebCore::FocusController::setActive): Update control tints when the
260         active state changes.
261         * page/FrameView.cpp:
262         (WebCore::FrameView::updateControlTints): On Windows, we have to ask
263         ScrollView to paint so that the outermost scroll bars will paint. On
264         Mac, the outermost scroll bars are taken care of by NSScroller.
265         * platform/PopupMenu.h: Updated for ScrollBarClient changes.
266         * platform/ScrollBar.h: Added a new ScrollBarClient method.
267         * platform/win/PlatformScrollBarSafari.cpp:
268         (WebCore::PlatformScrollbar::paint): Invalidate when updating control
269         tints so that we can paint with the new tint later.
270         (WebCore::PlatformScrollbar::paintButton): Pass the active state down
271         to SafariTheme.
272         (WebCore::PlatformScrollbar::paintTrack): Ditto.
273         (WebCore::PlatformScrollbar::paintThumb): Ditto.
274         * platform/win/ScrollViewWin.cpp:
275         (WebCore::ScrollView::ScrollViewPrivate::isActive): Added.
276         (WebCore::ScrollView::paint): Pass paint calls on down if we're
277         updating control tints so the scroll bars can invalidate.
278         * rendering/RenderLayer.cpp:
279         (WebCore::RenderLayer::isActive): Added.
280         * rendering/RenderLayer.h:
281         * rendering/RenderListBox.cpp:
282         (WebCore::RenderListBox::isActive): Added.
283         * rendering/RenderListBox.h:
284         * rendering/RenderTheme.cpp:
285         (WebCore::RenderTheme::isActive): Added.
286         * rendering/RenderTheme.h:
287         * rendering/RenderThemeSafari.cpp:
288         (WebCore::RenderThemeSafari::determineState): Pass the active state
289         down to SafariTheme.
290
291 2008-01-16  Adam Roben  <aroben@apple.com>
292
293         Move focused/active state from Frame to SelectionController/FocusController
294
295         This is the first part of <rdar://5006915> Inactive look for Aqua
296         controls.
297
298         The following methods were moved/renamed:
299             - Frame::setIsActive -> FocusController::setActive
300             - Frame::isActive -> SelectionController::isActiveAndFocused
301             - Frame::setWindowHasFocus -> SelectionController::setFocused
302
303         Active state is now correctly a Page-level concept.
304
305         The Mac parts of this patch were written by Darin.
306
307         Reviewed by Darin.
308
309         All tests pass.
310
311         * WebCore.base.exp: Updated for method renames.
312         * css/CSSStyleSelector.cpp:
313         (WebCore::CSSStyleSelector::checkOneSelector): Ditto.
314         * editing/SelectionController.cpp:
315         (WebCore::SelectionController::SelectionController): Initialize new
316         member.
317         (WebCore::SelectionController::focusedOrActiveStateChanged): New
318         private method. Most of this code came from Frame::setIsActive.
319         (WebCore::SelectionController::pageActivationChanged): Added.
320         (WebCore::SelectionController::setFocused): Added. Replaces
321         Frame::setWindowHasFocus.
322         (WebCore::SelectionController::isFocusedAndActive): Added. Replaces
323         Frame::isActive.
324         * editing/SelectionController.h:
325         * page/FocusController.cpp:
326         (WebCore::FocusController::FocusController): Initialize new member.
327         (WebCore::FocusController::setFocusedFrame): Changed to just call
328         SelectionController::setFocused, since active state has doesn't change
329         when the focused frame changes.
330         (WebCore::FocusController::setActive): Added. Replaces
331         Frame::setIsActive.
332         * page/FocusController.h:
333         (WebCore::FocusController::isActive): Added.
334         * page/Frame.cpp:
335         (WebCore::Frame::setDocument): Updated for method renames.
336         (WebCore::Frame::setFocusedNodeIfNeeded): Ditto.
337         (WebCore::Frame::updateSecureKeyboardEntryIfActive): Ditto.
338         (WebCore::FramePrivate::FramePrivate): Removed initialization of
339         removed members.
340         * page/Frame.h:
341         * page/FramePrivate.h:
342         * page/mac/WebCoreFrameBridge.h: Removed -selectionColor.
343         * page/mac/WebCoreFrameBridge.mm: Ditto.
344         * rendering/RenderListBox.cpp:
345         (WebCore::RenderListBox::paintItemForeground): Updated for method
346         renames.
347         (WebCore::RenderListBox::paintItemBackground): Ditto.
348         * rendering/RenderObject.cpp:
349         (WebCore::RenderObject::selectionBackgroundColor): Ditto.
350         (WebCore::RenderObject::selectionForegroundColor): Ditto.
351         * rendering/RenderTextControl.cpp:
352         (WebCore::RenderTextControl::capsLockStateMayHaveChanged): Ditto.
353         * rendering/RenderTheme.cpp:
354         (WebCore::RenderTheme::isFocused): Ditto.
355
356 2008-01-17  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
357
358         Reviewed by Simon.
359
360         * Make the nice 'safari' feature work on our port. When viewing a single image, clicking
361         on the image will zoom it.
362         * It seems like our platform can only determine the size of the image once it is completely
363         loaded. Call m_doc->imageChanged on the last chunk of data as well.
364
365         * loader/ImageDocument.cpp:
366         (WebCore::ImageTokenizer::finish):
367
368 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
369
370         Reviewed by Lars.
371
372         Set the library version of QtWebKit to the Qt version.
373
374         * WebCore.pro:
375
376 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
377
378         Reviewed by Holger.
379
380         Re-enable gzip compression as accepted encoding, now that the bug is fixed in Qt 4.4's network module.
381
382         * platform/network/qt/QNetworkReplyHandler.cpp:
383         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
384
385 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
386
387         Another Windows build fix, setCookies accidentially had a const
388         Document pointer.
389
390         * platform/network/win/CookieJarWin.cpp:
391
392 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
393
394         MSVC Windows build fix. Forward declaring Document in CookieJar.h
395         seems not enough for MSVC.
396
397         * platform/network/win/CookieJarWin.cpp:
398
399 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
400
401         Reviewed by Maciej, Lars, Holger.
402
403         http://bugs.webkit.org/show_bug.cgi?id=16589
404
405         Add a document parameter to WebCore::cookies, setCookies and cookiesEnabled.
406
407         * WebCore.pro:
408         * bindings/js/kjs_navigator.cpp:
409         (KJS::Navigator::getValueProperty):
410         * dom/Document.cpp:
411         (WebCore::Document::cookie):
412         * platform/CookieJar.h:
413         * platform/gtk/CookieJarGtk.cpp:
414         (WebCore::setCookies):
415         (WebCore::cookies):
416         * platform/mac/CookieJar.mm:
417         * platform/network/win/CookieJarWin.cpp:
418         * platform/qt/CookieJarQt.cpp:
419         (WebCore::setCookies):
420         (WebCore::cookies):
421         (WebCore::cookiesEnabled):
422         * platform/wx/TemporaryLinkStubs.cpp:
423
424 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
425
426         Reviewed by Holger.
427
428         Windows build fix. (use localtime_r again instead of _s)
429
430         * loader/FTPDirectoryDocument.cpp:
431         (WebCore::processFileDateString):
432
433 2008-01-17  Frans Englich  <fenglich@trolltech.com>
434
435         Reviewed by Simon Hausmann <hausmann@webkit.org>.
436
437         Fix linking on MinGW and at least one MSVC platform by having gmtimeQt in the correct namespace.
438
439         * loader/FTPDirectoryDocument.cpp:
440
441 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
442
443         Reviewed by Holger.
444
445         Don't link QtWebKit against libQtXml when building against Qt 4.4.
446
447         This is not necessary anymore since QXmlStream has been moved into QtCore.
448
449         * WebCore.pro:
450
451 2008-01-17  HÃ¥vard Wall  <hwall@trolltech.com>
452
453         Reviewed by Simon Hausmann <hausmann@webkit.org>.
454
455         Fix compilation on arm
456
457         * platform/graphics/qt/GraphicsContextQt.cpp:
458         (WebCore::GraphicsContext::endTransparencyLayer):
459
460 2008-01-17  Simon Hausmann  <shausman@trolltech.com>
461
462         Reviewed by Holger.
463
464         Fix compilation against Qt 4.4 without files that are specific for the Qt 4.3 build.
465
466         * WebCore.pro:
467         * platform/network/qt/ResourceHandleQt.cpp:
468         * platform/qt/MIMETypeRegistryQt.cpp:
469         * platform/qt/PlugInInfoStoreQt.cpp:
470
471 2008-01-17  Frans Englich  <fenglich@trolltech.com>
472
473         Reviewed by Simon Hausmann <hausmann@webkit.org>.
474
475         Fixes compilation with MinGW.
476         Neither localtime_r nor localtime_s are available on MingW, so instead of
477         calling back to the thread-unsafe localtime use QDateTime instead.
478
479         * loader/FTPDirectoryDocument.cpp:
480         (WebCore::FTPDirectoryTokenizer::WebCore::processFilesizeString):
481         (WebCore::FTPDirectoryTokenizer::WebCore::wasLastDayOfMonth):
482         (WebCore::FTPDirectoryTokenizer::WebCore::WebCore::gmtimeQt):
483         * loader/FTPDirectoryParser.cpp:
484         (WebCore::parseOneFTPLine):
485
486 2008-01-17  Dan Bernstein  <mitz@apple.com>
487
488         Reviewed by Dave Hyatt.
489
490         - fix determinePitch for segmented fonts
491
492         Covered by fast/css/font-face-implicit-local-font.html
493
494         * platform/graphics/FontFallbackList.cpp:
495         (WebCore::FontFallbackList::determinePitch): If the primary font is
496         segmented, treat as fixed pitch only if it has only one segment
497         and that segment is fixed-pitch.
498
499 2008-01-16  David Hyatt  <hyatt@apple.com>
500
501         Fix for http://bugs.webkit.org/show_bug.cgi?id=16611
502
503         Make sure vertical-align length values are offset from their parents rather than being absolute to the
504         line.
505
506         Reviewed by olliej
507
508         Added fast/css/vertical-align-lengths.html
509
510         * rendering/RenderObject.cpp:
511         (WebCore::RenderObject::getVerticalPosition):
512
513 2008-01-16  Dan Bernstein  <mitz@apple.com>
514
515         Reviewed by Dave Hyatt.
516
517         - fix for @font-face rules with unicode-range: always use a local font where not
518           explicitly overlaid.
519
520         Test: fast/css/font-face-implicit-local-font.html
521
522         * css/CSSFontSelector.cpp:
523         (WebCore::CSSFontSelector::addFontFaceRule): Changed to insert an implicit
524         @font-face rule with the local font the matches the family and description before
525         any explicit @font-face rules that overlay specific ranges of the same font.
526         * css/CSSSegmentedFontFace.h:
527         (WebCore::CSSSegmentedFontFace::numRanges): Addded.
528
529 2008-01-16  Antti Koivisto  <antti@apple.com>
530
531         Fix Tiger build.
532
533         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
534         (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
535
536 2008-01-16  Antti Koivisto  <antti@apple.com>
537
538         Reviewed by Adele.
539         
540         OS X fix for <rdar://problem/5605682>
541         Disallow streaming protocols for media elements
542         and <rdar://problem/5668711>
543         Limit the container and codec types that the <video> tag supports
544         
545         - Disable unsupported QuickTime tracks types. 
546         - Disallow streaming protocols (for now).
547         - Set QTMovie QTMoviePreventExternalURLLinksAttribute and QTSecurityPolicyNoCrossSiteAttribute 
548           to limit QuickTime's access to external resources.
549         
550         Windows patch coming up.
551
552         Tests: media/broken-video.html
553                media/unsupported-rtsp.html
554                media/unsupported-tracks.html
555
556         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
557         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
558         (WebCore::MediaPlayerPrivate::createQTMovie):
559         (WebCore::MediaPlayerPrivate::updateStates):
560         (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
561
562 2008-01-16  Rodney Dawes  <dobey@wayofthemonkey.com>
563
564         Reviewed by Alp Toker.
565
566         http://bugs.webkit.org/show_bug.cgi?id=16897
567         Add shared plugins directory to INCLUDE path
568
569         Add the plugins directory to INCLUDEPATH
570
571         * GNUmakefile.am:
572         * WebCore.pro:
573
574 2008-01-16  Geoffrey Garen  <ggaren@apple.com>
575
576         Reviewed by Sam Weinig.
577         
578         Added a debug counter for SQL transactions. This helped me debug an SQL
579         leak.
580
581         * bindings/js/JSCustomSQLTransactionCallback.cpp:
582         (WebCore::):
583         (WebCore::JSCustomSQLTransactionCallbackCounter::~JSCustomSQLTransactionCallbackCounter):
584         (WebCore::JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback):
585         (WebCore::JSCustomSQLTransactionCallback::~JSCustomSQLTransactionCallback):
586         * bindings/js/JSCustomSQLTransactionCallback.h:
587
588         * bindings/js/kjs_window.cpp: Removed a silly comment.
589
590 2008-01-16  David Hyatt  <hyatt@apple.com>
591
592         Fix for http://bugs.webkit.org/show_bug.cgi?id=14846, cell padding can't be changed dynamically.
593
594         Reviewed by Eric Seidel
595
596         Added fast/table/dynamic-cellpadding.html
597
598         * html/HTMLTableElement.cpp:
599         (WebCore::HTMLTableElement::parseMappedAttribute):
600         * rendering/RenderTable.cpp:
601         (WebCore::RenderTable::setCellPadding):
602         * rendering/RenderTable.h:
603
604 2008-01-16  David Hyatt  <hyatt@apple.com>
605
606         Fix for <rdar://problem/5681647> Item pages on http://www.stendmarsofa.com/ hang Safari
607
608         This regression was caused by an attempt to implement a WinIE quirk in RenderBlock::calcInlinePrefWidths.
609         The original patch introduced pathological O(n^2) behavior into this function even when the quirk didn't need
610         to apply.  In addition the quirk was only partially implemented (the full quirk did not care what was adjacent
611         to images and also needed bidi.cpp patched, since the quirk applies both when computing pref widths and when
612         laying out).
613
614         This new patch rewrites the quirk to be complete.  The original test case attached to the bug that tested a variety
615         of image/text combinations now fully matches WinIE.
616
617         Reviewed by Beth
618
619         Added fast/table/unbreakable-images-quirk.html
620
621         * rendering/RenderBlock.cpp:
622         (WebCore::RenderBlock::calcInlinePrefWidths):
623         * rendering/bidi.cpp:
624         (WebCore::RenderBlock::findNextLineBreak):
625
626 2008-01-16  Rodney Dawes  <dobey@wayofthemonkey.com>
627
628         Reviewed by Jon Honeycutt
629
630         Move isPluginBlacklisted to PluginPackageWin.cpp, to avoid
631         a circular dependency on PluginDatabaseWin
632         Remove the getFileVersion method, and just check the versions directly
633         in isPluginBlacklisted, as it was the only caller
634
635         http://bugs.webkit.org/show_bug.cgi?id=16884
636
637         * plugins/win/PluginDatabaseWin.cpp:
638         * plugins/win/PluginDatabaseWin.h:
639         * plugins/win/PluginPackageWin.cpp:
640         * plugins/win/PluginPackageWin.h:
641
642 2008-01-16  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
643
644         Reviewed by Lars.
645
646         * Set the cursor on the containingWindow() instead of the
647         nativeWidget()
648         * This should be safe even with plugins as the cursor is set
649         on the mouse events.
650
651         * platform/qt/WidgetQt.cpp:
652         (WebCore::Widget::setCursor):
653
654 2008-01-16  Brad Hughes  <bhughes@trolltech.com>
655
656         Reviewed by Lars.
657
658         Improve the sqlite3 dependency when building WebKit inside Qt.
659
660         Build sqlite3 into QtWebKit if a system sqlite3 development package
661         can't be found.
662
663         * WebCore.pro:
664
665 2008-01-16  Lars Knoll  <lars@trolltech.com>
666
667         Reviewed by Simon Hausmann <simon.hausmann@trolltech.com>.
668
669         Implement GraphicsContext::clipOut and fix transparency layers.
670
671         Transparency layers where broken in two ways: It always used the
672         complete device rect as the size of the layer pixmap and the pixmaps
673         where not correctly initialized to transparent.
674
675         This fixes the worst drawing errors in the Inspector and makes drawing it
676         10 times faster.
677
678         * platform/graphics/qt/GraphicsContextQt.cpp:
679         (WebCore::toQtLineJoin):
680         (WebCore::TransparencyLayer::TransparencyLayer):
681         (WebCore::GraphicsContextPlatformPrivate::p):
682         (WebCore::GraphicsContext::platformContext):
683         (WebCore::GraphicsContext::savePlatformState):
684         (WebCore::GraphicsContext::restorePlatformState):
685         (WebCore::GraphicsContext::drawRect):
686         (WebCore::GraphicsContext::drawLine):
687         (WebCore::GraphicsContext::drawEllipse):
688         (WebCore::GraphicsContext::strokeArc):
689         (WebCore::GraphicsContext::drawConvexPolygon):
690         (WebCore::GraphicsContext::fillRect):
691         (WebCore::GraphicsContext::fillRoundedRect):
692         (WebCore::GraphicsContext::clip):
693         (WebCore::GraphicsContext::drawFocusRing):
694         (WebCore::GraphicsContext::beginTransparencyLayer):
695         (WebCore::GraphicsContext::endTransparencyLayer):
696         (WebCore::GraphicsContext::clearRect):
697         (WebCore::GraphicsContext::strokeRect):
698         (WebCore::GraphicsContext::setLineCap):
699         (WebCore::GraphicsContext::setLineJoin):
700         (WebCore::GraphicsContext::setMiterLimit):
701         (WebCore::GraphicsContext::setAlpha):
702         (WebCore::GraphicsContext::setCompositeOperation):
703         (WebCore::GraphicsContext::clipOut):
704         (WebCore::GraphicsContext::translate):
705         (WebCore::GraphicsContext::origin):
706         (WebCore::GraphicsContext::rotate):
707         (WebCore::GraphicsContext::scale):
708         (WebCore::GraphicsContext::clipOutEllipseInRect):
709         (WebCore::GraphicsContext::addInnerRoundedRectClip):
710         (WebCore::GraphicsContext::setPlatformStrokeStyle):
711         (WebCore::GraphicsContext::setPlatformStrokeThickness):
712         (WebCore::GraphicsContext::setPlatformFillColor):
713         (WebCore::GraphicsContext::setUseAntialiasing):
714
715 2008-01-16  Lars Knoll  <lars@trolltech.com>
716
717         Reviewed by Simon Hausmann <simon.hausmann@trolltech.com>.
718
719         Trivially implement the themed search field by mapping it to a text field
720
721         Also add a bunch of notImplemented warnings for other places where we don't
722         have an implementatin in RenderTheme.
723
724         * platform/qt/RenderThemeQt.cpp:
725         (WebCore::RenderThemeQt::paintTextField):
726         (WebCore::RenderThemeQt::paintMenuListButton):
727         (WebCore::RenderThemeQt::adjustMenuListButtonStyle):
728         (WebCore::RenderThemeQt::paintSliderTrack):
729         (WebCore::RenderThemeQt::paintSliderThumb):
730         (WebCore::RenderThemeQt::paintSearchField):
731         (WebCore::RenderThemeQt::adjustSearchFieldStyle):
732         (WebCore::RenderThemeQt::adjustSearchFieldCancelButtonStyle):
733         (WebCore::RenderThemeQt::paintSearchFieldCancelButton):
734         (WebCore::RenderThemeQt::adjustSearchFieldDecorationStyle):
735         (WebCore::RenderThemeQt::paintSearchFieldDecoration):
736         (WebCore::RenderThemeQt::adjustSearchFieldResultsDecorationStyle):
737         (WebCore::RenderThemeQt::paintSearchFieldResultsDecoration):
738
739 2008-01-16  Holger Freyther  <holger.freyther@trolltech.com>
740
741         Reviewed by Simon.
742
743         * Follow the EventHandlerWin.cpp and always return true in the handlers.
744         * Match the windows implementation more closely as well.
745         * This is fixing "selection" bugs with the Web Inspector
746
747         * page/qt/EventHandlerQt.cpp:
748         (WebCore::EventHandler::focusDocumentView):
749         (WebCore::EventHandler::passMousePressEventToSubframe):
750         (WebCore::EventHandler::passMouseMoveEventToSubframe):
751         (WebCore::EventHandler::passMouseReleaseEventToSubframe):
752         (WebCore::EventHandler::passMousePressEventToScrollbar):
753
754 2008-01-16  Simon Hausmann  <hausmann@webkit.org>
755
756         Reviewed by Lars Knoll <lars@trolltech.com>.
757
758         Fix crashes in the new networking code.
759
760         When the ResourceLoader cancels the handle we have to make sure not to access
761         the resource handle afterwards again.
762
763         * platform/network/qt/QNetworkReplyHandler.cpp:
764         (WebCore::QNetworkReplyHandler::finish):
765         (WebCore::QNetworkReplyHandler::forwardData):
766
767 2008-01-16  Lars Knoll  <lars@trolltech.com>
768
769         Reviewed by Simon.
770
771         add conversion methods from and to QUrl to KURL.
772
773         Use them in the places I found at the moment. Fixes a bug
774         where form data was encoded twice.
775         Also fix QWebSettings to take a QUrl for the user style sheet
776         location.
777
778         * WebCore.pro:
779         * platform/KURL.h:
780         * platform/network/qt/QNetworkReplyHandler.cpp:
781         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
782         * platform/network/qt/ResourceRequestQt.cpp:
783         (WebCore::ResourceRequest::toNetworkRequest):
784         * platform/qt/KURLQt.cpp: Added.
785         (WebCore::KURL::KURL):
786         (WebCore::KURL::operator QUrl):
787
788 2008-01-15  Darin Adler  <darin@apple.com>
789
790         Rubber-stamped by Maciej Stachowiak and Oliver Hunt.
791
792         - fix <rdar://problem/5689748> REGRESSION: Cannot redirect to protocols handled by external applications
793
794         Put navigation policy delegate calls back for redirects.
795         Just rolled out the change where I took them out.
796
797         * loader/MainResourceLoader.cpp:
798         (WebCore::MainResourceLoader::callContinueAfterNavigationPolicy):
799         (WebCore::MainResourceLoader::continueAfterNavigationPolicy):
800         (WebCore::MainResourceLoader::willSendRequest):
801         * loader/MainResourceLoader.h:
802
803 2008-01-15  Adele Peterson  <adele@apple.com>
804
805         Reviewed by Sam.
806
807         Remove unused variable for old media control background drawing code.
808
809         * rendering/RenderThemeMac.h:
810         * rendering/RenderThemeMac.mm:
811         (WebCore::RenderThemeMac::RenderThemeMac):
812         (WebCore::RenderThemeMac::~RenderThemeMac):
813
814 2008-01-15  Sam Weinig  <sam@webkit.org>
815
816         Reviewed by Geoffrey Garen.
817
818         Fix <rdar://problem/5595552> r27608 introduced a 20% increase in JS binary size, 4% increase in WebCore binary size
819
820         - Update JS Function implementations to use a static function based method. This decreases
821           the binary size of an Intel only build by 1013.5K.
822
823         * WebCore.xcodeproj/project.pbxproj:
824         * bindings/js/JSDOMWindowCustom.cpp:
825         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
826         * bindings/js/JSEventTargetBase.cpp:
827         (WebCore::jsEventTargetAddEventListener):
828         (WebCore::jsEventTargetRemoveEventListener):
829         (WebCore::jsEventTargetDispatchEvent):
830         (WebCore::retrieveEventTargetAndCorrespondingNode):
831         * bindings/js/JSEventTargetBase.h:
832         * bindings/js/JSHTMLInputElementBase.cpp:
833         (WebCore::jsHTMLInputElementBaseFunctionSetSelectionRange):
834         (WebCore::JSHTMLInputElementBase::getOwnPropertySlot):
835         * bindings/js/JSHTMLInputElementBase.h:
836         * bindings/js/JSLocation.cpp:
837         (WebCore::JSLocation::getOwnPropertySlot):
838         (WebCore::jsLocationProtoFuncReplace):
839         (WebCore::jsLocationProtoFuncReload):
840         (WebCore::jsLocationProtoFuncAssign):
841         (WebCore::jsLocationProtoFuncToString):
842         * bindings/js/JSLocation.h:
843         * bindings/js/JSXMLHttpRequest.cpp:
844         (KJS::jsXMLHttpRequestPrototypeFunctionAbort):
845         (KJS::jsXMLHttpRequestPrototypeFunctionGetAllResponseHeaders):
846         (KJS::jsXMLHttpRequestPrototypeFunctionGetResponseHeader):
847         (KJS::jsXMLHttpRequestPrototypeFunctionOpen):
848         (KJS::jsXMLHttpRequestPrototypeFunctionSend):
849         (KJS::jsXMLHttpRequestPrototypeFunctionSetRequestHeader):
850         (KJS::jsXMLHttpRequestPrototypeFunctionOverrideMIMEType):
851         (KJS::jsXMLHttpRequestPrototypeFunctionAddEventListener):
852         (KJS::jsXMLHttpRequestPrototypeFunctionRemoveEventListener):
853         (KJS::jsXMLHttpRequestPrototypeFunctionDispatchEvent):
854         * bindings/js/JSXMLHttpRequest.h:
855         * bindings/js/JSXSLTProcessor.cpp:
856         (KJS::jsXSLTProcessorPrototypeFunctionImportStylesheet):
857         (KJS::jsXSLTProcessorPrototypeFunctionTransformToFragment):
858         (KJS::jsXSLTProcessorPrototypeFunctionTransformToDocument):
859         (KJS::jsXSLTProcessorPrototypeFunctionSetParameter):
860         (KJS::jsXSLTProcessorPrototypeFunctionGetParameter):
861         (KJS::jsXSLTProcessorPrototypeFunctionRemoveParameter):
862         (KJS::jsXSLTProcessorPrototypeFunctionClearParameters):
863         (KJS::jsXSLTProcessorPrototypeFunctionReset):
864         * bindings/js/JSXSLTProcessor.h:
865         * bindings/js/kjs_events.cpp:
866         (WebCore::jsClipboardPrototypeFunctionClearData):
867         (WebCore::jsClipboardPrototypeFunctionGetData):
868         (WebCore::jsClipboardPrototypeFunctionSetData):
869         (WebCore::jsClipboardPrototypeFunctionSetDragImage):
870         * bindings/js/kjs_events.h:
871         * bindings/js/kjs_navigator.cpp:
872         (KJS::pluginsFunctionRefresh):
873         (KJS::navigatorProtoFuncJavaEnabled):
874         * bindings/js/kjs_navigator.h:
875         * bindings/js/kjs_window.cpp:
876         (KJS::Window::getOwnPropertySlot):
877         (KJS::windowProtoFuncAToB):
878         (KJS::windowProtoFuncBToA):
879         (KJS::windowProtoFuncOpen):
880         (KJS::windowProtoFuncSetTimeout):
881         (KJS::windowProtoFuncClearTimeout):
882         (KJS::windowProtoFuncSetInterval):
883         (KJS::windowProtoFuncAddEventListener):
884         (KJS::windowProtoFuncRemoveEventListener):
885         (KJS::windowProtoFuncShowModalDialog):
886         (KJS::windowProtoFuncNotImplemented):
887         * bindings/js/kjs_window.h:
888         * bindings/scripts/CodeGenerator.pm:
889         * bindings/scripts/CodeGeneratorJS.pm:
890
891 2008-01-15  Adele Peterson  <adele@apple.com>
892
893         Reviewed by Dan.
894
895         Fix for <rdar://problem/5682492> With the <video> element, the audio is heard when forwarding or rewinding a movie while it's playing
896
897         * rendering/MediaControlElements.cpp: (WebCore::MediaControlSeekButtonElement::defaultEventHandler):
898           Instead of pausing the media when you stop seeking on mouse up, pause the video when you first start seeking on mouse down. 
899
900 2008-01-15  Alp Toker  <alp@atoker.com>
901
902         Rubber-stamped by Anders.
903
904         Make the HTTP backend configurable in the GTK+ port. curl is currently
905         the only option.
906
907         * GNUmakefile.am:
908
909 2008-01-15  Adele Peterson  <adele@apple.com>
910
911         Build fix.
912
913         * rendering/RenderThemeSafari.cpp: Removing MediaBackgroundAppearance.
914
915 2008-01-14  Samuel Weinig  <sam@webkit.org>
916
917         Reviewed by Darin.
918
919         Fix for <rdar://problem/5671040>
920         REGRESSION: 6% HTML iBench regression from r28722 (getElementsByClassName)
921
922         On my most consistent tests, this brings the HTML iBench from 1.46 -> 1.41,
923         which does not completely make up reported regression, but I was not able to
924         reproduce those findings either.
925
926         * css/CSSStyleSelector.cpp:
927         (WebCore::CSSStyleSelector::matchRules):
928         (WebCore::CSSStyleSelector::checkOneSelector):
929         * dom/ClassNames.cpp:
930         (WebCore::ClassNames::parseClassAttribute):
931         * dom/ClassNames.h:
932         (WebCore::ClassNames::contains):
933         (WebCore::ClassNames::operator[]):
934
935 2008-01-15  Adele Peterson  <adele@apple.com>
936
937         Build fix.  This time for real.
938
939         * rendering/RenderThemeSafari.cpp:
940
941 2008-01-15  Adele Peterson  <adele@apple.com>
942
943         Build fix.
944
945         * rendering/RenderThemeSafari.cpp:
946
947 2008-01-15  Dan Bernstein  <mitz@apple.com>
948
949         Reviewed by Darin Adler.
950
951         - fix <rdar://problem/5666926> svg/custom/use-css-no-effect-on-shadow-tree.svg is failing
952
953         * svg/SVGPreserveAspectRatio.cpp:
954         (WebCore::SVGPreserveAspectRatio::getCTM): Changed the arguments' type
955         from float to double in order to make the values passed to scale() and
956         translate() on Mac OS X and on Windows the same.
957         * svg/SVGPreserveAspectRatio.h:
958
959 2008-01-15  Alexey Proskuryakov  <ap@webkit.org>
960
961         Reviewed by Darin.
962
963         <rdar://problem/5342813> REGRESSION: Safari encodes mailto URLs incorrectly
964
965         Test: fast/encoding/mailto-always-utf-8.html
966
967         * platform/KURL.cpp: (WebCore::encodeRelativeString): Always use UTF-8 for mailto URLs.
968
969 2008-01-15  Adele Peterson  <adele@apple.com>
970
971         Reviewed by Adam and Antti.
972
973         WebCore part of fix for <rdar://problem/5619062> Add load progress indicator to video controls
974
975         * WebCore.base.exp: Removed symbol for wkGetMediaControlBackgroundImageData.  Added symbol for wkDrawMediaSliderTrack.
976         * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Removed case for MediaBackgroundAppearance.
977         * css/html4.css: Removed -webkit-appearance: media-background rule for the media panel element.  Removed unnecessary margin for slider.
978         * rendering/RenderStyle.h: (WebCore::): Removed MediaBackgroundAppearance.
979
980         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::initAndDispatchProgressEvent):
981           Call updateMediaPlayer more frequently so the load progress control gets updated appropriately.
982         * platform/mac/WebCoreSystemInterface.h: Removed wkGetMediaControlBackgroundImageData.  Added wkDrawMediaSliderTrack.
983         * platform/mac/WebCoreSystemInterface.mm: ditto.
984
985         * rendering/RenderTheme.h: Removed paintMediaBackground. Added paintMediaSliderTrack.
986         * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paint): Call paintMediaSliderTrack for elements with MediaSliderAppearance.
987         * rendering/RenderThemeMac.h: Removed paintMediaBackground. Added paintMediaSliderTrack.
988         * rendering/RenderThemeMac.mm:
989         (WebCore::RenderThemeMac::adjustSliderThumbSize): Added different sizes for the media slider thumb.
990         (WebCore::RenderThemeMac::paintMediaSliderTrack): Added.  Calls wkDrawMediaSliderTrack with the percentage the media has loaded.
991         * rendering/RenderThemeSafari.cpp: ditto.
992         (WebCore::RenderThemeSafari::adjustSliderThumbSize):
993         (WebCore::RenderThemeSafari::paintMediaSliderTrack):
994         * rendering/RenderThemeSafari.h:
995
996 2008-01-15  Alexey Proskuryakov  <ap@webkit.org>
997
998         Reviewed by Mark Rowe.
999
1000         Some logging channels weren't initialized from user defaults.
1001
1002         * platform/mac/LoggingMac.mm: (WebCore::InitializeLoggingChannelsIfNecessary):
1003         Initialize LogPlatformLeaks, LogStorageAPI, LogMedia, LogPlugin.
1004
1005 2008-01-14  Steve Falkenburg  <sfalken@apple.com>
1006
1007         Use shared vsprops for most vcproj properties.
1008         
1009         Reviewed by Darin.
1010
1011         * WebCore.vcproj/QTMovieWin.vcproj:
1012         * WebCore.vcproj/WebCore.vcproj:
1013         * platform/graphics/win/QTMovieWin.cpp:
1014         (QTMovieWin::initializeQuickTime): Fix compiler warning.
1015
1016 2008-01-14  Eric Seidel  <eric@webkit.org>
1017
1018         Reviewed by mjs.
1019
1020         Remove a couple more uses of DeprecatedString
1021
1022         No functional changes, thus no test case.
1023
1024         * dom/Document.cpp:
1025         (WebCore::Document::write):
1026         (WebCore::Document::writeln):
1027         (WebCore::Document::recalcStyleSelector):
1028         * dom/Document.h:
1029
1030 2008-01-14  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
1031
1032         Reviewed by Alp Toker.
1033
1034         Build fix: missing symbols when compiling WebKit/Gtk+ with --enable-svg-filters
1035         http://bugs.webkit.org/show_bug.cgi?id=16874
1036
1037         * GNUmakefile.am:
1038         * svg/graphics/cairo/SVGResourceFilterCairo.cpp: Added.
1039         (WebCore::SVGResourceFilter::createPlatformData):
1040         (WebCore::SVGResourceFilter::prepareFilter):
1041         (WebCore::SVGResourceFilter::applyFilter):
1042
1043 2008-01-14  Finnur Thorarinsson  <finnur.webkit@gmail.com>
1044
1045         Reviewed by hyatt & eseidel.
1046
1047         - fix http://bugs.webkit.org/show_bug.cgi?id=16844
1048         RenderText::addLineBoxRects erroneously includes last char for boundingBox
1049
1050         This patch fixes an issue with addLineBoxRects not correctly calculating the 
1051         rects due to an off-by-one error in using box->end(). We were assuming that 
1052         end() gives the index past the last character, when in fact it gives the 
1053         index _of_ the last character. 
1054
1055         Eric Seidel and I could not find a way to test this via DRT. This method is 
1056         only used by WebKit or Safari for displaying selection rects AFAICT.
1057
1058         * rendering/RenderText.cpp:
1059         (WebCore::RenderText::addLineBoxRects):
1060
1061 2008-01-14  Darin Adler  <darin@apple.com>
1062
1063         Reviewed by Geoff.
1064
1065         - fix crash seen in layout tests
1066
1067         * html/HTMLFrameSetElement.cpp:
1068         (WebCore::HTMLFrameSetElement::attach):
1069         Remove incorrect cast to HTMLElement* for parentNode(). The parent is either an
1070         HTMLElement or a Document, not necessarily an HTMLElement.
1071
1072 2008-01-14  Darin Adler  <darin@apple.com>
1073
1074         Reviewed by Sam.
1075
1076         - fix mistakes Sam noticed in my re-speed-up patch
1077
1078         * dom/Element.cpp:
1079         (WebCore::Element::virtualHasTagName): Moved out of header file. No reason to make
1080         this inline.
1081         * dom/Element.h: Moved virtualHasTagName out of header file.
1082
1083         * dom/Node.cpp:
1084         (WebCore::Node::virtualHasTagName): Moved out of header file. No reason to make
1085         this inline.
1086         * dom/Node.h: Removed incorrect "virtual" on hasTagName and moved virtualHasTagName
1087         out of header file.
1088
1089         * platform/text/StringBuffer.h: Added. Has just the new StringBuffer class.
1090
1091         * platform/text/StringImpl.h: Removed StringBuffer class.
1092
1093         * loader/DocumentLoader.cpp: Added StringBuffer.h include.
1094         * platform/text/String.cpp: Ditto.
1095         * platform/text/StringImpl.cpp: Ditto.
1096         * platform/text/TextCodecLatin1.cpp: Ditto.
1097         * platform/text/TextCodecUTF16.cpp: Ditto.
1098         * platform/text/TextCodecUserDefined.cpp: Ditto.
1099
1100         * WebCore.vcproj/WebCore.vcproj: Added StringBuffer.h.
1101         * WebCore.xcodeproj/project.pbxproj: Ditto.
1102
1103 2008-01-14  Dave Hyatt  <hyatt@apple.com>
1104
1105         Clean up all the misplaced graphics files after the recent file moves.  Clean up the project to
1106         accurately reflect the location of all the graphics files.
1107         
1108         Reviewed by Adam
1109
1110         * WebCore.vcproj/WebCore.vcproj:
1111         * platform/graphics/win/GraphicsContextWin.cpp: Copied from platform/win/GraphicsContextWin.cpp.
1112         * platform/graphics/win/UniscribeController.cpp: Copied from platform/win/UniscribeController.cpp.
1113         * platform/graphics/win/UniscribeController.h: Copied from platform/win/UniscribeController.h.
1114         * platform/win/GraphicsContextWin.cpp: Removed.
1115         * platform/win/UniscribeController.cpp: Removed.
1116         * platform/win/UniscribeController.h: Removed.
1117
1118 2008-01-14  Geoffrey Garen  <ggaren@apple.com>
1119
1120         Reviewed by Sam Weinig.
1121         
1122         Some cleanup to my last patch.
1123
1124         Removed one unused setter declaration and one unused setter definition.
1125         
1126         Renamed DoNotCheckDomainSecurityOnRead to DoNotCheckDomainSecurityOnGet
1127         because "get" is all over the IDL files, and "read" is not.
1128
1129         * bindings/scripts/CodeGeneratorJS.pm:
1130         * page/DOMWindow.h:
1131         (WebCore::DOMWindow::defaultstatus):
1132         * page/DOMWindow.idl:
1133
1134 2008-01-14  Dan Bernstein  <mitz@apple.com>
1135
1136         Rubber-stamped by Alice Liu.
1137
1138         - remove reference to nonexistent file
1139
1140         * WebCore.vcproj/WebCore.vcproj: Removed reference to SVGFont.h.
1141
1142 2008-01-14  Darin Adler  <darin@apple.com>
1143
1144         Reviewed by Adam.
1145
1146         - re-speed-up the page load test (my StringImpl change slowed it down)
1147           <rdar://problem/5677241> 1.5% PLT regression from r29098
1148
1149         To reverse the slowdown I caused by changing StringImpl, I tightened it up,
1150         and also did a little optimization in the HTML tokenizer and in other clients
1151         of Vector.
1152
1153         * WebCore.base.exp: Removed export of a now-inline function.
1154
1155         * css/CSSParser.cpp:
1156         (WebCore::CSSParser::parseTransitionProperty): Removed use of DeprecatedString
1157         to get property ID. This could be sped up even more by writing a fast path
1158         to use a local Vector<char> rather than allocating a string.
1159         (WebCore::convertASCIIToFloat): Added. Allows numeric conversion without
1160         allocating a string object to hold the number.
1161         (WebCore::CSSParser::lex): Changed to call convertASCIIToFloat instead of
1162         DeprecatedString::toFloat.
1163
1164         * dom/Element.h:
1165         (WebCore::Element::hasTagName): Made this non-virtual and inline if you have
1166         an Element*. It's still virtual if you have a Node*.
1167         (WebCore::Element::virtualHasTagName): Virtual version that makes the Node*
1168         case work.
1169
1170         * dom/Node.h:
1171         (WebCore::Node::hasTagName): Made this non-virtual and inline so that Element
1172         can override it with an inline. This is the same technique we use for
1173         firstChild and lastChild.
1174         (WebCore::Node::virtualHasTagName): This is the private virtual that Element
1175         overrides.
1176
1177         * dom/Text.cpp:
1178         (WebCore::Text::splitText): Clean up by using a RefPtr here instead of a
1179         PassRefPtr.
1180
1181         * html/HTMLTokenizer.cpp:
1182         (WebCore::HTMLTokenizer::parseSpecial): Use the new advancePastNonNewline(),
1183         which is more efficient in cases where we know the character is not a newline
1184         and hence we don't have to update the line number.
1185         (WebCore::HTMLTokenizer::parseComment): Ditto.
1186         (WebCore::HTMLTokenizer::parseServer): Ditto.
1187         (WebCore::HTMLTokenizer::parseProcessingInstruction): Ditto.
1188         (WebCore::HTMLTokenizer::parseText): Ditto.
1189         (WebCore::HTMLTokenizer::parseEntity): Ditto.
1190         (WebCore::HTMLTokenizer::parseTag): Ditto. Also streamline the QuotedValue case
1191         so there's one less branch taken for non-punctuation characters since this
1192         code path is *so* hot.
1193         (WebCore::HTMLTokenizer::write): More of the same.
1194
1195         * loader/Cache.cpp:
1196         (WebCore::Cache::lruListFor): Use Vector::grow instead of resize.
1197
1198         * loader/DocumentLoader.cpp:
1199         (WebCore::canonicalizedTitle): Use StringBuffer instead of Vector<UChar>.
1200
1201         * loader/TextResourceDecoder.cpp:
1202         (WebCore::TextResourceDecoder::checkForCSSCharset): Use Vector::grow instead of resize.
1203         (WebCore::TextResourceDecoder::checkForHeadCharset): Ditto.
1204         (WebCore::TextResourceDecoder::decode): Use Vector::grow and shrink instead of resize.
1205         (WebCore::TextResourceDecoder::flush): Use Vector::shrink instead of resize.
1206
1207         * platform/KURL.cpp:
1208         (WebCore::KURL::decode_string): Use Vector::grow instead of resize.
1209
1210         * platform/SharedBuffer.cpp:
1211         (WebCore::SharedBuffer::clear): Use Vector::shrink instead of resize.
1212
1213         * platform/graphics/BitmapImage.cpp:
1214         (WebCore::BitmapImage::cacheFrame): Use Vector::grow instead of resize.
1215
1216         * platform/network/FormData.cpp:
1217         (WebCore::FormData::appendData): Use Vector::grow instead of resize.
1218         (WebCore::FormData::flatten): Ditto.
1219
1220         * platform/text/AtomicString.cpp:
1221         (WebCore::CStringTranslator::translate): Use a new StringImpl constructor made just
1222         for use by AtomicString. Avoids setting fields twice, and also preserves reference
1223         count behavior (which I changed for the other constructors, since they're entirely
1224         private and used only inside the class).
1225         (WebCore::UCharBufferTranslator::translate): Ditto.
1226
1227         * platform/text/Base64.cpp:
1228         (WebCore::base64Encode): Use Vector::grow instead of resize.
1229         (WebCore::base64Decode): Use Vector::grow and shrink instead of resize.
1230
1231         * platform/text/PlatformString.h:
1232         (WebCore::String::adopt): Added an overload for the new StringBuffer class. Also
1233         made both versions inline.
1234
1235         * platform/text/SegmentedString.h:
1236         (WebCore::SegmentedString::advancePastNewline): Added. One less branch for case
1237         where the character is known to be a newline.
1238         (WebCore::SegmentedString::advancePastNonNewline): Added. Less code for case where
1239         the character is known not to be a newline.
1240
1241         * platform/text/String.cpp:
1242         (WebCore::String::append): Use StringBuffer instead of Vector<UChar>.
1243         (WebCore::String::insert): Ditto.
1244         (WebCore::String::truncate): Ditto.
1245         (WebCore::String::remove): Ditto.
1246         (WebCore::String::format): Use Vector::grow instead of resize.
1247
1248         * platform/text/StringImpl.cpp:
1249         (WebCore::StringImpl::StringImpl): Changed constructors to start with a refCount
1250         of 1 instead of 0, and made them all inline. Eliminates the WithOneRef constructor
1251         since they all behave this way now. The only exceptions are the constructors for
1252         AtomicString, which retain the old behavior.
1253         (WebCore::StringImpl::empty): Simplified, since we no longer need to use the
1254         special WithOneRef constructor.
1255         (WebCore::StringImpl::toCoordsArray): Use StringBuffer instead of Vector<UChar>.
1256         (WebCore::StringImpl::lower): Ditto.
1257         (WebCore::StringImpl::upper): Ditto.
1258         (WebCore::StringImpl::secure): Ditto.
1259         (WebCore::StringImpl::foldCase): Ditto.
1260         (WebCore::StringImpl::simplifyWhiteSpace): Ditto. Also change to use Vector::shrink
1261         instead of resize (since half of the function uses Vector<UChar>).
1262         (WebCore::StringImpl::capitalize): Use StringBuffer instead of Vector<UChar>.
1263         (WebCore::StringImpl::replace): Ditto.
1264         (WebCore::StringImpl::ascii): Streamlined a bit.
1265         (WebCore::StringImpl::createStrippingNullCharacters): Use StringBuffer insetad of
1266         Vector<UChar>. Took out checks for null characters and 0 length that aren't needed.
1267         Coded the check for null characters in a slightly more efficient way. Since this
1268         is so hot, didn't call adopt at all, putting the code right in here, including
1269         the call to the StringImpl constructor and adoptRef (for the fast case).
1270         (WebCore::StringImpl::adopt): Added a version for the new StringBuffer class.
1271         Removed the attempt to resize the buffer at the time we adopt based on measuring
1272         actual use and realizing that it's just a character here or there and not worth
1273         a call to fastRealloc. Changed to use adoptRef since the constructor now starts
1274         with a refCount of 1.
1275         (WebCore::StringImpl::create): Changed to use adoptRef since the constructor now
1276         starts with a refCount of 1.
1277         (WebCore::StringImpl::createWithTerminatingNullCharacter): Ditto.
1278         (WebCore::StringImpl::copy): Ditto. Also made non-inline since the constructor
1279         itself is now inline.
1280
1281         * platform/text/StringImpl.h: Added a StringBuffer class that's useful for
1282         putting characters into a buffer before creating an immutable string. Not good
1283         at resizing the way Vector<UChar> is, so only useful for things that rarely need
1284         to be resized. Added a new AdoptBuffer constructor and empty constructor, but
1285         made all constructors private so they can be inlined and only used inside the
1286         StringImpl class. Added two new constructors for AtomicString. Made copy()
1287         no longer inline. Changed the type of the [] operator to unsigned instead of
1288         int and added an assertion. Made the hash functions inline.
1289
1290         * platform/text/TextCodecICU.cpp:
1291         (WebCore::TextCodecICU::encode): Use Vector::grow instead of resize.
1292
1293         * platform/text/TextCodecLatin1.cpp:
1294         (WebCore::TextCodecLatin1::decode): Use StringBuffer instead of Vector<UChar>.
1295         (WebCore::encodeComplexWindowsLatin1): Use Vector::grow instead of resize.
1296
1297         * platform/text/TextCodecUTF16.cpp:
1298         (WebCore::TextCodecUTF16::decode): Use StringBuffer instead of Vector<UChar>.
1299
1300         * platform/text/TextCodecUserDefined.cpp:
1301         (WebCore::TextCodecUserDefined::decode): Use StringBuffer instead of Vector<UChar>.
1302         (WebCore::encodeComplexUserDefined): Use Vector::grow instead of resize.
1303
1304         * platform/text/TextEncoding.cpp:
1305         (WebCore::TextEncoding::encode): Use Vector::grow instead of resize.
1306
1307         * platform/text/TextStream.cpp:
1308         (WebCore::TextStream::operator<<): Use Vector::grow instead of resize.
1309
1310         * platform/text/mac/TextCodecMac.cpp:
1311         (WebCore::TextCodecMac::encode): Use Vector::grow instead of resize.
1312
1313         * rendering/AutoTableLayout.cpp:
1314         (WebCore::AutoTableLayout::insertSpanCell): Use Vector::grow instead of resize.
1315
1316         * rendering/RenderFrameSet.h:
1317         (WebCore::FrameEdgeInfo::FrameEdgeInfo): Allocate vectors with the correct initial
1318         size instead of calling resize on them after allocating empty.
1319
1320         * rendering/RenderListMarker.cpp:
1321         (WebCore::RenderListMarker::paint): Use Vector::grow instead of resize.
1322
1323         * rendering/RenderStyle.cpp: Removed CursorList::operator==.
1324         * rendering/RenderStyle.h:
1325         (WebCore::CursorList::operator==): Implemented using the Vector ==.
1326         (WebCore::CursorList::operator!=): Ditto.
1327
1328         * rendering/RenderTable.cpp:
1329         (WebCore::RenderTable::splitColumn): Use Vector::grow instead of resize.
1330         (WebCore::RenderTable::appendColumn): Ditto.
1331
1332         * rendering/RenderTableSection.cpp:
1333         (WebCore::RenderTableSection::ensureRows): Use Vector::grow instead of resize.
1334
1335         * rendering/bidi.cpp:
1336         (WebCore::addMidpoint): Use Vector::grow instead of resize.
1337
1338         * xml/XPathNodeSet.h:
1339         (WebCore::XPath::NodeSet::clear): Use Vector::shrink instead of resize.
1340
1341 2008-01-13  Steve Falkenburg  <sfalken@apple.com>
1342
1343         Share common files across projects.
1344         
1345         Unify vsprops files
1346         Debug:          common.vsprops, debug.vsprops
1347         Debug_Internal: common.vsprops, debug.vsprops, debug_internal.vsprops
1348         Release:        common.vsprops, release.vsprops
1349         
1350         Shared properties can go into common.vsprops, shared debug settings can go into debug.vsprops.
1351         debug_internal.vsprops will be mostly empty except for file path prefix modifiers.
1352
1353         Pull auto-version.sh, VERSION, and PRODUCTVERSION from tools.
1354
1355         Reviewed by Adam Roben.
1356
1357         * WebCore.vcproj/PRODUCTVERSION: Removed.
1358         * WebCore.vcproj/QTMovieWin.vcproj:
1359         * WebCore.vcproj/VERSION: Removed.
1360         * WebCore.vcproj/WebCore.vcproj:
1361         * WebCore.vcproj/auto-version.sh: Removed.
1362         * WebCore.vcproj/debug.vsprops: Removed.
1363         * WebCore.vcproj/debug_internal.vsprops: Removed.
1364         * WebCore.vcproj/release.vsprops: Removed.
1365
1366 2008-01-13  Dan Bernstein  <mitz@apple.com>
1367
1368         Reviewed by Darin Adler.
1369
1370         - fix http://bugs.webkit.org/show_bug.cgi?id=16865
1371           fast/layers/resize-layer-deletion-crash.html crashes under GuardMalloc
1372
1373         * rendering/RenderBox.cpp:
1374         (WebCore::RenderBox::destroy): Removed the call to
1375         RenderLayer::destroy() from here, because ~RenderLayer() calls
1376         RenderObject() methods.
1377         * rendering/RenderObject.cpp:
1378         (WebCore::RenderObject::destroy): Added the call to
1379         RenderLayer::destroy() here.
1380
1381 2008-01-13  Eric Seidel  <eric@webkit.org>
1382
1383         Reviewed by darin.
1384
1385         Range.insertNode does not update endContainer endIndex correctly
1386         in the case where it had to split a text node.
1387         http://bugs.webkit.org/show_bug.cgi?id=16765
1388         
1389         Darin pointed out during review that we still don't handle the dynamic
1390         range case (where the dom tree changes not using range methods)
1391         Thus this code will get ripped out when we add that.  The test cases
1392         are still valid and useful however, so I'm landing this as-is.
1393
1394         Tests: fast/dom/Range/range-insertNode-separate-endContainer.html
1395                fast/dom/Range/range-insertNode-splittext.html
1396
1397         * dom/Range.cpp:
1398         (WebCore::Range::insertNode): handle the splitText case correctly.
1399
1400 2008-01-13  Darin Adler  <darin@apple.com>
1401
1402         Reviewed by Eric.
1403
1404         - http://bugs.webkit.org/show_bug.cgi?id=16861
1405           get rid of unnecessary string copying
1406
1407         * dom/Document.cpp:
1408         (WebCore::Document::setDomain): Removed unneeded call to copy.
1409         (WebCore::Document::parseQualifiedName): Removed unneeded call to copy, and
1410         unneeded length argument to substring, which stops at the end of the string
1411         if you don't specify a length.
1412         (WebCore::Document::createAttributeNS): Replaced code that was calling copy
1413         with more-efficient code using the substring function.
1414         * dom/StyledElement.cpp:
1415         (WebCore::StyledElement::addCSSColor): Removed unneeded call to copy.
1416         * editing/InsertIntoTextNodeCommand.cpp:
1417         (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand): Removed
1418         unneeded copy and also initialized text instead of assigning to it.
1419         (WebCore::InsertIntoTextNodeCommand::doApply): Removed redundant assertions.
1420         (WebCore::InsertIntoTextNodeCommand::doUnapply): Ditto.
1421
1422         * editing/htmlediting.cpp:
1423         (WebCore::stringWithRebalancedWhitespace): Removed unneeded call to copy.
1424         This one was particularly bad since we just turned around and copied it again!
1425
1426         * editing/markup.cpp:
1427         (WebCore::stringValueForRange): Removed unneeded call to copy.
1428
1429         * loader/icon/IconDatabase.cpp:
1430         (WebCore::IconDatabase::performOpenInitialization): Changed logging code to not
1431         get the path from the database object. This was the only reason the database
1432         had to keep its path around.
1433
1434         * platform/sql/SQLiteDatabase.cpp:
1435         (WebCore::SQLiteDatabase::open): Use a local variable instead of a data member to
1436         convert the string to a null-terminated one.
1437         (WebCore::SQLiteDatabase::close): Removed the code to clear out m_path.
1438         * platform/sql/SQLiteDatabase.h: Removed the m_path data member and the path
1439         functio member. Also tweaked formatting and comments a bit. Removed the unused
1440         escapeSQLString function.
1441
1442         * platform/text/String.cpp: (WebCore::operator+): Removed uneeded calls to copy.
1443
1444 2008-01-13  Oliver Hunt  <oliver@apple.com>
1445
1446         Attempt to fix QT build
1447
1448         * html/CanvasRenderingContext2D.cpp:
1449         (WebCore::CanvasRenderingContext2D::willDraw):
1450
1451 2008-01-13  Oliver Hunt  <oliver@apple.com>
1452
1453         Reviewed by Mark Rowe.
1454
1455         Avoid repainting the entire canvas element when possible.
1456
1457         http://bugs.webkit.org/show_bug.cgi?id=16859
1458
1459         We now only register the dirty regions of a canvas for repainting, rather
1460         than the entire element (though repaint coalescing may choose to combine
1461         these regions).  This doesn't cause a measurable regression in the worst
1462         case (clearing the canvas repeatedly), but is a moderate-large win if only
1463         a minor update has occurred.  If there is any CSS scaling applied to the
1464         canvas almost any update short of clearing the entire element is substantially
1465         faster.
1466
1467         * html/CanvasRenderingContext2D.cpp:
1468         (WebCore::CanvasRenderingContext2D::willDraw):
1469         * html/HTMLCanvasElement.cpp:
1470         (WebCore::HTMLCanvasElement::willDraw):
1471
1472 2008-01-13  Michael Goddard  <michael.goddard@trolltech.com>
1473
1474         Reviewed by Anders Carlsson.
1475
1476         Move RuntimeObjectImp creations into Instance.
1477         Make the ctor protected, and Instance a friend class, so
1478         that all creation of RuntimeObjectImps goes through
1479         one place.
1480
1481         * bindings/js/kjs_dom.cpp:
1482         (WebCore::getRuntimeObject):
1483
1484 2008-01-12  Rodney Dawes  <dobey@wayofthemonkey.com>
1485
1486         Gtk debug build fix.  Reviewed by Mark Rowe.
1487
1488         Add plugin logging channel, and use it rather than Win32-specific debugging methods _RPTF1 _RPTF2 and _CRT_WARN.
1489
1490         * WebCore.pro: Add plugins directory to DEPENDPATH so dependencies are correctly tracked.
1491         * platform/Logging.cpp:
1492         * platform/Logging.h:
1493         * plugins/PluginDebug.h:
1494
1495 2008-01-12  Adam Barth  <hk9565@gmail.com>
1496
1497         Reviewed by Maciej (and also tweaked a little bit).
1498
1499         - more thorough fix for some crashing tests
1500           http://bugs.webkit.org/show_bug.cgi?id=16782
1501
1502         * loader/FrameLoader.cpp:
1503         (WebCore::FrameLoader::urlSelected):
1504         (WebCore::FrameLoader::submitForm):
1505         (WebCore::FrameLoader::executeIfJavaScriptURL):
1506         * loader/FrameLoader.h:
1507
1508 2008-01-12  Maciej Stachowiak  <mjs@apple.com>
1509
1510         Reviewed by Sam.
1511
1512         - fixed <rdar://problem/5556374> REGRESSION: cross-domain error when one URL uses an explicit port number and another doesn't
1513         
1514         * platform/SecurityOrigin.cpp:
1515         (WebCore::isDefaultPortForProtocol):
1516         (WebCore::SecurityOrigin::SecurityOrigin):
1517
1518 2008-01-11  Geoffrey Garen  <ggaren@apple.com>
1519
1520         Reviewed by Oliver Hunt.
1521         
1522         Fixed <rdar://problem/5665251> REGRESSION (r28880-r28886): Global
1523         variable access (16644)
1524         
1525         Removed the ReadOnly bit from some properties, to match Firefox. Also
1526         removed status-related setters, to allow using their names as variable
1527         names.
1528         
1529         * bindings/scripts/CodeGeneratorJS.pm: Added support for properties that
1530         are one-way across domain boundaries, to match Firefox.
1531
1532         * bindings/js/kjs_window.cpp: Changed ReadOnly declarations to match FF.
1533
1534         * bindings/scripts/CodeGeneratorJS.pm: Don't use JSObject:: because
1535         we don't know that JSObject is our base class.
1536
1537         * page/DOMWindow.idl: Replaced lots of readonly declarations with
1538         [Replaceable] declarations.
1539
1540         * page/DOMWindow.h: Removed interfaces for setting status text via the
1541         DOM. (They were getting in the way of, e.g., "var status"
1542         declarations.) By default, IE 7 and FF disable these interfaces in order
1543         to defend against phishing attacks that try to spoof domain names in the
1544         statusbar.
1545         * page/DOMWindow.cpp:
1546
1547 2008-01-11  Anyang Ren  <anyang.ren@gmail.com>
1548
1549         Reviewed by Darin Adler.
1550
1551         http://bugs.webkit.org/show_bug.cgi?id=15960
1552         The view source mode should skip an empty attribute value only if
1553         the attribute name is not followed by an equal sign (=).
1554
1555         Test: fast/frames/viewsource-empty-attribute-value.html
1556
1557         * html/HTMLViewSourceDocument.cpp:
1558         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
1559
1560 2008-01-11  Sylvain Pasche  <sylvain.pasche@gmail.com>
1561
1562         Reviewed by Alp Toker.
1563
1564         [Gtk] Uneven glyph spacing with subpixel antialiasing
1565         http://bugs.webkit.org/show_bug.cgi?id=16715
1566
1567         Use cairo font options from the default GDK screen when creating a
1568         scaled font.
1569
1570         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
1571         (WebCore::FontPlatformData::FontPlatformData):
1572
1573 2008-01-11  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
1574
1575         Reviewed by Maciej.
1576
1577         Added a new forwarding header, because Activation.h has been separated
1578         from function.h
1579
1580         * ForwardingHeaders/kjs/Activation.h: Added.
1581
1582 2008-01-11  Luca Bruno  <lethalman88@gmail.com>
1583
1584         Reviewed by Alp Toker.
1585
1586         http://bugs.webkit.org/show_bug.cgi?id=16729
1587         [cURL] Allow multiple files for upload
1588
1589         * platform/network/ResourceHandleInternal.h:
1590         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1591         * platform/network/curl/ResourceHandleCurl.cpp:
1592         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
1593         * platform/network/curl/ResourceHandleManager.cpp:
1594         (WebCore::readCallback): added
1595         (WebCore::ResourceHandleManager::setupPOST): setup for streaming the POST
1596         (WebCore::ResourceHandleManager::startJob):
1597         (WebCore::ResourceHandleManager::cancel): revert the previous patch for regression
1598         * platform/network/curl/ResourceHandleManager.h:
1599
1600 2008-01-11  Christian Dywan  <christian@imendio.com>
1601
1602         Reviewed by Alp Toker.
1603
1604         [Gtk] Menu items need underscores
1605         http://bugs.webkit.org/show_bug.cgi?id=16817
1606
1607         Add underscores to appropriate menu labels.
1608         Also adjust strings slightly.
1609
1610         * platform/gtk/ContextMenuItemGtk.cpp:
1611         (WebCore::ContextMenuItem::createNativeMenuItem):
1612         * platform/gtk/LocalizedStringsGtk.cpp:
1613         (WebCore::searchableIndexIntroduction):
1614         (WebCore::fileButtonChooseFileLabel):
1615         (WebCore::fileButtonNoFileSelectedLabel):
1616         (WebCore::contextMenuItemTagOpenLinkInNewWindow):
1617         (WebCore::contextMenuItemTagDownloadLinkToDisk):
1618         (WebCore::contextMenuItemTagCopyLinkToClipboard):
1619         (WebCore::contextMenuItemTagOpenImageInNewWindow):
1620         (WebCore::contextMenuItemTagDownloadImageToDisk):
1621         (WebCore::contextMenuItemTagCopyImageToClipboard):
1622         (WebCore::contextMenuItemTagOpenFrameInNewWindow):
1623         (WebCore::contextMenuItemTagCopy):
1624         (WebCore::contextMenuItemTagGoBack):
1625         (WebCore::contextMenuItemTagGoForward):
1626         (WebCore::contextMenuItemTagStop):
1627         (WebCore::contextMenuItemTagReload):
1628         (WebCore::contextMenuItemTagCut):
1629         (WebCore::contextMenuItemTagPaste):
1630         (WebCore::contextMenuItemTagIgnoreSpelling):
1631         (WebCore::contextMenuItemTagLearnSpelling):
1632         (WebCore::contextMenuItemTagSearchWeb):
1633         (WebCore::contextMenuItemTagLookUpInDictionary):
1634         (WebCore::contextMenuItemTagOpenLink):
1635         (WebCore::contextMenuItemTagIgnoreGrammar):
1636         (WebCore::contextMenuItemTagSpellingMenu):
1637         (WebCore::contextMenuItemTagShowSpellingPanel):
1638         (WebCore::contextMenuItemTagCheckSpelling):
1639         (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
1640         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
1641         (WebCore::contextMenuItemTagFontMenu):
1642         (WebCore::contextMenuItemTagBold):
1643         (WebCore::contextMenuItemTagItalic):
1644         (WebCore::contextMenuItemTagUnderline):
1645         (WebCore::contextMenuItemTagOutline):
1646         (WebCore::contextMenuItemTagWritingDirectionMenu):
1647         (WebCore::contextMenuItemTagDefaultDirection):
1648         (WebCore::contextMenuItemTagLeftToRight):
1649         (WebCore::contextMenuItemTagRightToLeft):
1650         (WebCore::contextMenuItemTagInspectElement):
1651         (WebCore::searchMenuClearRecentSearchesText):
1652
1653 2008-01-11  Ada Chan  <adachan@apple.com>
1654
1655         <rdar://problem/5681557> On Windows Safari, mouse events are ignored after clicking on link that triggers download
1656         Moved the call to cache page from provisionalLoadStarted() to commitProvisionalLoad(), since 
1657         provisionalLoadStarted() can be called for cases that do not result in a page navigation, for example,
1658         when a link to download a file has been clicked.
1659
1660         Reviewed by John and Anders.
1661
1662         * loader/FrameLoader.cpp:
1663         (WebCore::FrameLoader::provisionalLoadStarted):
1664         (WebCore::FrameLoader::commitProvisionalLoad):
1665
1666 2008-01-11  Jon Honeycutt  <jhoneycutt@apple.com>
1667
1668         Reviewed by Anders.
1669
1670         <rdar://problem/5683529> plugins/embed-inside-object.html is timing
1671         out/failing
1672
1673         Revert to using FrameTree::find() so that frame aliases like "_self" and
1674         "_current" are interpreted properly
1675
1676         * plugins/win/PluginViewWin.cpp:
1677         (WebCore::PluginViewWin::performRequest):
1678         (WebCore::PluginViewWin::load):
1679
1680 2008-01-11  Alp Toker  <alp@atoker.com>
1681
1682         Reviewed by Dave Hyatt and Mark Rowe.
1683
1684         http://bugs.webkit.org/show_bug.cgi?id=16089
1685         [GTK] Support custom fonts, CachedFont::platformDataFromCustomData()
1686
1687         Add support for CSS2 @font-face custom/downloadable fonts to the GTK+
1688         port.
1689
1690         * GNUmakefile.am:
1691         * WebCore.pro:
1692         * loader/CachedFont.cpp:
1693         (WebCore::CachedFont::~CachedFont):
1694         (WebCore::CachedFont::ensureCustomFontData):
1695         (WebCore::CachedFont::platformDataFromCustomData):
1696         (WebCore::CachedFont::allReferencesRemoved):
1697         * platform/graphics/gtk/FontCustomPlatformData.cpp: Added.
1698         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
1699         (WebCore::FontCustomPlatformData::fontPlatformData):
1700         (WebCore::releaseData):
1701         (WebCore::createFontCustomPlatformData):
1702         * platform/graphics/gtk/FontCustomPlatformData.h: Added.
1703         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
1704         * platform/graphics/gtk/FontPlatformData.h:
1705         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
1706         (WebCore::FontPlatformData::FontPlatformData):
1707         (WebCore::FontPlatformData::init):
1708         (WebCore::FontPlatformData::isFixedPitch):
1709         * platform/graphics/gtk/SimpleFontDataGtk.cpp:
1710         (WebCore::SimpleFontData::platformDestroy):
1711
1712 2008-01-11  Adam Roben  <aroben@apple.com>
1713
1714         Remove FrameLoader::committedFirstRealDocumentLoad
1715         
1716         This method no longer has any callers.
1717
1718         Reviewed by Hyatt.
1719
1720         * loader/FrameLoader.h:
1721
1722 2008-01-11  Antti Koivisto  <antti@apple.com>
1723
1724         Add a standalone version of the blog post video player as a manual test.
1725
1726         * manual-tests/resources/touch-poster.png: Added.
1727         * manual-tests/video-player.html: Added.
1728
1729 2008-01-10  Antti Koivisto  <antti@apple.com>
1730
1731         Reviewed by Adam.
1732
1733         Fix <rdar://problem/5682767>
1734         Video does not show up in http://webkit.org/blog/140/html5-media-support/ on Windows
1735         
1736         Take care that GWorld is created and deletes when needed as size or visibility changes.
1737
1738         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
1739         (WebCore::MediaPlayerPrivate::load):
1740         * platform/graphics/win/QTMovieWin.cpp:
1741         (QTMovieWinPrivate::QTMovieWinPrivate):
1742         (QTMovieWinPrivate::updateGWorld):
1743         (QTMovieWinPrivate::setSize):
1744         (QTMovieWin::setVisible):
1745         (QTMovieWin::initializeQuickTime):
1746
1747 2008-01-11  David Hyatt  <hyatt@apple.com>
1748
1749         Fix for bug 11188, setting hspace on a table overrides align=center.  Fix align=center to be done using
1750         mapped attributes so that it does not get overridden by hspace all the time.
1751
1752         Reviewed by mitz
1753
1754         Added fast/table/table-hspace-align-center.html
1755
1756         * css/html4.css:
1757         * html/HTMLTableElement.cpp:
1758         (WebCore::HTMLTableElement::parseMappedAttribute):
1759
1760 2008-01-11  Mark Rowe  <mrowe@apple.com>
1761
1762         Qt build fix.
1763
1764         * platform/qt/TemporaryLinkStubs.cpp: Include CString.h.
1765
1766 2008-01-11  Mark Rowe  <mrowe@apple.com>
1767
1768         Qt build fix.  Add link stubs for the new FileSystem.h functions introduced
1769         in r29399.
1770
1771         * platform/qt/TemporaryLinkStubs.cpp:
1772         (WebCore::openTemporaryFile):
1773
1774 2008-01-11  Rodney Dawes  <dobey@wayofthemonkey.com>
1775
1776         Reviewed by Anders Carlsson.
1777
1778         Bug 16779: Make the PluginStream implementation be shared across platforms
1779         http://bugs.webkit.org/show_bug.cgi?id=16779
1780
1781         Add the new shared PluginStream files to the GTK+ and Win32 builds.
1782         Add PluginStreamClient class for the streamDidFinishLoading method.
1783         Add open/close/write methods to FileSystem for temporary file handling.
1784         Add PluginDebug.h and npfunctions.h for shared PluginStream.
1785         Add shared PluginStream.
1786         Remove PluginStreamWin.
1787         Update PluginViewWin to use shared PluginStream and PluginStreamClass.
1788
1789         * GNUmakefile.am:
1790         * WebCore.pro:
1791         * WebCore.vcproj/WebCore.vcproj:
1792         * platform/FileSystem.h:
1793         * platform/gtk/FileSystemGtk.cpp:
1794         * platform/win/FileSystemWin.cpp:
1795         * plugins/PluginDebug.h:
1796         * plugins/PluginStream.cpp:
1797         * plugins/PluginStream.h:
1798         * plugins/npfunctions.h:
1799         * plugins/win/PluginDebug: Moved to PluginDebug.h.
1800         * plugins/win/PluginStreamWin.cpp: Moved to PluginStream.cpp.
1801         * plugins/win/PluginStreamWin.h: Moved to PluginStream.h
1802         * plugins/win/PluginViewWin.cpp:
1803         * plugins/win/PluginViewWin.h:
1804         * plugins/win/npfunctions.h: Moved to npfunctions.h
1805
1806 2008-01-11  Geoffrey Garen  <ggaren@apple.com>
1807
1808         Try to fix Mac build: Edit the right .exp file.
1809
1810         * WebCore.base.exp:
1811
1812 2008-01-11  Geoffrey Garen  <ggaren@apple.com>
1813
1814         Try to fix Qt build: don't use pthreads if they're not available.
1815
1816         * bindings/js/GCController.cpp:
1817
1818 2008-01-10  Geoffrey Garen  <ggaren@apple.com>
1819
1820         Reviewed by John Sullivan.
1821
1822         Fixed some world leak reports:
1823         * <rdar://problem/5669436> PLT complains about world leak of 1 JavaScript
1824         Interpreter after running cvs-base suite
1825
1826         * <rdar://problem/5669423> PLT complains about world leak if browser
1827         window is open when PLT starts
1828         
1829         These were both bugs in the reporting mechanism, so I took the
1830         opportunity to do some house cleaning there.
1831
1832         Stupid class, I kill you:
1833         * bridge/JavaScriptStatistics.cpp: Removed.
1834         * bridge/JavaScriptStatistics.h: Removed.
1835
1836         * bindings/js/GCController.h: Adopted the only useful features of
1837         JavaScriptStatistics, since they were GC-related.
1838         * bindings/js/GCController.cpp:
1839
1840 2008-01-10  Eric Seidel  <eric@webkit.org>
1841
1842         Reviewed by Adele.
1843
1844         No functional changes, only code cleanup.
1845
1846         * css/MediaQueryEvaluator.cpp:
1847         (WebCore::compareValue): renamed from cmpvalue
1848         (WebCore::colorMediaFeatureEval):
1849         (WebCore::device_aspect_ratioMediaFeatureEval):
1850         (WebCore::device_pixel_ratioMediaFeatureEval):
1851         (WebCore::gridMediaFeatureEval):
1852         (WebCore::device_heightMediaFeatureEval):
1853         (WebCore::device_widthMediaFeatureEval):
1854         (WebCore::heightMediaFeatureEval):
1855         (WebCore::widthMediaFeatureEval):
1856
1857 2008-01-10  Dan Bernstein  <mitz@apple.com>
1858
1859         Reviewed by Anders Carlsson.
1860
1861         - fix a crash when calling alert() from a repeating timer
1862
1863         On non-Mac platforms, the PageGroupLoadDeferrer pauses DOM timers during
1864         alert() and other similar functions, which deletes the actual
1865         DOMWindowTimer objects and replaces them with new objects when resuming.
1866
1867         * bindings/js/kjs_window.cpp:
1868         (KJS::Window::timerFired): Re-fetch the timer object from the map in
1869         case it has been deleted or replaced.
1870
1871 2008-01-10  Maciej Stachowiak  <mjs@apple.com>
1872
1873         Reviewed by Sam.
1874
1875         - remove SecurityOriginData and fold its functionality into SecurityOrigin
1876
1877         * GNUmakefile.am:
1878         * WebCore.base.exp:
1879         * WebCore.pro:
1880         * WebCore.vcproj/WebCore.vcproj:
1881         * WebCore.xcodeproj/project.pbxproj:
1882         * WebCoreSources.bkl:
1883         * bindings/js/JSDOMWindowCustom.cpp:
1884         (WebCore::JSDOMWindow::postMessage):
1885         * dom/Document.cpp:
1886         (WebCore::Document::domain):
1887         * page/Chrome.cpp:
1888         (WebCore::Chrome::requestQuotaIncreaseForNewDatabase):
1889         (WebCore::Chrome::requestQuotaIncreaseForDatabaseOperation):
1890         * page/Chrome.h:
1891         * page/ChromeClient.h:
1892         * platform/SecurityOrigin.cpp:
1893         (WebCore::SecurityOrigin::copy):
1894         (WebCore::SecurityOrigin::createFromIdentifier):
1895         (WebCore::SecurityOrigin::stringIdentifier):
1896         * platform/SecurityOrigin.h:
1897         (WebCore::SecurityOrigin::host):
1898         (WebCore::SecurityOrigin::protocol):
1899         (WebCore::SecurityOrigin::port):
1900         (WebCore::SecurityOrigin::equal):
1901         * platform/SecurityOriginData.cpp: Removed.
1902         * platform/SecurityOriginData.h: Removed.
1903         * storage/Database.cpp:
1904         (WebCore::Database::openDatabase):
1905         (WebCore::Database::Database):
1906         (WebCore::Database::securityOriginCopy):
1907         * storage/Database.h:
1908         * storage/DatabaseTracker.cpp:
1909         (WebCore::SecurityOriginHash::hash):
1910         (WebCore::SecurityOriginHash::equal):
1911         (WebCore::SecurityOriginTraits::deletedValue):
1912         (WebCore::SecurityOriginTraits::emptyValue):
1913         (WebCore::DatabaseTracker::canEstablishDatabase):
1914         (WebCore::DatabaseTracker::hasEntryForOrigin):
1915         (WebCore::DatabaseTracker::hasEntryForDatabase):
1916         (WebCore::DatabaseTracker::establishEntryForOrigin):
1917         (WebCore::DatabaseTracker::fullPathForDatabase):
1918         (WebCore::DatabaseTracker::populateOrigins):
1919         (WebCore::DatabaseTracker::origins):
1920         (WebCore::DatabaseTracker::databaseNamesForOrigin):
1921         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
1922         (WebCore::DatabaseTracker::setDatabaseDetails):
1923         (WebCore::DatabaseTracker::usageForDatabase):
1924         (WebCore::DatabaseTracker::usageForOrigin):
1925         (WebCore::DatabaseTracker::quotaForOrigin):
1926         (WebCore::DatabaseTracker::setQuota):
1927         (WebCore::DatabaseTracker::addDatabase):
1928         (WebCore::DatabaseTracker::deleteAllDatabases):
1929         (WebCore::DatabaseTracker::deleteDatabasesWithOrigin):
1930         (WebCore::DatabaseTracker::deleteDatabase):
1931         (WebCore::DatabaseTracker::deleteDatabaseFile):
1932         (WebCore::notificationQueue):
1933         (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):
1934         (WebCore::DatabaseTracker::notifyDatabasesChanged):
1935         * storage/DatabaseTracker.h:
1936         * storage/DatabaseTrackerClient.h:
1937         * storage/SQLTransaction.cpp:
1938         (WebCore::SQLTransaction::openTransactionAndPreflight):
1939         (WebCore::SQLTransaction::runStatements):
1940         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
1941         (WebCore::SQLTransaction::postflightAndCommit):
1942         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback):
1943         * svg/graphics/SVGImageEmptyClients.h:
1944         (WebCore::SVGEmptyChromeClient::requestQuotaIncreaseForNewDatabase):
1945         (WebCore::SVGEmptyChromeClient::requestQuotaIncreaseForDatabaseOperation):
1946
1947 2008-01-10  Anders Carlsson  <andersca@apple.com>
1948
1949         Reviewed by Sam.
1950
1951         Use the correct frame loader load method. Using the old method would not cause a 
1952         new window to be open if the frame navigation was not allowed.
1953         
1954         * plugins/win/PluginViewWin.cpp:
1955         (WebCore::PluginViewWin::performRequest):
1956
1957 2008-01-10  Alp Toker  <alp@atoker.com>
1958
1959         SVG font build fix for GTK+/autotools.
1960
1961         * GNUmakefile.am:
1962
1963 2008-01-10  Adam Barth  <hk9565@gmail.com>
1964
1965         Reviewed by Sam Weinig and Anders Carlsson.
1966
1967         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16522
1968         <rdar://problem/5657355>
1969
1970         This patch makes two changes:
1971
1972         1) Java calls FrameLoader::load in a slightly different way than
1973            JavaScript, which previously let a malicious web site bypass the
1974            shouldAllowNavigation check.  This patch adds that check to that
1975            code path.
1976
1977         2) FrameLoader now wraps calls to m_frame->tree()->find(name) with
1978            findFrameForNavigation, which calls shouldAllowNavigation.  This
1979            treats disallowed frame navigations as if the named frame did not
1980            exist, resulting in a popup window when appropriate.
1981
1982         Tests: http/tests/security/frameNavigation/xss-DENIED-plugin-navigation.html
1983                http/tests/security/frameNavigation/xss-DENIED-targeted-link-navigation.html
1984
1985         * WebCore.base.exp:
1986         * bindings/js/kjs_window.cpp:
1987         (KJS::WindowProtoFuncOpen::callAsFunction):
1988         * loader/FrameLoader.cpp:
1989         (WebCore::FrameLoader::createWindow):
1990         (WebCore::FrameLoader::load):
1991         (WebCore::FrameLoader::post):
1992         (WebCore::FrameLoader::findFrameForNavigation):
1993         * loader/FrameLoader.h:
1994
1995 2008-01-10  John Sullivan  <sullivan@apple.com>
1996
1997         Written by Hyatt, reviewed by me
1998         
1999         - fixed <rdar://problem/5654297> Mail crashes occurs at WebCore::FontFallbackList::fontDataAt() when attempting to display 
2000           a <video> element that uses controls attribute
2001
2002         * rendering/MediaControlElements.cpp:
2003         (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement):
2004         force the render style to inherit from the media element's style; Hyatt filed 5682383 to cover cleaning
2005         up this architecture, but this one-line fix will prevent the crash in the meantime
2006
2007 2008-01-10  Ada Chan  <adachan@apple.com>
2008
2009         Fix fast/forms/input-radio-checked-tab.html
2010         Meta key is not the same as Alt key on windows.
2011
2012         Reviewed by Darin.
2013
2014         * platform/win/KeyEventWin.cpp:
2015         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2016
2017 2008-01-10  Anders Carlsson  <andersca@apple.com>
2018
2019         Reviewed by Jon.
2020
2021         Fix an assert that would happen when a plug-in tries to load a URL while a provisional load is going.
2022         
2023         * plugins/win/PluginViewWin.cpp:
2024         (WebCore::PluginViewWin::performRequest):
2025         Move document loader check here since we don't start loading until here and a new document load could have started in the meantime.
2026         
2027         (WebCore::PluginViewWin::requestTimerFired):
2028         Don't leak the plugin requests.
2029         
2030         (WebCore::PluginViewWin::load):
2031
2032 2008-01-10  Anders Carlsson  <andersca@apple.com>
2033
2034         Reviewed by John Sullivan.
2035
2036         <rdar://problem/5455889>
2037         REGRESSION: BumperCar crashes when attempting to load a long invalid URL
2038         
2039         Make sure to call FrameLoader::receivedMainResourceError before calling
2040         FrameLoader::didFailToLoad. The call to receivedMainResourceError takes care of
2041         clearing out the provisional document loader so that we won't call the didFail
2042         ResourceLoadDelegate method twice. This also makes us call the FrameLoadDelegate method
2043         didFailPrivisionalLoad before calling the ResourceLoadDelegate method, which Safari 2.0 does.
2044         
2045         * loader/MainResourceLoader.cpp:
2046         (WebCore::MainResourceLoader::receivedError):
2047
2048 2008-01-10  Antti Koivisto  <antti@apple.com>
2049
2050         Reviewed by Adele.
2051
2052         Fix <rdar://problem/5658048>
2053         After <video> has finished playing, dragging the scroller on different location of controller starts to play movie
2054         
2055         - Move to paused state if the playback had ended and the controller is used to seek to earlier time
2056         - Pause video playback during drag so the knob does not constantly try to escape from the mouse pointer
2057
2058         * html/HTMLMediaElement.cpp:
2059         (WebCore::HTMLMediaElement::HTMLMediaElement):
2060         (WebCore::HTMLMediaElement::updateMediaPlayer):
2061         (WebCore::HTMLMediaElement::setPausedInternal):
2062         * html/HTMLMediaElement.h:
2063         * rendering/MediaControlElements.cpp:
2064         (WebCore::MediaControlTimelineElement::defaultEventHandler):
2065
2066 2008-01-10  Alexey Proskuryakov  <ap@webkit.org>
2067
2068         Reviewed by Adam Roben.
2069
2070         <rdar://problem/5667003> fast/dom/xmlhttprequest-html-response-encoding.html is failing
2071
2072         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::send): Do not disable sniffing for file://
2073         requests, as CFNetwork doesn't perform extension to MIME type mapping then.
2074
2075 2008-01-10  Adam Roben  <aroben@apple.com>
2076
2077         Fixes to allow multiple FrameViews on Windows
2078
2079         Reviewed by Hyatt.
2080
2081         * page/FrameView.cpp:
2082         (WebCore::FrameView::FrameView): Added a new constructor that takes an
2083         IntSize to specify the FrameView's initial size.
2084         (WebCore::FrameView::scheduleRelayout): Added an assertion that our
2085         Document is not in the page cache.
2086         * page/FrameView.h:
2087         * platform/gtk/WidgetGtk.cpp:
2088         (WebCore::Widget::~Widget): Add a warm, fuzzy ASSERT.
2089         * platform/qt/WidgetQt.cpp:
2090         (WebCore::Widget::~Widget): Ditto.
2091         * rendering/RenderWidget.cpp:
2092         (WebCore::RenderWidget::setWidget): Make sure to remove any existing
2093         Widget from the Widget hierarchy before deleting it. One instance
2094         where this is needed is when setWidget is called during FrameView
2095         creation on Windows.
2096
2097 2008-01-10  Alp Toker  <alp@atoker.com>
2098
2099         Include math.h to get ceilf(). Part of the SVG font GTK+ build fix.
2100
2101         * svg/SVGFontFaceElement.cpp:
2102
2103 2008-01-10  Justin Garcia  <justin.garcia@apple.com>
2104
2105         Reviewed by Alice Liu.
2106
2107         <rdar://problem/5658603> Crash in InsertNodeBefore::doUnapply() on Undo in Yahoo Mail
2108         <rdar://problem/5658709> Crash in RenderView::setSelection on Undo in Yahoo Mail
2109         
2110         Make sure we have an updated layout before we perform any editing work.
2111
2112         * editing/EditCommand.cpp:
2113         (WebCore::EditCommand::apply):
2114         (WebCore::EditCommand::unapply):
2115         (WebCore::EditCommand::reapply):
2116
2117 2008-01-10  Luca Bruno  <lethalman88@gmail.com>
2118
2119         Reviewed by Alp Toker.
2120
2121         Back out r29206 which was causing regressions in curl http job
2122         cancellation.
2123
2124         * platform/network/curl/ResourceHandleManager.cpp
2125         (ResourceHandleManager::cancel): 
2126
2127 2008-01-10  Kevin McCullough  <kmccullough@apple.com>
2128
2129         Reviewed by Darin, Sam, and Adam.
2130
2131         - <rdar://problem/5654486> REGRESSION (Safari 3.0.4-TOT): clicking on
2132         - link in gmail message displays JavaScript alert falsely complaining
2133         about pop-up blocking
2134         - When trying to open a new window, we now see if the user gesture 
2135         occurred in the global dynamic object instead of the frame since that is
2136         the only place an event can occur. 
2137
2138         * bindings/js/kjs_window.cpp: - Check the dynamic global object instead
2139         of the frame.
2140         (KJS::allowPopUp):
2141         (KJS::showModalDialog):
2142         (KJS::WindowProtoFuncOpen::callAsFunction):
2143
2144 2008-01-10  David Hyatt  <hyatt@apple.com>
2145
2146         Fix for bug 16247, visibility:hidden not honored when hit testing inline replaced elements.
2147
2148         Reviewed by adele
2149
2150         Added fast/css/visibility-hit-test.html test case.
2151
2152         * rendering/RenderBox.cpp:
2153         (WebCore::RenderBox::nodeAtPoint):
2154
2155 2008-01-10  Lars Knoll  <lars@trolltech.com>
2156
2157         Reviewed by Simon.
2158
2159         rename QWebPageHistory to QWebHistory.
2160
2161         * WebCore.pro:
2162
2163 2008-01-10  Lars Knoll  <lars@trolltech.com>
2164
2165         Reviewed by Simon.
2166
2167         fix the drawing errors that where introduced due to refactoring.
2168
2169         Correctly clip to the rectangle we want to draw in ScrollView::paint().
2170
2171         * platform/qt/ScrollViewQt.cpp:
2172         (WebCore::ScrollView::paint):
2173
2174 2008-01-10  Simon Hausmann  <hausmann@webkit.org>
2175
2176         Reviewed by Lars.
2177
2178         Temporarily disable gzip decompression in qhttp due to a bug.
2179
2180         * platform/network/qt/QNetworkReplyHandler.cpp:
2181         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
2182
2183 2008-01-10  Simon Hausmann  <hausmann@webkit.org>
2184
2185         Reviewed by Lars.
2186
2187         http://bugs.webkit.org/show_bug.cgi?id=16588
2188
2189         Added a (last) Frame argument to ResourceHandle::loadResourceSynchronously.
2190         This allows implementing the synchronous loading correctly for the Qt port where the networking
2191         backend is bound to the page.
2192
2193         * loader/FrameLoader.cpp:
2194         (WebCore::FrameLoader::loadResourceSynchronously):
2195         * platform/network/ResourceHandle.h:
2196         * platform/network/cf/ResourceHandleCFNet.cpp:
2197         * platform/network/curl/ResourceHandleCurl.cpp:
2198         * platform/network/mac/ResourceHandleMac.mm:
2199         * platform/network/qt/ResourceHandleQt.cpp:
2200         (WebCore::ResourceHandle::loadResourceSynchronously):
2201
2202 2008-01-10  Kevin Ollivier  <kevino@theolliviers.com>
2203
2204         wx build fix for changes in r29328
2205
2206         * WebCoreSources.bkl:
2207
2208 2008-01-09  Maciej Stachowiak  <mjs@apple.com>
2209
2210         Reviewed by Sam.
2211
2212         - refactor SecurityOrigin in preparation for merging with SecurityOriginData
2213
2214         * platform/SecurityOrigin.cpp:
2215         (WebCore::SecurityOrigin::SecurityOrigin):
2216         (WebCore::SecurityOrigin::create):
2217         (WebCore::SecurityOrigin::createForFrame):
2218         * platform/SecurityOrigin.h:
2219
2220 2008-01-09  Ada Chan  <adachan@apple.com>
2221
2222         Tabs with ctrl, meta, or altgraph modifier key down should not advance focus.
2223
2224         Reviewed by Darin.
2225
2226         Test: fast/forms/tabs-with-modifiers.html
2227
2228         * page/EventHandler.cpp:
2229         (WebCore::EventHandler::defaultKeyboardEventHandler):
2230         (WebCore::EventHandler::defaultTabEventHandler): bail if ctrl, meta, or altgraph key is down.  
2231         Clean up the code a bit.
2232         * page/EventHandler.h:
2233         * page/FocusController.cpp: Remove the advanceFocus() that takes in a KeyboardEvent.  It was
2234         only called in EventHandler::defaultTabEventHandler() but we have cleaned up the code there and
2235         no longer needs it.
2236         * page/FocusController.h:
2237
2238 2008-01-09  Antti Koivisto  <antti@apple.com>
2239
2240         Reviewed by Mitz.
2241
2242         Fix http://bugs.webkit.org/show_bug.cgi?id=16376
2243         <rdar://problem/5665206>
2244         <video> element fails to play frames when navigating back to page (16376)
2245         
2246         Don't make MediaPlayer visible when it is actually in page cache.
2247
2248         * rendering/RenderVideo.cpp:
2249         (WebCore::RenderVideo::updatePlayer):
2250
2251 2008-01-09  Anders Carlsson  <andersca@apple.com>
2252
2253         Reviewed by Darin.
2254
2255         <rdar://problem/5532361> 
2256         CrashTracer: 9840 crashes in Safari at com.apple.JavaScriptCore: KJS::Bindings::CInstance::~CInstance [in-charge deleting] + 35
2257         
2258         Clear the frame's plugin root objects so that they don't outlive the plugin bundle.
2259         
2260         * page/Frame.cpp:
2261         (WebCore::Frame::pageDestroyed):
2262
2263 2008-01-09  John Sullivan  <sullivan@apple.com>
2264
2265         Reviewed by Adam Roben and Anders Carlsson
2266         
2267         - fixed <rdar://problem/5469398> Repro assertion failure in context menu code due to 
2268           missing-but-expected Reload item
2269
2270         * platform/ContextMenu.cpp:
2271         (WebCore::ContextMenu::populate):
2272         use isLoadingInAPISense when deciding whether to include Stop or Reload in context
2273         menu, to match the WebKit API
2274
2275 2008-01-09  Mark Rowe  <mrowe@apple.com>
2276
2277         Fix Windows debug build for opensource developers.
2278
2279         * WebCore.vcproj/QTMovieWin.vcproj: Use the correct library suffix.
2280
2281 2007-10-01  Allan Sandfeld Jensen  <sandfeld@kde.org>
2282
2283         Reworked by Eric, Reviewed by Hyatt.
2284
2285         - fix http://bugs.webkit.org/show_bug.cgi?id=9454
2286         Add support for :lang inheritance and xml:lang support.
2287
2288         Tests: fast/selectors/lang-inheritance.html
2289                fast/selectors/lang-inheritance2.html
2290                fast/selectors/lang-vs-xml-lang.html
2291                fast/selectors/lang-vs-xml-lang-xhtml.xhtml
2292
2293         * css/CSSStyleSelector.cpp:
2294         (WebCore::CSSStyleSelector::canShareStyleWithElement): Do not share style between elements with
2295         different LANG-attribute.
2296         (WebCore::CSSStyleSelector::checkOneSelector): Change :lang() to recursively check the LANG attribute
2297         for all the elements parents and the content-language of the document.
2298         * dom/Document.cpp:
2299         (WebCore::Document::processHttpEquiv): Parse MIME Content-Language
2300         * dom/Document.h:
2301         (WebCore::Document::contentLanguage):
2302         (WebCore::Document::setContentLanguage):
2303
2304 2008-01-08  Timothy Hatcher  <timothy@apple.com>
2305
2306         Reviewed by Brady.
2307
2308         Bug 16678: Unreproducible crash in KJS::JSObject::inherits() after using Web Inspector
2309         http://bugs.webkit.org/show_bug.cgi?id=16678
2310
2311         Add a NULL check for controller before calling JSObjectSetPrivate.
2312
2313         * page/InspectorController.cpp:
2314         (WebCore::InspectorController::~InspectorController):
2315
2316 2008-01-08  Xan Lopez  <xan@gnome.org>
2317
2318         Reviewed by Alp Toker.
2319
2320         http://bugs.webkit.org/show_bug.cgi?id=15610
2321         [GTK] Text rendering using Pango
2322
2323         Use Pango to render Complex path text.
2324
2325         * platform/graphics/gtk/FontGtk.cpp:
2326         (WebCore::utf16_to_utf8):
2327         (WebCore::convertUniCharToUTF8):
2328         (WebCore::setPangoAttributes):
2329         (WebCore::Font::drawGlyphs):
2330         (WebCore::Font::drawComplexText):
2331         (WebCore::Font::floatWidthForComplexText):
2332         (WebCore::Font::offsetForPositionForComplexText):
2333
2334 2008-01-08  Timothy Hatcher  <timothy@apple.com>
2335
2336         Reviewed by Darin Adler.
2337
2338         <rdar://problem/5665860> With the web inspector displayed, a crash occurs
2339         at WebCore::Frame::document() when navigating back to previous page
2340
2341         This fixes the crash, but the inspector was totally broken with back/forward.
2342         So this also fixes back/forward navigation so the right main resource shows
2343         up in the inspector.
2344
2345         * page/InspectorController.cpp:
2346         (WebCore::addSourceToFrame): Add some null checks for the frame when
2347         getting the textEncoding. This was the crash.
2348         (WebCore::InspectorController::addScriptResource): Create a script object
2349         only if needed, and always add it by calling addResource.
2350         (WebCore::InspectorController::didCommitLoad): Check if the loader is 
2351         loading from the page cache, and clear m_mainResource. If the load is
2352         normal, then call addAndUpdateScriptResource with the main resource. 
2353         (WebCore::InspectorController::identifierForInitialRequest): If the load
2354         is from the page cache and the resource is the main resource call
2355         addAndUpdateScriptResource since didCommitLoad did not do it.
2356
2357 2008-01-08  Alp Toker  <alp@atoker.com>
2358
2359         Back out VIDEO by default in the GTK+ qmake build. The build bot
2360         doesn't have the necessary libraries installed.
2361
2362         * WebCore.pro:
2363
2364 2008-01-08  Alp Toker  <alp@atoker.com>
2365
2366         Win build fix for breakage introduced in r29328.
2367
2368         * WebCore.vcproj/WebCore.vcproj:
2369
2370 2008-01-08  Alp Toker  <alp@atoker.com>
2371
2372         Rubber-stamped by Mark Rowe.
2373
2374         Enable VIDEO by default in the GTK+ qmake build.
2375
2376         * WebCore.pro:
2377
2378 2008-01-08  Alp Toker  <alp@atoker.com>
2379
2380         GTK+ VIDEO build fix for breakage introduced in r29328.
2381
2382         Issue noticed by Ori_B.
2383
2384         * GNUmakefile.am:
2385         * WebCore.pro:
2386
2387 2008-01-08  Antti Koivisto  <antti@apple.com>
2388
2389         Reviewed by Darin.
2390         
2391         HTMLAudioElement needs generated constructor. Otherwise video instanceof HTMLAudioElement is true which is 
2392         bit strange.
2393         
2394         Renamed custom constructor JSHTMLAudioElementConstructor to JSAudioConstructor to avoid name clashes.
2395
2396         Test: media/constructors.html
2397
2398         * ChangeLog:
2399         * WebCore.xcodeproj/project.pbxproj:
2400         * bindings/js/JSAudioConstructor.cpp: Copied from WebCore/bindings/js/JSHTMLAudioElementConstructor.cpp.
2401         (WebCore::JSAudioConstructor::JSAudioConstructor):
2402         (WebCore::JSAudioConstructor::implementsConstruct):
2403         (WebCore::JSAudioConstructor::construct):
2404         * bindings/js/JSAudioConstructor.h: Copied from WebCore/bindings/js/JSHTMLAudioElementConstructor.h.
2405         * bindings/js/JSHTMLAudioElementConstructor.cpp: Removed.
2406         * bindings/js/JSHTMLAudioElementConstructor.h: Removed.
2407         * bindings/js/kjs_window.cpp:
2408         (KJS::Window::getValueProperty):
2409         * html/HTMLAudioElement.idl:
2410
2411 2008-01-08  Anders Carlsson  <andersca@apple.com>
2412
2413         Reviewed by Mitz.
2414
2415         Don't add the applet widget to the view, that's done later by RenderApplet.
2416             
2417         * loader/FrameLoader.cpp:
2418         (WebCore::FrameLoader::createJavaAppletWidget):
2419
2420 2008-01-08  Antti Koivisto  <antti@apple.com>
2421
2422         Reviewed by Weinig.
2423         
2424         Add security check for Audio constructor.
2425
2426         * bindings/js/kjs_window.cpp:
2427         (KJS::Window::getValueProperty):
2428
2429 2008-01-08  Timothy Hatcher  <timothy@apple.com>
2430
2431         Reviewed by Adam Roben.
2432
2433         <rdar://problem/5676515> List of scripts and images missing when opening Web Inspector from new window (16567)
2434
2435         InspectorController::didLoadResourceFromMemoryCache was not being called for
2436         resources that loaded from the memory cache that the FrameLoader's client
2437         has already been notified about. This fix always calls the InspectorController
2438         when loading a memory cached resource. No test possible for the Web Inspector.
2439
2440         * loader/DocLoader.cpp:
2441         (WebCore::DocLoader::checkCacheObjectStatus): Moved most of the logic to
2442         FrameLoader::loadedResourceFromMemoryCache so the InspectorController can always be notified.
2443         * loader/FrameLoader.cpp:
2444         (WebCore::FrameLoader::didTellClientAboutLoad): Renamed from didTellBridgeAboutLoad.
2445         (WebCore::FrameLoader::haveToldClientAboutLoad): Renamed from haveToldBridgeAboutLoad.
2446         (WebCore::FrameLoader::loadResourceSynchronously): Call the renamed didTellClientAboutLoad.
2447         (WebCore::FrameLoader::loadedResourceFromMemoryCache): Only takes a CachedResource now.
2448         Always call InspectorController. If the resource's sendResourceLoadCallbacks is false or
2449         didTellClientAboutLoad is true, do an early return. Otherwise call the client and call
2450         didTellClientAboutLoad.
2451         (WebCore::FrameLoader::dispatchDidLoadResourceFromMemoryCache): Removed, work now done
2452         in FrameLoader::loadedResourceFromMemoryCache.
2453         * loader/FrameLoader.h: Renamed {didTell,haveTold}BridgeAboutLoad to {didTell,haveTold}ClientAboutLoad.
2454         Made loadedResourceFromMemoryCache only take a CachedResource. Renamed m_urlsBridgeKnowsAbout to 
2455         m_urlsClientKnowsAbout.
2456         * loader/SubresourceLoader.cpp:
2457         (WebCore::SubresourceLoader::load): Call the renamed didTellClientAboutLoad.
2458
2459 2008-01-08  Dan Bernstein  <mitz@apple.com>
2460
2461         Rubber-stamped by Sam Weinig.
2462
2463         - prefix all member variables in CSSStyleSelector with m_
2464
2465         * css/CSSStyleSelector.cpp:
2466         (WebCore::CSSStyleSelector::CSSStyleSelector):
2467         (WebCore::CSSStyleSelector::init):
2468         (WebCore::CSSStyleSelector::setEncodedURL):
2469         (WebCore::CSSStyleSelector::loadDefaultStyle):
2470         (WebCore::CSSStyleSelector::matchRules):
2471         (WebCore::CSSStyleSelector::matchRulesForList):
2472         (WebCore::CSSStyleSelector::initElementAndPseudoState):
2473         (WebCore::CSSStyleSelector::initForStyleResolve):
2474         (WebCore::CSSStyleSelector::canShareStyleWithElement):
2475         (WebCore::CSSStyleSelector::locateSharedStyle):
2476         (WebCore::CSSStyleSelector::matchUARules):
2477         (WebCore::CSSStyleSelector::styleForElement):
2478         (WebCore::CSSStyleSelector::pseudoStyleForElement):
2479         (WebCore::CSSStyleSelector::updateFont):
2480         (WebCore::CSSStyleSelector::cacheBorderAndBackground):
2481         (WebCore::CSSStyleSelector::checkSelector):
2482         (WebCore::CSSStyleSelector::checkOneSelector):
2483         (WebCore::CSSStyleSelector::applyProperty):
2484         (WebCore::CSSStyleSelector::mapBackgroundImage):
2485         (WebCore::CSSStyleSelector::mapBackgroundSize):
2486         (WebCore::CSSStyleSelector::mapBackgroundXPosition):
2487         (WebCore::CSSStyleSelector::mapBackgroundYPosition):
2488         (WebCore::CSSStyleSelector::checkForTextSizeAdjust):
2489         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
2490         * css/CSSStyleSelector.h:
2491         (WebCore::CSSStyleSelector::):
2492         (WebCore::CSSRuleData::CSSRuleData):
2493         (WebCore::CSSRuleDataList::CSSRuleDataList):
2494         (WebCore::CSSRuleDataList::append):
2495         * css/SVGCSSStyleSelector.cpp:
2496         (WebCore::CSSStyleSelector::applySVGProperty):
2497         * rendering/RenderStyle.cpp:
2498         (WebCore::RenderStyle::isStyleAvailable):
2499
2500 2008-01-08  David D. Kilzer  <ddkilzer@apple.com>
2501
2502         Removed unnecessary files from Copy Bundle Resources build phase.
2503
2504         Reviewed by Sam.
2505
2506         * WebCore.xcodeproj/project.pbxproj: Files removed from build phase:
2507         DOMCoreException.idl
2508         EventException.idl
2509         MessageEvent.idl
2510         SVGAElement.idl
2511         SVGAngle.idl
2512         SVGAnimateColorElement.idl
2513         SVGAnimateElement.idl
2514         SVGAnimateTransformElement.idl
2515         SVGAnimatedAngle.idl
2516         SVGAnimatedBoolean.idl
2517         SVGAnimatedEnumeration.idl
2518         SVGAnimatedInteger.idl
2519         SVGAnimatedLength.idl
2520         SVGAnimatedLengthList.idl
2521         SVGAnimatedNumber.idl
2522         SVGAnimatedNumberList.idl
2523         SVGAnimatedPathData.idl
2524         SVGAnimatedPoints.idl
2525         SVGAnimatedPreserveAspectRatio.idl
2526         SVGAnimatedRect.idl
2527         SVGAnimatedString.idl
2528         SVGAnimatedTransformList.idl
2529         SVGAnimationElement.idl
2530         SVGCSSPropertyNames.in
2531         SVGCSSValueKeywords.in
2532         SVGCircleElement.idl
2533         SVGClipPathElement.idl
2534         SVGColor.idl
2535         SVGComponentTransferFunctionElement.idl
2536         SVGCursorElement.idl
2537         SVGDefinitionSrcElement.idl
2538         SVGDefsElement.idl
2539         SVGDescElement.idl
2540         SVGDocument.idl
2541         SVGElement.idl
2542         SVGElementInstance.idl
2543         SVGElementInstanceList.idl
2544         SVGEllipseElement.idl
2545         SVGException.idl
2546         SVGExternalResourcesRequired.idl
2547         SVGFEBlendElement.idl
2548         SVGFEColorMatrixElement.idl
2549         SVGFEComponentTransferElement.idl
2550         SVGFECompositeElement.idl
2551         SVGFEDiffuseLightingElement.idl
2552         SVGFEDisplacementMapElement.idl
2553         SVGFEDistantLightElement.idl
2554         SVGFEFloodElement.idl
2555         SVGFEFuncAElement.idl
2556         SVGFEFuncBElement.idl
2557         SVGFEFuncGElement.idl
2558         SVGFEFuncRElement.idl
2559         SVGFEGaussianBlurElement.idl
2560         SVGFEImageElement.idl
2561         SVGFEMergeElement.idl
2562         SVGFEMergeNodeElement.idl
2563         SVGFEOffsetElement.idl
2564         SVGFEPointLightElement.idl
2565         SVGFESpecularLightingElement.idl
2566         SVGFESpotLightElement.idl
2567         SVGFETileElement.idl
2568         SVGFETurbulenceElement.idl
2569         SVGFilterElement.idl
2570         SVGFilterPrimitiveStandardAttributes.idl
2571         SVGFitToViewBox.idl
2572         SVGFontElement.idl
2573         SVGFontFaceElement.idl
2574         SVGFontFaceFormatElement.idl
2575         SVGFontFaceNameElement.idl
2576         SVGFontFaceSrcElement.idl
2577         SVGFontFaceUriElement.idl
2578         SVGForeignObjectElement.idl
2579         SVGGElement.idl
2580         SVGGlyphElement.idl
2581         SVGGradientElement.idl
2582         SVGImageElement.idl
2583         SVGLangSpace.idl
2584         SVGLength.idl
2585         SVGLengthList.idl
2586         SVGLineElement.idl
2587         SVGLinearGradientElement.idl
2588         SVGLocatable.idl
2589         SVGMarkerElement.idl
2590         SVGMaskElement.idl
2591         SVGMatrix.idl
2592         SVGMetadataElement.idl
2593         SVGMissingGlyphElement.idl
2594         SVGNumber.idl
2595         SVGNumberList.idl
2596         SVGPaint.idl
2597         SVGPathElement.idl
2598         SVGPathSeg.idl
2599         SVGPathSegArcAbs.idl
2600         SVGPathSegArcRel.idl
2601         SVGPathSegClosePath.idl
2602         SVGPathSegCurvetoCubicAbs.idl
2603         SVGPathSegCurvetoCubicRel.idl
2604         SVGPathSegCurvetoCubicSmoothAbs.idl
2605         SVGPathSegCurvetoCubicSmoothRel.idl
2606         SVGPathSegCurvetoQuadraticAbs.idl
2607         SVGPathSegCurvetoQuadraticRel.idl
2608         SVGPathSegCurvetoQuadraticSmoothAbs.idl
2609         SVGPathSegCurvetoQuadraticSmoothRel.idl
2610         SVGPathSegLinetoAbs.idl
2611         SVGPathSegLinetoHorizontalAbs.idl
2612         SVGPathSegLinetoHorizontalRel.idl
2613         SVGPathSegLinetoRel.idl
2614         SVGPathSegLinetoVerticalAbs.idl
2615         SVGPathSegLinetoVerticalRel.idl
2616         SVGPathSegList.idl
2617         SVGPathSegMovetoAbs.idl
2618         SVGPathSegMovetoRel.idl
2619         SVGPatternElement.idl
2620         SVGPoint.idl
2621         SVGPointList.idl
2622         SVGPolygonElement.idl
2623         SVGPolylineElement.idl
2624         SVGPreserveAspectRatio.idl
2625         SVGRadialGradientElement.idl
2626         SVGRect.idl
2627         SVGRectElement.idl
2628         SVGRenderingIntent.idl
2629         SVGSVGElement.idl
2630         SVGScriptElement.idl
2631         SVGSetElement.idl
2632         SVGStopElement.idl
2633         SVGStringList.idl
2634         SVGStylable.idl
2635         SVGStyleElement.idl
2636         SVGSwitchElement.idl
2637         SVGSymbolElement.idl
2638         SVGTRefElement.idl
2639         SVGTSpanElement.idl
2640         SVGTests.idl
2641         SVGTextContentElement.idl
2642         SVGTextElement.idl
2643         SVGTextPathElement.idl
2644         SVGTextPositioningElement.idl
2645         SVGTitleElement.idl
2646         SVGTransform.idl
2647         SVGTransformList.idl
2648         SVGTransformable.idl
2649         SVGURIReference.idl
2650         SVGUnitTypes.idl
2651         SVGUseElement.idl
2652         SVGViewElement.idl
2653         SVGViewSpec.idl
2654         SVGZoomAndPan.idl
2655         SVGZoomEvent.idl
2656         XMLHttpRequestException.idl
2657         XPathException.idl
2658         character-sets.txt
2659         mac-encodings.txt
2660         make-charset-table.pl
2661         svgattrs.in
2662         svgtags.in
2663         xlinkattrs.in
2664
2665 2008-01-08  Luca Bruno  <lethalman88@gmail.com>
2666
2667         Reviewed by Alp Toker.
2668
2669         Support copying the selected URL to the clipboard.
2670
2671         * platform/gtk/PasteboardGtk.cpp:
2672         (WebCore::Pasteboard::writeURL): implemented
2673
2674 2008-01-08  David D. Kilzer  <ddkilzer@webkit.org>
2675
2676         Renamed CharacterData::m_str to m_data
2677
2678         Rubber-stamped by Adam again.
2679
2680         No test cases added since there is no change in behavior.
2681
2682         * dom/CDATASection.cpp:
2683         * dom/CharacterData.cpp:
2684         (WebCore::CharacterData::CharacterData):
2685         (WebCore::CharacterData::setData):
2686         (WebCore::CharacterData::substringData):
2687         (WebCore::CharacterData::appendData):
2688         (WebCore::CharacterData::insertData):
2689         (WebCore::CharacterData::deleteData):
2690         (WebCore::CharacterData::replaceData):
2691         (WebCore::CharacterData::nodeValue):
2692         (WebCore::CharacterData::containsOnlyWhitespace):
2693         (WebCore::CharacterData::dispatchModifiedEvent):
2694         (WebCore::CharacterData::checkCharDataOperation):
2695         (WebCore::CharacterData::dump):
2696         * dom/CharacterData.h:
2697         * dom/Comment.cpp:
2698         * dom/Text.cpp:
2699         (WebCore::Text::splitText):
2700         (WebCore::Text::createRenderer):
2701         (WebCore::Text::recalcStyle):
2702
2703 2008-01-08  Steve Falkenburg  <sfalken@apple.com>
2704
2705         Fix a couple of compiler warnings.
2706         
2707         Reviewed by Mitz.
2708
2709         * platform/win/ThreadingWin.cpp:
2710         * platform/win/UniscribeController.cpp: Remove unused function.
2711         (WebCore::UniscribeController::advance): Fix bogus warning about un-initialized variable.
2712
2713 2008-01-08  Adele Peterson  <adele@apple.com>
2714
2715         Reviewed by Darin.
2716
2717         Fix for <rdar://problem/5674667> fast/forms/slider-mouse-events.html is broken by media control checkin 29257
2718
2719         * rendering/RenderSlider.cpp: (WebCore::HTMLSliderThumbElement::defaultEventHandler):
2720           After fixing a bug in EventHandler to make sure events always go to the capturing node, this bug was exposed.
2721           MouseMove and MouseUp events were going to the thumb element, but not to the slider input element.  
2722           This change makes the input element the capturing node, and then the input element forwards the mouse events to the thumb element.
2723           I also added a missing call to setDefaultHandled for the mousemove event.
2724
2725 2008-01-08  Adele Peterson  <adele@apple.com>
2726
2727         Reviewed by Adam. 
2728
2729         * rendering/RenderThemeSafari.cpp: Use the SafariTheme version number to decide whether or not to
2730         paint the media controls in RenderThemeSafari.
2731
2732 2008-01-08  Oliver Hunt  <oliver@apple.com>
2733
2734         Reviewed by Adele and John.
2735
2736         Fix <rdar://problem/5652740> Crash occurs at WebCore::Widget::getView() after
2737         dragging file into window that contains web page ( http://www.econocraft.com/flood_arch.htm )
2738
2739         We hit this crash if the page reloads between DragController::dragUpdated
2740         and DragController::performDrag, meaning that m_document starts pointing to
2741         a now viewless document.  This is picked up by an assertion in performDrag
2742         which I have now replaced with an assignment given that the assertion is 
2743         invalid -- it is possible for m_document to be changed between dragUpdated
2744         performDrag
2745
2746         * page/DragController.cpp:
2747         (WebCore::DragController::performDrag):
2748
2749 2008-01-08  Alexey Proskuryakov  <ap@webkit.org>
2750
2751         Reviewed by Darin.
2752
2753         <rdar://problem/5659812> CrashTracer: 462 crashes in Safari at com.apple.WebCore:
2754         WebCore::Node::setChanged + 96
2755
2756         Test: fast/dom/cssTarget-crash.html
2757
2758         * dom/Node.cpp: (WebCore::Node::removedFromDocument):
2759         Check to see if the node being removed is currently set as the Document's cssTarget.
2760         If it is, clear the cssTarget to prevent a hanging reference to it.
2761
2762 2008-01-08  Adam Roben  <aroben@apple.com>
2763
2764         * bindings/scripts/CodeGeneratorJS.pm: Touch this so the bindings will
2765         rebuild on Windows now that the media elements are enabled.
2766
2767 2008-01-08  Adam Roben  <aroben@apple.com>
2768
2769         * svg/svgtags.in: Touch this again for the sake of the Windows bots.
2770
2771 2008-01-08  Timothy Hatcher  <timothy@apple.com>
2772
2773         Reviewed by Adam Roben.
2774
2775         Use JSRetainPtr in the Web Inspector everywhere we own a JSStringRef.
2776         Also added some #pragma marks to help find places in the file.
2777
2778         * page/InspectorController.cpp:
2779         (WebCore::callSimpleFunction): Use JSRetainPtr<JSStringRef>.
2780         And return the result of JSObjectCallAsFunction.
2781         (WebCore::search): Use JSRetainPtr<JSStringRef>.
2782         (WebCore::databaseTableNames): Ditto.
2783         (WebCore::localizedStrings): Ditto.
2784         (WebCore::InspectorController::~InspectorController): Ditto.
2785         (WebCore::InspectorController::focusNode): Ditto.
2786         (WebCore::InspectorController::windowScriptObjectAvailable): Ditto.
2787         (WebCore::InspectorController::scriptObjectReady): Ditto.
2788         (WebCore::addHeaders): Ditto.
2789         (WebCore::InspectorController::addScriptResource): Ditto.
2790         (WebCore::InspectorController::removeScriptResource): Ditto.
2791         (WebCore::InspectorController::updateScriptResourceRequest): Ditto.
2792         (WebCore::InspectorController::updateScriptResourceResponse): Ditto.
2793         (WebCore::InspectorController::updateScriptResource): Ditto.
2794         (WebCore::InspectorController::addDatabaseScriptResource): Ditto.
2795         (WebCore::InspectorController::removeDatabaseScriptResource): Ditto.
2796         (WebCore::InspectorController::addScriptConsoleMessage): Ditto.
2797
2798 2008-01-08  Dan Bernstein  <mitz@apple.com>
2799
2800         Rubber-stamped by Sam Weinig.
2801
2802         - rename FontDataBaseClass.{cpp,h} back to FontData.{cpp,h}
2803
2804         * GNUmakefile.am:
2805         * WebCore.pro:
2806         * WebCore.vcproj/WebCore.vcproj:
2807         * WebCore.xcodeproj/project.pbxproj:
2808         * WebCoreSources.bkl:
2809         * editing/Editor.cpp:
2810         * platform/graphics/FontData.cpp: Copied from WebCore/platform/graphics/FontDataBaseClass.cpp.
2811         * platform/graphics/FontData.h: Copied from WebCore/platform/graphics/FontDataBaseClass.h.
2812         * platform/graphics/FontDataBaseClass.cpp: Removed.
2813         * platform/graphics/FontDataBaseClass.h: Removed.
2814         * platform/graphics/SegmentedFontData.h:
2815         * platform/graphics/SimpleFontData.h:
2816
2817 2008-01-08  Dan Bernstein  <mitz@apple.com>
2818
2819         Fix a Wx build error.
2820
2821         * platform/graphics/wx/GlyphMapWx.cpp:
2822         (WebCore::GlyphPage::fill):
2823
2824 2008-01-08  Dan Bernstein  <mitz@apple.com>
2825
2826         Fix a Qt build error.
2827
2828         * platform/graphics/qt/SimpleFontDataQt.cpp:
2829         (WebCore::SimpleFontData::containsCharacters):
2830         (WebCore::SimpleFontData::fontDataForCharacter):
2831         (WebCore::SimpleFontData::isSegmented):
2832
2833 2008-01-08  Adam Roben  <aroben@apple.com>
2834
2835         Windows build fix.
2836
2837         Touch config.h to force a rebuild (apparently changing preprocessor
2838         definitions in the .vcproj doesn't force a rebuild).
2839
2840         * config.h:
2841
2842 2008-01-08  Dan Bernstein  <mitz@apple.com>
2843
2844         Fix a Wx build failure.
2845
2846         * webcore-wx.bkl:
2847
2848 2008-01-08  Dan Bernstein  <mitz@apple.com>
2849
2850         Fix a Qt build failure.
2851
2852         * WebCore.pro:
2853
2854 2008-01-08  John Sullivan  <sullivan@apple.com>
2855
2856         Reviewed by Adam Roben
2857         
2858         - fixed <rdar://problem/5671668> REGRESSION (r28711-r28730): With caret in an empty form field, 
2859           Delete menu item is enabled but shouldn't be
2860
2861         The enabled logic was incorrect for the Delete menu item. To fix this, I added an EditorCommandSource
2862         parameter to the enabled functions so that they can have parallel logic to the execute functions.
2863
2864         * editing/EditorCommand.cpp:
2865         added EditorCommandSource parameter to isEnabled function prototype
2866         (WebCore::enabled):
2867         added unused EditorCommandSource parameter to these isEnabled functions:
2868         (WebCore::enabledAnySelection):
2869         (WebCore::enabledAnySelectionAndMark):
2870         (WebCore::enableCaretInEditableText):
2871         (WebCore::enabledCopy):
2872         (WebCore::enabledCut):
2873
2874         (WebCore::enabledDelete):
2875         new function, uses logic previously used by Delete command for DOM sources; uses logic in enabledCut
2876         for menu source
2877
2878         added unused EditorCommandSource parameter to these isEnabled functions:
2879         (WebCore::enabledInEditableText):
2880         (WebCore::enabledInRichlyEditableText):
2881         (WebCore::enabledPaste):
2882         (WebCore::enabledRangeInEditableText):
2883         (WebCore::enabledRangeInRichlyEditableText):
2884         (WebCore::enabledRedo):
2885         (WebCore::enabledUndo):
2886         
2887         (WebCore::CommandEntry::):
2888         wire up new enabledDelete function as delete function for Delete command
2889         
2890         (WebCore::Editor::Command::isEnabled):
2891         pass EditorCommandSource parameter to isEnabled function
2892
2893 2008-01-08  Adam Roben  <aroben@apple.com>
2894
2895         Visual C++ Express build fix
2896
2897         * WebCore.vcproj/QTMovieWin.vcproj: Explicitly link against user32.lib
2898         and advapi32.lib. VS implicitly links against these, VC++ Express
2899         doesn't.
2900
2901 2008-01-08  Dan Bernstein  <mitz@apple.com>
2902
2903         - add bug number
2904
2905         * platform/graphics/mac/FontCustomPlatformData.cpp:
2906         (WebCore::createFontCustomPlatformData):
2907
2908 2008-01-08  Dan Bernstein  <mitz@apple.com>
2909
2910         Try to fix the Qt build.
2911
2912         * WebCore.pro:
2913
2914 2008-01-08  Nikolas Zimmermann  <zimmermann@kde.org>
2915
2916         Not reviewed. Try to fix Qt builds after Timothy's inspector changes.
2917
2918         * page/inspector/WebKit.qrc:
2919
2920 2008-01-08  Maciej Stachowiak  <mjs@apple.com>
2921
2922         Reviewed by Mark.
2923
2924         - remove duplicate definition of getElementById from HTMLDocument IDL (and ObjC bindings)
2925
2926         * bindings/objc/PublicDOMInterfaces.h:
2927         * html/HTMLDocument.idl:
2928
2929 2008-01-08  David D. Kilzer  <ddkilzer@webkit.org>
2930
2931         Renamed CharacterData::str to m_str to match coding style
2932
2933         Rubber-stamped by Adam.
2934
2935         No test cases added since there is no change in behavior.
2936
2937         * dom/CDATASection.cpp:
2938         * dom/CharacterData.cpp:
2939         (WebCore::CharacterData::CharacterData):
2940         (WebCore::CharacterData::setData):
2941         (WebCore::CharacterData::substringData):
2942         (WebCore::CharacterData::appendData):
2943         (WebCore::CharacterData::insertData):
2944         (WebCore::CharacterData::deleteData):
2945         (WebCore::CharacterData::replaceData):
2946         (WebCore::CharacterData::nodeValue):
2947         (WebCore::CharacterData::containsOnlyWhitespace):
2948         (WebCore::CharacterData::dispatchModifiedEvent):
2949         (WebCore::CharacterData::checkCharDataOperation):
2950         (WebCore::CharacterData::dump):
2951         * dom/CharacterData.h:
2952         * dom/Comment.cpp:
2953         * dom/Text.cpp:
2954         (WebCore::Text::splitText):
2955         (WebCore::Text::createRenderer):
2956         (WebCore::Text::recalcStyle):
2957
2958 2008-01-08  Oliver Hunt  <oliver@apple.com>
2959
2960         Set the ENABLE_SVG_FONTS flag in Windows build, now builds, 
2961         I'm not sure if it just caused the right files to regenerate,
2962         or if there's some configuration weirdness in the non-SVG-fonts
2963         build. 
2964
2965         * WebCore.vcproj/WebCore.vcproj:
2966
2967 2008-01-07  Maciej Stachowiak  <mjs@apple.com>
2968
2969         Reviewed by Brady.
2970
2971         - fixed <rdar://problem/5644300> Back/Forward Cache should not include pages with databases
2972         
2973         Track whether a document has ever opened a database; if so, exclude it from b/f caching (for now)
2974         
2975         * dom/Document.cpp:
2976         (WebCore::Document::Document):
2977         * dom/Document.h:
2978         (WebCore::Document::setHasOpenDatabases):
2979         (WebCore::Document::hasOpenDatabases):
2980         * loader/FrameLoader.cpp:
2981         (WebCore::FrameLoader::canCachePage):
2982         * storage/Database.cpp:
2983         (WebCore::Database::openDatabase):
2984
2985 2008-01-07  Dan Bernstein  <mitz@apple.com>
2986
2987         Reviewed by Oliver Hunt.
2988
2989         - fix leaks seen on the build bot
2990
2991         * css/CSSFontSelector.cpp:
2992         (WebCore::CSSFontSelector::addFontFaceRule): Avoid creating a
2993         CSSFontFaceSource for SVG font-face elements going into an
2994         SVGCSSFontFace because it just leaks them. Avoid adding SVG font-
2995         face elements to a CSSFontFace because it will not work as expected.
2996
2997 2008-01-07  Mark Rowe  <mrowe@apple.com>
2998
2999         Tiger build fix.
3000
3001         * platform/graphics/mac/FontCustomPlatformData.cpp:
3002         (WebCore::createFontCustomPlatformData): Only include this code on Leopard.
3003         It's not needed on Tiger, and breaks the build.
3004
3005 2008-01-07  Antti Koivisto  <antti@apple.com>
3006
3007         Reviewed by Steve.
3008
3009         Re-enable media support in Windows build.
3010
3011         * WebCore.vcproj/QTMovieWin.vcproj:
3012         * WebCore.vcproj/WebCore.vcproj:
3013         * WebCore.vcproj/build-generated-files.sh:
3014
3015 2008-01-07  Steve Falkenburg  <sfalken@apple.com>
3016
3017         Add version resource to QTMovieWin.dll
3018         
3019         Reviewed by Adam.
3020
3021         * WebCore.vcproj/PRODUCTVERSION: Copied from ../WebKit/win/WebKit.vcproj/PRODUCTVERSION.
3022         * WebCore.vcproj/QTMovieWin.rc: Added.
3023         * WebCore.vcproj/QTMovieWin.vcproj:
3024         * WebCore.vcproj/VERSION: Copied from ../WebKit/win/WebKit.vcproj/VERSION.
3025         * WebCore.vcproj/auto-version.sh: Copied from ../WebKit/win/WebKit.vcproj/auto-version.sh.
3026
3027 2008-01-07  Dan Bernstein  <mitz@apple.com>
3028
3029         Build fix.
3030
3031         * platform/graphics/qt/FontCustomPlatformData.cpp:
3032         (WebCore::FontCustomPlatformData::~FontCustomPlatformData): Added.
3033         Calls QFontDatabase::removeApplicationFont().
3034         * platform/graphics/qt/FontCustomPlatformData.h:
3035         * platform/graphics/qt/GlyphPageTreeNodeQt.cpp:
3036         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData): Removed the
3037         implementation because Qt does not use the WebCore glyph cache.
3038
3039 2008-01-07  Dan Bernstein  <mitz@apple.com>
3040
3041         Reviewed by Oliver Hunt.
3042
3043         - fix an assertion failure in svg/W3C-SVG-1.1/fonts-elem-03-b.svg on
3044           Tiger and multiple SVG layout test failures on Leopard.
3045
3046         * css/CSSSegmentedFontFace.cpp:
3047         (WebCore::CSSSegmentedFontFace::getFontData): Avoid returning an
3048         empty SegmentedFontData.
3049         * platform/graphics/mac/FontCustomPlatformData.cpp:
3050         (WebCore::createFontCustomPlatformData): Avoid creating a font that
3051         contains no glyphs. On Leopard, ATS might create such a font given
3052         data in an unsupported format (such as SVG).
3053
3054 2008-01-07  Steve Falkenburg  <sfalken@apple.com>
3055
3056         Build fix.
3057
3058         * WebCore.vcproj/WebCore.sln:
3059         * WebCore.vcproj/WebCore.submit.sln:
3060
3061 2008-01-07  Oliver Hunt  <oliver@apple.com>
3062
3063         Reviewed by Niko.
3064
3065         Fix painting of SVG <image> when the image must be scaled to retain aspect ratio
3066
3067         Test: svg/custom/image-with-aspect-ratio-stretch.svg
3068
3069         * rendering/RenderSVGImage.cpp:
3070         (WebCore::RenderSVGImage::adjustRectsForAspectRatio):
3071
3072 2008-01-07  Dan Bernstein  <mitz@apple.com>
3073
3074         Build fix.
3075
3076         * platform/graphics/qt/GlyphPageTreeNodeQt.cpp:
3077         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
3078
3079 2008-01-07  Adele Peterson  <adele@apple.com>
3080
3081         Add missing newline.
3082
3083         * rendering/MediaControlElements.cpp:
3084
3085 2008-01-07  Jon Honeycutt  <jhoneycutt@apple.com>
3086
3087         Reviewed by Hyatt.
3088
3089         <rdar://problem/5673489> Safari does not render windowless plugins in an
3090         iframe when opacity < 1.0
3091
3092         Plugins in transparency layers handle their own world transforms, so
3093         only apply the horizontal/vertical transform if we are not in a
3094         transparency layer.
3095
3096         * platform/graphics/GraphicsContext.h: Add a Windows-platform-only
3097         inTransparencyLayer() function
3098         * platform/win/GraphicsContextWin.cpp:
3099         (WebCore::GraphicsContext::getWindowsContext): Use inTransparencyLayer()
3100         (WebCore::GraphicsContext::inTransparencyLayer):
3101         (WebCore::GraphicsContext::releaseWindowsContext): Use
3102         inTransparencyLayer()
3103         * plugins/win/PluginViewWin.cpp:
3104         (WebCore::PluginViewWin::paint): When retrieving the HDC, use the rect
3105         relative to the window. Pass m_isTransparent to
3106         get/releaseWindowsContext(). Only set the world transform if we are not
3107         in a transparency layer.
3108
3109 2008-01-07  Adele Peterson  <adele@apple.com>
3110
3111         Build fix.  Need to wrap these classes in #if ENABLE(VIDEO)
3112
3113         * rendering/MediaControlElements.cpp:
3114         * rendering/MediaControlElements.h:
3115
3116 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
3117
3118         Reviewed by Mark.
3119
3120         Enable SVG_FONTS by default.
3121
3122         * Configurations/WebCore.xcconfig:
3123         * WebCore.vcproj/build-generated-files.sh:
3124
3125 2008-01-07  Dan Bernstein  <mitz@apple.com>
3126
3127         Build fix.
3128
3129         * platform/graphics/qt/SimpleFontDataQt.cpp:
3130         (WebCore::SimpleFontData::SimpleFontData):
3131         (WebCore::SimpleFontData::~SimpleFontData):
3132
3133 2008-01-07  Adam Barth  <hk9565@gmail.com>
3134
3135         Reviewed by Sam Weinig
3136
3137         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16523
3138         <rdar://problem/5657447>
3139
3140         When a frame is created with the URL "about:blank" or "", it should
3141         inherit its SecurityOrigin from its opener.  However, once it has
3142         decided on that SecurityOrigin, it should not change its mind.
3143         Prior to this patch, several events could induce the frame to change
3144         its SecurityOrigin, permitting an attacker to inject script into an
3145         arbitrary SecurityOrigin.
3146
3147         This patch makes several changes:
3148
3149         1) Documents refuse to change from one SecurityOrigin to another
3150            unless explicitly instructed to do so.
3151
3152         2) Navigating to a JavaScript URL that produces a value
3153            preserves the current SecurityOrigin explicitly instead of
3154            relying on the URL to preserve the origin (which fails for
3155            about:blank URLs and SecurityOrigins with document.domain set).
3156
3157            Ideally, we should not preserve the URL at all.  Instead, the
3158            frame's URL should be the JavaScript URL, as in Firefox, but this
3159            would require changes that are too risky for this patch.  I'll
3160            file this as a separate issue.
3161
3162         3) Various methods of navigating to JavaScript URLs were not
3163            properly handling JavaScript that returned a value (and should
3164            therefore replace the current document).  This patch unifies
3165            those code paths with the path that works.
3166
3167            There are still a handful of bugs relating to the handling of
3168            JavaScript URLs, but I'll file those as separate issues.
3169
3170         Tests: http/tests/security/aboutBlank/xss-DENIED-navigate-opener-document-write.html
3171                http/tests/security/aboutBlank/xss-DENIED-navigate-opener-javascript-url.html
3172                http/tests/security/aboutBlank/xss-DENIED-set-opener.html
3173
3174         * dom/Document.cpp:
3175         (WebCore::Document::initSecurityOrigin):
3176         * dom/Document.h:
3177         (WebCore::Document::setSecurityOrigin):
3178         * loader/FrameLoader.cpp:
3179         (WebCore::FrameLoader::changeLocation):
3180         (WebCore::FrameLoader::urlSelected):
3181         (WebCore::FrameLoader::requestFrame):
3182         (WebCore::FrameLoader::submitForm):
3183         (WebCore::FrameLoader::executeIfJavaScriptURL):
3184         (WebCore::FrameLoader::begin):
3185         * loader/FrameLoader.h:
3186         * platform/SecurityOrigin.cpp:
3187         (WebCore::SecurityOrigin::setForURL):
3188         (WebCore::SecurityOrigin::createForFrame):
3189         * platform/SecurityOrigin.h:
3190
3191 2008-01-07  Adele Peterson  <adele@apple.com>
3192
3193         Forgot to check in these changes in my last checkin.
3194
3195         * rendering/RenderThemeSafari.cpp:
3196
3197 2008-01-07  Dan Bernstein  <mitz@apple.com>
3198
3199         Build fixes.
3200
3201         * WebCore.pro:
3202         * platform/graphics/qt/FontCacheQt.cpp:
3203         (WebCore::FontCache::getCachedFontData):
3204
3205 2008-01-07  Timothy Hatcher  <timothy@apple.com>
3206
3207         Reviewed by John Sullivan.
3208
3209         <rdar://problem/5674119> Make the Web Inspector toolbar the normal size when not docked
3210
3211         * page/inspector/inspector.css: Changed CSS rules to have the toolbar and buttons be
3212           normal height when not docked, and small when docked. Also added some cursor properties
3213           prevent showing the text cursor over areas that are not selectable.
3214         * page/inspector/Images: A few images added and old ones removed or renamed.
3215
3216 2008-01-07  Alp Toker  <alp@atoker.com>
3217
3218         Prospective GTK+ autotools/qmake VIDEO build fix for breakage
3219         introduced in r29257.
3220
3221         * GNUmakefile.am:
3222         * WebCore.pro:
3223
3224 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
3225
3226         Reviewed by Oliver.
3227
3228         Build fix affecting all builds - again related to the unicode-range addition.
3229
3230         * css/CSSFontSelector.cpp:
3231         (WebCore::CSSFontSelector::addFontFaceRule):
3232         * css/SVGCSSFontFace.cpp:
3233         (WebCore::SVGCSSFontFace::SVGCSSFontFace):
3234         * css/SVGCSSFontFace.h:
3235         * rendering/RenderSVGText.cpp:
3236         * svg/SVGFont.cpp:
3237         (WebCore::svgFontAndFontFaceElementForFontData):
3238         (WebCore::floatWidthMissingGlyphCallback):
3239         (WebCore::drawTextMissingGlyphCallback):
3240         * svg/SVGFontFaceElement.cpp:
3241
3242 2008-01-07  Adele Peterson  <adele@apple.com>
3243
3244         Reviewed by Antti, Adam, and Mitz.
3245
3246         WebCore part of fix for 
3247         <rdar://problem/5619073> Updated look for <video> controls
3248         <rdar://problem/5619057> Add volume control to video controls
3249
3250         * WebCore.base.exp: Added symbols for WebKitSystemInterface drawing methods.
3251         * WebCore.xcodeproj/project.pbxproj: Added MediaControlElements.h/cpp
3252         * WebCore.vcproj/WebCore.vcproj: ditto.
3253
3254         * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added cases for new appearances.
3255         * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): Added cases for new types.
3256         * css/CSSSelector.h: (WebCore::CSSSelector::): Added new pseudo elements.
3257         * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::checkOneSelector): ditto.
3258         * css/CSSValueKeywords.in: Added keywords for new control appearance styles.
3259         * css/html4.css: Added new styles for new controls.
3260
3261         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::canPlay): Added. Takes loading state into account.
3262         * html/HTMLMediaElement.h:
3263
3264         * page/EventHandler.cpp: (WebCore::EventHandler::updateMouseEventTargetNode): Make sure the events always go to the capturing node, if there is one.
3265
3266         * platform/mac/WebCoreSystemInterface.h: Added drawing methods for controls.
3267         * platform/mac/WebCoreSystemInterface.mm: ditto.
3268
3269         * rendering/MediaControlElements.cpp: Added.
3270         (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement): Moved from RenderMedia.  Made this relatively positioned, instead of absolute.
3271         (WebCore::MediaControlInputElement::MediaControlInputElement): Moved from RenderMedia.  Removed call to updateFromElement, 
3272          since its too early to do this here, and causes crashes for the slider.
3273         (WebCore::MediaControlInputElement::attachToParent): Moved from RenderMedia.
3274         (WebCore::MediaControlInputElement::update): ditto.
3275         (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement): Added.
3276         (WebCore::MediaControlMuteButtonElement::defaultEventHandler): ditto.
3277         (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): Moved from RenderMedia.
3278         (WebCore::MediaControlPlayButtonElement::defaultEventHandler): ditto.
3279         (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): Added.
3280         (WebCore::MediaControlSeekButtonElement::defaultEventHandler): ditto.
3281         (WebCore::MediaControlSeekButtonElement::seekTimerFired): ditto.
3282         (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Moved from RenderMedia.
3283         (WebCore::MediaControlTimelineElement::defaultEventHandler): ditto.
3284         (WebCore::MediaControlTimelineElement::update): ditto. 
3285         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Added.
3286         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): ditto.
3287         * rendering/MediaControlElements.h: Added. Moved from RenderMedia.
3288         (WebCore::MediaControlShadowRootElement::isShadowNode):
3289         (WebCore::MediaControlShadowRootElement::shadowParentNode):
3290         (WebCore::RenderMediaControlShadowRoot::RenderMediaControlShadowRoot):
3291         (WebCore::RenderMediaControlShadowRoot::setParent):
3292
3293         * rendering/RenderMedia.cpp: Moved control element classes to MediaControlElements files.
3294         (WebCore::RenderMedia::RenderMedia): No need to initialize RefPtrs.
3295         (WebCore::RenderMedia::layout): Set the position for the controlsRenderer.
3296         (WebCore::RenderMedia::createPanel): Added nil check for the renderer.
3297         (WebCore::RenderMedia::createMuteButton): Added.
3298         (WebCore::RenderMedia::createSeekBackButton): ditto.
3299         (WebCore::RenderMedia::createSeekForwardButton): ditto.
3300         (WebCore::RenderMedia::createTimeDisplay): Added nil check for the renderer.
3301         (WebCore::RenderMedia::createFullscreenButton): Added.
3302         (WebCore::RenderMedia::updateControls): Create, delete, and update new controls when appropriate.
3303         (WebCore::RenderMedia::updateControlVisibility): Don't fade controls for audio controls. 
3304         (WebCore::RenderMedia::forwardEvent): Forward events for new controls.
3305         * rendering/RenderMedia.h: Added new methods for creating new controls.
3306
3307         * rendering/RenderObject.cpp: (WebCore::RenderObject::containingBlock): Updated special case for media elements, which are replaced elements, 
3308           but also can contain children (the controls' container) that may need to look for the containing block.
3309
3310         * rendering/RenderSlider.cpp: (WebCore::RenderSlider::createThumbStyle): Added case for MediaSliderAppearance.
3311
3312         * rendering/RenderStyle.h: Added appearance constants and pseudo ids for new controls.
3313         (WebCore::):
3314         (WebCore::RenderStyle::):
3315
3316         * rendering/RenderTheme.cpp:
3317         (WebCore::RenderTheme::adjustStyle): Added cases for new appearances.
3318         (WebCore::RenderTheme::paint): ditto.
3319         * rendering/RenderTheme.h: Added new methods for painting new appearances.
3320         (WebCore::RenderTheme::paintMediaBackground):
3321         (WebCore::RenderTheme::paintMediaFullscreenButton):
3322         (WebCore::RenderTheme::paintMediaPlayButton):
3323         (WebCore::RenderTheme::paintMediaMuteButton):
3324         (WebCore::RenderTheme::paintMediaSeekBackButton):
3325         (WebCore::RenderTheme::paintMediaSeekForwardButton):
3326         (WebCore::RenderTheme::paintMediaSliderThumb):
3327         * rendering/RenderThemeMac.h:
3328         * rendering/RenderThemeMac.mm:
3329         (WebCore::RenderThemeMac::RenderThemeMac): Initialize m_mediaControlBackgroundImage.
3330         (WebCore::RenderThemeMac::~RenderThemeMac): Delete m_mediaControlBackgroundImage.
3331         (WebCore::RenderThemeMac::paintCapsLockIndicator): Use LocalCurrentGraphicsContext here too, since we use it in all other painting methods.
3332         (WebCore::RenderThemeMac::paintSliderTrack): Added case for MediaSliderAppearance.
3333         (WebCore::RenderThemeMac::adjustSliderThumbSize): Added case for MediaSliderThumbAppearance.
3334         (WebCore::RenderThemeMac::paintMediaBackground): Draws the new artwork for the controls.
3335         (WebCore::RenderThemeMac::paintMediaFullscreenButton): ditto.
3336         (WebCore::RenderThemeMac::paintMediaMuteButton): ditto.
3337         (WebCore::RenderThemeMac::paintMediaPlayButton): ditto.
3338         (WebCore::RenderThemeMac::paintMediaSeekBackButton): ditto.
3339         (WebCore::RenderThemeMac::paintMediaSeekForwardButton): ditto.
3340         (WebCore::RenderThemeMac::paintMediaSliderThumb): ditto.
3341         * rendering/RenderThemeSafari.cpp: Draws the new artwork on Windows.
3342         (WebCore::RenderThemeSafari::paintSliderTrack):
3343         (WebCore::RenderThemeSafari::adjustSliderThumbSize):
3344         (WebCore::RenderThemeSafari::paintMediaBackground):
3345         (WebCore::RenderThemeSafari::paintMediaFullscreenButton):
3346         (WebCore::RenderThemeSafari::paintMediaMuteButton):
3347         (WebCore::RenderThemeSafari::paintMediaPlayButton):
3348         (WebCore::RenderThemeSafari::paintMediaSeekBackButton):
3349         (WebCore::RenderThemeSafari::paintMediaSeekForwardButton):
3350         (WebCore::RenderThemeSafari::paintMediaSliderThumb):
3351         * rendering/RenderThemeSafari.h:
3352
3353 2008-01-07  Timothy Hatcher  <timothy@apple.com>
3354
3355         Reviewed by Darin Adler.
3356
3357         Fix ASSERTION FAILED: dstOffset + srcSegmentLength == static_cast<int>(data.size())
3358         when the replacment string is a different length.
3359
3360         * platform/text/StringImpl.cpp:
3361         (WebCore::StringImpl::replace): Move the parenthesis to be around only the subtraction in
3362         the Vector size calculation, correcting the order of math operations.
3363
3364 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
3365
3366         Reviewed by Eric. Hopefully fix build with mac tiger after the unicode-range addition. NSInteger not available there.
3367
3368         * platform/graphics/mac/FontCacheMac.mm:
3369
3370 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
3371
3372         Reviewed by Oliver. Fix build error introduced by Dan's unicode-range support patch & enabling SVG_FONTS by default.
3373
3374         * css/CSSFontSelector.cpp:
3375         (WebCore::CSSFontSelector::getFontData):
3376
3377 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
3378
3379         Not reviewed. Next try to fix wx/mac leopard build.
3380
3381         * css/CSSFontSelector.cpp: Need to wrap a SVG* include in ENABLE(SVG) blocks, as this port doesn't build this generated file.
3382         * svg/SVGFontFaceElement.cpp:
3383         (WebCore::SVGFontFaceElement::createFontData): Fix double<->float conversion issue.
3384         * webcore-base.bkl: Undo svg/ include.
3385
3386 2008-01-07  Dan Bernstein  <mitz@apple.com>
3387
3388         Reviewed by Dave Hyatt.
3389
3390         - <rdar://problem/5665216> Support the unicode-range property in @font-face rules
3391
3392         * GNUmakefile.am:
3393         * WebCore.pro:
3394         * WebCore.vcproj/WebCore.vcproj:
3395         * WebCore.xcodeproj/project.pbxproj:
3396         * WebCoreSources.bkl:
3397         * bindings/objc/DOM.mm:
3398         * bridge/mac/WebCoreAXObject.mm:
3399         * css/CSSComputedStyleDeclaration.cpp:
3400         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3401         * css/CSSFontFace.cpp:
3402         (WebCore::CSSFontFace::fontLoaded): Changed to call the owning segmented
3403         font face.
3404         (WebCore::CSSFontFace::getFontData):
3405         * css/CSSFontFace.h:
3406         (WebCore::CSSFontFace::CSSFontFace):
3407         (WebCore::CSSFontFace::setSegmentedFontFace):
3408         * css/CSSFontFaceSource.cpp:
3409         (WebCore::CSSFontFaceSource::pruneTable): Removed the calls to
3410         GlyphPageTreeNode::pruneTreeCustomFontData because the fonts in the
3411         font table are not exposed in the glyph page tree. Only the segmented
3412         font is, and that is taken care of by the segmented font face.
3413         (WebCore::CSSFontFaceSource::getFontData):
3414         * css/CSSFontFaceSource.h:
3415         * css/CSSFontSelector.cpp:
3416         (WebCore::CSSFontSelector::addFontFaceRule): Changed to collect
3417         @font-face rules with the same family and traits into a single
3418         segmented font face, instead of just retaining the most recent one.
3419         (WebCore::CSSFontSelector::fontLoaded):
3420         (WebCore::CSSFontSelector::getFontData):
3421         * css/CSSFontSelector.h:
3422         * css/CSSGrammar.y:
3423         * css/CSSParser.cpp:
3424         (WebCore::CSSParser::parseValue):
3425         (WebCore::CSSParser::parseFontFaceUnicodeRange): Added. Parses a unicode
3426         range value.
3427         * css/CSSParser.h:
3428         * css/CSSPrimitiveValue.h:
3429         (WebCore::CSSPrimitiveValue::):
3430         * css/CSSPropertyNames.in:
3431         * css/CSSSegmentedFontFace.cpp: Added.
3432         (WebCore::CSSSegmentedFontFace::CSSSegmentedFontFace):
3433         (WebCore::CSSSegmentedFontFace::~CSSSegmentedFontFace):
3434         (WebCore::CSSSegmentedFontFace::pruneTable):
3435         (WebCore::CSSSegmentedFontFace::isLoaded):
3436         (WebCore::CSSSegmentedFontFace::isValid):
3437         (WebCore::CSSSegmentedFontFace::fontLoaded):
3438         (WebCore::CSSSegmentedFontFace::overlayRange):
3439         (WebCore::CSSSegmentedFontFace::getFontData):
3440         * css/CSSSegmentedFontFace.h: Added.
3441         (WebCore::FontFaceRange::FontFaceRange):
3442         (WebCore::FontFaceRange::from):
3443         (WebCore::FontFaceRange::to):
3444         (WebCore::FontFaceRange::fontFace):
3445         (WebCore::CSSSegmentedFontFace::fontSelector):
3446         * css/CSSStyleSelector.cpp:
3447         (WebCore::CSSStyleSelector::applyProperty):
3448         * css/CSSUnicodeRangeValue.cpp: Added.
3449         (WebCore::CSSUnicodeRangeValue::~CSSUnicodeRangeValue):
3450         (WebCore::CSSUnicodeRangeValue::cssText):
3451         * css/CSSUnicodeRangeValue.h: Added.
3452         (WebCore::CSSUnicodeRangeValue::CSSUnicodeRangeValue):
3453         (WebCore::CSSUnicodeRangeValue::from):
3454         (WebCore::CSSUnicodeRangeValue::to):
3455         * css/SVGCSSFontFace.cpp:
3456         (WebCore::SVGCSSFontFace::getFontData):
3457         * css/SVGCSSFontFace.h:
3458         * editing/Editor.cpp:
3459         (WebCore::Editor::fontForSelection):
3460         * editing/Editor.h:
3461         * page/mac/FrameMac.mm:
3462         * page/mac/WebCoreFrameBridge.mm:
3463         (-[WebCoreFrameBridge fontForSelection:]):
3464         * platform/graphics/Font.cpp:
3465         (WebCore::WidthIterator::advance):
3466         (WebCore::Font::glyphDataForCharacter):
3467         (WebCore::Font::primaryFont): Changed to return the simple font data
3468         used for the space character.
3469         (WebCore::Font::fontDataAt):
3470         (WebCore::Font::fontDataForCharacters):
3471         (WebCore::Font::drawGlyphBuffer):
3472         * platform/graphics/Font.h:
3473         * platform/graphics/FontCache.cpp:
3474         (WebCore::FontCache::getCachedFontData):
3475         (WebCore::FontCache::getFontData):
3476         * platform/graphics/FontCache.h:
3477         * platform/graphics/FontData.cpp: Renamed to SimpleFontData.cpp
3478         * platform/graphics/FontData.h: Renamed to SimpleFontData.cpp.
3479         * platform/graphics/FontDataBaseClass.cpp: Added. This will be renamed
3480         FontData.cpp.
3481         (WebCore::FontData::~FontData):
3482         * platform/graphics/FontDataBaseClass.h: Added. This will be renamed
3483         FontData.h.
3484         * platform/graphics/FontFallbackList.cpp:
3485         (WebCore::FontFallbackList::determinePitch):
3486         (WebCore::FontFallbackList::fontDataAt):
3487         (WebCore::FontFallbackList::fontDataForCharacters):
3488         * platform/graphics/FontFallbackList.h:
3489         (WebCore::FontFallbackList::primaryFont):
3490         * platform/graphics/FontSelector.h:
3491         * platform/graphics/GlyphBuffer.h:
3492         (WebCore::GlyphBuffer::fontDataAt):
3493         (WebCore::GlyphBuffer::swap):
3494         (WebCore::GlyphBuffer::add):
3495         * platform/graphics/GlyphPageTreeNode.cpp:
3496         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
3497         (WebCore::GlyphPageTreeNode::initializePage): Added code to initialize
3498         pages for segmented font data.
3499         (WebCore::GlyphPageTreeNode::getChild):
3500         (WebCore::GlyphPageTreeNode::pruneCustomFontData):
3501         * platform/graphics/GlyphPageTreeNode.h:
3502         (WebCore::GlyphPage::setGlyphDataForCharacter):
3503         (WebCore::GlyphPage::setGlyphDataForIndex):
3504         (WebCore::GlyphPageTreeNode::getRootChild):
3505         * platform/graphics/SegmentedFontData.cpp: Added.
3506         (WebCore::SegmentedFontData::~SegmentedFontData):
3507         (WebCore::SegmentedFontData::fontDataForCharacter):
3508         (WebCore::SegmentedFontData::containsCharacters):
3509         (WebCore::SegmentedFontData::isCustomFont):
3510         (WebCore::SegmentedFontData::isLoading):
3511         (WebCore::SegmentedFontData::isSegmented):
3512         * platform/graphics/SegmentedFontData.h: Added.
3513         (WebCore::FontDataRange::FontDataRange):
3514         (WebCore::FontDataRange::from):
3515         (WebCore::FontDataRange::to):
3516         (WebCore::FontDataRange::fontData):
3517         (WebCore::SegmentedFontData::appendRange):
3518         (WebCore::SegmentedFontData::numRanges):
3519         (WebCore::SegmentedFontData::rangeAt):
3520         * platform/graphics/SimpleFontData.cpp: Copied from WebCore/platform/graphics/FontData.cpp.
3521         (WebCore::SimpleFontData::SimpleFontData):
3522         (WebCore::SimpleFontData::~SimpleFontData):
3523         (WebCore::SimpleFontData::ascent):
3524         (WebCore::SimpleFontData::descent):
3525         (WebCore::SimpleFontData::widthForGlyph):
3526         (WebCore::SimpleFontData::fontDataForCharacter):
3527         (WebCore::SimpleFontData::isSegmented):
3528         * platform/graphics/SimpleFontData.h: Copied from WebCore/platform/graphics/FontData.h.
3529         (WebCore::SimpleFontData::isCustomFont):
3530         (WebCore::SimpleFontData::isLoading):
3531         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3532         (WebCore::GraphicsContext::setPlatformFont):
3533         * platform/graphics/gtk/FontCacheGtk.cpp:
3534         (WebCore::FontCache::getFontDataForCharacters):
3535         * platform/graphics/gtk/FontDataGtk.cpp: Renamed to
3536         SimpleFontDataGtk.cpp.
3537         * platform/graphics/gtk/FontGtk.cpp:
3538         (WebCore::Font::drawGlyphs):
3539         * platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp:
3540         (WebCore::GlyphPage::fill):
3541         * platform/graphics/gtk/SimpleFontDataGtk.cpp: Copied from WebCore/platform/graphics/gtk/FontDataGtk.cpp.
3542         (WebCore::SimpleFontData::platformInit):
3543         (WebCore::SimpleFontData::platformDestroy):
3544         (WebCore::SimpleFontData::smallCapsFontData):
3545         (WebCore::SimpleFontData::containsCharacters):
3546         (WebCore::SimpleFontData::determinePitch):
3547         (WebCore::SimpleFontData::platformWidthForGlyph):
3548         (WebCore::SimpleFontData::setFont):
3549         * platform/graphics/mac/FontCacheMac.mm:
3550         (WebCore::FontCache::getFontDataForCharacters):
3551         * platform/graphics/mac/FontDataMac.mm: Renamed to SimpleFontDataMac.mm.
3552         * platform/graphics/mac/FontMac.mm:
3553         (WebCore::initializeATSUStyle):
3554         (WebCore::overrideLayoutOperation):
3555         (WebCore::ATSULayoutParameters::initialize):
3556         (WebCore::Font::drawGlyphs):
3557         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
3558         (WebCore::GlyphPage::fill):
3559         * platform/graphics/mac/SimpleFontDataMac.mm: Copied from WebCore/platform/graphics/mac/FontDataMac.mm.
3560         (WebCore::initFontData):
3561         (WebCore::SimpleFontData::platformInit):
3562         (WebCore::SimpleFontData::platformDestroy):
3563         (WebCore::SimpleFontData::smallCapsFontData):
3564         (WebCore::SimpleFontData::containsCharacters):
3565         (WebCore::SimpleFontData::determinePitch):
3566         (WebCore::SimpleFontData::platformWidthForGlyph):
3567         (WebCore::SimpleFontData::checkShapesArabic):
3568         * platform/graphics/qt/FontDataQt.cpp: Renamed to SimpleFontDataQt.cpp.
3569         * platform/graphics/qt/GlyphPageTreeNodeQt.cpp:
3570         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
3571         * platform/graphics/qt/SimpleFontDataQt.cpp: Copied from WebCore/platform/graphics/qt/FontDataQt.cpp.
3572         * platform/graphics/win/FontCacheWin.cpp:
3573         (WebCore::FontCache::getFontDataForCharacters):
3574         * platform/graphics/win/FontDataWin.cpp: Renamed to
3575         SimpleFontDataWin.cpp.
3576         * platform/graphics/win/FontWin.cpp:
3577         (WebCore::Font::drawGlyphs):
3578         * platform/graphics/win/GlyphPageTreeNodeWin.cpp:
3579         (WebCore::GlyphPage::fill):
3580         * platform/graphics/win/SimpleFontDataWin.cpp: Copied from WebCore/platform/graphics/win/FontDataWin.cpp.
3581         (WebCore::SimpleFontData::setShouldApplyMacAscentHack):
3582         (WebCore::SimpleFontData::platformInit):
3583         (WebCore::SimpleFontData::platformDestroy):
3584         (WebCore::SimpleFontData::smallCapsFontData):
3585         (WebCore::SimpleFontData::containsCharacters):
3586         (WebCore::SimpleFontData::determinePitch):
3587         (WebCore::SimpleFontData::platformWidthForGlyph):
3588         (WebCore::SimpleFontData::scriptFontProperties):
3589         * platform/graphics/wx/FontCacheWx.cpp:
3590         (WebCore::FontCache::getFontDataForCharacters):
3591         * platform/graphics/wx/FontDataWx.cpp: Renamed to SimpleFontDataWx.cpp.
3592         * platform/graphics/wx/FontWx.cpp:
3593         (WebCore::Font::drawGlyphs):
3594         * platform/graphics/wx/GlyphMapWx.cpp:
3595         (WebCore::GlyphPage::fill):
3596         * platform/graphics/wx/SimpleFontDataWx.cpp: Copied from WebCore/platform/graphics/wx/FontDataWx.cpp.
3597         (WebCore::SimpleFontData::platformInit):
3598         (WebCore::SimpleFontData::platformDestroy):
3599         (WebCore::SimpleFontData::smallCapsFontData):
3600         (WebCore::SimpleFontData::containsCharacters):
3601         (WebCore::SimpleFontData::determinePitch):
3602         (WebCore::SimpleFontData::platformWidthForGlyph):
3603