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