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