Reviewed by Darin Adler.
[WebKit-https.git] / WebCore / ChangeLog
1 2008-01-30  Timothy Hatcher  <timothy@apple.com>
2
3         Reviewed by Darin Adler.
4
5         ASSERTION FAILED: JSLock::lockCount() > 0 when opening the
6         Web Inspector on a page with a Database.
7
8         Fix the ASSERT by taking a JSLock before calling toJS().
9
10         * page/InspectorController.cpp:
11         (WebCore::InspectorController::addDatabaseScriptResource):
12
13 2008-01-30  Beth Dakin  <bdakin@apple.com>
14
15         Reviewed by Darin.
16
17         Fix for <rdar://problem/5598609> CrashTracer: [USER] 626 crashes in 
18         Safari at com.apple.WebCore: WebCore::FrameView::needsFullRepaint 
19         const + 6
20
21         The real problem here is tracked by rdar://5598072, which is that 
22         frames can lose sync between their view and their document when a 
23         non-HTML view is loaded (such as bookmarks view or a PDF). That can 
24         cause this crash if the layout timer fires before things have fixed 
25         themselves. This fix turns an ASSERT in FrameView::layout() into an 
26         early return to cause graceful failure until the root of the 
27         problem is addressed. 
28
29         * page/FrameView.cpp:
30         (WebCore::FrameView::layout):
31
32 2008-01-30  Justin Garcia  <justin.garcia@apple.com>
33
34         Reviewed by Darin Adler.
35
36         <rdar://problem/5700414> REGRESSION (Adama-ToT): Selecting "Header 1" style in Leopard Server wiki inserts newline
37
38         * editing/FormatBlockCommand.cpp:
39         (WebCore::FormatBlockCommand::doApply): If the selected paragraph was empty,
40         we may still need to call moveParagrah to remove the line break that holds that
41         paragraph open because the new block of the requested type needs to to replace it.
42
43 2008-01-30  Timothy Hatcher  <timothy@apple.com>
44
45         Reviewed by Darin Adler.
46
47         <rdar://problem/5688428> Reproducible assertion failure in SQLTransaction::performNextStep() (16876)
48
49         Revised fix to use the globalCallbackMutex() mutex and hold the mutex
50         for the entire function scope.
51
52         * storage/Database.cpp:
53         (WebCore::Database::performTransactionStep):
54
55 2008-01-30  Timothy Hatcher  <timothy@apple.com>
56
57         Reviewed by Adam Roben.
58
59         Make ResourceTreeElement inherit the prototype of TreeElement.
60
61         * page/inspector/Resource.js:
62
63 2008-01-30  Sam Weinig  <sam@webkit.org>
64
65         Reviewed by Adam Roben.
66
67         Don't include SecurityOrigin.h in Document.h so that we can avoid massive
68         recompilation when changing the SecurityOrigin.
69
70         * dom/Document.cpp:
71         (WebCore::Document::setSecurityOrigin):
72         * dom/Document.h:
73
74 2008-01-30  Tim Omernick  <timo@apple.com>
75
76         Reviewed by Tim Hatcher and Brady.
77
78         <rdar://problem/5688428> Reproducible assertion failure in SQLTransaction::performNextStep() (16876)
79
80         * storage/Database.cpp:
81         (WebCore::Database::performTransactionStep): Do not perform the next transaction if
82         a global callback is already scheduled.
83
84 2008-01-30  Jon Honeycutt  <jhoneycutt@apple.com>
85
86         Reviewed by Darin.
87
88         <rdar://problem/5669317> Crash closing pop up window with Real Player
89         content
90
91         Some RealPlayer versions hang on unload. To prevent this hang, don't
92         unload versions since the last known unloadable version.
93         <rdar://problem/5713147> tracks revisiting this when the bug in
94         RealPlayer is fixed and we can again unload the plug-in.
95
96         * plugins/win/PluginPackageWin.cpp:
97         (WebCore::PluginPackageWin::compareFileVersion): Compare the plug-in's
98         file version to the passed file version, returning -1, 0, or 1 if the
99         plug-in's version is less than, equal to, or greater than the version
100         passed.
101         (WebCore::PluginPackageWin::isPluginBlacklisted): Use
102         compareFileVersion()
103         * plugins/win/PluginPackageWin.h:
104         * plugins/win/PluginViewWin.cpp:
105         (WebCore::PluginViewWin::determineQuirks): If the plug-in version is
106         newer than the last-known unloadable version, add the DontUnloadPlugin
107         quirk
108
109 2008-01-29  Mark Rowe  <mrowe@apple.com>
110
111         Reviewed by Tim Hatcher.
112
113         Look for headers relative to NEXT_ROOT so that build-root picks up the WebCoreSQLite
114         version of sqlite3.h rather than the older system version.
115
116         * Configurations/Base.xcconfig:
117
118 2008-01-29  Dan Bernstein  <mitz@apple.com>
119
120         - build fix
121
122         * loader/CachedFont.cpp:
123         (WebCore::CachedFont::CachedFont):
124
125 2008-01-29  Mark Rowe  <mrowe@apple.com>
126
127         Reviewed by Brady Eidson.
128
129         Add the correct directory to the header search paths in Production builds.
130
131         * Configurations/Base.xcconfig:
132
133 2008-01-29  Dan Bernstein  <mitz@apple.com>
134
135         Reviewed by Dave Hyatt.
136
137         - fix http://bugs.webkit.org/show_bug.cgi?id=17085
138           <rdar://problem/5714136> REGRESSION (r29839): All remote fonts are treated as SVG fonts
139
140         Test: fast/css/font-face-remote.html
141
142         Added an isSVGFont method to CachedFont and use it to decide how to
143         process the font data. Currently whether the data is SVG is determined
144         based on the format property in the @font-face rule, but in the future
145         the MIME type or other metadata may be used when the format is
146         unspecified.
147
148         * css/CSSFontFaceSource.cpp:
149         (WebCore::CSSFontFaceSource::getFontData): Changed to parse the data as
150         SVG only if the CachedFont is an SVG font.
151         * css/CSSFontSelector.cpp:
152         (WebCore::CSSFontSelector::addFontFaceRule): Mark the CachedFont as an
153         SVG font based on format.
154         * loader/CachedFont.cpp:
155         (WebCore::CachedFont::CachedFont): Initialize m_isSVGFont to false.
156         (WebCore::CachedFont::ensureCustomFontData):
157         (WebCore::CachedFont::ensureSVGFontData):
158         (WebCore::CachedFont::getSVGFontById):
159         * loader/CachedFont.h:
160         (WebCore::CachedFont::isSVGFont): Added.
161         (WebCore::CachedFont::setSVGFont): Added.
162
163 2008-01-29  Antti Koivisto  <antti@apple.com>
164
165         Some comment cleanup.
166
167         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
168         (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
169         * platform/graphics/win/QTMovieWin.cpp:
170         (QTMovieWin::load):
171         (QTMovieWin::disableUnsupportedTracks):
172
173 2008-01-29  Adele Peterson  <adele@apple.com>
174
175         Reviewed by Antti.
176
177         Fix for <rdar://5683527> media/{audio,video|-controls-rendering.html failing
178         
179         * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::isControlStyled):
180         Don't treat all media controls as styled.  This causes builds with an old version of SafariTheme to have different metrics for these controls.
181
182 2008-01-29  Dan Bernstein  <mitz@apple.com>
183
184         Reviewed by Dave Hyatt.
185
186         - make Font instances cache their primary font
187
188         * WebCore.base.exp:
189         * platform/graphics/Font.cpp:
190         (WebCore::Font::Font):
191         (WebCore::Font::operator=):
192         (WebCore::Font::cachePrimaryFont):
193         (WebCore::Font::update):
194         * platform/graphics/Font.h:
195         (WebCore::Font::primaryFont):
196
197 2008-01-29  Dan Bernstein  <mitz@apple.com>
198
199         - Leopard build fix
200
201         * platform/graphics/SimpleFontData.cpp:
202         (WebCore::SimpleFontData::SimpleFontData):
203
204 2008-01-29  Mark Rowe  <mrowe@apple.com>
205
206         Reviewed by Tim Hatcher.
207
208         <rdar://problem/5600926> WebCore on Tiger must link to its own copy of SQLite 3.4 or newer (so HTML database behavior will be correct).
209
210         * Configurations/Base.xcconfig: Update the header search path on Tiger.
211         * Configurations/DebugRelease.xcconfig: Update the header search path on Tiger.
212         * Configurations/WebCore.xcconfig: Link against libWebCoreSQLite3.a when building on Tiger.
213         * WebCore.xcodeproj/project.pbxproj: Update the header search path in Production builds on Tiger.
214
215 2008-01-29  Dan Bernstein  <mitz@apple.com>
216
217         Reviewed by Adam Roben and Oliver Hunt.
218
219         - fix <rdar://problem/5713131> REGRESSION (r29246): Many SVG font tests are failing
220
221         * platform/graphics/SimpleFontData.cpp:
222         (WebCore::SimpleFontData::SimpleFontData): Use double instead of float
223         for consistent rounding behavior between Mac OS X and Windows.
224
225 2008-01-29  Adam Roben  <aroben@apple.com>
226
227         Fix <rdar://5713302> Web Inspector on Windows is not using the
228         localized strings
229
230         Reviewed by Steve.
231
232         * WebCore.vcproj/WebCore.vcproj: Copy InspectorLocalizedStrings.js to
233         $WebKitOutputDir.
234         * page/InspectorController.cpp: Touch this to force the project to
235         build.
236
237 2008-01-29  Eric Seidel  <eric@webkit.org>
238
239         Reviewed by Nikolas.
240
241         Acid3 after double-attach
242         http://bugs.webkit.org/show_bug.cgi?id=17058
243         
244         I believe SVGTextPathElement::buildPendingResource() was entirely
245         bogus, removing it did not cause any tests to fail.
246
247         Test: svg/custom/textPath-assert.svg
248
249         * svg/SVGTextPathElement.cpp:
250         (WebCore::SVGTextPathElement::insertedIntoDocument): remove buildPendingResource()
251         * svg/SVGTextPathElement.h:
252
253 2008-01-29  Adam Roben  <aroben@apple.com>
254
255         Fix Bug 16234: Inspector should support searching for elements by CSS selectors
256
257         <http://bugs.webkit.org/show_bugs.cgi?id=16234>
258         <rdar://5712862>
259
260         Reviewed by Tim.
261
262         * page/inspector/inspector.js: Use Document.querySelectorAll to search
263         for elements by CSS selector. Also store a custom property on nodes
264         being added to the search results to avoid showing the same node more
265         than once.
266
267 2008-01-29  Adam Roben  <aroben@apple.com>
268
269         Fix <rdar://5711136> Full-screen Flash on 1up.com is unresponsive
270
271         Reviewed by Anders and Darin.
272
273         No test possible.
274
275         * plugins/win/PluginViewWin.cpp:
276         (WebCore::PluginViewWin::wndProc): Set/release capture on mouse
277         down/up, like Firefox does.
278
279 2008-01-28  Dan Bernstein  <mitz@apple.com>
280
281         Reviewed by Sam Weinig.
282
283         - make isSVGFont non-virtual
284
285         * platform/graphics/FontData.h:
286         * platform/graphics/SegmentedFontData.cpp:
287         * platform/graphics/SegmentedFontData.h:
288         * platform/graphics/SimpleFontData.h:
289         (WebCore::SimpleFontData::isSVGFont):
290
291 2008-01-28  Dan Bernstein  <mitz@apple.com>
292
293         Reviewed by Adam Roben.
294
295         - fix <rdar://problem/5700824> Chunky scrolling + scrolling artifacts @ netflix.com/Notebook
296
297         * platform/win/ScrollViewWin.cpp:
298         (WebCore::ScrollView::ScrollViewPrivate::valueChanged): Send the scroll
299         event before updating the window, thus giving event handlers a chance
300         to update layout for the new scroll position, eliminating the jitter.
301
302 2008-01-28  Adam Roben  <aroben@apple.com>
303
304         Fix <rdar://5555260> Gmail doesn't load when a user stylesheet is specified
305
306         Reviewed by Darin.
307
308         A null value exception was being thrown in Gmail's JS code because a
309         call to document.write failed. document.write failed because
310         Document::close had not yet been called. Document::close was not
311         called because the Document was considered to not be "complete" in
312         FrameLoader::checkComplete because the user stylesheet was in the
313         process of loading. The user stylesheet was loading because it had
314         previously been evicted from the cache and was loading fresh from
315         disk. It had been evicted from the cache because the calculation of
316         the expiration date was incorrectly casting/overflowing in
317         ResourceResponseCFNet.cpp.
318
319         We now calculate the expiration date in a way that does not cause us
320         to overflow a time_t, and we correctly clamp the value to the range of
321         a time_t. I also made the fix for the last modified date, though that
322         was not causing any bug I am aware of.
323
324         In the long-term it seems like whether or not Document::close is
325         called should not be dependent upon whether the user stylesheet has
326         finished loading or not.
327
328         * platform/network/cf/ResourceResponseCFNet.cpp:
329         (WebCore::toTimeT): Added. Converts from CFAbsoluteTime to time_t and
330         clamps to the range of time_t.
331         (WebCore::ResourceResponse::doUpdateResourceResponse): Call toTimeT.
332
333 2008-01-28  Dan Bernstein  <mitz@apple.com>
334
335         Reviewed by Nikolas Zimmermann.
336
337         - fix leaks introduced in r29838
338
339         * svg/SVGFont.cpp:
340         (WebCore::floatWidthMissingGlyphCallback):
341         (WebCore::drawTextMissingGlyphCallback):
342
343 2008-01-28  Nikolas Zimmermann  <zimmermann@kde.org>
344
345         Reviewed by Eric, Dan & Oliver.
346
347         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16980
348
349         Support external SVG Fonts, by reusing the custom font handling logic.
350         This enables us - as first engine - to render HTML pages using SVG Fonts.
351
352         Fixes fonts-elem-03-b.svg / fonts-elem-04-b.svg / fonts-elem-07-b.svg
353         Add new testcase svg-fonts-in-html.html.
354
355         * css/CSSFontFaceSource.cpp:
356         (WebCore::CSSFontFaceSource::getFontData):
357         * css/CSSFontFaceSource.h:
358         * css/CSSFontFaceSrcValue.cpp:
359         (WebCore::CSSFontFaceSrcValue::isSVGFontFaceSrc):
360         (WebCore::CSSFontFaceSrcValue::isSupportedFormat):
361         * css/CSSFontFaceSrcValue.h:
362         * css/CSSFontSelector.cpp:
363         (WebCore::CSSFontSelector::addFontFaceRule):
364         * loader/CachedFont.cpp:
365         (WebCore::CachedFont::~CachedFont):
366         (WebCore::CachedFont::ensureSVGFontData):
367         (WebCore::CachedFont::extractFontFromSVGData):
368         (WebCore::CachedFont::platformDataFromSVGData):
369         * loader/CachedFont.h:
370         * platform/graphics/Font.cpp:
371         (WebCore::Font::offsetForPosition):
372         * platform/graphics/Font.h:
373         * svg/SVGFont.cpp:
374         (WebCore::floatWidthOfSubStringUsingSVGFont):
375         (WebCore::Font::drawTextUsingSVGFont):
376         (WebCore::Font::offsetForPositionForTextUsingSVGFont):
377         * svg/SVGFontFaceElement.cpp:
378         (WebCore::SVGFontFaceElement::rebuildFontFace):
379         * svg/SVGFontFaceElement.h:
380         * svg/SVGFontFaceUriElement.cpp:
381         (WebCore::SVGFontFaceUriElement::srcValue):
382
383 2008-01-28  Dan Bernstein  <mitz@apple.com>
384
385         Reviewed by Adam Roben.
386
387         - fix svg/W3C-SVG-1.1/fonts-glyph-04-t.svg failure on Windows
388
389         The results differed between Mac OS X and Windows because the code was
390         using a 0-size font, which Mac OS X changes to 12pt.
391
392         * svg/SVGFont.cpp:
393         (WebCore::floatWidthMissingGlyphCallback): Use the font description of
394         the primary font to initialize the fallback font.
395         (WebCore::drawTextMissingGlyphCallback): Ditto.
396
397 2008-01-28  Eric Seidel  <eric@webkit.org>
398
399         Reviewed by Nikolas Zimmermann.
400
401         Use class instead of struct to appease MSVC.
402
403         * history/HistoryItem.h:
404         * loader/FrameLoaderClient.h:
405         * page/InspectorController.h:
406         * platform/network/ResourceRequestBase.h:
407         * platform/network/mac/ResourceRequest.h:
408
409 2008-01-28  Dan Bernstein  <mitz@apple.com>
410
411         Reviewed by Darin Adler.
412
413         - fix http://bugs.webkit.org/show_bug.cgi?id=16774
414           REGRESSION (r27464-r27504) javascript popup menu does not display 'close' button
415
416         Test: fast/dynamic/float-no-longer-overhanging.html
417
418         * rendering/RenderBlock.cpp:
419         (WebCore::RenderBlock::addOverhangingFloats): If a child's float turns
420         out not to be overhanging at this time, ensure that the child paints it.
421
422 2008-01-28  Oliver Hunt  <oliver@apple.com>
423
424         More wx fixes
425
426         * platform/graphics/wx/AffineTransformWx.cpp:
427
428 2008-01-28  Oliver Hunt  <oliver@apple.com>
429
430         And another Wx build fix
431
432         * platform/graphics/wx/AffineTransformWx.cpp:
433         (WebCore::AffineTransform::mapRect):
434
435 2008-01-28  Oliver Hunt  <oliver@apple.com>
436
437         Yet another Wx build fix
438
439         * platform/graphics/wx/GraphicsContextWx.cpp:
440
441 2008-01-28  Oliver Hunt  <oliver@apple.com>
442
443         Wx build fix
444
445         * platform/graphics/wx/GraphicsContextWx.cpp:
446         (WebCore::GraphicsContext::getCTM):
447
448 2008-01-28  Oliver Hunt  <oliver@apple.com>
449
450         Gtk build fix
451
452         * platform/graphics/cairo/GraphicsContextCairo.cpp:
453
454 2008-01-27  Oliver Hunt  <oliver@apple.com>
455
456         Reviewed by Sam Weinig.
457
458         Bug 16629: <canvas> does not support isPointInPath()
459
460         Relatively trivial change to implement pointInPath and add
461         it to the bindings.  Most of this patch is the addition of
462         GraphicsContext::getCTM() by pulling the various platform
463         implementations from CanvasRenderingContext2D::willDraw
464
465         Test: fast/canvas/pointInPath.html
466
467         * html/CanvasRenderingContext2D.cpp:
468         (WebCore::CanvasRenderingContext2D::isPointInPath):
469         (WebCore::CanvasRenderingContext2D::willDraw):
470         * html/CanvasRenderingContext2D.h:
471         * html/CanvasRenderingContext2D.idl:
472         * platform/graphics/AffineTransform.cpp:
473         (WebCore::AffineTransform::mapPoint):
474           Support mapping of FloatRects
475         * platform/graphics/AffineTransform.h:
476         * platform/graphics/GraphicsContext.h:
477         * platform/graphics/cairo/GraphicsContextCairo.cpp:
478         (WebCore::GraphicsContext::getCTM):
479         * platform/graphics/cg/GraphicsContextCG.cpp:
480         (WebCore::GraphicsContext::getCTM):
481         * platform/graphics/qt/GraphicsContextQt.cpp:
482         (WebCore::GraphicsContext::getCTM):
483
484 2008-01-27  Alexey Proskuryakov  <ap@webkit.org>
485
486         Reviewed by Darin.
487
488         http://bugs.webkit.org/show_bug.cgi?id=17014
489         REGRESSION: EUC-CN code A3A0 is mapped to U+E5E5 instead of U+3000
490
491         Test: fast/encoding/char-decoding.html
492
493         * platform/text/TextCodecICU.cpp:
494         (WebCore::TextCodecICU::decode): Added a workaround that we used to have in Mac code.
495
496         * platform/text/mac/TextCodecMac.cpp:
497         (WebCore::TextCodecMac::decode): Corrected a comment.
498
499 2008-01-27  Alp Toker  <alp@atoker.com>
500
501         Reviewed by Mark Rowe.
502
503         http://bugs.webkit.org/show_bug.cgi?id=17029
504         Use of deprecated class function but declares GTK_DISABLE_DEPRECATED
505
506         Sync gtkdrawing.h (1.51) and gtk2drawing.c (1.71) from Mozilla
507         upstream.
508
509         Adapt RenderThemeGtk.cpp to track minor changes.
510
511         * platform/gtk/RenderThemeGtk.cpp:
512         (WebCore::gtkTextDirection):
513         (WebCore::adjustMozStyle):
514         (WebCore::setMozState):
515         (WebCore::paintMozWidget):
516         * platform/gtk/gtk2drawing.c:
517         (setup_widget_prototype):
518         (ensure_hpaned_widget):
519         (ensure_vpaned_widget):
520         (ensure_toggle_button_widget):
521         (ensure_combo_box_entry_widget):
522         (ensure_dropdown_entry_widget):
523         (moz_gtk_get_dropdown_button):
524         (ensure_arrow_widget):
525         (ensure_toolbar_separator_widget):
526         (ensure_statusbar_widget):
527         (ensure_frame_widget):
528         (ensure_menu_separator_widget):
529         (ensure_tree_view_widget):
530         (ensure_tree_header_cell_widget):
531         (ensure_expander_widget):
532         (ConvertGtkState):
533         (moz_gtk_button_paint):
534         (moz_gtk_widget_get_focus):
535         (moz_gtk_splitter_get_metrics):
536         (moz_gtk_toggle_paint):
537         (moz_gtk_scrollbar_button_paint):
538         (moz_gtk_scrollbar_trough_paint):
539         (moz_gtk_scrollbar_thumb_paint):
540         (moz_gtk_spin_paint):
541         (moz_gtk_spin_updown_paint):
542         (moz_gtk_scale_paint):
543         (moz_gtk_scale_thumb_paint):
544         (moz_gtk_gripper_paint):
545         (moz_gtk_hpaned_paint):
546         (moz_gtk_vpaned_paint):
547         (moz_gtk_entry_paint):
548         (moz_gtk_treeview_paint):
549         (moz_gtk_tree_header_cell_paint):
550         (moz_gtk_tree_header_sort_arrow_paint):
551         (moz_gtk_treeview_expander_paint):
552         (moz_gtk_expander_paint):
553         (moz_gtk_option_menu_paint):
554         (moz_gtk_downarrow_paint):
555         (moz_gtk_dropdown_arrow_paint):
556         (moz_gtk_container_paint):
557         (moz_gtk_toggle_label_paint):
558         (moz_gtk_toolbar_paint):
559         (moz_gtk_toolbar_separator_paint):
560         (moz_gtk_tooltip_paint):
561         (moz_gtk_resizer_paint):
562         (moz_gtk_frame_paint):
563         (moz_gtk_progressbar_paint):
564         (moz_gtk_progress_chunk_paint):
565         (moz_gtk_get_tab_thickness):
566         (moz_gtk_tab_paint):
567         (moz_gtk_tabpanels_paint):
568         (moz_gtk_menu_bar_paint):
569         (moz_gtk_menu_popup_paint):
570         (moz_gtk_menu_separator_paint):
571         (moz_gtk_menu_item_paint):
572         (moz_gtk_menu_arrow_paint):
573         (moz_gtk_check_menu_item_paint):
574         (moz_gtk_window_paint):
575         (moz_gtk_get_widget_border):
576         (moz_gtk_get_dropdown_arrow_size):
577         (moz_gtk_get_toolbar_separator_width):
578         (moz_gtk_get_expander_size):
579         (moz_gtk_get_treeview_expander_size):
580         (moz_gtk_get_menu_separator_height):
581         (moz_gtk_widget_paint):
582         (moz_gtk_shutdown):
583         * platform/gtk/gtkdrawing.h:
584
585 2008-01-27  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
586
587         Reviewed by Alp Toker.
588
589         http://bugs.webkit.org/show_bug.cgi?id=14811
590         [gtk] [request] add a webkit_gtk_page_go_to_history_item function
591
592         Added webkit/gtk webkitwebbackforwardlist and webkitwebhistoryitem
593
594         * WebCore.pro:
595
596 2008-01-27  Matt Perry  <mpComplete@gmail.com>
597
598         Reviewed and tweaked quite a bit by Darin.
599
600         Fix for http://bugs.webkit.org/show_bug.cgi?id=14959
601         No back forward entry added for pages created in javascript
602
603         A new HistoryItem is created for calls to Document::open. Calls to
604         Document::write save the written data to a SharedBuffer that is also
605         stored on the HistoryItem. When the user navigates back to a
606         HistoryItem that has a valid buffer, that data is used for the page
607         content.
608
609         Tests: http/tests/navigation/document-open-adds-history-item.html
610                http/tests/navigation/document-open-delayed-adds-history-item.html
611                http/tests/navigation/document-open-new-window-adds-history-item.html
612                http/tests/navigation/document-open-replace-no-history-item.html
613
614         * bindings/js/JSHTMLDocumentCustom.cpp:
615         (WebCore::JSHTMLDocument::open): Pass a MIME type of either "text/html" or
616         "text/plain" and a boolean for "replace" in rather than always setting replace
617         to true and the MIME type to "text/html".
618
619         * dom/DOMImplementation.cpp:
620         (WebCore::DOMImplementation::createHTMLDocument): Pass in MIME type and
621         replace boolean explicitly, since we don't want to rely on Document::open()'s
622         default.
623
624         * dom/Document.cpp:
625         (WebCore::Document::open): Correctly determine the "replace" boolean.
626         Pass along the MIME type, replace boolean, and shared buffer to the
627         frame loader's didExplicitOpen function.
628         (WebCore::Document::write): Pass MIME type and replace boolean explicitly
629         to the open function so we don't do treat it as replace if you write without
630         an open. Store text written by the script so it can be used later for history.
631         (WebCore::Document::clear): Drop the text written byt he script.
632
633         * dom/Document.h: Added MIME type and replace boolean parameters for open.
634         Had to keep the old version for the sake of DOM bindings. Added the shared
635         buffer used for text written by script.
636
637         * history/HistoryItem.cpp:
638         (WebCore::HistoryItem::HistoryItem): Copy m_substituteData.
639         (WebCore::HistoryItem::substituteData): Added.
640         (WebCore::HistoryItem::setSubstituteData): Added.
641         * history/HistoryItem.h: Added m_substituteData, getter, and setter.
642
643         * loader/FrameLoader.cpp:
644         (WebCore::FrameLoader::didExplicitOpen): Added code to create or update the
645         history item, including attaching the shared buffer that will contain all
646         the data written by script.
647         (WebCore::FrameLoader::load): Added a SubstituteData parameter, passed through
648         when creating the document loader.
649         (WebCore::FrameLoader::reloadAllowingStaleData): Create the document loader
650         with the substitute data from the current history item.
651         (WebCore::FrameLoader::reload): Ditto.
652         (WebCore::FrameLoader::shouldTreatURLAsSameAsCurrent): If the current history
653         item has substitute data, then consider the URL from the substitute data
654         rather than the one in the history item itself.
655         (WebCore::FrameLoader::loadItem): Pass in the history item's substitute data.
656         * loader/FrameLoader.h: Added parameters to load and didExplicitOpen.
657
658         * platform/text/CharacterNames.h: Added byteOrderMark, and also added it under
659         its other official name, zeroWidthNoBreakSpace.
660
661         * xml/DOMParser.cpp:
662         (WebCore::DOMParser::parseFromString): Pass in MIME type and replace boolean
663         explicitly, since we don't want to rely on Document::open()'s default.
664         * xml/XMLHttpRequest.cpp:
665         (WebCore::XMLHttpRequest::getResponseXML): Ditto.
666         * xml/XSLTProcessor.cpp:
667         (WebCore::XSLTProcessor::createDocumentFromSource): Ditto.
668
669 2008-01-25  Eric Seidel  <eric@webkit.org>
670
671         Reviewed by Sam and Darin.
672
673         Fire a warning shot in DeprecatedChar's direction.
674
675         Remove DeprecatedChar::isSpace() usage, in preparation for removing DeprecatedChar
676         Remove a needless String -> DeprecatedString -> String conversion for <script> tags
677
678         * css/MediaQueryEvaluator.cpp:
679         (WebCore::parseAspectRatio):
680         * css/SVGCSSParser.cpp:
681         * dom/Position.cpp:
682         (WebCore::Position::leadingWhitespacePosition):
683         (WebCore::Position::trailingWhitespacePosition):
684         * editing/TextIterator.cpp:
685         (WebCore::WordAwareIterator::advance):
686         * html/HTMLFontElement.cpp:
687         (WebCore::parseFontSizeNumber):
688         * html/HTMLTokenizer.cpp:
689         (WebCore::HTMLTokenizer::scriptHandler):
690         (WebCore::HTMLTokenizer::scriptExecution):
691         (WebCore::HTMLTokenizer::notifyFinished):
692         * html/HTMLTokenizer.h:
693         * loader/CachedCSSStyleSheet.cpp:
694         * loader/TextResourceDecoder.cpp:
695         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
696         * platform/mac/ClipboardMac.mm:
697         (WebCore::ClipboardMac::getData):
698         * platform/network/HTTPParsers.cpp:
699         (WebCore::extractMIMETypeFromMediaType):
700         * platform/text/PlatformString.h:
701         * platform/text/StringImpl.cpp:
702         (WebCore::parseLength):
703         (WebCore::StringImpl::stripWhiteSpace):
704         (WebCore::StringImpl::simplifyWhiteSpace):
705         (WebCore::StringImpl::toInt):
706         (WebCore::StringImpl::toInt64):
707         (WebCore::StringImpl::toUInt64):
708         * platform/text/StringImpl.h:
709         (WebCore::isSpaceOrNewline):
710         * rendering/InlineFlowBox.cpp:
711         (WebCore::InlineFlowBox::placeBoxesHorizontally):
712         * rendering/RenderBlock.cpp:
713         (WebCore::RenderBlock::updateFirstLetter):
714         * rendering/bidi.cpp:
715         (WebCore::RenderBlock::computeHorizontalPositionsForLine):
716         * svg/SVGFontFaceElement.cpp:
717         (WebCore::mapAttributeToCSSProperty):
718         * svg/SVGLength.cpp:
719         * svg/SVGStyledElement.cpp:
720         (WebCore::mapAttributeToCSSProperty):
721         * xml/XPathParser.cpp:
722
723 2008-01-25  Stephanie Lewis  <slewis@apple.com>
724
725         Reviewed by Tim.
726
727         expand workaround for <rdar://5695848> to include js files so that the
728         web inspector can work
729
730         * platform/network/cf/ResourceResponseCFNet.cpp:
731         (WebCore::ResourceResponse::doUpdateResourceResponse):
732
733 2008-01-25  Antti Koivisto  <antti@apple.com>
734
735         Reviewed by Adele.
736         
737         (this is for r29798, my commit failed to include the log)
738         
739         Windows fix to match r29773
740         If the media is playing and the load stalls the playback wont restart by seeking backwards.      
741
742         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
743         (WebCore::MediaPlayerPrivate::updateStates):
744
745 2008-01-25  Darin Adler  <darin@apple.com>
746
747         Reviewed by Anders.
748
749         - fix <rdar://problem/5691072> ASSERTION FAILED: isPrepared() when executing an empty statement
750
751         For empty statements, SQLite returns 0 for the statement. We have to cope with that.
752
753         Test: storage/empty-statement.html
754
755         * platform/sql/SQLiteStatement.cpp:
756         (WebCore::sqlite3_prepare16_v2): Added overload so we don't need an #if inside the prepare
757         function.
758         (WebCore::SQLiteStatement::SQLiteStatement): Initialize the m_isPrepared boolean. Removed
759         the code to add a null character to the end of the string; instead we will use
760         charactersWithNullTermination.
761         (WebCore::SQLiteStatement::prepare): Set m_isPrepared based on the error value returned.
762         Use the error value from sqlite3_prepare16_v2, not from lastError().
763         (WebCore::SQLiteStatement::step): Assert that the statement is prepared rather than checking
764         it at runtime. However, in the case where this is called with m_statement of 0, return
765         success rather than an error. That's needed for empty statements.
766         (WebCore::SQLiteStatement::finalize): Use early return idiom for clarity. When there is no
767         statement, return SQLITE_OK instead of calling lastError().
768         (WebCore::SQLiteStatement::reset): Use early return idiom for clarity. When there is no
769         statement, return SQLITE_OK rather than SQLITE_ERROR, but assert the statement is prepared.
770         (WebCore::SQLiteStatement::executeCommand): Adjust the code that does a prepare so that it
771         will work for empty statements. Do we really need to allow calling this without prepare?
772         It would be simpler to just be able to assert that it's prepared.
773         (WebCore::SQLiteStatement::returnsAtLeastOneResult): Ditto.
774         (WebCore::SQLiteStatement::bindBlob): Added some assertions. Return SQLITE_ERROR if this
775         is called with m_statement of 0 (should not be possible without assertions firing first).
776         Return the actual error code rather than lastError().
777         (WebCore::SQLiteStatement::bindText): Ditto. Also simplified the special case for empty
778         strings, since it requires any non-null pointer, not a pointer to a global zero character.
779         (WebCore::SQLiteStatement::bindInt64): Ditto.
780         (WebCore::SQLiteStatement::bindDouble): Ditto.
781         (WebCore::SQLiteStatement::bindNull): Ditto.
782         (WebCore::SQLiteStatement::bindValue): Moved default case out of the switch to take
783         advantage of the gcc compiler warning for unhandled enum values in a switch.
784         (WebCore::SQLiteStatement::bindParameterCount): Added assertion and code to handle the
785         empty statement case.
786         (WebCore::SQLiteStatement::columnCount): Added assertion and changed the code to use
787         the early-return idiom.
788         (WebCore::SQLiteStatement::getColumnName): Removed getColumnName16 -- we always use 16-bit
789         characters and have no reason to ever use the 8-bit function. Added assertions about the
790         passed-in column number. It's a little strange that this function checks the column number
791         for too-large column numbers, but not for negative ones. I didn't change that for now.
792         (WebCore::SQLiteStatement::getColumnText): Ditto.
793         (WebCore::SQLiteStatement::getColumnDouble): Ditto.
794         (WebCore::SQLiteStatement::getColumnInt): Ditto.
795         (WebCore::SQLiteStatement::getColumnInt64): Ditto.
796         (WebCore::SQLiteStatement::getColumnBlobAsVector): Ditto.
797         (WebCore::SQLiteStatement::getColumnBlob): Tightened up function a bit, including use of
798         the early-return idiom and replacing the multiple "size = 0" with a single one at the
799         start of the function.
800         (WebCore::SQLiteStatement::returnTextResults): Added a failure case when the prepare
801         call doesn't work. Cleared the vector earlier to make the failure code simpler. Moved
802         the declaration of the result boolean down lower to make it clearer what it's for.
803         Changed use of lastError() to call on the database, to make it clearer that there's
804         no per-statement last error kept around. It'd be even better to not use lastError() here.
805         (WebCore::SQLiteStatement::returnIntResults): Ditto.
806         (WebCore::SQLiteStatement::returnInt64Results): Ditto.
807         (WebCore::SQLiteStatement::returnDoubleResults): Ditto.
808         (WebCore::SQLiteStatement::isExpired): Changed to use || rather than ?: because I think
809         it's slightly easier to read that way.
810
811         * platform/sql/SQLiteStatement.h: Removed unneeded includes and forward declarations.
812         Also removed unnneeded functions isPrepared, getColumnName16, getColumnText16,
813         returnTextResults16, lastError, and lastErrorMsg. Changed prepareAndStep so that it
814         checks the result of prepare before callling step. Added a debug-only m_isPrepared boolean.
815
816         * loader/icon/IconDatabase.cpp:
817         (WebCore::IconDatabase::checkIntegrity): Remove 16 suffix from text-related function names.
818         (WebCore::IconDatabase::performURLImport): Ditto.
819         (WebCore::IconDatabase::pruneUnretainedIcons): Ditto.
820         * platform/sql/SQLiteDatabase.cpp:
821         (WebCore::SQLiteDatabase::clearAllTables): Ditto.
822         * storage/Database.cpp:
823         (WebCore::retrieveTextResultFromDatabase): Ditto.
824         (WebCore::Database::performGetTableNames): Ditto.
825         * storage/DatabaseTracker.cpp:
826         (WebCore::DatabaseTracker::fullPathForDatabase): Ditto.
827         (WebCore::DatabaseTracker::populateOrigins): Ditto.
828         (WebCore::DatabaseTracker::databaseNamesForOrigin): Ditto.
829         (WebCore::DatabaseTracker::addDatabase): Ditto.
830         * storage/SQLStatement.cpp:
831         (WebCore::SQLStatement::execute): Ditto.
832
833         * platform/sql/SQLiteDatabase.h: Removed unneeded includes.
834         * storage/SQLResultSet.h: Ditto.
835         * storage/SQLResultSetRowList.h: Ditto.
836
837 2008-01-25  Adele Peterson  <adele@apple.com>
838
839         Reviewed by Sam.
840
841         Fix for <rdar://problem/5679452> Finish tweaking layout/alignment of media controls slider to match QuickTime plug-in
842
843         * css/html4.css: Add horizontal padding to the media slider.
844         * rendering/RenderSlider.cpp:
845         (WebCore::HTMLSliderThumbElement::defaultEventHandler): Replace use of absoluteBoundingBox() with width() and height()
846         (WebCore::RenderSlider::positionForOffset): ditto. Also, use the trackSize() for the maximum offset.
847         (WebCore::RenderSlider::layout):  Use contentWidth() and contentHeight() to take padding into account.
848         (WebCore::RenderSlider::trackSize): ditto.
849
850 2008-01-24  Adam Roben  <aroben@apple.com>
851
852         Better fix for Bug 16996
853
854         Rubberstamped by Mitz.
855
856         * loader/CachedFont.cpp:
857         (WebCore::CachedFont::ensureCustomFontData): Don't call
858         createFontCustomPlatformData if m_data is null.
859         * platform/graphics/gtk/FontCustomPlatformData.cpp:
860         (WebCore::createFontCustomPlatformData): Added an assertion.
861         * platform/graphics/mac/FontCustomPlatformData.cpp:
862         (WebCore::createFontCustomPlatformData): Ditto.
863         * platform/graphics/qt/FontCustomPlatformData.cpp:
864         (WebCore::createFontCustomPlatformData): Ditto.
865         * platform/graphics/win/FontCustomPlatformData.cpp:
866         (WebCore::createFontCustomPlatformData): Ditto.
867
868 2008-01-24  Adam Roben  <aroben@apple.com>
869
870         Fix Bug 16996: Crash in createFontCustomPlatformData when loading
871         0-byte font via @font-face
872
873         <http://bugs.webkit.org/show_bug.cgi?id=16996>
874
875         Reviewed by Hyatt.
876
877         Test: fast/loader/font-face-empty.html
878
879         * platform/graphics/win/FontCustomPlatformData.cpp:
880         (WebCore::createFontCustomPlatformData): Null-check the buffer
881         parameter.
882
883 2008-01-24  Jon Honeycutt  <jhoneycutt@apple.com>
884
885         Reviewed by Anders.
886
887         <rdar://problem/5588807> Crash in Flash when destroying plug-in (found
888         using yahoo beta mail)
889
890         Flash can dereference NULL in the call to NPP_URLNotify if a request
891         made with NPN_PostURLNotify fails before NPP_NewStream is called.
892
893         Work around this by creating a quirk, PluginQuirkFlashURLNotifyBug, and
894         checking for this quirk before calling NPP_URLNotify for any request
895         made with NPN_PostURLNotify. If the quirk is present, call NPP_NewStream
896         and NPP_DestroyStream before calling NPP_URLNotify.
897
898         * WebCore.vcproj/WebCore.vcproj:
899         * plugins/PluginQuirkSet.h: Added. Moved quirks out of PluginViewWin so
900         PluginViewWin and PluginStream could share it. Created a class,
901         PluginQuirkSet, to store plug-in quirks
902         (WebCore::):
903         (WebCore::PluginQuirkSet::PluginQuirkSet):
904         (WebCore::PluginQuirkSet::add):
905         (WebCore::PluginQuirkSet::contains):
906         * plugins/PluginStream.cpp:
907         (WebCore::PluginStream::PluginStream): Copy the PluginQuirkSet for this
908         plug-in
909         (WebCore::PluginStream::destroyStream): Check for the FlashURLNotifyBug
910         quirk
911         * plugins/PluginStream.h:
912         * plugins/win/PluginViewWin.cpp:
913         (WebCore::PluginViewWin::performRequest): Pass the quirks when creating
914         the PluginStream
915         (WebCore::PluginViewWin::didReceiveResponse): Same
916         (WebCore::PluginViewWin::wndProc): Use add / contains instead of
917         bit ops
918         (WebCore::PluginViewWin::userAgent): Same
919         (WebCore::PluginViewWin::invalidateRect): Same
920         (WebCore::PluginViewWin::~PluginViewWin): Same
921         (WebCore::PluginViewWin::determineQuirks): Same
922         (WebCore::PluginViewWin::setParameters): Same
923         (WebCore::PluginViewWin::PluginViewWin): Same
924         (WebCore::PluginViewWin::init): Same
925         (WebCore::PluginViewWin::setCallingPlugin): Same
926         * plugins/win/PluginViewWin.h:
927
928 2008-01-24  David Hyatt  <hyatt@apple.com>
929
930         http://bugs.webkit.org/show_bug.cgi?id=16982
931
932         Make sure to make <head> the current block if it is created before a <body> already exists.
933
934         Reviewed by Dan
935
936         * html/HTMLParser.cpp:
937         (WebCore::HTMLParser::createHead):
938
939 2008-01-24  Alexey Proskuryakov  <ap@webkit.org>
940
941         http://bugs.webkit.org/show_bug.cgi?id=16993
942         <rdar://problem/5704331> REGRESSION: Loading page leads to many unexpected redirections
943
944         Rolled out r29590, which was not a correct fix for <rdar://problem/5692566>.
945
946         * loader/FrameLoader.cpp:
947         (WebCore::FrameLoader::clear):
948
949 2008-01-24  Antti Koivisto  <antti@apple.com>
950
951         Reviewed by Adam.
952         
953         If the media is playing and the load stalls the playback wont restart by seeking backwards.
954         
955         We should be in CAN_PLAY state if the current time is less than the maximum loaded time. Rate 
956         tricks were for streaming case and are not necessary now since that is now disabled.
957         
958         Windows patch coming separately.
959
960         Test: http/tests/media/video-play-stall-seek.html
961
962         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
963         (WebCore::MediaPlayerPrivate::updateStates):
964
965 2008-01-24  Antti Koivisto  <antti@apple.com>
966
967         Reviewed by Adam.
968
969         Fix <rdar://problem/5684815>
970         After navigating back to the page that contains a <audio> that has been muted, the audio is still heard
971         
972         - get rid of the separate muted state in MediaPlayer, maintain the state in the cross platform code only
973         - remove volumeChanged() callbacks from HTMLMediaElement and OS X MediaPlayer, they were not used for anything
974         - rename updateMediaPlayer -> updatePlayState which tells more about what it actually does
975
976         * html/HTMLMediaElement.cpp:
977         (WebCore::HTMLMediaElement::load):
978         (WebCore::HTMLMediaElement::setReadyState):
979         (WebCore::HTMLMediaElement::play):
980         (WebCore::HTMLMediaElement::pause):
981         (WebCore::HTMLMediaElement::setVolume):
982         (WebCore::HTMLMediaElement::setMuted):
983         (WebCore::HTMLMediaElement::checkIfSeekNeeded):
984         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
985         (WebCore::HTMLMediaElement::updateVolume):
986         (WebCore::HTMLMediaElement::updatePlayState):
987         (WebCore::HTMLMediaElement::setPausedInternal):
988         * html/HTMLMediaElement.h:
989         * platform/graphics/MediaPlayer.cpp:
990         (WebCore::MediaPlayer::MediaPlayer):
991         * platform/graphics/MediaPlayer.h:
992         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
993         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
994         (WebCore::MediaPlayerPrivate::createQTMovie):
995         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
996         * platform/graphics/win/QTMovieWin.cpp:
997         * platform/graphics/win/QTMovieWin.h:
998
999 2008-01-24  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1000
1001         Reviewed by Simon.
1002
1003         * Fix "QObject::startTimer: QTimer can only be used with threads started with QThread"
1004         * The JSC GCController gets automatically destructed on application exit, it will stop
1005         its timer and we try to schedule the next timer. Now the GCController can get destructed
1006         after our QApplication is gone. This will trigger the above warning, we can avoid this
1007         by checking if our qApp is still around.
1008
1009         * platform/qt/SharedTimerQt.cpp:
1010         (WebCore::setSharedTimerFireTime):
1011
1012 2008-01-24  Morten Johan Sørvig  <msorvig@trolltech.com>
1013
1014         Reviewed by Simon.
1015
1016         Qt/Mac: Make sure the scrollbars does not overlap the grow box.
1017
1018         When showing only one scrollbar we need to move it so it doesn't overlap the
1019         grow box. This is similar to the code in QAbstractScrollArea.
1020
1021
1022         * platform/qt/ScrollViewQt.cpp:
1023         (WebCore::ScrollView::updateScrollbars):
1024
1025 2008-01-15  Michael Goddard  <michael.goddard@trolltech.com>
1026
1027         Reviewed by Darin.
1028
1029         While parsing -webkit-border-image, store
1030         the border widths as naked pointers rather
1031         than as OwnPtrs, since they point to the
1032         middle of an array.
1033
1034         Test: fast/css/border-image-crash.html
1035
1036         * css/CSSParser.cpp:
1037
1038 2008-01-24  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1039
1040         Reviewed by Simon.
1041
1042         * Attempt to fix showing of popup again after a popup has been shown but
1043         the user did not select any item (e.g. clicked outside of the popup)
1044         * Keep track of the popup status using the virtuals showPopup and hidePopup
1045         and do not go into recursion when hiding a popup.
1046
1047         * platform/qt/QWebPopup.cpp:
1048         (WebCore::QWebPopup::showPopup):
1049         (WebCore::QWebPopup::hidePopup):
1050         * platform/qt/QWebPopup.h:
1051
1052 2008-01-24  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1053
1054         Reviewed by Simon.
1055
1056         * Assert the presence of the PopupMenuClient
1057
1058         * platform/qt/QWebPopup.cpp:
1059         (WebCore::QWebPopup::QWebPopup):
1060         (WebCore::QWebPopup::hideEvent):
1061         (WebCore::QWebPopup::activeChanged):
1062
1063 2008-01-23  David Kilzer  <ddkilzer@apple.com>
1064
1065         <rdar://problem/5702947> WebCore: CGContextDrawPDFDocument will be deprecated
1066
1067         Reviewed by Darin.
1068
1069         No test cases added since there is no change in behavior.
1070
1071         * platform/graphics/cg/PDFDocumentImage.cpp:
1072         (WebCore::PDFDocumentImage::draw): Replace CGContextDrawPDFDocument() with
1073         calls to CG methods that perform the equivalent work.
1074
1075 2008-01-23  Antti Koivisto  <antti@apple.com>
1076
1077         Reviewed by Hyatt, Adele.
1078
1079         Timers for media controls keep running when the page is in the page cache.
1080         
1081         Stop timers in RenderMedia and get rid of the controls tree when the page goes to the cache. 
1082
1083         * html/HTMLMediaElement.cpp:
1084         (WebCore::HTMLMediaElement::HTMLMediaElement):
1085         (WebCore::HTMLMediaElement::willSaveToCache):
1086         (WebCore::HTMLMediaElement::didRestoreFromCache):
1087         * html/HTMLMediaElement.h:
1088         (WebCore::HTMLMediaElement::inPageCache):
1089         * rendering/RenderMedia.cpp:
1090         (WebCore::RenderMedia::updateControls):
1091
1092 2008-01-23  Antti Koivisto  <antti@apple.com>
1093
1094         Reviewed by Adam.
1095
1096         Video that had already played to the end would start playing (from beginning) on back/forward navigation.
1097         
1098         Use setPausedInternal() instead of pause(). This avoid generating pause/play events and matches specification text.
1099
1100         * html/HTMLMediaElement.cpp:
1101         (WebCore::HTMLMediaElement::willSaveToCache):
1102
1103 2008-01-23  Alexey Proskuryakov  <ap@webkit.org>
1104
1105         Reviewed by Darin.
1106
1107         <rdar://problem/4200075> Missing support for accented chars in mailto forms
1108
1109         With some combinations of form parameters, this was resulting in regressed behavior.
1110
1111         Tests: fast/forms/mailto/get-non-ascii-text-plain-latin-1.html
1112                fast/forms/mailto/post-text-plain-with-accept-charset.html
1113                fast/forms/mailto/post-text-plain.html
1114
1115         * html/HTMLFormElement.cpp:
1116         (WebCore::HTMLFormElement::formData): Ignore accept-charset for mailto forms, which are always
1117         encoded as UTF-8.
1118         (WebCore::HTMLFormElement::isMailtoForm): Added.
1119         (WebCore::HTMLFormElement::dataEncoding): Added (factored out from formData).
1120         (WebCore::HTMLFormElement::submit): When round-tripping in text/plain case, use utf-8 encoding.
1121         * html/HTMLFormElement.h: Added a isMailtoForm() function. It may be a bit unfortunate that
1122         its result is calculated repeatedly, but this doesn't seem to be anywhere near hot code.
1123
1124 2008-01-22  Justin Garcia  <justin.garcia@apple.com>
1125
1126         Reviewed by Alice Liu.
1127
1128         <rdar://problem/5658727> Undo/redo for pasted or typed text in yahoo mail becomes disabled after one round of being selected
1129
1130         * rendering/RenderTextControl.cpp:
1131         (WebCore::RenderTextControl::updateFromElement): If value == text() and
1132         m_innerText is empty, then value and text() are "". In that case both DOM 
1133         mutations are no-ops and there is no reason to clear the Undo stack.
1134
1135 2008-01-23  Steve Falkenburg  <sfalken@apple.com>
1136
1137         <rdar://problem/5698732> Copyright strings should include 2008
1138
1139         Reviewed by Sam.
1140
1141         * WebCore.vcproj/QTMovieWin.rc:
1142
1143 2008-01-23  Steve Falkenburg  <sfalken@apple.com>
1144
1145         <rdar://problem/5699509> Allow file upload dialog to be localized.
1146
1147         Reviewed by Darin.
1148
1149         * platform/LocalizedStrings.h:
1150         * platform/win/FileChooserWin.cpp:
1151         (WebCore::FileChooser::openFileChooser):
1152
1153 2008-01-23  Adam Roben  <aroben@apple.com>
1154
1155         Fix behavior of type-to-select in <select> menus
1156
1157         In r27825 we started posting both a WM_KEYDOWN and WM_CHAR message
1158         whenever a key was pressed in the dropdown menu. However, since posted
1159         messages go through TranslateMessage, the WM_KEYDOWN was generating
1160         another WM_CHAR message, so two WM_CHAR messages in a row would reach
1161         the WebView. This caused the searching to happen twice for each key,
1162         so typing "dog" would search for "ddoogg".
1163
1164         Reviewed by Darin.
1165
1166         * platform/win/PopupMenuWin.cpp:
1167         (WebCore::PopupWndProc): Repost the WM_KEYDOWN message to the WebView.
1168         This is will generate a WM_CHAR message which will trigger the
1169         type-to-select behavior. This is very similar to our behavior prior to
1170         r27825, except that we're now calling PostMessage instead of
1171         SendMessage.
1172
1173 2008-01-23  Alp Toker  <alp@atoker.com>
1174
1175         Rubber-stamped by Mark Rowe.
1176
1177         Remove whitespace after -I in automake include lists.
1178
1179         * GNUmakefile.am:
1180
1181 2008-01-23  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1182
1183         * Rubber stamped by Simon
1184
1185         * Load images incrementally. This will show warnings on the console
1186         and we want to fix them for Qt4.4. If that happens we have to remove
1187         the comment from the enum inside the ImageDecoderQt.cpp
1188
1189         * platform/graphics/qt/ImageDecoderQt.cpp:
1190         (WebCore::ImageDecoderQt::setData):
1191
1192 2008-01-23  Lars Knoll  <lars@trolltech.com>
1193
1194         Reviewed by Holger Freyther <holger.freyther@trolltech.com>.
1195
1196         Fix rendering of the Scrollbar as well as mouse handling for some styles.
1197
1198         The QStyle expects that that painter is set up to clip to the scrollbar bounds
1199         and some of the styles seem to paint somewhat outside of these bounds. Clipping to
1200         the scrollbar bounds before drawing removes some artifacts.
1201
1202         Also set m_opt.rect.topLeft to (0/0) in the mouse handlers. Fixes some issues with
1203         the oxygen style.
1204
1205
1206         * platform/qt/PlatformScrollBarQt.cpp:
1207         (WebCore::PlatformScrollbar::paint):
1208         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
1209         (WebCore::PlatformScrollbar::handleMousePressEvent):
1210
1211 2008-01-23  Michael Brasser  <michael.brasser@trolltech.com>
1212
1213         Reviewed by Simon.
1214
1215         Rendering fixes for Qtopia.
1216
1217         Make the focus ring work with line breaks (until we have QPainterPath::simplify) and
1218         call QStyle with better arguments when painting themed elements.
1219
1220         * platform/graphics/qt/GraphicsContextQt.cpp:
1221         (WebCore::GraphicsContext::drawFocusRing):
1222         * platform/qt/RenderThemeQt.cpp:
1223         (WebCore::RenderThemeQt::paintButton):
1224         (WebCore::RenderThemeQt::applyTheme):
1225
1226 2008-01-23  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1227
1228         Reviewed by Simon.
1229
1230         * FormData::flatten does not include to be uploaded files. Create our own QIODevice
1231         for the QNetworkAccessManager and feed the complete content of the FormData* to
1232         the (HTTP) backend.
1233         * Try to optimize the ::readData implementation to fill the buffer as best as possible
1234
1235         * platform/network/qt/QNetworkReplyHandler.cpp:
1236         (WebCore::FormDataIODevice::FormDataIODevice):
1237         (WebCore::FormDataIODevice::~FormDataIODevice):
1238         (WebCore::FormDataIODevice::moveToNextElement):
1239         (WebCore::FormDataIODevice::readData):
1240         (WebCore::FormDataIODevice::writeData):
1241         (WebCore::FormDataIODevice::setParent):
1242         (WebCore::FormDataIODevice::isSequential):
1243         (WebCore::FormDataIODevice::slotFinished):
1244         (WebCore::QNetworkReplyHandler::start):
1245         * platform/network/qt/QNetworkReplyHandler.h:
1246
1247 2008-01-23  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1248
1249         Reviewed by Simon.
1250
1251         * Coding-Style fixes
1252
1253         * platform/network/qt/QNetworkReplyHandler.cpp:
1254         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
1255
1256 2008-01-23  Michael Brasser  <michael.brasser@trolltech.com>
1257
1258         Reviewed by Simon.
1259
1260         use PopupClient's font for popup menu. Otherwise, in Qtopia, the popup's font is much bigger (QApplication::font()?) and the text doesn't fit.
1261
1262         * platform/qt/QWebPopup.cpp:
1263         (WebCore::QWebPopup::QWebPopup):
1264
1265 2008-01-23  Simon Hausmann  <hausmann@webkit.org>
1266
1267         Reviewed by Lars.
1268
1269         Implemented FrameLoaderClient::startDownload() and FrameLoaderClient::download().
1270         
1271         Added two signals to QWebPage to handle downloading of links and handling of
1272         unsupported content.
1273         
1274
1275         * platform/network/qt/QNetworkReplyHandler.cpp:
1276         (WebCore::QNetworkReplyHandler::release):
1277         * platform/network/qt/QNetworkReplyHandler.h:
1278
1279 2008-01-22  Dan Bernstein  <mitz@apple.com>
1280
1281         Reviewed by Adele Peterson.
1282
1283         - fix http://bugs.webkit.org/show_bug.cgi?id=16905
1284           <rdar://problem/5692407> REGRESSION (3.0.4-TOT): "menu" pseudocolor is badly chosen
1285
1286         The regression test for this is fast/css/css2-system-color.html which
1287         is currently disabled.
1288
1289         * rendering/RenderThemeMac.mm:
1290         (WebCore::menuBackgroundColor): Added. Uses HIThemeDrawMenuBackground
1291         to draw the menu item background into a bitmap graphics context and
1292         returns the color of the pixel at (0, 0).
1293         (WebCore::RenderThemeMac::systemColor): Changed to call
1294         menuBackgroundColor for the CSS2 menu color.
1295
1296 2008-01-22  Darin Adler  <darin@apple.com>
1297
1298         Reviewed by Oliver Hunt.
1299
1300         - turn full repainting back on for <canvas> until we get incremental
1301           repaint working properly
1302
1303         Ollie and I came up with a plan for testing this, but for now we should
1304         just fall back on the "repaint everything" behavior we have always had.
1305
1306         * html/HTMLCanvasElement.cpp:
1307         (WebCore::HTMLCanvasElement::willDraw): Just call repaint.
1308
1309 2008-01-22  Alp Toker  <alp@atoker.com>
1310
1311         GTK+/qmake build fix.
1312
1313         * WebCore.pro:
1314
1315 2008-01-22  Adam Roben  <aroben@apple.com>
1316
1317         Add HTMLFrameOwnerElement::scrollingMode
1318
1319         This new virtual method is overridden by HTMLFrameElementBase to
1320         provide the scrolling mode set on the frame or iframe element. Object
1321         elements always have scrolling=auto, so there's no need to override
1322         this method for HTMLPlugInElement.
1323
1324         Reviewed by Hyatt.
1325
1326         * html/HTMLFrameElementBase.h: Declare scrollingMode as virtual.
1327         * html/HTMLFrameOwnerElement.h:
1328         (WebCore::HTMLFrameOwnerElement::scrollingMode): Added.
1329
1330 2008-01-22  David Hyatt  <hyatt@apple.com>
1331
1332         Fix for <rdar://problem/5698481> REGRESSION: Web Inspector source view gutter double divider and no padding
1333
1334         Now that cellpadding cascades properly on <td>s, we need to make the view source padding rules in the user
1335         agent sheet have !important in order to override author settings.
1336
1337         Reviewed by Tim
1338
1339         * css/view-source.css:
1340
1341 2008-01-22  Nikolas Zimmermann  <zimmermann@kde.org>
1342
1343         Reviewed by Alp.
1344
1345         Allow to use SVGPaintServerSolid without RenderObject/RenderStyle. Used later to draw SVG Fonts in HTML.
1346
1347         * svg/graphics/SVGPaintServer.cpp:
1348         (WebCore::SVGPaintServer::sharedSolidPaintServer):
1349         * svg/graphics/SVGPaintServer.h:
1350         * svg/graphics/cg/SVGPaintServerCg.cpp:
1351         (WebCore::SVGPaintServer::renderPath):
1352         (WebCore::SVGPaintServer::fillPath):
1353         (WebCore::SVGPaintServer::clipToFillPath):
1354         * svg/graphics/cg/SVGPaintServerSolidCg.cpp:
1355         (WebCore::SVGPaintServerSolid::setup):
1356
1357 2008-01-22  Nikolas Zimmermann  <zimmermann@kde.org>
1358
1359         Reviewed by Alp.
1360
1361         Initialize missing variables, m_lineGap / m_lineSpacing.
1362         Only noticeable when trying to render HTML text using SVG Fonts (which is not possible with trunk, but with my local version).
1363
1364         * platform/graphics/SimpleFontData.cpp:
1365         (WebCore::SimpleFontData::SimpleFontData):
1366
1367 2008-01-22  Alp Toker  <alp@atoker.com>
1368
1369         Reviewed by Nikolas.
1370
1371         Fix Cairo SVG fonts following changes in r29700.
1372
1373         Set the font description's details as needed in FontPlatformData and
1374         eliminate GraphicsContext::setPlatformFont() since it was redundant
1375         and assumed all fonts were Cairo fonts.
1376
1377         * platform/graphics/GraphicsContext.cpp:
1378         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1379         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
1380         (WebCore::FontPlatformData::FontPlatformData):
1381
1382 2008-01-22  Dan Bernstein  <mitz@apple.com>
1383  
1384          Reviewed by Eric.
1385  
1386          - fix http://bugs.webkit.org/show_bug.cgi?id=16967
1387            <rdar://problem/5699344> Reproducible crash when navigating back to a page using SVG fonts
1388  
1389          Test: svg/custom/font-platformDestroy-crash.svg
1390  
1391          * platform/graphics/SimpleFontData.cpp:
1392          (WebCore::SimpleFontData::~SimpleFontData): Changed to call
1393          platformDestroy() only if platformInit() was called from the
1394          constructor.
1395
1396 2008-01-22  Lars Knoll  <lars@trolltech.com>
1397
1398         Reviewed by Simon.
1399
1400         cleanup the CookieJarQt implementation and implement cookiesEnabled.
1401
1402         * platform/qt/CookieJarQt.cpp:
1403         (WebCore::cookieJar):
1404         (WebCore::setCookies):
1405         (WebCore::cookies):
1406         (WebCore::cookiesEnabled):
1407
1408 2008-01-22  Lars Knoll  <lars@trolltech.com>
1409
1410         Reviewed by Simon.
1411
1412         Ported the font implementation to use the new QFont features of Qt 4.4.
1413         
1414
1415         * platform/graphics/Font.h:
1416         (WebCore::Font::setWordSpacing):
1417         (WebCore::Font::setLetterSpacing):
1418         (WebCore::Font::font):
1419         (WebCore::Font::):
1420         * platform/graphics/qt/FontQt.cpp:
1421         (WebCore::Font::Font):
1422         (WebCore::Font::setWordSpacing):
1423         (WebCore::Font::setLetterSpacing):
1424         (WebCore::qstring):
1425         (WebCore::setupLayout):
1426         (WebCore::Font::drawText):
1427         (WebCore::Font::width):
1428         (WebCore::Font::floatWidth):
1429         (WebCore::Font::offsetForPosition):
1430         (WebCore::Font::selectionRectForText):
1431         (WebCore::generateComponents):
1432         (WebCore::cursorToX):
1433         (WebCore::Font::~Font):
1434         (WebCore::Font::operator=):
1435         (WebCore::Font::operator==):
1436         (WebCore::Font::update):
1437
1438 2008-01-21  Eric Seidel  <eric@webkit.org>
1439
1440         Reviewed by Nikolas & Oliver.
1441         
1442         Tested by svg/custom/svg-features.html
1443         
1444         * dom/DOMImplementation.cpp:
1445         (WebCore::isSVG10Feature): use ENABLE(SVG_*) conditionals
1446         (WebCore::isSVG11Feature): use ENABLE(SVG_*) conditionals
1447
1448 2008-01-21  Geoffrey Garen  <ggaren@apple.com>
1449
1450         Reviewed by Maciej Stachowiak.
1451
1452         Adapted WebCore to the fix for http://bugs.webkit.org/show_bug.cgi?id=16909
1453         REGRESSION: Amazon.com crash (ActivationImp)
1454
1455         * bindings/js/kjs_proxy.cpp:
1456         (WebCore::KJSProxy::~KJSProxy): No convenient way to make this assertion
1457         anymore. (It wasn't firing for anyone, anyway, so it's no big loss.)
1458
1459         * bindings/objc/WebScriptObject.mm:
1460         (+[WebScriptObject throwException:]): Use the ExecState stack, instead
1461         of currentExec.
1462         (-[WebScriptObject setException:]): ditto. Also, a slight change in
1463         behavior: If no ExecStates are active, we no longer throw an exception
1464         in the global ExecState. The JavaScriptCore ChangeLog explains why.
1465         This also matches the behavior of +throwException.
1466
1467 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
1468
1469         Not reviewed. Try to fix Qt build, after the rmdir() fixes.c
1470
1471         * platform/graphics/qt/SimpleFontDataQt.cpp:
1472         (WebCore::SimpleFontData::SimpleFontData):
1473
1474 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
1475
1476         Not reviewed. Another Wx build fix.
1477
1478         * platform/graphics/wx/FontWx.cpp:
1479         (WebCore::Font::drawGlyphs):
1480
1481 2008-01-21  Darin Adler  <darin@apple.com>
1482
1483         - try to fix Qt build
1484
1485         * platform/qt/FileSystemQt.cpp:
1486         (WebCore::deleteEmptyDirectory): QDir::root().rmdir() instead of QDir::rmdir().
1487
1488 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
1489
1490         Not reviewed. Yet another win/gtk build fix.
1491
1492         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
1493         (WebCore::FontPlatformData::FontPlatformData):
1494         * platform/graphics/win/FontWin.cpp:
1495         (WebCore::Font::drawGlyphs):
1496
1497 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
1498
1499         Not reviewed. Another build fix for Gtk/Linux & Wx/Mac.
1500
1501         * platform/graphics/SimpleFontData.cpp:
1502         (WebCore::SimpleFontData::SimpleFontData):
1503
1504 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
1505
1506         Not reviewed. Build fix for Qt/Gtk & Wx.
1507
1508         * css/CSSFontSelector.cpp:
1509         * platform/graphics/SegmentedFontData.cpp:
1510         (WebCore::SegmentedFontData::isSVGFont): Remove SVG_FONTS block, it's a pure virtual function in the base class.
1511         * platform/graphics/SegmentedFontData.h:
1512
1513 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
1514
1515         Not reviewed. Build fix for ports that don't build SVG: wx.
1516
1517         * css/CSSFontFaceSource.h: Wrap include in ENABLE(SVG_FONTS) blocks.
1518         * css/CSSFontFaceSrcValue.h: Ditto.
1519
1520 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
1521
1522         Not reviewed. Build fix for Qt/Gtk.
1523
1524         * platform/graphics/SimpleFontData.h:
1525         (WebCore::SimpleFontData::svgFontData):
1526         (WebCore::SimpleFontData::isSVGFont):
1527
1528 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
1529
1530         Reviewed by Eric. Older parts reviewed by Dan.
1531
1532         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16880 (SVGCSSFontFace should die, instead integrate within the FontCache.)
1533         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16784 (In-document fonts work only as the first child to font-face-src)
1534
1535         Proper integration of SVG Fonts within the existing custom font concept, removing the need for a custom SVGCSSFontFace.
1536         Integrate within the CSSFontFaceSource logic for caching support, as well as the framework for external SVG Fonts.
1537
1538         Proper handling of missing glyphs, using <missing-glyph> element. If that is not specified in a font, fallback to non-SVG font rendering.
1539
1540         * GNUmakefile.am:
1541         * WebCore.pro:
1542         * WebCore.vcproj/WebCore.vcproj:
1543         * WebCore.xcodeproj/project.pbxproj:
1544         * css/CSSFontFaceSource.cpp:
1545         (WebCore::CSSFontFaceSource::getFontData):
1546         * css/CSSFontFaceSource.h:
1547         (WebCore::CSSFontFaceSource::svgFontFaceElement):
1548         (WebCore::CSSFontFaceSource::setSVGFontFaceElement):
1549         * css/CSSFontFaceSrcValue.h:
1550         (WebCore::CSSFontFaceSrcValue::m_isLocal):
1551         (WebCore::CSSFontFaceSrcValue::~CSSFontFaceSrcValue):
1552         (WebCore::CSSFontFaceSrcValue::svgFontFaceElement):
1553         (WebCore::CSSFontFaceSrcValue::setSVGFontFaceElement):
1554         * css/CSSFontSelector.cpp:
1555         (WebCore::CSSFontSelector::addFontFaceRule):
1556         * css/SVGCSSFontFace.cpp: Removed.
1557         * css/SVGCSSFontFace.h: Removed.
1558         * platform/graphics/Font.cpp:
1559         (WebCore::Font::ascent):
1560         (WebCore::Font::descent):
1561         (WebCore::Font::lineSpacing):
1562         (WebCore::Font::xHeight):
1563         (WebCore::Font::fontSelector):
1564         * platform/graphics/Font.h:
1565         * platform/graphics/FontData.h:
1566         * platform/graphics/SegmentedFontData.cpp:
1567         (WebCore::SegmentedFontData::isSVGFont):
1568         * platform/graphics/SegmentedFontData.h:
1569         * platform/graphics/SimpleFontData.cpp:
1570         (WebCore::SimpleFontData::SimpleFontData):
1571         * platform/graphics/SimpleFontData.h:
1572         (WebCore::SimpleFontData::ascent):
1573         (WebCore::SimpleFontData::descent):
1574         (WebCore::SimpleFontData::lineSpacing):
1575         (WebCore::SimpleFontData::lineGap):
1576         (WebCore::SimpleFontData::xHeight):
1577         (WebCore::SimpleFontData::isSVGFont):
1578         (WebCore::SimpleFontData::svgFontData):
1579         * platform/graphics/gtk/FontPlatformData.h:
1580         (WebCore::FontPlatformData::size):
1581         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
1582         (WebCore::FontPlatformData):
1583         * platform/graphics/mac/FontPlatformData.h:
1584         (WebCore::FontPlatformData::FontPlatformData):
1585         (WebCore::FontPlatformData::size):
1586         * platform/graphics/win/FontPlatformData.h:
1587         * platform/graphics/win/FontPlatformDataWin.cpp:
1588         (WebCore::FontPlatformData::FontPlatformData):
1589         * rendering/RenderSVGText.cpp:
1590         (WebCore::RenderSVGText::relativeBBox):
1591         * svg/SVGFont.cpp:
1592         (WebCore::convertEmUnitToPixel):
1593         (WebCore::isCompatibleGlyph):
1594         (WebCore::svgFontAndFontFaceElementForFontData):
1595         (WebCore::SVGTextRunWalker::SVGTextRunWalker):
1596         (WebCore::SVGTextRunWalker::walk):
1597         (WebCore::floatWidthUsingSVGFontCallback):
1598         (WebCore::floatWidthMissingGlyphCallback):
1599         (WebCore::floatWidthOfSubStringUsingSVGFont):
1600         (WebCore::drawTextUsingSVGFontCallback):
1601         (WebCore::drawTextMissingGlyphCallback):
1602         (WebCore::Font::drawTextUsingSVGFont):
1603         * svg/SVGFontData.cpp: Added.
1604         (WebCore::SVGFontData::SVGFontData):
1605         (WebCore::SVGFontData::~SVGFontData):
1606         * svg/SVGFontData.h: Added.
1607         (WebCore::SVGFontData::svgFontFaceElement):
1608         (WebCore::SVGFontData::horizontalOriginX):
1609         (WebCore::SVGFontData::horizontalOriginY):
1610         (WebCore::SVGFontData::horizontalAdvanceX):
1611         (WebCore::SVGFontData::verticalOriginX):
1612         (WebCore::SVGFontData::verticalOriginY):
1613         (WebCore::SVGFontData::verticalAdvanceY):
1614         * svg/SVGFontFaceElement.cpp:
1615         (WebCore::SVGFontFaceElement::unitsPerEm):
1616         (WebCore::SVGFontFaceElement::xHeight):
1617         (WebCore::SVGFontFaceElement::horizontalOriginX):
1618         (WebCore::SVGFontFaceElement::horizontalOriginY):
1619         (WebCore::SVGFontFaceElement::horizontalAdvanceX):
1620         (WebCore::SVGFontFaceElement::verticalOriginX):
1621         (WebCore::SVGFontFaceElement::verticalOriginY):
1622         (WebCore::SVGFontFaceElement::verticalAdvanceY):
1623         (WebCore::SVGFontFaceElement::ascent):
1624         (WebCore::SVGFontFaceElement::descent):
1625         (WebCore::SVGFontFaceElement::fontFamily):
1626         (WebCore::SVGFontFaceElement::associatedFontElement):
1627         (WebCore::SVGFontFaceElement::rebuildFontFace):
1628         * svg/SVGFontFaceElement.h:
1629         * svg/SVGGlyphElement.cpp:
1630         (WebCore::SVGGlyphElement::inheritUnspecifiedAttributes):
1631         (WebCore::parseSVGGlyphAttribute):
1632         (WebCore::SVGGlyphElement::buildGenericGlyphIdentifier):
1633         (WebCore::SVGGlyphElement::buildGlyphIdentifier):
1634         * svg/SVGGlyphElement.h:
1635         * svg/SVGMissingGlyphElement.cpp:
1636         * svg/svgattrs.in:
1637
1638 2008-01-21  Darin Adler  <darin@apple.com>
1639
1640         Reviewed by John Sullivan.
1641
1642         - fix <rdar://problem/5644324> Delegate-less WebKit clients should have no databases
1643
1644         - remove the default database quota setting
1645
1646         - simplify the quota-related client calls by merging the one for a new database with
1647           the one for an existing database, adding a feature where you can get details about
1648           a database being created using the same functions that work on the other databases,
1649           and removing the parameters and return values, instead having clients use a function
1650           to set the quota
1651
1652         - fix unsafe multi-thread access to the database tracker's quota map
1653         - fix bug in deleteAllDatabases where it would iterate a HashMap while modifying it
1654
1655         The tracker database is now only created when we set the quota for a database origin.
1656         Thus asking for info about databases won't cause anything to be written to disk.
1657
1658         * WebCore.base.exp: Updated.
1659
1660         * bindings/js/GCController.cpp: Added an #if to get rid of an unused function warning.
1661
1662         * page/Chrome.cpp: Removed database-related functions. There's no problem having the
1663         code deal directly with the client.
1664         * page/Chrome.h: Ditto. Also made Chrome inherit from Noncopyable.
1665
1666         * page/ChromeClient.h: Replaced the two quota-related functions with a single one.
1667         The details about the state of databases in the origin are now available by asking
1668         for database details. There's also no need to pass the security origin, since
1669         it's easy to get that from the frame's document.
1670
1671         * page/Settings.cpp: Removed the default quota setting.
1672         * page/Settings.h: Ditto.
1673
1674         * platform/FileSystem.h: Added deleteEmptyDirectory.
1675         * platform/gtk/FileSystemGtk.cpp:
1676         (WebCore::deleteEmptyDirectory): Added.
1677         * platform/posix/FileSystemPOSIX.cpp:
1678         (WebCore::deleteEmptyDirectory): Added.
1679         * platform/qt/FileSystemQt.cpp:
1680         (WebCore::deleteEmptyDirectory): Added.
1681         * platform/win/FileSystemWin.cpp:
1682         (WebCore::deleteEmptyDirectory): Added.
1683         * platform/wx/FileSystemWx.cpp:
1684         (WebCore::deleteEmptyDirectory): Added placeholder.
1685
1686         * storage/DatabaseDetails.h: Removed the isValid() function since its name is
1687         confusing -- we removed our other isValid() functions. For the few callers that
1688         need this, it's fine to just check name().isEmpty(). Made the member functions
1689         all const.
1690
1691         * storage/DatabaseTracker.cpp:
1692         (WebCore::DatabaseTracker::DatabaseTracker): Removed m_defaultQuota initialization.
1693         Added m_proposedDatabase and m_thread.
1694         (WebCore::DatabaseTracker::setDatabaseDirectoryPath): Got rid of code that would
1695         open the tracker database here. This might slightly speed up launch time, since
1696         we won't do the I/O until we have to, and before we were actually creating an SQL
1697         database in this code that's run when we go to the first webpage.
1698         (WebCore::DatabaseTracker::trackerDatabasePath): Added.
1699         (WebCore::DatabaseTracker::openTrackerDatabase): Added a boolean parameter telling
1700         this function whether to create the database. Made this function safe to call if
1701         the database is already open. Also made the function fail quietly if the path has
1702         not been set yet.
1703         (WebCore::DatabaseTracker::canEstablishDatabase): Got rid of the call to the
1704         establishEntryForOrigin function. The origin is now put in the tracker database
1705         when the quota is set to a non-zero value. When judging if there's enough space
1706         for the new database, require at least one byte even if estimatedSize is 0, and
1707         check for overflow. Also added code here to populate the origins map, which
1708         guarantees it will be ready when the database uses it on another thread later.
1709         Also changed this to call the new ChromeClient function.
1710         (WebCore::DatabaseTracker::hasEntryForDatabase): Added code to open the
1711         tracker database, since that's no longer done by setDatabaseDirectoryPath.
1712         (WebCore::DatabaseTracker::originPath): Added.
1713         (WebCore::DatabaseTracker::fullPathForDatabase): Added code so that this will
1714         return a null string for the proposed database if called from within the
1715         ChromeClient function. Also switched from empty string to null string for the
1716         error cases.
1717         (WebCore::DatabaseTracker::populateOrigins): Added code to open the tracker
1718         database.
1719         (WebCore::DatabaseTracker::databaseNamesForOrigin): Ditto.
1720         (WebCore::DatabaseTracker::detailsForNameAndOrigin): Ditto. Also added code that
1721         will return the details of the proposed database if called from within the
1722         ChromeClient function. This is how the client can learn of the display name and
1723         the estimated size of the new database.
1724         (WebCore::DatabaseTracker::setDatabaseDetails): Added code to open the tracker
1725         database.
1726         (WebCore::DatabaseTracker::quotaForOrigin): Made this code OK to call on a non-main
1727         thread by using m_quotaMapGuard to guard access to the map. Other code runs on the
1728         main thread only, and only functions that write to the map use the lock.
1729         (WebCore::DatabaseTracker::setQuota): Changed this function so it can insert the
1730         initial quota as well as updating an existing quota. Added locking since this
1731         function modifies the quota map. Added code to open the tracker database. Added
1732         an early exit if the quota is already correct, which is guarantees that if you
1733         set a quota to 0 it won't trigger creation of a tracker database.
1734         (WebCore::DatabaseTracker::addDatabase): Added code to open the tracker database.
1735         (WebCore::DatabaseTracker::deleteAllDatabases): Made a copy of the quota map before
1736         iterating it to find all the origins. This fixes a problem with the old code where
1737         it would modify the map while iterating it, which gives assertions in debug builds
1738         and unpredictable results.
1739         (WebCore::DatabaseTracker::deleteOrigin): Replaced deleteDatabasesWithOrigin with
1740         this function. Added code to open the tracker database if needed. Added code to
1741         delete the origin from the tracker database, and to close the tracker database
1742         and delete files and directories as needed if we are deleting the final origin.
1743         (WebCore::DatabaseTracker::deleteDatabase): Added code to open the tracker database
1744         if needed.
1745
1746         * storage/DatabaseTracker.h: Renamed databasePath to databaseDirectoryPath for
1747         clarity, including the data member, and the getter and setter functions.
1748         Replaced deleteDatabasesWithOrigin with deleteOrigin. Removed the functions
1749         dealing with default origin quota. There is no default any more; origins start
1750         with no quota and the client must set a quota. Added trackerDatabasePath and
1751         originPath helper functions. Added a boolean parameter to openTrackerDatabase
1752         to tell it whether to create the database or not. Removed the
1753         establishEntryForOrigin function. Renamed m_originQuotaMap to just m_quotaMap,
1754         and added m_quotaMapGuard. Added a QuotaMap typedef. Added m_proposedDatabase,
1755         which holds the origin and details for the current proposed database during
1756         the client callback function that must decide whether to grant quota. Added a
1757         m_thread data member for debugging use to assert if functions that can only
1758         be called on a single thread are misused.
1759
1760         * storage/SQLTransaction.cpp:
1761         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback): Changed to call the
1762         new exceededDatabaseQuota function instead of the old one.
1763
1764         * svg/graphics/SVGImageEmptyClients.h: Updated for the change to ChromeClient.
1765
1766 2008-01-21  David Hyatt  <hyatt@apple.com>
1767
1768         Fix for http://bugs.webkit.org/show_bug.cgi?id=16935
1769
1770         Fix a bug in layers where the positioned ancestor was being computed incorrectly (the root should not
1771         automatically be included).
1772
1773         Reviewed by olliej
1774
1775         Added fast/layers/positioned-inside-root-with-margins.html
1776
1777         * rendering/RenderLayer.cpp:
1778         (WebCore::RenderLayer::stackingContext):
1779         (WebCore::RenderLayer::enclosingPositionedAncestor):
1780
1781 2008-01-21  Simon Hausmann  <hausmann@webkit.org>
1782
1783         Reviewed by Holger.
1784
1785         Fix KURL to QUrl conversion.
1786         
1787         Stick to the encoded version of the URL and in addition to KURL we encode the
1788         characters mentioned in section 2.4.3 of RFC 2396 as QUrl requires these, too.
1789         
1790         This fixes fast/css/import-rule-regression-11590.html,
1791         fast/css/import-style-update.html, svg/hixie/processing-model/003.xml and
1792         svg/hixie/processing-model/004.xml.
1793
1794
1795         * platform/qt/KURLQt.cpp:
1796         (WebCore::toHex):
1797         (WebCore::KURL::operator QUrl):
1798
1799 2008-01-21  Simon Hausmann  <hausmann@webkit.org>
1800
1801         Reviewed by Holger.
1802
1803         Fix focus chain handling and cycling through focusable objects (links) using tab/backtab.
1804         
1805         * Fix GraphicsContext::drawFocusRing to also draw single focus rects.
1806         * Implemented QWebPage::focusNextPrevChild by sending fake tab/shift-tab events
1807         and make the return value depend on whether we successfully determined a focusable
1808         node or not.
1809         * Changed QWebView::focusNextPrevChild() to call the base QWidget implementation correctly
1810         if we could not handle the focus chain ourselves.
1811         * Changed the focus policy of QWebView to correctly use WheelFocus instead of ClickFocus.
1812         * Made ChromeClientQt::canTakeFocus() and takeFocus() dummy method since they are only
1813         used to control the situation of stepping out of the focus chain inside the page.
1814         * Made inclusion of links in the focus chain configurable through QWebSettings::LinksIncludedInFocusChain.
1815         The layout tests expect this to be disabled but for the user it seems sensible to have it
1816         on by default, hence the default in qwebsettings.cpp
1817
1818         * platform/graphics/qt/GraphicsContextQt.cpp:
1819         (WebCore::GraphicsContext::drawFocusRing):
1820
1821 2008-01-21  Simon Hausmann  <hausmann@webkit.org>
1822
1823         Reviewed by Holger.
1824
1825         Fix access key support and fast/forms/legend-access-key.html
1826
1827         SVN revision 26664 changed the default access key for the non-mac build to Alt
1828         while this test relies on Ctrl.
1829
1830         * page/EventHandler.cpp:
1831
1832 2008-01-21  Simon Hausmann  <hausmann@webkit.org>
1833
1834         Reviewed by Holger.
1835
1836         Fix error reporting when parsing X(HT)ML fragments.
1837         
1838         We use the regular XMLTokenizer write()/.../end() sequence to parse those
1839         fragments, but we should not report any parsing errors inline inside the
1840         content. Instead we should just return the error and the DOM layer will take
1841         care of throwing an exception.
1842         
1843         This fixes fast/innerHTML/innerHTML-changing-document-properties.xhtml
1844         
1845
1846         * dom/XMLTokenizer.cpp:
1847         (WebCore::createXHTMLParserErrorHeader):
1848
1849 2008-01-21  Holger Freyther  <holger.freyther@trolltech.com>
1850
1851         Reviewed by Simon.
1852
1853         Fix some issues with redirections.
1854         
1855         * Ensure that we deliver the response to the ResourceHandleClient only once by
1856         setting m_responseSent back to false only before calling start() for the
1857         redirection
1858         * Added 307 as another HTTP status code that causes a redirection after POST to
1859         become get, just like in MainResourceLoader::isPostOrRedirectAfterPost
1860         * Also set the HTTP method on the ResourceRequest to GET before passing it to
1861         willSendRequest.
1862         * willSendRequest's newRequest argument is actually an in/out argument and could be
1863         modified in theory, so set m_request accordingly after the call.
1864         
1865
1866         * platform/network/qt/QNetworkReplyHandler.cpp:
1867         (WebCore::QNetworkReplyHandler::finish):
1868         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
1869
1870 2008-01-21  Holger Freyther  <holger.freyther@trolltech.com>
1871
1872         Reviewed by Simon.
1873
1874         Fixed WebCore::cookies() to return all cookies, not only the first one.
1875         
1876         Fixes login into mail.yahoo.com.
1877         
1878
1879         * platform/qt/CookieJarQt.cpp:
1880         (WebCore::cookies):
1881
1882 2008-01-20  Oliver Hunt  <oliver@apple.com>
1883
1884         Reviewed by Mitz.
1885
1886         Fix http://bugs.webkit.org/show_bug.cgi?id=16816 , rdar://problem/5682985
1887         
1888         Correctly trigger willPerformDragDestinationAction when a drop causes a 
1889         load to occur.  The logic that originally did this was lost during the
1890         great drag migration of '07.
1891
1892         * page/DragController.cpp:
1893         (WebCore::DragController::performDrag):
1894
1895 2008-01-20  Dan Bernstein  <mitz@apple.com>
1896
1897         Reviewed by Darin Adler.
1898
1899         - fix http://bugs.webkit.org/show_bug.cgi?id=16951
1900           Assertion failure in FrameView::scheduleRelayout (!m_frame->document() || !m_frame->document()->inPageCache()) when going back from a page with a focused popup
1901
1902         * dom/Document.cpp:
1903         (WebCore::Document::setFocusedNode): Bail out if the document is in the
1904         page cache. Documents in the back/forward cache are "frozen" and should
1905         not change state.
1906
1907 2008-01-20  Collin Jackson  <webkit@collinjackson.com>
1908
1909         Reviewed by Sam Weinig.
1910
1911         Fix for http://bugs.webkit.org/show_bug.cgi?id=16775
1912
1913         We now use frame()->loader()->url() for postMessage, preventing a
1914         malicious sender from overwriting the uri property (using a <base> tag,
1915         for example). Also, use frame->loader()->url().host() instead of 
1916         instead of document()->SecurityOrigin()->domain() to reflect a recent
1917         clarification in the HTML5 spec. 
1918
1919         Tests: http/tests/security/postMessage/domain-affected-by-document-domain.html
1920                http/tests/security/postMessage/domain-and-uri-unaffected-by-base-tag.html
1921                http/tests/security/postMessage/javascript-page-still-sends-domain.html
1922
1923         * bindings/js/JSDOMWindowCustom.cpp:
1924         (WebCore::JSDOMWindow::postMessage):
1925
1926 2008-01-20  Antti Koivisto  <antti@apple.com>
1927
1928         Reviewed by Adele.
1929
1930         Fix <rdar://problem/5695451>
1931         Middle part of the media timeline missing on Windows if load failed
1932
1933         Add some null checking to avoid getting garbage results from the functions.
1934
1935         * platform/graphics/MediaPlayer.cpp:
1936         * platform/graphics/win/QTMovieWin.cpp:
1937         (QTMovieWin::duration):
1938         (QTMovieWin::currentTime):
1939         (QTMovieWin::setCurrentTime):
1940         (QTMovieWin::maxTimeLoaded):
1941
1942 2008-01-19  Alp Toker  <alp@atoker.com>
1943
1944         Reviewed by Mark Rowe.
1945
1946         http://bugs.webkit.org/show_bug.cgi?id=16944
1947         Use of GST_PLUGIN_DEFINE_STATIC results in a module-level constructor
1948
1949         http://bugzilla.gnome.org/show_bug.cgi?id=510547
1950         Epiphany/Webkit fails to start due to initializing threads twice
1951
1952         Don't call GST_PLUGIN_DEFINE_STATIC() as it performs g_thread_init()
1953         in the global initializer, breaking subsequent calls to
1954         g_thread_init() in applications.
1955
1956         * platform/graphics/gtk/VideoSinkGStreamer.cpp:
1957
1958 2008-01-19  Alp Toker  <alp@atoker.com>
1959
1960         Reviewed by Mark Rowe.
1961
1962         Remove any fragment part from the URL to be requested just before
1963         passing it to curl, otherwise curl sends it as part of the HTTP/local
1964         file request, causing page loads to fail.
1965
1966         * platform/network/curl/ResourceHandleManager.cpp:
1967         (WebCore::ResourceHandleManager::startJob):
1968
1969 2008-01-19  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
1970
1971         Reviewed by Alp Toker.
1972
1973         Add svg foreign object and svg experimental to the GTK+/autotools
1974         build system.
1975
1976         * GNUmakefile.am:
1977
1978 2008-01-19  Dan Bernstein  <mitz@apple.com>
1979
1980         Reviewed by Maciej Stachowiak.
1981
1982         - fix <rdar://problem/5645813> CrashTracer: [USER] 6 crashes in Safari at com.apple.WebCore: WebCore::RenderBox::destroy + 116
1983
1984         Test: editing/selection/inconsistent-in-removeChildNode.html
1985
1986         * editing/SelectionController.cpp:
1987         (WebCore::SelectionController::nodeWillBeRemoved): If the selection
1988         base or extent are not visible any more, adjust the selection.
1989
1990 2008-01-19  Oliver Hunt  <oliver@apple.com>
1991
1992         Reviewed by Eric Seidel.
1993
1994         Build fix for --svg-foreign-object path
1995
1996         * svg/SVGForeignObjectElement.idl:
1997
1998 2008-01-18  Stephanie  <slewis@apple.com>
1999
2000         Reviewed by Oliver.
2001
2002         Workaround for <rdar://problem/5695848>.  Set mime_type for local files based on file extension. 
2003
2004         * platform/network/cf/ResourceResponseCFNet.cpp:
2005         (WebCore::ResourceResponse::doUpdateResourceResponse):
2006
2007 2008-01-18  Ada Chan  <adachan@apple.com>
2008
2009         <rdar://problem/5682340> REGRESSION (r28188): Context menu appears at wrong place when clicking in iframe whose parent is scrolled (16827)
2010         Calling absolutePosition() in EventHandler::hitTestResultAtPoint() is extremely inefficient and passing in
2011         true as fixed before was wrong.  Use HitTestResult::localPoint() instead, and take into account border and padding widths.
2012
2013         Reviewed by Hyatt and Darin.
2014
2015         * page/EventHandler.cpp:
2016         (WebCore::EventHandler::hitTestResultAtPoint):
2017         * rendering/HitTestResult.cpp:
2018         (WebCore::HitTestResult::operator=):
2019
2020 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2021
2022         Reviewed by Darin, landed by Beth.
2023
2024         - fixed http://bugs.webkit.org/show_bug.cgi?id=15765
2025
2026         The call to HTMLTokenizer::write might result in a call to ::end which will invoke
2027         HTMLParser::finished() or Document::finishedParsing(). HTMLParser::finished() will eventually
2028         call Document::finishedParsing. The Document will delete the calling HTMLTokenizer and from the deleted
2029         tokenizer we will call into FrameLoader::tokenizerProcessedData.
2030         -) FrameLoader::tokenizerProcessedData calls FrameLoader::checkCompleted which gets called from the Document::finishedParsing
2031            (FrameLoader::finishedParsing).
2032
2033         * html/HTMLTokenizer.cpp:
2034         (WebCore::HTMLTokenizer::timerFired):
2035
2036 2008-01-18  David Hyatt  <hyatt@apple.com>
2037
2038         Don't apply the border/margin/padding check to root line boxes, since their renderers
2039         are blocks.
2040
2041         * rendering/InlineFlowBox.cpp:
2042         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
2043         (WebCore::InlineFlowBox::placeBoxesVertically):
2044
2045 2008-01-18  Geoffrey Garen  <ggaren@apple.com>
2046
2047         Not reviewed: rolling out a previous patch.
2048         
2049         Fixed <rdar://problem/5695439> Crash during GCController destructor on
2050         quitting browser
2051
2052         Used svn merge to roll out r29603 because it introduced some crashes
2053         on quit.
2054         
2055         GC relies on static hash tables, so it's not safe to GC from a static
2056         destructor, which might run after the static hash tables' destructors.
2057
2058         * bindings/js/GCController.cpp:
2059         (WebCore::GCController::garbageCollectNow):
2060         * bindings/js/GCController.h:
2061
2062 2008-01-18  David Hyatt  <hyatt@apple.com>
2063
2064         Fix for http://bugs.webkit.org/show_bug.cgi?id=15665
2065
2066         Building on Beth's earlier work to start building line boxes for empty inlines, this patch makes more
2067         empty inline cases work.  Empty inlines on lines by themselves now set isLineEmpty to false so that
2068         bidiReorderLine will get properly called.  In addition, the "shrink boxes with no text children" quirk
2069         needs to be disabled for inlines with padding, margins or borders.
2070
2071         Reviewed by Beth
2072
2073         Added fast/inline/inline-padding-disables-text-quirk.html
2074
2075         * rendering/InlineFlowBox.cpp:
2076         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
2077         (WebCore::InlineFlowBox::placeBoxesVertically):
2078         (WebCore::InlineFlowBox::shrinkBoxesWithNoTextChildren):
2079         * rendering/RenderObject.h:
2080         (WebCore::RenderObject::hasBordersPaddingOrMargin):
2081         * rendering/bidi.cpp:
2082         (WebCore::inlineFlowRequiresLineBox):
2083         (WebCore::RenderBlock::findNextLineBreak):
2084
2085 2008-01-18  David Hyatt  <hyatt@apple.com>
2086
2087         Fix for http://bugs.webkit.org/show_bug.cgi?id=14975
2088
2089         Computed size of padding is incorrect because we default padding to auto.  This is a made-up value that
2090         was only used to implement cellpadding on tables.  We needed this made-up value in order to tell that
2091         padding wasn't set so that we could then apply cellpadding.
2092        
2093         This patch rewrites cellpadding to be like other browsers.  Instead of being a setting on the table
2094         renderer that applies to all cells (even ones that were not <td>s), cellpadding is now mapped into the
2095         style of <td>s.  With this change it effectively becomes a content model feature and not a rendering
2096         feature.
2097
2098         For example, a <td> will pick up cellpadding even when it is not a cell and/or the enclosing <table> is
2099         not a table.  Anonymous cells and CSS-display-type cells will now never pick up cellpadding.  This behavior
2100         is all consistent with other browsers.
2101
2102         Reviewed by Antti
2103
2104         Added fast/css/padding-no-renderer.html
2105
2106         * css/CSSStyleSelector.cpp:
2107         (WebCore::CSSStyleSelector::canShareStyleWithElement):
2108         (WebCore::CSSStyleSelector::styleForElement):
2109         * css/CSSStyleSelector.h:
2110         * dom/StyledElement.cpp:
2111         * dom/StyledElement.h:
2112         (WebCore::StyledElement::canHaveAdditionalAttributeStyleDecls):
2113         (WebCore::StyledElement::additionalAttributeStyleDecls):
2114         * html/HTMLTableCellElement.cpp:
2115         (WebCore::HTMLTableCellElement::additionalAttributeStyleDecls):
2116         * html/HTMLTableCellElement.h:
2117         (WebCore::HTMLTableCellElement::canHaveAdditionalAttributeStyleDecls):
2118         * html/HTMLTableColElement.cpp:
2119         (WebCore::HTMLTableColElement::additionalAttributeStyleDecls):
2120         * html/HTMLTableColElement.h:
2121         (WebCore::HTMLTableColElement::canHaveAdditionalAttributeStyleDecls):
2122         * html/HTMLTableElement.cpp:
2123         (WebCore::HTMLTableElement::parseMappedAttribute):
2124         (WebCore::HTMLTableElement::additionalAttributeStyleDecls):
2125         (WebCore::HTMLTableElement::addSharedCellDecls):
2126         (WebCore::HTMLTableElement::addSharedCellBordersDecl):
2127         (WebCore::HTMLTableElement::addSharedCellPaddingDecl):
2128         (WebCore::HTMLTableElement::addSharedGroupDecls):
2129         (WebCore::HTMLTableElement::attach):
2130         * html/HTMLTableElement.h:
2131         (WebCore::HTMLTableElement::canHaveAdditionalAttributeStyleDecls):
2132         * html/HTMLTableSectionElement.cpp:
2133         (WebCore::HTMLTableSectionElement::additionalAttributeStyleDecls):
2134         * html/HTMLTableSectionElement.h:
2135         (WebCore::HTMLTableSectionElement::canHaveAdditionalAttributeStyleDecls):
2136         * rendering/AutoTableLayout.cpp:
2137         (WebCore::AutoTableLayout::recalcColumn):
2138         * rendering/RenderObject.cpp:
2139         (WebCore::RenderObject::paddingTop):
2140         (WebCore::RenderObject::paddingBottom):
2141         (WebCore::RenderObject::paddingLeft):
2142         (WebCore::RenderObject::paddingRight):
2143         * rendering/RenderStyle.cpp:
2144         (WebCore::StyleSurroundData::StyleSurroundData):
2145         * rendering/RenderStyle.h:
2146         (WebCore::RenderStyle::initialPadding):
2147         * rendering/RenderTable.cpp:
2148         (WebCore::RenderTable::RenderTable):
2149         * rendering/RenderTable.h:
2150
2151 2008-01-18  Dan Bernstein  <mitz@apple.com>
2152
2153         Reviewed by Dave Hyatt.
2154
2155         - fix <rdar://problem/5615307> Repro crash in WebKit!WebCore::RenderContainer::destroyLeftoverChildren
2156
2157         Test: fast/table/insert-row-before-form.html
2158
2159         * rendering/RenderTableRow.cpp:
2160         (WebCore::RenderTableRow::addChild): Changed to ensure that the
2161         object a new cell is inserted before is a child of the row, and
2162         added an assertion that that object is either a cell or a form.
2163         * rendering/RenderTableSection.cpp:
2164         (WebCore::RenderTableSection::addChild): Changed to ensure that the
2165         object a new row is inserted before is a child of the table section, and
2166         added an assertion that that object is either a table row or a form.
2167
2168 2008-01-18  Geoffrey Garen  <ggaren@apple.com>
2169
2170         Reviewed by Brady Eidson.
2171
2172         Fixed <rdar://problem/5622424> World Leak dialog when closing a page
2173         that has a Database
2174         
2175         The problem was that each transaction and SQL statement would hold on
2176         to its callback indefinitely. By design, callbacks often establish
2177         reference cycles to temporarily protect their execution environments.
2178         To break the cycle, we need to explicitly release each callback as soon
2179         as it is no longer needed.
2180
2181         * storage/SQLStatement.cpp:
2182         (WebCore::SQLStatement::performCallback): Release our callback objects
2183         after performing our callback.
2184
2185         * storage/SQLTransaction.cpp:
2186         (WebCore::SQLTransaction::postflightAndCommit): Release our callback
2187         objects after the transaction has terminated.
2188         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback): ditto.
2189
2190 2008-01-18  Adele Peterson  <adele@apple.com>
2191
2192         Reviewed by Antti.
2193
2194         Fix for <rdar://problem/5679490> media controls fade in and out too jerkily and too slowly
2195
2196         * rendering/RenderMedia.cpp: Shorten the duration for the fade in/out animation.
2197
2198 2008-01-18  Beth Dakin  <bdakin@apple.com>
2199
2200         Reviewed by Oliver.
2201
2202         Disables SVG foreign object for <rdar://problem/5686989> turn off 
2203         SVG foreignobject because it does not repaint/dirty correctly
2204
2205         * DerivedSources.make:
2206         * WebCore.SVG.ForeignObject.exp: Added.
2207         * WebCore.SVG.exp:
2208         * bindings/js/JSSVGElementWrapperFactory.cpp:
2209         (WebCore::createJSSVGWrapper):
2210         * rendering/RenderForeignObject.cpp:
2211         * rendering/RenderForeignObject.h:
2212         * svg/SVGForeignObjectElement.cpp:
2213         * svg/SVGForeignObjectElement.h:
2214         * svg/SVGForeignObjectElement.idl:
2215         * svg/SVGLocatable.cpp:
2216         (WebCore::SVGLocatable::nearestViewportElement):
2217         (WebCore::SVGLocatable::farthestViewportElement):
2218         * svg/SVGUseElement.cpp:
2219         (WebCore::isDisallowedElement):
2220         * svg/svgtags.in:
2221
2222 2008-01-18  Mark Rowe  <mrowe@apple.com>
2223
2224         Rubber-stamped by Adam Roben.
2225
2226         Fix mixed line endings in FileSystemWin.cpp and set svn:eol-style to native
2227         to try and keep them consistent in the future.
2228
2229         * platform/win/FileSystemWin.cpp:
2230         (WebCore::fileSize):
2231         (WebCore::fileExists):
2232         (WebCore::deleteFile):
2233         (WebCore::pathByAppendingComponent):
2234         (WebCore::fileSystemRepresentation):
2235         (WebCore::makeAllDirectories):
2236         (WebCore::homeDirectoryPath):
2237         (WebCore::bundleName):
2238         (WebCore::storageDirectory):
2239         (WebCore::cachedStorageDirectory):
2240
2241 2008-01-18  Antti Koivisto  <antti@apple.com>
2242
2243         Reviewed by Adam.
2244
2245         Fix unreachable code warning in RenderVideo on Windows.
2246         
2247         Make switch cases explicit.
2248
2249         * rendering/RenderImage.cpp:
2250         (WebCore::RenderImage::isWidthSpecified):
2251         (WebCore::RenderImage::isHeightSpecified):
2252         * rendering/RenderVideo.cpp:
2253         (WebCore::RenderVideo::isWidthSpecified):
2254         (WebCore::RenderVideo::isHeightSpecified):
2255
2256 2008-01-18  Timothy Hatcher  <timothy@apple.com>
2257
2258         Reviewed by Adam Roben.
2259
2260         <rdar://problem/5693558> REGRESSION (r29581): no form field focus
2261         rings and inactive text selection after loading a page
2262         Bug 16910: [GTK] REGRESSION: keyboard cursor doesn't blink
2263         Bug 16917: REGRESSION (r29581/2): Google Maps search box loses focused appearance
2264
2265         * page/FocusController.cpp:
2266         (WebCore::FocusController::setActive): Use focusedOrMainFrame() instead of focusedFrame()
2267         to call selectionController()->pageActivationChanged() for cases when the focusedFrame()
2268         has not been set yet. 
2269
2270 2008-01-18  Alexey Proskuryakov  <ap@webkit.org>
2271
2272         Reviewed by Brady.
2273
2274         Database origin tracking is broken.
2275
2276         * storage/DatabaseTracker.cpp: (WebCore::DatabaseTracker::populateOrigins):
2277         Move reading from statement back into the loop (broken in r29386).
2278
2279 2008-01-18  Marius Storm-Olsen  <marius@trolltech.com>
2280
2281         Reviewed by Simon Hausmann <hausmann@webkit.org>.
2282
2283         Add use of precompiled header, when building inside Qt.
2284         
2285         Compiling WebKit was taking forever; 17 minutes on my machine for _one_ build! Adding the PCH at least brings it down to 12 minutes for one build, for me.
2286         
2287
2288         * WebCore.pro:
2289
2290 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
2291
2292         Reviewed by Holger.
2293
2294         Fix fast/forms/button-state-restore.html
2295         
2296         Similar to the fix for fast/forms/form-post-urlencoded.html transform POST
2297         requests to data urls into GET.
2298         
2299
2300         * platform/network/qt/QNetworkReplyHandler.cpp:
2301         (WebCore::QNetworkReplyHandler::start):
2302
2303 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
2304
2305         Reviewed by Holger.
2306
2307         Fix LayoutTests/fast/cookies/local-file-can-set-cookies.html
2308         
2309         In WebCore::cookies() don't return the full raw form but only the name=value
2310         part. This fixes the getter part of the above test. The above test also
2311         requires a parsing fix in Qt 4.4's QNetworkCookie to fully pass.
2312         
2313
2314         * platform/qt/CookieJarQt.cpp:
2315         (WebCore::cookies):
2316
2317 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
2318
2319         Reviewed by Holger.
2320
2321         Fix svg/custom/path-getTotalLength.svg
2322         
2323         Path::apply creates a PathElement and its points array on the stack,
2324         to fill it in from the QPainterPath data and then use the platform
2325         independent path applier functions to calculate properties such as
2326         the length. For converting a QPainterPath::CurveToElement we need
2327         three points in the path element. However we allocated only two
2328         on the stack and as a result we got memory corruption and the
2329         failing test.
2330         
2331
2332         * platform/graphics/qt/PathQt.cpp:
2333         (WebCore::Path::apply):
2334
2335 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
2336
2337         Reviewed by Holger.
2338
2339         Fix LayoutTests/fast/dom/document-attribute-js-null.html
2340         
2341         Don't crash when trying to get/set cookies without a frameloader.
2342         
2343
2344         * platform/qt/CookieJarQt.cpp:
2345         (WebCore::setCookies):
2346         (WebCore::cookies):
2347
2348 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
2349
2350         Reviewed by Holger.
2351
2352         Fix fast/dom/xmlhttprequest-get.xhtml
2353         
2354         For local file requests remove the content length and the last-modified
2355         headers in the response.
2356         
2357
2358         * platform/network/qt/QNetworkReplyHandler.cpp:
2359         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
2360
2361 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
2362
2363         Reviewed by Holger.
2364
2365         Fix fast/forms/form-post-urlencoded.html.
2366         
2367         Post requests on files don't really make sense, but for
2368         fast/forms/form-post-urlencoded.html we still need to retrieve the file,
2369         which means we map it to a Get instead.
2370         
2371
2372         * platform/network/qt/QNetworkReplyHandler.cpp:
2373         (WebCore::QNetworkReplyHandler::start):
2374
2375 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
2376
2377         Reviewed by Holger.
2378
2379         Make QNetworkReplyHandler::abort() more robust against multiple invocations.
2380
2381         During DRT runs I see cancel() being called on the same handle multiple times. Guard
2382         against this a bit better by setting m_reply to 0 after we called abort() on it.
2383
2384         * platform/network/qt/QNetworkReplyHandler.cpp:
2385         (WebCore::QNetworkReplyHandler::abort):
2386
2387 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2388
2389         Reviewed by Simon.
2390
2391         * httpBody() can return 0 and other ports (cf/mac) check for this condition
2392         * Looking at the cf/mac implementation we might need to call setHTTPBody somewhere
2393         as well.
2394         
2395
2396         WARNING: NO TEST CASES ADDED OR CHANGED
2397
2398         * platform/network/qt/QNetworkReplyHandler.cpp:
2399         (WebCore::QNetworkReplyHandler::start):
2400
2401 2008-01-18  Prasanth Ullattil  <prasanth.ullattil@trolltech.com>
2402
2403         Reviewed by Simon Hausmann <hausmann@webkit.org>.
2404
2405         Fix compilation in Win64(3): Due to the size of size_t cast the return value explicitly to double() to make sure the right Value() constructor is called.
2406
2407         * xml/XPathFunctions.cpp:
2408         (WebCore::XPath::FunCount::evaluate):
2409
2410 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2411
2412         Reviewed by Simon.
2413
2414         * Remove our windowClipRect reimplementation and instead have our own
2415         Widget::invalidate implementation that is invalidating
2416         IntRect(0, 0, width(), height()) without trying to clip it (in contrast
2417         to Widget::invalidateRect)
2418
2419         * platform/qt/PlatformScrollBar.h:
2420         * platform/qt/PlatformScrollBarQt.cpp:
2421         (WebCore::PlatformScrollbar::invalidate):
2422
2423 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2424
2425         Reviewed by Simon.
2426
2427         * Change the coordinate transformation in the PlatformMouseEvent handlers
2428         * We want to convert from coordinates of the containing window to our local
2429         position on the scrollbar.
2430
2431         * platform/qt/PlatformScrollBarQt.cpp:
2432         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
2433         (WebCore::PlatformScrollbar::handleMousePressEvent):
2434
2435 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2436
2437         Reviewed by Simon.
2438
2439         * Make the qDebug more usable. Do not have an additional newline and print
2440         the untranslated coordinates as well.
2441
2442         * platform/qt/PlatformScrollBarQt.cpp:
2443         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
2444         (WebCore::PlatformScrollbar::handleMousePressEvent):
2445
2446 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2447
2448         Reviewed by Simon.
2449
2450         * Dead code, remove it
2451
2452         * platform/qt/PlatformScrollBarQt.cpp:
2453
2454 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2455
2456         Reviewed by Simon.
2457
2458         * Coding-Style fixes.
2459
2460         * platform/qt/PlatformScrollBarQt.cpp:
2461         (WebCore::PlatformScrollbar::PlatformScrollbar):
2462
2463 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2464
2465         Reviewed by Simon.
2466
2467         * Coding-Style fix
2468
2469         * platform/graphics/qt/ImageDecoderQt.cpp:
2470         (WebCore::ImageDecoderQt::ReadContext::ReadContext):
2471
2472 2008-01-17  Geoffrey Garen  <ggaren@apple.com>
2473
2474         Reviewed by Darin Adler.
2475
2476         Fixed: lots of WebCore leaks reported when quitting Safari
2477         
2478         If we're quitting with a GC still scheduled, do the GC before quitting.
2479         That way, WebCore's leak counters won't count objects that were
2480         scheduled for GC.
2481
2482         * bindings/js/GCController.cpp:
2483         (WebCore::GCController::~GCController):
2484         (WebCore::GCController::garbageCollectNow):
2485         * bindings/js/GCController.h:
2486
2487 2008-01-17  Alp Toker  <alp@atoker.com>
2488
2489         Reviewed by Oliver Hunt.
2490
2491         gdk_screen_get_font_options() returns NULL if no default options are
2492         set so we always have to NULL check to avoid crashes later on since
2493         Cairo doesn't accept NULL font options.
2494
2495         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2496         (WebCore::FontPlatformData::FontPlatformData):
2497
2498 2008-01-17  Antti Koivisto  <antti@apple.com>
2499
2500         Reviewed by Adele.
2501
2502         Windows fix for <rdar://problem/5605682>
2503         Disallow streaming protocols for media elements
2504         and <rdar://problem/5668711>
2505         Limit the container and codec types that the <video> tag supports
2506         
2507         - Disable unsupported QuickTime tracks types. 
2508         - Disallow streaming protocols (for now).
2509
2510         * WebCore.vcproj/WebCore.vcproj:
2511         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
2512         (WebCore::MediaPlayerPrivate::updateStates):
2513         * platform/graphics/win/QTMovieWin.cpp:
2514         (QTMovieWin::load):
2515         (QTMovieWin::disableUnsupportedTracks):
2516         * platform/graphics/win/QTMovieWin.h:
2517
2518 2008-01-17  Oliver Hunt  <oliver@apple.com>
2519
2520         Support smart copy and paste during drag and drop
2521         
2522         Reviewed by Alice
2523         
2524         In order for the drag and drop tests in Windows DRT to pass
2525         we need to support smart cut and paste operations during
2526         drag and drop on windows.
2527         
2528         There is no layout test as drag and drop is still unsupported
2529         on windows.  Once supported smart drag/drop is tested by existing
2530         tests
2531
2532         * platform/win/ClipboardUtilitiesWin.cpp:
2533         (WebCore::smartPasteFormat):
2534         * platform/win/ClipboardUtilitiesWin.h:
2535         * platform/win/ClipboardWin.cpp:
2536         (WebCore::ClipboardWin::writeRange):
2537         * platform/win/DragDataWin.cpp:
2538
2539 2008-01-17  Oliver Hunt  <oliver@apple.com>
2540
2541         Reviewed by Anders.
2542
2543         <rdar://problem/5692940> Crash when attempting to get text properties in
2544         SVG with no renderer
2545
2546         We use the element renderer to calculate the text element bounds,
2547         however there was no check against the possibility of the text dimension
2548         properties being requested on a element with no renderer (eg. unattached, 
2549         display: none).
2550
2551         Test: svg/text/text-property-with-display-none.html
2552
2553         * svg/SVGTextContentElement.cpp:
2554         (WebCore::rootInlineBoxForTextContentElement):
2555
2556 2008-01-17  Anders Carlsson  <andersca@apple.com>
2557
2558         Reviewed by Oliver.
2559
2560         <rdar://problem/5636742>
2561         CrashTracer: [USER] 1302 crashes in Safari at com.apple.WebCore: WTF::Vector<char, 0ul>::reserveCapacity + 78
2562         
2563         When loading full-frame plug-ins, disable buffering data for the main resource loader. Otherwise, this can cause us
2564         to crash when loading large files such as movies in the browser. We already do this for embedded plug-ins.
2565         
2566         * WebCore.base.exp:
2567         * loader/DocumentLoader.h:
2568         (WebCore::DocumentLoader::mainResourceLoader):
2569         New accessor method.
2570         
2571         * loader/PluginDocument.cpp:
2572         (WebCore::PluginTokenizer::writeRawData):
2573         Disable buffering for the main resource loader.
2574         
2575         * loader/ResourceLoader.cpp:
2576         (WebCore::ResourceLoader::setShouldBufferData):
2577         * loader/ResourceLoader.h:
2578         Have this free the buffer when disabling buffering.
2579
2580 2008-01-17  Adam Roben  <aroben@apple.com>
2581
2582         More Qt/GTK+ build fixing.
2583
2584         * platform/gtk/ScrollViewGtk.cpp:
2585         * platform/qt/ScrollViewQt.cpp:
2586
2587 2008-01-17  Alexey Proskuryakov  <ap@webkit.org>
2588
2589         Reviewed by Darin.
2590
2591         http://bugs.webkit.org/show_bug.cgi?id=16902
2592         <rdar://problem/5692566> fast/encoding/mailto-always-utf-8.html fails when run after
2593         fast/dom/Window/window-property-shadowing.html
2594
2595         Test: fast/dom/Window/window-property-shadowing_.html
2596
2597         * loader/FrameLoader.cpp: (WebCore::FrameLoader::clear): Clear the frame name, too.
2598
2599 2008-01-17  Adam Roben  <aroben@apple.com>
2600
2601         Qt/GTK+ build fix.
2602
2603         * platform/gtk/ScrollViewGtk.cpp:
2604         (WebCore::ScrollView::ScrollViewPrivate::isActive):
2605         * platform/qt/ScrollViewQt.cpp:
2606         (WebCore::ScrollView::ScrollViewPrivate::isActive):
2607
2608 2008-01-16  Adam Roben  <aroben@apple.com>
2609
2610         Update scroll bars/form controls when FocusController::isActive changes
2611
2612         Part of <rdar://5006915> Inactive look for Aqua controls
2613
2614         Reviewed by Darin.
2615
2616         All tests pass.
2617
2618         * page/FocusController.cpp:
2619         (WebCore::FocusController::setActive): Update control tints when the
2620         active state changes.
2621         * page/FrameView.cpp:
2622         (WebCore::FrameView::updateControlTints): On Windows, we have to ask
2623         ScrollView to paint so that the outermost scroll bars will paint. On
2624         Mac, the outermost scroll bars are taken care of by NSScroller.
2625         * platform/PopupMenu.h: Updated for ScrollBarClient changes.
2626         * platform/ScrollBar.h: Added a new ScrollBarClient method.
2627         * platform/win/PlatformScrollBarSafari.cpp:
2628         (WebCore::PlatformScrollbar::paint): Invalidate when updating control
2629         tints so that we can paint with the new tint later.
2630         (WebCore::PlatformScrollbar::paintButton): Pass the active state down
2631         to SafariTheme.
2632         (WebCore::PlatformScrollbar::paintTrack): Ditto.
2633         (WebCore::PlatformScrollbar::paintThumb): Ditto.
2634         * platform/win/ScrollViewWin.cpp:
2635         (WebCore::ScrollView::ScrollViewPrivate::isActive): Added.
2636         (WebCore::ScrollView::paint): Pass paint calls on down if we're
2637         updating control tints so the scroll bars can invalidate.
2638         * rendering/RenderLayer.cpp:
2639         (WebCore::RenderLayer::isActive): Added.
2640         * rendering/RenderLayer.h:
2641         * rendering/RenderListBox.cpp:
2642         (WebCore::RenderListBox::isActive): Added.
2643         * rendering/RenderListBox.h:
2644         * rendering/RenderTheme.cpp:
2645         (WebCore::RenderTheme::isActive): Added.
2646         * rendering/RenderTheme.h:
2647         * rendering/RenderThemeSafari.cpp:
2648         (WebCore::RenderThemeSafari::determineState): Pass the active state
2649         down to SafariTheme.
2650
2651 2008-01-16  Adam Roben  <aroben@apple.com>
2652
2653         Move focused/active state from Frame to SelectionController/FocusController
2654
2655         This is the first part of <rdar://5006915> Inactive look for Aqua
2656         controls.
2657
2658         The following methods were moved/renamed:
2659             - Frame::setIsActive -> FocusController::setActive
2660             - Frame::isActive -> SelectionController::isActiveAndFocused
2661             - Frame::setWindowHasFocus -> SelectionController::setFocused
2662
2663         Active state is now correctly a Page-level concept.
2664
2665         The Mac parts of this patch were written by Darin.
2666
2667         Reviewed by Darin.
2668
2669         All tests pass.
2670
2671         * WebCore.base.exp: Updated for method renames.
2672         * css/CSSStyleSelector.cpp:
2673         (WebCore::CSSStyleSelector::checkOneSelector): Ditto.
2674         * editing/SelectionController.cpp:
2675         (WebCore::SelectionController::SelectionController): Initialize new
2676         member.
2677         (WebCore::SelectionController::focusedOrActiveStateChanged): New
2678         private method. Most of this code came from Frame::setIsActive.
2679         (WebCore::SelectionController::pageActivationChanged): Added.
2680         (WebCore::SelectionController::setFocused): Added. Replaces
2681         Frame::setWindowHasFocus.
2682         (WebCore::SelectionController::isFocusedAndActive): Added. Replaces
2683         Frame::isActive.
2684         * editing/SelectionController.h:
2685         * page/FocusController.cpp:
2686         (WebCore::FocusController::FocusController): Initialize new member.
2687         (WebCore::FocusController::setFocusedFrame): Changed to just call
2688         SelectionController::setFocused, since active state has doesn't change
2689         when the focused frame changes.
2690         (WebCore::FocusController::setActive): Added. Replaces
2691         Frame::setIsActive.
2692         * page/FocusController.h:
2693         (WebCore::FocusController::isActive): Added.
2694         * page/Frame.cpp:
2695         (WebCore::Frame::setDocument): Updated for method renames.
2696         (WebCore::Frame::setFocusedNodeIfNeeded): Ditto.
2697         (WebCore::Frame::updateSecureKeyboardEntryIfActive): Ditto.
2698         (WebCore::FramePrivate::FramePrivate): Removed initialization of
2699         removed members.
2700         * page/Frame.h:
2701         * page/FramePrivate.h:
2702         * page/mac/WebCoreFrameBridge.h: Removed -selectionColor.
2703         * page/mac/WebCoreFrameBridge.mm: Ditto.
2704         * rendering/RenderListBox.cpp:
2705         (WebCore::RenderListBox::paintItemForeground): Updated for method
2706         renames.
2707         (WebCore::RenderListBox::paintItemBackground): Ditto.
2708         * rendering/RenderObject.cpp:
2709         (WebCore::RenderObject::selectionBackgroundColor): Ditto.
2710         (WebCore::RenderObject::selectionForegroundColor): Ditto.
2711         * rendering/RenderTextControl.cpp:
2712         (WebCore::RenderTextControl::capsLockStateMayHaveChanged): Ditto.
2713         * rendering/RenderTheme.cpp:
2714         (WebCore::RenderTheme::isFocused): Ditto.
2715
2716 2008-01-17  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2717
2718         Reviewed by Simon.
2719
2720         * Make the nice 'safari' feature work on our port. When viewing a single image, clicking
2721         on the image will zoom it.
2722         * It seems like our platform can only determine the size of the image once it is completely
2723         loaded. Call m_doc->imageChanged on the last chunk of data as well.
2724
2725         * loader/ImageDocument.cpp:
2726         (WebCore::ImageTokenizer::finish):
2727
2728 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
2729
2730         Reviewed by Lars.
2731
2732         Set the library version of QtWebKit to the Qt version.
2733
2734         * WebCore.pro:
2735
2736 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
2737
2738         Reviewed by Holger.
2739
2740         Re-enable gzip compression as accepted encoding, now that the bug is fixed in Qt 4.4's network module.
2741
2742         * platform/network/qt/QNetworkReplyHandler.cpp:
2743         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
2744
2745 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
2746
2747         Another Windows build fix, setCookies accidentially had a const
2748         Document pointer.
2749
2750         * platform/network/win/CookieJarWin.cpp:
2751
2752 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
2753
2754         MSVC Windows build fix. Forward declaring Document in CookieJar.h
2755         seems not enough for MSVC.
2756
2757         * platform/network/win/CookieJarWin.cpp:
2758
2759 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
2760
2761         Reviewed by Maciej, Lars, Holger.
2762
2763         http://bugs.webkit.org/show_bug.cgi?id=16589
2764
2765         Add a document parameter to WebCore::cookies, setCookies and cookiesEnabled.
2766
2767         * WebCore.pro:
2768         * bindings/js/kjs_navigator.cpp:
2769         (KJS::Navigator::getValueProperty):
2770         * dom/Document.cpp:
2771         (WebCore::Document::cookie):
2772         * platform/CookieJar.h:
2773         * platform/gtk/CookieJarGtk.cpp:
2774         (WebCore::setCookies):
2775         (WebCore::cookies):
2776         * platform/mac/CookieJar.mm:
2777         * platform/network/win/CookieJarWin.cpp:
2778         * platform/qt/CookieJarQt.cpp:
2779         (WebCore::setCookies):
2780         (WebCore::cookies):
2781         (WebCore::cookiesEnabled):
2782         * platform/wx/TemporaryLinkStubs.cpp:
2783
2784 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
2785
2786         Reviewed by Holger.
2787
2788         Windows build fix. (use localtime_r again instead of _s)
2789
2790         * loader/FTPDirectoryDocument.cpp:
2791         (WebCore::processFileDateString):
2792
2793 2008-01-17  Frans Englich  <fenglich@trolltech.com>
2794
2795         Reviewed by Simon Hausmann <hausmann@webkit.org>.
2796
2797         Fix linking on MinGW and at least one MSVC platform by having gmtimeQt in the correct namespace.
2798
2799         * loader/FTPDirectoryDocument.cpp:
2800
2801 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
2802
2803         Reviewed by Holger.
2804
2805         Don't link QtWebKit against libQtXml when building against Qt 4.4.
2806
2807         This is not necessary anymore since QXmlStream has been moved into QtCore.
2808
2809         * WebCore.pro:
2810
2811 2008-01-17  Håvard Wall  <hwall@trolltech.com>
2812
2813         Reviewed by Simon Hausmann <hausmann@webkit.org>.
2814
2815         Fix compilation on arm
2816
2817         * platform/graphics/qt/GraphicsContextQt.cpp:
2818         (WebCore::GraphicsContext::endTransparencyLayer):
2819
2820 2008-01-17  Simon Hausmann  <shausman@trolltech.com>
2821
2822         Reviewed by Holger.
2823
2824         Fix compilation against Qt 4.4 without files that are specific for the Qt 4.3 build.
2825
2826         * WebCore.pro:
2827         * platform/network/qt/ResourceHandleQt.cpp:
2828         * platform/qt/MIMETypeRegistryQt.cpp:
2829         * platform/qt/PlugInInfoStoreQt.cpp:
2830
2831 2008-01-17  Frans Englich  <fenglich@trolltech.com>
2832
2833         Reviewed by Simon Hausmann <hausmann@webkit.org>.
2834
2835         Fixes compilation with MinGW.
2836         Neither localtime_r nor localtime_s are available on MingW, so instead of
2837         calling back to the thread-unsafe localtime use QDateTime instead.
2838
2839         * loader/FTPDirectoryDocument.cpp:
2840         (WebCore::FTPDirectoryTokenizer::WebCore::processFilesizeString):
2841         (WebCore::FTPDirectoryTokenizer::WebCore::wasLastDayOfMonth):
2842         (WebCore::FTPDirectoryTokenizer::WebCore::WebCore::gmtimeQt):
2843         * loader/FTPDirectoryParser.cpp:
2844         (WebCore::parseOneFTPLine):
2845
2846 2008-01-17  Dan Bernstein  <mitz@apple.com>
2847
2848         Reviewed by Dave Hyatt.
2849
2850         - fix determinePitch for segmented fonts
2851
2852         Covered by fast/css/font-face-implicit-local-font.html
2853
2854         * platform/graphics/FontFallbackList.cpp:
2855         (WebCore::FontFallbackList::determinePitch): If the primary font is
2856         segmented, treat as fixed pitch only if it has only one segment
2857         and that segment is fixed-pitch.
2858
2859 2008-01-16  David Hyatt  <hyatt@apple.com>
2860
2861         Fix for http://bugs.webkit.org/show_bug.cgi?id=16611
2862
2863         Make sure vertical-align length values are offset from their parents rather than being absolute to the
2864         line.
2865
2866         Reviewed by olliej
2867
2868         Added fast/css/vertical-align-lengths.html
2869
2870         * rendering/RenderObject.cpp:
2871         (WebCore::RenderObject::getVerticalPosition):
2872
2873 2008-01-16  Dan Bernstein  <mitz@apple.com>
2874
2875         Reviewed by Dave Hyatt.
2876
2877         - fix for @font-face rules with unicode-range: always use a local font where not
2878           explicitly overlaid.
2879
2880         Test: fast/css/font-face-implicit-local-font.html
2881
2882         * css/CSSFontSelector.cpp:
2883         (WebCore::CSSFontSelector::addFontFaceRule): Changed to insert an implicit
2884         @font-face rule with the local font the matches the family and description before
2885         any explicit @font-face rules that overlay specific ranges of the same font.
2886         * css/CSSSegmentedFontFace.h:
2887         (WebCore::CSSSegmentedFontFace::numRanges): Addded.
2888
2889 2008-01-16  Antti Koivisto  <antti@apple.com>
2890
2891         Fix Tiger build.
2892
2893         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2894         (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
2895
2896 2008-01-16  Antti Koivisto  <antti@apple.com>
2897
2898         Reviewed by Adele.
2899         
2900         OS X fix for <rdar://problem/5605682>
2901         Disallow streaming protocols for media elements
2902         and <rdar://problem/5668711>
2903         Limit the container and codec types that the <video> tag supports
2904         
2905         - Disable unsupported QuickTime tracks types. 
2906         - Disallow streaming protocols (for now).
2907         - Set QTMovie QTMoviePreventExternalURLLinksAttribute and QTSecurityPolicyNoCrossSiteAttribute 
2908           to limit QuickTime's access to external resources.
2909         
2910         Windows patch coming up.
2911
2912         Tests: media/broken-video.html
2913                media/unsupported-rtsp.html
2914                media/unsupported-tracks.html
2915
2916         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2917         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2918         (WebCore::MediaPlayerPrivate::createQTMovie):
2919         (WebCore::MediaPlayerPrivate::updateStates):
2920         (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
2921
2922 2008-01-16  Rodney Dawes  <dobey@wayofthemonkey.com>
2923
2924         Reviewed by Alp Toker.
2925
2926         http://bugs.webkit.org/show_bug.cgi?id=16897
2927         Add shared plugins directory to INCLUDE path
2928
2929         Add the plugins directory to INCLUDEPATH
2930
2931         * GNUmakefile.am:
2932         * WebCore.pro:
2933
2934 2008-01-16  Geoffrey Garen  <ggaren@apple.com>
2935
2936         Reviewed by Sam Weinig.
2937         
2938         Added a debug counter for SQL transactions. This helped me debug an SQL
2939         leak.
2940
2941         * bindings/js/JSCustomSQLTransactionCallback.cpp:
2942         (WebCore::):
2943         (WebCore::JSCustomSQLTransactionCallbackCounter::~JSCustomSQLTransactionCallbackCounter):
2944         (WebCore::JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback):
2945         (WebCore::JSCustomSQLTransactionCallback::~JSCustomSQLTransactionCallback):
2946         * bindings/js/JSCustomSQLTransactionCallback.h:
2947
2948         * bindings/js/kjs_window.cpp: Removed a silly comment.
2949
2950 2008-01-16  David Hyatt  <hyatt@apple.com>
2951
2952         Fix for http://bugs.webkit.org/show_bug.cgi?id=14846, cell padding can't be changed dynamically.
2953
2954         Reviewed by Eric Seidel
2955
2956         Added fast/table/dynamic-cellpadding.html
2957
2958         * html/HTMLTableElement.cpp:
2959         (WebCore::HTMLTableElement::parseMappedAttribute):
2960         * rendering/RenderTable.cpp:
2961         (WebCore::RenderTable::setCellPadding):
2962         * rendering/RenderTable.h:
2963
2964 2008-01-16  David Hyatt  <hyatt@apple.com>
2965
2966         Fix for <rdar://problem/5681647> Item pages on http://www.stendmarsofa.com/ hang Safari
2967
2968         This regression was caused by an attempt to implement a WinIE quirk in RenderBlock::calcInlinePrefWidths.
2969         The original patch introduced pathological O(n^2) behavior into this function even when the quirk didn't need
2970         to apply.  In addition the quirk was only partially implemented (the full quirk did not care what was adjacent
2971         to images and also needed bidi.cpp patched, since the quirk applies both when computing pref widths and when
2972         laying out).
2973
2974         This new patch rewrites the quirk to be complete.  The original test case attached to the bug that tested a variety
2975         of image/text combinations now fully matches WinIE.
2976
2977         Reviewed by Beth
2978
2979         Added fast/table/unbreakable-images-quirk.html
2980
2981         * rendering/RenderBlock.cpp:
2982         (WebCore::RenderBlock::calcInlinePrefWidths):
2983         * rendering/bidi.cpp:
2984         (WebCore::RenderBlock::findNextLineBreak):
2985
2986 2008-01-16  Rodney Dawes  <dobey@wayofthemonkey.com>
2987
2988         Reviewed by Jon Honeycutt
2989
2990         Move isPluginBlacklisted to PluginPackageWin.cpp, to avoid
2991         a circular dependency on PluginDatabaseWin
2992         Remove the getFileVersion method, and just check the versions directly
2993         in isPluginBlacklisted, as it was the only caller
2994
2995         http://bugs.webkit.org/show_bug.cgi?id=16884
2996
2997         * plugins/win/PluginDatabaseWin.cpp:
2998         * plugins/win/PluginDatabaseWin.h:
2999         * plugins/win/PluginPackageWin.cpp:
3000         * plugins/win/PluginPackageWin.h:
3001
3002 2008-01-16  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3003
3004         Reviewed by Lars.
3005
3006         * Set the cursor on the containingWindow() instead of the
3007         nativeWidget()
3008         * This should be safe even with plugins as the cursor is set
3009         on the mouse events.
3010
3011         * platform/qt/WidgetQt.cpp:
3012         (WebCore::Widget::setCursor):
3013
3014 2008-01-16  Brad Hughes  <bhughes@trolltech.com>
3015
3016         Reviewed by Lars.
3017
3018         Improve the sqlite3 dependency when building WebKit inside Qt.
3019
3020         Build sqlite3 into QtWebKit if a system sqlite3 development package
3021         can't be found.
3022
3023         * WebCore.pro:
3024
3025 2008-01-16  Lars Knoll  <lars@trolltech.com>
3026
3027         Reviewed by Simon Hausmann <simon.hausmann@trolltech.com>.
3028
3029         Implement GraphicsContext::clipOut and fix transparency layers.
3030
3031         Transparency layers where broken in two ways: It always used the
3032         complete device rect as the size of the layer pixmap and the pixmaps
3033         where not correctly initialized to transparent.
3034
3035         This fixes the worst drawing errors in the Inspector and makes drawing it
3036         10 times faster.
3037
3038         * platform/graphics/qt/GraphicsContextQt.cpp:
3039         (WebCore::toQtLineJoin):
3040         (WebCore::TransparencyLayer::TransparencyLayer):
3041         (WebCore::GraphicsContextPlatformPrivate::p):
3042         (WebCore::GraphicsContext::platformContext):
3043         (WebCore::GraphicsContext::savePlatformState):
3044         (WebCore::GraphicsContext::restorePlatformState):
3045         (WebCore::GraphicsContext::drawRect):
3046         (WebCore::GraphicsContext::drawLine):
3047         (WebCore::GraphicsContext::drawEllipse):
3048         (WebCore::GraphicsContext::strokeArc):
3049         (WebCore::GraphicsContext::drawConvexPolygon):
3050         (WebCore::GraphicsContext::fillRect):
3051         (WebCore::GraphicsContext::fillRoundedRect):
3052         (WebCore::GraphicsContext::clip):
3053         (WebCore::GraphicsContext::drawFocusRing):
3054         (WebCore::GraphicsContext::beginTransparencyLayer):
3055         (WebCore::GraphicsContext::endTransparencyLayer):
3056         (WebCore::GraphicsContext::clearRect):
3057         (WebCore::GraphicsContext::strokeRect):
3058         (WebCore::GraphicsContext::setLineCap):
3059         (WebCore::GraphicsContext::setLineJoin):
3060         (WebCore::GraphicsContext::setMiterLimit):
3061         (WebCore::GraphicsContext::setAlpha):
3062         (WebCore::GraphicsContext::setCompositeOperation):
3063         (WebCore::GraphicsContext::clipOut):
3064         (WebCore::GraphicsContext::translate):
3065         (WebCore::GraphicsContext::origin):
3066         (WebCore::GraphicsContext::rotate):
3067         (WebCore::GraphicsContext::scale):
3068         (WebCore::GraphicsContext::clipOutEllipseInRect):
3069         (WebCore::GraphicsContext::addInnerRoundedRectClip):
3070         (WebCore::GraphicsContext::setPlatformStrokeStyle):
3071         (WebCore::GraphicsContext::setPlatformStrokeThickness):
3072         (WebCore::GraphicsContext::setPlatformFillColor):
3073         (WebCore::GraphicsContext::setUseAntialiasing):
3074
3075 2008-01-16  Lars Knoll  <lars@trolltech.com>
3076
3077         Reviewed by Simon Hausmann <simon.hausmann@trolltech.com>.
3078
3079         Trivially implement the themed search field by mapping it to a text field
3080
3081         Also add a bunch of notImplemented warnings for other places where we don't
3082         have an implementatin in RenderTheme.
3083
3084         * platform/qt/RenderThemeQt.cpp:
3085         (WebCore::RenderThemeQt::paintTextField):
3086         (WebCore::RenderThemeQt::paintMenuListButton):
3087         (WebCore::RenderThemeQt::adjustMenuListButtonStyle):
3088         (WebCore::RenderThemeQt::paintSliderTrack):
3089         (WebCore::RenderThemeQt::paintSliderThumb):
3090         (WebCore::RenderThemeQt::paintSearchField):
3091         (WebCore::RenderThemeQt::adjustSearchFieldStyle):
3092         (WebCore::RenderThemeQt::adjustSearchFieldCancelButtonStyle):
3093         (WebCore::RenderThemeQt::paintSearchFieldCancelButton):
3094         (WebCore::RenderThemeQt::adjustSearchFieldDecorationStyle):
3095         (WebCore::RenderThemeQt::paintSearchFieldDecoration):
3096         (WebCore::RenderThemeQt::adjustSearchFieldResultsDecorationStyle):
3097         (WebCore::RenderThemeQt::paintSearchFieldResultsDecoration):
3098
3099 2008-01-16  Holger Freyther  <holger.freyther@trolltech.com>
3100
3101         Reviewed by Simon.
3102
3103         * Follow the EventHandlerWin.cpp and always return true in the handlers.
3104         * Match the windows implementation more closely as well.
3105         * This is fixing "selection" bugs with the Web Inspector
3106
3107         * page/qt/EventHandlerQt.cpp:
3108         (WebCore::EventHandler::focusDocumentView):
3109         (WebCore::EventHandler::passMousePressEventToSubframe):
3110         (WebCore::EventHandler::passMouseMoveEventToSubframe):
3111         (WebCore::EventHandler::passMouseReleaseEventToSubframe):
3112         (WebCore::EventHandler::passMousePressEventToScrollbar):
3113
3114 2008-01-16  Simon Hausmann  <hausmann@webkit.org>
3115
3116         Reviewed by Lars Knoll <lars@trolltech.com>.
3117
3118         Fix crashes in the new networking code.
3119
3120         When the ResourceLoader cancels the handle we have to make sure not to access
3121         the resource handle afterwards again.
3122
3123         * platform/network/qt/QNetworkReplyHandler.cpp:
3124         (WebCore::QNetworkReplyHandler::finish):
3125         (WebCore::QNetworkReplyHandler::forwardData):
3126
3127 2008-01-16  Lars Knoll  <lars@trolltech.com>
3128
3129         Reviewed by Simon.
3130
3131         add conversion methods from and to QUrl to KURL.
3132
3133         Use them in the places I found at the moment. Fixes a bug
3134         where form data was encoded twice.
3135         Also fix QWebSettings to take a QUrl for the user style sheet
3136         location.
3137
3138         * WebCore.pro:
3139         * platform/KURL.h:
3140         * platform/network/qt/QNetworkReplyHandler.cpp:
3141         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
3142         * platform/network/qt/ResourceRequestQt.cpp:
3143         (WebCore::ResourceRequest::toNetworkRequest):
3144         * platform/qt/KURLQt.cpp: Added.
3145         (WebCore::KURL::KURL):
3146         (WebCore::KURL::operator QUrl):
3147
3148 2008-01-15  Darin Adler  <darin@apple.com>
3149
3150         Rubber-stamped by Maciej Stachowiak and Oliver Hunt.
3151
3152         - fix <rdar://problem/5689748> REGRESSION: Cannot redirect to protocols handled by external applications
3153
3154         Put navigation policy delegate calls back for redirects.
3155         Just rolled out the change where I took them out.
3156
3157         * loader/MainResourceLoader.cpp:
3158         (WebCore::MainResourceLoader::callContinueAfterNavigationPolicy):
3159         (WebCore::MainResourceLoader::continueAfterNavigationPolicy):
3160         (WebCore::MainResourceLoader::willSendRequest):
3161         * loader/MainResourceLoader.h:
3162
3163 2008-01-15  Adele Peterson  <adele@apple.com>
3164
3165         Reviewed by Sam.
3166
3167         Remove unused variable for old media control background drawing code.
3168
3169         * rendering/RenderThemeMac.h:
3170         * rendering/RenderThemeMac.mm:
3171         (WebCore::RenderThemeMac::RenderThemeMac):
3172         (WebCore::RenderThemeMac::~RenderThemeMac):
3173
3174 2008-01-15  Sam Weinig  <sam@webkit.org>
3175
3176         Reviewed by Geoffrey Garen.
3177
3178         Fix <rdar://problem/5595552> r27608 introduced a 20% increase in JS binary size, 4% increase in WebCore binary size
3179
3180         - Update JS Function implementations to use a static function based method. This decreases
3181           the binary size of an Intel only build by 1013.5K.
3182
3183         * WebCore.xcodeproj/project.pbxproj:
3184         * bindings/js/JSDOMWindowCustom.cpp:
3185         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
3186         * bindings/js/JSEventTargetBase.cpp:
3187         (WebCore::jsEventTargetAddEventListener):
3188         (WebCore::jsEventTargetRemoveEventListener):
3189         (WebCore::jsEventTargetDispatchEvent):
3190         (WebCore::retrieveEventTargetAndCorrespondingNode):
3191         * bindings/js/JSEventTargetBase.h:
3192         * bindings/js/JSHTMLInputElementBase.cpp:
3193         (WebCore::jsHTMLInputElementBaseFunctionSetSelectionRange):
3194         (WebCore::JSHTMLInputElementBase::getOwnPropertySlot):
3195         * bindings/js/JSHTMLInputElementBase.h:
3196         * bindings/js/JSLocation.cpp:
3197         (WebCore::JSLocation::getOwnPropertySlot):
3198         (WebCore::jsLocationProtoFuncReplace):
3199         (WebCore::jsLocationProtoFuncReload):
3200         (WebCore::jsLocationProtoFuncAssign):
3201         (WebCore::jsLocationProtoFuncToString):
3202         * bindings/js/JSLocation.h:
3203         * bindings/js/JSXMLHttpRequest.cpp:
3204         (KJS::jsXMLHttpRequestPrototypeFunctionAbort):
3205         (KJS::jsXMLHttpRequestPrototypeFunctionGetAllResponseHeaders):
3206         (KJS::jsXMLHttpRequestPrototypeFunctionGetResponseHeader):
3207         (KJS::jsXMLHttpRequestPrototypeFunctionOpen):
3208         (KJS::jsXMLHttpRequestPrototypeFunctionSend):
3209         (KJS::jsXMLHttpRequestPrototypeFunctionSetRequestHeader):
3210         (KJS::jsXMLHttpRequestPrototypeFunctionOverrideMIMEType):
3211         (KJS::jsXMLHttpRequestPrototypeFunctionAddEventListener):
3212         (KJS::jsXMLHttpRequestPrototypeFunctionRemoveEventListener):
3213         (KJS::jsXMLHttpRequestPrototypeFunctionDispatchEvent):
3214         * bindings/js/JSXMLHttpRequest.h:
3215         * bindings/js/JSXSLTProcessor.cpp:
3216         (KJS::jsXSLTProcessorPrototypeFunctionImportStylesheet):
3217         (KJS::jsXSLTProcessorPrototypeFunctionTransformToFragment):
3218         (KJS::jsXSLTProcessorPrototypeFunctionTransformToDocument):
3219         (KJS::jsXSLTProcessorPrototypeFunctionSetParameter):
3220         (KJS::jsXSLTProcessorPrototypeFunctionGetParameter):
3221         (KJS::jsXSLTProcessorPrototypeFunctionRemoveParameter):
3222         (KJS::jsXSLTProcessorPrototypeFunctionClearParameters):
3223         (KJS::jsXSLTProcessorPrototypeFunctionReset):
3224         * bindings/js/JSXSLTProcessor.h:
3225         * bindings/js/kjs_events.cpp:
3226         (WebCore::jsClipboardPrototypeFunctionClearData):
3227         (WebCore::jsClipboardPrototypeFunctionGetData):
3228         (WebCore::jsClipboardPrototypeFunctionSetData):
3229         (WebCore::jsClipboardPrototypeFunctionSetDragImage):
3230         * bindings/js/kjs_events.h:
3231         * bindings/js/kjs_navigator.cpp:
3232         (KJS::pluginsFunctionRefresh):
3233         (KJS::navigatorProtoFuncJavaEnabled):
3234         * bindings/js/kjs_navigator.h:
3235         * bindings/js/kjs_window.cpp:
3236         (KJS::Window::getOwnPropertySlot):
3237         (KJS::windowProtoFuncAToB):
3238         (KJS::windowProtoFuncBToA):
3239         (KJS::windowProtoFuncOpen):
3240         (KJS::windowProtoFuncSetTimeout):
3241         (KJS::windowProtoFuncClearTimeout):
3242         (KJS::windowProtoFuncSetInterval):
3243         (KJS::windowProtoFuncAddEventListener):
3244         (KJS::windowProtoFuncRemoveEventListener):
3245         (KJS::windowProtoFuncShowModalDialog):
3246         (KJS::windowProtoFuncNotImplemented):
3247         * bindings/js/kjs_window.h:
3248         * bindings/scripts/CodeGenerator.pm:
3249         * bindings/scripts/CodeGeneratorJS.pm:
3250
3251 2008-01-15  Adele Peterson  <adele@apple.com>
3252
3253         Reviewed by Dan.
3254
3255         Fix for <rdar://problem/5682492> With the <video> element, the audio is heard when forwarding or rewinding a movie while it's playing
3256
3257         * rendering/MediaControlElements.cpp: (WebCore::MediaControlSeekButtonElement::defaultEventHandler):
3258           Instead of pausing the media when you stop seeking on mouse up, pause the video when you first start seeking on mouse down. 
3259
3260 2008-01-15  Alp Toker  <alp@atoker.com>
3261
3262         Rubber-stamped by Anders.
3263
3264         Make the HTTP backend configurable in the GTK+ port. curl is currently
3265         the only option.
3266
3267         * GNUmakefile.am:
3268
3269 2008-01-15  Adele Peterson  <adele@apple.com>
3270
3271         Build fix.
3272
3273         * rendering/RenderThemeSafari.cpp: Removing MediaBackgroundAppearance.
3274
3275 2008-01-14  Samuel Weinig  <sam@webkit.org>
3276
3277         Reviewed by Darin.
3278
3279         Fix for <rdar://problem/5671040>
3280         REGRESSION: 6% HTML iBench regression from r28722 (getElementsByClassName)
3281
3282         On my most consistent tests, this brings the HTML iBench from 1.46 -> 1.41,
3283         which does not completely make up reported regression, but I was not able to
3284         reproduce those findings either.
3285
3286         * css/CSSStyleSelector.cpp:
3287         (WebCore::CSSStyleSelector::matchRules):
3288         (WebCore::CSSStyleSelector::checkOneSelector):
3289         * dom/ClassNames.cpp:
3290         (WebCore::ClassNames::parseClassAttribute):
3291         * dom/ClassNames.h:
3292         (WebCore::ClassNames::contains):
3293         (WebCore::ClassNames::operator[]):
3294
3295 2008-01-15  Adele Peterson  <adele@apple.com>
3296
3297         Build fix.  This time for real.
3298
3299         * rendering/RenderThemeSafari.cpp:
3300
3301 2008-01-15  Adele Peterson  <adele@apple.com>
3302
3303         Build fix.
3304
3305         * rendering/RenderThemeSafari.cpp:
3306
3307 2008-01-15  Dan Bernstein  <mitz@apple.com>
3308
3309         Reviewed by Darin Adler.
3310
3311         - fix <rdar://problem/5666926> svg/custom/use-css-no-effect-on-shadow-tree.svg is failing
3312
3313         * svg/SVGPreserveAspectRatio.cpp:
3314         (WebCore::SVGPreserveAspectRatio::getCTM): Changed the arguments' type
3315         from float to double in order to make the values passed to scale() and
3316         translate() on Mac OS X and on Windows the same.
3317         * svg/SVGPreserveAspectRatio.h:
3318
3319 2008-01-15  Alexey Proskuryakov  <ap@webkit.org>
3320
3321         Reviewed by Darin.
3322
3323         <rdar://problem/5342813> REGRESSION: Safari encodes mailto URLs incorrectly
3324
3325         Test: fast/encoding/mailto-always-utf-8.html
3326
3327         * platform/KURL.cpp: (WebCore::encodeRelativeString): Always use UTF-8 for mailto URLs.
3328
3329 2008-01-15  Adele Peterson  <adele@apple.com>
3330
3331         Reviewed by Adam and Antti.
3332
3333         WebCore part of fix for <rdar://problem/5619062> Add load progress indicator to video controls
3334
3335         * WebCore.base.exp: Removed symbol for wkGetMediaControlBackgroundImageData.  Added symbol for wkDrawMediaSliderTrack.
3336         * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Removed case for MediaBackgroundAppearance.
3337         * css/html4.css: Removed -webkit-appearance: media-background rule for the media panel element.  Removed unnecessary margin for slider.
3338         * rendering/RenderStyle.h: (WebCore::): Removed MediaBackgroundAppearance.
3339
3340         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::initAndDispatchProgressEvent):
3341           Call updateMediaPlayer more frequently so the load progress control gets updated appropriately.
3342         * platform/mac/WebCoreSystemInterface.h: Removed wkGetMediaControlBackgroundImageData.  Added wkDrawMediaSliderTrack.
3343         * platform/mac/WebCoreSystemInterface.mm: ditto.
3344
3345         * rendering/RenderTheme.h: Removed paintMediaBackground. Added paintMediaSliderTrack.
3346         * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paint): Call paintMediaSliderTrack for elements with MediaSliderAppearance.
3347         * rendering/RenderThemeMac.h: Removed paintMediaBackground. Added paintMediaSliderTrack.
3348         * rendering/RenderThemeMac.mm:
3349         (WebCore::RenderThemeMac::adjustSliderThumbSize): Added different sizes for the media slider thumb.
3350         (WebCore::RenderThemeMac::paintMediaSliderTrack): Added.  Calls wkDrawMediaSliderTrack with the percentage the media has loaded.
3351         * rendering/RenderThemeSafari.cpp: ditto.
3352         (WebCore::RenderThemeSafari::adjustSliderThumbSize):
3353         (WebCore::RenderThemeSafari::paintMediaSliderTrack):
3354         * rendering/RenderThemeSafari.h:
3355
3356 2008-01-15  Alexey Proskuryakov  <ap@webkit.org>
3357
3358         Reviewed by Mark Rowe.
3359
3360         Some logging channels weren't initialized from user defaults.
3361
3362         * platform/mac/LoggingMac.mm: (WebCore::InitializeLoggingChannelsIfNecessary):
3363         Initialize LogPlatformLeaks, LogStorageAPI, LogMedia, LogPlugin.
3364
3365 2008-01-14  Steve Falkenburg  <sfalken@apple.com>
3366
3367         Use shared vsprops for most vcproj properties.
3368         
3369         Reviewed by Darin.
3370
3371         * WebCore.vcproj/QTMovieWin.vcproj:
3372         * WebCore.vcproj/WebCore.vcproj:
3373         * platform/graphics/win/QTMovieWin.cpp:
3374         (QTMovieWin::initializeQuickTime): Fix compiler warning.
3375
3376 2008-01-14  Eric Seidel  <eric@webkit.org>
3377
3378         Reviewed by mjs.
3379
3380         Remove a couple more uses of DeprecatedString
3381
3382         No functional changes, thus no test case.
3383
3384         * dom/Document.cpp:
3385         (WebCore::Document::write):
3386         (WebCore::Document::writeln):
3387         (WebCore::Document::recalcStyleSelector):
3388         * dom/Document.h:
3389
3390 2008-01-14  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
3391
3392         Reviewed by Alp Toker.
3393
3394         Build fix: missing symbols when compiling WebKit/Gtk+ with --enable-svg-filters
3395         http://bugs.webkit.org/show_bug.cgi?id=16874
3396
3397         * GNUmakefile.am:
3398         * svg/graphics/cairo/SVGResourceFilterCairo.cpp: Added.
3399         (WebCore::SVGResourceFilter::createPlatformData):
3400         (WebCore::SVGResourceFilter::prepareFilter):
3401         (WebCore::SVGResourceFilter::applyFilter):
3402
3403 2008-01-14  Finnur Thorarinsson  <finnur.webkit@gmail.com>
3404
3405         Reviewed by hyatt & eseidel.
3406
3407         - fix http://bugs.webkit.org/show_bug.cgi?id=16844
3408         RenderText::addLineBoxRects erroneously includes last char for boundingBox
3409
3410         This patch fixes an issue with addLineBoxRects not correctly calculating the 
3411         rects due to an off-by-one error in using box->end(). We were assuming that 
3412         end() gives the index past the last character, when in fact it gives the 
3413         index _of_ the last character. 
3414
3415         Eric Seidel and I could not find a way to test this via DRT. This method is 
3416         only used by WebKit or Safari for displaying selection rects AFAICT.
3417
3418         * rendering/RenderText.cpp:
3419         (WebCore::RenderText::addLineBoxRects):
3420
3421 2008-01-14  Darin Adler  <darin@apple.com>
3422
3423         Reviewed by Geoff.
3424
3425         - fix crash seen in layout tests
3426
3427         * html/HTMLFrameSetElement.cpp:
3428         (WebCore::HTMLFrameSetElement::attach):
3429         Remove incorrect cast to HTMLElement* for parentNode(). The parent is either an
3430         HTMLElement or a Document, not necessarily an HTMLElement.
3431
3432 2008-01-14  Darin Adler  <darin@apple.com>
3433
3434         Reviewed by Sam.
3435
3436         - fix mistakes Sam noticed in my re-speed-up patch
3437
3438         * dom/Element.cpp:
3439         (WebCore::Element::virtualHasTagName): Moved out of header file. No reason to make
3440         this inline.
3441         * dom/Element.h: Moved virtualHasTagName out of header file.
3442
3443         * dom/Node.cpp:
3444         (WebCore::Node::virtualHasTagName): Moved out of header file. No reason to make
3445         this inline.
3446         * dom/Node.h: Removed incorrect "virtual" on hasTagName and moved virtualHasTagName
3447         out of header file.
3448
3449         * platform/text/StringBuffer.h: Added. Has just the new StringBuffer class.
3450
3451         * platform/text/StringImpl.h: Removed StringBuffer class.
3452
3453         * loader/DocumentLoader.cpp: Added StringBuffer.h include.
3454         * platform/text/String.cpp: Ditto.
3455         * platform/text/StringImpl.cpp: Ditto.
3456         * platform/text/TextCodecLatin1.cpp: Ditto.
3457         * platform/text/TextCodecUTF16.cpp: Ditto.
3458         * platform/text/TextCodecUserDefined.cpp: Ditto.
3459
3460         * WebCore.vcproj/WebCore.vcproj: Added StringBuffer.h.
3461         * WebCore.xcodeproj/project.pbxproj: Ditto.
3462
3463 2008-01-14  Dave Hyatt  <hyatt@apple.com>
3464
3465         Clean up all the misplaced graphics files after the recent file moves.  Clean up the project to
3466         accurately reflect the location of all the graphics files.
3467         
3468         Reviewed by Adam
3469
3470         * WebCore.vcproj/WebCore.vcproj:
3471         * platform/graphics/win/GraphicsContextWin.cpp: Copied from platform/win/GraphicsContextWin.cpp.
3472         * platform/graphics/win/UniscribeController.cpp: Copied from platform/win/UniscribeController.cpp.
3473         * platform/graphics/win/UniscribeController.h: Copied from platform/win/UniscribeController.h.
3474         * platform/win/GraphicsContextWin.cpp: Removed.
3475         * platform/win/UniscribeController.cpp: Removed.
3476         * platform/win/UniscribeController.h: Removed.
3477
3478 2008-01-14  Geoffrey Garen  <ggaren@apple.com>
3479
3480         Reviewed by Sam Weinig.
3481         
3482         Some cleanup to my last patch.
3483
3484         Removed one unused setter declaration and one unused setter definition.
3485         
3486         Renamed DoNotCheckDomainSecurityOnRead to DoNotCheckDomainSecurityOnGet
3487         because "get" is all over the IDL files, and "read" is not.
3488
3489         * bindings/scripts/CodeGeneratorJS.pm:
3490         * page/DOMWindow.h:
3491         (WebCore::DOMWindow::defaultstatus):
3492         * page/DOMWindow.idl:
3493
3494 2008-01-14  Dan Bernstein  <mitz@apple.com>
3495
3496         Rubber-stamped by Alice Liu.
3497
3498         - remove reference to nonexistent file
3499
3500         * WebCore.vcproj/WebCore.vcproj: Removed reference to SVGFont.h.
3501
3502 2008-01-14  Darin Adler  <darin@apple.com>
3503
3504         Reviewed by Adam.
3505
3506         - re-speed-up the page load test (my StringImpl change slowed it down)
3507           <rdar://problem/5677241> 1.5% PLT regression from r29098
3508
3509         To reverse the slowdown I caused by changing StringImpl, I tightened it up,
3510         and also did a little optimization in the HTML tokenizer and in other clients
3511         of Vector.
3512
3513         * WebCore.base.exp: Removed export of a now-inline function.
3514
3515         * css/CSSParser.cpp:
3516         (WebCore::CSSParser::parseTransitionProperty): Removed use of DeprecatedString
3517         to get property ID. This could be sped up even more by writing a fast path
3518         to use a local Vector<char> rather than allocating a string.
3519         (WebCore::convertASCIIToFloat): Added. Allows numeric conversion without
3520         allocating a string object to hold the number.
3521         (WebCore::CSSParser::lex): Changed to call convertASCIIToFloat instead of
3522         DeprecatedString::toFloat.
3523
3524         * dom/Element.h:
3525         (WebCore::Element::hasTagName): Made this non-virtual and inline if you have
3526         an Element*. It's still virtual if you have a Node*.
3527         (WebCore::Element::virtualHasTagName): Virtual version that makes the Node*
3528         case work.
3529
3530         * dom/Node.h:
3531         (WebCore::Node::hasTagName): Made this non-virtual and inline so that Element
3532         can override it with an inline. This is the same technique we use for
3533         firstChild and lastChild.
3534         (WebCore::Node::virtualHasTagName): This is the private virtual that Element
3535         overrides.
3536
3537         * dom/Text.cpp:
3538         (WebCore::Text::splitText): Clean up by using a RefPtr here instead of a
3539         PassRefPtr.
3540
3541         * html/HTMLTokenizer.cpp:
3542         (WebCore::HTMLTokenizer::parseSpecial): Use the new advancePastNonNewline(),
3543         which is more efficient in cases where we know the character is not a newline
3544         and hence we don't have to update the line number.
3545         (WebCore::HTMLTokenizer::parseComment): Ditto.
3546         (WebCore::HTMLTokenizer::parseServer): Ditto.
3547         (WebCore::HTMLTokenizer::parseProcessingInstruction): Ditto.
3548         (WebCore::HTMLTokenizer::parseText): Ditto.
3549         (WebCore::HTMLTokenizer::parseEntity): Ditto.
3550         (WebCore::HTMLTokenizer::parseTag): Ditto. Also streamline the QuotedValue case
3551         so there's one less branch taken for non-punctuation characters since this
3552         code path is *so* hot.
3553         (WebCore::HTMLTokenizer::write): More of the same.
3554
3555         * loader/Cache.cpp:
3556         (WebCore::Cache::lruListFor): Use Vector::grow instead of resize.
3557
3558         * loader/DocumentLoader.cpp:
3559         (WebCore::canonicalizedTitle): Use StringBuffer instead of Vector<UChar>.
3560
3561         * loader/TextResourceDecoder.cpp:
3562         (WebCore::TextResourceDecoder::checkForCSSCharset): Use Vector::grow instead of resize.
3563         (WebCore::TextResourceDecoder::checkForHeadCharset): Ditto.
3564         (WebCore::TextResourceDecoder::decode): Use Vector::grow and shrink instead of resize.
3565         (WebCore::TextResourceDecoder::flush): Use Vector::shrink instead of resize.
3566
3567         * platform/KURL.cpp:
3568         (WebCore::KURL::decode_string): Use Vector::grow instead of resize.
3569
3570         * platform/SharedBuffer.cpp:
3571         (WebCore::SharedBuffer::clear): Use Vector::shrink instead of resize.
3572
3573         * platform/graphics/BitmapImage.cpp:
3574         (WebCore::BitmapImage::cacheFrame): Use Vector::grow instead of resize.
3575
3576         * platform/network/FormData.cpp:
3577         (WebCore::FormData::appendData): Use Vector::grow instead of resize.
3578         (WebCore::FormData::flatten): Ditto.
3579
3580         * platform/text/AtomicString.cpp:
3581         (WebCore::CStringTranslator::translate): Use a new StringImpl constructor made just
3582         for use by AtomicString. Avoids setting fields twice, and also preserves reference
3583         count behavior (which I changed for the other constructors, since they're entirely
3584         private and used only inside the class).
3585         (WebCore::UCharBufferTranslator::translate): Ditto.
3586
3587         * platform/text/Base64.cpp:
3588         (WebCore::base64Encode): Use Vector::grow instead of resize.
3589         (WebCore::base64Decode): Use Vector::grow and shrink instead of resize.
3590
3591         * platform/text/PlatformString.h:
3592         (WebCore::String::adopt): Added an overload for the new StringBuffer class. Also