JavaScriptCore:
[WebKit-https.git] / WebCore / ChangeLog
1 2008-02-02  Darin Adler  <darin@apple.com>
2
3         Reviewed by Geoff Garen.
4
5         PLT speedup related to <rdar://problem/5659272> REGRESSION: PLT .4%
6         slower due to r28884 (global variable symbol table optimization)
7
8         * history/CachedPage.cpp:
9         (WebCore::CachedPage::CachedPage): Removed saveSymbolTable call.
10         (WebCore::CachedPage::restore): Removed restoreSymbolTable call.
11         (WebCore::CachedPage::clear): Removed clear of m_windowSymbolTable.
12
13         * history/CachedPage.h: Removed m_windowSymbolTable, since save/restoreLocalStorage
14         now takes care of the symbol table. Also removed many unnecessary includes.
15
16 2008-02-02  Tony Chang  <idealisms@gmail.com>
17
18         Reviewed by eseidel.
19
20         Add an include for for <objidl.h> which isn't included
21         by default with WIN32_LEAN_AND_MEAN.
22         * platform/graphics/FontCache.h:
23
24 2008-02-02  Kevin Watters  <kevin@dotsyntax.com>
25
26         Reviewed by Kevin Ollivier.
27
28         wxFont is reference counted and meant to be used as as a value
29         object; when using wxFont*, ref-counting was not happening properly
30         and the font object would be destroyed while still in use.
31
32         Also, fix memory leak in wx's FrameData::clear() method.
33
34         * platform/graphics/SimpleFontData.h:
35         (WebCore::SimpleFontData::getWxFont):
36         * platform/graphics/wx/FontPlatformData.h:
37         (WebCore::FontPlatformData::):
38         (WebCore::FontPlatformData::FontPlatformData):
39         (WebCore::FontPlatformData::font):
40         (WebCore::FontPlatformData::hash):
41         (WebCore::FontPlatformData::operator==):
42         (WebCore::FontPlatformData::computeHash):
43         * platform/graphics/wx/FontPlatformDataWx.cpp:
44         (WebCore::fontFamilyToWxFontFamily):
45         (WebCore::FontPlatformData::FontPlatformData):
46         (WebCore::FontPlatformData::~FontPlatformData):
47         * platform/graphics/wx/FontWx.cpp:
48         (WebCore::Font::drawGlyphs):
49         * platform/graphics/wx/SimpleFontDataWx.cpp:
50         (WebCore::SimpleFontData::platformInit):
51         (WebCore::SimpleFontData::determinePitch):
52         (WebCore::SimpleFontData::platformWidthForGlyph):
53
54 2008-02-02  Kevin Ollivier  <kevino@theolliviers.com>
55
56         Reviewed by Adam Roben.
57
58         On MSW, the wx port internally uses callbacks for wxTimer, so the
59         wx port suffers from the same crash problem that was fixed
60         in r28500 for the Windows port. For now, use the SharedTimerWin.cpp
61         impl. for wx too on MSW, until a version of wx is released that
62         fixes the issue by reworking wxTimer.
63
64         * page/Page.h:
65         * platform/win/SharedTimerWin.cpp:
66         (WebCore::TimerWindowWndProc):
67         * webcore-wx.bkl:
68
69 2008-02-02  Mark Rowe  <mrowe@apple.com>
70
71         Qt build fix.
72
73         * platform/qt/ThreadingQt.cpp: Fix typo.
74
75 2008-02-02  Kevin Ollivier  <kevino@theolliviers.com>
76
77         Blind build fix for Qt port. Add Threading.h include.
78
79         * platform/qt/ThreadingQt.cpp:
80
81 2008-02-02  Kevin Ollivier  <kevino@theolliviers.com>
82
83         wx build fix - add missing include file.
84
85         * platform/wx/ThreadingWx.cpp:
86
87 2008-02-02  David Hyatt  <hyatt@apple.com>
88
89         Fix for bug 4812. Support last-child and last-of-type CSS3 selectors.  Brings Acid3 score up to 68/100.
90
91         Reviewed by olliej
92
93         Added fast/css/last-child-pseudo-class.html, fast/css/last-of-type-pseudo-class.html
94
95         * css/CSSGrammar.y:
96         * css/CSSSelector.cpp:
97         (WebCore::CSSSelector::extractPseudoType):
98         * css/CSSSelector.h:
99         (WebCore::CSSSelector::):
100         * css/CSSStyleSelector.cpp:
101         (WebCore::CSSStyleSelector::checkOneSelector):
102
103 2008-02-01  David Hyatt  <hyatt@apple.com>
104
105         Make :first-child and :first-of-type properly dynamic when the DOM changes.  Brings the Acid3 score up
106         to 66/100.
107
108         Reviewed by olliej
109
110         Added fast/css/first-child-pseudo-class.html, fast/css/first-of-type-pseudo-class.html, fast/css/empty-body-test.html
111
112         * css/CSSGrammar.y:
113         * css/CSSStyleSelector.cpp:
114         (WebCore::CSSStyleSelector::checkOneSelector):
115         * dom/Element.cpp:
116         (WebCore::Element::recalcStyle):
117         (WebCore::Element::childrenChanged):
118         * rendering/RenderStyle.cpp:
119         (WebCore::RenderStyle::RenderStyle):
120         * rendering/RenderStyle.h:
121         (WebCore::RenderStyle::childrenAffectedByFirstChildRules):
122         (WebCore::RenderStyle::setChildrenAffectedByFirstChildRules):
123         (WebCore::RenderStyle::childrenAffectedByLastChildRules):
124         (WebCore::RenderStyle::setChildrenAffectedByLastChildRules):
125         (WebCore::RenderStyle::childrenAffectedByPositionalRules):
126         (WebCore::RenderStyle::setChildrenAffectedByPositionalRules):
127         (WebCore::RenderStyle::firstChildState):
128         (WebCore::RenderStyle::setFirstChildState):
129         (WebCore::RenderStyle::lastChildState):
130         (WebCore::RenderStyle::setLastChildState):
131
132 2008-02-02  Dan Bernstein  <mitz@apple.com>
133
134         Reviewed by Oliver Hunt.
135
136         - fix <rdar://problem/5720637> Missing characters in right-to-left complex text where different fonts are used in the same run
137
138         * platform/graphics/win/UniscribeController.cpp:
139         (WebCore::UniscribeController::advance): Fixed an off-by-1 error in the
140         start offset of sub-runs of RTL runs. Changed to update
141         m_currentCharacter to the first character of the sub-run before calling
142         itemizeShapeAndPlace. In RTL runs, m_currentCharacter decreases as
143         sub-runs are processed from left to right.
144         (WebCore::UniscribeController::itemizeShapeAndPlace): Removed the
145         updating of m_currentCharacter because advance() does it now.
146
147 2008-02-01  Brady Eidson  <beidson@apple.com>
148
149         Reviewed by Darin's rubberstamp
150
151         Move the SecurityOriginHash out into a separate header as it will soon be used in different places
152
153         * WebCore.xcodeproj/project.pbxproj:
154         * platform/SecurityOriginHash.h: Added.
155         (WebCore::SecurityOriginHash::hash):
156         (WebCore::SecurityOriginHash::equal):
157         (WebCore::SecurityOriginTraits::deletedValue):
158         (WebCore::SecurityOriginTraits::emptyValue):
159         * storage/DatabaseTracker.cpp:
160
161 2008-02-01  Darin Adler  <darin@apple.com>
162
163         Reviewed by Tim.
164
165         - fixed mistake in the JSLock fix that caused an assertion every time
166
167         * bindings/js/JSCustomSQLTransactionCallback.cpp:
168         (WebCore::JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback): Added JSLock.
169         (WebCore::unprotectOnMainThread): Ditto.
170
171 2008-02-01  Anders Carlsson  <andersca@apple.com>
172
173         Reviewed by Antti and Darin.
174
175         Change Text::createWithLengthLimit to take a UChar pointer instead of a string. This
176         lets us avoid making a copy of the buffer in TextDocument.cpp.
177         
178         * dom/Text.cpp:
179         (WebCore::Text::createWithLengthLimit):
180         * dom/Text.h:
181         * html/HTMLParser.cpp:
182         (WebCore::HTMLParser::parseToken):
183         * loader/TextDocument.cpp:
184         (WebCore::TextTokenizer::write):
185
186 2008-02-01  Darin Adler  <darin@apple.com>
187
188         Reviewed by Adam.
189
190         * platform/network/mac/ResourceHandleMac.mm:
191         (WebCore::ResourceHandle::loadsBlocked): Fix grammar and word typo.
192
193 2008-02-01  Darin Adler  <darin@apple.com>
194
195         Reviewed by Adam.
196
197         - fix <rdar://problem/4527931> showModalDialog calls from onload functions fail (Aspect)
198
199         No automated regression test because showModalDialog doesn't work in DumpRenderTree.
200
201         * platform/network/mac/ResourceHandleMac.mm:
202         (WebCore::CallbackGuard::CallbackGuard): Added.
203         (WebCore::CallbackGuard::~CallbackGuard): Added.
204         (WebCore::ResourceHandle::supportsBufferedData): Simplified to take advantage of how
205         static initialization works in C++.
206         (WebCore::ResourceHandle::loadsBlocked): Always return false on Leopard. The problem in
207         NSURLConnection that created the need to block loads is fixed in Leoaprd. This is the
208         bug fix.
209         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
210         Use CallbackGuard instead of directly incrementing the count; allows us to omit the code
211         entirely on Leopard.
212         (-[WebCoreResourceHandleAsDelegate connection:didReceiveAuthenticationChallenge:]):
213         Ditto.
214         (-[WebCoreResourceHandleAsDelegate connection:didCancelAuthenticationChallenge:]):
215         Ditto.
216         (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
217         Ditto.
218         (-[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:]):
219         Ditto.
220         (-[WebCoreResourceHandleAsDelegate connection:willStopBufferingData:]):
221         Ditto.
222         (-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]):
223         Ditto.
224         (-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]):
225         Ditto.
226         (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]):
227         Ditto. Fixes a problem where this could leave inNSURLConnectionCallback set
228         permanently in one of the code paths; this would break showModalDialog from that
229         point on. This problem doesn't affect Safari.
230
231 2008-02-01  Darin Adler  <darin@apple.com>
232
233         * platform/network/mac/ResourceHandleMac.mm:
234         (WebCore::ResourceHandle::loadsBlocked): Roll out accidentally checked in file.
235
236 2008-02-01  Darin Adler  <darin@apple.com>
237
238         Reviewed by Geoff and Brady.
239
240         - fix <rdar://problem/5680469> Each database worker thread takes a JSLock,
241           which slows down all JavaScript execution until the thread terminates
242
243         * bindings/js/JSCustomSQLTransactionCallback.cpp:
244         (WebCore::JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback):
245         Explicitly gcProtect, since we aren't using ProtectedPtr any more.
246         (WebCore::unprotectOnMainThread): Added.
247         (WebCore::JSCustomSQLTransactionCallback::~JSCustomSQLTransactionCallback):
248         Use unprotectOnMainThread rather than doing a gcUnprotect here.
249         * bindings/js/JSCustomSQLTransactionCallback.h: Changed m_callback from
250         a ProtectedPtr to a plain old JSObject*; we gcProtect by hand now.
251
252         * loader/icon/IconDatabase.cpp:
253         (WebCore::IconDatabase::notifyPendingLoadDecisionsOnMainThread):
254         Renamed. Changed to takea a void* with the icon database pointer.
255         (WebCore::IconDatabase::notifyPendingLoadDecisions): Renamed.
256         (WebCore::IconDatabase::performURLImport): Updated name, and pass the
257         icon database pointer in.
258         * loader/icon/IconDatabase.h: Renamed and added void* parameter.
259
260         * platform/Threading.h: Changed callOnMainThread to take a function with a
261         single parameter rather than a function with no parameters. Added a typedef.
262
263         * platform/gtk/ThreadingGtk.cpp:
264         (WebCore::callFunctionOnMainThread): Changed to use a structure with both
265         a function pointer and a context pointer, and delete it after calling.
266         (WebCore::callOnMainThread): Changed to create the structure with both
267         the function and context pointer.
268
269         * platform/mac/Threading.mm:
270         (-[WebCoreFunctionWrapper initWithFunction:context:]): Added context.
271         (-[WebCoreFunctionWrapper invoke]): Updated to do both function and context.
272         Renamed from _call.
273         (WebCore::callOnMainThread): Updated to take both function and context.
274
275         * platform/qt/ThreadingQt.cpp:
276         (WebCore::PerformFunctionEvent::PerformFunctionEvent): Added context.
277         (WebCore::PerformFunctionEvent::invoke): Added. Calls function with context pointer.
278         (WebCore::MainThreadInvoker::event): Changed to call invoke.
279         (WebCore::callOnMainThread): Updated to take both function and context.
280
281         * platform/win/ThreadingWin.cpp: Added FunctionWithContext.
282         (WebCore::callFunctionsOnMainThread): Changed to pass call function with context.
283         (WebCore::callOnMainThread): Updated to queue both function and context.
284
285         * platform/wx/ThreadingWx.cpp:
286         (WebCore::callOnMainThread): Updated to take both function and context.
287
288         * storage/Database.cpp:
289         (WebCore::Database::scheduleTransactionCallback): Pass 0 for context.
290         (WebCore::Database::deliverAllPendingCallbacks): Changed to take ignored context pointer.
291         * storage/Database.h: Added void* parameter to deliverAllPendingCallbacks.
292
293         * storage/DatabaseTracker.cpp:
294         (WebCore::DatabaseTracker::scheduleForNotification): Pass 0 for context.
295         (WebCore::DatabaseTracker::notifyDatabasesChanged): Changed to take ignored context pointer.
296         * storage/DatabaseTracker.h: Added void* parameter to notifyDatabasesChanged.
297
298 2008-02-01  Jon Honeycutt  <jhoneycutt@apple.com>
299
300         Rubber-stamped by Ollie.
301
302         * plugins/win/PluginPackageWin.cpp:
303         (WebCore::PluginPackageWin::load): Fix two function pointers
304
305 2008-02-01  Geoffrey Garen  <ggaren@apple.com>
306
307         Reviewed by John Sullivan, Oliver Hunt.
308
309         Fixed <rdar://problem/5688039> REGRESSION (r29428): Weather widget
310         fails to load due to reliance on "var location" quirk
311         
312         Added a Dashboard quirk.
313
314         * bindings/js/kjs_window.cpp:
315         (KJS::Window::put): In DB backwards compatibility mode, make assignment
316         to window.location in top-level windows shadow the DOM location API
317         instead of performing a navigation. This makes a reasonable amount of
318         sense, because widgets can't navigate their top-level frames, anyway.
319
320 2008-02-01  David Hyatt  <hyatt@apple.com>
321
322         Fix for bug 11387, CSS3 :empty selector is not dynamic.
323
324         Add support for dynamically updating elements whose style is affected by :empty when the child count changes.
325
326         Reviewed by olliej, mitzpettel
327
328         fast/css/empty-pseudo-class.html
329
330         * css/CSSStyleSelector.cpp:
331         (WebCore::CSSStyleSelector::locateSharedStyle):
332         (WebCore::CSSStyleSelector::checkOneSelector):
333         * dom/Element.cpp:
334         (WebCore::Element::childrenChanged):
335         * dom/Element.h:
336         * rendering/RenderStyle.h:
337         (WebCore::RenderStyle::affectedByEmpty):
338         (WebCore::RenderStyle::emptyState):
339         (WebCore::RenderStyle::setEmptyState):
340
341 2008-02-01  Dan Bernstein  <mitz@apple.com>
342
343         Reviewed by Darin Adler.
344
345         - switch line breaking from using Carbon Unicode Utilities to using ICU
346           on Leopard
347           <http://bugs.webkit.org/show_bug.cgi?id=4628>
348
349         fast/text/international/thai-line-breaks.html results do not change.
350
351         * rendering/break_lines.cpp:
352         (WebCore::nextBreakablePosition): Changed to use Carbon only on Tiger.
353
354 2008-02-01  Rodney Dawes  <dobey@wayofthemonkey.com>
355
356         Reviewed by Darin.
357
358         Update npfunctions.h to export the proper function signatures for UNIX and add
359         the appropriate #if around the Windows versions
360
361         * plugins/npfunctions.h:
362
363 2008-02-01  Eric Seidel  <eric@webkit.org>
364
365         Reviewed by Oliver.
366
367         Add getSVGDocument to frame and iframe.
368
369         Test: svg/custom/frame-getSVGDocument.html
370
371         * html/HTMLEmbedElement.cpp:
372         * html/HTMLEmbedElement.h:
373         * html/HTMLFrameElement.idl:
374         * html/HTMLFrameOwnerElement.cpp:
375         (WebCore::HTMLFrameOwnerElement::getSVGDocument):
376         * html/HTMLFrameOwnerElement.h:
377         * html/HTMLIFrameElement.idl:
378         * html/HTMLObjectElement.cpp:
379         * html/HTMLObjectElement.h:
380
381 2008-01-30  Eric Seidel  <eric@webkit.org>
382
383         Reviewed by darin.
384
385         Beat CSSParser with the RefPtr stick.  Hopefully squashing any leaks in the process.
386         (Deploy RefPtr and PassRefPtr throughout CSSParser)
387         http://bugs.webkit.org/show_bug.cgi?id=17108
388
389         No functional changes, thus no tests.
390
391         * css/CSSParser.cpp:
392         (WebCore::CSSParser::parseColor):
393         (WebCore::CSSParser::parseValue):
394         (WebCore::CSSParser::addBackgroundValue):
395         (WebCore::CSSParser::parseBackgroundShorthand):
396         (WebCore::CSSParser::addTransitionValue):
397         (WebCore::CSSParser::parseTransitionShorthand):
398         (WebCore::CSSParser::parseBackgroundPosition):
399         (WebCore::CSSParser::parseBackgroundProperty):
400         (WebCore::CSSParser::parseTransitionProperty):
401         (WebCore::CSSParser::parseFontFaceSrc):
402         (WebCore::ShadowParseContext::ShadowParseContext):
403         (WebCore::CSSParser::parseShadow):
404         (WebCore::BorderImageParseContext::BorderImageParseContext):
405         (WebCore::BorderImageParseContext::commitBorderImage):
406         * css/CSSParser.h:
407         * css/SVGCSSParser.cpp:
408         (WebCore::CSSParser::parseSVGValue):
409
410 2008-01-31  Oliver Hunt  <oliver@apple.com>
411
412         RS=Brady.
413
414         Add platform/Locker.h to vcproj
415
416         * WebCore.vcproj/WebCore.vcproj:
417
418 2008-01-31  Brady Eidson  <beidson@apple.com>
419
420         Build fix
421
422         * WebCore.xcodeproj/project.pbxproj: Header -> WebKit
423
424 2008-01-31  Brady Eidson  <beidson@apple.com>
425
426         Reviewed by Maciej
427
428         Abstracted the concept of a "Locker" as upcoming work will rely on it.
429
430         * platform/Locker.h: Added.  Template class to "lock()" and "unlock()" some arbitrary object
431         (WebCore::Locker::Locker): Lock the object
432         (WebCore::Locker::~Locker): Unlock it
433         * platform/Threading.h: `class MutexLocker` is now `typedef Locker<Mutex>`
434         * WebCore.xcodeproj/project.pbxproj:
435
436 2008-01-31  Kevin McCullough  <kmccullough@apple.com>
437
438         <rdar://problem/5716912> REGRESSION (r29816): Can't navigate back to
439         Gmail Inbox from Gmail Compose page
440         Rolling out the change that caused the regression.
441
442         * WebCore.base.exp:
443         * bindings/js/JSHTMLDocumentCustom.cpp:
444         (WebCore::JSHTMLDocument::open):
445         * dom/DOMImplementation.cpp:
446         (WebCore::DOMImplementation::createHTMLDocument):
447         * dom/Document.cpp:
448         (WebCore::Document::recalcStyle):
449         (WebCore::Document::open):
450         (WebCore::Document::write):
451         (WebCore::Document::clear):
452         * dom/Document.h:
453         * history/HistoryItem.cpp:
454         (WebCore::HistoryItem::HistoryItem):
455         * history/HistoryItem.h:
456         * loader/FrameLoader.cpp:
457         (WebCore::FrameLoader::didExplicitOpen):
458         (WebCore::FrameLoader::load):
459         (WebCore::FrameLoader::reloadAllowingStaleData):
460         (WebCore::FrameLoader::reload):
461         (WebCore::FrameLoader::tokenizerProcessedData):
462         (WebCore::FrameLoader::post):
463         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
464         (WebCore::FrameLoader::shouldTreatURLAsSameAsCurrent):
465         (WebCore::FrameLoader::loadItem):
466         * loader/FrameLoader.h:
467         * platform/text/CharacterNames.h:
468         * xml/DOMParser.cpp:
469         (WebCore::DOMParser::parseFromString):
470         * xml/XMLHttpRequest.cpp:
471         (WebCore::XMLHttpRequest::getResponseXML):
472         * xml/XSLTProcessor.cpp:
473         (WebCore::XSLTProcessor::createDocumentFromSource):
474
475 2008-01-31  Matt Lilek  <webkit@mattlilek.com>
476
477         Reviewed by Tim Hatcher.
478
479         Bug 14960: Cannot copy text in Web Inspector Network panel
480         http://bugs.webkit.org/show_bug.cgi?id=14960
481
482         * page/inspector/inspector.css:
483
484 2008-01-31  Matt Lilek  <webkit@mattlilek.com>
485
486         Reviewed by Adam Roben.
487
488         Bug 14514: Add full URL view on mouseOver in the network page
489         http://bugs.webkit.org/show_bug.cgi?id=14514
490         <rdar://problem/5712841>
491
492         * page/inspector/inspector.js:
493
494 2008-01-31  Alp Toker  <alp@atoker.com>
495
496         Rubber-stamped Adam Roben.
497
498         http://bugs.webkit.org/show_bug.cgi?id=17006
499         [GTK] Header path should be webkit/webkit.h
500
501         Move the GTK+ API sources as needed and update the build systems.
502
503         * GNUmakefile.am:
504         * WebCore.pro:
505
506 2008-01-31  Sam Weinig  <sam@webkit.org>
507
508         Reviewed by Geoff Garen.
509
510         No need to get the prototype just to compare compare property names.
511
512         * bindings/js/JSHistoryCustom.cpp:
513         (WebCore::JSHistory::customGetOwnPropertySlot):
514
515 2008-01-31  Sam Weinig  <sam@webkit.org>
516
517         Fix non-mac builds.
518
519         * GNUmakefile.am:
520         * WebCore.pro:
521         * WebCore.vcproj/WebCore.vcproj:
522         * WebCoreSources.bkl:
523
524 2008-01-31  David Hyatt  <hyatt@apple.com>
525
526         Fix for bug 17101.
527
528         List items need to ignore the line box shrinking quirk, since IE and Firefox both do.
529
530         Reviewed by Eric
531
532         fast/lists/list-item-line-height.html
533
534         * rendering/InlineFlowBox.h:
535         (WebCore::InlineFlowBox::InlineFlowBox):
536
537 2008-01-31  Samuel Weinig  <sam@webkit.org>
538
539         Reviewed by Darin Adler.
540
541         Fix for <rdar://problem/5708993> Mutability of the History object
542
543         - Don't allow cross-domain get access to any of the history objects properties
544           except the back(), forward() and go() methods.
545         - Don't allow cross-domain put access to any of the history objects properties.
546         - Don't allow cross-domain enumeration of the History or Location objects.
547
548         Tests: http/tests/security/cross-frame-access-history-get-override.html
549                http/tests/security/cross-frame-access-history-get.html
550                http/tests/security/cross-frame-access-history-put.html
551
552         * WebCore.xcodeproj/project.pbxproj:
553         * bindings/js/JSDOMWindowCustom.cpp: Remove unnessary KJS::'s
554         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
555         (WebCore::JSDOMWindow::customPut):
556         (WebCore::JSDOMWindow::getPropertyNames): Moved implementation from KJS::Window now that the declaration is autogenerated
557         using the new CustomGetPropertyNames.
558         (WebCore::JSDOMWindow::postMessage):
559
560         * bindings/js/JSHistoryCustom.cpp: Added.
561         (WebCore::allowsAccessFromFrame):
562         (WebCore::JSHistory::customGetOwnPropertySlot): Only allow getting the declared functions back(), forward() and go() from cross-domain.
563         Deny all other gets.
564         (WebCore::JSHistory::customPut): Don't allow putting cross-domain.
565         (WebCore::JSHistory::getPropertyNames): Don't allow enumeration cross-domain.
566
567         * bindings/js/JSLocation.cpp:
568         (WebCore::allowsAccessFromFrame):
569         (WebCore::JSLocation::getPropertyNames): Don't allow enumeration cross-domain.
570         * bindings/js/JSLocation.h:
571
572         * bindings/js/kjs_window.cpp:
573         * bindings/js/kjs_window.h:
574
575         * bindings/scripts/CodeGeneratorJS.pm:
576         Add support for new CustomGetPropertNames extended attribute and changed the logic of CustomPutFunction
577         to create an overrided put() function even if no read-write properties exist.
578
579         * page/DOMWindow.idl: Added CustomGetPropertNames
580         * page/History.idl: Added CustomGetPropertNames
581
582 2008-01-30  Justin Garcia  <justin.garcia@apple.com>
583
584         Reviewed by Darin Adler.
585         
586         <rdar://problem/5708115> REGRESSION: Words selected with a double click and copied won't paste into Mail
587
588         * page/mac/WebCoreFrameBridge.h: Re-exposed smartInsertForString:, it's used by a WebKit method used by Mail.
589
590 2008-01-31  Adam Roben  <aroben@apple.com>
591
592         Add line box drawing code to InspectorController::drawNodeHighlight
593
594         This makes drawNodeHighlight a complete replacement for the painting
595         code in WebKit/mac/WebNodeHighlightView.mm, and also brings line box
596         rects to Windows for the first time.
597
598         Reviewed by Darin.
599
600         * dom/Node.h: Changed isSVGElement to always exist, but to only be
601         virtual when ENABLE(SVG) is true. This way you can always call
602         node->isSVGElement() without checking ENABLE(SVG).
603         * page/InspectorController.cpp:
604         (WebCore::InspectorController::drawNodeHighlight): Ported line box
605         rect code from the Mac implementation in WebNodeHighlightView.mm.
606
607 2008-01-31  Adam Roben  <aroben@apple.com>
608
609         Put more knowledge about the node highlight in WebCore
610
611         InspectorController now calculates the overlay rect and node rect when
612         drawing the node highlight instead of having them be passed in.
613         InspectorController now holds onto the highlighted node so that it can
614         determine these rects.
615
616         Once all platforms are calling down to drawNodeHighlight instead of
617         drawing the highlight themselves, we can change
618         InspectorClient::highlight(Node*) to something like
619         InspectorClient::updateAndShowHighlight().
620
621         This also fixes Bug 14264: Node highlight makes it impossible to
622         scroll the page
623         <http://bugs.webkit.org/show_bug.cgi?id=14264>
624         <rdar://5712788>
625
626         Reviewed by Darin.
627
628         * page/InspectorController.cpp:
629         (WebCore::InspectorController::highlight): Store the node for use in
630         drawNodeHighlight.
631         (WebCore::InspectorController::drawNodeHighlight): Changed to be a
632         const instance method. Now calculates the overlay rect and node rect
633         instead of having them passed in.
634         * page/InspectorController.h:
635
636 2008-01-31  Adam Roben  <aroben@apple.com>
637
638         Add node highlight drawing code to InspectorController
639
640         The code came from WebKit/win/WebNodeHighlight.cpp. It's not quite as
641         complete as the Mac implementation (in particular, it doesn't handle
642         line-box rects), but it's a start.
643
644         Reviewed by Darin.
645
646         * page/InspectorController.cpp:
647         (WebCore::InspectorController::drawNodeHighlight): Added.
648         * page/InspectorController.h:
649
650 2008-01-31  Dan Bernstein  <mitz@apple.com>
651
652         Reviewed by Dave Hyatt.
653
654         - fix http://bugs.webkit.org/show_bug.cgi?id=17107
655           <rdar://problem/5716722> REGRESSION (r29834): Article text on redhat.com magazine site appears to be painting twice
656
657         Test: fast/block/float/intruding-painted-twice.html
658
659         * rendering/RenderBlock.cpp:
660         (WebCore::RenderBlock::layoutBlock): Pass 'false' for the new
661         makeChildPaintOtherFloats parameter to addOverhangingFloats() because at
662         this point we are only taking away floats from the child.
663         (WebCore::RenderBlock::layoutBlockChildren): Pass 'true' for the new
664         makeChildPaintOtherFloats parameter to addOverhangingFloats() iff the
665         child was not laid out again. Only in that case, it may have overhanging
666         floats that it does not paint because they used to be overhanging from
667         the parent, but now they are not.
668         (WebCore::RenderBlock::addOverhangingFloats): Refined the conditions for
669         making the child paint the float: require that the float be a descendant
670         of the child (the other case is when it intrudes into the child from
671         another sibling) and that it does not have a layer (in which case it
672         paints itself). In addition, do the check only if the caller passed
673         'true' for the makeChildPaintOtherFloats parameter.
674         * rendering/RenderBlock.h:
675
676 2008-01-30  Dan Bernstein  <mitz@apple.com>
677
678         Reviewed by Sam Weinig.
679
680         - change the interpretation of unicode-range values in "from-to" form
681           to include the "to" character.
682
683         Test: fast/css/font-face-unicode-range.html
684
685         * css/CSSParser.cpp:
686         (WebCore::CSSParser::parseFontFaceUnicodeRange):
687         * css/CSSSegmentedFontFace.cpp:
688         (WebCore::CSSSegmentedFontFace::overlayRange):
689         * platform/graphics/GlyphPageTreeNode.cpp:
690         (WebCore::GlyphPageTreeNode::initializePage):
691         * platform/graphics/SegmentedFontData.cpp:
692         (WebCore::SegmentedFontData::fontDataForCharacter):
693         (WebCore::SegmentedFontData::containsCharacters):
694
695 2008-01-30  Dan Bernstein  <mitz@apple.com>
696
697         Reviewed by Darin Adler.
698
699         - prune references to custom fonts' SimpleFontData from the glyph page
700           tree when they are destroyed
701
702         * css/CSSFontFaceSource.cpp:
703         (WebCore::CSSFontFaceSource::pruneTable):
704
705 2008-01-30  Darin Adler  <darin@apple.com>
706
707         Reviewed by Tim Hatcher.
708
709         New fix for <rdar://problem/5688428> Reproducible assertion failure
710         in SQLTransaction::performNextStep() (16876)
711
712         Fixes a deadlock that was happening for all Database use. All
713         storage layout tests pass.
714
715         * storage/Database.cpp:
716         (WebCore::CurrentThreadSetter::CurrentThreadSetter): New helper class
717         to set the current thread and zero it on destruction.
718         (WebCore::CurrentThreadSetter::~CurrentThreadSetter): Set threadIdentifierStorage to 0.
719         (WebCore::Database::Database): Set m_transactionStepThread to 0.
720         (WebCore::Database::performTransactionStep): Set m_transactionStepThread to currentThread().
721         (WebCore::Database::scheduleTransactionCallback): Assert m_transactionStepThread
722         is currentThread().
723         * storage/Database.h: Add m_transactionStepThread for debug builds
724         to track which thread performTransactionStep() was called on. 
725
726 2008-01-30  Timothy Hatcher  <timothy@apple.com>
727
728         Reviewed by Darin Adler.
729
730         ASSERTION FAILED: JSLock::lockCount() > 0 when opening the
731         Web Inspector on a page with a Database.
732
733         Fix the ASSERT by taking a JSLock before calling toJS().
734
735         * page/InspectorController.cpp:
736         (WebCore::InspectorController::addDatabaseScriptResource):
737
738 2008-01-30  Beth Dakin  <bdakin@apple.com>
739
740         Reviewed by Darin.
741
742         Fix for <rdar://problem/5598609> CrashTracer: [USER] 626 crashes in 
743         Safari at com.apple.WebCore: WebCore::FrameView::needsFullRepaint 
744         const + 6
745
746         The real problem here is tracked by rdar://5598072, which is that 
747         frames can lose sync between their view and their document when a 
748         non-HTML view is loaded (such as bookmarks view or a PDF). That can 
749         cause this crash if the layout timer fires before things have fixed 
750         themselves. This fix turns an ASSERT in FrameView::layout() into an 
751         early return to cause graceful failure until the root of the 
752         problem is addressed. 
753
754         * page/FrameView.cpp:
755         (WebCore::FrameView::layout):
756
757 2008-01-30  Justin Garcia  <justin.garcia@apple.com>
758
759         Reviewed by Darin Adler.
760
761         <rdar://problem/5700414> REGRESSION (Adama-ToT): Selecting "Header 1" style in Leopard Server wiki inserts newline
762
763         * editing/FormatBlockCommand.cpp:
764         (WebCore::FormatBlockCommand::doApply): If the selected paragraph was empty,
765         we may still need to call moveParagrah to remove the line break that holds that
766         paragraph open because the new block of the requested type needs to to replace it.
767
768 2008-01-30  Timothy Hatcher  <timothy@apple.com>
769
770         Reviewed by Darin Adler.
771
772         <rdar://problem/5688428> Reproducible assertion failure in SQLTransaction::performNextStep() (16876)
773
774         Revised fix to use the globalCallbackMutex() mutex and hold the mutex
775         for the entire function scope.
776
777         * storage/Database.cpp:
778         (WebCore::Database::performTransactionStep):
779
780 2008-01-30  Timothy Hatcher  <timothy@apple.com>
781
782         Reviewed by Adam Roben.
783
784         Make ResourceTreeElement inherit the prototype of TreeElement.
785
786         * page/inspector/Resource.js:
787
788 2008-01-30  Sam Weinig  <sam@webkit.org>
789
790         Reviewed by Adam Roben.
791
792         Don't include SecurityOrigin.h in Document.h so that we can avoid massive
793         recompilation when changing the SecurityOrigin.
794
795         * dom/Document.cpp:
796         (WebCore::Document::setSecurityOrigin):
797         * dom/Document.h:
798
799 2008-01-30  Tim Omernick  <timo@apple.com>
800
801         Reviewed by Tim Hatcher and Brady.
802
803         <rdar://problem/5688428> Reproducible assertion failure in SQLTransaction::performNextStep() (16876)
804
805         * storage/Database.cpp:
806         (WebCore::Database::performTransactionStep): Do not perform the next transaction if
807         a global callback is already scheduled.
808
809 2008-01-30  Jon Honeycutt  <jhoneycutt@apple.com>
810
811         Reviewed by Darin.
812
813         <rdar://problem/5669317> Crash closing pop up window with Real Player
814         content
815
816         Some RealPlayer versions hang on unload. To prevent this hang, don't
817         unload versions since the last known unloadable version.
818         <rdar://problem/5713147> tracks revisiting this when the bug in
819         RealPlayer is fixed and we can again unload the plug-in.
820
821         * plugins/win/PluginPackageWin.cpp:
822         (WebCore::PluginPackageWin::compareFileVersion): Compare the plug-in's
823         file version to the passed file version, returning -1, 0, or 1 if the
824         plug-in's version is less than, equal to, or greater than the version
825         passed.
826         (WebCore::PluginPackageWin::isPluginBlacklisted): Use
827         compareFileVersion()
828         * plugins/win/PluginPackageWin.h:
829         * plugins/win/PluginViewWin.cpp:
830         (WebCore::PluginViewWin::determineQuirks): If the plug-in version is
831         newer than the last-known unloadable version, add the DontUnloadPlugin
832         quirk
833
834 2008-01-29  Mark Rowe  <mrowe@apple.com>
835
836         Reviewed by Tim Hatcher.
837
838         Look for headers relative to NEXT_ROOT so that build-root picks up the WebCoreSQLite
839         version of sqlite3.h rather than the older system version.
840
841         * Configurations/Base.xcconfig:
842
843 2008-01-29  Dan Bernstein  <mitz@apple.com>
844
845         - build fix
846
847         * loader/CachedFont.cpp:
848         (WebCore::CachedFont::CachedFont):
849
850 2008-01-29  Mark Rowe  <mrowe@apple.com>
851
852         Reviewed by Brady Eidson.
853
854         Add the correct directory to the header search paths in Production builds.
855
856         * Configurations/Base.xcconfig:
857
858 2008-01-29  Dan Bernstein  <mitz@apple.com>
859
860         Reviewed by Dave Hyatt.
861
862         - fix http://bugs.webkit.org/show_bug.cgi?id=17085
863           <rdar://problem/5714136> REGRESSION (r29839): All remote fonts are treated as SVG fonts
864
865         Test: fast/css/font-face-remote.html
866
867         Added an isSVGFont method to CachedFont and use it to decide how to
868         process the font data. Currently whether the data is SVG is determined
869         based on the format property in the @font-face rule, but in the future
870         the MIME type or other metadata may be used when the format is
871         unspecified.
872
873         * css/CSSFontFaceSource.cpp:
874         (WebCore::CSSFontFaceSource::getFontData): Changed to parse the data as
875         SVG only if the CachedFont is an SVG font.
876         * css/CSSFontSelector.cpp:
877         (WebCore::CSSFontSelector::addFontFaceRule): Mark the CachedFont as an
878         SVG font based on format.
879         * loader/CachedFont.cpp:
880         (WebCore::CachedFont::CachedFont): Initialize m_isSVGFont to false.
881         (WebCore::CachedFont::ensureCustomFontData):
882         (WebCore::CachedFont::ensureSVGFontData):
883         (WebCore::CachedFont::getSVGFontById):
884         * loader/CachedFont.h:
885         (WebCore::CachedFont::isSVGFont): Added.
886         (WebCore::CachedFont::setSVGFont): Added.
887
888 2008-01-29  Antti Koivisto  <antti@apple.com>
889
890         Some comment cleanup.
891
892         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
893         (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
894         * platform/graphics/win/QTMovieWin.cpp:
895         (QTMovieWin::load):
896         (QTMovieWin::disableUnsupportedTracks):
897
898 2008-01-29  Adele Peterson  <adele@apple.com>
899
900         Reviewed by Antti.
901
902         Fix for <rdar://5683527> media/{audio,video|-controls-rendering.html failing
903         
904         * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::isControlStyled):
905         Don't treat all media controls as styled.  This causes builds with an old version of SafariTheme to have different metrics for these controls.
906
907 2008-01-29  Dan Bernstein  <mitz@apple.com>
908
909         Reviewed by Dave Hyatt.
910
911         - make Font instances cache their primary font
912
913         * WebCore.base.exp:
914         * platform/graphics/Font.cpp:
915         (WebCore::Font::Font):
916         (WebCore::Font::operator=):
917         (WebCore::Font::cachePrimaryFont):
918         (WebCore::Font::update):
919         * platform/graphics/Font.h:
920         (WebCore::Font::primaryFont):
921
922 2008-01-29  Dan Bernstein  <mitz@apple.com>
923
924         - Leopard build fix
925
926         * platform/graphics/SimpleFontData.cpp:
927         (WebCore::SimpleFontData::SimpleFontData):
928
929 2008-01-29  Mark Rowe  <mrowe@apple.com>
930
931         Reviewed by Tim Hatcher.
932
933         <rdar://problem/5600926> WebCore on Tiger must link to its own copy of SQLite 3.4 or newer (so HTML database behavior will be correct).
934
935         * Configurations/Base.xcconfig: Update the header search path on Tiger.
936         * Configurations/DebugRelease.xcconfig: Update the header search path on Tiger.
937         * Configurations/WebCore.xcconfig: Link against libWebCoreSQLite3.a when building on Tiger.
938         * WebCore.xcodeproj/project.pbxproj: Update the header search path in Production builds on Tiger.
939
940 2008-01-29  Dan Bernstein  <mitz@apple.com>
941
942         Reviewed by Adam Roben and Oliver Hunt.
943
944         - fix <rdar://problem/5713131> REGRESSION (r29246): Many SVG font tests are failing
945
946         * platform/graphics/SimpleFontData.cpp:
947         (WebCore::SimpleFontData::SimpleFontData): Use double instead of float
948         for consistent rounding behavior between Mac OS X and Windows.
949
950 2008-01-29  Adam Roben  <aroben@apple.com>
951
952         Fix <rdar://5713302> Web Inspector on Windows is not using the
953         localized strings
954
955         Reviewed by Steve.
956
957         * WebCore.vcproj/WebCore.vcproj: Copy InspectorLocalizedStrings.js to
958         $WebKitOutputDir.
959         * page/InspectorController.cpp: Touch this to force the project to
960         build.
961
962 2008-01-29  Eric Seidel  <eric@webkit.org>
963
964         Reviewed by Nikolas.
965
966         Acid3 after double-attach
967         http://bugs.webkit.org/show_bug.cgi?id=17058
968         
969         I believe SVGTextPathElement::buildPendingResource() was entirely
970         bogus, removing it did not cause any tests to fail.
971
972         Test: svg/custom/textPath-assert.svg
973
974         * svg/SVGTextPathElement.cpp:
975         (WebCore::SVGTextPathElement::insertedIntoDocument): remove buildPendingResource()
976         * svg/SVGTextPathElement.h:
977
978 2008-01-29  Adam Roben  <aroben@apple.com>
979
980         Fix Bug 16234: Inspector should support searching for elements by CSS selectors
981
982         <http://bugs.webkit.org/show_bugs.cgi?id=16234>
983         <rdar://5712862>
984
985         Reviewed by Tim.
986
987         * page/inspector/inspector.js: Use Document.querySelectorAll to search
988         for elements by CSS selector. Also store a custom property on nodes
989         being added to the search results to avoid showing the same node more
990         than once.
991
992 2008-01-29  Adam Roben  <aroben@apple.com>
993
994         Fix <rdar://5711136> Full-screen Flash on 1up.com is unresponsive
995
996         Reviewed by Anders and Darin.
997
998         No test possible.
999
1000         * plugins/win/PluginViewWin.cpp:
1001         (WebCore::PluginViewWin::wndProc): Set/release capture on mouse
1002         down/up, like Firefox does.
1003
1004 2008-01-28  Dan Bernstein  <mitz@apple.com>
1005
1006         Reviewed by Sam Weinig.
1007
1008         - make isSVGFont non-virtual
1009
1010         * platform/graphics/FontData.h:
1011         * platform/graphics/SegmentedFontData.cpp:
1012         * platform/graphics/SegmentedFontData.h:
1013         * platform/graphics/SimpleFontData.h:
1014         (WebCore::SimpleFontData::isSVGFont):
1015
1016 2008-01-28  Dan Bernstein  <mitz@apple.com>
1017
1018         Reviewed by Adam Roben.
1019
1020         - fix <rdar://problem/5700824> Chunky scrolling + scrolling artifacts @ netflix.com/Notebook
1021
1022         * platform/win/ScrollViewWin.cpp:
1023         (WebCore::ScrollView::ScrollViewPrivate::valueChanged): Send the scroll
1024         event before updating the window, thus giving event handlers a chance
1025         to update layout for the new scroll position, eliminating the jitter.
1026
1027 2008-01-28  Adam Roben  <aroben@apple.com>
1028
1029         Fix <rdar://5555260> Gmail doesn't load when a user stylesheet is specified
1030
1031         Reviewed by Darin.
1032
1033         A null value exception was being thrown in Gmail's JS code because a
1034         call to document.write failed. document.write failed because
1035         Document::close had not yet been called. Document::close was not
1036         called because the Document was considered to not be "complete" in
1037         FrameLoader::checkComplete because the user stylesheet was in the
1038         process of loading. The user stylesheet was loading because it had
1039         previously been evicted from the cache and was loading fresh from
1040         disk. It had been evicted from the cache because the calculation of
1041         the expiration date was incorrectly casting/overflowing in
1042         ResourceResponseCFNet.cpp.
1043
1044         We now calculate the expiration date in a way that does not cause us
1045         to overflow a time_t, and we correctly clamp the value to the range of
1046         a time_t. I also made the fix for the last modified date, though that
1047         was not causing any bug I am aware of.
1048
1049         In the long-term it seems like whether or not Document::close is
1050         called should not be dependent upon whether the user stylesheet has
1051         finished loading or not.
1052
1053         * platform/network/cf/ResourceResponseCFNet.cpp:
1054         (WebCore::toTimeT): Added. Converts from CFAbsoluteTime to time_t and
1055         clamps to the range of time_t.
1056         (WebCore::ResourceResponse::doUpdateResourceResponse): Call toTimeT.
1057
1058 2008-01-28  Dan Bernstein  <mitz@apple.com>
1059
1060         Reviewed by Nikolas Zimmermann.
1061
1062         - fix leaks introduced in r29838
1063
1064         * svg/SVGFont.cpp:
1065         (WebCore::floatWidthMissingGlyphCallback):
1066         (WebCore::drawTextMissingGlyphCallback):
1067
1068 2008-01-28  Nikolas Zimmermann  <zimmermann@kde.org>
1069
1070         Reviewed by Eric, Dan & Oliver.
1071
1072         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16980
1073
1074         Support external SVG Fonts, by reusing the custom font handling logic.
1075         This enables us - as first engine - to render HTML pages using SVG Fonts.
1076
1077         Fixes fonts-elem-03-b.svg / fonts-elem-04-b.svg / fonts-elem-07-b.svg
1078         Add new testcase svg-fonts-in-html.html.
1079
1080         * css/CSSFontFaceSource.cpp:
1081         (WebCore::CSSFontFaceSource::getFontData):
1082         * css/CSSFontFaceSource.h:
1083         * css/CSSFontFaceSrcValue.cpp:
1084         (WebCore::CSSFontFaceSrcValue::isSVGFontFaceSrc):
1085         (WebCore::CSSFontFaceSrcValue::isSupportedFormat):
1086         * css/CSSFontFaceSrcValue.h:
1087         * css/CSSFontSelector.cpp:
1088         (WebCore::CSSFontSelector::addFontFaceRule):
1089         * loader/CachedFont.cpp:
1090         (WebCore::CachedFont::~CachedFont):
1091         (WebCore::CachedFont::ensureSVGFontData):
1092         (WebCore::CachedFont::extractFontFromSVGData):
1093         (WebCore::CachedFont::platformDataFromSVGData):
1094         * loader/CachedFont.h:
1095         * platform/graphics/Font.cpp:
1096         (WebCore::Font::offsetForPosition):
1097         * platform/graphics/Font.h:
1098         * svg/SVGFont.cpp:
1099         (WebCore::floatWidthOfSubStringUsingSVGFont):
1100         (WebCore::Font::drawTextUsingSVGFont):
1101         (WebCore::Font::offsetForPositionForTextUsingSVGFont):
1102         * svg/SVGFontFaceElement.cpp:
1103         (WebCore::SVGFontFaceElement::rebuildFontFace):
1104         * svg/SVGFontFaceElement.h:
1105         * svg/SVGFontFaceUriElement.cpp:
1106         (WebCore::SVGFontFaceUriElement::srcValue):
1107
1108 2008-01-28  Dan Bernstein  <mitz@apple.com>
1109
1110         Reviewed by Adam Roben.
1111
1112         - fix svg/W3C-SVG-1.1/fonts-glyph-04-t.svg failure on Windows
1113
1114         The results differed between Mac OS X and Windows because the code was
1115         using a 0-size font, which Mac OS X changes to 12pt.
1116
1117         * svg/SVGFont.cpp:
1118         (WebCore::floatWidthMissingGlyphCallback): Use the font description of
1119         the primary font to initialize the fallback font.
1120         (WebCore::drawTextMissingGlyphCallback): Ditto.
1121
1122 2008-01-28  Eric Seidel  <eric@webkit.org>
1123
1124         Reviewed by Nikolas Zimmermann.
1125
1126         Use class instead of struct to appease MSVC.
1127
1128         * history/HistoryItem.h:
1129         * loader/FrameLoaderClient.h:
1130         * page/InspectorController.h:
1131         * platform/network/ResourceRequestBase.h:
1132         * platform/network/mac/ResourceRequest.h:
1133
1134 2008-01-28  Dan Bernstein  <mitz@apple.com>
1135
1136         Reviewed by Darin Adler.
1137
1138         - fix http://bugs.webkit.org/show_bug.cgi?id=16774
1139           REGRESSION (r27464-r27504) javascript popup menu does not display 'close' button
1140
1141         Test: fast/dynamic/float-no-longer-overhanging.html
1142
1143         * rendering/RenderBlock.cpp:
1144         (WebCore::RenderBlock::addOverhangingFloats): If a child's float turns
1145         out not to be overhanging at this time, ensure that the child paints it.
1146
1147 2008-01-28  Oliver Hunt  <oliver@apple.com>
1148
1149         More wx fixes
1150
1151         * platform/graphics/wx/AffineTransformWx.cpp:
1152
1153 2008-01-28  Oliver Hunt  <oliver@apple.com>
1154
1155         And another Wx build fix
1156
1157         * platform/graphics/wx/AffineTransformWx.cpp:
1158         (WebCore::AffineTransform::mapRect):
1159
1160 2008-01-28  Oliver Hunt  <oliver@apple.com>
1161
1162         Yet another Wx build fix
1163
1164         * platform/graphics/wx/GraphicsContextWx.cpp:
1165
1166 2008-01-28  Oliver Hunt  <oliver@apple.com>
1167
1168         Wx build fix
1169
1170         * platform/graphics/wx/GraphicsContextWx.cpp:
1171         (WebCore::GraphicsContext::getCTM):
1172
1173 2008-01-28  Oliver Hunt  <oliver@apple.com>
1174
1175         Gtk build fix
1176
1177         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1178
1179 2008-01-27  Oliver Hunt  <oliver@apple.com>
1180
1181         Reviewed by Sam Weinig.
1182
1183         Bug 16629: <canvas> does not support isPointInPath()
1184
1185         Relatively trivial change to implement pointInPath and add
1186         it to the bindings.  Most of this patch is the addition of
1187         GraphicsContext::getCTM() by pulling the various platform
1188         implementations from CanvasRenderingContext2D::willDraw
1189
1190         Test: fast/canvas/pointInPath.html
1191
1192         * html/CanvasRenderingContext2D.cpp:
1193         (WebCore::CanvasRenderingContext2D::isPointInPath):
1194         (WebCore::CanvasRenderingContext2D::willDraw):
1195         * html/CanvasRenderingContext2D.h:
1196         * html/CanvasRenderingContext2D.idl:
1197         * platform/graphics/AffineTransform.cpp:
1198         (WebCore::AffineTransform::mapPoint):
1199           Support mapping of FloatRects
1200         * platform/graphics/AffineTransform.h:
1201         * platform/graphics/GraphicsContext.h:
1202         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1203         (WebCore::GraphicsContext::getCTM):
1204         * platform/graphics/cg/GraphicsContextCG.cpp:
1205         (WebCore::GraphicsContext::getCTM):
1206         * platform/graphics/qt/GraphicsContextQt.cpp:
1207         (WebCore::GraphicsContext::getCTM):
1208
1209 2008-01-27  Alexey Proskuryakov  <ap@webkit.org>
1210
1211         Reviewed by Darin.
1212
1213         http://bugs.webkit.org/show_bug.cgi?id=17014
1214         REGRESSION: EUC-CN code A3A0 is mapped to U+E5E5 instead of U+3000
1215
1216         Test: fast/encoding/char-decoding.html
1217
1218         * platform/text/TextCodecICU.cpp:
1219         (WebCore::TextCodecICU::decode): Added a workaround that we used to have in Mac code.
1220
1221         * platform/text/mac/TextCodecMac.cpp:
1222         (WebCore::TextCodecMac::decode): Corrected a comment.
1223
1224 2008-01-27  Alp Toker  <alp@atoker.com>
1225
1226         Reviewed by Mark Rowe.
1227
1228         http://bugs.webkit.org/show_bug.cgi?id=17029
1229         Use of deprecated class function but declares GTK_DISABLE_DEPRECATED
1230
1231         Sync gtkdrawing.h (1.51) and gtk2drawing.c (1.71) from Mozilla
1232         upstream.
1233
1234         Adapt RenderThemeGtk.cpp to track minor changes.
1235
1236         * platform/gtk/RenderThemeGtk.cpp:
1237         (WebCore::gtkTextDirection):
1238         (WebCore::adjustMozStyle):
1239         (WebCore::setMozState):
1240         (WebCore::paintMozWidget):
1241         * platform/gtk/gtk2drawing.c:
1242         (setup_widget_prototype):
1243         (ensure_hpaned_widget):
1244         (ensure_vpaned_widget):
1245         (ensure_toggle_button_widget):
1246         (ensure_combo_box_entry_widget):
1247         (ensure_dropdown_entry_widget):
1248         (moz_gtk_get_dropdown_button):
1249         (ensure_arrow_widget):
1250         (ensure_toolbar_separator_widget):
1251         (ensure_statusbar_widget):
1252         (ensure_frame_widget):
1253         (ensure_menu_separator_widget):
1254         (ensure_tree_view_widget):
1255         (ensure_tree_header_cell_widget):
1256         (ensure_expander_widget):
1257         (ConvertGtkState):
1258         (moz_gtk_button_paint):
1259         (moz_gtk_widget_get_focus):
1260         (moz_gtk_splitter_get_metrics):
1261         (moz_gtk_toggle_paint):
1262         (moz_gtk_scrollbar_button_paint):
1263         (moz_gtk_scrollbar_trough_paint):
1264         (moz_gtk_scrollbar_thumb_paint):
1265         (moz_gtk_spin_paint):
1266         (moz_gtk_spin_updown_paint):
1267         (moz_gtk_scale_paint):
1268         (moz_gtk_scale_thumb_paint):
1269         (moz_gtk_gripper_paint):
1270         (moz_gtk_hpaned_paint):
1271         (moz_gtk_vpaned_paint):
1272         (moz_gtk_entry_paint):
1273         (moz_gtk_treeview_paint):
1274         (moz_gtk_tree_header_cell_paint):
1275         (moz_gtk_tree_header_sort_arrow_paint):
1276         (moz_gtk_treeview_expander_paint):
1277         (moz_gtk_expander_paint):
1278         (moz_gtk_option_menu_paint):
1279         (moz_gtk_downarrow_paint):
1280         (moz_gtk_dropdown_arrow_paint):
1281         (moz_gtk_container_paint):
1282         (moz_gtk_toggle_label_paint):
1283         (moz_gtk_toolbar_paint):
1284         (moz_gtk_toolbar_separator_paint):
1285         (moz_gtk_tooltip_paint):
1286         (moz_gtk_resizer_paint):
1287         (moz_gtk_frame_paint):
1288         (moz_gtk_progressbar_paint):
1289         (moz_gtk_progress_chunk_paint):
1290         (moz_gtk_get_tab_thickness):
1291         (moz_gtk_tab_paint):
1292         (moz_gtk_tabpanels_paint):
1293         (moz_gtk_menu_bar_paint):
1294         (moz_gtk_menu_popup_paint):
1295         (moz_gtk_menu_separator_paint):
1296         (moz_gtk_menu_item_paint):
1297         (moz_gtk_menu_arrow_paint):
1298         (moz_gtk_check_menu_item_paint):
1299         (moz_gtk_window_paint):
1300         (moz_gtk_get_widget_border):
1301         (moz_gtk_get_dropdown_arrow_size):
1302         (moz_gtk_get_toolbar_separator_width):
1303         (moz_gtk_get_expander_size):
1304         (moz_gtk_get_treeview_expander_size):
1305         (moz_gtk_get_menu_separator_height):
1306         (moz_gtk_widget_paint):
1307         (moz_gtk_shutdown):
1308         * platform/gtk/gtkdrawing.h:
1309
1310 2008-01-27  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
1311
1312         Reviewed by Alp Toker.
1313
1314         http://bugs.webkit.org/show_bug.cgi?id=14811
1315         [gtk] [request] add a webkit_gtk_page_go_to_history_item function
1316
1317         Added webkit/gtk webkitwebbackforwardlist and webkitwebhistoryitem
1318
1319         * WebCore.pro:
1320
1321 2008-01-27  Matt Perry  <mpComplete@gmail.com>
1322
1323         Reviewed and tweaked quite a bit by Darin.
1324
1325         Fix for http://bugs.webkit.org/show_bug.cgi?id=14959
1326         No back forward entry added for pages created in javascript
1327
1328         A new HistoryItem is created for calls to Document::open. Calls to
1329         Document::write save the written data to a SharedBuffer that is also
1330         stored on the HistoryItem. When the user navigates back to a
1331         HistoryItem that has a valid buffer, that data is used for the page
1332         content.
1333
1334         Tests: http/tests/navigation/document-open-adds-history-item.html
1335                http/tests/navigation/document-open-delayed-adds-history-item.html
1336                http/tests/navigation/document-open-new-window-adds-history-item.html
1337                http/tests/navigation/document-open-replace-no-history-item.html
1338
1339         * bindings/js/JSHTMLDocumentCustom.cpp:
1340         (WebCore::JSHTMLDocument::open): Pass a MIME type of either "text/html" or
1341         "text/plain" and a boolean for "replace" in rather than always setting replace
1342         to true and the MIME type to "text/html".
1343
1344         * dom/DOMImplementation.cpp:
1345         (WebCore::DOMImplementation::createHTMLDocument): Pass in MIME type and
1346         replace boolean explicitly, since we don't want to rely on Document::open()'s
1347         default.
1348
1349         * dom/Document.cpp:
1350         (WebCore::Document::open): Correctly determine the "replace" boolean.
1351         Pass along the MIME type, replace boolean, and shared buffer to the
1352         frame loader's didExplicitOpen function.
1353         (WebCore::Document::write): Pass MIME type and replace boolean explicitly
1354         to the open function so we don't do treat it as replace if you write without
1355         an open. Store text written by the script so it can be used later for history.
1356         (WebCore::Document::clear): Drop the text written byt he script.
1357
1358         * dom/Document.h: Added MIME type and replace boolean parameters for open.
1359         Had to keep the old version for the sake of DOM bindings. Added the shared
1360         buffer used for text written by script.
1361
1362         * history/HistoryItem.cpp:
1363         (WebCore::HistoryItem::HistoryItem): Copy m_substituteData.
1364         (WebCore::HistoryItem::substituteData): Added.
1365         (WebCore::HistoryItem::setSubstituteData): Added.
1366         * history/HistoryItem.h: Added m_substituteData, getter, and setter.
1367
1368         * loader/FrameLoader.cpp:
1369         (WebCore::FrameLoader::didExplicitOpen): Added code to create or update the
1370         history item, including attaching the shared buffer that will contain all
1371         the data written by script.
1372         (WebCore::FrameLoader::load): Added a SubstituteData parameter, passed through
1373         when creating the document loader.
1374         (WebCore::FrameLoader::reloadAllowingStaleData): Create the document loader
1375         with the substitute data from the current history item.
1376         (WebCore::FrameLoader::reload): Ditto.
1377         (WebCore::FrameLoader::shouldTreatURLAsSameAsCurrent): If the current history
1378         item has substitute data, then consider the URL from the substitute data
1379         rather than the one in the history item itself.
1380         (WebCore::FrameLoader::loadItem): Pass in the history item's substitute data.
1381         * loader/FrameLoader.h: Added parameters to load and didExplicitOpen.
1382
1383         * platform/text/CharacterNames.h: Added byteOrderMark, and also added it under
1384         its other official name, zeroWidthNoBreakSpace.
1385
1386         * xml/DOMParser.cpp:
1387         (WebCore::DOMParser::parseFromString): Pass in MIME type and replace boolean
1388         explicitly, since we don't want to rely on Document::open()'s default.
1389         * xml/XMLHttpRequest.cpp:
1390         (WebCore::XMLHttpRequest::getResponseXML): Ditto.
1391         * xml/XSLTProcessor.cpp:
1392         (WebCore::XSLTProcessor::createDocumentFromSource): Ditto.
1393
1394 2008-01-25  Eric Seidel  <eric@webkit.org>
1395
1396         Reviewed by Sam and Darin.
1397
1398         Fire a warning shot in DeprecatedChar's direction.
1399
1400         Remove DeprecatedChar::isSpace() usage, in preparation for removing DeprecatedChar
1401         Remove a needless String -> DeprecatedString -> String conversion for <script> tags
1402
1403         * css/MediaQueryEvaluator.cpp:
1404         (WebCore::parseAspectRatio):
1405         * css/SVGCSSParser.cpp:
1406         * dom/Position.cpp:
1407         (WebCore::Position::leadingWhitespacePosition):
1408         (WebCore::Position::trailingWhitespacePosition):
1409         * editing/TextIterator.cpp:
1410         (WebCore::WordAwareIterator::advance):
1411         * html/HTMLFontElement.cpp:
1412         (WebCore::parseFontSizeNumber):
1413         * html/HTMLTokenizer.cpp:
1414         (WebCore::HTMLTokenizer::scriptHandler):
1415         (WebCore::HTMLTokenizer::scriptExecution):
1416         (WebCore::HTMLTokenizer::notifyFinished):
1417         * html/HTMLTokenizer.h:
1418         * loader/CachedCSSStyleSheet.cpp:
1419         * loader/TextResourceDecoder.cpp:
1420         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1421         * platform/mac/ClipboardMac.mm:
1422         (WebCore::ClipboardMac::getData):
1423         * platform/network/HTTPParsers.cpp:
1424         (WebCore::extractMIMETypeFromMediaType):
1425         * platform/text/PlatformString.h:
1426         * platform/text/StringImpl.cpp:
1427         (WebCore::parseLength):
1428         (WebCore::StringImpl::stripWhiteSpace):
1429         (WebCore::StringImpl::simplifyWhiteSpace):
1430         (WebCore::StringImpl::toInt):
1431         (WebCore::StringImpl::toInt64):
1432         (WebCore::StringImpl::toUInt64):
1433         * platform/text/StringImpl.h:
1434         (WebCore::isSpaceOrNewline):
1435         * rendering/InlineFlowBox.cpp:
1436         (WebCore::InlineFlowBox::placeBoxesHorizontally):
1437         * rendering/RenderBlock.cpp:
1438         (WebCore::RenderBlock::updateFirstLetter):
1439         * rendering/bidi.cpp:
1440         (WebCore::RenderBlock::computeHorizontalPositionsForLine):
1441         * svg/SVGFontFaceElement.cpp:
1442         (WebCore::mapAttributeToCSSProperty):
1443         * svg/SVGLength.cpp:
1444         * svg/SVGStyledElement.cpp:
1445         (WebCore::mapAttributeToCSSProperty):
1446         * xml/XPathParser.cpp:
1447
1448 2008-01-25  Stephanie Lewis  <slewis@apple.com>
1449
1450         Reviewed by Tim.
1451
1452         expand workaround for <rdar://5695848> to include js files so that the
1453         web inspector can work
1454
1455         * platform/network/cf/ResourceResponseCFNet.cpp:
1456         (WebCore::ResourceResponse::doUpdateResourceResponse):
1457
1458 2008-01-25  Antti Koivisto  <antti@apple.com>
1459
1460         Reviewed by Adele.
1461         
1462         (this is for r29798, my commit failed to include the log)
1463         
1464         Windows fix to match r29773
1465         If the media is playing and the load stalls the playback wont restart by seeking backwards.      
1466
1467         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
1468         (WebCore::MediaPlayerPrivate::updateStates):
1469
1470 2008-01-25  Darin Adler  <darin@apple.com>
1471
1472         Reviewed by Anders.
1473
1474         - fix <rdar://problem/5691072> ASSERTION FAILED: isPrepared() when executing an empty statement
1475
1476         For empty statements, SQLite returns 0 for the statement. We have to cope with that.
1477
1478         Test: storage/empty-statement.html
1479
1480         * platform/sql/SQLiteStatement.cpp:
1481         (WebCore::sqlite3_prepare16_v2): Added overload so we don't need an #if inside the prepare
1482         function.
1483         (WebCore::SQLiteStatement::SQLiteStatement): Initialize the m_isPrepared boolean. Removed
1484         the code to add a null character to the end of the string; instead we will use
1485         charactersWithNullTermination.
1486         (WebCore::SQLiteStatement::prepare): Set m_isPrepared based on the error value returned.
1487         Use the error value from sqlite3_prepare16_v2, not from lastError().
1488         (WebCore::SQLiteStatement::step): Assert that the statement is prepared rather than checking
1489         it at runtime. However, in the case where this is called with m_statement of 0, return
1490         success rather than an error. That's needed for empty statements.
1491         (WebCore::SQLiteStatement::finalize): Use early return idiom for clarity. When there is no
1492         statement, return SQLITE_OK instead of calling lastError().
1493         (WebCore::SQLiteStatement::reset): Use early return idiom for clarity. When there is no
1494         statement, return SQLITE_OK rather than SQLITE_ERROR, but assert the statement is prepared.
1495         (WebCore::SQLiteStatement::executeCommand): Adjust the code that does a prepare so that it
1496         will work for empty statements. Do we really need to allow calling this without prepare?
1497         It would be simpler to just be able to assert that it's prepared.
1498         (WebCore::SQLiteStatement::returnsAtLeastOneResult): Ditto.
1499         (WebCore::SQLiteStatement::bindBlob): Added some assertions. Return SQLITE_ERROR if this
1500         is called with m_statement of 0 (should not be possible without assertions firing first).
1501         Return the actual error code rather than lastError().
1502         (WebCore::SQLiteStatement::bindText): Ditto. Also simplified the special case for empty
1503         strings, since it requires any non-null pointer, not a pointer to a global zero character.
1504         (WebCore::SQLiteStatement::bindInt64): Ditto.
1505         (WebCore::SQLiteStatement::bindDouble): Ditto.
1506         (WebCore::SQLiteStatement::bindNull): Ditto.
1507         (WebCore::SQLiteStatement::bindValue): Moved default case out of the switch to take
1508         advantage of the gcc compiler warning for unhandled enum values in a switch.
1509         (WebCore::SQLiteStatement::bindParameterCount): Added assertion and code to handle the
1510         empty statement case.
1511         (WebCore::SQLiteStatement::columnCount): Added assertion and changed the code to use
1512         the early-return idiom.
1513         (WebCore::SQLiteStatement::getColumnName): Removed getColumnName16 -- we always use 16-bit
1514         characters and have no reason to ever use the 8-bit function. Added assertions about the
1515         passed-in column number. It's a little strange that this function checks the column number
1516         for too-large column numbers, but not for negative ones. I didn't change that for now.
1517         (WebCore::SQLiteStatement::getColumnText): Ditto.
1518         (WebCore::SQLiteStatement::getColumnDouble): Ditto.
1519         (WebCore::SQLiteStatement::getColumnInt): Ditto.
1520         (WebCore::SQLiteStatement::getColumnInt64): Ditto.
1521         (WebCore::SQLiteStatement::getColumnBlobAsVector): Ditto.
1522         (WebCore::SQLiteStatement::getColumnBlob): Tightened up function a bit, including use of
1523         the early-return idiom and replacing the multiple "size = 0" with a single one at the
1524         start of the function.
1525         (WebCore::SQLiteStatement::returnTextResults): Added a failure case when the prepare
1526         call doesn't work. Cleared the vector earlier to make the failure code simpler. Moved
1527         the declaration of the result boolean down lower to make it clearer what it's for.
1528         Changed use of lastError() to call on the database, to make it clearer that there's
1529         no per-statement last error kept around. It'd be even better to not use lastError() here.
1530         (WebCore::SQLiteStatement::returnIntResults): Ditto.
1531         (WebCore::SQLiteStatement::returnInt64Results): Ditto.
1532         (WebCore::SQLiteStatement::returnDoubleResults): Ditto.
1533         (WebCore::SQLiteStatement::isExpired): Changed to use || rather than ?: because I think
1534         it's slightly easier to read that way.
1535
1536         * platform/sql/SQLiteStatement.h: Removed unneeded includes and forward declarations.
1537         Also removed unnneeded functions isPrepared, getColumnName16, getColumnText16,
1538         returnTextResults16, lastError, and lastErrorMsg. Changed prepareAndStep so that it
1539         checks the result of prepare before callling step. Added a debug-only m_isPrepared boolean.
1540
1541         * loader/icon/IconDatabase.cpp:
1542         (WebCore::IconDatabase::checkIntegrity): Remove 16 suffix from text-related function names.
1543         (WebCore::IconDatabase::performURLImport): Ditto.
1544         (WebCore::IconDatabase::pruneUnretainedIcons): Ditto.
1545         * platform/sql/SQLiteDatabase.cpp:
1546         (WebCore::SQLiteDatabase::clearAllTables): Ditto.
1547         * storage/Database.cpp:
1548         (WebCore::retrieveTextResultFromDatabase): Ditto.
1549         (WebCore::Database::performGetTableNames): Ditto.
1550         * storage/DatabaseTracker.cpp:
1551         (WebCore::DatabaseTracker::fullPathForDatabase): Ditto.
1552         (WebCore::DatabaseTracker::populateOrigins): Ditto.
1553         (WebCore::DatabaseTracker::databaseNamesForOrigin): Ditto.
1554         (WebCore::DatabaseTracker::addDatabase): Ditto.
1555         * storage/SQLStatement.cpp:
1556         (WebCore::SQLStatement::execute): Ditto.
1557
1558         * platform/sql/SQLiteDatabase.h: Removed unneeded includes.
1559         * storage/SQLResultSet.h: Ditto.
1560         * storage/SQLResultSetRowList.h: Ditto.
1561
1562 2008-01-25  Adele Peterson  <adele@apple.com>
1563
1564         Reviewed by Sam.
1565
1566         Fix for <rdar://problem/5679452> Finish tweaking layout/alignment of media controls slider to match QuickTime plug-in
1567
1568         * css/html4.css: Add horizontal padding to the media slider.
1569         * rendering/RenderSlider.cpp:
1570         (WebCore::HTMLSliderThumbElement::defaultEventHandler): Replace use of absoluteBoundingBox() with width() and height()
1571         (WebCore::RenderSlider::positionForOffset): ditto. Also, use the trackSize() for the maximum offset.
1572         (WebCore::RenderSlider::layout):  Use contentWidth() and contentHeight() to take padding into account.
1573         (WebCore::RenderSlider::trackSize): ditto.
1574
1575 2008-01-24  Adam Roben  <aroben@apple.com>
1576
1577         Better fix for Bug 16996
1578
1579         Rubberstamped by Mitz.
1580
1581         * loader/CachedFont.cpp:
1582         (WebCore::CachedFont::ensureCustomFontData): Don't call
1583         createFontCustomPlatformData if m_data is null.
1584         * platform/graphics/gtk/FontCustomPlatformData.cpp:
1585         (WebCore::createFontCustomPlatformData): Added an assertion.
1586         * platform/graphics/mac/FontCustomPlatformData.cpp:
1587         (WebCore::createFontCustomPlatformData): Ditto.
1588         * platform/graphics/qt/FontCustomPlatformData.cpp:
1589         (WebCore::createFontCustomPlatformData): Ditto.
1590         * platform/graphics/win/FontCustomPlatformData.cpp:
1591         (WebCore::createFontCustomPlatformData): Ditto.
1592
1593 2008-01-24  Adam Roben  <aroben@apple.com>
1594
1595         Fix Bug 16996: Crash in createFontCustomPlatformData when loading
1596         0-byte font via @font-face
1597
1598         <http://bugs.webkit.org/show_bug.cgi?id=16996>
1599
1600         Reviewed by Hyatt.
1601
1602         Test: fast/loader/font-face-empty.html
1603
1604         * platform/graphics/win/FontCustomPlatformData.cpp:
1605         (WebCore::createFontCustomPlatformData): Null-check the buffer
1606         parameter.
1607
1608 2008-01-24  Jon Honeycutt  <jhoneycutt@apple.com>
1609
1610         Reviewed by Anders.
1611
1612         <rdar://problem/5588807> Crash in Flash when destroying plug-in (found
1613         using yahoo beta mail)
1614
1615         Flash can dereference NULL in the call to NPP_URLNotify if a request
1616         made with NPN_PostURLNotify fails before NPP_NewStream is called.
1617
1618         Work around this by creating a quirk, PluginQuirkFlashURLNotifyBug, and
1619         checking for this quirk before calling NPP_URLNotify for any request
1620         made with NPN_PostURLNotify. If the quirk is present, call NPP_NewStream
1621         and NPP_DestroyStream before calling NPP_URLNotify.
1622
1623         * WebCore.vcproj/WebCore.vcproj:
1624         * plugins/PluginQuirkSet.h: Added. Moved quirks out of PluginViewWin so
1625         PluginViewWin and PluginStream could share it. Created a class,
1626         PluginQuirkSet, to store plug-in quirks
1627         (WebCore::):
1628         (WebCore::PluginQuirkSet::PluginQuirkSet):
1629         (WebCore::PluginQuirkSet::add):
1630         (WebCore::PluginQuirkSet::contains):
1631         * plugins/PluginStream.cpp:
1632         (WebCore::PluginStream::PluginStream): Copy the PluginQuirkSet for this
1633         plug-in
1634         (WebCore::PluginStream::destroyStream): Check for the FlashURLNotifyBug
1635         quirk
1636         * plugins/PluginStream.h:
1637         * plugins/win/PluginViewWin.cpp:
1638         (WebCore::PluginViewWin::performRequest): Pass the quirks when creating
1639         the PluginStream
1640         (WebCore::PluginViewWin::didReceiveResponse): Same
1641         (WebCore::PluginViewWin::wndProc): Use add / contains instead of
1642         bit ops
1643         (WebCore::PluginViewWin::userAgent): Same
1644         (WebCore::PluginViewWin::invalidateRect): Same
1645         (WebCore::PluginViewWin::~PluginViewWin): Same
1646         (WebCore::PluginViewWin::determineQuirks): Same
1647         (WebCore::PluginViewWin::setParameters): Same
1648         (WebCore::PluginViewWin::PluginViewWin): Same
1649         (WebCore::PluginViewWin::init): Same
1650         (WebCore::PluginViewWin::setCallingPlugin): Same
1651         * plugins/win/PluginViewWin.h:
1652
1653 2008-01-24  David Hyatt  <hyatt@apple.com>
1654
1655         http://bugs.webkit.org/show_bug.cgi?id=16982
1656
1657         Make sure to make <head> the current block if it is created before a <body> already exists.
1658
1659         Reviewed by Dan
1660
1661         * html/HTMLParser.cpp:
1662         (WebCore::HTMLParser::createHead):
1663
1664 2008-01-24  Alexey Proskuryakov  <ap@webkit.org>
1665
1666         http://bugs.webkit.org/show_bug.cgi?id=16993
1667         <rdar://problem/5704331> REGRESSION: Loading page leads to many unexpected redirections
1668
1669         Rolled out r29590, which was not a correct fix for <rdar://problem/5692566>.
1670
1671         * loader/FrameLoader.cpp:
1672         (WebCore::FrameLoader::clear):
1673
1674 2008-01-24  Antti Koivisto  <antti@apple.com>
1675
1676         Reviewed by Adam.
1677         
1678         If the media is playing and the load stalls the playback wont restart by seeking backwards.
1679         
1680         We should be in CAN_PLAY state if the current time is less than the maximum loaded time. Rate 
1681         tricks were for streaming case and are not necessary now since that is now disabled.
1682         
1683         Windows patch coming separately.
1684
1685         Test: http/tests/media/video-play-stall-seek.html
1686
1687         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1688         (WebCore::MediaPlayerPrivate::updateStates):
1689
1690 2008-01-24  Antti Koivisto  <antti@apple.com>
1691
1692         Reviewed by Adam.
1693
1694         Fix <rdar://problem/5684815>
1695         After navigating back to the page that contains a <audio> that has been muted, the audio is still heard
1696         
1697         - get rid of the separate muted state in MediaPlayer, maintain the state in the cross platform code only
1698         - remove volumeChanged() callbacks from HTMLMediaElement and OS X MediaPlayer, they were not used for anything
1699         - rename updateMediaPlayer -> updatePlayState which tells more about what it actually does
1700
1701         * html/HTMLMediaElement.cpp:
1702         (WebCore::HTMLMediaElement::load):
1703         (WebCore::HTMLMediaElement::setReadyState):
1704         (WebCore::HTMLMediaElement::play):
1705         (WebCore::HTMLMediaElement::pause):
1706         (WebCore::HTMLMediaElement::setVolume):
1707         (WebCore::HTMLMediaElement::setMuted):
1708         (WebCore::HTMLMediaElement::checkIfSeekNeeded):
1709         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
1710         (WebCore::HTMLMediaElement::updateVolume):
1711         (WebCore::HTMLMediaElement::updatePlayState):
1712         (WebCore::HTMLMediaElement::setPausedInternal):
1713         * html/HTMLMediaElement.h:
1714         * platform/graphics/MediaPlayer.cpp:
1715         (WebCore::MediaPlayer::MediaPlayer):
1716         * platform/graphics/MediaPlayer.h:
1717         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1718         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1719         (WebCore::MediaPlayerPrivate::createQTMovie):
1720         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
1721         * platform/graphics/win/QTMovieWin.cpp:
1722         * platform/graphics/win/QTMovieWin.h:
1723
1724 2008-01-24  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1725
1726         Reviewed by Simon.
1727
1728         * Fix "QObject::startTimer: QTimer can only be used with threads started with QThread"
1729         * The JSC GCController gets automatically destructed on application exit, it will stop
1730         its timer and we try to schedule the next timer. Now the GCController can get destructed
1731         after our QApplication is gone. This will trigger the above warning, we can avoid this
1732         by checking if our qApp is still around.
1733
1734         * platform/qt/SharedTimerQt.cpp:
1735         (WebCore::setSharedTimerFireTime):
1736
1737 2008-01-24  Morten Johan Sørvig  <msorvig@trolltech.com>
1738
1739         Reviewed by Simon.
1740
1741         Qt/Mac: Make sure the scrollbars does not overlap the grow box.
1742
1743         When showing only one scrollbar we need to move it so it doesn't overlap the
1744         grow box. This is similar to the code in QAbstractScrollArea.
1745
1746
1747         * platform/qt/ScrollViewQt.cpp:
1748         (WebCore::ScrollView::updateScrollbars):
1749
1750 2008-01-15  Michael Goddard  <michael.goddard@trolltech.com>
1751
1752         Reviewed by Darin.
1753
1754         While parsing -webkit-border-image, store
1755         the border widths as naked pointers rather
1756         than as OwnPtrs, since they point to the
1757         middle of an array.
1758
1759         Test: fast/css/border-image-crash.html
1760
1761         * css/CSSParser.cpp:
1762
1763 2008-01-24  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1764
1765         Reviewed by Simon.
1766
1767         * Attempt to fix showing of popup again after a popup has been shown but
1768         the user did not select any item (e.g. clicked outside of the popup)
1769         * Keep track of the popup status using the virtuals showPopup and hidePopup
1770         and do not go into recursion when hiding a popup.
1771
1772         * platform/qt/QWebPopup.cpp:
1773         (WebCore::QWebPopup::showPopup):
1774         (WebCore::QWebPopup::hidePopup):
1775         * platform/qt/QWebPopup.h:
1776
1777 2008-01-24  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1778
1779         Reviewed by Simon.
1780
1781         * Assert the presence of the PopupMenuClient
1782
1783         * platform/qt/QWebPopup.cpp:
1784         (WebCore::QWebPopup::QWebPopup):
1785         (WebCore::QWebPopup::hideEvent):
1786         (WebCore::QWebPopup::activeChanged):
1787
1788 2008-01-23  David Kilzer  <ddkilzer@apple.com>
1789
1790         <rdar://problem/5702947> WebCore: CGContextDrawPDFDocument will be deprecated
1791
1792         Reviewed by Darin.
1793
1794         No test cases added since there is no change in behavior.
1795
1796         * platform/graphics/cg/PDFDocumentImage.cpp:
1797         (WebCore::PDFDocumentImage::draw): Replace CGContextDrawPDFDocument() with
1798         calls to CG methods that perform the equivalent work.
1799
1800 2008-01-23  Antti Koivisto  <antti@apple.com>
1801
1802         Reviewed by Hyatt, Adele.
1803
1804         Timers for media controls keep running when the page is in the page cache.
1805         
1806         Stop timers in RenderMedia and get rid of the controls tree when the page goes to the cache. 
1807
1808         * html/HTMLMediaElement.cpp:
1809         (WebCore::HTMLMediaElement::HTMLMediaElement):
1810         (WebCore::HTMLMediaElement::willSaveToCache):
1811         (WebCore::HTMLMediaElement::didRestoreFromCache):
1812         * html/HTMLMediaElement.h:
1813         (WebCore::HTMLMediaElement::inPageCache):
1814         * rendering/RenderMedia.cpp:
1815         (WebCore::RenderMedia::updateControls):
1816
1817 2008-01-23  Antti Koivisto  <antti@apple.com>
1818
1819         Reviewed by Adam.
1820
1821         Video that had already played to the end would start playing (from beginning) on back/forward navigation.
1822         
1823         Use setPausedInternal() instead of pause(). This avoid generating pause/play events and matches specification text.
1824
1825         * html/HTMLMediaElement.cpp:
1826         (WebCore::HTMLMediaElement::willSaveToCache):
1827
1828 2008-01-23  Alexey Proskuryakov  <ap@webkit.org>
1829
1830         Reviewed by Darin.
1831
1832         <rdar://problem/4200075> Missing support for accented chars in mailto forms
1833
1834         With some combinations of form parameters, this was resulting in regressed behavior.
1835
1836         Tests: fast/forms/mailto/get-non-ascii-text-plain-latin-1.html
1837                fast/forms/mailto/post-text-plain-with-accept-charset.html
1838                fast/forms/mailto/post-text-plain.html
1839
1840         * html/HTMLFormElement.cpp:
1841         (WebCore::HTMLFormElement::formData): Ignore accept-charset for mailto forms, which are always
1842         encoded as UTF-8.
1843         (WebCore::HTMLFormElement::isMailtoForm): Added.
1844         (WebCore::HTMLFormElement::dataEncoding): Added (factored out from formData).
1845         (WebCore::HTMLFormElement::submit): When round-tripping in text/plain case, use utf-8 encoding.
1846         * html/HTMLFormElement.h: Added a isMailtoForm() function. It may be a bit unfortunate that
1847         its result is calculated repeatedly, but this doesn't seem to be anywhere near hot code.
1848
1849 2008-01-22  Justin Garcia  <justin.garcia@apple.com>
1850
1851         Reviewed by Alice Liu.
1852
1853         <rdar://problem/5658727> Undo/redo for pasted or typed text in yahoo mail becomes disabled after one round of being selected
1854
1855         * rendering/RenderTextControl.cpp:
1856         (WebCore::RenderTextControl::updateFromElement): If value == text() and
1857         m_innerText is empty, then value and text() are "". In that case both DOM 
1858         mutations are no-ops and there is no reason to clear the Undo stack.
1859
1860 2008-01-23  Steve Falkenburg  <sfalken@apple.com>
1861
1862         <rdar://problem/5698732> Copyright strings should include 2008
1863
1864         Reviewed by Sam.
1865
1866         * WebCore.vcproj/QTMovieWin.rc:
1867
1868 2008-01-23  Steve Falkenburg  <sfalken@apple.com>
1869
1870         <rdar://problem/5699509> Allow file upload dialog to be localized.
1871
1872         Reviewed by Darin.
1873
1874         * platform/LocalizedStrings.h:
1875         * platform/win/FileChooserWin.cpp:
1876         (WebCore::FileChooser::openFileChooser):
1877
1878 2008-01-23  Adam Roben  <aroben@apple.com>
1879
1880         Fix behavior of type-to-select in <select> menus
1881
1882         In r27825 we started posting both a WM_KEYDOWN and WM_CHAR message
1883         whenever a key was pressed in the dropdown menu. However, since posted
1884         messages go through TranslateMessage, the WM_KEYDOWN was generating
1885         another WM_CHAR message, so two WM_CHAR messages in a row would reach
1886         the WebView. This caused the searching to happen twice for each key,
1887         so typing "dog" would search for "ddoogg".
1888
1889         Reviewed by Darin.
1890
1891         * platform/win/PopupMenuWin.cpp:
1892         (WebCore::PopupWndProc): Repost the WM_KEYDOWN message to the WebView.
1893         This is will generate a WM_CHAR message which will trigger the
1894         type-to-select behavior. This is very similar to our behavior prior to
1895         r27825, except that we're now calling PostMessage instead of
1896         SendMessage.
1897
1898 2008-01-23  Alp Toker  <alp@atoker.com>
1899
1900         Rubber-stamped by Mark Rowe.
1901
1902         Remove whitespace after -I in automake include lists.
1903
1904         * GNUmakefile.am:
1905
1906 2008-01-23  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1907
1908         * Rubber stamped by Simon
1909
1910         * Load images incrementally. This will show warnings on the console
1911         and we want to fix them for Qt4.4. If that happens we have to remove
1912         the comment from the enum inside the ImageDecoderQt.cpp
1913
1914         * platform/graphics/qt/ImageDecoderQt.cpp:
1915         (WebCore::ImageDecoderQt::setData):
1916
1917 2008-01-23  Lars Knoll  <lars@trolltech.com>
1918
1919         Reviewed by Holger Freyther <holger.freyther@trolltech.com>.
1920
1921         Fix rendering of the Scrollbar as well as mouse handling for some styles.
1922
1923         The QStyle expects that that painter is set up to clip to the scrollbar bounds
1924         and some of the styles seem to paint somewhat outside of these bounds. Clipping to
1925         the scrollbar bounds before drawing removes some artifacts.
1926
1927         Also set m_opt.rect.topLeft to (0/0) in the mouse handlers. Fixes some issues with
1928         the oxygen style.
1929
1930
1931         * platform/qt/PlatformScrollBarQt.cpp:
1932         (WebCore::PlatformScrollbar::paint):
1933         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
1934         (WebCore::PlatformScrollbar::handleMousePressEvent):
1935
1936 2008-01-23  Michael Brasser  <michael.brasser@trolltech.com>
1937
1938         Reviewed by Simon.
1939
1940         Rendering fixes for Qtopia.
1941
1942         Make the focus ring work with line breaks (until we have QPainterPath::simplify) and
1943         call QStyle with better arguments when painting themed elements.
1944
1945         * platform/graphics/qt/GraphicsContextQt.cpp:
1946         (WebCore::GraphicsContext::drawFocusRing):
1947         * platform/qt/RenderThemeQt.cpp:
1948         (WebCore::RenderThemeQt::paintButton):
1949         (WebCore::RenderThemeQt::applyTheme):
1950
1951 2008-01-23  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1952
1953         Reviewed by Simon.
1954
1955         * FormData::flatten does not include to be uploaded files. Create our own QIODevice
1956         for the QNetworkAccessManager and feed the complete content of the FormData* to
1957         the (HTTP) backend.
1958         * Try to optimize the ::readData implementation to fill the buffer as best as possible
1959
1960         * platform/network/qt/QNetworkReplyHandler.cpp:
1961         (WebCore::FormDataIODevice::FormDataIODevice):
1962         (WebCore::FormDataIODevice::~FormDataIODevice):
1963         (WebCore::FormDataIODevice::moveToNextElement):
1964         (WebCore::FormDataIODevice::readData):
1965         (WebCore::FormDataIODevice::writeData):
1966         (WebCore::FormDataIODevice::setParent):
1967         (WebCore::FormDataIODevice::isSequential):
1968         (WebCore::FormDataIODevice::slotFinished):
1969         (WebCore::QNetworkReplyHandler::start):
1970         * platform/network/qt/QNetworkReplyHandler.h:
1971
1972 2008-01-23  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1973
1974         Reviewed by Simon.
1975
1976         * Coding-Style fixes
1977
1978         * platform/network/qt/QNetworkReplyHandler.cpp:
1979         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
1980
1981 2008-01-23  Michael Brasser  <michael.brasser@trolltech.com>
1982
1983         Reviewed by Simon.
1984
1985         use PopupClient's font for popup menu. Otherwise, in Qtopia, the popup's font is much bigger (QApplication::font()?) and the text doesn't fit.
1986
1987         * platform/qt/QWebPopup.cpp:
1988         (WebCore::QWebPopup::QWebPopup):
1989
1990 2008-01-23  Simon Hausmann  <hausmann@webkit.org>
1991
1992         Reviewed by Lars.
1993
1994         Implemented FrameLoaderClient::startDownload() and FrameLoaderClient::download().
1995         
1996         Added two signals to QWebPage to handle downloading of links and handling of
1997         unsupported content.
1998         
1999
2000         * platform/network/qt/QNetworkReplyHandler.cpp:
2001         (WebCore::QNetworkReplyHandler::release):
2002         * platform/network/qt/QNetworkReplyHandler.h:
2003
2004 2008-01-22  Dan Bernstein  <mitz@apple.com>
2005
2006         Reviewed by Adele Peterson.
2007
2008         - fix http://bugs.webkit.org/show_bug.cgi?id=16905
2009           <rdar://problem/5692407> REGRESSION (3.0.4-TOT): "menu" pseudocolor is badly chosen
2010
2011         The regression test for this is fast/css/css2-system-color.html which
2012         is currently disabled.
2013
2014         * rendering/RenderThemeMac.mm:
2015         (WebCore::menuBackgroundColor): Added. Uses HIThemeDrawMenuBackground
2016         to draw the menu item background into a bitmap graphics context and
2017         returns the color of the pixel at (0, 0).
2018         (WebCore::RenderThemeMac::systemColor): Changed to call
2019         menuBackgroundColor for the CSS2 menu color.
2020
2021 2008-01-22  Darin Adler  <darin@apple.com>
2022
2023         Reviewed by Oliver Hunt.
2024
2025         - turn full repainting back on for <canvas> until we get incremental
2026           repaint working properly
2027
2028         Ollie and I came up with a plan for testing this, but for now we should
2029         just fall back on the "repaint everything" behavior we have always had.
2030
2031         * html/HTMLCanvasElement.cpp:
2032         (WebCore::HTMLCanvasElement::willDraw): Just call repaint.
2033
2034 2008-01-22  Alp Toker  <alp@atoker.com>
2035
2036         GTK+/qmake build fix.
2037
2038         * WebCore.pro:
2039
2040 2008-01-22  Adam Roben  <aroben@apple.com>
2041
2042         Add HTMLFrameOwnerElement::scrollingMode
2043
2044         This new virtual method is overridden by HTMLFrameElementBase to
2045         provide the scrolling mode set on the frame or iframe element. Object
2046         elements always have scrolling=auto, so there's no need to override
2047         this method for HTMLPlugInElement.
2048
2049         Reviewed by Hyatt.
2050
2051         * html/HTMLFrameElementBase.h: Declare scrollingMode as virtual.
2052         * html/HTMLFrameOwnerElement.h:
2053         (WebCore::HTMLFrameOwnerElement::scrollingMode): Added.
2054
2055 2008-01-22  David Hyatt  <hyatt@apple.com>
2056
2057         Fix for <rdar://problem/5698481> REGRESSION: Web Inspector source view gutter double divider and no padding
2058
2059         Now that cellpadding cascades properly on <td>s, we need to make the view source padding rules in the user
2060         agent sheet have !important in order to override author settings.
2061
2062         Reviewed by Tim
2063
2064         * css/view-source.css:
2065
2066 2008-01-22  Nikolas Zimmermann  <zimmermann@kde.org>
2067
2068         Reviewed by Alp.
2069
2070         Allow to use SVGPaintServerSolid without RenderObject/RenderStyle. Used later to draw SVG Fonts in HTML.
2071
2072         * svg/graphics/SVGPaintServer.cpp:
2073         (WebCore::SVGPaintServer::sharedSolidPaintServer):
2074         * svg/graphics/SVGPaintServer.h:
2075         * svg/graphics/cg/SVGPaintServerCg.cpp:
2076         (WebCore::SVGPaintServer::renderPath):
2077         (WebCore::SVGPaintServer::fillPath):
2078         (WebCore::SVGPaintServer::clipToFillPath):
2079         * svg/graphics/cg/SVGPaintServerSolidCg.cpp:
2080         (WebCore::SVGPaintServerSolid::setup):
2081
2082 2008-01-22  Nikolas Zimmermann  <zimmermann@kde.org>
2083
2084         Reviewed by Alp.
2085
2086         Initialize missing variables, m_lineGap / m_lineSpacing.
2087         Only noticeable when trying to render HTML text using SVG Fonts (which is not possible with trunk, but with my local version).
2088
2089         * platform/graphics/SimpleFontData.cpp:
2090         (WebCore::SimpleFontData::SimpleFontData):
2091
2092 2008-01-22  Alp Toker  <alp@atoker.com>
2093
2094         Reviewed by Nikolas.
2095
2096         Fix Cairo SVG fonts following changes in r29700.
2097
2098         Set the font description's details as needed in FontPlatformData and
2099         eliminate GraphicsContext::setPlatformFont() since it was redundant
2100         and assumed all fonts were Cairo fonts.
2101
2102         * platform/graphics/GraphicsContext.cpp:
2103         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2104         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2105         (WebCore::FontPlatformData::FontPlatformData):
2106
2107 2008-01-22  Dan Bernstein  <mitz@apple.com>
2108  
2109          Reviewed by Eric.
2110  
2111          - fix http://bugs.webkit.org/show_bug.cgi?id=16967
2112            <rdar://problem/5699344> Reproducible crash when navigating back to a page using SVG fonts
2113  
2114          Test: svg/custom/font-platformDestroy-crash.svg
2115  
2116          * platform/graphics/SimpleFontData.cpp:
2117          (WebCore::SimpleFontData::~SimpleFontData): Changed to call
2118          platformDestroy() only if platformInit() was called from the
2119          constructor.
2120
2121 2008-01-22  Lars Knoll  <lars@trolltech.com>
2122
2123         Reviewed by Simon.
2124
2125         cleanup the CookieJarQt implementation and implement cookiesEnabled.
2126
2127         * platform/qt/CookieJarQt.cpp:
2128         (WebCore::cookieJar):
2129         (WebCore::setCookies):
2130         (WebCore::cookies):
2131         (WebCore::cookiesEnabled):
2132
2133 2008-01-22  Lars Knoll  <lars@trolltech.com>
2134
2135         Reviewed by Simon.
2136
2137         Ported the font implementation to use the new QFont features of Qt 4.4.
2138         
2139
2140         * platform/graphics/Font.h:
2141         (WebCore::Font::setWordSpacing):
2142         (WebCore::Font::setLetterSpacing):
2143         (WebCore::Font::font):
2144         (WebCore::Font::):
2145         * platform/graphics/qt/FontQt.cpp:
2146         (WebCore::Font::Font):
2147         (WebCore::Font::setWordSpacing):
2148         (WebCore::Font::setLetterSpacing):
2149         (WebCore::qstring):
2150         (WebCore::setupLayout):
2151         (WebCore::Font::drawText):
2152         (WebCore::Font::width):
2153         (WebCore::Font::floatWidth):
2154         (WebCore::Font::offsetForPosition):
2155         (WebCore::Font::selectionRectForText):
2156         (WebCore::generateComponents):
2157         (WebCore::cursorToX):
2158         (WebCore::Font::~Font):
2159         (WebCore::Font::operator=):
2160         (WebCore::Font::operator==):
2161         (WebCore::Font::update):
2162
2163 2008-01-21  Eric Seidel  <eric@webkit.org>
2164
2165         Reviewed by Nikolas & Oliver.
2166         
2167         Tested by svg/custom/svg-features.html
2168         
2169         * dom/DOMImplementation.cpp:
2170         (WebCore::isSVG10Feature): use ENABLE(SVG_*) conditionals
2171         (WebCore::isSVG11Feature): use ENABLE(SVG_*) conditionals
2172
2173 2008-01-21  Geoffrey Garen  <ggaren@apple.com>
2174
2175         Reviewed by Maciej Stachowiak.
2176
2177         Adapted WebCore to the fix for http://bugs.webkit.org/show_bug.cgi?id=16909
2178         REGRESSION: Amazon.com crash (ActivationImp)
2179
2180         * bindings/js/kjs_proxy.cpp:
2181         (WebCore::KJSProxy::~KJSProxy): No convenient way to make this assertion
2182         anymore. (It wasn't firing for anyone, anyway, so it's no big loss.)
2183
2184         * bindings/objc/WebScriptObject.mm:
2185         (+[WebScriptObject throwException:]): Use the ExecState stack, instead
2186         of currentExec.
2187         (-[WebScriptObject setException:]): ditto. Also, a slight change in
2188         behavior: If no ExecStates are active, we no longer throw an exception
2189         in the global ExecState. The JavaScriptCore ChangeLog explains why.
2190         This also matches the behavior of +throwException.
2191
2192 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
2193
2194         Not reviewed. Try to fix Qt build, after the rmdir() fixes.c
2195
2196         * platform/graphics/qt/SimpleFontDataQt.cpp:
2197         (WebCore::SimpleFontData::SimpleFontData):
2198
2199 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
2200
2201         Not reviewed. Another Wx build fix.
2202
2203         * platform/graphics/wx/FontWx.cpp:
2204         (WebCore::Font::drawGlyphs):
2205
2206 2008-01-21  Darin Adler  <darin@apple.com>
2207
2208         - try to fix Qt build
2209
2210         * platform/qt/FileSystemQt.cpp:
2211         (WebCore::deleteEmptyDirectory): QDir::root().rmdir() instead of QDir::rmdir().
2212
2213 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
2214
2215         Not reviewed. Yet another win/gtk build fix.
2216
2217         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2218         (WebCore::FontPlatformData::FontPlatformData):
2219         * platform/graphics/win/FontWin.cpp:
2220         (WebCore::Font::drawGlyphs):
2221
2222 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
2223
2224         Not reviewed. Another build fix for Gtk/Linux & Wx/Mac.
2225
2226         * platform/graphics/SimpleFontData.cpp:
2227         (WebCore::SimpleFontData::SimpleFontData):
2228
2229 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
2230
2231         Not reviewed. Build fix for Qt/Gtk & Wx.
2232
2233         * css/CSSFontSelector.cpp:
2234         * platform/graphics/SegmentedFontData.cpp:
2235         (WebCore::SegmentedFontData::isSVGFont): Remove SVG_FONTS block, it's a pure virtual function in the base class.
2236         * platform/graphics/SegmentedFontData.h:
2237
2238 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
2239
2240         Not reviewed. Build fix for ports that don't build SVG: wx.
2241
2242         * css/CSSFontFaceSource.h: Wrap include in ENABLE(SVG_FONTS) blocks.
2243         * css/CSSFontFaceSrcValue.h: Ditto.
2244
2245 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
2246
2247         Not reviewed. Build fix for Qt/Gtk.
2248
2249         * platform/graphics/SimpleFontData.h:
2250         (WebCore::SimpleFontData::svgFontData):
2251         (WebCore::SimpleFontData::isSVGFont):
2252
2253 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
2254
2255         Reviewed by Eric. Older parts reviewed by Dan.
2256
2257         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16880 (SVGCSSFontFace should die, instead integrate within the FontCache.)
2258         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16784 (In-document fonts work only as the first child to font-face-src)
2259
2260         Proper integration of SVG Fonts within the existing custom font concept, removing the need for a custom SVGCSSFontFace.
2261         Integrate within the CSSFontFaceSource logic for caching support, as well as the framework for external SVG Fonts.
2262
2263         Proper handling of missing glyphs, using <missing-glyph> element. If that is not specified in a font, fallback to non-SVG font rendering.
2264
2265         * GNUmakefile.am:
2266         * WebCore.pro:
2267         * WebCore.vcproj/WebCore.vcproj:
2268         * WebCore.xcodeproj/project.pbxproj:
2269         * css/CSSFontFaceSource.cpp:
2270         (WebCore::CSSFontFaceSource::getFontData):
2271         * css/CSSFontFaceSource.h:
2272         (WebCore::CSSFontFaceSource::svgFontFaceElement):
2273         (WebCore::CSSFontFaceSource::setSVGFontFaceElement):
2274         * css/CSSFontFaceSrcValue.h:
2275         (WebCore::CSSFontFaceSrcValue::m_isLocal):
2276         (WebCore::CSSFontFaceSrcValue::~CSSFontFaceSrcValue):
2277         (WebCore::CSSFontFaceSrcValue::svgFontFaceElement):
2278         (WebCore::CSSFontFaceSrcValue::setSVGFontFaceElement):
2279         * css/CSSFontSelector.cpp:
2280         (WebCore::CSSFontSelector::addFontFaceRule):
2281         * css/SVGCSSFontFace.cpp: Removed.
2282         * css/SVGCSSFontFace.h: Removed.
2283         * platform/graphics/Font.cpp:
2284         (WebCore::Font::ascent):
2285         (WebCore::Font::descent):
2286         (WebCore::Font::lineSpacing):
2287         (WebCore::Font::xHeight):
2288         (WebCore::Font::fontSelector):
2289         * platform/graphics/Font.h:
2290         * platform/graphics/FontData.h:
2291         * platform/graphics/SegmentedFontData.cpp:
2292         (WebCore::SegmentedFontData::isSVGFont):
2293         * platform/graphics/SegmentedFontData.h:
2294         * platform/graphics/SimpleFontData.cpp:
2295         (WebCore::SimpleFontData::SimpleFontData):
2296         * platform/graphics/SimpleFontData.h:
2297         (WebCore::SimpleFontData::ascent):
2298         (WebCore::SimpleFontData::descent):
2299         (WebCore::SimpleFontData::lineSpacing):
2300         (WebCore::SimpleFontData::lineGap):
2301         (WebCore::SimpleFontData::xHeight):
2302         (WebCore::SimpleFontData::isSVGFont):
2303         (WebCore::SimpleFontData::svgFontData):
2304         * platform/graphics/gtk/FontPlatformData.h:
2305         (WebCore::FontPlatformData::size):
2306         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2307         (WebCore::FontPlatformData):
2308         * platform/graphics/mac/FontPlatformData.h:
2309         (WebCore::FontPlatformData::FontPlatformData):
2310         (WebCore::FontPlatformData::size):
2311         * platform/graphics/win/FontPlatformData.h:
2312         * platform/graphics/win/FontPlatformDataWin.cpp:
2313         (WebCore::FontPlatformData::FontPlatformData):
2314         * rendering/RenderSVGText.cpp:
2315         (WebCore::RenderSVGText::relativeBBox):
2316         * svg/SVGFont.cpp:
2317         (WebCore::convertEmUnitToPixel):
2318         (WebCore::isCompatibleGlyph):
2319         (WebCore::svgFontAndFontFaceElementForFontData):
2320         (WebCore::SVGTextRunWalker::SVGTextRunWalker):
2321         (WebCore::SVGTextRunWalker::walk):
2322         (WebCore::floatWidthUsingSVGFontCallback):
2323         (WebCore::floatWidthMissingGlyphCallback):
2324         (WebCore::floatWidthOfSubStringUsingSVGFont):
2325         (WebCore::drawTextUsingSVGFontCallback):
2326         (WebCore::drawTextMissingGlyphCallback):
2327         (WebCore::Font::drawTextUsingSVGFont):
2328         * svg/SVGFontData.cpp: Added.
2329         (WebCore::SVGFontData::SVGFontData):
2330         (WebCore::SVGFontData::~SVGFontData):
2331         * svg/SVGFontData.h: Added.
2332         (WebCore::SVGFontData::svgFontFaceElement):
2333         (WebCore::SVGFontData::horizontalOriginX):
2334         (WebCore::SVGFontData::horizontalOriginY):
2335         (WebCore::SVGFontData::horizontalAdvanceX):
2336         (WebCore::SVGFontData::verticalOriginX):
2337         (WebCore::SVGFontData::verticalOriginY):
2338         (WebCore::SVGFontData::verticalAdvanceY):
2339         * svg/SVGFontFaceElement.cpp:
2340         (WebCore::SVGFontFaceElement::unitsPerEm):
2341         (WebCore::SVGFontFaceElement::xHeight):
2342         (WebCore::SVGFontFaceElement::horizontalOriginX):
2343         (WebCore::SVGFontFaceElement::horizontalOriginY):
2344         (WebCore::SVGFontFaceElement::horizontalAdvanceX):
2345         (WebCore::SVGFontFaceElement::verticalOriginX):
2346         (WebCore::SVGFontFaceElement::verticalOriginY):
2347         (WebCore::SVGFontFaceElement::verticalAdvanceY):
2348         (WebCore::SVGFontFaceElement::ascent):
2349         (WebCore::SVGFontFaceElement::descent):
2350         (WebCore::SVGFontFaceElement::fontFamily):
2351         (WebCore::SVGFontFaceElement::associatedFontElement):
2352         (WebCore::SVGFontFaceElement::rebuildFontFace):
2353         * svg/SVGFontFaceElement.h:
2354         * svg/SVGGlyphElement.cpp:
2355         (WebCore::SVGGlyphElement::inheritUnspecifiedAttributes):
2356         (WebCore::parseSVGGlyphAttribute):
2357         (WebCore::SVGGlyphElement::buildGenericGlyphIdentifier):
2358         (WebCore::SVGGlyphElement::buildGlyphIdentifier):
2359         * svg/SVGGlyphElement.h:
2360         * svg/SVGMissingGlyphElement.cpp:
2361         * svg/svgattrs.in:
2362
2363 2008-01-21  Darin Adler  <darin@apple.com>
2364
2365         Reviewed by John Sullivan.
2366
2367         - fix <rdar://problem/5644324> Delegate-less WebKit clients should have no databases
2368
2369         - remove the default database quota setting
2370
2371         - simplify the quota-related client calls by merging the one for a new database with
2372           the one for an existing database, adding a feature where you can get details about
2373           a database being created using the same functions that work on the other databases,
2374           and removing the parameters and return values, instead having clients use a function
2375           to set the quota
2376
2377         - fix unsafe multi-thread access to the database tracker's quota map
2378         - fix bug in deleteAllDatabases where it would iterate a HashMap while modifying it
2379
2380         The tracker database is now only created when we set the quota for a database origin.
2381         Thus asking for info about databases won't cause anything to be written to disk.
2382
2383         * WebCore.base.exp: Updated.
2384
2385         * bindings/js/GCController.cpp: Added an #if to get rid of an unused function warning.
2386
2387         * page/Chrome.cpp: Removed database-related functions. There's no problem having the
2388         code deal directly with the client.
2389         * page/Chrome.h: Ditto. Also made Chrome inherit from Noncopyable.
2390
2391         * page/ChromeClient.h: Replaced the two quota-related functions with a single one.
2392         The details about the state of databases in the origin are now available by asking
2393         for database details. There's also no need to pass the security origin, since
2394         it's easy to get that from the frame's document.
2395
2396         * page/Settings.cpp: Removed the default quota setting.
2397         * page/Settings.h: Ditto.
2398
2399         * platform/FileSystem.h: Added deleteEmptyDirectory.
2400         * platform/gtk/FileSystemGtk.cpp:
2401         (WebCore::deleteEmptyDirectory): Added.
2402         * platform/posix/FileSystemPOSIX.cpp:
2403         (WebCore::deleteEmptyDirectory): Added.
2404         * platform/qt/FileSystemQt.cpp:
2405         (WebCore::deleteEmptyDirectory): Added.
2406         * platform/win/FileSystemWin.cpp:
2407         (WebCore::deleteEmptyDirectory): Added.
2408         * platform/wx/FileSystemWx.cpp:
2409         (WebCore::deleteEmptyDirectory): Added placeholder.
2410
2411         * storage/DatabaseDetails.h: Removed the isValid() function since its name is
2412         confusing -- we removed our other isValid() functions. For the few callers that
2413         need this, it's fine to just check name().isEmpty(). Made the member functions
2414         all const.
2415
2416         * storage/DatabaseTracker.cpp:
2417         (WebCore::DatabaseTracker::DatabaseTracker): Removed m_defaultQuota initialization.
2418         Added m_proposedDatabase and m_thread.
2419         (WebCore::DatabaseTracker::setDatabaseDirectoryPath): Got rid of code that would
2420         open the tracker database here. This might slightly speed up launch time, since
2421         we won't do the I/O until we have to, and before we were actually creating an SQL
2422         database in this code that's run when we go to the first webpage.
2423         (WebCore::DatabaseTracker::trackerDatabasePath): Added.
2424         (WebCore::DatabaseTracker::openTrackerDatabase): Added a boolean parameter telling
2425         this function whether to create the database. Made this function safe to call if
2426         the database is already open. Also made the function fail quietly if the path has
2427         not been set yet.
2428         (WebCore::DatabaseTracker::canEstablishDatabase): Got rid of the call to the
2429         establishEntryForOrigin function. The origin is now put in the tracker database
2430         when the quota is set to a non-zero value. When judging if there's enough space
2431         for the new database, require at least one byte even if estimatedSize is 0, and
2432         check for overflow. Also added code here to populate the origins map, which
2433         guarantees it will be ready when the database uses it on another thread later.
2434         Also changed this to call the new ChromeClient function.
2435         (WebCore::DatabaseTracker::hasEntryForDatabase): Added code to open the
2436         tracker database, since that's no longer done by setDatabaseDirectoryPath.
2437         (WebCore::DatabaseTracker::originPath): Added.
2438         (WebCore::DatabaseTracker::fullPathForDatabase): Added code so that this will
2439         return a null string for the proposed database if called from within the
2440         ChromeClient function. Also switched from empty string to null string for the
2441         error cases.
2442         (WebCore::DatabaseTracker::populateOrigins): Added code to open the tracker
2443         database.
2444         (WebCore::DatabaseTracker::databaseNamesForOrigin): Ditto.
2445         (WebCore::DatabaseTracker::detailsForNameAndOrigin): Ditto. Also added code that
2446         will return the details of the proposed database if called from within the
2447         ChromeClient function. This is how the client can learn of the display name and
2448         the estimated size of the new database.
2449         (WebCore::DatabaseTracker::setDatabaseDetails): Added code to open the tracker
2450         database.
2451         (WebCore::DatabaseTracker::quotaForOrigin): Made this code OK to call on a non-main
2452         thread by using m_quotaMapGuard to guard access to the map. Other code runs on the
2453         main thread only, and only functions that write to the map use the lock.
2454         (WebCore::DatabaseTracker::setQuota): Changed this function so it can insert the
2455         initial quota as well as updating an existing quota. Added locking since this
2456         function modifies the quota map. Added code to open the tracker database. Added
2457         an early exit if the quota is already correct, which is guarantees that if you
2458         set a quota to 0 it won't trigger creation of a tracker database.
2459         (WebCore::DatabaseTracker::addDatabase): Added code to open the tracker database.
2460         (WebCore::DatabaseTracker::deleteAllDatabases): Made a copy of the quota map before
2461         iterating it to find all the origins. This fixes a problem with the old code where
2462         it would modify the map while iterating it, which gives assertions in debug builds
2463         and unpredictable results.
2464         (WebCore::DatabaseTracker::deleteOrigin): Replaced deleteDatabasesWithOrigin with
2465         this function. Added code to open the tracker database if needed. Added code to
2466         delete the origin from the tracker database, and to close the tracker database
2467         and delete files and directories as needed if we are deleting the final origin.
2468         (WebCore::DatabaseTracker::deleteDatabase): Added code to open the tracker database
2469         if needed.
2470
2471         * storage/DatabaseTracker.h: Renamed databasePath to databaseDirectoryPath for
2472         clarity, including the data member, and the getter and setter functions.
2473         Replaced deleteDatabasesWithOrigin with deleteOrigin. Removed the functions
2474         dealing with default origin quota. There is no default any more; origins start
2475         with no quota and the client must set a quota. Added trackerDatabasePath and
2476         originPath helper functions. Added a boolean parameter to openTrackerDatabase
2477         to tell it whether to create the database or not. Removed the
2478         establishEntryForOrigin function. Renamed m_originQuotaMap to just m_quotaMap,
2479         and added m_quotaMapGuard. Added a QuotaMap typedef. Added m_proposedDatabase,
2480         which holds the origin and details for the current proposed database during
2481         the client callback function that must decide whether to grant quota. Added a
2482         m_thread data member for debugging use to assert if functions that can only
2483         be called on a single thread are misused.
2484
2485         * storage/SQLTransaction.cpp:
2486         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback): Changed to call the
2487         new exceededDatabaseQuota function instead of the old one.
2488
2489         * svg/graphics/SVGImageEmptyClients.h: Updated for the change to ChromeClient.
2490
2491 2008-01-21  David Hyatt  <hyatt@apple.com>
2492
2493         Fix for http://bugs.webkit.org/show_bug.cgi?id=16935
2494
2495         Fix a bug in layers where the positioned ancestor was being computed incorrectly (the root should not
2496         automatically be included).
2497
2498         Reviewed by olliej
2499
2500         Added fast/layers/positioned-inside-root-with-margins.html
2501
2502         * rendering/RenderLayer.cpp:
2503         (WebCore::RenderLayer::stackingContext):
2504         (WebCore::RenderLayer::enclosingPositionedAncestor):
2505
2506 2008-01-21  Simon Hausmann  <hausmann@webkit.org>
2507
2508         Reviewed by Holger.
2509
2510         Fix KURL to QUrl conversion.
2511         
2512         Stick to the encoded version of the URL and in addition to KURL we encode the
2513         characters mentioned in section 2.4.3 of RFC 2396 as QUrl requires these, too.
2514         
2515         This fixes fast/css/import-rule-regression-11590.html,
2516         fast/css/import-style-update.html, svg/hixie/processing-model/003.xml and
2517         svg/hixie/processing-model/004.xml.
2518
2519
2520         * platform/qt/KURLQt.cpp:
2521         (WebCore::toHex):
2522         (WebCore::KURL::operator QUrl):
2523
2524 2008-01-21  Simon Hausmann  <hausmann@webkit.org>
2525
2526         Reviewed by Holger.
2527
2528         Fix focus chain handling and cycling through focusable objects (links) using tab/backtab.
2529         
2530         * Fix GraphicsContext::drawFocusRing to also draw single focus rects.
2531         * Implemented QWebPage::focusNextPrevChild by sending fake tab/shift-tab events
2532         and make the return value depend on whether we successfully determined a focusable
2533         node or not.
2534         * Changed QWebView::focusNextPrevChild() to call the base QWidget implementation correctly
2535         if we could not handle the focus chain ourselves.
2536         * Changed the focus policy of QWebView to correctly use WheelFocus instead of ClickFocus.
2537         * Made ChromeClientQt::canTakeFocus() and takeFocus() dummy method since they are only
2538         used to control the situation of stepping out of the focus chain inside the page.
2539         * Made inclusion of links in the focus chain configurable through QWebSettings::LinksIncludedInFocusChain.
2540         The layout tests expect this to be disabled but for the user it seems sensible to have it
2541         on by default, hence the default in qwebsettings.cpp
2542
2543         * platform/graphics/qt/GraphicsContextQt.cpp:
2544         (WebCore::GraphicsContext::drawFocusRing):
2545
2546 2008-01-21  Simon Hausmann  <hausmann@webkit.org>
2547
2548         Reviewed by Holger.
2549
2550         Fix access key support and fast/forms/legend-access-key.html
2551
2552         SVN revision 26664 changed the default access key for the non-mac build to Alt
2553         while this test relies on Ctrl.
2554
2555         * page/EventHandler.cpp:
2556
2557 2008-01-21  Simon Hausmann  <hausmann@webkit.org>
2558
2559         Reviewed by Holger.
2560
2561         Fix error reporting when parsing X(HT)ML fragments.
2562         
2563         We use the regular XMLTokenizer write()/.../end() sequence to parse those
2564         fragments, but we should not report any parsing errors inline inside the
2565         content. Instead we should just return the error and the DOM layer will take
2566         care of throwing an exception.
2567         
2568         This fixes fast/innerHTML/innerHTML-changing-document-properties.xhtml
2569         
2570
2571         * dom/XMLTokenizer.cpp:
2572         (WebCore::createXHTMLParserErrorHeader):
2573
2574 2008-01-21  Holger Freyther  <holger.freyther@trolltech.com>
2575
2576         Reviewed by Simon.
2577
2578         Fix some issues with redirections.
2579         
2580         * Ensure that we deliver the response to the ResourceHandleClient only once by
2581         setting m_responseSent back to false only before calling start() for the
2582         redirection
2583         * Added 307 as another HTTP status code that causes a redirection after POST to
2584         become get, just like in MainResourceLoader::isPostOrRedirectAfterPost
2585         * Also set the HTTP method on the ResourceRequest to GET before passing it to
2586         willSendRequest.
2587         * willSendRequest's newRequest argument is actually an in/out argument and could be
2588         modified in theory, so set m_request accordingly after the call.
2589         
2590
2591         * platform/network/qt/QNetworkReplyHandler.cpp:
2592         (WebCore::QNetworkReplyHandler::finish):
2593         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
2594
2595 2008-01-21  Holger Freyther  <holger.freyther@trolltech.com>
2596
2597         Reviewed by Simon.
2598
2599         Fixed WebCore::cookies() to return all cookies, not only the first one.
2600         
2601         Fixes login into mail.yahoo.com.
2602         
2603
2604         * platform/qt/CookieJarQt.cpp:
2605         (WebCore::cookies):
2606
2607 2008-01-20  Oliver Hunt  <oliver@apple.com>
2608
2609         Reviewed by Mitz.
2610
2611         Fix http://bugs.webkit.org/show_bug.cgi?id=16816 , rdar://problem/5682985
2612         
2613         Correctly trigger willPerformDragDestinationAction when a drop causes a 
2614         load to occur.  The logic that originally did this was lost during the
2615         great drag migration of '07.
2616
2617         * page/DragController.cpp:
2618         (WebCore::DragController::performDrag):
2619
2620 2008-01-20  Dan Bernstein  <mitz@apple.com>
2621
2622         Reviewed by Darin Adler.
2623
2624         - fix http://bugs.webkit.org/show_bug.cgi?id=16951
2625           Assertion failure in FrameView::scheduleRelayout (!m_frame->document() || !m_frame->document()->inPageCache()) when going back from a page with a focused popup
2626
2627         * dom/Document.cpp:
2628         (WebCore::Document::setFocusedNode): Bail out if the document is in the
2629         page cache. Documents in the back/forward cache are "frozen" and should
2630         not change state.
2631
2632 2008-01-20  Collin Jackson  <webkit@collinjackson.com>
2633
2634         Reviewed by Sam Weinig.
2635
2636         Fix for http://bugs.webkit.org/show_bug.cgi?id=16775
2637
2638         We now use frame()->loader()->url() for postMessage, preventing a
2639         malicious sender from overwriting the uri property (using a <base> tag,
2640         for example). Also, use frame->loader()->url().host() instead of 
2641         instead of document()->SecurityOrigin()->domain() to reflect a recent
2642         clarification in the HTML5 spec. 
2643
2644         Tests: http/tests/security/postMessage/domain-affected-by-document-domain.html
2645                http/tests/security/postMessage/domain-and-uri-unaffected-by-base-tag.html
2646                http/tests/security/postMessage/javascript-page-still-sends-domain.html
2647
2648         * bindings/js/JSDOMWindowCustom.cpp:
2649         (WebCore::JSDOMWindow::postMessage):
2650
2651 2008-01-20  Antti Koivisto  <antti@apple.com>
2652
2653         Reviewed by Adele.
2654
2655         Fix <rdar://problem/5695451>
2656         Middle part of the media timeline missing on Windows if load failed
2657
2658         Add some null checking to avoid getting garbage results from the functions.
2659
2660         * platform/graphics/MediaPlayer.cpp:
2661         * platform/graphics/win/QTMovieWin.cpp:
2662         (QTMovieWin::duration):
2663         (QTMovieWin::currentTime):
2664         (QTMovieWin::setCurrentTime):
2665         (QTMovieWin::maxTimeLoaded):
2666
2667 2008-01-19  Alp Toker  <alp@atoker.com>
2668
2669         Reviewed by Mark Rowe.
2670
2671         http://bugs.webkit.org/show_bug.cgi?id=16944
2672         Use of GST_PLUGIN_DEFINE_STATIC results in a module-level constructor
2673
2674         http://bugzilla.gnome.org/show_bug.cgi?id=510547
2675         Epiphany/Webkit fails to start due to initializing threads twice
2676
2677         Don't call GST_PLUGIN_DEFINE_STATIC() as it performs g_thread_init()
2678         in the global initializer, breaking subsequent calls to
2679         g_thread_init() in applications.
2680
2681         * platform/graphics/gtk/VideoSinkGStreamer.cpp:
2682
2683 2008-01-19  Alp Toker  <alp@atoker.com>
2684
2685         Reviewed by Mark Rowe.
2686
2687         Remove any fragment part from the URL to be requested just before
2688         passing it to curl, otherwise curl sends it as part of the HTTP/local
2689         file request, causing page loads to fail.
2690
2691         * platform/network/curl/ResourceHandleManager.cpp:
2692         (WebCore::ResourceHandleManager::startJob):
2693
2694 2008-01-19  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
2695
2696         Reviewed by Alp Toker.
2697
2698         Add svg foreign object and svg experimental to the GTK+/autotools
2699         build system.
2700
2701         * GNUmakefile.am:
2702
2703 2008-01-19  Dan Bernstein  <mitz@apple.com>
2704
2705         Reviewed by Maciej Stachowiak.
2706
2707         - fix <rdar://problem/5645813> CrashTracer: [USER] 6 crashes in Safari at com.apple.WebCore: WebCore::RenderBox::destroy + 116
2708
2709         Test: editing/selection/inconsistent-in-removeChildNode.html
2710
2711         * editing/SelectionController.cpp:
2712         (WebCore::SelectionController::nodeWillBeRemoved): If the selection
2713         base or extent are not visible any more, adjust the selection.
2714
2715 2008-01-19  Oliver Hunt  <oliver@apple.com>
2716
2717         Reviewed by Eric Seidel.
2718
2719         Build fix for --svg-foreign-object path
2720
2721         * svg/SVGForeignObjectElement.idl:
2722
2723 2008-01-18  Stephanie  <slewis@apple.com>
2724
2725         Reviewed by Oliver.
2726
2727         Workaround for <rdar://problem/5695848>.  Set mime_type for local files based on file extension. 
2728
2729         * platform/network/cf/ResourceResponseCFNet.cpp:
2730         (WebCore::ResourceResponse::doUpdateResourceResponse):
2731
2732 2008-01-18  Ada Chan  <adachan@apple.com>
2733
2734         <rdar://problem/5682340> REGRESSION (r28188): Context menu appears at wrong place when clicking in iframe whose parent is scrolled (16827)
2735         Calling absolutePosition() in EventHandler::hitTestResultAtPoint() is extremely inefficient and passing in
2736         true as fixed before was wrong.  Use HitTestResult::localPoint() instead, and take into account border and padding widths.
2737
2738         Reviewed by Hyatt and Darin.
2739
2740         * page/EventHandler.cpp:
2741         (WebCore::EventHandler::hitTestResultAtPoint):
2742         * rendering/HitTestResult.cpp:
2743         (WebCore::HitTestResult::operator=):
2744
2745 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2746
2747         Reviewed by Darin, landed by Beth.
2748
2749         - fixed http://bugs.webkit.org/show_bug.cgi?id=15765
2750
2751         The call to HTMLTokenizer::write might result in a call to ::end which will invoke
2752         HTMLParser::finished() or Document::finishedParsing(). HTMLParser::finished() will eventually
2753         call Document::finishedParsing. The Document will delete the calling HTMLTokenizer and from the deleted
2754         tokenizer we will call into FrameLoader::tokenizerProcessedData.
2755         -) FrameLoader::tokenizerProcessedData calls FrameLoader::checkCompleted which gets called from the Document::finishedParsing
2756            (FrameLoader::finishedParsing).
2757
2758         * html/HTMLTokenizer.cpp:
2759         (WebCore::HTMLTokenizer::timerFired):
2760
2761 2008-01-18  David Hyatt  <hyatt@apple.com>
2762
2763         Don't apply the border/margin/padding check to root line boxes, since their renderers
2764         are blocks.
2765
2766         * rendering/InlineFlowBox.cpp:
2767         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
2768         (WebCore::InlineFlowBox::placeBoxesVertically):
2769
2770 2008-01-18  Geoffrey Garen  <ggaren@apple.com>
2771
2772         Not reviewed: rolling out a previous patch.
2773         
2774         Fixed <rdar://problem/5695439> Crash during GCController destructor on
2775         quitting browser
2776
2777         Used svn merge to roll out r29603 because it introduced some crashes
2778         on quit.
2779         
2780         GC relies on static hash tables, so it's not safe to GC from a static
2781         destructor, which might run after the static hash tables' destructors.
2782
2783         * bindings/js/GCController.cpp:
2784         (WebCore::GCController::garbageCollectNow):
2785         * bindings/js/GCController.h:
2786
2787 2008-01-18  David Hyatt  <hyatt@apple.com>
2788
2789         Fix for http://bugs.webkit.org/show_bug.cgi?id=15665
2790
2791         Building on Beth's earlier work to start building line boxes for empty inlines, this patch makes more
2792         empty inline cases work.  Empty inlines on lines by themselves now set isLineEmpty to false so that
2793         bidiReorderLine will get properly called.  In addition, the "shrink boxes with no text children" quirk
2794         needs to be disabled for inlines with padding, margins or borders.
2795
2796         Reviewed by Beth
2797
2798         Added fast/inline/inline-padding-disables-text-quirk.html
2799
2800         * rendering/InlineFlowBox.cpp:
2801         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
2802         (WebCore::InlineFlowBox::placeBoxesVertically):
2803         (WebCore::InlineFlowBox::shrinkBoxesWithNoTextChildren):
2804         * rendering/RenderObject.h:
2805         (WebCore::RenderObject::hasBordersPaddingOrMargin):
2806         * rendering/bidi.cpp:
2807         (WebCore::inlineFlowRequiresLineBox):
2808         (WebCore::RenderBlock::findNextLineBreak):
2809
2810 2008-01-18  David Hyatt  <hyatt@apple.com>
2811
2812         Fix for http://bugs.webkit.org/show_bug.cgi?id=14975
2813
2814         Computed size of padding is incorrect because we default padding to auto.  This is a made-up value that
2815         was only used to implement cellpadding on tables.  We needed this made-up value in order to tell that
2816         padding wasn't set so that we could then apply cellpadding.
2817        
2818         This patch rewrites cellpadding to be like other browsers.  Instead of being a setting on the table
2819         renderer that applies to all cells (even ones that were not <td>s), cellpadding is now mapped into the
2820         style of <td>s.  With this change it effectively becomes a content model feature and not a rendering
2821         feature.
2822
2823         For example, a <td> will pick up cellpadding even when it is not a cell and/or the enclosing <table> is
2824         not a table.  Anonymous cells and CSS-display-type cells will now never pick up cellpadding.  This behavior
2825         is all consistent with other browsers.
2826
2827         Reviewed by Antti
2828
2829         Added fast/css/padding-no-renderer.html
2830
2831         * css/CSSStyleSelector.cpp:
2832         (WebCore::CSSStyleSelector::canShareStyleWithElement):
2833         (WebCore::CSSStyleSelector::styleForElement):
2834         * css/CSSStyleSelector.h:
2835         * dom/StyledElement.cpp:
2836         * dom/StyledElement.h:
2837         (WebCore::StyledElement::canHaveAdditionalAttributeStyleDecls):
2838         (WebCore::StyledElement::additionalAttributeStyleDecls):
2839         * html/HTMLTableCellElement.cpp:
2840         (WebCore::HTMLTableCellElement::additionalAttributeStyleDecls):
2841         * html/HTMLTableCellElement.h:
2842         (WebCore::HTMLTableCellElement::canHaveAdditionalAttributeStyleDecls):
2843         * html/HTMLTableColElement.cpp:
2844         (WebCore::HTMLTableColElement::additionalAttributeStyleDecls):
2845         * html/HTMLTableColElement.h:
2846         (WebCore::HTMLTableColElement::canHaveAdditionalAttributeStyleDecls):
2847         * html/HTMLTableElement.cpp:
2848         (WebCore::HTMLTableElement::parseMappedAttribute):
2849         (WebCore::HTMLTableElement::additionalAttributeStyleDecls):
2850         (WebCore::HTMLTableElement::addSharedCellDecls):
2851         (WebCore::HTMLTableElement::addSharedCellBordersDecl):
2852         (WebCore::HTMLTableElement::addSharedCellPaddingDecl):
2853         (WebCore::HTMLTableElement::addSharedGroupDecls):
2854         (WebCore::HTMLTableElement::attach):
2855         * html/HTMLTableElement.h:
2856         (WebCore::HTMLTableElement::canHaveAdditionalAttributeStyleDecls):
2857         * html/HTMLTableSectionElement.cpp:
2858         (WebCore::HTMLTableSectionElement::additionalAttributeStyleDecls):
2859         * html/HTMLTableSectionElement.h:
2860         (WebCore::HTMLTableSectionElement::canHaveAdditionalAttributeStyleDecls):
2861         * rendering/AutoTableLayout.cpp:
2862         (WebCore::AutoTableLayout::recalcColumn):
2863         * rendering/RenderObject.cpp:
2864         (WebCore::RenderObject::paddingTop):
2865         (WebCore::RenderObject::paddingBottom):
2866         (WebCore::RenderObject::paddingLeft):
2867         (WebCore::RenderObject::paddingRight):
2868         * rendering/RenderStyle.cpp:
2869         (WebCore::StyleSurroundData::StyleSurroundData):
2870         * rendering/RenderStyle.h:
2871         (WebCore::RenderStyle::initialPadding):
2872         * rendering/RenderTable.cpp:
2873         (WebCore::RenderTable::RenderTable):
2874         * rendering/RenderTable.h:
2875
2876 2008-01-18  Dan Bernstein  <mitz@apple.com>
2877
2878         Reviewed by Dave Hyatt.
2879
2880         - fix <rdar://problem/5615307> Repro crash in WebKit!WebCore::RenderContainer::destroyLeftoverChildren
2881
2882         Test: fast/table/insert-row-before-form.html
2883
2884         * rendering/RenderTableRow.cpp:
2885         (WebCore::RenderTableRow::addChild): Changed to ensure that the
2886         object a new cell is inserted before is a child of the row, and
2887         added an assertion that that object is either a cell or a form.
2888         * rendering/RenderTableSection.cpp:
2889         (WebCore::RenderTableSection::addChild): Changed to ensure that the
2890         object a new row is inserted before is a child of the table section, and
2891         added an assertion that that object is either a table row or a form.
2892
2893 2008-01-18  Geoffrey Garen  <ggaren@apple.com>
2894
2895         Reviewed by Brady Eidson.
2896
2897         Fixed <rdar://problem/5622424> World Leak dialog when closing a page
2898         that has a Database
2899         
2900         The problem was that each transaction and SQL statement would hold on
2901         to its callback indefinitely. By design, callbacks often establish
2902         reference cycles to temporarily protect their execution environments.
2903         To break the cycle, we need to explicitly release each callback as soon
2904         as it is no longer needed.
2905
2906         * storage/SQLStatement.cpp:
2907         (WebCore::SQLStatement::performCallback): Release our callback objects
2908         after performing our callback.
2909
2910         * storage/SQLTransaction.cpp:
2911         (WebCore::SQLTransaction::postflightAndCommit): Release our callback
2912         objects after the transaction has terminated.
2913         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback): ditto.
2914
2915 2008-01-18  Adele Peterson  <adele@apple.com>
2916
2917         Reviewed by Antti.
2918
2919         Fix for <rdar://problem/5679490> media controls fade in and out too jerkily and too slowly
2920
2921         * rendering/RenderMedia.cpp: Shorten the duration for the fade in/out animation.
2922
2923 2008-01-18  Beth Dakin  <bdakin@apple.com>
2924
2925         Reviewed by Oliver.
2926
2927         Disables SVG foreign object for <rdar://problem/5686989> turn off 
2928         SVG foreignobject because it does not repaint/dirty correctly
2929
2930         * DerivedSources.make:
2931         * WebCore.SVG.ForeignObject.exp: Added.
2932         * WebCore.SVG.exp:
2933         * bindings/js/JSSVGElementWrapperFactory.cpp:
2934         (WebCore::createJSSVGWrapper):
2935         * rendering/RenderForeignObject.cpp:
2936         * rendering/RenderForeignObject.h:
2937         * svg/SVGForeignObjectElement.cpp:
2938         * svg/SVGForeignObjectElement.h:
2939         * svg/SVGForeignObjectElement.idl:
2940         * svg/SVGLocatable.cpp:
2941         (WebCore::SVGLocatable::nearestViewportElement):
2942         (WebCore::SVGLocatable::farthestViewportElement):
2943         * svg/SVGUseElement.cpp:
2944         (WebCore::isDisallowedElement):
2945         * svg/svgtags.in:
2946
2947 2008-01-18  Mark Rowe  <mrowe@apple.com>
2948
2949         Rubber-stamped by Adam Roben.
2950
2951         Fix mixed line endings in FileSystemWin.cpp and set svn:eol-style to native
2952         to try and keep them consistent in the future.
2953
2954         * platform/win/FileSystemWin.cpp:
2955         (WebCore::fileSize):
2956         (WebCore::fileExists):
2957         (WebCore::deleteFile):
2958         (WebCore::pathByAppendingComponent):
2959         (WebCore::fileSystemRepresentation):
2960         (WebCore::makeAllDirectories):
2961         (WebCore::homeDirectoryPath):
2962         (WebCore::bundleName):
2963         (WebCore::storageDirectory):
2964         (WebCore::cachedStorageDirectory):
2965
2966 2008-01-18  Antti Koivisto  <antti@apple.com>
2967
2968         Reviewed by Adam.
2969
2970         Fix unreachable code warning in RenderVideo on Windows.
2971         
2972         Make switch cases explicit.
2973
2974         * rendering/RenderImage.cpp:
2975         (WebCore::RenderImage::isWidthSpecified):
2976         (WebCore::RenderImage::isHeightSpecified):
2977         * rendering/RenderVideo.cpp:
2978         (WebCore::RenderVideo::isWidthSpecified):
2979         (WebCore::RenderVideo::isHeightSpecified):
2980
2981 2008-01-18  Timothy Hatcher  <timothy@apple.com>
2982
2983         Reviewed by Adam Roben.
2984
2985         <rdar://problem/5693558> REGRESSION (r29581): no form field focus
2986         rings and inactive text selection after loading a page
2987         Bug 16910: [GTK] REGRESSION: keyboard cursor doesn't blink
2988         Bug 16917: REGRESSION (r29581/2): Google Maps search box loses focused appearance
2989
2990         * page/FocusController.cpp:
2991         (WebCore::FocusController::setActive): Use focusedOrMainFrame() instead of focusedFrame()
2992         to call selectionController()->pageActivationChanged() for cases when the focusedFrame()
2993         has not been set yet. 
2994
2995 2008-01-18  Alexey Proskuryakov  <ap@webkit.org>
2996
2997         Reviewed by Brady.
2998
2999         Database origin tracking is broken.
3000
3001         * storage/DatabaseTracker.cpp: (WebCore::DatabaseTracker::populateOrigins):
3002         Move reading from statement back into the loop (broken in r29386).
3003
3004 2008-01-18  Marius Storm-Olsen  <marius@trolltech.com>
3005
3006         Reviewed by Simon Hausmann <hausmann@webkit.org>.
3007
3008         Add use of precompiled header, when building inside Qt.
3009         
3010         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.
3011         
3012
3013         * WebCore.pro:
3014
3015 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
3016
3017         Reviewed by Holger.
3018
3019         Fix fast/forms/button-state-restore.html
3020         
3021         Similar to the fix for fast/forms/form-post-urlencoded.html transform POST
3022         requests to data urls into GET.
3023         
3024
3025         * platform/network/qt/QNetworkReplyHandler.cpp:
3026         (WebCore::QNetworkReplyHandler::start):
3027
3028 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
3029
3030         Reviewed by Holger.
3031
3032         Fix LayoutTests/fast/cookies/local-file-can-set-cookies.html
3033         
3034         In WebCore::cookies() don't return the full raw form but only the name=value
3035         part. This fixes the getter part of the above test. The above test also
3036         requires a parsing fix in Qt 4.4's QNetworkCookie to fully pass.
3037         
3038
3039         * platform/qt/CookieJarQt.cpp:
3040         (WebCore::cookies):
3041
3042 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
3043
3044         Reviewed by Holger.
3045
3046         Fix svg/custom/path-getTotalLength.svg
3047         
3048         Path::apply creates a PathElement and its points array on the stack,
3049         to fill it in from the QPainterPath data and then use the platform
3050         independent path applier functions to calculate properties such as
3051         the length. For converting a QPainterPath::CurveToElement we need
3052         three points in the path element. However we allocated only two
3053         on the stack and as a result we got memory corruption and the
3054         failing test.
3055         
3056
3057         * platform/graphics/qt/PathQt.cpp:
3058         (WebCore::Path::apply):
3059
3060 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
3061
3062         Reviewed by Holger.
3063
3064         Fix LayoutTests/fast/dom/document-attribute-js-null.html
3065         
3066         Don't crash when trying to get/set cookies without a frameloader.
3067         
3068
3069         * platform/qt/CookieJarQt.cpp:
3070         (WebCore::setCookies):
3071         (WebCore::cookies):
3072
3073 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
3074
3075         Reviewed by Holger.
3076
3077         Fix fast/dom/xmlhttprequest-get.xhtml
3078         
3079         For local file requests remove the content length and the last-modified
3080         headers in the response.
3081         
3082
3083         * platform/network/qt/QNetworkReplyHandler.cpp:
3084         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
3085
3086 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
3087
3088         Reviewed by Holger.
3089
3090         Fix fast/forms/form-post-urlencoded.html.
3091         
3092         Post requests on files don't really make sense, but for
3093         fast/forms/form-post-urlencoded.html we still need to retrieve the file,
3094         which means we map it to a Get instead.
3095         
3096
3097         * platform/network/qt/QNetworkReplyHandler.cpp:
3098         (WebCore::QNetworkReplyHandler::start):
3099
3100 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
3101
3102         Reviewed by Holger.
3103
3104         Make QNetworkReplyHandler::abort() more robust against multiple invocations.
3105
3106         During DRT runs I see cancel() being called on the same handle multiple times. Guard
3107         against this a bit better by setting m_reply to 0 after we called abort() on it.
3108
3109         * platform/network/qt/QNetworkReplyHandler.cpp:
3110         (WebCore::QNetworkReplyHandler::abort):
3111
3112 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3113
3114         Reviewed by Simon.
3115
3116         * httpBody() can return 0 and other ports (cf/mac) check for this condition
3117         * Looking at the cf/mac implementation we might need to call setHTTPBody somewhere
3118         as well.
3119         
3120
3121         WARNING: NO TEST CASES ADDED OR CHANGED
3122
3123         * platform/network/qt/QNetworkReplyHandler.cpp:
3124         (WebCore::QNetworkReplyHandler::start):
3125
3126 2008-01-18  Prasanth Ullattil  <prasanth.ullattil@trolltech.com>
3127
3128         Reviewed by Simon Hausmann <hausmann@webkit.org>.
3129
3130         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.
3131
3132         * xml/XPathFunctions.cpp:
3133         (WebCore::XPath::FunCount::evaluate):
3134
3135 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3136
3137         Reviewed by Simon.
3138
3139         * Remove our windowClipRect reimplementation and instead have our own
3140         Widget::invalidate implementation that is invalidating
3141         IntRect(0, 0, width(), height()) without trying to clip it (in contrast
3142         to Widget::invalidateRect)
3143
3144         * platform/qt/PlatformScrollBar.h:
3145         * platform/qt/PlatformScrollBarQt.cpp:
3146         (WebCore::PlatformScrollbar::invalidate):
3147
3148 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3149
3150         Reviewed by Simon.
3151
3152         * Change the coordinate transformation in the PlatformMouseEvent handlers
3153         * We want to convert from coordinates of the containing window to our local
3154         position on the scrollbar.
3155
3156         * platform/qt/PlatformScrollBarQt.cpp:
3157         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
3158         (WebCore::PlatformScrollbar::handleMousePressEvent):
3159
3160 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3161
3162         Reviewed by Simon.
3163
3164         * Make the qDebug more usable. Do not have an additional newline and print
3165         the untranslated coordinates as well.
3166
3167         * platform/qt/PlatformScrollBarQt.cpp:
3168         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
3169         (WebCore::PlatformScrollbar::handleMousePressEvent):
3170
3171 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3172
3173         Reviewed by Simon.
3174
3175         * Dead code, remove it
3176
3177         * platform/qt/PlatformScrollBarQt.cpp:
3178
3179 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3180
3181         Reviewed by Simon.
3182
3183         * Coding-Style fixes.
3184
3185         * platform/qt/PlatformScrollBarQt.cpp:
3186         (WebCore::PlatformScrollbar::PlatformScrollbar):
3187
3188 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3189
3190         Reviewed by Simon.
3191
3192         * Coding-Style fix
3193
3194         * platform/graphics/qt/ImageDecoderQt.cpp:
3195         (WebCore::ImageDecoderQt::ReadContext::ReadContext):
3196
3197 2008-01-17  Geoffrey Garen  <ggaren@apple.com>
3198
3199         Reviewed by Darin Adler.
3200
3201         Fixed: lots of WebCore leaks reported when quitting Safari
3202         
3203         If we're quitting with a GC still scheduled, do the GC before quitting.
3204         That way, WebCore's leak counters won't count objects that were
3205         scheduled for GC.
3206
3207         * bindings/js/GCController.cpp:
3208         (WebCore::GCController::~GCController):
3209         (WebCore::GCController::garbageCollectNow):
3210         * bindings/js/GCController.h:
3211
3212 2008-01-17  Alp Toker  <alp@atoker.com>
3213
3214         Reviewed by Oliver Hunt.
3215
3216         gdk_screen_get_font_options() returns NULL if no default options are
3217         set so we always have to NULL check to avoid crashes later on since
3218         Cairo doesn't accept NULL font options.
3219
3220         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
3221         (WebCore::FontPlatformData::FontPlatformData):
3222
3223 2008-01-17  Antti Koivisto  <antti@apple.com>
3224
3225         Reviewed by Adele.
3226
3227         Windows fix for <rdar://problem/5605682>
3228         Disallow streaming protocols for media elements
3229         and <rdar://problem/5668711>
3230         Limit the container and codec types that the <video> tag supports
3231         
3232         - Disable unsupported QuickTime tracks types. 
3233         - Disallow streaming protocols (for now).
3234
3235         * WebCore.vcproj/WebCore.vcproj:
3236         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
3237         (WebCore::MediaPlayerPrivate::updateStates):
3238         * platform/graphics/win/QTMovieWin.cpp:
3239         (QTMovieWin::load):
3240         (QTMovieWin::disableUnsupportedTracks):
3241         * platform/graphics/win/QTMovieWin.h:
3242
3243 2008-01-17  Oliver Hunt  <oliver@apple.com>
3244
3245         Support smart copy and paste during drag and drop
3246         
3247         Reviewed by Alice
3248         
3249         In order for the drag and drop tests in Windows DRT to pass
3250         we need to support smart cut and paste operations during
3251         drag and drop on windows.
3252         
3253         There is no layout test as drag and drop is still unsupported
3254         on windows.  Once supported smart drag/drop is tested by existing
3255         tests
3256
3257         * platform/win/ClipboardUtilitiesWin.cpp:
3258         (WebCore::smartPasteFormat):
3259         * platform/win/ClipboardUtilitiesWin.h:
3260         * platform/win/ClipboardWin.cpp:
3261         (WebCore::ClipboardWin::writeRange):
3262         * platform/win/DragDataWin.cpp:
3263
3264 2008-01-17  Oliver Hunt  <oliver@apple.com>
3265
3266         Reviewed by Anders.
3267
3268         <rdar://problem/5692940> Crash when attempting to get text properties in
3269         SVG with no renderer
3270
3271         We use the element renderer to calculate the text element bounds,
3272         however there was no check against the possibility of the text dimension
3273         properties being requested on a element with no renderer (eg. unattached, 
3274         display: none).
3275
3276         Test: svg/text/text-property-with-display-none.html
3277
3278         * svg/SVGTextContentElement.cpp:
3279         (WebCore::rootInlineBoxForTextContentElement):
3280
3281 2008-01-17  Anders Carlsson  <andersca@apple.com>
3282
3283         Reviewed by Oliver.
3284
3285         <rdar://problem/5636742>
3286         CrashTracer: [USER] 1302 crashes in Safari at com.apple.WebCore: WTF::Vector<char, 0ul>::reserveCapacity + 78
3287         
3288         When loading full-frame plug-ins, disable buffering data for the main resource loader. Otherwise, this can cause us
3289         to crash when loading large files such as movies in the browser. We already do this for embedded plug-ins.
3290         
3291         * WebCore.base.exp:
3292         * loader/DocumentLoader.h:
3293         (WebCore::DocumentLoader::mainResourceLoader):
3294         New accessor method.
3295         
3296         * loader/PluginDocument.cpp:
3297         (WebCore::PluginTokenizer::writeRawData):
3298         Disable buffering for the main resource loader.
3299         
3300         * loader/ResourceLoader.cpp:
3301         (WebCore::ResourceLoader::setShouldBufferData):
3302         * loader/ResourceLoader.h:
3303         Have this free the buffer when disabling buffering.
3304
3305 2008-01-17  Adam Roben  <aroben@apple.com>
3306
3307         More Qt/GTK+ build fixing.
3308
3309         * platform/gtk/ScrollViewGtk.cpp:
3310         * platform/qt/ScrollViewQt.cpp:
3311
3312 2008-01-17  Alexey Proskuryakov  <ap@webkit.org>
3313
3314         Reviewed by Darin.
3315
3316         http://bugs.webkit.org/show_bug.cgi?id=16902
3317         <rdar://problem/5692566> fast/encoding/mailto-always-utf-8.html fails when run after
3318         fast/dom/Window/window-property-shadowing.html
3319
3320         Test: fast/dom/Window/window-property-shadowing_.html
3321
3322         * loader/FrameLoader.cpp: (WebCore::FrameLoader::clear): Clear the frame name, too.
3323
3324 2008-01-17  Adam Roben  <aroben@apple.com>
3325
3326         Qt/GTK+ build fix.
3327
3328         * platform/gtk/ScrollViewGtk.cpp:
3329         (WebCore::ScrollView::ScrollViewPrivate::isActive):
3330         * platform/qt/ScrollViewQt.cpp:
3331         (WebCore::ScrollView::ScrollViewPrivate::isActive):
3332
3333 2008-01-16  Adam Roben  <aroben@apple.com>
3334
3335         Update scroll bars/form controls when FocusController::isActive changes
3336
3337         Part of <rdar://5006915> Inactive look for Aqua controls
3338
3339         Reviewed by Darin.
3340
3341         All tests pass.
3342
3343         * page/FocusController.cpp:
3344         (WebCore::FocusController::setActive): Update control tints when the
3345         active state changes.
3346         * page/FrameView.cpp:
3347         (WebCore::FrameView::updateControlTints): On Windows, we have to ask
3348         ScrollView to paint so that the outermost scroll bars will paint. On
3349         Mac, the outermost scroll bars are taken care of by NSScroller.
3350         * platform/PopupMenu.h: Updated for ScrollBarClient changes.
3351         * platform/ScrollBar.h: Added a new ScrollBarClient method.
3352         * platform/win/PlatformScrollBarSafari.cpp:
3353         (WebCore::PlatformScrollbar::paint): Invalidate when updating control
3354         tints so that we can paint with the new tint later.
3355         (WebCore::PlatformScrollbar::paintButton): Pass the active state down
3356         to SafariTheme.
3357         (WebCore::PlatformScrollbar::paintTrack): Ditto.
3358         (WebCore::PlatformScrollbar::paintThumb): Ditto.
3359         * platform/win/ScrollViewWin.cpp:
3360         (WebCore::ScrollView::ScrollViewPrivate::isActive): Added.
3361         (WebCore::ScrollView::paint): Pass paint calls on down if we're
3362         updating control tints so the scroll bars can invalidate.
3363         * rendering/RenderLayer.cpp:
3364         (WebCore::RenderLayer::isActive): Added.
3365         * rendering/RenderLayer.h:
3366         * rendering/RenderListBox.cpp:
3367         (WebCore::RenderListBox::isActive): Added.
3368         * rendering/RenderListBox.h:
3369         * rendering/RenderTheme.cpp:
3370         (WebCore::RenderTheme::isActive): Added.
3371         * rendering/RenderTheme.h:
3372         * rendering/RenderThemeSafari.cpp:
3373         (WebCore::RenderThemeSafari::determineState): Pass the active state
3374         down to SafariTheme.
3375
3376 2008-01-16  Adam Roben  <aroben@apple.com>
3377
3378         Move focused/active state from Frame to SelectionController/FocusController
3379
3380         This is the first part of <rdar://5006915> Inactive look for Aqua
3381         controls.
3382
3383         The following methods were moved/renamed:
3384             - Frame::setIsActive -> FocusController::setActive
3385             - Frame::isActive -> SelectionController::isActiveAndFocused
3386             - Frame::setWindowHasFocus -> SelectionController::setFocused
3387
3388         Active state is now correctly a Page-level concept.
3389
3390         The Mac parts of this patch were written by Darin.
3391
3392         Reviewed by Darin.
3393
3394         All tests pass.
3395
3396         * WebCore.base.exp: Updated for method renames.
3397         * css/CSSStyleSelector.cpp:
3398         (WebCore::CSSStyleSelector::checkOneSelector): Ditto.
3399         * editing/SelectionController.cpp:
3400         (WebCore::SelectionController::SelectionController): Initialize new
3401         member.
3402         (WebCore::SelectionController::focusedOrActiveStateChanged): New
3403         private method. Most of this code came from Frame::setIsActive.
3404         (WebCore::SelectionController::pageActivationChanged): Added.
3405         (WebCore::SelectionController::setFocused): Added. Replaces
3406         Frame::setWindowHasFocus.
3407         (WebCore::SelectionController::isFocusedAndActive): Added. Replaces
3408         Frame::isActive.
3409         * editing/SelectionController.h:
3410         * page/FocusController.cpp:
3411         (WebCore::FocusController::FocusController): Initialize new member.
3412         (WebCore::FocusController::setFocusedFrame): Changed to just call
3413         SelectionController::setFocused, since active state has doesn't change
3414         when the focused frame changes.
3415         (WebCore::FocusController::setActive): Added. Replaces
3416         Frame::setIsActive.
3417         * page/FocusController.h:
3418         (WebCore::FocusController::isActive): Added.
3419         * page/Frame.cpp:
3420         (WebCore::Frame::setDocument): Updated for method renames.
3421         (WebCore::Frame::setFocusedNodeIfNeeded): Ditto.
3422         (WebCore::Frame::updateSecureKeyboardEntryIfActive): Ditto.
3423         (WebCore::FramePrivate::FramePrivate): Removed initialization of
3424         removed members.
3425         * page/Frame.h:
3426         * page/FramePrivate.h:
3427         * page/mac/WebCoreFrameBridge.h: Removed -selectionColor.
3428         * page/mac/WebCoreFrameBridge.mm: Ditto.
3429         * rendering/RenderListBox.cpp:
3430         (WebCore::RenderListBox::paintItemForeground): Updated for method
3431         renames.
3432         (WebCore::RenderListBox::paintItemBackground): Ditto.
3433         * rendering/RenderObject.cpp:
3434         (WebCore::RenderObject::selectionBackgroundColor): Ditto.
3435         (WebCore::RenderObject::selectionForegroundColor): Ditto.
3436         * rendering/RenderTextControl.cpp:
3437         (WebCore::RenderTextControl::capsLockStateMayHaveChanged): Ditto.
3438         * rendering/RenderTheme.cpp:
3439         (WebCore::RenderTheme::isFocused): Ditto.
3440
3441 2008-01-17  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3442
3443         Reviewed by Simon.
3444
3445         * Make the nice 'safari' feature work on our port. When viewing a single image, clicking
3446         on the image will zoom it.
3447         * It seems like our platform can only determine the size of the image once it is completely
3448         loaded. Call m_doc->imageChanged on the last chunk of data as well.
3449
3450         * loader/ImageDocument.cpp:
3451         (WebCore::ImageTokenizer::finish):
3452
3453 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
3454
3455         Reviewed by Lars.
3456
3457         Set the library version of QtWebKit to the Qt version.
3458
3459         * WebCore.pro:
3460
3461 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
3462
3463         Reviewed by Holger.
3464
3465         Re-enable gzip compression as accepted encoding, now that the bug is fixed in Qt 4.4's network module.
3466
3467         * platform/network/qt/QNetworkReplyHandler.cpp:
3468         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
3469
3470 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
3471
3472         Another Windows build fix, setCookies accidentially had a const
3473         Document pointer.
3474
3475         * platform/network/win/CookieJarWin.cpp:
3476
3477 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
3478
3479         MSVC Windows build fix. Forward declaring Document in CookieJar.h
3480         seems not enough for MSVC.
3481
3482         * platform/network/win/CookieJarWin.cpp:
3483
3484 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
3485
3486         Reviewed by Maciej, Lars, Holger.
3487
3488         http://bugs.webkit.org/show_bug.cgi?id=16589
3489
3490         Add a document parameter to WebCore::cookies, setCookies and cookiesEnabled.
3491
3492         * WebCore.pro:
3493         * bindings/js/kjs_navigator.cpp:
3494         (KJS::Navigator::getValueProperty):
3495         * dom/Document.cpp:
3496         (WebCore::Document::cookie):
3497         * platform/CookieJar.h:
3498         * platform/gtk/CookieJarGtk.cpp:
3499         (WebCore::setCookies):
3500         (WebCore::cookies):
3501         * platform/mac/CookieJar.mm:
3502         * platform/network/win/CookieJarWin.cpp:
3503         * platform/qt/CookieJarQt.cpp:
3504         (WebCore::setCookies):
3505         (WebCore::cookies):
3506         (WebCore::cookiesEnabled):
3507         * platform/wx/TemporaryLinkStubs.cpp:
3508
3509 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
3510
3511         Reviewed by Holger.
3512
3513         Windows build fix. (use localtime_r again instead of _s)
3514
3515         * loader/FTPDirectoryDocument.cpp:
3516         (WebCore::processFileDateString):
3517
3518 2008-01-17  Frans Englich  <fenglich@trolltech.com>
3519
3520         Reviewed by Simon Hausmann <hausmann@webkit.org>.
3521
3522         Fix linking on MinGW and at least one MSVC platform by having gmtimeQt in the correct namespace.
3523
3524         * loader/FTPDirectoryDocument.cpp:
3525
3526 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
3527
3528         Reviewed by Holger.
3529
3530         Don't link QtWebKit against libQtXml when building against Qt 4.4.
3531
3532         This is not necessary anymore since QXmlStream has been moved into QtCore.
3533
3534         * WebCore.pro:
3535
3536 2008-01-17  Håvard Wall  <hwall@trolltech.com>
3537
3538         Reviewed by Simon Hausmann <hausmann@webkit.org>.
3539
3540         Fix compilation on arm
3541
3542         * platform/graphics/qt/GraphicsContextQt.cpp:
3543         (WebCore::GraphicsContext::endTransparencyLayer):
3544
3545 2008-01-17  Simon Hausmann  <shausman@trolltech.com>
3546
3547         Reviewed by Holger.
3548
3549         Fix compilation against Qt 4.4 without files that are specific for the Qt 4.3 build.
3550
3551         * WebCore.pro:
3552         * platform/network/qt/ResourceHandleQt.cpp:
3553         * platform/qt/MIMETypeRegistryQt.cpp:
3554         * platform/qt/PlugInInfoStoreQt.cpp:
3555
3556 2008-01-17  Frans Englich  <fenglich@trolltech.com>
3557
3558         Reviewed by Simon Hausmann <hausmann@webkit.org>.
3559
3560         Fixes compilation with MinGW.
3561         Neither localtime_r nor localtime_s are available on MingW, so instead of
3562         calling back to the thread-unsafe localtime use QDateTime instead.
3563
3564         * loader/FTPDirectoryDocument.cpp:
3565         (WebCore::FTPDirectoryTokenizer::WebCore::processFilesizeString):
3566         (WebCore::FTPDirectoryTokenizer::WebCore::wasLastDayOfMonth):
3567         (WebCore::FTPDirectoryTokenizer::WebCore::WebCore::gmtimeQt):
3568         * loader/FTPDirectoryParser.cpp:
3569         (WebCore::parseOneFTPLine):
3570
3571 2008-01-17  Dan Bernstein  <mitz@apple.com>
3572
3573         Reviewed by Dave Hyatt.
3574
3575         - fix determinePitch for segmented fonts
3576
3577         Covered by fast/css/font-face-implicit-local-font.html
3578
3579         * platform/graphics/FontFallbackList.cpp:
3580         (WebCore::FontFallbackList::determinePitch): If the primary font is
3581         segmented, treat as fixed pitch only if it has only one segment
3582         and that segment is fixed-pitch.
3583
3584 2008-01-16  David Hyatt  <hyatt@apple.com>
3585
3586         Fix for http://bugs.webkit.org/show_bug.cgi?id=16611
3587
3588         Make sure vertical-align length values are offset from their parents rather than being absolute to the
3589         line.
3590
3591         Reviewed by olliej
3592
3593         Added fast/css/vertical-align-lengths.html
3594
3595         * re