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