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