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