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