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