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