top level:
[WebKit-https.git] / WebCore / ChangeLog
1 2007-07-11  Holger Hans Peter Freyther  <zecke@selfish.org>
2
3         Reviewed by Darin.
4
5         As of http://bugs.webkit.org/show_bug.cgi?id=14527 move the
6         WebCore/ForwardingHeader/JavaScriptCore to JavaScriptCore
7
8         * ForwardingHeaders/JavaScriptCore: Removed.
9         * ForwardingHeaders/JavaScriptCore/APICast.h: Removed.
10         * ForwardingHeaders/JavaScriptCore/JSBase.h: Removed.
11         * ForwardingHeaders/JavaScriptCore/JSContextRef.h: Removed.
12         * ForwardingHeaders/JavaScriptCore/JSLock.h: Removed.
13         * ForwardingHeaders/JavaScriptCore/JSObjectRef.h: Removed.
14         * ForwardingHeaders/JavaScriptCore/JSStringRef.h: Removed.
15         * ForwardingHeaders/JavaScriptCore/JSStringRefCF.h: Removed.
16         * ForwardingHeaders/JavaScriptCore/JSValueRef.h: Removed.
17         * ForwardingHeaders/JavaScriptCore/JavaScriptCore.h: Removed.
18
19 2007-07-11  Anders Carlsson  <andersca@apple.com>
20
21         Fix build.
22         
23         * platform/network/cf/ResourceHandleCFNet.cpp:
24         (WebCore::willSendRequest):
25         (WebCore::didReceiveResponse):
26         (WebCore::didReceiveData):
27         (WebCore::didFinishLoading):
28         (WebCore::didFail):
29         (WebCore::didReceiveChallenge):
30
31 2007-07-12  George Staikos  <staikos@kde.org>
32
33         Repair the build.
34
35         * platform/network/qt/ResourceHandleQt.cpp:
36         (WebCore::ResourceHandle::start):
37
38 2007-07-11  Adele Peterson  <adele@apple.com>
39
40         Reviewed by Darin.
41
42         Fix for <rdar://problem/5230188> REGRESSION: Active/inactive marked text is not distinguished in textfields and textareas
43
44         We were previously trying to leave room for 1px of space between the text and the underline.
45         This change removes that requirement so that if we don't have room for the extra space, we still draw the thick underline
46         touching the text.
47
48         * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintMarkedTextUnderline):
49
50 2007-07-11  Anders Carlsson  <andersca@apple.com>
51
52         Reviewed by Darin and Geoff.
53
54         <rdar://problem/5313508>
55         REGRESSION (Leopard): http/tests/xmlhttprequest/basic-auth.html hangs
56         
57         Leopard Foundation now ignores credentials passed in as part of the URL so we need to pass them ourselves.
58         
59         For the asynchronous case, we simply keep track of the URL and if it has a user name and password, we
60         pass those if we're asked to authenticate.
61                 
62         For the synchronous case, implement a new connection delegate and run it in a separate mode so 
63         no other sources will fire.
64
65         * platform/network/mac/ResourceHandleMac.mm:
66         (WebCore::ResourceHandle::loadResourceSynchronously):
67         (-[WebCoreResourceHandleAsDelegate dealloc]):
68         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
69         (-[WebCoreResourceHandleAsDelegate connection:didReceiveAuthenticationChallenge:]):
70         (-[WebCoreSynchronousLoader _isDone]):
71         (-[WebCoreSynchronousLoader dealloc]):
72         (-[WebCoreSynchronousLoader connection:willSendRequest:redirectResponse:]):
73         (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]):
74         (-[WebCoreSynchronousLoader connection:didReceiveResponse:]):
75         (-[WebCoreSynchronousLoader connection:didReceiveData:]):
76         (-[WebCoreSynchronousLoader connectionDidFinishLoading:]):
77         (-[WebCoreSynchronousLoader connection:didFailWithError:]):
78         (-[WebCoreSynchronousLoader _data]):
79         (-[WebCoreSynchronousLoader _response]):
80         (-[WebCoreSynchronousLoader _error]):
81         (+[WebCoreSynchronousLoader loadRequest:returningResponse:error:]):
82
83 2007-07-11  Darin Adler  <darin@apple.com>
84
85         Reviewed by Sam Weinig.
86
87         - fix <rdar://problem/5315265> REGRESSION: Leopard launch time -
88           there are about 190 stats of icudt36b files during launch
89
90         * platform/TextEncodingRegistry.cpp: (WebCore::atomicCanonicalTextEncodingName):
91         Add a special case for the empty string so we don't load the extended text
92         encodings just so we can return 0 for that case.
93
94 2007-07-11  Anders Carlsson  <andersca@apple.com>
95
96         Reviewed by Darin.
97
98         Remove a bunch of unneeded accessors from ResourceHandle.
99         
100         * loader/icon/IconLoader.cpp:
101         (WebCore::IconLoader::didReceiveResponse):
102         (WebCore::IconLoader::didFail):
103         (WebCore::IconLoader::didFinishLoading):
104         * platform/network/ResourceHandle.cpp:
105         * platform/network/ResourceHandle.h:
106
107 2007-07-09  Justin Garcia  <justin.garcia@apple.com>
108
109         Reviewed by Darin.
110         
111         <rdar://problem/5234383> REGRESSION: Sentence breaker method returning entire document length
112         
113         The functions for moving the caret to the next/previous sentence boundary
114         were in many cases moving to the beginning/end of the document.  The functions that 
115         should move the caret to an equivalent position in the next/previous sentence behaved
116         like the aforementioned functions ought to.  Put the code from the second two functions
117         in the first and made sure that the second two are properly FIXMEd.  They're rarely 
118         used (filed 5323691).
119         
120         * editing/SelectionController.cpp:
121         (WebCore::SelectionController::modify): Added an option for sentenceBoundary granularity,
122         so that we can test the functions that were broken from JS.
123         * editing/visible_units.cpp:
124         (WebCore::startOfSentence): Removed the FIXME about 5234383.
125         (WebCore::endSentenceBoundary): Make this function do what nextSentencePositionBoundary
126         current does.
127         (WebCore::endOfSentence): Removed the FIXME about 5234383.
128         (WebCore::previousSentencePosition): Removed an incorrect FIXME.
129         (WebCore::nextSentencePositionBoundary): Tweaked FIXME.  This function is
130         identical, not close to endSentenceBoundary.
131         (WebCore::nextSentencePosition): Removed an incorrect FIXME.
132
133 2007-07-11  Rob Buis  <buis@kde.org>
134
135         Reviewed by Darin.
136
137         http://bugs.webkit.org/show_bug.cgi?id=14453
138         REGRESSION: www.nzherald.co.nz almost all the formating is gone
139  
140         Be less strict for the hex color definition.
141
142         * css/CSSGrammar.y:
143         * css/cssparser.cpp:
144         (WebCore::CSSParser::lex):
145         (WebCore::CSSParser::text):
146         * css/tokenizer.flex:
147
148 2007-07-11  Rob Buis  <buis@kde.org>
149
150         Reviewed by Oliver.
151
152         Forgot to commit this as part of commit r24146. Now we are sure
153         createElement creates elements in the xhtml namespace only.
154
155         * ksvg2/svg/SVGDocument.cpp:
156         * ksvg2/svg/SVGDocument.h:
157
158 2007-07-10  Sam Weinig  <sam@webkit.org>
159
160         Reviewed by Oliver.
161
162         Move more attributes from the pure JS bindings in KJS::Window
163         to the implementation in DOMWindow and autogenerate the new bindings
164
165         Test: fast/dom/Window/get-set-properties.html
166
167         * bindings/js/JSDOMWindowCustom.cpp:
168         (WebCore::JSDOMWindow::customGetOwnPropertySlot): Change to use propHashTable in
169         JSDOMWindow instead of KJS::Window
170         * bindings/js/kjs_window.cpp:
171         (KJS::Window::getValueProperty):
172         (KJS::Window::put):
173         * bindings/js/kjs_window.h:
174         (KJS::Window::):
175         * bindings/scripts/CodeGeneratorJS.pm: Cleanup getValueProperty and put generation
176         to reduce code duplication. 
177         * page/DOMWindow.cpp:
178         (WebCore::DOMWindow::closed):
179         (WebCore::DOMWindow::length):
180         (WebCore::DOMWindow::name):
181         (WebCore::DOMWindow::setName):
182         (WebCore::DOMWindow::status):
183         (WebCore::DOMWindow::setStatus):
184         (WebCore::DOMWindow::defaultStatus):
185         (WebCore::DOMWindow::setDefaultStatus):
186         * page/DOMWindow.h:
187         (WebCore::DOMWindow::defaultstatus):
188         (WebCore::DOMWindow::setDefaultstatus):
189         * page/DOMWindow.idl:
190
191 2007-07-10  Sam Weinig  <sam@webkit.org>
192
193         Reviewed by Geoff.
194
195         Fix for <rdar://problem/5326791> XSS vulnerability: ability to set window.defaultStatus,
196         window.defaultstatus and window.status cross domains
197
198         Test: http/tests/security/cross-frame-access-put.html
199
200         * bindings/js/kjs_window.cpp:
201         (KJS::Window::put): Adds isSafeScript check for defaultStatus,
202         defaultstatus and status cases.
203
204 2007-07-10  Sam Weinig  <sam@webkit.org>
205
206         Fix build for BuildBot.
207
208         * page/DOMWindow.cpp:
209         (WebCore::DOMWindow::outerHeight):
210         (WebCore::DOMWindow::outerWidth):
211         (WebCore::DOMWindow::screenX):
212         (WebCore::DOMWindow::screenY):
213
214 2007-07-10  Brady Eidson  <beidson@apple.com>
215
216         Reviewed by Sam
217
218         <rdar://problem/5326653> - REGRESSION: [WebBackForwardList forwardListCount] might return incorrect result
219
220         No layout test because this is an API issue that can't be tested in DRT or the browser
221
222         * history/BackForwardList.cpp:
223         (WebCore::BackForwardList::forwardListCount): If the index is NoCurrentItemIndex, return 0
224
225 2007-07-10  Sam Weinig  <sam@webkit.org>
226
227         Reviewed by Darin.
228
229         Move more readonly attributes from pure JS bindings in KJS::Window
230         to the implementation in DOMWindow and autogenerate the new bindings.
231
232         * bindings/js/kjs_window.cpp:
233         (KJS::Window::getValueProperty):  Sort the hashmap comment into categories
234         to make further migration easier.
235         * bindings/js/kjs_window.h: Sort the enum into categories to make further
236         migration easier.
237         (KJS::Window::):
238         * page/DOMWindow.cpp: Add new methods.
239         (WebCore::DOMWindow::focus):
240         (WebCore::DOMWindow::blur):
241         (WebCore::DOMWindow::offscreenBuffering):
242         (WebCore::DOMWindow::outerHeight):
243         (WebCore::DOMWindow::outerWidth):
244         (WebCore::DOMWindow::innerHeight):
245         (WebCore::DOMWindow::innerWidth):
246         (WebCore::DOMWindow::screenX):
247         (WebCore::DOMWindow::screenY):
248         (WebCore::DOMWindow::scrollX):
249         (WebCore::DOMWindow::scrollY):
250         (WebCore::DOMWindow::getComputedStyle):
251         (WebCore::DOMWindow::getMatchedCSSRules): Add null Document assertion.
252         (WebCore::DOMWindow::devicePixelRatio): Add null Frame and Page checks.
253         * page/DOMWindow.h:
254         (WebCore::DOMWindow::screenLeft):
255         (WebCore::DOMWindow::screenTop):
256         (WebCore::DOMWindow::pageXOffset):
257         (WebCore::DOMWindow::pageYOffset):
258         * page/DOMWindow.idl:
259
260 2007-07-10  Oliver Hunt  <oliver@apple.com>
261
262         Reviewed by Maciej.
263
264         Fix for <rdar://problem/5326417> Editor::unmarkText needs to be crossplatform
265
266         Missed this in earlier patch to make text marking platform independent.
267
268         * editing/Editor.cpp:
269         (WebCore::Editor::unmarkText):
270            Add platform independent impl
271         * editing/mac/EditorMac.mm:
272            Remove the old mac path.
273
274 2007-07-10  Geoffrey Garen  <ggaren@apple.com>
275
276         Reviewed by Tim Hatcher.
277
278         Added a Page counter. This helped me while investigating 
279         <rdar://problem/5314463> 40MB of WebKit memory still allocated after 
280         closing large email in Mail
281
282         * WebCore.xcodeproj/project.pbxproj:
283         * page/Page.cpp:
284         (WebCore::):
285         (WebCore::PageCounter::~PageCounter):
286         (WebCore::Page::Page):
287         (WebCore::Page::~Page):
288
289 2007-07-10  Timothy Hatcher  <timothy@apple.com>
290
291         Reviewed by Geoff.
292
293         <rdar://problem/5326126> InspectorResource holds onto more data than it needs
294
295         Reduces the fixed size of InspectorResource from 630 bytes to 224 bytes. Now
296         selectively pick out parts of the ResourceRequest and ResourceResponse objects
297         for the info needed and store that directly in InspectorResource.
298
299         The ResourceRequest and ResourceResponse objects hold a reference to the original
300         NSURL object, so almost double the data was being kept around. So the struct size
301         reduction is just the tip of the ice burg on what this really saves.
302
303         In a test of 100,000 XMLHTTPRequests using a 85 byte long data URL, I see ~21 MB less
304         RSIZE compared to Safari running without this change.
305
306         * page/InspectorController.cpp:
307         (WebCore::InspectorResource::InspectorResource):
308         (WebCore::InspectorResource::type):
309         (WebCore::addSourceToFrame):
310         (WebCore::scriptObjectForRequest):
311         (WebCore::scriptObjectForResponse):
312         (WebCore::InspectorController::addScriptResource):
313         (WebCore::InspectorController::addAndUpdateScriptResource):
314         (WebCore::updateResourceRequest):
315         (WebCore::updateResourceResponse):
316         (WebCore::InspectorController::updateScriptResourceRequest):
317         (WebCore::InspectorController::updateScriptResourceResponse):
318         (WebCore::InspectorController::didLoadResourceFromMemoryCache):
319         (WebCore::InspectorController::identifierForInitialRequest):
320         (WebCore::InspectorController::willSendRequest):
321         (WebCore::InspectorController::didReceiveResponse):
322         (WebCore::InspectorController::didFailLoading):
323         * page/InspectorController.h:
324
325 2007-07-10  Darin Adler  <darin@apple.com>
326
327         Reviewed by Brady.
328
329         - fix crash introduced by my patch for 5318732, only seen in release builds
330
331         * page/Page.cpp: (WebCore::Page::~Page): Added a missing null check.
332
333 2007-07-10  Andrea Cavalli  <amc82@cam.ac.uk>
334
335         Reviewed by George Staikos.
336
337         Fixed render theme for text field.
338
339         * platform/qt/RenderThemeQt.cpp:
340         (WebCore::RenderThemeQt::paintTextField):
341
342 2007-07-10  Qing Zhao  <qing@staikos.net>
343
344         Reviewed by George Staikos.
345
346         Draw focus rings for nodes that are not rendered by QStyle.
347
348         * platform/graphics/qt/GraphicsContextQt.cpp:
349         (WebCore::focusRingColor):
350         (WebCore::GraphicsContext::drawFocusRing):
351         * platform/qt/RenderThemeQt.cpp:
352         (WebCore::RenderThemeQt::supportsFocusRing):
353         (WebCore::RenderThemeQt::supportsFocus):
354
355 2007-07-10  Nikolas Zimmermann  <zimmermann@kde.org>
356
357         Reviewed by Geoff.
358
359         Fix 'unsigned int' overflow in CodeGeneratorJS.pm.
360         This fixes hashing of "SVG_FEBLEND_MODE_NORMAL". Its hashvalue exceeded 2^32, which
361         is no problem in perl but in the cpp code. Emulate C/C++ behaviour by using "% 2^32" in
362         the perl code. Testcase available in feature-branch soon (js-svg-constructors.svg).
363
364         * bindings/scripts/CodeGeneratorJS.pm:
365
366 2007-07-10  Geoffrey Garen  <ggaren@apple.com>
367
368         Reviewed by Maciej Stachowiak.
369
370         Disabled Arena recycling in RenderArena. PLT shows no regression 
371         (possibly a small speedup), and this can reduce allocated memory in 
372         WebKit clients by about 120K (4K per Arena * 30 Arenas).
373         
374         I happened upon this optimization while investigating 
375         <rdar://problem/5314463> WebKit hangs on to 40MB RAM after closing 
376         large email in Mail (appears to be render tree arena allocator), 
377         although I don't think it will come close to fixing that bug 
378         completely.
379
380         * rendering/RenderArena.cpp:
381         (WebCore::RenderArena::~RenderArena): Use FinishArenaPool, which frees
382         the ArenaPool's Arenas immediately.
383
384 2007-07-10  Mitz Pettel  <mitz@webkit.org>
385
386         Reviewed by Hyatt.
387
388         - fix http://bugs.webkit.org/show_bug.cgi?id=14449
389           REGRESSION (r14345-r14375): Absolutely positioned image does not scale to containing element's height
390
391         Test: fast/replaced/absolute-position-percentage-height.html
392
393         * rendering/RenderBox.cpp:
394         (WebCore::RenderBox::calcReplacedHeightUsing): For positioned elements, evaluate
395         the percentage with respect to the container's final height.
396
397 2007-07-10  Brady Eidson  <beidson@apple.com>
398
399         Reviewed by Mark Rowe
400
401         Add 64-bit integer converters to our string classes for future work
402
403         * platform/DeprecatedString.cpp:
404         (WebCore::DeprecatedString::toInt64):
405         (WebCore::DeprecatedString::toUInt64):
406         * platform/DeprecatedString.h:
407
408         * platform/PlatformString.h:
409         * platform/String.cpp:
410         (WebCore::String::toInt64):
411         (WebCore::String::toUInt64):
412
413         * platform/StringImpl.cpp:
414         (WebCore::StringImpl::toInt64):
415         (WebCore::StringImpl::toUInt64):
416         * platform/StringImpl.h:
417
418 2007-07-10  Darin Adler  <darin@apple.com>
419
420         Reviewed by Anders.
421
422         - fix <rdar://problem/5318732> REGRESSION: In Mail, a crash occurs when attempting to send
423           a HTML based message (nytimes.com, washingtonpost.com, latimes.com)
424
425         Did an audit of calls to get the inspector and most other uses of Page* and added null
426         checks since Frame* can outlast its Page*.
427
428         * loader/FrameLoader.cpp:
429         (WebCore::FrameLoader::createWindow): Added null check.
430         (WebCore::FrameLoader::loadSubframe): Ditto.
431         (WebCore::FrameLoader::load): Ditto.
432         (WebCore::FrameLoader::transitionToCommitted): Ditto.
433         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Ditto.
434         (WebCore::FrameLoader::continueLoadAfterWillSubmitForm): Ditto.
435         (WebCore::FrameLoader::addExtraFieldsToRequest): Ditto.
436         (WebCore::FrameLoader::loadResourceSynchronously): Ditto.
437         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Ditto.
438         (WebCore::FrameLoader::requestFromDelegate): Ditto.
439         (WebCore::FrameLoader::canGoBackOrForward): Ditto.
440         (WebCore::FrameLoader::getHistoryLength): Ditto.
441         (WebCore::FrameLoader::historyURL): Ditto.
442         (WebCore::FrameLoader::cachePageForHistoryItem): Ditto.
443         (WebCore::FrameLoader::addBackForwardItemClippedAtTarget): Ditto.
444         (WebCore::FrameLoader::goToItem): Ditto.
445         (WebCore::FrameLoader::dispatchWindowObjectAvailable): Ditto.
446         (WebCore::FrameLoader::dispatchDidCommitLoad): Ditto.
447         (WebCore::FrameLoader::dispatchAssignIdentifierToInitialRequest): Ditto.
448         (WebCore::FrameLoader::dispatchWillSendRequest): Ditto.
449         (WebCore::FrameLoader::dispatchDidReceiveResponse): Ditto.
450         (WebCore::FrameLoader::dispatchDidReceiveContentLength): Ditto.
451         (WebCore::FrameLoader::dispatchDidFinishLoading): Ditto.
452         (WebCore::FrameLoader::dispatchDidLoadResourceFromMemoryCache): Ditto.
453
454         * page/ContextMenuController.h:
455         * page/ContextMenuController.cpp:
456         (WebCore::ContextMenuController::ContextMenuController): Removed unneeded and
457         unused Page* parameter.
458         (WebCore::openNewWindow): Added null check.
459         (WebCore::ContextMenuController::contextMenuItemSelected): Ditto.
460
461         * page/InspectorController.h:
462         (WebCore::InspectorController::pageDestroyed): Added. Since this object is
463         owned by the Page and has a back-pointer to it, it needs an explicit disconnect.
464         There's already a higher-level one, but this is more reliable than that.
465         * page/InspectorController.cpp:
466         (WebCore::InspectorController::windowScriptObjectAvailable): Added null check.
467         (WebCore::InspectorController::windowUnloading): Ditto.
468
469         * page/Page.cpp:
470         (WebCore::Page::Page): Updated for change in parameters of ContextMenuController 
471         constructor.
472         (WebCore::Page::~Page): Added call to InspectorController pageDestroyed().
473
474         * page/Chrome.cpp: Updated includes.
475         * page/DragController.cpp: Ditto.
476
477 2007-07-10  Adam Treat  <adam@staikos.net>
478
479         Reviewed by George Staikos.
480
481         Bring scroll wheel out of Ludicrous Speed.
482
483         * platform/qt/WheelEventQt.cpp:
484         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
485
486 2007-07-09  Geoffrey Garen  <ggaren@apple.com>
487
488         Reviewed by Maciej Stachowiak.
489
490         Fixed http://bugs.webkit.org/show_bug.cgi?id=13241 | <rdar://problem/5126396>
491         onload fires before content is finished loading (woot.com)
492         
493         * dom/Document.cpp:
494         (WebCore::Document::close): Try to go through the normal "Am I done loading?"
495         machinery before dispatching the load event. As the comment indicates, 
496         we can't do this in all cases, so the fix isn't perfect. However, a perfect 
497         solution would require much riskier sweeping changes to the loader, which 
498         are best left for later, I think.
499
500         * xml/XSLTProcessor.cpp:
501         (WebCore::XSLTProcessor::createDocumentFromSource): Removed a slightly
502         worse solution to the same problem.
503
504 2007-07-10  Rob Buis  <buis@kde.org>
505
506         Reviewed by Maciej.
507
508         http://bugs.webkit.org/show_bug.cgi?id=8007
509         createElement() and XHTML (A dynamically created table not rendered as such)
510
511         Follow the HTML5 rules of making the name lowercase and then
512         creating the element in the xhtml namespace.
513
514         * dom/Document.cpp:
515         (WebCore::Document::createElement):
516         * dom/Document.h:
517         * html/HTMLDocument.cpp:
518         * html/HTMLDocument.h:
519
520 2007-07-09  Qing Zhao  <qing@staikos.net>
521
522         Reviewed by George Staikos.
523
524         Add qt context menu support.
525
526         * WebCore.pro:
527         * platform/ContextMenu.h:
528         * platform/ContextMenuItem.h:
529         (WebCore::PlatformMenuItemDescriptionType::PlatformMenuItemDescriptionType):
530         * platform/qt/ContextMenuItemQt.cpp:
531         (WebCore::ContextMenuItem::ContextMenuItem):
532         (WebCore::ContextMenuItem::~ContextMenuItem):
533         (WebCore::ContextMenuItem::releasePlatformDescription):
534         (WebCore::ContextMenuItem::type):
535         (WebCore::ContextMenuItem::setType):
536         (WebCore::ContextMenuItem::action):
537         (WebCore::ContextMenuItem::setAction):
538         (WebCore::ContextMenuItem::title):
539         (WebCore::ContextMenuItem::setTitle):
540         (WebCore::ContextMenuItem::platformSubMenu):
541         (WebCore::ContextMenuItem::setSubMenu):
542         (WebCore::ContextMenuItem::setChecked):
543         (WebCore::ContextMenuItem::setEnabled):
544         (WebCore::ContextMenuItem::enabled):
545         * platform/qt/ContextMenuQt.cpp:
546         (WebCore::ContextMenu::ContextMenu):
547         (WebCore::ContextMenu::~ContextMenu):
548         (WebCore::ContextMenu::appendItem):
549         (WebCore::ContextMenu::itemCount):
550         (WebCore::ContextMenu::insertItem):
551         (WebCore::ContextMenu::setPlatformDescription):
552         (WebCore::ContextMenu::platformDescription):
553
554 2007-07-09  Anders Carlsson  <andersca@apple.com>
555
556         Build fix.
557         
558         * plugins/win/PluginViewWin.cpp:
559         (WebCore::PluginViewWin::performRequest):
560
561 2007-07-09  Anders Carlsson  <andersca@apple.com>
562
563         Reviewed by Geoff.
564
565         Get rid of the node argument in our various script execution functions.
566         
567         * bindings/js/kjs_proxy.cpp:
568         (WebCore::KJSProxy::evaluate):
569         * bindings/js/kjs_proxy.h:
570         * bindings/js/kjs_window.cpp:
571         (KJS::ScheduledAction::execute):
572         * dom/XMLTokenizer.cpp:
573         (WebCore::XMLTokenizer::endElementNs):
574         (WebCore::XMLTokenizer::notifyFinished):
575         * html/HTMLScriptElement.cpp:
576         (WebCore::HTMLScriptElement::evaluateScript):
577         * html/HTMLTokenizer.cpp:
578         (WebCore::HTMLTokenizer::scriptExecution):
579         * loader/FrameLoader.cpp:
580         (WebCore::FrameLoader::changeLocation):
581         (WebCore::FrameLoader::urlSelected):
582         (WebCore::FrameLoader::submitForm):
583         (WebCore::FrameLoader::replaceContentsWithScriptResult):
584         (WebCore::FrameLoader::executeScript):
585         * loader/FrameLoader.h:
586         * page/mac/WebCoreFrameBridge.mm:
587         (-[WebCoreFrameBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
588         (-[WebCoreFrameBridge aeDescByEvaluatingJavaScriptFromString:]):
589
590 2007-07-09  Justin Garcia  <justin.garcia@apple.com>
591
592         Rolling the fix for 5290534 back in now that 5310404 has been fixed in Mail.
593
594         * editing/DeleteSelectionCommand.cpp:
595         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
596
597 2007-07-09  Geoffrey Garen  <ggaren@apple.com>
598
599         Reviewed by Anders Carlsson.
600
601         A little more FrameLoader cleanup while working on <rdar://problem/5126396>.
602         
603         Rename: "checkEmitLoadEvent" => "checkCallImplicitClose" because the function
604         doesn't emit the load event; it just calls implicitClose.
605         
606         Rename: "m_wasLoadEventEmitted" => "m_didCallImplicitClose" because the variable
607         tracks whether implicitClose was called.
608
609         * dom/Document.cpp:
610         (WebCore::Document::implicitClose): Turned 12 lines of code into 6, adding ASSERT.
611         * loader/FrameLoader.h: Removed bogus declaration of non-existent emitLoadEvent().
612
613 2007-07-09  Justin Garcia  <justin.garcia@apple.com>
614
615         Reviewed by John.
616         
617         REGRESSION: Crash when deleting table content in Leopard Mail
618
619         * editing/DeleteSelectionCommand.cpp:
620         (WebCore::DeleteSelectionCommand::handleGeneralDelete): Use a RefPtr
621         for the next node to delete, in case it is destroyed when the
622         current node is deleted.  In the crash reported in the radar, we
623         crash because the next node is the div that holds the delete button
624         and it's destroyed when the node that contains the selection is removed.
625
626 2007-07-09  Adam Treat  <adam@staikos.net>
627
628         Reviewed by George Staikos.
629
630         Convert QWebFrame from a QFrame to a pure QObject to eliminate all
631         traces of widgets.
632
633         * page/qt/EventHandlerQt.cpp:
634         (WebCore::EventHandler::passSubframeEventToSubframe):
635         * platform/ScrollView.h:
636         * platform/Widget.h:
637         * platform/qt/PlatformScrollBarQt.cpp:
638         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
639         (WebCore::PlatformScrollbar::handleMousePressEvent):
640         (WebCore::PlatformScrollbar::handleMouseReleaseEvent):
641         * platform/qt/PopupMenuQt.cpp:
642         (WebCore::PopupMenu::show):
643         * platform/qt/ScrollViewQt.cpp:
644         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
645         (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
646         (WebCore::ScrollView::ScrollViewPrivate::windowClipRect):
647         (WebCore::ScrollView::updateContents):
648         (WebCore::ScrollView::update):
649         (WebCore::ScrollView::geometryChanged):
650         (WebCore::ScrollView::windowToContents):
651         (WebCore::ScrollView::contentsToWindow):
652         (WebCore::ScrollView::convertChildToSelf):
653         (WebCore::ScrollView::convertSelfToChild):
654         (WebCore::ScrollView::scrollbarUnderMouse):
655         (WebCore::ScrollView::addChild):
656         (WebCore::ScrollView::paint):
657         * platform/qt/WidgetQt.cpp:
658         (WebCore::WidgetPrivate::WidgetPrivate):
659         (WebCore::WidgetPrivate::~WidgetPrivate):
660         (WebCore::WidgetPrivate::setGeometry):
661         (WebCore::WidgetPrivate::geometry):
662         (WebCore::Widget::frameGeometry):
663         (WebCore::Widget::setFocus):
664         (WebCore::Widget::setCursor):
665         (WebCore::Widget::show):
666         (WebCore::Widget::hide):
667         (WebCore::Widget::qwebframe):
668         (WebCore::Widget::setQWebFrame):
669         (WebCore::Widget::qwidget):
670         (WebCore::Widget::setQWidget):
671         (WebCore::Widget::setFrameGeometry):
672         (WebCore::Widget::isEnabled):
673         (WebCore::Widget::setEnabled):
674         (WebCore::Widget::setIsSelected):
675         (WebCore::Widget::invalidate):
676         (WebCore::Widget::invalidateRect):
677         (WebCore::Widget::removeFromParent):
678         (WebCore::Widget::geometryChanged):
679         (WebCore::Widget::convertToContainingWindow):
680         (WebCore::Widget::convertFromContainingWindow):
681         (WebCore::Widget::convertChildToSelf):
682         (WebCore::Widget::convertSelfToChild):
683         (WebCore::Widget::containingWindow):
684
685 2007-07-09  Anders Carlsson  <andersca@apple.com>
686
687         Reviewed by Oliver.
688
689         Add DocumentLoader::isLoadingMainResource.
690
691         * WebCore.exp:
692
693 2007-07-09  John Sullivan  <sullivan@apple.com>
694
695         Reviewed by Darin
696
697         * WebCore.exp:
698         * WebCore.xcodeproj/project.pbxproj:
699         exported String::createCFString, needed for <rdar://problem/5320208>
700
701 2007-07-09  Mitz Pettel  <mitz@webkit.org>
702
703         Reviewed by Maciej.
704
705         Test case for the bug below, which is http://bugs.webkit.org/show_bug.cgi?id=14207
706
707         * manual-tests/flash-unload-tab.html: Added.
708
709 2007-07-09  Maciej Stachowiak  <mjs@apple.com>
710
711         Reviewed by Oliver.
712
713         <rdar://problem/5295734> Repro crash closing tab/window @ maps.google.com in
714         WTF::HashSet<KJS::RuntimeObjectImp*, WTF::PtrHash<KJS::RuntimeObjectImp*>,
715         WTF::HashTraits<KJS::RuntimeObjectImp*> >::add + 11
716         
717         Automated test case is not possible. Did not bother with manual test this time.
718
719         * bindings/js/kjs_dom.cpp:
720         (WebCore::getRuntimeObject): Check that runtime root isn't null, as well as instance;
721         this should cover the case where the plugin is already shut down and onunload time.
722
723 2007-07-08  Maciej Stachowiak  <mjs@apple.com>
724
725         Reviewed by Sam.
726
727         - fixed <rdar://problem/5220706> REGRESSION (TOT): repro crash in -[WebView(WebViewInternal) _addObject:forIdentifier:] [14425]
728         http://bugs.webkit.org/show_bug.cgi?id=14425
729
730         * bindings/js/kjs_window.cpp:
731         (KJS::createWindow): No longer take an immediate argument - always do immediate loads
732         on a newly created Window. Also, do a load of "" to make sure that the right info makes
733         it to the app.
734         (KJS::showModalDialog): Updated for above.
735         (KJS::WindowFunc::callAsFunction): Updated for above.
736         * dom/Document.cpp:
737         (WebCore::Document::shouldBeAllowedToLoadLocalResources): If our URL is about:blank,
738         we're allowed if our opener is (since the opener must have written the contents).
739         * loader/FrameLoader.cpp:
740         (WebCore::FrameLoader::changeLocation): Add a variant which takes a KURL, which it
741         expects to be pre-completed. This is to avoid completing "" to the opener URL.
742         (WebCore::FrameLoader::urlSelected): Allow loading empty URLs.
743         * loader/FrameLoader.h:
744         
745         Test case is manual only, since it takes particular app behavior to reproduce:
746         
747         * manual-tests/new-window-subresource-crash.html: Added.
748
749 2007-07-08  Mitz Pettel  <mitz@webkit.org>
750
751         Reviewed by Maciej.
752
753         - fix leaks introduced in r24099
754
755         * dom/Element.cpp:
756         (WebCore::Element::~Element): Do not delete the cached computed style here.
757         (WebCore::Element::detach): Delete the computed style here instead.
758         (WebCore::Element::computedStyle): Removed a redundant ref() which was
759         causing the leak. Changed to return 0 if the element is not attached,
760         because in that case there is currently no way to tell when to delete the computed
761         style.
762
763 2007-07-08  Mitz Pettel  <mitz@webkit.org>
764
765         Reviewed by Darin.
766
767         - fix http://bugs.webkit.org/show_bug.cgi?id=12384
768           getComputedStyle with td.style.display='none' reports '' for all properties except display
769
770         Test: fast/css/computed-style-without-renderer.html
771
772         Implement rich computed style for elements that do not have a renderer.
773
774         * css/CSSComputedStyleDeclaration.cpp:
775         (WebCore::getPositionOffsetValue): Changed to take a RenderStyle instead of
776         a RenderObject.
777         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Changed to
778         use the computed style returned by the node instead of going through the
779         renderer. Changed properties that compute by measuring the renderer to
780         fall back on returning the length from the RenderStyle if a renderer does
781         not exist.
782         (WebCore::CSSComputedStyleDeclaration::length): Changed to return the number
783         of properties we can compute even if the element has no renderer.
784         (WebCore::CSSComputedStyleDeclaration::copyInheritableProperties): Changed
785         to use the computed style returned by the node instead of going through the
786         renderer.
787         * dom/Element.cpp:
788         (WebCore::ElementRareData::ElementRareData): Added a computed style member,
789         used to cache computed style for elements that do not have a renderer.
790         (WebCore::ElementRareData::resetComputedStyle): Added.
791         (WebCore::Element::~Element): Delete the cached computed style.
792         (WebCore::Element::recalcStyle): Added code to delete the cached computed
793         style when necessary.
794         (WebCore::Element::computedStyle): Added. Returns the style used in rendering
795         the element, if available. Otherwise uses the style selector to compute style
796         for the element.
797         * dom/Element.h:
798         * dom/Node.cpp:
799         (WebCore::Node::computedStyle): Added. This method returns either the style
800         used in rendering the node, or the style that would be used if the node
801         had a renderer.
802         * dom/Node.h:
803
804 2007-07-08  Mitz Pettel  <mitz@webkit.org>
805
806         Reviewed by Darin.
807
808         - fix http://bugs.webkit.org/show_bug.cgi?id=14544
809           Scroll wheel events are ignored when the cursor is over an iframe's border
810
811         * page/mac/EventHandlerMac.mm:
812         (WebCore::EventHandler::passWheelEventToWidget): Changed to return false if
813         the event coordinates are not inside the widget's NSView hierarchy.
814
815 2007-07-08  Rob Buis  <buis@kde.org>
816
817         Reviewed by Mitz.
818
819         http://bugs.webkit.org/show_bug.cgi?id=10752
820         The inspector should not respond to Make Text Smaller/Bigger commands
821
822         Use the -webkit-text-size-adjust property to ignore text sizing        
823         and do not take the zoom factor into account for line height when
824         -webkit-text-size-adjust is set to none.
825
826         * css/cssstyleselector.cpp:
827         (WebCore::CSSStyleSelector::applyProperty):
828         * page/inspector/inspector.css:
829
830 2007-07-08  Darin Adler  <darin@apple.com>
831
832         Reviewed by Maciej.
833
834         - fix <rdar://problem/5318994> Integer overflow in WebCore's Base64.cpp:base64Encode
835
836         * platform/Base64.cpp:
837         (WebCore::base64Encode): Check against a maximum size.
838         (WebCore::base64Decode): Ditto.
839
840 2007-07-08  Darin Adler  <darin@apple.com>
841
842         Reviewed by Maciej.
843
844         - fix <rdar://problem/5124665> WebCore secondary-thread assertion should use linked-on-or-after check instead of building on Tiger check
845
846         * platform/ThreadCheck.h: Renamed _WebCoreThreadViolationCheck to reportThreadViolation
847         since it's in the WebCore namespace and also we shouldn't use leading underscores since
848         those are reserved for the compiler and standard library. Added a new function named
849         setDefaultThreadViolationBehavior and an enum for the parameter. Removed the
850         threadViolationIsException parameter from WebCoreReportThreadViolation since we use
851         a global variable for it now. Got rid of the unnecessary use of do while (0) in the
852         WebCoreThreadViolationCheck macro -- since it's only a single function call it's already
853         a statement and doesn't need to be turned into one with the do while (0) trick.
854
855         * platform/mac/ThreadCheck.mm:
856         (WebCore::readThreadViolationBehaviorFromUserDefaults): Moved the code to read from
857         NSUserDefaults into this helper function. Changed it to use stringForKey instead of
858         objectForKey so we don't get a "method not found" if someone puts something other than
859         a string in there. Updated to use the new globals.
860         (WebCore::setDefaultThreadViolationBehavior): Added.
861         (WebCore::reportThreadViolation): Simplified, now that most of the work is in the
862         readThreadViolationBehaviorFromUserDefaults function.
863         (WebCoreReportThreadViolation): Changed to use a global variable instead of parameter
864         to determine how to report a violation. Added LogOnFirstThreadViolation, which will
865         log only once for each function that violates.
866
867         * WebCore.exp: Updated for above changes.
868
869 2007-07-08  Mitz Pettel  <mitz@webkit.org>
870
871         Reviewed by Darin.
872
873         - fix http://bugs.webkit.org/show_bug.cgi?id=14221
874           Repro crash (ASSERTION FAILED: oldText in RenderBlock::updateFirstLetter() during relayout of :before content with first-letter style)
875
876         Test: fast/css-generated-content/before-with-first-letter.html
877
878         * rendering/RenderContainer.cpp:
879         (WebCore::RenderContainer::updateBeforeAfterContentForContainer): If a child
880         of the existing 'before' container is not text, do not assume that it is an
881         image, since it can also be an inline wrapping a first-letter. In that case,
882         do not update its style (so in particular, keep it a FIRST_LETTER type style)
883         and leave it to updateFirstLetter() to take care of.
884
885 2007-07-07  Sam Weinig  <sam@webkit.org>
886
887         Reviewed by Oliver Hunt.
888
889         Bailout early in Window::put() if attribute is readonly to avoid
890         extra calls to isSafeScript().
891
892         * bindings/js/kjs_window.cpp:
893         (KJS::Window::put):
894
895 2007-07-07  Darin Adler  <darin@apple.com>
896
897         Reviewed by Oliver Hunt.
898
899         - fix <rdar://problem/5292364> REGRESSION: ZX Spectrum 3.0 widget - graphic anomalies in widget window frame
900
901         Updated Dashboard quirk so it affects fill, stroke, and clip, rather than just stroke.
902
903         Test: fast/canvas/fill-stroke-clip-reset-path.html
904
905         * html/CanvasRenderingContext2D.h: Added clearPathForDashboardBackwardCompatibilityMode.
906         * html/CanvasRenderingContext2D.cpp:
907         (WebCore::CanvasRenderingContext2D::clearPathForDashboardBackwardCompatibilityMode): Added.
908         (WebCore::CanvasRenderingContext2D::fill): Call the new function.
909         (WebCore::CanvasRenderingContext2D::stroke): Replaced in-line code with a call to the new function.
910         (WebCore::CanvasRenderingContext2D::clip): Call the new function.
911
912 2007-07-07  Rob Buis  <buis@kde.org>
913
914         Reviewed and tweaked by Darin.
915
916         http://bugs.webkit.org/show_bug.cgi?id=8994
917         Canvas doesn't reset on resize
918
919         Also reset the rendering context when resetting the canvas.
920
921         * html/HTMLCanvasElement.cpp:
922         (WebCore::HTMLCanvasElement::reset):
923         (WebCore::HTMLCanvasElement::drawingContext):
924
925 2007-07-07  Alexey Proskuryakov  <ap@webkit.org>
926
927         Reviewed by Maciej.
928
929         http://bugs.webkit.org/show_bug.cgi?id=14525
930         Support exslt:node-set()
931
932         Test: fast/xsl/exslt-node-set.xml
933
934         * xml/XSLTExtensions.cpp: Added.
935         (WebCore::exsltNodeSetFunction): A copy of exslt:node-set() implementation
936         from libexslt 1.1.11 (shipped with Tiger).
937         (WebCore::registerXSLTExtensions): This function registers any WebCore-provided
938         extensions on a context. Currently, the only extension is exslt:node-set().
939         * xml/XSLTExtensions.h: Added.
940
941         * xml/XSLTProcessor.cpp:
942         (WebCore::XSLTProcessor::transformToString):
943         Register extensions when creating a context.
944
945         * WebCore.pro:
946         * WebCore.vcproj/WebCore.vcproj:
947         * WebCore.xcodeproj/project.pbxproj:
948         * WebCoreSources.bkl:
949         Add XSLTExtensions.{h,cpp} to projects.
950
951 2007-07-06  Maciej Stachowiak  <mjs@apple.com>
952
953         Reviewed by Oliver.
954
955         - fixed <rdar://problem/5133420> ASSERT in WebDocumentLoaderMac::decreaseLoadCount() un-discarding Gmail message
956         
957         test case: fast/loader/early-load-cancel.html
958
959         * loader/ResourceLoader.cpp:
960         (WebCore::ResourceLoader::didCancel): Don't send cancel-related client callbacks
961         if we never even sent willSendRequest because we were deferred.
962
963 2007-07-06  Oliver Hunt  <oliver@apple.com>
964
965         Reviewed by Maciej.
966
967         Pulled a number of methods from WebKit and WebCoreFrameBridge into 
968         C++ objects.
969
970         * WebCore.exp:
971         * WebCore.xcodeproj/project.pbxproj:
972         * editing/Editor.cpp:
973         (WebCore::Editor::replaceMarkedText):
974             From -[WebCoreFrameBridge replaceMarkedTextWithText:]
975         * editing/Editor.h:
976         * page/Frame.cpp:
977         (WebCore::Frame::setMarkedTextRange):
978             Pulled platform independent logic from Mac specific implementation
979         (WebCore::Frame::selectRangeInMarkedText):
980             Converted from -[WebHTMLView _selectRangeInMarkedText:]
981         * page/Frame.h:
982         * page/mac/FrameMac.mm:
983         (WebCore::Frame::setMarkedTextRange):
984             Now only does Mac specific logic when manipulating initial
985             NSAttributedString
986         * page/mac/WebCoreFrameBridge.h:
987         * page/mac/WebCoreFrameBridge.mm:
988             Removed -[WebCoreFrameBridge replaceMarkedTextWithText:]
989
990 2007-07-06  Mitz Pettel  <mitz@webkit.org>
991
992         Reviewed by Darin.
993
994         - fix http://bugs.webkit.org/show_bug.cgi?id=14545
995           REGRESSION (r21854-r21869): Repro crash in RenderBlock::updateFirstLetter @ nola.com/rose/
996
997         Test: fast/css/first-letter-capitalized.html
998
999         * rendering/RenderBlock.cpp:
1000         (WebCore::RenderBlock::updateFirstLetter): Moved the call to setFirstLetter
1001         further down so that the first letter is not destroyed if a text transform
1002         is applied to the remaining text fragment when it is add to the render tree.
1003         * rendering/RenderText.cpp:
1004         (WebCore::RenderText::previousCharacter): Factored out of setTextInternal.
1005         (WebCore::RenderText::setTextInternal): Changed to call previousCharacter().
1006         * rendering/RenderText.h:
1007         * rendering/RenderTextFragment.cpp:
1008         (WebCore::RenderTextFragment::previousCharacter): Override to return the
1009         character in the original string before the start of the fragment. 
1010         * rendering/RenderTextFragment.h:
1011
1012 2007-07-06  Mitz Pettel  <mitz@webkit.org>
1013
1014         Reviewed by Beth.
1015
1016         - fix http://bugs.webkit.org/show_bug.cgi?id=14536
1017           Unnecessary layout done when mousing down in text field
1018
1019         No test possible because there is no change in functionality.
1020
1021         * rendering/RenderTextControl.cpp:
1022         (WebCore::RenderTextControl::setStyle): Reset the height and the width in
1023         the old style to avoid getting a layout hint as a result of having mutated
1024         the old style during layout.
1025         (WebCore::RenderTextControl::layout): Update children's layout if an inner
1026         block's dimensions should change. This need for layout was previously masked
1027         by the bug.
1028
1029 2007-07-06  Brady Eidson  <beidson@apple.com>
1030
1031         Fix builds that use IconDatabaseNone.cpp - better, this time
1032
1033         * loader/icon/IconDatabaseNone.cpp:
1034         (WebCore::IconDatabase::isOpen):
1035
1036 2007-07-06  Brady Eidson  <beidson@apple.com>
1037
1038         Fix builds that use IconDatabaseNone.cpp
1039
1040         * loader/icon/IconDatabaseNone.cpp:
1041         (WebCore::IconDatabase::databasePath): 
1042
1043 2007-07-06  John Sullivan  <sullivan@apple.com>
1044
1045         Reviewed by Brady
1046         
1047         - WebCore part of fix for: 
1048           <rdar://problem/5310739> Time Machine shouldn't back up WebKit's icon database files
1049         
1050         * loader/icon/IconDatabase.h:
1051         * loader/icon/IconDatabase.cpp:
1052         (WebCore::IconDatabase::isOpen): 
1053         made this method const (necessary to make IconDatabase::databasePath const)
1054         (WebCore::IconDatabase::databasePath): 
1055         new method, returns SQLDatabase's path if open, otherwise empty string
1056         
1057         * loader/icon/SQLDatabase.cpp:
1058         (WebCore::SQLDatabase::open):
1059         don't append a null character to the m_path ivar. The appended null character was making the path()
1060         method return a String with a trailing null, which is bad. However, there were no callers to the
1061         path() method until now. Instead of appending a null character to the ivar, use charactersWithNullTermination()
1062         instead of characters() when opening the database.
1063         
1064         * loader/icon/SQLDatabase.h:
1065         (WebCore::SQLDatabase::isOpen):
1066         made this method const (necessary to make IconDatabase::databasePath const)
1067         (WebCore::SQLDatabase::path):
1068         made this method const (not required for these changes, but seemed worth doing at the same time)
1069
1070         * WebCore.exp:
1071         added symbol for IconDatabase::databasePath
1072
1073 2007-07-06  George Staikos  <staikos@kde.org>
1074
1075         No real functional change - just move the localizations out and
1076         stick some placeholder text in.
1077
1078         * platform/qt/Localizations.cpp: Added.
1079         (WebCore::submitButtonDefaultLabel):
1080         (WebCore::inputElementAltText):
1081         (WebCore::resetButtonDefaultLabel):
1082         (WebCore::defaultLanguage):
1083         (WebCore::searchableIndexIntroduction):
1084         (WebCore::fileButtonChooseFileLabel):
1085         (WebCore::fileButtonNoFileSelectedLabel):
1086         (WebCore::contextMenuItemTagOpenLinkInNewWindow):
1087         (WebCore::contextMenuItemTagDownloadLinkToDisk):
1088         (WebCore::contextMenuItemTagCopyLinkToClipboard):
1089         (WebCore::contextMenuItemTagOpenImageInNewWindow):
1090         (WebCore::contextMenuItemTagDownloadImageToDisk):
1091         (WebCore::contextMenuItemTagCopyImageToClipboard):
1092         (WebCore::contextMenuItemTagOpenFrameInNewWindow):
1093         (WebCore::contextMenuItemTagCopy):
1094         (WebCore::contextMenuItemTagGoBack):
1095         (WebCore::contextMenuItemTagGoForward):
1096         (WebCore::contextMenuItemTagStop):
1097         (WebCore::contextMenuItemTagReload):
1098         (WebCore::contextMenuItemTagCut):
1099         (WebCore::contextMenuItemTagPaste):
1100         (WebCore::contextMenuItemTagNoGuessesFound):
1101         (WebCore::contextMenuItemTagIgnoreSpelling):
1102         (WebCore::contextMenuItemTagLearnSpelling):
1103         (WebCore::contextMenuItemTagSearchWeb):
1104         (WebCore::contextMenuItemTagLookUpInDictionary):
1105         (WebCore::contextMenuItemTagOpenLink):
1106         (WebCore::contextMenuItemTagIgnoreGrammar):
1107         (WebCore::contextMenuItemTagSpellingMenu):
1108         (WebCore::contextMenuItemTagShowSpellingPanel):
1109         (WebCore::contextMenuItemTagCheckSpelling):
1110         (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
1111         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
1112         (WebCore::contextMenuItemTagFontMenu):
1113         (WebCore::contextMenuItemTagBold):
1114         (WebCore::contextMenuItemTagItalic):
1115         (WebCore::contextMenuItemTagUnderline):
1116         (WebCore::contextMenuItemTagOutline):
1117         (WebCore::contextMenuItemTagWritingDirectionMenu):
1118         (WebCore::contextMenuItemTagDefaultDirection):
1119         (WebCore::contextMenuItemTagLeftToRight):
1120         (WebCore::contextMenuItemTagRightToLeft):
1121         (WebCore::contextMenuItemTagInspectElement):
1122         (WebCore::searchMenuNoRecentSearchesText):
1123         (WebCore::searchMenuRecentSearchesText):
1124         (WebCore::searchMenuClearRecentSearchesText):
1125         (WebCore::AXWebAreaText):
1126         (WebCore::AXLinkText):
1127         (WebCore::AXListMarkerText):
1128         (WebCore::AXImageMapText):
1129         (WebCore::AXHeadingText):
1130         * platform/qt/TemporaryLinkStubs.cpp:
1131
1132 2007-07-06  Geoffrey Garen  <ggaren@apple.com>
1133
1134         Reviewed by Anders Carlsson.
1135
1136         A little more FrameLoader cleanup while working on <rdar://problem/5126396>.
1137         
1138         Moved url() and URL() methods next to each other to highlight their subtlety.
1139
1140         * loader/FrameLoader.cpp:
1141         (WebCore::FrameLoader::url):
1142         * loader/FrameLoader.h:
1143
1144 2007-07-06  Geoffrey Garen  <ggaren@apple.com>
1145
1146         Reviewed by Anders Carlsson.
1147
1148         A little FrameLoader cleanup while working on <rdar://problem/5126396>.
1149         
1150         Renamed endIfNotLoading() to endIfNotLoadingMainResource() because "loading"
1151         and "loadingMainResource" have distinct meanings and this function
1152         honors the latter.
1153
1154         (WebCore::FrameLoader::endIfNotLoadingMainResource): Protect after the
1155         early return to avoid ref count churn.
1156         * loader/FrameLoader.h:
1157         (WebCore::FrameLoader::isLoadingMainResource): Inlined this function.
1158
1159 2007-07-06  Adam Treat  <adam@staikos.net>
1160
1161         Reviewed by George Staikos.
1162
1163         Convert QWebFrame to a QFrame from a scroll area.
1164
1165         * page/qt/EventHandlerQt.cpp:
1166         (WebCore::EventHandler::passSubframeEventToSubframe):
1167         (WebCore::EventHandler::passWheelEventToWidget):
1168         (WebCore::EventHandler::createDraggingClipboard):
1169         (WebCore::EventHandler::passMousePressEventToScrollbar):
1170         * platform/ScrollView.h:
1171         * platform/Widget.h:
1172         * platform/qt/PlatformScrollBar.h:
1173         * platform/qt/PlatformScrollBarQt.cpp:
1174         (WebCore::PlatformScrollbar::setRect):
1175         (WebCore::PlatformScrollbar::frameGeometry):
1176         (WebCore::PlatformScrollbar::setFrameGeometry):
1177         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
1178         (WebCore::PlatformScrollbar::handleMousePressEvent):
1179         (WebCore::PlatformScrollbar::handleMouseReleaseEvent):
1180         * platform/qt/ScrollViewQt.cpp:
1181         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
1182         (WebCore::ScrollView::ScrollViewPrivate::~ScrollViewPrivate):
1183         (WebCore::ScrollView::ScrollViewPrivate::setHasHorizontalScrollbar):
1184         (WebCore::ScrollView::ScrollViewPrivate::setHasVerticalScrollbar):
1185         (WebCore::ScrollView::ScrollViewPrivate::valueChanged):
1186         (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
1187         (WebCore::ScrollView::ScrollViewPrivate::windowClipRect):
1188         (WebCore::ScrollView::ScrollView):
1189         (WebCore::ScrollView::~ScrollView):
1190         (WebCore::ScrollView::setScrollArea):
1191         (WebCore::ScrollView::horizontalScrollBar):
1192         (WebCore::ScrollView::verticalScrollBar):
1193         (WebCore::ScrollView::updateContents):
1194         (WebCore::ScrollView::update):
1195         (WebCore::ScrollView::visibleWidth):
1196         (WebCore::ScrollView::visibleHeight):
1197         (WebCore::ScrollView::visibleContentRect):
1198         (WebCore::ScrollView::setContentsPos):
1199         (WebCore::ScrollView::resizeContents):
1200         (WebCore::ScrollView::setFrameGeometry):
1201         (WebCore::ScrollView::geometryChanged):
1202         (WebCore::ScrollView::contentsX):
1203         (WebCore::ScrollView::contentsY):
1204         (WebCore::ScrollView::contentsWidth):
1205         (WebCore::ScrollView::contentsHeight):
1206         (WebCore::ScrollView::windowToContents):
1207         (WebCore::ScrollView::contentsToWindow):
1208         (WebCore::ScrollView::scrollOffset):
1209         (WebCore::ScrollView::maximumScroll):
1210         (WebCore::ScrollView::scrollBy):
1211         (WebCore::ScrollView::scrollRectIntoViewRecursively):
1212         (WebCore::ScrollView::hScrollbarMode):
1213         (WebCore::ScrollView::vScrollbarMode):
1214         (WebCore::ScrollView::suppressScrollbars):
1215         (WebCore::ScrollView::setHScrollbarMode):
1216         (WebCore::ScrollView::setVScrollbarMode):
1217         (WebCore::ScrollView::setScrollbarsMode):
1218         (WebCore::ScrollView::setStaticBackground):
1219         (WebCore::ScrollView::inWindow):
1220         (WebCore::ScrollView::updateScrollbars):
1221         (WebCore::ScrollView::scrollbarUnderMouse):
1222         (WebCore::ScrollView::addChild):
1223         (WebCore::ScrollView::removeChild):
1224         (WebCore::ScrollView::paint):
1225         (WebCore::ScrollView::wheelEvent):
1226         (WebCore::ScrollView::scroll):
1227         (WebCore::ScrollView::windowResizerRect):
1228         (WebCore::ScrollView::resizerOverlapsContent):
1229         (WebCore::ScrollView::adjustOverlappingScrollbarCount):
1230         (WebCore::ScrollView::setParent):
1231         (WebCore::ScrollView::addToDirtyRegion):
1232         (WebCore::ScrollView::scrollBackingStore):
1233         (WebCore::ScrollView::updateBackingStore):
1234         * platform/qt/WidgetQt.cpp:
1235         (WebCore::WidgetPrivate::canvas):
1236         (WebCore::WidgetPrivate::setGeometry):
1237         (WebCore::WidgetPrivate::geometry):
1238         (WebCore::Widget::setQWidget):
1239         (WebCore::Widget::paint):
1240         (WebCore::Widget::originalGeometry):
1241         (WebCore::Widget::geometryChanged):
1242
1243 2007-07-06  Anders Carlsson  <andersca@apple.com>
1244
1245         Reviewed by Mitz.
1246
1247         <rdar://problem/5280532> 
1248         REGRESSION: Can't access nested embed by document.name if object is not immediate parent
1249         
1250         Traverse up the tree looking for an object element.
1251         
1252         * html/HTMLEmbedElement.cpp:
1253         (WebCore::HTMLEmbedElement::getInstance):
1254
1255 2007-07-06  George Staikos  <staikos@kde.org>
1256
1257         Qt build fix: Don't clobber qmake variables that are already set.
1258
1259         * WebCore.pro:
1260
1261 2007-07-05  Maciej Stachowiak  <mjs@apple.com>
1262
1263         Reviewed by Antti.
1264
1265         - <rdar://problem/5311093> JavaScriptCore fails to build with strict-aliasing warnings
1266
1267         * platform/StringHash.h:
1268         (WTF::): Adapt to newer way to do storage types.
1269
1270 2007-07-06  Bernhard Rosenkraenzer  <bero@arklinux.org>
1271
1272         Reviewed by Sam.
1273
1274         Fix for http://bugs.webkit.org/show_bug.cgi?id=13985
1275         Bug 13985: WebCore/rendering/RenderTable.cpp fails to compile with gcc 4.2.x
1276
1277         * rendering/RenderTable.cpp:
1278         (WebKit::RenderTable::calcBorderLeft)
1279         (WebKit::RenderTable::calcBorderRight)
1280
1281 2007-07-06  Maxime Britto  <mbritto@pleyo.com>
1282
1283         Reviewed by Maciej.
1284
1285         Fix http://bugs.webkit.org/show_bug.cgi?id=13038
1286         Bug 13038: ASSERTION FAILED: item->target().isEmpty() || m_mainFrame->tree()->find(item->target()) == m_mainFrame
1287
1288         Modify an ASSERT in goToItem related to going back/forward in history.  We don't need to check the frameset if the target is _blank.
1289         The attached test case is a manual one since it relies on having pages opened in tabs in Safari.
1290
1291         * manual-tests/goBack-blank-tab-page.html: Added.
1292         * manual-tests/resources/before-go-back.html: Added.
1293         * manual-tests/resources/will-go-back.html: Added.
1294         * page/Page.cpp:
1295         (WebCore::Page::goToItem):
1296
1297 2007-07-06  Mitz Pettel  <mitz@webkit.org>
1298
1299         Reviewed by Maciej.
1300
1301         - fix http://bugs.webkit.org/show_bug.cgi?id=14400
1302           Assertion failure (SHOULD NEVER BE REACHED) going back on YouTube
1303
1304         Test: fast/forms/button-state-restore.html
1305
1306         * dom/Document.h:
1307         (WebCore::Document::isFormElementRegistered): Added.
1308         * html/HTMLGenericFormElement.cpp:
1309         (WebCore::HTMLGenericFormElement::closeRenderer): Restore saved form
1310         element state only if the element is registered with the document to
1311         have its state saved.
1312
1313 2007-07-06  Mitz Pettel  <mitz@webkit.org>
1314
1315         Reviewed by Maciej.
1316
1317         - fix http://bugs.webkit.org/show_bug.cgi?id=14487
1318           Incomplete repaint of background and border of boxes with -webkit-border-fit:lines
1319
1320         Test: fast/repaint/border-fit-lines.html
1321
1322         * rendering/RenderObject.cpp:
1323         (WebCore::RenderObject::repaintAfterLayoutIfNeeded): Do a full repaint if
1324         -webkit-border-fit:lines was specified.
1325
1326 2007-07-06  Tony Chang  <idealisms@gmail.com>
1327
1328         Reviewed by Maciej.
1329
1330         http://bugs.webkit.org/show_bug.cgi?id=14516
1331         Bug 14516: crash loading multipart/x-mixed-replace data on windows safari
1332
1333         NULL check m_resourceData to prevent a crash in Safari on Windows.
1334
1335         * loader/ResourceLoader.cpp:
1336         (WebCore::ResourceLoader::clearResourceData):
1337
1338 2007-07-06  Jungshik Shin  <jungshik.shin@gmail.com>
1339
1340         Reviewed by Alexey.
1341
1342         - Add UTF-32 encoding support 
1343           http://bugs.webkit.org/show_bug.cgi?id=13415
1344
1345         Test:
1346          - fast/encoding/utf-32-big-endian-bom.html
1347          - fast/encoding/utf-32-big-endian-nobom.xml
1348          - fast/encoding/utf-32-little-endian-bom.html
1349          - fast/encoding/utf-32-little-endian-nobom.xml
1350
1351         * loader/TextResourceDecoder.cpp:
1352         (WebCore::TextResourceDecoder::checkForBOM):
1353         (WebCore::TextResourceDecoder::checkForHeadCharset):
1354         * platform/TextDecoder.cpp:
1355         (WebCore::TextDecoder::checkForBOM):
1356         * platform/TextDecoder.h:
1357         * platform/TextEncoding.cpp:
1358         (WebCore::UTF32BigEndianEncoding):
1359         (WebCore::UTF32LittleEndianEncoding):
1360         * platform/TextEncoding.h:
1361
1362 2007-07-06  Holger Hans Peter Freyther  <zecke@selfish.org>
1363
1364         Reviewed by Maciej.
1365
1366         Start implementening RenderThemeGdk/Gtk using GtkStyle. The approach is
1367         to allocate one native control for each widget type. And use margins, spacing,
1368         style properties from the Widget. And for drawing use GtkStyle on the rect supplied.
1369
1370         This should allow nice integration and be relative resource friendly. Mozilla is using
1371         a similiar approach. They seem to share the GdkPixmap among several operations and this
1372         will be an obvious candidate for improvements. Create a normally big enough GdkPixmap and
1373         use that for drawing and then set clip regions for cairo to make sure to not go beyond the
1374         width and height.
1375
1376         The next steps will be to introduce states for the widgets, add more widgets, handle focus,
1377         and various other style attributes, honor the size and margin and use that to propagate this
1378         back to RenderStyle*.
1379
1380         * platform/gdk/RenderThemeGdk.cpp:
1381         (WebCore::RenderThemeGdk::RenderThemeGdk):
1382         (WebCore::RenderThemeGdk::setCheckboxSize):
1383         (WebCore::RenderThemeGdk::paintCheckbox):
1384         (WebCore::RenderThemeGdk::setRadioSize):
1385         (WebCore::RenderThemeGdk::paintRadio):
1386         (WebCore::RenderThemeGdk::paintButton):
1387         (WebCore::RenderThemeGdk::copyToContext):
1388         (WebCore::RenderThemeGdk::gtkButton):
1389         (WebCore::RenderThemeGdk::gtkCheckbox):
1390         (WebCore::RenderThemeGdk::gtkRadioButton):
1391         (WebCore::RenderThemeGdk::gtkWindowContainer):
1392         * platform/gdk/RenderThemeGdk.h:
1393
1394 2007-07-06  Rob Buis  <buis@kde.org>
1395
1396         Reviewed by Adam.
1397
1398         http://bugs.webkit.org/show_bug.cgi?id=14442
1399         Adding a stop with value 1.0 to a gradient that has already been used has no effect
1400
1401         Implement start and end stop handling differently so they are not
1402         in the color stop array.
1403
1404         * html/CanvasGradient.cpp:
1405         (WebCore::compareStops):
1406         (WebCore::CanvasGradient::getColor):
1407         (WebCore::CanvasGradient::findStop):
1408
1409 2007-07-06  Adam Roben  <aroben@apple.com>
1410
1411         Fix <rdar://problem/5301994> Garbled text still showing on some sites
1412
1413         Replace calls to GetGlyphIndices with wkGetGlyphs.
1414
1415         Reviewed by Alice.
1416
1417         * platform/win/GlyphPageTreeNodeWin.cpp:
1418         (WebCore::GlyphPage::fill): Use wkGetGlyphs.
1419         * platform/win/FontDataWin.cpp:
1420         (WebCore::FontData::containsCharacters):
1421
1422 2007-07-06  Matt Lilek  <pewtermoose@gmail.com>
1423
1424         Not reviewed - Windows build fix.
1425
1426         * bridge/win/FrameWin.cpp:
1427         (WebCore::imageFromSelection):
1428
1429 2007-07-06  George Staikos  <staikos@kde.org>
1430
1431         Reviewed by Maciej.
1432
1433         Switch USE(ICONDATABASE) to ENABLE(ICONDATABASE) and activate the
1434         flag via the .pro file
1435
1436         * WebCore.pro:
1437         * loader/icon/IconDatabase.h:
1438
1439 2007-07-05  John Sullivan  <sullivan@apple.com>
1440
1441         Reviewed by Adam
1442
1443         - WebCore part of fix for <rdar://problem/5315033>
1444
1445         * rendering/RenderObject.h:
1446         replaced PaintRestrictionSelectionOnlyWhiteText with PaintRestrictionSelectionOnlyBlackText
1447         (WebCore::RenderObject::PaintInfo::PaintInfo):
1448         replaced forceWhiteText with forceBlackText
1449
1450         * rendering/RenderObject.cpp:
1451         (WebCore::RenderObject::addLineBoxRects):
1452         added a useSelectionHeight parameter, which defaults to false; this method is unimplemented
1453         at this level so this has no effect.
1454
1455         * rendering/RenderText.h:
1456         * rendering/RenderText.cpp:
1457         (WebCore::RenderText::addLineBoxRects):
1458         added a useSelectionHeight parameter, which defaults to false. If true, use the vertical position
1459         and height returned by selectionRect rather than replacing it with the more tight-fitting position
1460         and height of the line box.
1461
1462         * dom/Range.h:
1463         * dom/Range.cpp:
1464         (WebCore::Range::addLineBoxRects):
1465         added a useSelectionHeight parameter, which defaults to false. Passes this along to RenderObject.        
1466
1467         * page/Frame.h:
1468         renamed parameter to selectionImage
1469         * page/Frame.cpp:
1470         (WebCore::Frame::selectionTextRects):
1471         pass true for addLineBoxRects new useSelectionHeight parameter, so the rects returned by this new
1472         method will match the height that the selection would be painted here
1473         (WebCore::Frame::paint):
1474         updated for white->black name changes
1475         
1476         * page/mac/FrameMac.mm:
1477         (WebCore::Frame::selectionImage):
1478         updated for white->black name changes
1479         
1480         * rendering/InlineFlowBox.cpp:
1481         (WebCore::InlineFlowBox::paintTextDecorations):
1482         updated for white->black name changes
1483
1484         * rendering/RenderLayer.cpp:
1485         (WebCore::RenderLayer::paintLayer):
1486         updated for white->black name changes
1487
1488         * rendering/InlineTextBox.cpp:
1489         (WebCore::InlineTextBox::paint):
1490         updated for white->black name changes, and actually use black instead of white. This was the goal
1491         of all the name changes.
1492
1493 2007-07-05  Anders Carlsson  <andersca@apple.com>
1494
1495         Reviewed by Oliver.
1496
1497         Fix layout test failures.
1498         
1499         * loader/FrameLoader.cpp:
1500         (WebCore::FrameLoader::commitProvisionalLoad):
1501         Don't make a representation if we're creating the initial document.
1502
1503 2007-07-05  Alp Toker  <alp.toker@collabora.co.uk>
1504
1505         Fix Bug 14388: Input in text fields limited to 1024 characters
1506         http://bugs.webkit.org/show_bug.cgi?id=14388
1507
1508         Slightly modified by Adam Roben.
1509
1510         Reviewed by Adele.
1511
1512         Tests: fast/forms/input-implicit-length-limit.html
1513                fast/forms/input-maxlength.html
1514
1515         * html/HTMLInputElement.cpp: Bump limit to 524288.
1516         (WebCore::HTMLInputElement::init):
1517         (WebCore::HTMLInputElement::parseMappedAttribute):
1518         * html/HTMLInputElement.h:
1519
1520 2007-07-05  Anders Carlsson  <andersca@apple.com>
1521
1522         Build fix.
1523         
1524         * loader/FrameLoader.cpp:
1525         (WebCore::FrameLoader::init):
1526
1527 2007-07-05  Sam Weinig  <sam@webkit.org>
1528
1529         Reviewed by Geoff.
1530
1531         Add focus, blur and close functions to DOMWindow implementation class
1532         and move bindings from Window to JSDOMWindow.
1533
1534         * bindings/js/JSDOMWindowCustom.cpp:
1535         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
1536         * bindings/js/kjs_window.cpp:
1537         (KJS::Window::getOwnPropertySlot):
1538         (KJS::WindowFunc::callAsFunction):
1539         * bindings/js/kjs_window.h:
1540         (KJS::Window::):
1541         * bindings/scripts/CodeGeneratorJS.pm: Move prototype function declaration from
1542         the implementation to the header.
1543         * page/DOMWindow.cpp:
1544         (WebCore::DOMWindow::focus):
1545         (WebCore::DOMWindow::blur):
1546         (WebCore::DOMWindow::close):
1547         * page/DOMWindow.h:
1548         * page/DOMWindow.idl:
1549
1550 2007-07-05  Justin Garcia  <justin.garcia@apple.com>
1551
1552         Reviewed by Harrison.
1553
1554         <rdar://problem/5279521> REGRESSION: In Mail, a crash occurs at WebCore::Range::startPosition() when attempting to apply alignment to selected image/text in message body
1555
1556         * editing/TextIterator.cpp:
1557         (WebCore::TextIterator::exitNode): Previously emitted content shouldn't have
1558         to come from a text node in order to emit a '\n' as we exit block containers.
1559
1560 2007-07-05  Anders Carlsson  <andersca@apple.com>
1561
1562         Reviewed by Geoff.
1563
1564         <rdar://problem/5315284> REGRESSION: Leopard Launch Time - plugins are being accessed at startup.
1565
1566         Set a response that has a MIME type of "text/html" on the document loader so WebKit won't refresh the 
1567         plugin database looking for a plug-in that can handle the document's MIME type (which will be null anyway).
1568                  
1569         * loader/FrameLoader.cpp:
1570         (WebCore::FrameLoader::init):
1571
1572 2007-07-05  Anders Carlsson  <andersca@apple.com>
1573
1574         Reviewed by Oliver.
1575
1576         <rdar://problem/5106788>
1577         WebKit loads user style sheets too late as seen in Mail (breaks DataDetectors; Mail flashes wrong font)
1578
1579         Let the document know when the user style sheet is loading so that it try not to display anything
1580         until the user style sheet has finished loading.
1581         
1582         * page/Frame.cpp:
1583         (WebCore::UserStyleSheetLoader::UserStyleSheetLoader):
1584         (WebCore::UserStyleSheetLoader::~UserStyleSheetLoader):
1585         (WebCore::UserStyleSheetLoader::setCSSStyleSheet):
1586         (WebCore::Frame::setUserStyleSheetLocation):
1587
1588 2007-07-05  Sam Weinig  <sam@webkit.org>
1589
1590         Reviewed by Darin.
1591
1592         Move JSDOMWindow overriding getOwnPropertySlot logic from KJS::Window
1593         up into JSDOMWindow.  No change in functionality so no testcase required. 
1594
1595         * bindings/js/JSDOMWindowCustom.cpp:
1596         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
1597         * bindings/js/kjs_window.cpp:
1598         (KJS::Window::getOwnPropertySlot):
1599         * bindings/js/kjs_window.h:
1600
1601 2007-07-05  Mitz Pettel  <mitz@webkit.org>
1602
1603         Reviewed and Landed by Sam.
1604
1605         - fix bug 14465 for window.showModalDialog
1606
1607         * bindings/js/kjs_window.cpp:
1608         (KJS::parseModalDialogFeatures):
1609         (KJS::showModalDialog):
1610
1611 2007-07-05  Sam Weinig  <sam@webkit.org>
1612
1613         Reviewed by Mitz.
1614
1615         Patch for http://bugs.webkit.org/show_bug.cgi?id=14465
1616         window.open() uses the literal "undefined" as the URL
1617
1618         * bindings/js/kjs_window.cpp:
1619         (KJS::WindowFunc::callAsFunction): add checks for undefined and null values when setting the url.
1620         * manual-tests/open-url-undefined.html: Added.
1621
1622 2007-07-05  Holger Hans Peter Freyther  <zecke@selfish.org>
1623
1624         Reviewed by Rob Buis.
1625
1626         Rework FontData and FontPlatformData for the Gdk work to make valgrind
1627         happy.
1628
1629         Move destroying of FontConfig and Cairo objects held in FontPlatformData
1630         to FontData::platformDestroy. The ownership of these objects is held by
1631         FontData. This is following the Mac and Qt port at least.
1632
1633         Currently it is possible that FontPlatformData will not create cairo resources
1634         in this case at least make sure the variables are initialized to 0.
1635         Initialize x,y of the cairo_glyph_t with zero to avoid extents.x_advance depending
1636         on subtracing with not defined values.
1637
1638         FontPlatformData::hash. Using FontDescription is a bad idea as we don't have a clue
1639         about how it is packed, if holes are present, etc. The FcPattern and the m_fontMatrix
1640         should be good enough to describe the Font. All other objects are created using these
1641         variables
1642
1643         Replace C-style casts with C++ casts, in this case reinterpret_cast.
1644
1645         * platform/gdk/FontDataGdk.cpp:
1646         (WebCore::FontData::platformInit): Don't assert
1647         (WebCore::FontData::platformDestroy): Take over ownership
1648         (WebCore::FontData::platformWidthForGlyph): initialize
1649         (WebCore::FontData::setFont): be paranoid and assert
1650         * platform/gdk/FontPlatformData.h:
1651         (WebCore::FontPlatformData::FontPlatformData): Initialize everything
1652         (WebCore::FontPlatformData::hash): make valgrind happy and don't use m_fontDescription
1653         * platform/gdk/FontPlatformDataGdk.cpp:
1654         (WebCore::FontPlatformData::FontPlatformData):
1655         (WebCore::FontPlatformData::~FontPlatformData): FontData::platformDestroy will do this
1656         (WebCore::FontPlatformData::list): Don't use C-style casts.
1657         (WebCore::FontPlatformData::setFont): m_fontFace, m_fontMatrix, m_options might not be initialized
1658         (WebCore::FontPlatformData::operator==): Don't use C-style casts.
1659
1660 2007-07-05  Alp Toker  <alp.toker@collabora.co.uk>
1661
1662         Reviewed by Mark Rowe.
1663
1664         http://bugs.webkit.org/show_bug.cgi?id=14445
1665         GraphicsContextCairo code style cleanup
1666
1667         Follow the cr naming convention for cairo_t*.
1668         Remove trailing whitespace.
1669         Replace C casts with C++ casts.
1670         Avoid needless casts.
1671
1672         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1673         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
1674         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
1675         (WebCore::GraphicsContext::GraphicsContext):
1676         (WebCore::GraphicsContext::platformContext):
1677         (WebCore::GraphicsContext::savePlatformState):
1678         (WebCore::GraphicsContext::restorePlatformState):
1679         (WebCore::GraphicsContext::drawRect):
1680         (WebCore::adjustLineToPixelBoundaries):
1681         (WebCore::GraphicsContext::drawLine):
1682         (WebCore::GraphicsContext::drawEllipse):
1683         (WebCore::GraphicsContext::strokeArc): Save/restore the graphics state.
1684         (WebCore::GraphicsContext::drawConvexPolygon):
1685         (WebCore::GraphicsContext::fillRect):
1686         (WebCore::GraphicsContext::clip):
1687         (WebCore::GraphicsContext::drawFocusRing):
1688         (WebCore::GraphicsContext::roundToDevicePixels):
1689         (WebCore::GraphicsContext::translate):
1690         (WebCore::GraphicsContext::origin):
1691         (WebCore::GraphicsContext::setPlatformStrokeThickness):
1692         (WebCore::GraphicsContext::setPlatformStrokeStyle):
1693         (WebCore::GraphicsContext::setPlatformFont):
1694         (WebCore::GraphicsContext::concatCTM):
1695         (WebCore::GraphicsContext::addInnerRoundedRectClip):
1696         (WebCore::GraphicsContext::beginTransparencyLayer):
1697         (WebCore::GraphicsContext::endTransparencyLayer):
1698         (WebCore::GraphicsContext::clearRect):
1699         (WebCore::GraphicsContext::setLineCap):
1700         (WebCore::GraphicsContext::setLineJoin):
1701         (WebCore::GraphicsContext::setMiterLimit):
1702         (WebCore::GraphicsContext::setCompositeOperation):
1703         (WebCore::GraphicsContext::beginPath):
1704         (WebCore::GraphicsContext::addPath):
1705         (WebCore::GraphicsContext::rotate):
1706         (WebCore::GraphicsContext::scale):
1707         * platform/graphics/cairo/ImageBufferCairo.cpp:
1708         (WebCore::ImageBuffer::ImageBuffer):
1709         * platform/graphics/cairo/ImageCairo.cpp: Avoid the confusing ctxt/context naming scheme.
1710         (WebCore::BitmapImage::draw):
1711         (WebCore::Image::drawPattern):
1712
1713 2007-07-05  Alp Toker  <alp.toker@collabora.co.uk>
1714
1715         Reviewed by Mark Rowe.
1716
1717         http://bugs.webkit.org/show_bug.cgi?id=14531
1718         Cairo SVGImage::nativeImageForCurrentFrame() has no return
1719
1720         Return the Cairo surface from the frame cache.
1721
1722         Also add a fall-through else macro with notImplemented() so that future
1723         ports do not make the same mistake.
1724
1725         * platform/graphics/svg/SVGImage.cpp:
1726         (WebCore::SVGImage::nativeImageForCurrentFrame):
1727
1728 2007-07-05  Alp Toker  <alp.toker@collabora.co.uk>
1729
1730         Reviewed by Mark Rowe.
1731
1732         http://bugs.webkit.org/show_bug.cgi?id=14513
1733         Cairo animated GIF support is broken
1734
1735         Implement ImageSource::frameIsCompleteAtIndex() to enable animated GIFs.
1736
1737         * platform/graphics/cairo/ImageSourceCairo.cpp:
1738         (WebCore::ImageSource::frameIsCompleteAtIndex):
1739
1740 2007-07-04  Matt Perry  <mpComplete@gmail.com>
1741
1742         Reviewed by Adam.
1743
1744         Fix for http://bugs.webkit.org/show_bug.cgi?id=13400
1745         Bug 13400: REGRESSION (r20809-20814): No back entry created for navigations created by assigning to document.location
1746         <rdar://problem/5153025>
1747
1748         Treat userGesture as always true for setLocation, forcing a back/forward
1749         entry to be created.
1750
1751         * bindings/js/JSHTMLDocumentCustom.cpp:
1752         (WebCore::JSHTMLDocument::setLocation):
1753
1754 2007-07-04  Adam Roben  <aroben@apple.com>
1755
1756         Restore MouseEventWithHitTestResults::targetNode's old behavior
1757
1758         Reviewed by Mark.
1759
1760         Fixes fast/images/imagemap-case and fast/replace/image-map.
1761
1762         * page/MouseEventWithHitTestResults.cpp:
1763         (WebCore::MouseEventWithHitTestResults::targetNode): Use the inner
1764         node, not the inner non-shared node.
1765
1766 2007-07-04  Adam Roben  <aroben@apple.com>
1767
1768         Mac, Qt, and Gdk build fixes.
1769
1770         * page/EventHandler.h:
1771         * page/gdk/EventHandlerGdk.cpp:
1772         * page/mac/EventHandlerMac.mm:
1773         (WebCore::EventHandler::passSubframeEventToSubframe):
1774         * page/qt/EventHandlerQt.cpp:
1775
1776 2007-07-04  Adam Roben  <aroben@apple.com>
1777
1778         Fix the Qt/Gdk builds.
1779
1780         * page/gdk/EventHandlerGdk.cpp:
1781         * page/qt/EventHandlerQt.cpp:
1782
1783 2007-07-04  Adam Roben  <aroben@apple.com>
1784
1785         Move tooltip logic down into WebCore so that it can be shared cross-platform
1786
1787         Reviewed by Sam.
1788
1789         * page/Chrome.cpp:
1790         (WebCore::Chrome::setToolTip): Added.
1791         * page/Chrome.h:
1792         * page/ChromeClient.h:
1793         * page/EventHandler.cpp:
1794         (WebCore::EventHandler::mouseMoved): Call Chrome::setToolTip.
1795         * platform/graphics/svg/SVGImageEmptyClients.h:
1796
1797         Added stubs for Gdk:
1798
1799         * platform/gdk/ChromeClientGdk.h:
1800         * platform/gdk/TemporaryLinkStubs.cpp:
1801         (ChromeClientGdk::setToolTip):
1802
1803 2007-07-04  Adam Roben  <aroben@apple.com>
1804
1805         Add Settings::showsURLsInToolTips
1806
1807         Reviewed by Sam.
1808
1809         * WebCore.exp:
1810         * page/Settings.cpp:
1811         (WebCore::Settings::Settings):
1812         * page/Settings.h:
1813
1814 2007-07-04  Adam Roben  <aroben@apple.com>
1815
1816         Move logic for calling mouseDidMoveOverElement into WebCore
1817
1818         Reviewed by Sam.
1819
1820         * page/EventHandler.cpp:
1821         (WebCore::EventHandler::mouseMoved): Added. Calls Chrome::mouseDidMoveOverElement.
1822         (WebCore::EventHandler::handleMouseMoveEvent): Now takes an optional
1823         HitTestResult* parameter which is used to communicate to the caller the
1824         node the mouse is over.
1825         * page/EventHandler.h:
1826         * page/mac/EventHandlerMac.mm:
1827         (WebCore::EventHandler::mouseMoved): Changed to call the overloaded
1828         mouseMoved().
1829         (WebCore::EventHandler::passMouseMoveEventToSubframe): Pass hoveredNode
1830         through to the subframe so we can get the deepest node hovered, not
1831         just the node's parent frame.
1832         * page/win/EventHandlerWin.cpp:
1833         (WebCore::EventHandler::passMouseMoveEventToSubframe): Ditto.
1834
1835 2007-07-04  Adam Roben  <aroben@apple.com>
1836
1837         Add Chrome::mouseDidMoveOverElement
1838
1839         This does the work of calling up to the ChromeClient (which will call
1840         the UI delegate).
1841
1842         Reviewed by Sam.
1843
1844         * page/Chrome.cpp:
1845         (WebCore::Chrome::mouseDidMoveOverElement): Added.
1846         * page/Chrome.h:
1847         * page/ChromeClient.h:
1848         * platform/graphics/svg/SVGImageEmptyClients.h: Updated for change to
1849         ChromeClient.
1850         * platform/gdk/ChromeClientGdk.h:
1851         * platform/gdk/TemporaryLinkStubs.cpp:
1852         (ChromeClientGdk::mouseDidMoveOverElement):
1853
1854 2007-07-04  Adam Roben  <aroben@apple.com>
1855
1856         Changed PlatformMouseEvent to store the modifier flags of the event
1857
1858         Reviewed by Sam.
1859
1860         * platform/PlatformMouseEvent.h:
1861         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1862         * platform/mac/PlatformMouseEventMac.mm:
1863         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1864         * platform/win/PlatformMouseEventWin.cpp:
1865         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1866
1867 2007-07-04  Adam Roben  <aroben@apple.com>
1868
1869         Add HitTestResult::setToNonShadowAncestor
1870
1871         Reviewed by Sam.
1872
1873         * page/EventHandler.cpp:
1874         (WebCore::EventHandler::hitTestResultAtPoint): Moved logic into
1875         HitTestResult::setToNonShadowAncestor.
1876         * rendering/HitTestResult.cpp:
1877         (WebCore::HitTestResult::setToNonShadowAncestor):
1878         * rendering/HitTestResult.h:
1879
1880 2007-07-04  Adam Roben  <aroben@apple.com>
1881
1882         Change MouseEventWithHitTestResults to hold onto a HitTestResult
1883
1884         Reviewed by Sam.
1885
1886         * dom/Document.cpp:
1887         (WebCore::Document::prepareMouseEvent):
1888         * page/MouseEventWithHitTestResults.cpp:
1889         (WebCore::MouseEventWithHitTestResults::MouseEventWithHitTestResults):
1890         (WebCore::MouseEventWithHitTestResults::targetNode):
1891         (WebCore::MouseEventWithHitTestResults::localPoint):
1892         (WebCore::MouseEventWithHitTestResults::scrollbar):
1893         * page/MouseEventWithHitTestResults.h:
1894         (WebCore::MouseEventWithHitTestResults::event):
1895         (WebCore::MouseEventWithHitTestResults::hitTestResult):
1896
1897 2007-07-04  Matt Lilek  <pewtermoose@gmail.com>
1898
1899         Not reviewed, gdk build fix.
1900
1901         * platform/gdk/FrameGdk.cpp:
1902
1903 2007-07-05  Antti Koivisto  <antti@apple.com>
1904
1905         Reviewed by John.
1906         
1907         Fix Repro crash due to infinite recursion in HTMLParser::handleError @ youos.com
1908         <rdar://problem/5237811>
1909         
1910         It is possible to add table parts (thead etc) without table ancestor to a document fragment. If a new table element
1911         was added to such a part, as in
1912         
1913         div.innerHTML = '<tbody><table>';
1914         
1915         the parser error handling code would try to pop the previous table as normal. However since
1916         the table does not actually exist nothing would happen and parser would go to infinite recursion.
1917         
1918         Solution here is to pop table parts one by one when handling the error inside a fragment instead of trying to pop
1919         the table straight away (as it might not exist).
1920
1921         * html/HTMLParser.cpp:
1922         (WebCore::HTMLParser::handleError):
1923
1924 2007-07-04  Qing Zhao  <qing@staikos.net>
1925
1926         Reviewed by George Staikos.
1927
1928         Draw menulist (comboboxes) without text overlap on the button.
1929
1930         * platform/qt/RenderThemeQt.cpp:
1931         (WebCore::RenderThemeQt::setPopupPadding):
1932
1933 2007-07-04  George Staikos  <staikos@kde.org>
1934
1935         Compile
1936
1937         * page/qt/FrameQt.cpp:
1938         * WebCore.pro:
1939
1940 2007-07-04  Sam Weinig  <sam@webkit.org>
1941
1942         Reviewed by Mitz.
1943
1944         Patch for http://bugs.webkit.org/show_bug.cgi?id=14504
1945         REGRESSION (r23573): Amazon Book Excerpt can not be viewed in recent nightly
1946
1947         - Made it possible (again) to shadow window properties with local variable names.
1948
1949         Test: fast/dom/Window/window-property-shadowing.html
1950
1951         * bindings/js/JSDOMWindowCustom.cpp:
1952         (WebCore::JSDOMWindow::customPut):
1953         * bindings/js/kjs_window.cpp:
1954         (KJS::Window::put):
1955         * bindings/scripts/CodeGeneratorJS.pm:
1956         * page/DOMWindow.idl:
1957
1958 2007-07-03  Alice Liu  <alice.liu@apple.com>
1959
1960         Reviewed by Adam.
1961
1962         Fixed <rdar://problem/5225119> support smart pasting on Windows
1963
1964         * WebCore.vcproj/WebCore.vcproj:
1965         * WebCore.xcodeproj/project.pbxproj:
1966             Added new files
1967         * editing/SmartReplace.cpp: Added.
1968         (WebCore::isCharacterSmartReplaceExempt):
1969             Added non-CF implementation placeholder
1970         * editing/SmartReplace.h: Added.
1971         * editing/SmartReplaceCF.cpp: Added.
1972         (WebCore::getSmartSet):
1973         (WebCore::isCharacterSmartReplaceExempt):
1974             Added new implementation
1975
1976         * bridge/win/FrameWin.cpp:
1977         * page/Frame.h:
1978         * page/mac/FrameMac.mm:
1979             Removed old declaration and implementation
1980
1981         * editing/ReplaceSelectionCommand.cpp:
1982         (WebCore::ReplaceSelectionCommand::doApply):
1983             Changed to call the new function instead of old
1984
1985         * page/mac/WebCoreFrameBridge.h:
1986         * page/mac/WebCoreFrameBridge.mm:
1987             Removed old declaration and implementation
1988         (-[WebCoreFrameBridge smartInsertForString:replacingRange:beforeString:afterString:]):
1989             Changed to call the new function instead of old
1990
1991         * platform/win/PasteboardWin.cpp:
1992         (WebCore::Pasteboard::Pasteboard):
1993             Register new clipboard format
1994         (WebCore::Pasteboard::writeSelection):
1995             Set data for smartpaste format on clipboard
1996         (WebCore::Pasteboard::canSmartReplace):
1997             Added non-stub implementation
1998
1999 2007-07-04  Qing Zhao  <qing@staikos.net>
2000
2001         Reviewed by George Staikos.
2002
2003         Similar to the PlatformScrollbar fixes, adjust the painter to make the
2004         styler draw all subcontrols, and in this case the focus rect, in the
2005         proper location
2006
2007         * platform/qt/RenderThemeQt.cpp:
2008         (WebCore::RenderThemeQt::paintMenuList):
2009
2010 2007-07-04  Mitz Pettel  <mitz@webkit.org>
2011
2012         Reviewed by Maciej.
2013
2014         - fix http://bugs.webkit.org/show_bug.cgi?id=14495
2015           REGRESSION: Wrong cursor is displayed during drag and drop when text is selected
2016           <rdar://problem/5312384>
2017
2018         No test possible because DumpRenderTree cannot query the current cursor.
2019
2020         * page/EventHandler.cpp:
2021         (WebCore::EventHandler::selectCursor): Changed into a member function and
2022         added that if the last mouse down event could not have started a
2023         selection, then the cursor should not change to an I-beam unconditionally.
2024         (WebCore::EventHandler::handleMouseMoveEvent):
2025         * page/EventHandler.h:
2026
2027 2007-07-04  Holger Hans Peter Freyther  <zecke@selfish.org>
2028
2029         Reviewed by Rob Buis.
2030
2031         A little progress in tracking dependencies.
2032
2033         * WebCore.pro: Add DEPENDPATH for the Gdk port.
2034
2035 2007-07-03  Darin Adler  <darin@apple.com>
2036
2037         Reviewed by Tim Hatcher.
2038
2039         - fix <rdar://problem/5221297> Font family name in the cssText for a DOMCSSStyleDeclaration needs quotes
2040
2041         Test: editing/style/font-family-with-space.html
2042
2043         * css/FontFamilyValue.cpp:
2044         (WebCore::isValidCSSIdentifier): Added. Implements the same rule that the CSS lexer does.
2045         (WebCore::quoteStringIfNeeded): Changed to call isValidCSSIdentifier instead of just
2046         checking for a leading "#" character.
2047         * editing/markup.cpp:
2048         (WebCore::escapeTextForMarkup): Changed to take a String parameter for better efficiency.
2049         (WebCore::renderedText): Changed to return a String for better efficiency.
2050         (WebCore::addNamespace): Updated to pass String to escapeTextForMarkup.
2051         (WebCore::startMarkup): Updated to pass String to escapeTextForMarkup. Added missing call
2052         to escapeTextForMarkup in the special case for the style property.
2053         (WebCore::createMarkup): Changed from single quotes to double quotes and also added missing
2054         call to escapeTextForMarkup in two special cases for the style property.
2055
2056 2007-07-03  Sam Weinig  <sam@webkit.org>
2057
2058         Reviewed by Darin.
2059
2060         Twelfth round of fixes for implicit 64-32 bit conversion errors.
2061         <rdar://problem/5292262>
2062
2063         - Add casts and accompanying FIXMEs to avoid remaining compiler errors.
2064
2065         * WebCore.xcodeproj/project.pbxproj:
2066         * loader/FrameLoader.cpp:
2067         (WebCore::FrameLoader::opened):
2068         (WebCore::FrameLoader::sendRemainingDelegateMessages):
2069         * loader/FrameLoader.h:
2070         * loader/ResourceLoader.cpp:
2071         (WebCore::ResourceLoader::didReceiveData):
2072         * platform/network/mac/ResourceHandleMac.mm:
2073         (-[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:]):
2074         (-[WebCoreResourceHandleAsDelegate connection:willStopBufferingData:]):
2075         * platform/network/mac/ResourceResponseMac.mm:
2076         (WebCore::ResourceResponse::nsURLResponse):
2077
2078 2007-07-03  Anders Carlsson  <andersca@apple.com>
2079
2080         Reviewed by Adam.
2081
2082         <rdar://problem/5093862>
2083         Nothing shown in plugin area when trying to play content using the DivX plugin
2084         
2085         Defer calling SetWindow for the DivX plugin, just like we do with the WMP plugin.
2086                 
2087         * plugins/win/PluginViewWin.cpp:
2088         (WebCore::PluginViewWin::determineQuirks):
2089
2090 2007-07-03  Sam Weinig  <sam@webkit.org>
2091
2092         Reviewed by Brady Eidson.
2093
2094         Ninth round of fixes for implicit 64-32 bit conversion errors.
2095         <rdar://problem/5292262>
2096
2097         - Fix function signature to use unsigned long instead of unsigned long long.
2098
2099         * loader/ProgressTracker.cpp:
2100         (WebCore::ProgressTracker::completeProgress):
2101         * loader/ProgressTracker.h:
2102
2103 2007-07-03  Sam Weinig  <sam@webkit.org>
2104
2105         Reviewed by Oliver.
2106
2107         Eighth round of fixes for implicit 64-32 bit conversion errors.
2108         <rdar://problem/5292262>
2109
2110         - Convert SVG implementation files to use floats instead of doubles
2111           to match the spec/IDLs.
2112
2113         * bindings/scripts/CodeGeneratorJS.pm:
2114         * ksvg2/svg/SVGAngle.cpp:
2115         * ksvg2/svg/SVGAnimatedTemplate.h:
2116         * ksvg2/svg/SVGAnimationElement.cpp:
2117         (WebCore::SVGAnimationElement::getEndTime):
2118         (WebCore::SVGAnimationElement::getStartTime):
2119         (WebCore::SVGAnimationElement::getCurrentTime):
2120         (WebCore::SVGAnimationElement::getSimpleDuration):
2121         * ksvg2/svg/SVGAnimationElement.h:
2122         * ksvg2/svg/SVGFitToViewBox.cpp:
2123         (WebCore::SVGFitToViewBox::parseViewBox):
2124         * ksvg2/svg/SVGLength.cpp:
2125         (WebCore::SVGLength::setValueAsString):
2126         * ksvg2/svg/SVGLinearGradientElement.cpp:
2127         (WebCore::SVGLinearGradientElement::buildGradient):
2128         * ksvg2/svg/SVGMatrix.idl:
2129         * ksvg2/svg/SVGNumber.idl:
2130         * ksvg2/svg/SVGParserUtilities.cpp:
2131         (WebCore::SVGPathParser::parseSVG):
2132         (WebCore::SVGPathParser::calculateArc):
2133         (WebCore::SVGPathParser::svgLineToHorizontal):
2134         (WebCore::SVGPathParser::svgLineToVertical):
2135         (WebCore::SVGPathParser::svgCurveToCubicSmooth):
2136         (WebCore::SVGPathParser::svgCurveToQuadratic):
2137         (WebCore::SVGPathParser::svgCurveToQuadraticSmooth):
2138         (WebCore::SVGPathParser::svgArcTo):
2139         * ksvg2/svg/SVGParserUtilities.h:
2140         * ksvg2/svg/SVGPathElement.cpp:
2141         (WebCore::SVGPathElement::SVGPathElement):
2142         (WebCore::SVGPathElement::getTotalLength):
2143         (WebCore::SVGPathElement::getPointAtLength):
2144         (WebCore::SVGPathElement::getPathSegAtLength):
2145         (WebCore::SVGPathElement::createSVGPathSegMovetoAbs):
2146         (WebCore::SVGPathElement::createSVGPathSegMovetoRel):
2147         (WebCore::SVGPathElement::createSVGPathSegLinetoAbs):
2148         (WebCore::SVGPathElement::createSVGPathSegLinetoRel):
2149         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs):
2150         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel):
2151         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs):
2152         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel):
2153         (WebCore::SVGPathElement::createSVGPathSegArcAbs):
2154         (WebCore::SVGPathElement::createSVGPathSegArcRel):
2155         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs):
2156         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel):
2157         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs):
2158         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel):
2159         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs):
2160         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel):
2161         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs):
2162         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel):
2163         (WebCore::SVGPathElement::svgMoveTo):
2164         (WebCore::SVGPathElement::svgLineTo):
2165         (WebCore::SVGPathElement::svgLineToHorizontal):
2166         (WebCore::SVGPathElement::svgLineToVertical):
2167         (WebCore::SVGPathElement::svgCurveToCubic):
2168         (WebCore::SVGPathElement::svgCurveToCubicSmooth):
2169         (WebCore::SVGPathElement::svgCurveToQuadratic):
2170         (WebCore::SVGPathElement::svgCurveToQuadraticSmooth):
2171         (WebCore::SVGPathElement::svgArcTo):
2172         (WebCore::SVGPathElement::parseMappedAttribute):
2173         * ksvg2/svg/SVGPathElement.h:
2174         * ksvg2/svg/SVGPathSegArc.cpp:
2175         (WebCore::SVGPathSegArcAbs::SVGPathSegArcAbs):
2176         (WebCore::SVGPathSegArcAbs::setX):
2177         (WebCore::SVGPathSegArcAbs::x):
2178         (WebCore::SVGPathSegArcAbs::setY):
2179         (WebCore::SVGPathSegArcAbs::y):
2180         (WebCore::SVGPathSegArcAbs::setR1):
2181         (WebCore::SVGPathSegArcAbs::r1):
2182         (WebCore::SVGPathSegArcAbs::setR2):
2183         (WebCore::SVGPathSegArcAbs::r2):
2184         (WebCore::SVGPathSegArcAbs::setAngle):
2185         (WebCore::SVGPathSegArcAbs::angle):
2186         (WebCore::SVGPathSegArcRel::SVGPathSegArcRel):
2187         (WebCore::SVGPathSegArcRel::setX):
2188         (WebCore::SVGPathSegArcRel::x):
2189         (WebCore::SVGPathSegArcRel::setY):
2190         (WebCore::SVGPathSegArcRel::y):
2191         (WebCore::SVGPathSegArcRel::setR1):
2192         (WebCore::SVGPathSegArcRel::r1):
2193         (WebCore::SVGPathSegArcRel::setR2):
2194         (WebCore::SVGPathSegArcRel::r2):
2195         (WebCore::SVGPathSegArcRel::setAngle):
2196         (WebCore::SVGPathSegArcRel::angle):
2197         * ksvg2/svg/SVGPathSegArc.h:
2198         * ksvg2/svg/SVGPathSegCurvetoCubic.cpp:
2199         (WebCore::SVGPathSegCurvetoCubicAbs::SVGPathSegCurvetoCubicAbs):
2200         (WebCore::SVGPathSegCurvetoCubicAbs::setX):
2201         (WebCore::SVGPathSegCurvetoCubicAbs::x):
2202         (WebCore::SVGPathSegCurvetoCubicAbs::setY):
2203         (WebCore::SVGPathSegCurvetoCubicAbs::y):
2204         (WebCore::SVGPathSegCurvetoCubicAbs::setX1):
2205         (WebCore::SVGPathSegCurvetoCubicAbs::x1):
2206         (WebCore::SVGPathSegCurvetoCubicAbs::setY1):
2207         (WebCore::SVGPathSegCurvetoCubicAbs::y1):
2208         (WebCore::SVGPathSegCurvetoCubicAbs::setX2):
2209         (WebCore::SVGPathSegCurvetoCubicAbs::x2):
2210         (WebCore::SVGPathSegCurvetoCubicAbs::setY2):
2211         (WebCore::SVGPathSegCurvetoCubicAbs::y2):
2212         (WebCore::SVGPathSegCurvetoCubicRel::SVGPathSegCurvetoCubicRel):
2213         (WebCore::SVGPathSegCurvetoCubicRel::setX):
2214         (WebCore::SVGPathSegCurvetoCubicRel::x):
2215         (WebCore::SVGPathSegCurvetoCubicRel::setY):
2216         (WebCore::SVGPathSegCurvetoCubicRel::y):
2217         (WebCore::SVGPathSegCurvetoCubicRel::setX1):
2218         (WebCore::SVGPathSegCurvetoCubicRel::x1):
2219         (WebCore::SVGPathSegCurvetoCubicRel::setY1):
2220         (WebCore::SVGPathSegCurvetoCubicRel::y1):
2221         (WebCore::SVGPathSegCurvetoCubicRel::setX2):
2222         (WebCore::SVGPathSegCurvetoCubicRel::x2):
2223         (WebCore::SVGPathSegCurvetoCubicRel::setY2):
2224         (WebCore::SVGPathSegCurvetoCubicRel::y2):
2225         * ksvg2/svg/SVGPathSegCurvetoCubic.h:
2226         * ksvg2/svg/SVGPathSegCurvetoCubicSmooth.cpp:
2227         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::SVGPathSegCurvetoCubicSmoothAbs):
2228         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::setX):
2229         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::x):
2230         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::setY):
2231         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::y):
2232         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::setX2):
2233         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::x2):
2234         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::setY2):
2235         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::y2):
2236         (WebCore::SVGPathSegCurvetoCubicSmoothRel::SVGPathSegCurvetoCubicSmoothRel):
2237         (WebCore::SVGPathSegCurvetoCubicSmoothRel::setX):
2238         (WebCore::SVGPathSegCurvetoCubicSmoothRel::x):
2239         (WebCore::SVGPathSegCurvetoCubicSmoothRel::setY):
2240         (WebCore::SVGPathSegCurvetoCubicSmoothRel::y):
2241         (WebCore::SVGPathSegCurvetoCubicSmoothRel::setX2):
2242         (WebCore::SVGPathSegCurvetoCubicSmoothRel::x2):
2243         (WebCore::SVGPathSegCurvetoCubicSmoothRel::setY2):
2244         (WebCore::SVGPathSegCurvetoCubicSmoothRel::y2):
2245         * ksvg2/svg/SVGPathSegCurvetoCubicSmooth.h:
2246         * ksvg2/svg/SVGPathSegCurvetoQuadratic.cpp:
2247         (WebCore::SVGPathSegCurvetoQuadraticAbs::SVGPathSegCurvetoQuadraticAbs):
2248         (WebCore::SVGPathSegCurvetoQuadraticAbs::setX):
2249         (WebCore::SVGPathSegCurvetoQuadraticAbs::x):
2250         (WebCore::SVGPathSegCurvetoQuadraticAbs::setY):
2251         (WebCore::SVGPathSegCurvetoQuadraticAbs::y):
2252         (WebCore::SVGPathSegCurvetoQuadraticAbs::setX1):
2253         (WebCore::SVGPathSegCurvetoQuadraticAbs::x1):
2254         (WebCore::SVGPathSegCurvetoQuadraticAbs::setY1):
2255         (WebCore::SVGPathSegCurvetoQuadraticAbs::y1):
2256         (WebCore::SVGPathSegCurvetoQuadraticRel::SVGPathSegCurvetoQuadraticRel):
2257         (WebCore::SVGPathSegCurvetoQuadraticRel::setX):
2258         (WebCore::SVGPathSegCurvetoQuadraticRel::x):
2259         (WebCore::SVGPathSegCurvetoQuadraticRel::setY):
2260         (WebCore::SVGPathSegCurvetoQuadraticRel::y):
2261         (WebCore::SVGPathSegCurvetoQuadraticRel::setX1):
2262         (WebCore::SVGPathSegCurvetoQuadraticRel::x1):
2263         (WebCore::SVGPathSegCurvetoQuadraticRel::setY1):
2264         (WebCore::SVGPathSegCurvetoQuadraticRel::y1):
2265         * ksvg2/svg/SVGPathSegCurvetoQuadratic.h:
2266         (WebCore::SVGPathSegCurvetoQuadraticRel::toString):
2267         * ksvg2/svg/SVGPathSegCurvetoQuadraticSmooth.cpp:
2268         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::SVGPathSegCurvetoQuadraticSmoothAbs):
2269         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::setX):
2270         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::x):
2271         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::setY):
2272         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::y):
2273         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::SVGPathSegCurvetoQuadraticSmoothRel):
2274         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::setX):
2275         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::x):
2276         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::setY):
2277         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::y):
2278         * ksvg2/svg/SVGPathSegCurvetoQuadraticSmooth.h:
2279         * ksvg2/svg/SVGPathSegLineto.cpp:
2280         (WebCore::SVGPathSegLinetoAbs::SVGPathSegLinetoAbs):
2281         (WebCore::SVGPathSegLinetoAbs::setX):
2282         (WebCore::SVGPathSegLinetoAbs::x):
2283         (WebCore::SVGPathSegLinetoAbs::setY):
2284         (WebCore::SVGPathSegLinetoAbs::y):
2285         (WebCore::SVGPathSegLinetoRel::SVGPathSegLinetoRel):
2286         (WebCore::SVGPathSegLinetoRel::setX):
2287         (WebCore::SVGPathSegLinetoRel::x):
2288         (WebCore::SVGPathSegLinetoRel::setY):
2289         (WebCore::SVGPathSegLinetoRel::y):
2290         * ksvg2/svg/SVGPathSegLineto.h:
2291         * ksvg2/svg/SVGPathSegLinetoHorizontal.cpp:
2292         (WebCore::SVGPathSegLinetoHorizontalAbs::SVGPathSegLinetoHorizontalAbs):
2293         (WebCore::SVGPathSegLinetoHorizontalAbs::setX):
2294         (WebCore::SVGPathSegLinetoHorizontalAbs::x):
2295         (WebCore::SVGPathSegLinetoHorizontalRel::SVGPathSegLinetoHorizontalRel):
2296         (WebCore::SVGPathSegLinetoHorizontalRel::setX):
2297         (WebCore::SVGPathSegLinetoHorizontalRel::x):
2298         * ksvg2/svg/SVGPathSegLinetoHorizontal.h:
2299         * ksvg2/svg/SVGPathSegLinetoVertical.cpp:
2300         (WebCore::SVGPathSegLinetoVerticalAbs::SVGPathSegLinetoVerticalAbs):
2301         (WebCore::SVGPathSegLinetoVerticalAbs::setY):
2302         (WebCore::SVGPathSegLinetoVerticalAbs::y):
2303         (WebCore::SVGPathSegLinetoVerticalRel::SVGPathSegLinetoVerticalRel):
2304         (WebCore::SVGPathSegLinetoVerticalRel::setY):
2305         (WebCore::SVGPathSegLinetoVerticalRel::y):
2306         * ksvg2/svg/SVGPathSegLinetoVertical.h:
2307         * ksvg2/svg/SVGPathSegList.cpp:
2308         (WebCore::SVGPathSegList::getPathSegAtLength):
2309         * ksvg2/svg/SVGPathSegList.h:
2310         * ksvg2/svg/SVGPathSegMoveto.cpp:
2311         (WebCore::SVGPathSegMovetoAbs::SVGPathSegMovetoAbs):
2312         (WebCore::SVGPathSegMovetoAbs::setX):
2313         (WebCore::SVGPathSegMovetoAbs::x):
2314         (WebCore::SVGPathSegMovetoAbs::setY):
2315         (WebCore::SVGPathSegMovetoAbs::y):
2316         (WebCore::SVGPathSegMovetoRel::SVGPathSegMovetoRel):
2317         (WebCore::SVGPathSegMovetoRel::setX):
2318         (WebCore::SVGPathSegMovetoRel::x):
2319         (WebCore::SVGPathSegMovetoRel::setY):
2320         (WebCore::SVGPathSegMovetoRel::y):
2321         * ksvg2/svg/SVGPathSegMoveto.h:
2322         * ksvg2/svg/SVGPolyElement.cpp:
2323         (WebCore::SVGPolyElement::svgPolyTo):
2324         * ksvg2/svg/SVGRadialGradientElement.cpp:
2325         (WebCore::SVGRadialGradientElement::buildGradient):
2326         * ksvg2/svg/SVGSVGElement.cpp:
2327         (WebCore::SVGSVGElement::viewport):
2328         (WebCore::SVGSVGElement::getCurrentTime):
2329         * ksvg2/svg/SVGStopElement.cpp:
2330         (WebCore::SVGStopElement::SVGStopElement):
2331         (WebCore::SVGStopElement::parseMappedAttribute):
2332         * ksvg2/svg/SVGStopElement.h:
2333         * ksvg2/svg/SVGTransform.cpp:
2334         (SVGTransform::translate):
2335         (SVGTransform::scale):
2336         * ksvg2/svg/SVGTransformDistance.cpp:
2337         (WebCore::SVGTransformDistance::addToSVGTransform):
2338         (WebCore::SVGTransformDistance::distance):
2339         * ksvg2/svg/SVGTransformable.cpp:
2340         (WebCore::SVGTransformable::parseTransformAttribute):
2341
2342 2007-07-03  Anders Carlsson  <andersca@apple.com>
2343
2344         Reviewed by Darin.
2345
2346         <rdar://problem/5289718>
2347         http://bugs.webkit.org/show_bug.cgi?id=14437
2348         CrashTracer: [REGRESSION] 76 crashes in Safari at com.apple.WebCore: WebCore::Frame::settings const + 6 (14437)
2349         
2350         Based on a patch from Maxime Britto.
2351         
2352         * page/mac/WebCoreFrameBridge.mm:
2353         (-[WebCoreFrameBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
2354         If the script caused the frame to go away, return nil. This can only happen if a plugin in a subframe destroys
2355         its frame.
2356
2357         (-[WebCoreFrameBridge aeDescByEvaluatingJavaScriptFromString:]):
2358         ASSERT that this is only called on the main frame.
2359
2360 2007-07-03  John Sullivan  <sullivan@apple.com>
2361
2362         Written by Darin, reviewed by me
2363         
2364         - fixed <rdar://problem/5249730> REGRESSION (Leopard, around 9A464): Safari opens the same local 
2365           documents more than once due to canonicalization change
2366
2367         * loader/mac/LoaderNSURLExtras.m:
2368         (canonicalURL):
2369         pass URL through KURL so we get KURL's version of canonicalization as well as
2370         NSURLProtocol's version of canonicalization
2371
2372 2007-07-03  Sam Weinig  <sam@webkit.org>
2373
2374         Reviewed by Darin.
2375
2376         Seventh round of fixes for implicit 64-32 bit conversion errors.
2377         <rdar://problem/5292262>
2378
2379         - Adds more narrowPrecision functions to FloatPoint, FloatSize and FloatRect.
2380         - Changes over more implicit conversions to use new functions.
2381
2382         * bindings/js/kjs_window.cpp:
2383         (KJS::WindowFunc::callAsFunction):
2384         * platform/graphics/FloatPoint.cpp:
2385         (WebCore::FloatPoint::matrixTransform):
2386         (WebCore::FloatPoint::narrowPrecision):
2387         * platform/graphics/FloatPoint.h:
2388         * platform/graphics/FloatRect.cpp:
2389         (WebCore::FloatRect::narrowPrecision):
2390         * platform/graphics/FloatRect.h:
2391         * platform/graphics/FloatSize.cpp:
2392         (WebCore::FloatSize::narrowPrecision):
2393         * platform/graphics/FloatSize.h:
2394         * platform/graphics/Path.cpp:
2395         (WebCore::Path::createRoundedRectangle):
2396         (WebCore::Path::createRectangle):
2397         (WebCore::Path::createEllipse):
2398         * platform/graphics/mac/ColorMac.mm:
2399         (WebCore::nsColor):
2400         * platform/graphics/mac/IconMac.mm:
2401         (WebCore::Icon::paint):
2402         * platform/graphics/svg/cg/CgSupport.cpp:
2403         (WebCore::applyStrokeStyleToContext):
2404         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
2405         (WebCore::CGShadingRefForRadialGradient):
2406         (WebCore::SVGPaintServerGradient::updateQuartzGradientStopsCache):
2407         (WebCore::SVGPaintServerGradient::handleBoundingBoxModeAndGradientTransformation):
2408         * platform/graphics/svg/cg/SVGResourceMaskerCg.mm:
2409         (WebCore::applyLuminanceToAlphaFilter):
2410         (WebCore::applyExpandAlphatoGrayscaleFilter):
2411         (WebCore::transformImageIntoGrayscaleMask):
2412         * platform/mac/WebCoreTextRenderer.mm:
2413         (WebCoreDrawTextAtPoint):
2414         * rendering/RenderPath.cpp:
2415         (WebCore::RenderPath::mapAbsolutePointToLocal):
2416         * rendering/RenderSVGContainer.cpp:
2417         (WebCore::RenderSVGContainer::calcViewport):
2418         * rendering/RenderSVGImage.cpp:
2419         (WebCore::RenderSVGImage::nodeAtPoint):
2420         * rendering/RenderSVGText.cpp:
2421         (WebCore::RenderSVGText::relativeBBox):
2422
2423 2007-07-03  Anders Carlsson  <andersca@apple.com>
2424
2425         Reviewed by Adam.
2426
2427         <rdar://problem/5261523>
2428         Crash playing MP11 on cnbc.com
2429         
2430         The WMP Netscape plugin still creates a window even when windowless mode is turned on. Work around this by
2431         always removing the "windowlessvideo" parameter before passing it to the plugin.
2432         According to http://msdn2.microsoft.com/en-us/library/bb249373.aspx, "The windowlessVideo property is not 
2433         supported for Netscape Navigator. Setting a value for this property in Navigator may yield unexpected results."
2434         
2435         * plugins/win/PluginViewWin.cpp:
2436         (WebCore::PluginViewWndProc):
2437         (WebCore::PluginViewWin::paint):
2438         (WebCore::PluginViewWin::invalidateRect):
2439         (WebCore::PluginViewWin::determineQuirks):
2440         (WebCore::PluginViewWin::setParameters):
2441         (WebCore::PluginViewWin::PluginViewWin):
2442         (WebCore::PluginViewWin::init):
2443         * plugins/win/PluginViewWin.h:
2444         (WebCore::):
2445
2446 2007-07-03  Qing Zhao  <qing@staikos.net>
2447
2448         Reviewed by George Staikos.
2449
2450         Only draw sunken state for appropriate widgets. Not, for example, for
2451         lineedits.
2452
2453         * platform/qt/RenderThemeQt.cpp:
2454         (WebCore::RenderThemeQt::applyTheme):
2455
2456 2007-07-03  Antti Koivisto  <antti@apple.com>
2457
2458         Reviewed by Maciej.
2459         
2460         REGRESSION: misplaced selection ring remains after link is no longer focused.
2461         <rdar://problem/5205580>
2462         
2463         Fix placement of selection ring when part of the ring is in a different layer.
2464
2465         * rendering/RenderFlow.cpp:
2466         (WebCore::RenderFlow::addFocusRingRects): Get coordinates right when moving to a different layer.
2467         * rendering/RenderObject.cpp:
2468         (WebCore::RenderObject::setStyle): 
2469         Don't reset state variables when not necessary.  When repaint() was called at the end of setSyle() it would
2470         get repaint rects wrong in some cases.
2471
2472 2007-07-03  Antti Koivisto  <antti@apple.com>
2473
2474         Reviewed by Maciej.
2475
2476         Blind fix for CrashTracer: [USER] 25 crashes in Safari at com.apple.WebCore: WebCore::Frame::document const + 6
2477         <rdar://problem/5263939>
2478         
2479         No one has managed to reproduce this but it looks like null check is needed here. There are plausible ways
2480         m_frame could be null for a live FrameView object.
2481
2482         * page/FrameView.cpp:
2483         (WebCore::FrameView::needsLayout):
2484
2485 2007-07-02  Oliver Hunt  <oliver@apple.com>
2486
2487         Reviewed by Darin.
2488
2489         Fix for <rdar://problem/5098378> single-pixel image optimization needs to be rewritten to not depend on floating point bitmap
2490         Tested by fast/replaced/image-solid-color-with-alpha.html
2491
2492         Switch from float to byte based bitmap when pulling the color from 1x1 pixel images so
2493         that we can use the single pixel image optimisation in WebKit/win.
2494
2495         * platform/graphics/cg/ImageCG.cpp:
2496         (WebCore::BitmapImage::checkForSolidColor):
2497
2498 2007-07-02  Adam Roben  <aroben@apple.com>
2499
2500         Fix Bug 14498: RenderContainer::positionForCoordinates contains an order of operations error
2501         http://bugs.webkit.org/show_bug.cgi?id=14498
2502
2503         There were two bugs:
2504         1) xPos/yPos were flipped
2505         2) + binds tighter than ?:, so the order of operations was incorrect
2506
2507         Reviewed by Darin.
2508
2509         Test: fast/inline-block/14498-positionForCoordinates.html
2510
2511         * rendering/RenderContainer.cpp:
2512         (WebCore::RenderContainer::positionForCoordinates):
2513
2514 2007-07-02  Darin Adler  <darin@apple.com>
2515
2516         Reviewed by Kevin Decker and Tim Hatcher.
2517
2518         - fix <rdar://problem/5307906> some classes need finalize methods because
2519           of non-trivial work done in dealloc methods
2520
2521         * bindings/objc/DOMRGBColor.mm:
2522         (+[DOMRGBColor initialize]): Added. Tells finalizer to run on main thread,
2523         which is needed because we are sharing a CFDictionary here with no locking.
2524
2525         * bridge/mac/WebCoreAXObject.mm:
2526         (+[WebCoreAXObject initialize]): Added. Tells finalizer to run on main thread.
2527         (-[WebCoreAXObject finalize]): Added. Calls detach.
2528
2529         * WebCore.xcodeproj/project.pbxproj: Let Xcode do what it wants to do.
2530
2531 2007-07-02  Sam Weinig  <sam@webkit.org>
2532
2533         Reviewed by Darin.
2534
2535         Sixth round of fixes for implicit 64-32 bit conversion errors.
2536         <rdar://problem/5292262>
2537
2538         Use new narrowPrecisionToFloat() and narrowPrecisionToCGFloat() where
2539         appropriate.
2540
2541         * html/CanvasRenderingContext2D.cpp:
2542         (WebCore::CanvasRenderingContext2D::setShadow):
2543         (WebCore::CanvasRenderingContext2D::applyShadow):
2544         * html/CanvasStyle.cpp:
2545         (WebCore::CanvasStyle::applyStrokeColor):
2546         (WebCore::CanvasStyle::applyFillColor):
2547         * ksvg2/svg/SVGAngle.cpp:
2548         * ksvg2/svg/SVGAnimationElement.cpp:
2549         (WebCore::SVGAnimationElement::parseKeyNumbers):
2550         (WebCore::parseKeySplines):
2551         (WebCore::SVGAnimationElement::handleTimerEvent):
2552         (WebCore::SVGAnimationElement::updateAnimatedValueForElapsedSeconds):
2553         * ksvg2/svg/SVGPatternElement.cpp:
2554         (WebCore::SVGPatternElement::buildPattern):
2555         * ksvg2/svg/SVGRadialGradientElement.cpp:
2556         (WebCore::SVGRadialGradientElement::buildGradient):
2557         * platform/graphics/cg/AffineTransformCG.cpp:
2558         (WebCore::AffineTransform::AffineTransform):
2559         (WebCore::AffineTransform::setMatrix):
2560         (WebCore::AffineTransform::map):
2561         (WebCore::AffineTransform::setA):
2562         (WebCore::AffineTransform::setB):
2563         (WebCore::AffineTransform::setC):
2564         (WebCore::AffineTransform::setD):
2565         (WebCore::AffineTransform::setE):
2566         (WebCore::AffineTransform::setF):
2567         (WebCore::AffineTransform::scale):
2568         (WebCore::AffineTransform::rotate):
2569         (WebCore::AffineTransform::translate):
2570         (WebCore::AffineTransform::shear):
2571
2572 2007-07-02  John Sullivan  <sullivan@apple.com>
2573
2574         * page/mac/WebCoreFrameBridge.mm:
2575         (-[WebCoreFrameBridge getAllResourceDatas:andResponses:]):
2576         added a comment
2577
2578 2007-07-02  Sam Weinig  <sam@webkit.org>
2579
2580         Rubberstamped by Darin.
2581
2582         Rename FloatConversionUtilities.h to FloatConversion.h.
2583         Fix Win32 build.
2584
2585         * WebCore.vcproj/WebCore.vcproj:
2586         * WebCore.xcodeproj/project.pbxproj:
2587         * platform/DeprecatedString.cpp:
2588         * platform/FloatConversion.h: Copied from platform/FloatConversionUtilities.h.
2589         * platform/FloatConversionUtilities.h: Removed.
2590         * platform/StringImpl.cpp:
2591
2592 2007-07-02  Sam Weinig  <sam@webkit.org>
2593
2594         Reviewed by Darin.
2595
2596         Fifth round of fixes for implicit 64-32 bit conversion errors.
2597         <rdar://problem/5292262>
2598
2599         Add toFloat() method to string classes and use it where appropriate.
2600
2601         * WebCore.xcodeproj/project.pbxproj:
2602         * css/cssparser.cpp:
2603         (WebCore::CSSParser::lex):
2604         * ksvg2/svg/SVGAngle.cpp:
2605         (WebCore::SVGAngle::setValueAsString):
2606         * platform/AtomicString.h:
2607         (WebCore::AtomicString::toFloat):
2608         * platform/DeprecatedString.cpp:
2609         (WebCore::DeprecatedString::toFloat):
2610         * platform/DeprecatedString.h:
2611         * platform/FloatConversionUtilities.h: Added.
2612         (WebCore::narrowPrecisionToFloat):
2613         (WebCore::narrowPrecisionToCGFloat):
2614         * platform/PlatformString.h:
2615         * platform/String.cpp:
2616         (WebCore::String::toFloat):
2617         * platform/StringImpl.cpp:
2618         (WebCore::StringImpl::toFloat):
2619         * platform/StringImpl.h:
2620
2621 2007-07-02  Sam Weinig  <sam@webkit.org>
2622
2623         Reviewed by Kevin McCullough.
2624
2625         Fourth round of fixes for implicit 64-32 bit conversion errors.
2626         <rdar://problem/5292262>
2627
2628         Use new piDouble and piFloat constants instead of M_PI.
2629
2630         * html/CanvasRenderingContext2D.cpp:
2631         (WebCore::CanvasRenderingContext2D::rotate):
2632         * ksvg2/svg/SVGParserUtilities.cpp:
2633         (WebCore::SVGPathParser::calculateArc):
2634         * platform/graphics/Path.cpp:
2635         (WebCore::pathLengthApplierFunction):
2636         (WebCore::Path::createEllipse):
2637         * platform/graphics/cg/GraphicsContextCG.cpp:
2638         (WebCore::GraphicsContext::drawEllipse):
2639         (WebCore::GraphicsContext::strokeArc):
2640         * platform/graphics/cg/PDFDocumentImage.cpp:
2641         (WebCore::PDFDocumentImage::setCurrentPage):
2642         * platform/graphics/svg/filters/cg/SVGFEHelpersCg.h:
2643         * rendering/RenderPath.cpp:
2644         (WebCore::drawMarkerWithData):
2645
2646 2007-07-01  Adam Roben  <aroben@apple.com>
2647
2648         Clarify/fix {Shadow,BorderImage}ParseContext's memory management
2649
2650         Prefast emitted warnings that drew my attention to
2651         {Shadow,BorderImage}ParseContext::failed().  It turned out that these
2652         methods were actually correct, but rather confusing. "failed" really
2653         meant "abort and clean up" rather than "did you fail?", which was
2654         unclear. However, once I figured that out, the "and clean up" part was
2655         still a bit confusing, because all failed() did was to set a flag that
2656         would later cause the ParseContext's members to be deleted in the
2657         destructor. To clear this up, I've gotten rid of the failed() method
2658         altogether. It always returned false, so I've replaced all calls to
2659         it with the value false.
2660
2661         I also noticed that the lifetime management of the ParseContexts'
2662         members was in all cases confusing, and in some cases wrong. The
2663         m_border{Top,Right,Bottom,Left} members of BorderImageParseContext
2664         were leaked whenever a border-image property was successfully parsed.
2665         I fixed that by holding these members in OwnPtrs. The
2666         CSSPrimitiveValue members of {Shadow,BorderImage}ParseContext, which
2667         inherit from Shared, were being explicitly deleted, which is not a
2668         safe way to manage the lifetime of objects that inherit from Shared.
2669         To fix this, I put those members inside RefPtrs. These two changes
2670         allowed me to remove the destructors entirely.
2671
2672         Reviewed by Darin.
2673
2674         All regression tests pass.
2675
2676         * css/cssparser.cpp:
2677         (WebCore::ShadowParseContext::commitValue): Use .release() to avoid
2678         ref-count churn.
2679         (WebCore::ShadowParseContext::commitLength): Use a RefPtr for the new
2680         value to avoid a leak.
2681         (WebCore::CSSParser::parseShadow): Use 'false' instead of
2682         'context.failed()', and use .release() to avoid ref-count churn.
2683         (WebCore::BorderImageParseContext::commitWidth): Updated to use
2684         OwnPtr.
2685         (WebCore::CSSParser::parseBorderImage): Use 'false' instead of
2686         'context.failed'.
2687
2688 2007-07-01  Anders Carlsson  <andersca@apple.com>
2689
2690         Reviewed by John Sullivan.
2691
2692         <rdar://problem/5297146>
2693         Crash in Mail at WebCore::Frame::setUserStyleSheetLocation (reproducible w/ particular message)
2694         
2695         * loader/Cache.cpp:
2696         (WebCore::Cache::requestResource):
2697         Only insert the resource in the LRU list if the cache is enabled.
2698         
2699         (WebCore::Cache::insertInLRUList):
2700         (WebCore::Cache::resourceAccessed):
2701         Assert that the resource is in the cache.
2702
2703 2007-07-01  Darin Adler  <darin@apple.com>
2704
2705         * css/tokenizer.flex: Rolled out the fix for 14453.
2706         The layout test wasn't passing. We'll try again.
2707
2708 2007-07-01  Adam Roben  <aroben@apple.com>
2709
2710         Fix a crash in ~PluginViewWin()
2711
2712         This crash was introduced in r23827.
2713
2714         Reviewed by Anders.
2715
2716         Fixes dom/html/level2/html/HTMLAnchorElement01.html
2717
2718         * plugins/win/PluginViewWin.cpp:
2719         (WebCore::PluginViewWin::~PluginViewWin): Allow m_plugin to be null.
2720
2721 2007-07-01  Rob Buis  <buis@kde.org>
2722
2723         Reviewed by Darin.
2724
2725         http://bugs.webkit.org/show_bug.cgi?id=14453
2726         REGRESSION: www.nzherald.co.nz almost all the formating is gone
2727  
2728         * css/tokenizer.flex: Allow hex colors with 2, 4, or 5 hex digits.
2729
2730 2007-07-01  Sam Weinig  <sam@webkit.org>
2731
2732         Reviewed by Oliver.
2733
2734         Third round of implicit 64-32 bit conversion errors fixes.
2735         <rdar://problem/5292262>
2736
2737         - Use new CSSPrimitiveValue::getDoubleValue() and CSSPrimitiveValue::getIntValue()
2738           methods instead of CSSPrimitiveValue::getFloatValue() where appropriate.
2739
2740         * css/CSSPrimitiveValue.cpp:
2741         (WebCore::CSSPrimitiveValue::computeLengthInt):
2742         (WebCore::CSSPrimitiveValue::computeLengthIntForLength):
2743         (WebCore::CSSPrimitiveValue::computeLengthShort):
2744         (WebCore::CSSPrimitiveValue::computeLengthFloat):
2745         (WebCore::CSSPrimitiveValue::computeLengthDouble):
2746         (WebCore::CSSPrimitiveValue::getDoubleValue):
2747         * css/CSSPrimitiveValue.h:
2748         (WebCore::CSSPrimitiveValue::getDoubleValue):
2749         (WebCore::CSSPrimitiveValue::getFloatValue):
2750         (WebCore::CSSPrimitiveValue::getIntValue):
2751         * css/Counter.h:
2752         (WebCore::Counter::listStyleNumber):
2753         * css/MediaQueryEvaluator.cpp:
2754         (WebCore::parseAspectRatio):
2755         * css/cssparser.cpp:
2756         (WebCore::BorderImageParseContext::commitBorderImage):
2757         * css/cssstyleselector.cpp:
2758         (WebCore::convertToLength):
2759         (WebCore::applyCounterList):
2760         (WebCore::CSSStyleSelector::applyProperty):
2761         (WebCore::CSSStyleSelector::mapBackgroundSize):
2762         (WebCore::CSSStyleSelector::mapBackgroundXPosition):
2763         (WebCore::CSSStyleSelector::mapBackgroundYPosition):
2764         * html/HTMLTableElement.cpp:
2765         (WebCore::HTMLTableElement::parseMappedAttribute):
2766         * ksvg2/css/SVGCSSStyleSelector.cpp:
2767         (WebCore::CSSStyleSelector::applySVGProperty):
2768         * ksvg2/misc/KCanvasRenderingStyle.cpp:
2769         (WebCore::KSVGPainterFactory::cssPrimitiveToLength):
2770         (WebCore::KSVGPainterFactory::dashArrayFromRenderingStyle):
2771
2772 2007-07-01  Pamela Greene  <pamg.bugs@gmail.com>
2773
2774         Reviewed by Darin.
2775
2776         Fix for <http://bugs.webkit.org/show_bug.cgi?id=14320>
2777         Bug 14320: <canvas> gradient stops at identical offsets are applied in the wrong order
2778         <rdar://problem/5290084>
2779
2780         Use std::stable_sort() instead of qsort() to sort gradient stops.
2781         Adjust the comparison function accordingly.
2782
2783         * html/CanvasGradient.cpp:
2784         (WebCore::compareStops):
2785         (WebCore::CanvasGradient::findStop):
2786
2787 2007-07-01  Holger Hans Peter Freyther  <zecke@selfish.org>
2788
2789         Reviewed by Darin.
2790
2791         m_usesPageCache was not initialized. As the b/f cache is only
2792         implemented in the Mac port and WebView.mm is taking care of calling
2793         Settings::setUsesPageCache I decided to make it false by default.
2794
2795         * page/Settings.cpp:
2796         (WebCore::Settings::Settings): m_usesPageCache was not initialized
2797
2798 2007-07-01  Holger Hans Peter Freyther  <zecke@selfish.org>
2799
2800         Reviewed by Darin.
2801
2802         Inherited- and NonInheritedFlags is a bit field. But for comparsion
2803         the other part of the union _iflags/_niflags is used for comparions.
2804         This will compare 5 uninitialized bits of _iflags and 22 of _niflags.
2805         Make sure the unused bits have a specified value.
2806
2807         * ksvg2/css/SVGRenderStyle.h:
2808         (WebCore::SVGRenderStyle::setBitDefaults): Make sure the unused bits
2809         have a value as well.
2810
2811 2007-06-30  Adam Roben  <aroben@apple.com>
2812
2813         Compile WebCore with /W4 on Windows
2814
2815         Some more warnings were disabled globally, including assignment within
2816         a conditional, unused variable, and various warnings related to
2817         inability to instantiate opaque structs.
2818
2819         In addition, the "unreachable code" warning was turned off for
2820         CSSGrammar.cpp and XPathGrammar.cpp.
2821
2822         Reviewed by Oliver.
2823
2824         * WebCore.vcproj/WebCore.vcproj:
2825
2826 2007-06-29  Adam Roben  <aroben@apple.com>
2827
2828         Give CString an equality operator to fix a bug in HTMLFormElement::formData
2829
2830         The bug was spotted by MSVC /W4. The problem was that we were comparing
2831         a CString to a char* using ==, but CString had no equality operator.
2832         The result was that the CString was being cast to a const char* and a
2833         pointer comparison was being done, which would (essentially) always
2834         return false.
2835
2836         There are two parts to the fix: get rid of CString's const char*
2837         casting operator, and add an equality operator. Previous uses of the
2838         casting operator have been changed to use CString::data().
2839
2840         Test: http/misc/isindex-formdata.html
2841
2842         Reviewed by Oliver.
2843
2844         * dom/XMLTokenizer.cpp:
2845         (WebCore::parseXMLDocumentFragment):
2846         * html/HTMLDocument.cpp:
2847         (WebCore::HTMLDocument::determineParseMode):
2848         * html/HTMLFormElement.cpp:
2849         (WebCore::HTMLFormElement::formData):
2850         * loader/TextResourceDecoder.cpp:
2851         (WebCore::TextResourceDecoder::checkForCSSCharset):
2852         * platform/CString.cpp:
2853         (WebCore::operator==):
2854         * platform/CString.h:
2855         * platform/KURL.cpp:
2856         (WebCore::encodeRelativeString):
2857         * platform/StringImpl.cpp:
2858         (WebCore::StringImpl::toDouble):
2859         * platform/network/cf/FormDataStreamCFNet.cpp:
2860         (WebCore::setHTTPBody):
2861         * platform/network/mac/FormDataStreamMac.mm:
2862         (WebCore::setHTTPBody):
2863         * platform/win/ClipboardUtilitiesWin.cpp:
2864         (WebCore::markupToCF_HTML):
2865         * plugins/win/PluginPackageWin.cpp:
2866         (WebCore::splitString):
2867         * plugins/win/PluginStreamWin.cpp:
2868         (WebCore::PluginStreamWin::startStream):
2869         (WebCore::PluginStreamWin::destroyStream):
2870         (WebCore::PluginStreamWin::sendJavaScriptStream):
2871         (WebCore::PluginStreamWin::didFinishLoading):
2872         * plugins/win/PluginViewWin.cpp:
2873         (WebCore::PluginViewWin::start):
2874         (WebCore::createUTF8String):
2875         (WebCore::PluginViewWin::userAgent):
2876         * xml/XSLStyleSheet.cpp:
2877         (WebCore::XSLStyleSheet::locateStylesheetSubResource):
2878         * xml/XSLTProcessor.cpp:
2879         (WebCore::xsltParamArrayFromParameterMap):
2880
2881 2007-06-29  Adam Roben  <aroben@apple.com>
2882
2883         Initialize two variables that MSVC /W4 isn't smart enough to realize always get initialized
2884
2885         Reviewed by John.
2886
2887         * editing/Editor.cpp:
2888         (WebCore::Editor::advanceToNextMisspelling):
2889         * html/HTMLParser.cpp:
2890
2891 2007-06-29  Adam Roben  <aroben@apple.com>
2892
2893         Fix some possibly unitialized variables found by MSVC /W4
2894
2895         Reviewed by John.
2896
2897         * rendering/bidi.cpp:
2898         (WebCore::RenderBlock::layoutInlineChildren):
2899
2900 2007-06-29  Adam Roben  <aroben@apple.com>
2901
2902         Remove bogus cast found by MSVC /W4
2903
2904         Reviewed by John and Oliver.
2905
2906         * ksvg2/css/SVGCSSParser.cpp:
2907         (WebCore::CSSParser::parseSVGValue):
2908
2909 2007-06-29  Adam Roben  <aroben@apple.com>
2910
2911         Remove unused local functions uncovered by MSVC /W4
2912
2913         Reviewed by John and Oliver.
2914
2915         * platform/win/SearchPopupMenuWin.cpp:
2916         * rendering/RenderText.cpp:
2917
2918 2007-06-29  Adam Roben  <aroben@apple.com>
2919
2920         Don't take the address of temporary values to appease MSVC /W4
2921
2922         Reviewed by Oliver.
2923
2924         No regression test possible.
2925
2926         * platform/win/PopupMenuWin.cpp:
2927         (WebCore::PopupMenu::invalidateItem):
2928         (WebCore::PopupMenu::valueChanged):
2929         (WebCore::PopupWndProc):
2930         * platform/win/ScrollViewWin.cpp:
2931         (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
2932         * platform/win/UniscribeController.cpp:
2933         (WebCore::UniscribeController::shapeAndPlaceItem):
2934         * platform/win/WidgetWin.cpp:
2935         (WebCore::Widget::invalidateRect):
2936
2937 2007-06-29  Adam Roben  <aroben@apple.com>
2938
2939         Make an int -> UINT conversion explicit that MSVC /W4 complains about
2940
2941         Reviewed by John and Oliver.
2942
2943         No regression test possible.
2944
2945         * platform/win/SoundWin.cpp:
2946
2947 2007-06-29  Adam Roben  <aroben@apple.com>
2948
2949         Remove unreachable code uncovered by MSVC /W4
2950
2951         Reviewed by Oliver.
2952
2953         No regression test possible.
2954
2955         * html/CanvasRenderingContext2D.cpp:
2956         (WebCore::CanvasRenderingContext2D::createPattern):
2957         * html/HTMLAnchorElement.cpp:
2958         (WebCore::HTMLAnchorElement::isLiveLink):
2959         * html/HTMLElement.cpp:
2960         (WebCore::HTMLElement::contentEditable):
2961         * platform/DeprecatedString.cpp:
2962         (WebCore::allocateHandle):
2963         (WebCore::freeHandle):
2964         * plugins/win/npapi.cpp:
2965         (pluginViewForInstance):
2966         * rendering/RenderImage.cpp:
2967         (WebCore::RenderImage::isWidthSpecified):
2968         (WebCore::RenderImage::isHeightSpecified):
2969         * rendering/RenderTheme.cpp:
2970         (WebCore::RenderTheme::isControlStyled):
2971
2972 2007-06-29  John Sullivan  <sullivan@apple.com>
2973
2974         Reviewed by Oliver Hunt.
2975         
2976         - WebCore support for accessing the set of rectangles that encompass the selected text
2977         
2978         * page/Frame.h:
2979         * page/Frame.cpp:
2980         (WebCore::Frame::selectionTextRects):
2981         new function, fills in a passed Vector with the line box rects that represent the selected range
2982
2983         * rendering/RenderText.cpp:
2984         (WebCore::RenderText::addLineBoxRects):
2985         fixed off-by-one bug involving use of the confusing function InlineTextBox::end()
2986
2987         * WebCore.exp:
2988         exported symbol for this new function
2989
2990 2007-06-29  Justin Garcia  <justin.garcia@apple.com>
2991
2992         Reviewed by Harrison.
2993         
2994         <rdar://problem/5299513> REGRESSION: In Mail, a crash occurs when attempting to undo a newly created To Do
2995         
2996         Rolled out a change made in r23787.
2997         
2998         * editing/DeleteSelectionCommand.cpp:
2999         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
3000
3001 2007-06-29  Geoffrey Garen  <ggaren@apple.com>
3002
3003         Reviewed by Darin Adler, Anders Carlsson.
3004         
3005         Fixed <rdar://problem/5303567> REGRESSION: XMLHttpRequest.responseXML 
3006         returns NULL if response MIME type is not XML -- breaks Wikipedia widget
3007         
3008         The spec says that responseXML must return null for any HTTP response
3009         with a non-XML MIME type. Technically, that leaves non-HTTP responses
3010         free to do whatever they want.
3011
3012         * xml/xmlhttprequest.cpp:
3013         (WebCore::XMLHttpRequest::getResponseXML): Only return null for non-XML
3014         MIME types if the response was HTTP.
3015
3016 2007-06-29  Sam Weinig  <sam@webkit.org>
3017
3018         Reviewed by Darin.
3019
3020         Second pass at fixing implicit 64-32 bit conversion errors.
3021         <rdar://problem/5292262>
3022
3023         - Use new JSValue::toFloat() method instead of toNumber() where
3024           appropriate.
3025
3026         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
3027         (WebCore::JSCanvasRenderingContext2D::setFillColor):
3028         (WebCore::JSCanvasRenderingContext2D::setStrokeColor):
3029         (WebCore::JSCanvasRenderingContext2D::strokeRect):
3030         (WebCore::JSCanvasRenderingContext2D::drawImage):
3031         (WebCore::JSCanvasRenderingContext2D::drawImageFromRect):
3032         (WebCore::JSCanvasRenderingContext2D::setShadow):
3033         * bindings/js/JSHTMLSelectElementCustom.cpp:
3034         (WebCore::JSHTMLSelectElement::remove):
3035         * bindings/js/JSSVGMatrixCustom.cpp:
3036         (WebCore::JSSVGMatrix::rotateFromVector):
3037         * bindings/js/kjs_events.cpp:
3038         (KJS::JSClipboardPrototypeFunction::callAsFunction):
3039         * bindings/scripts/CodeGeneratorJS.pm:
3040         * ksvg2/svg/SVGScriptElement.cpp:
3041         (WebCore::SVGScriptElement::executeScript):
3042
3043 2007-06-29  Adele Peterson  <adele@apple.com>
3044
3045         Rolling out fix for <rdar://problem/5301322> since it broke layout tests.
3046
3047         * html/HTMLInputElement.h:
3048         * html/HTMLTextAreaElement.h:
3049
3050 2007-06-29  Geoffrey Garen  <ggaren@apple.com>
3051
3052         Reviewed by Oliver Hunt.
3053
3054         Fixed <rdar://problem/4962298> REGRESSION: Synchronous XHR for missing 
3055         local file throws exception -- breaks Wikipedia widget
3056
3057         * WebCore.xcodeproj/project.pbxproj:
3058         * xml/xmlhttprequest.cpp:
3059         (WebCore::XMLHttpRequest::send): Don't throw exceptions for local files.
3060
3061 2007-06-29  Ada Chan  <adachan@apple.com>
3062
3063         Reviewed by Adam.
3064
3065         Fixed a previous fix to a signed/unsigned mismatch.
3066
3067         * plugins/win/PluginPackageWin.cpp:
3068         (WebCore::splitString):
3069
3070 2007-06-29  Adele Peterson  <adele@apple.com>
3071
3072         Reviewed by Ada and Kevin McCullough.
3073
3074         Fix for <rdar://problem/5301322> REGRESSION: Select All selects the whole page when used in readonly textareas
3075
3076         Implemented canSelectAll and selectAll for text fields and textareas, since they're special cases even when they're not editable.
3077
3078         Tests:
3079         fast/forms/input-readonly-select-all.html
3080         fast/forms/textarea-readonly-select-all.html
3081
3082         * html/HTMLInputElement.h:
3083         (WebCore::HTMLInputElement::canSelectAll):
3084         (WebCore::HTMLInputElement::selectAll):
3085         * html/HTMLTextAreaElement.h:
3086         (WebCore::HTMLTextAreaElement::canSelectAll):
3087         (WebCore::HTMLTextAreaElement::selectAll):
3088
3089 2007-06-29  Adam Roben  <aroben@apple.com>
3090
3091         Build fix
3092
3093         This is what happens when you test your patch on two OSs and then
3094         commit from the wrong one.
3095
3096         * rendering/RenderTextControl.cpp:
3097         (WebCore::RenderTextControl::valueChanged):
3098         (WebCore::RenderTextControl::itemText):
3099         (WebCore::RenderTextControl::itemIsSeparator):
3100
3101 2007-06-29  Adam Roben  <aroben@apple.com>
3102
3103         Start compiling WebCore with /W3 under MSVC
3104
3105         One warning was globally disabled: implicit conversion of int to bool.
3106
3107         Reviewed by Darin.
3108
3109         * WebCore.vcproj/WebCore.vcproj:
3110
3111 2007-06-29  Adam Roben  <aroben@apple.com>
3112
3113         Turn DeprecatedStringData's copy constructor into a static method to appease MSVC /W3
3114
3115         DeprecatedStringData now has no public copy constructor. The single
3116         call to the old one has been replaced with a call to the new
3117         DeprecatedStringData::createAndAdopt static method.
3118
3119         Reviewed by Darin.
3120
3121         All regression tests pass.
3122
3123         * platform/DeprecatedString.cpp:
3124         (WebCore::DeprecatedStringData::createAndAdopt):
3125         (WebCore::DeprecatedStringData::adopt):
3126         (WebCore::DeprecatedString::detachIfInternal):
3127         * platform/DeprecatedString.h:
3128
3129 2007-06-29  Adam Roben  <aroben@apple.com>
3130
3131         Fix more signed/unsigned mismatches uncovered by MSVC /W3
3132
3133         Reviewed by John.
3134
3135         No regression tests possible.
3136
3137         * platform/network/cf/ResourceResponseCFNet.cpp:
3138         (WebCore::filenameHasSaneExtension):
3139         * platform/win/FontDataWin.cpp:
3140         (WebCore::FontData::containsCharacters):
3141         * platform/win/PlatformScrollBarSafari.cpp:
3142         (WebCore::):
3143         * platform/win/UniscribeController.cpp:
3144         (WebCore::UniscribeController::advance):
3145         (WebCore::UniscribeController::shapeAndPlaceItem):
3146         * platform/win/WebCoreTextRenderer.cpp:
3147         (WebCore::doDrawTextAtPoint):
3148         * plugins/win/PluginDatabaseWin.cpp:
3149         (WebCore::parseVersionString):
3150         * plugins/win/PluginPackageWin.cpp:
3151         (WebCore::splitString):
3152         * plugins/win/PluginViewWin.cpp:
3153         (WebCore::freeStringArray):
3154         (WebCore::PluginViewWin::invalidateTimerFired):
3155
3156 2007-06-29  Adam Roben  <aroben@apple.com>
3157
3158         Change PopupMenuClient::listSize to return an int to appease warnings from MSVC /W3
3159
3160         Reviewed by John.
3161
3162         No regression test possible.
3163
3164         * html/HTMLSelectElement.cpp:
3165         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
3166         * platform/PopupMenuClient.h:
3167         * platform/win/PopupMenuWin.cpp:
3168         (WebCore::PopupMenu::calculatePositionAndSize):
3169         (WebCore::PopupMenu::focusFirst):
3170         (WebCore::PopupMenu::focusLast):
3171         (WebCore::PopupMenu::down):
3172         (WebCore::PopupMenu::up):
3173         (WebCore::PopupMenu::paint):
3174         * rendering/RenderMenuList.cpp:
3175         * rendering/RenderMenuList.h:
3176         * rendering/RenderTextControl.cpp:
3177         * rendering/RenderTextControl.h:
3178
3179 2007-06-29  Adam Roben  <aroben@apple.com>
3180
3181         Fix two typos spotted by MSVC /W3
3182
3183         Both typos were a semicolon following the condition of an if. This
3184         would cause the intended body of the if to always execute.
3185
3186         Unfortunately neither of these fixes are testable.
3187         BackForwardList::goForward is only called from WebBackForwardList, and
3188         the createDragImageFromImage bug would only manifest itself when
3189         CreateCompatibleDC failed.
3190
3191         Reviewed by Mark.
3192
3193         * history/BackForwardList.cpp:
3194         (WebCore::BackForwardList::goForward):
3195         * platform/win/DragImageWin.cpp:
3196         (WebCore::createDragImageFromImage):
3197
3198 2007-06-29  Adam Treat  <adam@staikos.net>
3199
3200         Reviewed by george Staikos.
3201
3202         Support horizontal and vertical scroll, and set the right units.
3203
3204         * platform/qt/WheelEventQt.cpp:
3205         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
3206
3207 2007-06-28  Adam Roben  <aroben@apple.com>
3208
3209         Get WebCore compiling with /W2 on Windows
3210
3211         Reviewed by Steve.
3212
3213         No regression tests affected.
3214
3215         * WebCore.vcproj/WebCore.vcproj: Turn the warning level up to 2, and
3216         disable two warnings: implicit int <=> float conversion, and class vs.
3217         struct inconsistency.
3218         * dom/CharacterData.cpp:
3219         (WebCore::CharacterData::deleteData): Cast to int before negating.
3220         * loader/Cache.cpp:
3221         (WebCore::Cache::remove): Ditto.
3222         * platform/graphics/Path.cpp:
3223         (WebCore::pathLengthApplierFunction): Consistently use floats.
3224         * platform/graphics/cg/GraphicsContextCG.cpp:
3225         (WebCore::GraphicsContext::drawEllipse): Ditto.
3226         * platform/win/GraphicsContextWin.cpp:
3227         (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar): Ditto.
3228
3229 2007-06-28  Geoffrey Garen  <ggaren@apple.com>
3230
3231         Reviewed by Maciej Stachowiak.
3232         
3233         Fixed <rdar://problem/5299005> DOM timers fire without a local autorelease 
3234         pool => pathologically high high water mark
3235         
3236         I couldn't measure any performance problems with iBench HTML or PLT.
3237
3238         * WebCore.xcodeproj/project.pbxproj: Changed .cpp file to be ObjC++.
3239         * platform/mac/SharedTimerMac.cpp:
3240         (WebCore::timerFired): Added autorelease pool.
3241
3242 2007-06-28  Mitz Pettel  <mitz@webkit.org>
3243
3244         Reviewed by Beth.
3245
3246         - fix http://bugs.webkit.org/show_bug.cgi?id=14118
3247           ASSERTION FAILED: !needsLayout() seen again
3248
3249         Test: fast/dynamic/recursive-layout.html
3250
3251         * page/FrameView.cpp:
3252         (WebCore::FrameView::layout): Removed the midLayout guards around
3253         the calls to invalidateSelection() and updateWidgetPositions(). Those
3254         calls may dirty the layout, but in that case they also update it, so
3255         they should be allowed to do it. Added an ASSERT to make sure that when
3256         they return, the root is not marked for layout.
3257
3258 2007-06-28  Sam Weinig  <sam@webkit.org>
3259
3260         Rubberstamped by Adam Roben.
3261
3262         Roll out r23861.  It caused the buildbot to fail on intel.
3263
3264         * page/Page.cpp:
3265         (WebCore::Page::goToItem):
3266
3267 2007-06-26  Maxime Britto  <mbritto@pleyo.com>
3268
3269         Reviewed by Geoff.
3270
3271         Patch for http://bugs.webkit.org/show_bug.cgi?id=13038
3272         ASSERTION FAILED: item->target().isEmpty() || m_mainFrame->tree()->find(item->target()) == m_mainFrame
3273
3274         Modification of an ASSERT on goToItem related to go back/forward in
3275         history.Don't need to check the frameset if the target is _blank.
3276
3277          * page/Page.cpp:
3278          (WebCore::Page::goToItem):
3279
3280 2007-06-28  Anders Carlsson  <andersca@apple.com>
3281
3282         Reviewed by Oliver.
3283
3284         <rdar://problem/5234139>
3285         <object> with PNG src rendered as image document.
3286         
3287         Complete the URL before passing it to the frame loader client.
3288         
3289         * html/HTMLObjectElement.cpp:
3290         (WebCore::HTMLObjectElement::isImageType):
3291
3292 2007-06-28  Rob Buis  <buis@kde.org>
3293
3294         Reviewed by Maciej.
3295
3296         http://bugs.webkit.org/show_bug.cgi?id=14373
3297         CSS1: selectors (classes and IDs) cannot start with a dash or with a digit
3298
3299         Make sure the id selector validates against the CSS2.1 identfier
3300         definition, not the hexcolor/HASH definition.
3301
3302         * css/CSSGrammar.y:
3303         * css/cssparser.cpp:
3304         (WebCore::CSSParser::lex):
3305         (WebCore::CSSParser::text):
3306         * css/tokenizer.flex:
3307
3308 2007-06-28  Simon Hausmann  <hausmann@kde.org>
3309
3310         Reviewed by Zack.
3311
3312         Implemented PasteboardQt::writeSelection to copy the selected text into the Clipboard as well as PasteboardQt::plainText to retrieve plain text from the clipboard for pasting for example into form fields.
3313
3314         * platform/qt/PasteboardQt.cpp:
3315         (WebCore::Pasteboard::writeSelection):
3316
3317 2007-06-28  Antti Koivisto  <antti@apple.com>
3318
3319         Reviewed by Mitz.
3320         
3321         Fix http://bugs.webkit.org/show_bug.cgi?id=14332
3322         Bug 14332: REGRESSION (r21145): <td> width ignored
3323         <rdar://problem/5290123>
3324         
3325         Cells in table with non-zero cellpadding are not considered empty.
3326
3327         * rendering/AutoTableLayout.cpp:
3328         (WebCore::AutoTableLayout::recalcColumn):
3329
3330 2007-06-28  Adam Roben  <aroben@apple.com>
3331
3332         Fix <rdar://problem/5300455> Prefast: typo in RenderBlock::paintObject
3333
3334         Reviewed by Hyatt.
3335
3336         No layout test possible, as this bug didn't have any effect since
3337         "bool & bool" has the same value as "bool && bool"
3338
3339         * rendering/RenderBlock.cpp:
3340         (WebCore::RenderBlock::paintObject): Changed & to &&.
3341
3342 2007-06-28  Adam Roben  <aroben@apple.com>
3343
3344         Fix <rdar://problem/5300443> word-break and -webkit-user-modify allow any value
3345
3346         The bug was caused by two typos found by prefast.
3347
3348         Reviewed by Hyatt.
3349
3350         * css/cssparser.cpp:
3351         (WebCore::CSSParser::parseValue): Fixed typos.
3352
3353 2007-06-20  Matt Perry  <mpComplete@gmail.com>
3354
3355         Reviewed by Adam.
3356
3357         - Fix http://bugs.webkit.org/show_bug.cgi?id=14251:
3358           onchange handler for select controls doesn't fire when changing via keyboard
3359
3360         * html/HTMLSelectElement.cpp:
3361         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Got rid of
3362         a call to saveLastSelection in the "Enter" key handler for select
3363         controls that was preventing onchange from firing.
3364
3365 2007-06-27  Sam Weinig  <sam@webkit.org>
3366
3367         Fix Gdk, Qt, and Win32 builds.
3368
3369         * WebCore.pro:
3370         * WebCore.vcproj/WebCore.vcproj:
3371
3372 2007-06-27  Sam Weinig  <sam@webkit.org>
3373
3374         Reviewed by Geoff.
3375
3376         Patch for http://bugs.webkit.org/show_bug.cgi?id=14319
3377         Move the Selection object out of the JS bindings
3378
3379         - Renames JS Object Selection to DOMSelection to avoid a name
3380           conflict.
3381
3382         * DerivedSources.make:
3383         * WebCore.xcodeproj/project.pbxproj:
3384         * bindings/js/kjs_window.cpp:
3385         (KJS::WindowPrivate::WindowPrivate):
3386         (KJS::Window::mark):
3387         (KJS::Window::clearHelperObjectProperties):
3388         (KJS::WindowFunc::callAsFunction):
3389         (KJS::Window::disconnectFrame):
3390         * bindings/js/kjs_window.h:
3391         (KJS::Window::):
3392         * page/DOMSelection.cpp: Added.
3393         (WebCore::DOMSelection::DOMSelection):
3394         (WebCore::DOMSelection::frame):
3395         (WebCore::DOMSelection::disconnectFrame):
3396         (WebCore::DOMSelection::anchorNode):
3397         (WebCore::DOMSelection::baseNode):
3398         (WebCore::DOMSelection::anchorOffset):
3399         (WebCore::DOMSelection::baseOffset):
3400         (WebCore::DOMSelection::focusNode):
3401         (WebCore::DOMSelection::extentNode):
3402         (WebCore::DOMSelection::focusOffset):
3403         (WebCore::DOMSelection::extentOffset):
3404         (WebCore::DOMSelection::isCollapsed):
3405         (WebCore::DOMSelection::type):
3406         (WebCore::DOMSelection::rangeCount):
3407         (WebCore::DOMSelection::collapse):
3408         (WebCore::DOMSelection::collapseToEnd):
3409         (WebCore::DOMSelection::collapseToStart):
3410         (WebCore::DOMSelection::empty):
3411         (WebCore::DOMSelection::setBaseAndExtent):
3412         (WebCore::DOMSelection::setPosition):
3413         (WebCore::DOMSelection::modify):
3414         (WebCore::DOMSelection::getRangeAt):
3415         (WebCore::DOMSelection::removeAllRanges):
3416         (WebCore::DOMSelection::addRange):
3417         (WebCore::DOMSelection::toString):
3418         * page/DOMSelection.h: Added.
3419         * page/DOMSelection.idl: Added.
3420         * page/DOMWindow.cpp:
3421         (WebCore::DOMWindow::disconnectFrame):
3422         (WebCore::DOMWindow::getSelection):
3423         * page/DOMWindow.h:
3424         * page/DOMWindow.idl:
3425
3426 2007-06-27  Sam Weinig  <sam@webkit.org>
3427
3428         Reviewed by Maciej.
3429
3430         2nd patch for http://bugs.webkit.org/show_bug.cgi?id=14111
3431         Autogenerate Event JS binding
3432
3433         - Cleanup kjs_events
3434
3435         * bindings/js/kjs_events.cpp:
3436         (WebCore::JSAbstractEventListener::JSAbstractEventListener):
3437         (WebCore::JSAbstractEventListener::handleEvent):
3438         (WebCore::JSAbstractEventListener::isHTMLEventListener):
3439         (WebCore::JSUnprotectedEventListener::JSUnprotectedEventListener):
3440         (WebCore::JSUnprotectedEventListener::~JSUnprotectedEventListener):
3441         (WebCore::JSUnprotectedEventListener::listenerObj):
3442         (WebCore::JSUnprotectedEventListener::windowObj):
3443         (WebCore::JSUnprotectedEventListener::clearWindowObj):
3444         (WebCore::JSUnprotectedEventListener::mark):
3445         (WebCore::JSEventListener::JSEventListener):
3446         (WebCore::JSEventListener::~JSEventListener):
3447         (WebCore::JSEventListener::listenerObj):
3448         (WebCore::JSEventListener::windowObj):
3449         (WebCore::JSEventListener::clearWindowObj):
3450         (WebCore::JSLazyEventListener::JSLazyEventListener):
3451         (WebCore::JSLazyEventListener::listenerObj):
3452         (WebCore::JSLazyEventListener::parseCode):
3453         (WebCore::getNodeEventListener):
3454         (WebCore::JSClipboard::JSClipboard):
3455         (WebCore::JSClipboard::getValueProperty):
3456         (WebCore::JSClipboard::putValueProperty):
3457         (WebCore::JSClipboardPrototypeFunction::callAsFunction):
3458         (WebCore::toJS):
3459         (WebCore::toClipboard):
3460         * bindings/js/kjs_events.h:
3461         (WebCore::JSClipboard::classInfo):
3462         (WebCore::JSClipboard::impl):
3463         * bindings/js/kjs_window.h:
3464         * ksvg2/events/JSSVGLazyEventListener.h:
3465
3466 2007-06-27  Sam Weinig  <sam@webkit.org>
3467
3468         Reviewed by Adam Roben.
3469
3470         Patch for http://bugs.webkit.org/show_bug.cgi?id=12045
3471         Crash under gmalloc at WTF::RefPtr<WebCore::HTMLSliderThumbElement>::operator->
3472         <rdar://problem/5286670>
3473
3474         Test: fast/forms/thumbslider-no-parent-slider.html
3475         Test: fast/forms/thumbslider-crash.html
3476
3477         * rendering/RenderObject.h:
3478         (WebCore::RenderObject::isSlider):
3479         * rendering/RenderSlider.h:
3480         (WebCore::RenderSlider::isSlider):
3481         * rendering/RenderTheme.cpp:
3482         (WebCore::RenderTheme::paint): Only paint thumbslider
3483         if the parent renderer is a RenderSlider.
3484         * rendering/RenderThemeMac.mm:
3485         (WebCore::RenderThemeMac::paintSliderThumb):
3486         * rendering/RenderThemeSafari.cpp:
3487         (WebCore::RenderThemeSafari::paintSliderThumb):
3488
3489 2007-06-27  George Staikos  <staikos@kde.org>
3490
3491         Make Qt builds link when XSLT is turned off.
3492
3493         * WebCore.pro:
3494
3495 2007-06-27  Steve Falkenburg  <sfalken@apple.com>
3496
3497         Turn on static code analysis (Windows only).
3498
3499         Affects only folks that have Visual Studio Team Suite installed,
3500         or who have replaced their compiler with the version shipping in the
3501         Vista SDK.
3502         
3503         Reviewed by Oliver.
3504
3505         * WebCore.vcproj/WebCore.vcproj:
3506
3507 2007-06-27  George Staikos  <staikos@kde.org>
3508
3509         Remove old commented out files that no-longer exist.
3510
3511         * WebCore.pro:
3512
3513 2007-06-27  Justin Garcia  <justin.garcia@apple.com>
3514
3515         Reviewed by John.
3516
3517         <rdar://problem/5247341> REGRESSION: Pasting sometimes leaves out trailing newline
3518         
3519         Pasting with a trailing interchange newline doesn't work when pasting
3520         into an empty line.  Code that handles removing brs at the insertion
3521         position tries to also handle trailing interchange newlines by re-using
3522         those brs and fails.  Removed that code and handle all interchange
3523         newlines with code later in doApply().
3524
3525         * editing/ReplaceSelectionCommand.cpp:
3526         (WebCore::ReplaceSelectionCommand::doApply): Don't try to re-use the
3527         endBR when there's a trailing interchange newline.
3528         
3529 2007-06-27  Anders Carlsson  <andersca@apple.com>
3530
3531         Reviewed by Oliver.
3532
3533         <rdar://problem/5253950>
3534         When Shockwave plugin has been loaded, exiting crashes Safari
3535         
3536         Add a "load count" for plugin packages. When the load count is zero, unload the plugin.
3537         
3538         * plugins/win/PluginPackageWin.cpp:
3539         (WebCore::PluginPackageWin::PluginPackageWin):
3540         (WebCore::PluginPackageWin::load):
3541         (WebCore::PluginPackageWin::unload):
3542         (WebCore::PluginPackageWin::unloadWithoutShutdown):
3543         * plugins/win/PluginPackageWin.h:
3544         
3545         * plugins/win/PluginViewWin.cpp:
3546         (WebCore::PluginViewWin::~PluginViewWin):
3547         Make sure to unload the plugin package and clear any references to plugin script objects.
3548
3549 2007-06-27  George Staikos  <staikos@kde.org>
3550
3551         This was succeeding compile by luck.  Setup dependencies properly.
3552
3553         * WebCore.pro:
3554
3555 2007-06-27  Justin Garcia  <justin.garcia@apple.com>
3556
3557         Reviewed by John.
3558
3559         <rdar://problem/4580583> Breaking blockquoted list should not automatically renumber the second list
3560         
3561         When a quoted numbered list is broken in half, it's cloned
3562         to make the second list. That second list needs its start attribute
3563         set so that the numbers of the list items in it will be preserved.
3564
3565         * editing/BreakBlockquoteCommand.cpp:
3566         (WebCore::BreakBlockquoteCommand::doApply): Set the start attribute
3567         of a cloned list to be the original number of the first list item in it.
3568
3569 2007-06-27  Alexey Proskuryakov  <ap@webkit.org>
3570
3571         Reviewed by Geoff.
3572
3573         http://bugs.webkit.org/show_bug.cgi?id=14413
3574         GIF animation throttling is different from MSIE
3575
3576         * platform/graphics/cg/ImageSourceCG.cpp:
3577         (WebCore::ImageSource::frameDurationAtIndex):
3578         Change the cut-off value to 50ms to match MSIE.
3579
3580 2007-06-27  Sam Weinig  <sam@webkit.org>
3581
3582         Reviewed by Darin.
3583
3584         First pass at fixing implicit 64-32 bit conversion errors.
3585         <rdar://problem/5292262>
3586
3587         - Add 'f' suffix where necessary.
3588
3589         * bridge/mac/WebCoreAXObject.mm:
3590         (-[WebCoreAXObject accessibilityAttributeValue:forParameter:]):
3591         * css/csshelper.h:
3592         * css/cssstyleselector.cpp:
3593         (WebCore::):
3594         (WebCore::CSSStyleSelector::largerFontSize):
3595         (WebCore::CSSStyleSelector::smallerFontSize):
3596         * html/CanvasGradient.cpp:
3597         (WebCore::CanvasGradient::addColorStop):
3598         * html/CanvasPattern.cpp:
3599         (WebCore::CanvasPattern::createPattern):
3600         * ksvg2/css/SVGCSSStyleSelector.cpp:
3601         (WebCore::CSSStyleSelector::applySVGProperty):
3602         * ksvg2/css/SVGRenderStyle.h:
3603         * ksvg2/events/SVGZoomEvent.cpp:
3604         (WebCore::SVGZoomEvent::SVGZoomEvent):
3605         * ksvg2/svg/SVGLength.cpp:
3606         (WebCore::SVGLength::SVGLength):
3607         (WebCore::SVGLength::value):
3608         (WebCore::SVGLength::setValue):
3609         (WebCore::SVGLength::valueAsPercentage):
3610         (WebCore::SVGLength::PercentageOfViewport):
3611         * ksvg2/svg/SVGSVGElement.cpp:
3612         (WebCore::SVGSVGElement::pixelUnitToMillimeterX):
3613         (WebCore::SVGSVGElement::pixelUnitToMillimeterY):
3614         (WebCore::SVGSVGElement::getScreenCTM):
3615         * ksvg2/svg/SVGTextContentElement.cpp:
3616<