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