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