Reviewed by Anders Carlsson.
[WebKit-https.git] / WebCore / ChangeLog
1 2007-12-13  Dan Bernstein  <mitz@apple.com>
2
3         Reviewed by Anders Carlsson.
4
5         - fix regression in fast/text/international/bidi-override on Tiger
6
7         * platform/graphics/GlyphPageTreeNode.cpp:
8         (WebCore::GlyphPageTreeNode::initializePage): Add bidi overrides here
9         too. I forgot to add them when I added them to treatAsZeroWidthSpace in
10         an earlier patch.
11
12 2007-12-13  Justin Garcia  <justin.garcia@apple.com>
13
14         Reviewed by Darin Adler.
15
16         <rdar://problem/5601583> GMail Editor: Copied link doesn't paste as a link, just colored text
17         
18         The code that checks the selected Range to see if it's inside an anchor
19         checks ancestors of the Range's commonAncestor() but not the
20         commonAncestor() itself, and so we'd fail to add markup for the enclosing
21         anchor to the pasteboard.
22         
23         Some enclosing element getters check the node passed to the getter and some
24         don't.  There were a few places where we incorrectly assumed that enclosing 
25         element getters check the node passed to the getter, but this is the only 
26         case that I'm able to write a test case for at the moment.
27         
28         In this patch I've:
29         Changed enclosingNodeWithType and enclosingNodeWithTag to take in positions,
30         like the newer enclosing element getters.  This is important because we must
31         soon add code to the getters so that they understand that some editing positions
32         inside nodes don't actually refer to positions inside those nodes but positions
33         before and after them.  Like [table, 0].
34         Changed enclosingNodeWithType and enclosingNodeWithTag to check nodes starting with
35         n where [n, o] is the position passed to the getter, instead of starting the the parent
36         of n.  This makes all but a few of the enclosing element getters behave consistently.
37         Changed enclosingNodeWithType and enclosingNodeWithTag to not return non-editable 
38         nodes if the input position was editable.  This fixes a bug that that the above change
39         exposed.
40         Changed enclosingTableCell to simply call enclosingNodeWithType.  We should do
41         this for the rest of the getters, or simply remove them in favor of enclosingNodeWithType
42         unless doing so would affect readability, like it would in the case of enclosingTableCell.
43         Ditto for enclosingBlock.
44
45         * editing/AppendNodeCommand.cpp:
46         (WebCore::AppendNodeCommand::doApply):
47         * editing/DeleteButtonController.cpp:
48         (WebCore::enclosingDeletableElement):
49         * editing/DeleteSelectionCommand.cpp:
50         (WebCore::DeleteSelectionCommand::initializePositionData):
51         (WebCore::DeleteSelectionCommand::saveFullySelectedAnchor):
52         * editing/Editor.cpp:
53         (WebCore::Editor::selectionUnorderedListState):
54         (WebCore::Editor::selectionOrderedListState):
55         * editing/IndentOutdentCommand.cpp:
56         (WebCore::IndentOutdentCommand::prepareBlockquoteLevelForInsertion):
57         (WebCore::IndentOutdentCommand::outdentParagraph):
58         * editing/InsertNodeBeforeCommand.cpp:
59         (WebCore::InsertNodeBeforeCommand::doApply):
60         * editing/InsertParagraphSeparatorCommand.cpp:
61         (WebCore::InsertParagraphSeparatorCommand::doApply):
62         * editing/ReplaceSelectionCommand.cpp:
63         (WebCore::ReplaceSelectionCommand::shouldMerge):
64         (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
65         (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent):
66         * editing/TextIterator.cpp:
67         * editing/htmlediting.cpp:
68         (WebCore::enclosingBlock):
69         (WebCore::enclosingNodeWithTag):
70         (WebCore::enclosingNodeOfType):
71         (WebCore::enclosingTableCell):
72         (WebCore::isTableCell):
73         * editing/htmlediting.h:
74         * editing/markup.cpp:
75         (WebCore::appendStartMarkup):
76         (WebCore::createMarkup):
77
78 2007-12-13  Alexey Proskuryakov  <ap@webkit.org>
79
80         Reviewed by Darin.
81
82         Turn on keyboard event processing quirks for feed views and old applications on Mac OS X.
83
84         * WebCore.base.exp:
85         * dom/KeyboardEvent.cpp:
86         (WebCore::KeyboardEvent::charCode):
87         * page/EventHandler.cpp:
88         (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
89         (WebCore::EventHandler::keyEvent):
90         * page/EventHandler.h:
91         * page/Settings.cpp:
92         (WebCore::Settings::Settings):
93         (WebCore::Settings::setNeedsKeyboardEventDisambiguationQuirks):
94         * page/Settings.h:
95         (WebCore::Settings::needsKeyboardEventDisambiguationQuirks):
96         * page/mac/EventHandlerMac.mm:
97         (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
98         * platform/PlatformKeyboardEvent.h:
99         * platform/mac/KeyEventMac.mm:
100         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
101         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
102
103 2007-12-13  Dan Bernstein  <mitz@apple.com>
104
105         - build fix
106
107         * platform/network/cf/ResourceErrorCF.cpp:
108
109 2007-12-13  Antti Koivisto  <antti@apple.com>
110
111         Reviewed by Tim Hatcher.
112
113         Fix <rdar://problem/5605674> 
114         Make <video> display WebKit context menu instead of the QTKit one.
115     
116         It doesn't really matter where the QTMovieView is.
117
118         * ChangeLog:
119         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
120         (WebCore::MediaPlayerPrivate::createQTMovieView):
121         (WebCore::MediaPlayerPrivate::setRect):
122
123 2007-12-13  Dan Bernstein  <mitz@apple.com>
124
125         Reviewed by Adam Roben.
126
127         - ensure that Unicode bidi control characters are rendered as zero width
128           spaces
129
130         Test: fast/text/international/bidi-control-chars-treated-as-ZWS.html
131
132         * platform/graphics/Font.h:
133         (WebCore::Font::treatAsZeroWidthSpace):
134         * platform/graphics/GlyphPageTreeNode.cpp:
135         (WebCore::GlyphPageTreeNode::initializePage):
136         * platform/text/CharacterNames.h:
137
138 2007-12-13  Brady Eidson  <beidson@apple.com>
139
140         Build fix
141
142         * platform/wx/TemporaryLinkStubs.cpp:
143
144 2007-12-12  Brady Eidson  <beidson@apple.com>
145
146         Build fix
147
148         * platform/gtk/TemporaryLinkStubs.cpp:
149
150 2007-12-12  Brady Eidson  <beidson@apple.com>
151
152         Build fix
153
154         * WebCore.pro:
155         * history/qt/CachedPageQt.cpp: Removed. Whole purpose for this method being platform-specific has been removed
156
157 2007-12-12  Brady Eidson  <beidson@apple.com>
158
159         Build fix
160
161         * platform/win/TemporaryLinkStubs.cpp:
162
163 2007-12-12  Brady Eidson  <beidson@apple.com>
164
165         Reviewed by Sam Weinig
166
167         Fix for <rdar://problem/4886844> and lay groundwork for <rdar://problem/4516170> (Back/Forward Cache on Windows)
168
169         All back/forward list and page cache related items used to be in WebKit.
170         When they were pushed into WebCore, some sloppy compromises were made to keep the Back/Forward cache working on Mac.
171         Namely, a WebCore::HistoryItem had to know how to keep a WebDocumentView alive.  We accomplished this via some #ifdefs
172         in CachedPage and having the Mac-only CachedPageMac.mm
173
174         To get rid of that nastiness and pave the way for adding Back/Forward cache on other platforms, this patch adds the 
175         concept of "CachedPagePlatformData" which can contain anything the platform API wants.  
176
177         I also took the opportunity to do other cleanup and renaming client methods to better fit their new purposes.
178
179         * WebCore.base.exp:
180         * WebCore.xcodeproj/project.pbxproj:
181
182         * history/CachedPage.cpp:
183         (WebCore::CachedPage::~CachedPage): Combined "close()" and "clear()" to just "clear()" - call it from here.
184         (WebCore::CachedPage::clear): Call clear() on the CachedPagePlatformData if it exists.  Also delete the CachedPagePlatformData.
185         (WebCore::CachedPage::setCachedPagePlatformData):
186         (WebCore::CachedPage::cachedPagePlatformData):
187         * history/CachedPage.h:
188
189         * history/CachedPagePlatformData.h: Added.
190         (WebCore::CachedPagePlatformData::~CachedPagePlatformData): Virtual d'tor.
191         (WebCore::CachedPagePlatformData::clear): Virtual method for platforms that need to do cleanup at the same time as CachedPage::clear().
192
193         * history/PageCache.cpp:
194         (WebCore::PageCache::releaseAutoreleasedPagesNow): Call "clear()" instead of "close()"
195
196         * history/mac/CachedPageMac.mm: Removed. Functionality replaced with CachedPagePlatformData.
197
198         * loader/FrameLoader.cpp:
199         (WebCore::FrameLoader::transitionToCommitted): Call the new client methods.  Make some work previously done by WebKitMac cross platform 
200           (setting the cached DocumentLoader to the Frame).
201         (WebCore::FrameLoader::cachePageForHistoryItem):  Renamed the client methods
202
203         * loader/FrameLoaderClient.h:  The very Mac-centric "makeDocumentView", "setDocumentViewFromCachedPage", and "saveDocumentViewToCachedPage"
204           become "transitionToCommittedForNewPage", "transitionToCommittedFromCachedPage", and "savePlatformDataToCachedPage" accordingly
205
206         * svg/graphics/SVGImageEmptyClients.h:
207         (WebCore::SVGEmptyFrameLoaderClient::savePlatformDataToCachedPage):
208         (WebCore::SVGEmptyFrameLoaderClient::transitionToCommittedFromCachedPage):
209         (WebCore::SVGEmptyFrameLoaderClient::transitionToCommittedForNewPage):
210
211 2007-12-12  Dan Bernstein  <mitz@apple.com>
212
213         Reviewed by Oliver Hunt.
214
215         - fix <rdar://problem/5074620> text with font:initial; fails to appear (causes fast/text/font-initial.html to fail)
216
217         * css/CSSStyleSelector.cpp:
218         (WebCore::CSSStyleSelector::applyProperty): When the font property is
219         set to 'initial', set the font size to its initial value, 'medium',
220         and the font family to the standard family.
221
222 2007-12-12  Justin Garcia  <justin.garcia@apple.com>
223
224         Reviewed by Darin Adler.
225
226         <rdar://problem/5433862> Mail crashes at WebCore::highestAncestor() when deleting a particular selection
227
228         * editing/DeleteSelectionCommand.cpp:
229         (WebCore::DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows):
230         Don't remove the table row that contained the end of the selection if it is where we are
231         about to place the ending selection.
232         Don't remove all empty rows after the row that contained the start of the selection,
233         they might come after the row that contained the end of the selection.
234
235 2007-12-12  Sam Weinig  <sam@webkit.org>
236
237         Reviewed by Anders Carlsson.
238
239         Add button to clear the Web Inspector's console.
240
241         * English.lproj/InspectorLocalizedStrings.js:
242         * page/inspector/ConsolePanel.js:
243         * page/inspector/inspector.css:
244
245 2007-12-12  Anders Carlsson  <andersca@apple.com>
246
247         Reviewed by Adam and Jon.
248
249         <rdar://problem/5349282>
250         popup blocking is not applied to plugins on Windows.
251         
252         Implement popup blocking. If the plug-in supports the new 
253         NPN_PushPopupsEnabledState/NPN_PopPopupsEnabledState API we just use that
254         to determine if a plug-in request can open new windows.
255         
256         If a plug-in does not support the new API, we assume that a plug-in can open new windows
257         in response to either mouse click or key press events.
258         
259         * plugins/win/PluginViewWin.cpp:
260         (WebCore::PluginRequestWin::PluginRequestWin):
261         (WebCore::PluginRequestWin::shouldAllowPopups):
262         Add new shouldAllowPopups member.
263         
264         (WebCore::PluginViewWin::popPopupsStateTimerFired):
265         Reset the popup state.
266         
267         (WebCore::isWindowsMessageUserGesture):
268         New function that given a windows message id returns whether it's a user gesture or not.
269         
270         (WebCore::PluginViewWin::wndProc):
271         Allow popups if the window message is a user gesture.
272         
273         (WebCore::PluginViewWin::dispatchNPEvent):
274         New method that dispatches an NPEvent, turning on popups if necessary.
275         
276         (WebCore::PluginViewWin::paint):
277         (WebCore::PluginViewWin::handleKeyboardEvent):
278         (WebCore::PluginViewWin::handleMouseEvent):
279         Call dispatchNPEvent().
280         
281         (WebCore::PluginViewWin::performRequest):
282         (WebCore::PluginViewWin::load):
283         Add calls to shouldAllowPopups().
284         
285         (WebCore::PluginViewWin::pushPopupsEnabledState):
286         (WebCore::PluginViewWin::popPopupsEnabledState):
287         New methods that maintain the popup state stack.
288         
289         (WebCore::PluginViewWin::arePopupsAllowed):
290         New method that returns whether popups are allowed.
291         
292         (WebCore::PluginViewWin::PluginViewWin):
293         * plugins/win/PluginViewWin.h:
294         Add new instance variables.
295         
296         * plugins/win/npapi.cpp:
297         (NPN_PushPopupsEnabledState):
298         (NPN_PopPopupsEnabledState):
299         Implement these.
300
301 2007-12-12  Dan Bernstein  <mitz@apple.com>
302
303         Reviewed by John Sullivan.
304
305         - fix a bug in debug builds only where selecting an earlier item in
306           a popup selects the first item
307
308         Test: fast/forms/menulist-selection-reset.html
309
310         * html/HTMLSelectElement.cpp:
311         (WebCore::HTMLSelectElement::recalcListItems): Added an argument that
312         tells that function whether it should update the selected state of
313         option elements.
314         (WebCore::HTMLSelectElement::checkListItems): Changed to pass false
315         as the above argument.
316         * html/HTMLSelectElement.h:
317
318 2007-12-12  Adele Peterson  <adele@apple.com>
319
320         Reviewed by Geoff.
321
322         Fix for <rdar://problem/5643054> Remove cue point implementation for media elements
323
324         When the specification for cue ranges is more final, we will implement those.
325
326         * html/HTMLMediaElement.cpp:
327         (WebCore::HTMLMediaElement::~HTMLMediaElement):
328         (WebCore::HTMLMediaElement::load):
329         * html/HTMLMediaElement.h:
330         * html/HTMLMediaElement.idl:
331         * platform/graphics/MediaPlayer.cpp:
332         * platform/graphics/MediaPlayer.h:
333         (WebCore::MediaPlayerClient::mediaPlayerTimeChanged):
334         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
335         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
336         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
337         (WebCore::MediaPlayerPrivate::load):
338         (WebCore::MediaPlayerPrivate::play):
339         (WebCore::MediaPlayerPrivate::pause):
340         (WebCore::MediaPlayerPrivate::setEndTime):
341         (WebCore::MediaPlayerPrivate::startEndPointTimerIfNeeded):
342         (WebCore::MediaPlayerPrivate::endPointTimerFired):
343         (WebCore::MediaPlayerPrivate::timeChanged):
344         (WebCore::MediaPlayerPrivate::didEnd):
345         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
346         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
347         (WebCore::MediaPlayerPrivate::startEndPointTimerIfNeeded):
348         (WebCore::MediaPlayerPrivate::endPointTimerFired):
349         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
350
351 2007-12-12  MorganL  <morganl.webkit@yahoo.com>
352
353         Reviewed by Maciej.
354
355         Fixes:
356         http://bugs.webkit.org/show_bug.cgi?id=16408
357
358         When navigating back/forward to a http:// link, we should prefer to
359         load from cache if possible.
360
361         * loader/FrameLoader.cpp:
362
363 2007-12-12  Anders Carlsson  <andersca@apple.com>
364
365         Reviewed by Sam.
366
367         <rdar://problem/5132003>
368         dumpResourceLoadCallbacks is not implemented in DRT on Windows.
369         
370         * platform/network/cf/ResourceErrorCF.cpp:
371         (WebCore::ResourceError::unpackPlatformError):
372         Handle kCFErrorDomainWinSock.
373         
374         * platform/network/cf/ResourceHandleCFNet.cpp:
375         (WebCore::willSendRequest):
376         Ignore willSendRequest calls where the redirect response is null, like we do in 
377         the Mac version.
378
379 2007-12-12  Steve Falkenburg  <sfalken@apple.com>
380
381         <rdar://problem/5643785> Fix iBench regression caused by mis-placed nested timer check.
382         
383         Reviewed by Anders.
384
385         * platform/win/SharedTimerWin.cpp:
386         (WebCore::TimerWindowWndProc): Don't set high-resolution timer flag inside non-high-resolution timer proc.
387
388 2007-12-12  Beth Dakin  <bdakin@apple.com>
389
390         Reviewed by Oliver.
391
392         Fix for <rdar://problem/5643770> REGRESSION: Free-standing SVGs 
393         with width and height 100% clip to 300 x 150
394
395         Though it was correct in an earlier iteration of my patch, it is 
396         not sufficient in the final, committed version to ask if the 
397         relativeWidthValue() or relativeHeightValue() is greater than 0 
398         just to determine if one has been set, for, they are now 
399         initialized to 300 and 150 respectively! This patch instead adds a 
400         bool to keep track of whether a container size has been set, and 
401         only used the relative value if it has.
402
403         * rendering/RenderSVGRoot.cpp:
404         (WebCore::RenderSVGRoot::calcViewport):
405         * svg/SVGSVGElement.cpp:
406         (WebCore::SVGSVGElement::SVGSVGElement):
407         * svg/SVGSVGElement.h:
408         (WebCore::SVGSVGElement::setContainerSize):
409         (WebCore::SVGSVGElement::hasSetContainerSize):
410
411 2007-12-12  Brady Eidson  <beidson@apple.com>
412
413         Reviewed by Steve Falkenburg 
414
415         <rdar://problem/5012636> - WebURLProtectionSpace::realm returns the hostname rather than the authentication realm
416
417         * platform/network/ProtectionSpace.cpp:
418         (WebCore::ProtectionSpace::ProtectionSpace): Assign the realm to m_realm, instead of the host
419
420 2007-12-12  Alp Toker  <alp@atoker.com>
421
422         Reviewed by Maciej.
423
424         http://bugs.webkit.org/show_bug.cgi?id=16388
425         [GTK] Widget::setCursor() gets called frequently
426
427         Cache the current cursor to avoid calling gdk_window_set_cursor() when
428         there's no change in cursor.
429
430         * platform/gtk/WidgetGtk.cpp:
431         (WebCore::Widget::Widget):
432         (WebCore::Widget::cursor):
433         (WebCore::Widget::setCursor):
434
435 2007-12-12  Rodney Dawes  <dobey@wayofthemonkey.com>
436
437         Reviewed by Maciej.
438
439         http://bugs.webkit.org/show_bug.cgi?id=16342
440         Build Warning and Error fixes in WebCore GTK+
441
442         Use C-style casts for casting function pointers to gpointer
443         Use static_cast<int> to cast a float to int to fix a warning
444
445         * platform/gtk/PlatformScrollBarGtk.cpp:
446         (PlatformScrollbar::PlatformScrollbar):
447         (PlatformScrollbar::~PlatformScrollbar):
448         (PlatformScrollbar::gtkValueChanged):
449         * platform/gtk/ThreadingGtk.cpp:
450         (callFunctionOnMainThread):
451         (callOnMainThread):
452
453 2007-12-12  Dan Bernstein  <mitz@apple.com>
454
455         Reviewed by Darin Adler.
456
457         - better fix for a crash when pressing a key that is not associated
458           with a command
459
460         * editing/EditorCommand.cpp:
461         (WebCore::Editor::command): Return the empty command if the command name
462         is empty.
463
464 2007-12-12  Alexey Proskuryakov  <ap@webkit.org>
465
466         Reviewed by Darin.
467
468         http://bugs.webkit.org/show_bug.cgi?id=16410
469         Implement isKeypadEvent() on Windows
470
471         Test: platform/win/fast/events/keyLocation-numpad.html
472
473         * platform/win/KeyEventWin.cpp:
474         (WebCore::isKeypadEvent): Added.
475         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Also fixed a mistake with autorepeat.
476
477 2007-12-12  Oliver Hunt  <oliver@apple.com>
478
479         Reviewed by Maciej.
480
481         <rdar://problem/5071781> window.mouseout events are not sent 
482         to window when mouse moves out of window 
483
484         Make PlatformMouseEvent recognise WM_MOUSELEAVE.
485
486         * platform/win/PlatformMouseEventWin.cpp:
487         (WebCore::messageToEventType):
488         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
489
490 2007-12-12  Sam Weinig  <sam@webkit.org>
491
492         Fix Mac release build.
493
494         * WebCore.base.exp:
495
496 2007-12-12  Sam Weinig  <sam@webkit.org>
497
498         Build fix for Qt, Gtk, and Wx.
499
500         * css/CSSParser.cpp:
501         (WebCore::CSSParser::parseValue):
502         * loader/win/FrameLoaderWin.cpp:
503         (WebCore::FrameLoader::urlSelected):
504         * platform/network/curl/ResourceHandleManager.cpp:
505         (WebCore::parseDataUrl):
506         (WebCore::ResourceHandleManager::startJob):
507         * platform/network/win/CookieJarWin.cpp:
508         (WebCore::setCookies):
509         (WebCore::cookies):
510         * platform/network/win/ResourceHandleWin.cpp:
511         (WebCore::ResourceHandle::start):
512         * platform/qt/PasteboardQt.cpp:
513         (WebCore::Pasteboard::writeURL):
514
515 2007-12-11  Dan Bernstein  <mitz@apple.com>
516
517         Reviewed by Maciej Stachowiak.
518
519         - allow non-integer font sizes on Windows for small caps
520
521         * platform/graphics/win/FontDataWin.cpp:
522         (WebCore::FontData::smallCapsFontData):
523         * platform/graphics/win/FontPlatformData.h:
524         (WebCore::FontPlatformData::size):
525         (WebCore::FontPlatformData::setSize):
526         * platform/graphics/win/FontPlatformDataWin.cpp:
527         (WebCore::FontPlatformData::FontPlatformData):
528
529 2007-12-11  Sam Weinig  <sam@webkit.org>
530
531         Build fix for Qt, Gtk, and Wx.
532
533         * platform/gtk/CookieJarGtk.cpp:
534         (WebCore::setCookies):
535         (WebCore::cookies):
536         * platform/qt/ClipboardQt.cpp:
537         (WebCore::ClipboardQt::writeURL):
538         * platform/qt/CookieJarQt.cpp:
539         (WebCore::setCookies):
540         (WebCore::cookies):
541         * platform/wx/PasteboardWx.cpp:
542         (WebCore::Pasteboard::writeURL):
543
544 2007-12-11  Sam Weinig  <sam@webkit.org>
545
546         Reviewed by Darin Adler.
547
548         Scrub URL out of the tree in preparation for renaming KURL to URL.
549             - Renames Document::URL() -> Document::url()
550             - Renames DocumentLoader::URL() -> DocumentLoader::url()
551             - Renames KURL::url() to KURL::string() and KURL::deprecatedString()
552             - Remove FrameLoader::URL()
553             - Various variable renames.
554
555         The change from Document::URL() to Document::url() required changes
556         to the bindings scripts as well, because URL() is the name of a DOM
557         method.  The code generation scripts now have code to special case URL()
558         to url().
559
560         * WebCore.base.exp:
561         * bindings/js/kjs_events.cpp:
562         (WebCore::JSLazyEventListener::parseCode):
563         * bindings/js/kjs_navigator.cpp:
564         (KJS::Navigator::getValueProperty):
565         * bindings/js/kjs_proxy.cpp:
566         (WebCore::KJSProxy::initScript):
567         * bindings/js/kjs_window.cpp:
568         (KJS::Window::put):
569         (KJS::Window::allowsAccessFrom):
570         (KJS::Location::put):
571         (KJS::LocationProtoFuncReplace::callAsFunction):
572         (KJS::LocationProtoFuncReload::callAsFunction):
573         (KJS::LocationProtoFuncAssign::callAsFunction):
574         * bindings/scripts/CodeGenerator.pm:
575         * bindings/scripts/CodeGeneratorCOM.pm:
576         * bindings/scripts/CodeGeneratorJS.pm:
577         * bindings/scripts/CodeGeneratorObjC.pm:
578         * css/CSSImportRule.cpp:
579         (WebCore::CSSImportRule::insertedIntoParent):
580         * css/CSSParser.cpp:
581         (WebCore::CSSParser::parseValue):
582         (WebCore::CSSParser::parseContent):
583         (WebCore::CSSParser::parseBackgroundImage):
584         (WebCore::CSSParser::parseFontFaceSrc):
585         (WebCore::CSSParser::parseBorderImage):
586         (WebCore::CSSParser::createImportRule):
587         * css/CSSStyleSelector.cpp:
588         (WebCore::CSSStyleSelector::setEncodedURL):
589         * dom/Document.cpp:
590         (WebCore::Document::processHttpEquiv):
591         (WebCore::Document::cookie):
592         (WebCore::Document::setCookie):
593         (WebCore::Document::domain):
594         (WebCore::Document::setDomain):
595         (WebCore::Document::getImageMap):
596         (WebCore::Document::completeURL):
597         * dom/Document.h:
598         (WebCore::Document::url):
599         (WebCore::Document::baseURL):
600         * dom/Element.cpp:
601         (WebCore::Element::baseURI):
602         * dom/ProcessingInstruction.h:
603         * dom/StyledElement.cpp:
604         (WebCore::StyledElement::addCSSImageProperty):
605         * dom/StyledElement.h:
606         * dom/XMLTokenizer.cpp:
607         (WebCore::XMLTokenizer::endElementNs):
608         (WebCore::XMLTokenizer::end):
609         (WebCore::):
610         * dom/XMLTokenizer.h:
611         * editing/Editor.cpp:
612         (WebCore::Editor::copy):
613         * editing/markup.cpp:
614         (WebCore::completeURLs):
615         * history/CachedPage.h:
616         (WebCore::CachedPage::url):
617         * history/HistoryItem.cpp:
618         (WebCore::HistoryItem::HistoryItem):
619         (WebCore::HistoryItem::setURL):
620         (WebCore::HistoryItem::isCurrentDocument):
621         * html/HTMLBaseElement.cpp:
622         (WebCore::HTMLBaseElement::process):
623         * html/HTMLParser.cpp:
624         (WebCore::HTMLParser::reportErrorToConsole):
625         * html/HTMLScriptElement.cpp:
626         (WebCore::HTMLScriptElement::childrenChanged):
627         (WebCore::HTMLScriptElement::insertedIntoDocument):
628         (WebCore::HTMLScriptElement::evaluateScript):
629         * html/HTMLScriptElement.h:
630         * html/HTMLTokenizer.cpp:
631         (WebCore::HTMLTokenizer::scriptExecution):
632         * loader/Cache.cpp:
633         (WebCore::createResource):
634         (WebCore::Cache::requestResource):
635         * loader/CachedCSSStyleSheet.cpp:
636         (WebCore::CachedCSSStyleSheet::checkNotify):
637         * loader/CachedResource.cpp:
638         (WebCore::CachedResource::CachedResource):
639         * loader/CachedResource.h:
640         (WebCore::CachedResource::):
641         * loader/CachedScript.h:
642         * loader/DocLoader.cpp:
643         (WebCore::DocLoader::checkForReload):
644         (WebCore::DocLoader::requestResource):
645         * loader/DocumentLoader.cpp:
646         (WebCore::DocumentLoader::url):
647         (WebCore::DocumentLoader::replaceRequestURLForAnchorScroll):
648         (WebCore::DocumentLoader::setRequest):
649         (WebCore::DocumentLoader::startLoadingMainResource):
650         * loader/DocumentLoader.h:
651         * loader/FrameLoader.cpp:
652         (WebCore::FormSubmission::FormSubmission):
653         (WebCore::ScheduledRedirection::ScheduledRedirection):
654         (WebCore::FrameLoader::changeLocation):
655         (WebCore::FrameLoader::urlSelected):
656         (WebCore::FrameLoader::requestFrame):
657         (WebCore::FrameLoader::loadSubframe):
658         (WebCore::FrameLoader::submitFormAgain):
659         (WebCore::FrameLoader::submitForm):
660         (WebCore::FrameLoader::didExplicitOpen):
661         (WebCore::FrameLoader::replaceContentsWithScriptResult):
662         (WebCore::FrameLoader::executeScript):
663         (WebCore::FrameLoader::receivedFirstData):
664         (WebCore::FrameLoader::begin):
665         (WebCore::FrameLoader::startIconLoader):
666         (WebCore::FrameLoader::commitIconURLToIconDatabase):
667         (WebCore::FrameLoader::scheduleRefresh):
668         (WebCore::FrameLoader::redirectionTimerFired):
669         (WebCore::FrameLoader::loadPlugin):
670         (WebCore::FrameLoader::didNotOpenURL):
671         (WebCore::FrameLoader::updatePolicyBaseURL):
672         (WebCore::FrameLoader::scrollToAnchor):
673         (WebCore::FrameLoader::startRedirectionTimer):
674         (WebCore::FrameLoader::load):
675         (WebCore::FrameLoader::canLoad):
676         (WebCore::FrameLoader::shouldHideReferrer):
677         (WebCore::FrameLoader::shouldAllowNavigation):
678         (WebCore::FrameLoader::commitProvisionalLoad):
679         (WebCore::FrameLoader::clientRedirected):
680         (WebCore::FrameLoader::open):
681         (WebCore::FrameLoader::didTellBridgeAboutLoad):
682         (WebCore::FrameLoader::haveToldBridgeAboutLoad):
683         (WebCore::FrameLoader::post):
684         (WebCore::FrameLoader::loadResourceSynchronously):
685         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
686         (WebCore::FrameLoader::shouldTreatURLAsSameAsCurrent):
687         (WebCore::FrameLoader::createHistoryItem):
688         (WebCore::FrameLoader::addBackForwardItemClippedAtTarget):
689         (WebCore::FrameLoader::loadItem):
690         (WebCore::FrameLoader::urlsMatchItem):
691         (WebCore::FrameLoader::recursiveGoToItem):
692         (WebCore::FrameLoader::updateHistoryForStandardLoad):
693         (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory):
694         * loader/FrameLoader.h:
695         (WebCore::FrameLoader::url):
696         * loader/ImageDocument.cpp:
697         (WebCore::ImageDocument::createDocumentStructure):
698         * loader/MainResourceLoader.cpp:
699         (WebCore::shouldLoadAsEmptyDocument):
700         (WebCore::MainResourceLoader::didFinishLoading):
701         * loader/NavigationAction.cpp:
702         (WebCore::NavigationAction::NavigationAction):
703         * loader/NavigationAction.h:
704         (WebCore::NavigationAction::url):
705         * loader/PluginDocument.cpp:
706         (WebCore::PluginTokenizer::createDocumentStructure):
707         * loader/SubresourceLoader.cpp:
708         (WebCore::SubresourceLoader::load):
709         (WebCore::SubresourceLoader::create):
710         * loader/icon/IconLoader.cpp:
711         (WebCore::IconLoader::startLoading):
712         (WebCore::IconLoader::finishLoading):
713         * loader/loader.cpp:
714         (WebCore::Loader::servePendingRequests):
715         * loader/mac/LoaderNSURLExtras.m:
716         (urlOriginalData):
717         * page/Chrome.cpp:
718         (WebCore::Chrome::setToolTip):
719         * page/ContextMenuController.cpp:
720         (WebCore::ContextMenuController::contextMenuItemSelected):
721         * page/Frame.cpp:
722         (WebCore::Frame::setUserStyleSheetLocation):
723         * page/InspectorController.cpp:
724         (WebCore::InspectorResource::type):
725         (WebCore::addSourceToFrame):
726         (WebCore::InspectorController::addScriptResource):
727         (WebCore::InspectorController::updateScriptResourceRequest):
728         (WebCore::InspectorController::didCommitLoad):
729         * page/mac/WebCoreFrameBridge.mm:
730         (-[WebCoreFrameBridge getData:andResponse:forURL:]):
731         * platform/KURL.h:
732         (WebCore::KURL::string):
733         (WebCore::KURL::deprecatedString):
734         * platform/mac/ClipboardMac.mm:
735         (WebCore::ClipboardMac::getData):
736         * platform/mac/CookieJar.mm:
737         (WebCore::cookies):
738         (WebCore::setCookies):
739         * platform/mac/PasteboardMac.mm:
740         (WebCore::Pasteboard::writeURL):
741         (WebCore::fileWrapperForImage):
742         (WebCore::Pasteboard::writeImage):
743         (WebCore::Pasteboard::plainText):
744         * platform/network/ResourceHandle.cpp:
745         (WebCore::ResourceHandle::portAllowed):
746         * platform/network/ResourceRequestBase.cpp:
747         (WebCore::ResourceRequestBase::isNull):
748         * platform/network/cf/ResourceHandleCFNet.cpp:
749         (WebCore::willSendRequest):
750         (WebCore::didReceiveResponse):
751         (WebCore::didReceiveData):
752         (WebCore::didFinishLoading):
753         (WebCore::didFail):
754         (WebCore::didReceiveChallenge):
755         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
756         (WebCore::ResourceHandle::~ResourceHandle):
757         (WebCore::ResourceHandle::start):
758         * platform/win/ClipboardUtilitiesWin.cpp:
759         (WebCore::createGlobalData):
760         (WebCore::urlToMarkup):
761         * platform/win/ClipboardWin.cpp:
762         (WebCore::writeURL):
763         (WebCore::writeImageToDataObject):
764         (WebCore::ClipboardWin::writeURL):
765         (WebCore::ClipboardWin::writeRange):
766         * platform/win/PasteboardWin.cpp:
767         (WebCore::Pasteboard::writeSelection):
768         (WebCore::Pasteboard::writeURL):
769         * plugins/win/PluginDatabaseWin.cpp:
770         (WebCore::PluginDatabaseWin::findPlugin):
771         * plugins/win/PluginStreamWin.cpp:
772         (WebCore::PluginStreamWin::startStream):
773         (WebCore::PluginStreamWin::destroyStream):
774         * plugins/win/PluginViewWin.cpp:
775         (WebCore::scriptStringIfJavaScriptURL):
776         (WebCore::PluginViewWin::performRequest):
777         * svg/SVGImageLoader.cpp:
778         (WebCore::SVGImageLoader::updateFromElement):
779         * xml/XMLHttpRequest.cpp:
780         (WebCore::XMLHttpRequest::getResponseXML):
781         (WebCore::XMLHttpRequest::urlMatchesDocumentDomain):
782         * xml/XSLImportRule.cpp:
783         (WebCore::XSLImportRule::loadSheet):
784         * xml/XSLTProcessor.cpp:
785         (WebCore::XSLTProcessor::createDocumentFromSource):
786         (WebCore::xsltStylesheetPointer):
787         (WebCore::xmlDocPtrFromNode):
788
789 2007-12-11  Beth Dakin  <bdakin@apple.com>
790
791         Reviewed by Darin.
792
793         Fix for <rdar://problem/5641255> SVGs with width and height 100% 
794         fail to render when used as background images
795
796         CachedImage now has a setImageContainerSize function. It is only 
797         needed for SVG right now.
798         * loader/CachedImage.cpp:
799         (WebCore::CachedImage::setImageContainerSize):
800         * loader/CachedImage.h:
801
802         Relatively sized SVGs have no intrinsic size. Because this call is 
803         low-level enough that we cannot pass in the container size and get 
804         the real size of the SVG, we need to know if it has relative 
805         dimensions, and if so, we need to get the size from scaledTileSize.
806         * platform/graphics/Image.cpp:
807         (WebCore::Image::drawTiled):
808         * platform/graphics/Image.h:
809         (WebCore::Image::setContainerSize):
810         (WebCore::Image::hasRelativeWidth):
811         (WebCore::Image::hasRelativeHeight):
812
813         Re-factored calculateBackgroundSize a bit so that it returns an 
814         IntSize. Made it a member function so that it can send m_width and 
815         m_height along to setImageContainerSize.
816         * rendering/RenderBox.cpp:
817         (WebCore::RenderBox::calculateBackgroundSize):
818         (WebCore::RenderBox::calculateBackgroundImageGeometry):
819         * rendering/RenderBox.h:
820
821         Need to account for relatively sized SVGs in calcViewport()
822         * rendering/RenderSVGRoot.cpp:
823         (WebCore::RenderSVGRoot::calcViewport):
824         
825         Added new member variables to store the size of the SVG container. 
826         relativeWidthValue() and relativeHeightValue() use the stored SVG 
827         container size to correctly calculate the width and height of a 
828         relatively sized SVG.
829         * svg/SVGSVGElement.cpp:
830         (WebCore::SVGSVGElement::SVGSVGElement):
831         (WebCore::SVGSVGElement::setContainerSize):
832         (WebCore::SVGSVGElement::relativeWidthValue):
833         (WebCore::SVGSVGElement::relativeHeightValue):
834         * svg/SVGSVGElement.h:
835         (WebCore::SVGSVGElement::containerSize):
836         
837         Re-factored size calculations to use the size of the container.
838         * svg/graphics/SVGImage.cpp:
839         (WebCore::SVGImage::setContainerSize):
840         (WebCore::SVGImage::size):
841         (WebCore::SVGImage::hasRelativeWidth):
842         (WebCore::SVGImage::hasRelativeHeight):
843         * svg/graphics/SVGImage.h:
844
845 2007-12-11  Darin Adler  <darin@apple.com>
846
847         * editing/Editor.cpp:
848         (WebCore::Editor::yankFromKillRing): Try to fix non-Mac builds by adding
849         a missing return statement.
850
851 2007-12-11  Darin Adler  <darin@apple.com>
852
853         Reviewed by Geoff.
854
855         - exposed many new commands to the DOM Document executeCommand function by
856           merging the JSEditor and Editor executeCommand implementations
857         - replaced the execCommand function with a EditorCommand class
858         - replaced the WTF::StrHash<> class template with the WebCore::StringHash class
859         - replaced the WTF::CaseInsensitiveHash<> class template with the
860           WebCore::CaseFoldingHash class
861
862         * WebCore.base.exp: Updated.
863         * WebCore.pro: Added EditorCommand.cpp, removed JSEditor.cpp.
864         * WebCore.vcproj/WebCore.vcproj: Ditto.
865         * WebCore.xcodeproj/project.pbxproj: Ditto.
866         * WebCoreSources.bkl: Ditto.
867
868         * dom/Document.cpp:
869         (WebCore::Document::Document): Removed code to set up m_jsEditor.
870         (WebCore::Document::~Document): Removed code to delete m_jsEditor.
871         (WebCore::command): Added. Helper function that gets an Editor::Command.
872         (WebCore::Document::executeCommand): Changed to use Editor::Command instead of
873         JSEditor.
874         (WebCore::Document::queryCommandEnabled): Ditto.
875         (WebCore::Document::queryCommandIndeterm):
876         (WebCore::Document::queryCommandState): Ditto.
877         (WebCore::Document::queryCommandSupported): Ditto.
878         (WebCore::Document::queryCommandValue): Ditto.
879
880         * dom/Document.h: Removed JSEditor, jsEditor, m_jsEditor. Changed to
881         use CaseFoldingHash.
882
883         * editing/Editor.cpp:
884         (WebCore::Editor::selectionForCommand): Renamed from selectionForEvent and
885         made into a member function so it is accessible from the new EditorCommand.cpp file.
886         Also changed to get the selection from the passed-in frame instead of from the
887         page, because this should work on the targeted frame unless the event overrides it.
888         (WebCore::Editor::handleKeypress): Updated for selectionForCommand change.
889         (WebCore::Editor::handleInputMethodKeypress): Ditto.
890         (WebCore::imageElementFromImageDocument): Renamed and changed to return
891         a HTMLImageElement instead of a Node*.
892         (WebCore::Editor::canCopy): Updated for name change.
893         (WebCore::Editor::selectionUnorderedListState): Updated for TriState change.
894         (WebCore::Editor::selectionOrderedListState): Ditto.
895         (WebCore::Editor::selectionStartHasStyle): Make type of local more specific.
896         (WebCore::updateState): Moved here from Frame.
897         (WebCore::Editor::selectionHasStyle): Ditto.
898         (WebCore::Editor::Editor): Initialize m_shouldStartNewKillRingSequence.
899         (WebCore::Editor::insertTextWithoutSendingTextEvent): Updated for
900         selectionForCommand change.
901         (WebCore::Editor::copy): Updated for imageElementFromImageDocument change.
902         (WebCore::Editor::toggleBold): Call the ToggleBold command via the command
903         machinery since it's no longer in this file as a local function.
904         (WebCore::Editor::toggleUnderline): Call the ToggleUnderline command.
905         (WebCore::Editor::setBaseWritingDirection): Change type of argument and of
906         local variable.
907         (WebCore::Editor::addToKillRing): Moved here from EditorMac. Not useful
908         without a kill ring, but it's relatively straightforward to implement one.
909         (WebCore::Editor::appendToKillRing): Put default implementation here for
910         platforms other than Mac. We should probably put a simple kill ring
911         implementation here -- doesn't need to be shared with the OS oh platforms
912         other than Mac.
913         (WebCore::Editor::prependToKillRing): Ditto.
914         (WebCore::Editor::yankFromKillRing): Ditto.
915         (WebCore::Editor::startNewKillRingSequence): Ditto.
916         (WebCore::Editor::setKillRingToYankedState): Ditto.
917
918         * editing/Editor.h: Moved the TriState enum here instead of inside the
919         Frame class. Added EditorCommandSource enum. Moved selectionHasStyle
920         here from the Frame class. Added Editor::Command class with five functions
921         for the various things you can do with a command (execute it, check if it
922         can be used, and its state and value). Changed hte parameter of
923         setBaseWritingDirection to be a const String& rather than a String.
924         Got rid of the kill-ring-related operations, but added the kill ring
925         functions themselves. Made selectedRange() public. Made the
926         m_startNewKillRingSequence not Mac-specific and added "should" to its
927         name.
928
929         * editing/EditorCommand.cpp: Copied from WebCore/editing/Editor.cpp.
930         Retained only the editing commands.
931         (WebCore::targetFrame): Moved to the top of the file.
932         (WebCore::executeApplyStyle): Added. Helper function for commands
933         that need to apply styles.
934         (WebCore::executeToggleStyle): Added. Helper function for commands
935         that need to toggle styles based on the style of the start of selection.
936         (WebCore::executeApplyParagraphStyle): Added. Like executeApplyStyle, but
937         for paragraph styles.
938         (WebCore::executeInsertFragment): Added. Helper function for commands
939         that need to insert a DOM fragment.
940         (WebCore::executeInsertNode): Added. Helper function for commands that
941         need to insert a tree rooted in a single DOM node.
942         (WebCore::stateStyle): Added. Helper function for the state of commands
943         that represent style.
944         (WebCore::valueStyle): Added. Helper function for the value of commands
945         that represent style.
946         (WebCore::canScroll): Added. Helper functions for some move and scroll
947         commands that need to determine if the renderer they are in can scroll.
948         (WebCore::unionDOMRanges): Moved here from EditorMac.
949         (WebCore::executeBackColor):
950         (WebCore::executeBackwardDelete):
951         (WebCore::executeCopy):
952         (WebCore::executeCreateLink):
953         (WebCore::executeCut):
954         (WebCore::executeDelete):
955         (WebCore::executeDeleteToMark):
956         (WebCore::executeDeleteWordBackward):
957         (WebCore::executeDeleteWordForward):
958         (WebCore::executeFindString):
959         (WebCore::executeFontName):
960         (WebCore::executeFontSize):
961         (WebCore::executeFontSizeDelta):
962         (WebCore::executeForeColor):
963         (WebCore::executeFormatBlock):
964         (WebCore::executeForwardDelete):
965         (WebCore::executeIndent):
966         (WebCore::executeInsertBacktab):
967         (WebCore::executeInsertHorizontalRule):
968         (WebCore::executeInsertHTML):
969         (WebCore::executeInsertImage):
970         (WebCore::executeInsertLineBreak):
971         (WebCore::executeInsertNewline):
972         (WebCore::executeInsertNewlineInQuotedContent):
973         (WebCore::executeInsertOrderedList):
974         (WebCore::executeInsertParagraph):
975         (WebCore::executeInsertTab):
976         (WebCore::executeInsertText):
977         (WebCore::executeInsertUnorderedList):
978         (WebCore::executeJustifyCenter):
979         (WebCore::executeJustifyFull):
980         (WebCore::executeJustifyLeft):
981         (WebCore::executeJustifyRight):
982         (WebCore::executeMoveBackward):
983         (WebCore::executeMoveBackwardAndModifySelection):
984         (WebCore::executeMoveDown):
985         (WebCore::executeMoveDownAndModifySelection):
986         (WebCore::executeMoveDownByPageAndModifyCaret):
987         (WebCore::executeMoveForward):
988         (WebCore::executeMoveForwardAndModifySelection):
989         (WebCore::executeMoveLeft):
990         (WebCore::executeMoveLeftAndModifySelection):
991         (WebCore::executeMoveRight):
992         (WebCore::executeMoveRightAndModifySelection):
993         (WebCore::executeMoveToBeginningOfDocument):
994         (WebCore::executeMoveToBeginningOfDocumentAndModifySelection):
995         (WebCore::executeMoveToBeginningOfLine):
996         (WebCore::executeMoveToBeginningOfLineAndModifySelection):
997         (WebCore::executeMoveToBeginningOfParagraph):
998         (WebCore::executeMoveToBeginningOfParagraphAndModifySelection):
999         (WebCore::executeMoveToBeginningOfSentence):
1000         (WebCore::executeMoveToBeginningOfSentenceAndModifySelection):
1001         (WebCore::executeMoveToEndOfDocument):
1002         (WebCore::executeMoveToEndOfDocumentAndModifySelection):
1003         (WebCore::executeMoveToEndOfSentence):
1004         (WebCore::executeMoveToEndOfSentenceAndModifySelection):
1005         (WebCore::executeMoveToEndOfLine):
1006         (WebCore::executeMoveToEndOfLineAndModifySelection):
1007         (WebCore::executeMoveToEndOfParagraph):
1008         (WebCore::executeMoveToEndOfParagraphAndModifySelection):
1009         (WebCore::executeMoveParagraphBackwardAndModifySelection):
1010         (WebCore::executeMoveParagraphForwardAndModifySelection):
1011         (WebCore::executeMoveUp):
1012         (WebCore::executeMoveUpAndModifySelection):
1013         (WebCore::executeMoveUpByPageAndModifyCaret):
1014         (WebCore::executeMoveWordBackward):
1015         (WebCore::executeMoveWordBackwardAndModifySelection):
1016         (WebCore::executeMoveWordForward):
1017         (WebCore::executeMoveWordForwardAndModifySelection):
1018         (WebCore::executeMoveWordLeft):
1019         (WebCore::executeMoveWordLeftAndModifySelection):
1020         (WebCore::executeMoveWordRight):
1021         (WebCore::executeMoveWordRightAndModifySelection):
1022         (WebCore::executeOutdent):
1023         (WebCore::executePaste):
1024         (WebCore::executePasteAndMatchStyle):
1025         (WebCore::executePrint):
1026         (WebCore::executeRedo):
1027         (WebCore::executeRemoveFormat):
1028         (WebCore::executeSelectAll):
1029         (WebCore::executeSelectToMark):
1030         (WebCore::executeSetMark):
1031         (WebCore::executeStrikethrough):
1032         (WebCore::executeSubscript):
1033         (WebCore::executeSuperscript):
1034         (WebCore::executeSwapWithMark):
1035         (WebCore::executeToggleBold):
1036         (WebCore::executeToggleItalic):
1037         (WebCore::executeTranspose):
1038         (WebCore::executeUnderline):
1039         (WebCore::executeUndo):
1040         (WebCore::executeUnlink):
1041         (WebCore::executeUnscript):
1042         (WebCore::executeUnselect):
1043         (WebCore::executeYank):
1044         (WebCore::executeYankAndSelect):
1045         (WebCore::supported):
1046         (WebCore::supportedPaste):
1047         (WebCore::enabled):
1048         (WebCore::enabledAnySelection):
1049         (WebCore::enabledAnySelectionAndMark):
1050         (WebCore::enableCaretInEditableText):
1051         (WebCore::enabledCopy):
1052         (WebCore::enabledCut):
1053         (WebCore::enabledInEditableText):
1054         (WebCore::enabledInRichlyEditableText):
1055         (WebCore::enabledPaste):
1056         (WebCore::enabledRangeInEditableText):
1057         (WebCore::enabledRangeInRichlyEditableText):
1058         (WebCore::enabledRedo):
1059         (WebCore::enabledUndo):
1060         (WebCore::stateNone):
1061         (WebCore::stateBold):
1062         (WebCore::stateItalic):
1063         (WebCore::stateOrderedList):
1064         (WebCore::stateStrikethrough):
1065         (WebCore::stateSubscript):
1066         (WebCore::stateSuperscript):
1067         (WebCore::stateUnderline):
1068         (WebCore::stateUnorderedList):
1069         (WebCore::valueNull):
1070         (WebCore::valueBackColor):
1071         (WebCore::valueFontName):
1072         (WebCore::valueFontSize):
1073         (WebCore::valueFontSizeDelta):
1074         (WebCore::valueForeColor):
1075         (WebCore::createCommandMap): Added lots of commands, including all the commands
1076         from JSEditor. A few commands needed different behavior based on whether they are
1077         invoked from the DOM or a keyboard binding.
1078         (WebCore::Editor::command): Added. Gets a command object given a name.
1079         (WebCore::Editor::Command::Command): Added.
1080         (WebCore::Editor::Command::execute): Added.
1081         (WebCore::Editor::Command::isSupported): Added.
1082         (WebCore::Editor::Command::isEnabled): Added.
1083         (WebCore::Editor::Command::state): Added.
1084         (WebCore::Editor::Command::value): Added.
1085         (WebCore::Editor::execCommand): Changed to call command().execute().
1086
1087         * editing/JSEditor.cpp: Removed.
1088         * editing/JSEditor.h: Removed.
1089
1090         * editing/mac/EditorMac.mm: Changed to provide kill ring primitives intead of
1091         kill ring commands, so the kill ring commands can be cross-platform.
1092         (WebCore::Editor::appendToKillRing): Added.
1093         (WebCore::Editor::prependToKillRing): Added.
1094         (WebCore::Editor::yankFromKillRing): Added.
1095         (WebCore::Editor::startNewKillRingSequence): Added.
1096         (WebCore::Editor::setKillRingToYankedState): Added.
1097
1098         * page/Frame.cpp: Removed selectionHasStyle, TriState, and updateState.
1099         * page/Frame.h: Ditto.
1100
1101         * page/mac/WebCoreFrameBridge.mm: Removed selectionHasStyle.
1102         * page/mac/WebCoreFrameBridge.h: Ditto.
1103
1104         * platform/ContextMenu.cpp:
1105         (WebCore::ContextMenu::checkOrEnableIfNeeded): Updated for TriState change.
1106
1107         * platform/text/StringHash.h:
1108         (WebCore::StringHash::hash): Merged the StrHash<> template classes into this.
1109         (WebCore::StringHash::equal): Ditto.
1110         (WebCore::CaseFoldingHash::hash): Merged the CaseInsensitiveHash<> template
1111         classes into this.
1112         (WebCore::CaseFoldingHash::equal): Ditto.
1113
1114         * platform/text/StringImpl.cpp:
1115         (WebCore::equal): Changed to invoke StringHash.
1116         (WebCore::equalIgnoringCase): Changed to invoke CaseFoldingHash.
1117
1118         * dom/DOMImplementation.cpp:
1119         (WebCore::addString): Updated to use StringHash and CaseFoldingHash.
1120         (WebCore::isSVG10Feature): Ditto.
1121         (WebCore::isSVG11Feature): Ditto.
1122         * loader/FrameLoader.cpp:
1123         (WebCore::localSchemes): Ditto.
1124         * platform/graphics/FontCache.cpp:
1125         (WebCore::computeHash): Ditto.
1126         * platform/network/HTTPHeaderMap.h: Ditto.
1127         * platform/text/PlatformString.h: Ditto.
1128         * platform/text/StringImpl.h: Ditto.
1129         * rendering/RenderPartObject.cpp:
1130         (WebCore::RenderPartObject::updateWidget): Ditto.
1131         * xml/XMLHttpRequest.cpp:
1132         (WebCore::canSetRequestHeader): Ditto.
1133
1134         * rendering/RenderTreeAsText.cpp: Removed stray include of JSEditor.h.
1135
1136 2007-12-11  Darin Adler  <darin@apple.com>
1137
1138         * platform/wx/KeyboardEventWx.cpp:
1139         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Another try at fixing the
1140         WX build. Changes the code around a little bit.
1141
1142 2007-12-11  Darin Adler  <darin@apple.com>
1143
1144         * platform/wx/KeyboardEventWx.cpp:
1145         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Quick try at fixing build.
1146
1147 2007-12-11  Dan Bernstein  <mitz@apple.com>
1148
1149         Reviewed by Darin Adler.
1150
1151         - fix <rdar://problem/5631507> Text doesn't wrap properly at Tamil version of Wikipedia
1152
1153         Test: fast/text/international/complex-character-based-fallback.html
1154
1155         * platform/graphics/Font.cpp:
1156         (WebCore::Font::glyphDataForCharacter): Added a forceSmallCaps argument
1157         that forces this function to use the small caps font. It is used for
1158         combining marks that need to combine with a small cap.
1159         * platform/graphics/Font.h:
1160         * platform/win/UniscribeController.cpp:
1161         (WebCore::UniscribeController::advance): Changed to split the string
1162         into runs of characters that will be rendered using the same FontData.
1163         This is done by calling glyphDataForCharacter() for each cahracter to
1164         find the FontData it should be rendered with.
1165         (WebCore::UniscribeController::itemizeShapeAndPlace): Added a fontData
1166         argument that is passed on to shapeAndPlaceItem() instead of the
1167         smallCaps argument.
1168         (WebCore::UniscribeController::shapeAndPlaceItem): Added a fontData
1169         argument and removed the font fallback logic from this function, as
1170         it is now expected to be called with an item all of whose characters
1171         can be rendered with the given fontData.
1172         * platform/win/UniscribeController.h:
1173
1174 2007-12-07  Alexey Proskuryakov  <ap@webkit.org>
1175
1176         Reviewed by Darin.
1177
1178         <rdar://problem/5535636>
1179         Have to press 4 times instead of 2 times to get the expected result of ^^ with german keyboard.
1180
1181         http://bugs.webkit.org/show_bug.cgi?id=13916
1182         JavaScript detects Tab as a character input on a textfield validation
1183
1184         Test: platform/win/fast/events/double-dead-char.html
1185
1186         * platform/PlatformKeyboardEvent.h:
1187         (WebCore::PlatformKeyboardEvent::):
1188         (WebCore::PlatformKeyboardEvent::type):
1189         (WebCore::PlatformKeyboardEvent::windowsVirtualKeyCode):
1190         (WebCore::PlatformKeyboardEvent::setWindowsVirtualKeyCode):
1191         (WebCore::PlatformKeyboardEvent::keyIdentifier):
1192         (WebCore::PlatformKeyboardEvent::setIsAutoRepeat):
1193         Added an explicit type member to differentiate different kinds of events:
1194           RawKeyDown == keydown == WM_KEYDOWN
1195           KeyUp == keyup == WM_KEYUP
1196           Char == keypress == WM_CHAR
1197           KeyDown == e.g. NSKeyDown or NSFlagsChanged, used on platforms that have a different model for
1198           event processing, and needs to be converted to RawKeyDown (+ Char) for processing in DOM.
1199
1200         * platform/mac/KeyEventMac.mm:
1201         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Updated for changed data members.
1202         Fix Enter (numeric keypad) charCode to match Return, as we check for it from keypress default handlers.
1203         (WebCore::windowsKeyCodeForKeyEvent): 
1204         (WebCore::isKeyUpEvent): Made it do something closer to what it claims; added a FIXME explaining
1205         that it still fails.
1206         (WebCore::disambiguateKeyDownEvent): Downgrade from KeyDown to RawKeyDown or Char, removing information that
1207         should not be available in those (because it cannot be provided on Windows).
1208
1209         * platform/win/KeyEventWin.cpp:
1210         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Updated for changed data members.
1211         Used standard Windows constants for bit masks instead of our own ones.
1212         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): Should never be called on Windows.
1213
1214         * platform/gtk/KeyEventGtk.cpp:
1215         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1216         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
1217         * platform/qt/PlatformKeyboardEventQt.cpp:
1218         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1219         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
1220         * platform/wx/KeyboardEventWx.cpp:
1221         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1222         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
1223         Updated for cross-platform changes as much as it was possible without appropriate build
1224         environments.
1225
1226         * WebCore.base.exp: Export PlatformKeyboardEvent::disambiguateKeyDownEvent(), used by platforms that need to
1227         convert their fancy key events to RawKeyDown/Char pairs. Export Editor::isTextInsertionCommand().
1228
1229         * bridge/EditorClient.h:
1230         Renamed handleKeypress() to handleKeyboardEvent(), as it gets both keydowns and keypresses.
1231         Renamed handleInputMethodKeypress() to handleInputMethodKeydown(), as IMs work with raw keydowns.
1232
1233         * dom/Document.h:
1234         * dom/Document.cpp:
1235         (WebCore::Document::defaultEventHandler): Moved accesskey processing to EventHandler.
1236
1237         * dom/KeyboardEvent.h: Added comments describing keyCode/charCode behavior.
1238
1239         * dom/KeyboardEvent.cpp:
1240         (WebCore::eventTypeForKeyboardEventType):
1241         (WebCore::KeyboardEvent::KeyboardEvent): Conversion between platform and DOM event types is
1242         now straightforward, so scary hacks such as using autorepeat to distinguish types are
1243         not needed.
1244         (WebCore::KeyboardEvent::keyCode): Added a comment describing other browsers' behavior.
1245         (WebCore::KeyboardEvent::charCode): Added a comment describing other browsers' behavior.
1246         Changed to a more compatible behavior: raw keydown/keyup events do not and can not have
1247         character codes.
1248
1249         * editing/Editor.h:
1250         * editing/Editor.cpp:
1251         (WebCore::Editor::isTextInsertionCommand): Is this command actually text input in disguise?
1252         (WebCore::Editor::handleKeyboardEvent): Updated for new function names.
1253         (WebCore::Editor::handleInputMethodKeydown): Ditto.
1254
1255         * html/HTMLButtonElement.cpp:
1256         (WebCore::HTMLButtonElement::defaultEventHandler): Perform the default action when handling an
1257         appropriate event. Enter is processed on keypress (and thus should be checked for via charCode,
1258         not keyIdentifier), Space is processed on keydown+keyup! We now match IE in that a button is
1259         highlighted when Space is pressed.
1260
1261         * html/HTMLInputElement.cpp:
1262         (WebCore::HTMLInputElement::defaultEventHandler):
1263         * html/HTMLSelectElement.cpp:
1264         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
1265         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
1266         Made a number of fixes to when default actions take place, similar to HTMLButtonElement ones
1267         described above.
1268
1269         * page/EventHandler.cpp:
1270         (WebCore::EventHandler::keyEvent): Unless we have a combined KeyDown, just forward the event
1271         to the target. Call accesskey handling directly, as it doesn't seem to be part of normal event
1272         handling in IE. Also streamlined the code in KeyDown case, thanks to handleInputMethodKeypress()
1273         now being handleInputMethodKeydown().
1274         (WebCore::EventHandler::handleTextInputEvent): Check that we were not called from keydown.
1275         (WebCore::EventHandler::defaultTextInputEventHandler): Removed a call to defaultTabEventHandler,
1276         as default tab handling happens when processing keydown.
1277         (WebCore::handleAccessKey): Moved from Document, as access keys are processed outside normal
1278         event handling. Fixed accesskey processing to use information that's available in a raw keydown
1279         event.
1280
1281         (WebCore::EventHandler::defaultKeyboardEventHandler): Do not ignore keydown; in particular,
1282         handle tabs during keydown processing.
1283
1284         * page/mac/EventHandlerMac.mm:
1285         (WebCore::EventHandler::currentKeyboardEvent): Disambiguate KeyDown as RawKeyDown, as this is
1286         what callers want.
1287
1288         * platform/text/PlatformString.h:
1289         * platform/text/String.cpp:
1290         (WebCore::String::characterStartingAt):
1291         * platform/text/StringImpl.cpp:
1292         (WebCore::StringImpl::characterStartingAt):
1293         * platform/text/StringImpl.h:
1294         Added a UChar32 accessor.
1295
1296         * svg/graphics/SVGImageEmptyClients.h:
1297         (WebCore::SVGEmptyEditorClient::handleKeyboardEvent):
1298         (WebCore::SVGEmptyEditorClient::handleInputMethodKeydown):
1299         Updated for new function names.
1300
1301 2007-12-11  John Sullivan  <sullivan@apple.com>
1302
1303         Reviewed by Adele
1304
1305         Tiger build fix -- don't call QTMovieView setDelegate: directly because it's not public
1306
1307         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1308         (WebCore::MediaPlayerPrivate::createQTMovieView):
1309         (WebCore::MediaPlayerPrivate::detachQTMovieView):
1310
1311 2007-12-11  Alexey Proskuryakov  <ap@webkit.org>
1312
1313         Reviewed by Darin.
1314
1315         http://bugs.webkit.org/show_bug.cgi?id=16325
1316         <rdar://problem/5632997> REGRESSION: www.xerox.ru doesn't work
1317
1318         Fix this on Windows, too!
1319
1320         Test: http/tests/misc/empty-cookie.html
1321
1322         * platform/network/win/CookieJarWin.cpp:
1323         (WebCore::setCookies):
1324         (WebCore::cookies):
1325         Same fix as on Mac, translated into CF.
1326
1327         * platform/win/CookieJarWin.cpp: Removed - the real one is in platform/network/win.
1328
1329 2007-12-11  Christian Dywan  <christian@twotoasts.de>
1330
1331         Reviewed by Alp Toker.
1332
1333         http://bugs.webkit.org/show_bug.cgi?id=16371
1334         Implement additional mouse cursors for Gtk
1335
1336         Added cursor bitmaps from Mozilla:
1337         http://lxr.mozilla.org/mozilla1.8/source/widget/src/gtk2/nsGtkCursors.h
1338
1339         * platform/gtk/CursorGtk.cpp:
1340         (WebCore::customCursorNew):
1341         (WebCore::verticalTextCursor):
1342         (WebCore::cellCursor):
1343         (WebCore::contextMenuCursor):
1344         (WebCore::noDropCursor):
1345         (WebCore::copyCursor):
1346         (WebCore::progressCursor):
1347         (WebCore::aliasCursor):
1348         (WebCore::noneCursor):
1349         (WebCore::notAllowedCursor):
1350         (WebCore::zoomInCursor):
1351         (WebCore::zoomOutCursor):
1352         * platform/gtk/CursorGtk.h: Added.
1353
1354 2007-12-10  Oliver Hunt  <oliver@apple.com>
1355
1356         Reviewed by Weinig, Dan, and Alexey.
1357
1358         Fix character set used for dynamically loaded scripts.
1359
1360         Fix for:
1361             <rdar://problem/5333163> Safari can not display the mouse over pop menu on ChinaTimes News site correctly.
1362             <rdar://problem/5530048> [Safari]? :Leopard9A576: The typed CH characters displays as garbage in Sina website after reloading the webpage.
1363             <rdar://problem/5416588> All menus for chinese IBM site have wrong encoding
1364             
1365         Use the same logic to determine the charset for a script loaded dynamically
1366         as we do for a statically loaded script.
1367
1368         * html/HTMLScriptElement.cpp:
1369         (WebCore::HTMLScriptElement::insertedIntoDocument):
1370
1371 2007-12-10  Justin Garcia  <justin.garcia@apple.com>
1372
1373         Reviewed by Oliver Hunt.
1374
1375         <rdar://problem/5482023> GoogleDocs: After FormatBlock in an empty document, certain functions are disabled
1376         
1377         We were trying to insert a block of the requested type before the body element.
1378         
1379         * editing/FormatBlockCommand.cpp:
1380         (WebCore::FormatBlockCommand::doApply): 
1381         Removed unnecessary ()s in the if condition.
1382         Removed "|| !upstreamStart.node()->isDescendantOf(root)" from the if condition, since
1383         a) upstreamStart will never be outside the root editable element, since in that case
1384         there would be no block inside the editable root to Format, and b) if upstreamStart.node() 
1385         *is* the root, then refNode is the root, and we shouldn't insert before the root, we should insert
1386         at [root, 0].
1387         Added comments to explain the use of upstream() in the second if-clause.
1388         Added an early return for case where there is nothing selected, in that case, there is nothing
1389         to move.
1390
1391 2007-12-10  Adele Peterson  <adele@apple.com>
1392
1393         Reviewed and partially fixed by Tim Hatcher.
1394
1395         Remaining part of fix for <rdar://problem/5633400>
1396         Transformed <video> is not clipped correctly until a repaint is forced
1397
1398         Replace the implementation of a QTKit method to avoid repaints from the NSView system associated with the QTMovie
1399         from clobbering the WebCore repaints.
1400
1401         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerRepaint): Added.
1402         * html/HTMLMediaElement.h:
1403         * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::repaint): Added.
1404         * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerRepaint): Added.
1405
1406         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1407         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1408         (method_setImplementation): Added for Tiger.
1409
1410         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate): Call detachQTMovieView, which now does more cleanup.
1411         (WebCore::MediaPlayerPrivate::cancelLoad): ditto.
1412         (WebCore::MediaPlayerPrivate::setVisible): ditto.
1413         (WebCore::MediaPlayerPrivate::detachQTMovieView): Clear the delegate as well as m_qtMovieView pointer.
1414
1415         (WebCore::MediaPlayerPrivate::repaint): Added.  Triggers a repaint on the video renderer.
1416         (-[WebCoreMovieObserver repaint]): ditto.
1417
1418         (WebCore::mainThreadSetNeedsDisplay): Added.
1419          Does a WebCore repaint instead of going through the view repaint system for QTMovieView.
1420         (WebCore::MediaPlayerPrivate::createQTMovieView): Replace the implementation of _mainThreadSetNeedsDisplay.
1421
1422 2007-12-10  Geoffrey Garen  <ggaren@apple.com>
1423
1424         Reviewed by Sam Weinig.
1425
1426         Updated for rename in JavaScriptCore.
1427
1428         * bridge/mac/WebCoreScriptDebugger.mm:
1429         (-[WebCoreScriptCallFrame scopeChain]):
1430         (-[WebCoreScriptCallFrame functionName]):
1431         (-[WebCoreScriptCallFrame evaluateWebScript:]):
1432
1433 2007-12-10  Rodney Dawes  <dobey@wayofthemonkey.com>
1434
1435         Bug 16383: Ambiguous Window Usage in kjs_dom.cpp
1436         <http://bugs.webkit.org/show_bug.cgi?id=16383>
1437
1438         Use KJS::Window not the ambiguous Window
1439
1440         Reviewed by ddkilzer.
1441
1442         * bindings/js/kjs_dom.cpp (checkNodeSecurity):
1443
1444 2007-12-10  Sam Weinig  <sam@webkit.org>
1445
1446         Fix non-mac builds.
1447
1448         * page/WindowFeatures.cpp: #include <wtf/MathExtras.h> for isnan.
1449
1450 2007-12-10  Marvin Decker  <marv.decker@gmail.com>
1451
1452         Reviewed by Darin.
1453
1454         Fix a divide by 0 in the progress tracker.
1455         http://bugs.webkit.org/show_bug.cgi?id=15055
1456
1457         * loader/ProgressTracker.cpp:
1458         (WebCore::ProgressTracker::incrementProgress):
1459
1460 2007-12-09  Sam Weinig  <sam@webkit.org>
1461
1462         Reviewed by Darin.
1463
1464         More cleanup of kjs_window.
1465         - Move WindowFeatures from bridge/ to page/
1466         - Move functions related to WindowFeatures (boolFeature,
1467           floatFeature, setWindowFeature, parseWindowFeatures) into the class.
1468         - Fix up whitespace.
1469
1470         * WebCore.vcproj/WebCore.vcproj:
1471         * WebCore.xcodeproj/project.pbxproj:
1472         * bindings/js/kjs_window.cpp:
1473         (KJS::DOMWindowTimer::~DOMWindowTimer):
1474         (KJS::createWindow):
1475         (KJS::showModalDialog):
1476         (KJS::Window::getOwnPropertySlot):
1477         (KJS::Window::allowsAccessFrom):
1478         (KJS::Window::shouldInterruptScript):
1479         (KJS::WindowProtoFuncAToB::callAsFunction):
1480         (KJS::WindowProtoFuncOpen::callAsFunction):
1481         (KJS::Window::setReturnValueSlot):
1482         (KJS::ScheduledAction::execute):
1483         (KJS::Window::timerFired):
1484         (KJS::Location::Location):
1485         (KJS::Location::getValueProperty):
1486         (KJS::Location::getOwnPropertySlot):
1487         (KJS::Location::put):
1488         (KJS::LocationProtoFuncReplace::callAsFunction): Use better variable names.
1489         (KJS::LocationProtoFuncAssign::callAsFunction): Ditto.
1490         (KJS::LocationProtoFuncToString::callAsFunction): Remove extraneous calls to
1491         allowsAccessFrom, cleanup the function a little.
1492         (KJS::PausedTimeouts::~PausedTimeouts):
1493         * bridge/WindowFeatures.h: Removed.
1494         * page/WindowFeatures.cpp: Added.
1495         (WebCore::isSeparator):
1496         (WebCore::WindowFeatures::WindowFeatures):
1497         (WebCore::WindowFeatures::setWindowFeature):
1498         (WebCore::WindowFeatures::boolFeature):
1499         (WebCore::WindowFeatures::floatFeature):
1500         * page/WindowFeatures.h: Copied from WebCore/bridge/WindowFeatures.h.
1501         (WebCore::WindowFeatures::WindowFeatures):
1502
1503 2007-12-10  Timothy Hatcher  <timothy@apple.com>
1504
1505         Reviewed by Mark Rowe.
1506
1507         <rdar://problem/5639463> Bundle versions on Tiger should be 4523.x not 523.x
1508
1509         * Configurations/Version.xcconfig: Some Tiger versions of Xcode don't set MAC_OS_X_VERSION_MAJOR,
1510           so assume Tiger and use a 4 for the SYSTEM_VERSION_PREFIX.
1511
1512 2007-12-10  Alp Toker  <alp@atoker.com>
1513
1514         Reviewed by Niko.
1515
1516         Cairo implementation of GraphicsContext::setUseAntialiasing().
1517
1518         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1519         (WebCore::GraphicsContext::setUseAntialiasing):
1520
1521 2007-12-10  Rob Buis  <buis@kde.org>
1522
1523         Reviewed by Darin.
1524
1525         http://bugs.webkit.org/show_bug.cgi?id=16182
1526         SVG should disable antialiasing for shape-rendering="crispEdges"
1527
1528         Turn off anti-aliasing of shapes when shape-rendering="crispEdges".
1529
1530         * platform/graphics/GraphicsContext.h:
1531         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1532         (WebCore::GraphicsContext::setUseAntialiasing):
1533         * platform/graphics/cg/GraphicsContextCG.cpp:
1534         (WebCore::GraphicsContext::setUseAntialiasing):
1535         * platform/graphics/qt/GraphicsContextQt.cpp:
1536         (WebCore::GraphicsContext::setUseAntialiasing):
1537         * platform/graphics/wx/GraphicsContextWx.cpp:
1538         (WebCore::GraphicsContext::setUseAntialiasing):
1539         * rendering/RenderPath.cpp:
1540         (WebCore::RenderPath::paint):
1541
1542 2007-12-09  Rob Buis  <buis@kde.org>
1543
1544         Reviewed by Niko.
1545
1546         http://bugs.webkit.org/show_bug.cgi?id=16163
1547         SVG crash in Node::setChanged() on Debug builds only (trashed parent)
1548
1549         Fix the crash by properly unregistering as client from SVGResource
1550         when deleting a styled svg node.
1551
1552         * svg/SVGStyledElement.cpp:
1553         (WebCore::SVGStyledElement::~SVGStyledElement):
1554
1555 2007-12-10  Brady Eidson  <beidson@apple.com>
1556
1557         Rubberstamped by John
1558
1559         * storage/DatabaseTracker.cpp:
1560         (WebCore::DatabaseTracker::canEstablishDatabase): If the UI Delegate returns *exactly* the estimated size
1561           for the new quota, we should allow the database to be created
1562
1563 2007-12-10  David D. Kilzer  <ddkilzer@webkit.org>
1564
1565         Bug 9683: Implement select.options.remove() method
1566         <http://bugs.webkit.org/show_bug.cgi?id=9683>
1567
1568         Reviewed by Maciej.
1569
1570         Implement select.options.remove() by calling select.remove()
1571         with the same arguments.  This is what MSIE 7 does, although its
1572         select.remove() method differs from WebKit's by throwing an
1573         exception when called with no arguments or with a negative
1574         integer argument.  Note that the DOM Level 1 documentation
1575         specifies that select.remove() does not throw an exception.
1576
1577         Tests: fast/js/select-options-remove-gc.html
1578                fast/js/select-options-remove.html
1579
1580         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1581         (WebCore::JSHTMLOptionsCollection::remove): Added.
1582         * html/HTMLOptionsCollection.cpp:
1583         (WebCore::HTMLOptionsCollection::remove): Added.
1584         * html/HTMLOptionsCollection.h:
1585         * html/HTMLOptionsCollection.idl:
1586
1587 2007-12-09  Sam Weinig  <sam@webkit.org>
1588
1589         Rubber stamped by Mark Rowe.
1590
1591         * WebCore.xcodeproj/project.pbxproj: Add missing DerivedSources files.
1592
1593 2007-12-09  Oliver Hunt  <oliver@apple.com>
1594
1595         Reviewed by Niko.
1596
1597         Correction, 'z' and 'Z' are the only commands that cannot have an extended
1598         list of arguments.
1599
1600         * svg/SVGParserUtilities.cpp:
1601         (WebCore::SVGPathParser::parseSVG):
1602
1603 2007-12-09  Oliver Hunt  <oliver@apple.com>
1604
1605         Reviewed by Niko.
1606
1607         Prevent unlimited iteration in the case of invalid path data.
1608         
1609         The only path commands that can leave numbers trailing the command processing
1610         are 'm' and 'M', in which trailing numbers are parsed as arguments to an
1611         implicit lineto command.  In any case we should just terminate as an invalid
1612         path.
1613
1614         * svg/SVGParserUtilities.cpp:
1615         (WebCore::SVGPathParser::parseSVG):
1616
1617 2007-12-09  Luca Bruno  <lethalman88@gmail.com>
1618
1619         Reviewed by Alp Toker.
1620
1621         http://bugs.webkit.org/show_bug.cgi?id=15825
1622         [GTK] curl - slow dns causing hangs.
1623
1624         Create a vector of jobs, to satisfy requests in the right order.
1625         Set a limit to the number of simultaneous connections.
1626
1627         * platform/network/curl/ResourceHandleManager.cpp:
1628         (WebCore::maxRunningJobs): added
1629         (WebCore::ResourceHandleManager::ResourceHandleManager):
1630         (WebCore::ResourceHandleManager::removeFromCurl):
1631         (WebCore::ResourceHandleManager::startScheduledJobs):
1632
1633         * platform/network/curl/ResourceHandleManager.h:
1634         (WebCore::ResourceHandleList): removed
1635         (WebCore::ResourceHandleManager::m_runningJobs): added
1636         (WebCore::ResourceHandleManager::m_resourceHandleListHead): removed
1637         (WebCore::ResourceHandleManager::m_resourceHandleList): added
1638
1639 2007-12-08  Sam Weinig  <sam@webkit.org>
1640
1641         Reviewed by Oliver.
1642
1643         Cleanup kjs_window.h/cpp.
1644
1645         * bindings/js/kjs_window.cpp:
1646         (KJS::WindowPrivate::WindowPrivate):
1647         (KJS::DOMWindowTimer::DOMWindowTimer):
1648         (KJS::Window::Window):
1649         (KJS::Window::retrieveWindow):
1650         (KJS::Window::retrieveActive):
1651         (KJS::Window::retrieve):
1652         (KJS::Window::location):
1653         (KJS::Window::mark):
1654         (KJS::allowPopUp):
1655         (KJS::parseModalDialogFeatures):
1656         (KJS::floatFeature):
1657         (KJS::canShowModalDialog):
1658         (KJS::canShowModalDialogNow):
1659         (KJS::showModalDialog):
1660         (KJS::Window::getValueProperty):
1661         (KJS::Window::getOwnPropertySlot):
1662         (KJS::Window::globalExec):
1663         (KJS::Window::setListener):
1664         (KJS::Window::getListener):
1665         (KJS::Window::findOrCreateJSEventListener):
1666         (KJS::Window::findOrCreateJSUnprotectedEventListener):
1667         (KJS::Window::clearHelperObjectProperties):
1668         (KJS::Window::setCurrentEvent):
1669         (KJS::WindowProtoFuncAToB::callAsFunction):
1670         (KJS::WindowProtoFuncBToA::callAsFunction):
1671         (KJS::WindowProtoFuncOpen::callAsFunction):
1672         (KJS::WindowProtoFuncSetTimeout::callAsFunction):
1673         (KJS::WindowProtoFuncClearTimeout::callAsFunction):
1674         (KJS::WindowProtoFuncSetInterval::callAsFunction):
1675         (KJS::WindowProtoFuncAddEventListener::callAsFunction):
1676         (KJS::WindowProtoFuncRemoveEventListener::callAsFunction):
1677         (KJS::WindowProtoFuncShowModalDialog::callAsFunction):
1678         (KJS::WindowProtoFuncNotImplemented::callAsFunction):
1679         * bindings/js/kjs_window.h:
1680         (KJS::PausedTimeouts::PausedTimeouts):
1681         (KJS::PausedTimeouts::takeTimeouts):
1682         (KJS::ScheduledAction::ScheduledAction):
1683
1684 2007-12-08  Sam Weinig  <sam@webkit.org>
1685
1686         Reviewed by Mitz.
1687
1688         Move window scrolling, moving and resizing methods from KJS::Window
1689         to WebCore::DOMWindow so that there bindings can be autogenerated.
1690
1691         Tests: fast/dom/Window/window-resize-and-move-arguments.html
1692                fast/dom/Window/window-scroll-arguments.html
1693
1694         * WebCore.xcodeproj/project.pbxproj:
1695         * bindings/js/kjs_window.cpp:
1696         (KJS::Window::getValueProperty): Remove extraneous allowsAccessFrom check.
1697         (KJS::WindowProtoFuncOpen::callAsFunction):
1698         (KJS::WindowProtoFuncNotImplemented::callAsFunction): Remove extraneous allowsAccessFrom check.
1699         * bindings/js/kjs_window.h:
1700         * bindings/scripts/CodeGeneratorJS.pm: Add new extended attribute
1701         to ensure that the no less than the declared number of attributes
1702         is allowed.
1703         * page/DOMWindow.cpp:
1704         (WebCore::DOMWindow::adjustWindowRect): Moved from kjs_window.
1705         (WebCore::DOMWindow::scrollBy):
1706         (WebCore::DOMWindow::scrollTo):
1707         (WebCore::DOMWindow::moveBy):
1708         (WebCore::DOMWindow::moveTo):
1709         (WebCore::DOMWindow::resizeBy):
1710         (WebCore::DOMWindow::resizeTo):
1711         * page/DOMWindow.h:
1712         (WebCore::DOMWindow::scroll):
1713         * page/DOMWindow.idl:
1714
1715 2007-12-08  Kevin Ollivier  <kevino@theolliviers.com>
1716
1717         Reviewed by Alp Toker.
1718
1719         http://bugs.webkit.org/show_bug.cgi?id=14651
1720         [CURL] didReceiveResponse() only called for HTTP loads
1721
1722         http://bugs.webkit.org/show_bug.cgi?id=14583
1723         [GDK] file:// relative CSS include URLs handled incorrectly
1724
1725         Make sure CURL sets the ResourceResponse URL and calls
1726         didReceiveResponse for local files too. 
1727
1728         * platform/network/curl/ResourceHandleManager.cpp:
1729         (WebCore::writeCallback):
1730
1731 2007-12-08  Oliver Hunt  <oliver@apple.com>
1732
1733         Reviewed by Sam W.
1734
1735         Split the ENABLE_SVG_EXPERIMENTAL_FEATURES flag into separate flags.
1736         
1737         Fixes <rdar://problem/5620249> Must disable SVG animation
1738         <rdar://problem/5612772> Disable SVG filters on Mac to match Windows behavior
1739         
1740         In order to allow finer grained control over the set of SVG features
1741         this patch splits ENABLE_SVG_EXPERIMENTAL_FEATURES into the following
1742         distinct flags:
1743         ENABLE_SVG_ANIMATION
1744         ENABLE_SVG_FILTERS
1745         ENABLE_SVG_FONTS
1746         ENABLE_SVG_AS_IMAGE
1747         ENABLE_SVG_USE
1748         
1749         by default only ENABLE_SVG_AS_IMAGE and ENABLE_SVG_USE are set.
1750
1751         * Configurations/WebCore.xcconfig:
1752         * DerivedSources.make:
1753           Handle the increased number of build flags that may be necessary
1754           
1755         * WebCore.SVG.Animation.exp: Added.
1756         * WebCore.SVG.Filters.exp: Added.
1757         * WebCore.SVG.exp:
1758           We now may not need the animation or filter exports so 
1759           these need to be separate.
1760           
1761         * WebCore.vcproj/WebCore.vcproj:
1762         * WebCore.vcproj/build-generated-files.sh:
1763           Update for new flags
1764           
1765         Remainder of changes are to swap ENABLE(SVG_EXPERIMENTAL_FEATURES) 
1766         with the appropriate specific feature flag.  
1767         * bindings/js/JSSVGElementWrapperFactory.cpp:
1768         (WebCore::createJSSVGWrapper):
1769         * bindings/objc/DOM.mm:
1770         (WebCore::createElementClassMap):
1771         * dom/make_names.pl:
1772         * loader/CachedImage.cpp:
1773         (WebCore::CachedImage::createImage):
1774         * page/DOMWindow.idl:
1775         * rendering/RenderPath.cpp:
1776         (WebCore::RenderPath::absoluteClippedOverflowRect):
1777         * rendering/RenderSVGContainer.cpp:
1778         (WebCore::RenderSVGContainer::absoluteClippedOverflowRect):
1779         * rendering/RenderSVGImage.cpp:
1780         (WebCore::RenderSVGImage::absoluteClippedOverflowRect):
1781         * rendering/RenderSVGRoot.cpp:
1782         (WebCore::RenderSVGRoot::paint):
1783         (WebCore::RenderSVGRoot::absoluteClippedOverflowRect):
1784         * rendering/RenderSVGText.cpp:
1785         (WebCore::RenderSVGText::absoluteClippedOverflowRect):
1786         * rendering/SVGRenderSupport.cpp:
1787         (WebCore::prepareToRenderSVGContent):
1788         (WebCore::finishRenderSVGContent):
1789         * svg/SVGAnimateElement.cpp:
1790         * svg/SVGAnimateElement.h:
1791         * svg/SVGAnimateElement.idl:
1792         * svg/SVGAnimateMotionElement.cpp:
1793         * svg/SVGAnimateMotionElement.h:
1794         * svg/SVGAnimateTransformElement.cpp:
1795         * svg/SVGAnimateTransformElement.h:
1796         * svg/SVGAnimateTransformElement.idl:
1797         * svg/SVGComponentTransferFunctionElement.cpp:
1798         * svg/SVGComponentTransferFunctionElement.h:
1799         * svg/SVGComponentTransferFunctionElement.idl:
1800         * svg/SVGDocumentExtensions.cpp:
1801         (WebCore::SVGDocumentExtensions::startAnimations):
1802         * svg/SVGFEBlendElement.cpp:
1803         * svg/SVGFEBlendElement.h:
1804         * svg/SVGFEBlendElement.idl:
1805         * svg/SVGFEColorMatrixElement.cpp:
1806         * svg/SVGFEColorMatrixElement.h:
1807         * svg/SVGFEColorMatrixElement.idl:
1808         * svg/SVGFEComponentTransferElement.cpp:
1809         * svg/SVGFEComponentTransferElement.h:
1810         * svg/SVGFEComponentTransferElement.idl:
1811         * svg/SVGFECompositeElement.cpp:
1812         * svg/SVGFECompositeElement.h:
1813         * svg/SVGFECompositeElement.idl:
1814         * svg/SVGFEDiffuseLightingElement.cpp:
1815         * svg/SVGFEDiffuseLightingElement.h:
1816         * svg/SVGFEDiffuseLightingElement.idl:
1817         * svg/SVGFEDisplacementMapElement.cpp:
1818         * svg/SVGFEDisplacementMapElement.h:
1819         * svg/SVGFEDisplacementMapElement.idl:
1820         * svg/SVGFEDistantLightElement.cpp:
1821         * svg/SVGFEDistantLightElement.h:
1822         * svg/SVGFEDistantLightElement.idl:
1823         * svg/SVGFEFloodElement.cpp:
1824         * svg/SVGFEFloodElement.h:
1825         * svg/SVGFEFloodElement.idl:
1826         * svg/SVGFEFuncAElement.cpp:
1827         * svg/SVGFEFuncAElement.h:
1828         * svg/SVGFEFuncAElement.idl:
1829         * svg/SVGFEFuncBElement.cpp:
1830         * svg/SVGFEFuncBElement.h:
1831         * svg/SVGFEFuncBElement.idl:
1832         * svg/SVGFEFuncGElement.cpp:
1833         * svg/SVGFEFuncGElement.h:
1834         * svg/SVGFEFuncGElement.idl:
1835         * svg/SVGFEFuncRElement.cpp:
1836         * svg/SVGFEFuncRElement.h:
1837         * svg/SVGFEFuncRElement.idl:
1838         * svg/SVGFEGaussianBlurElement.cpp:
1839         * svg/SVGFEGaussianBlurElement.h:
1840         * svg/SVGFEGaussianBlurElement.idl:
1841         * svg/SVGFEImageElement.cpp:
1842         * svg/SVGFEImageElement.h:
1843         * svg/SVGFEImageElement.idl:
1844         * svg/SVGFELightElement.cpp:
1845         * svg/SVGFELightElement.h:
1846         * svg/SVGFEMergeElement.cpp:
1847         * svg/SVGFEMergeElement.h:
1848         * svg/SVGFEMergeElement.idl:
1849         * svg/SVGFEMergeNodeElement.cpp:
1850         * svg/SVGFEMergeNodeElement.h:
1851         * svg/SVGFEMergeNodeElement.idl:
1852         * svg/SVGFEOffsetElement.cpp:
1853         * svg/SVGFEOffsetElement.h:
1854         * svg/SVGFEOffsetElement.idl:
1855         * svg/SVGFEPointLightElement.cpp:
1856         * svg/SVGFEPointLightElement.h:
1857         * svg/SVGFEPointLightElement.idl:
1858         * svg/SVGFESpecularLightingElement.cpp:
1859         * svg/SVGFESpecularLightingElement.h:
1860         * svg/SVGFESpecularLightingElement.idl:
1861         * svg/SVGFESpotLightElement.cpp:
1862         * svg/SVGFESpotLightElement.h:
1863         * svg/SVGFESpotLightElement.idl:
1864         * svg/SVGFETileElement.cpp:
1865         * svg/SVGFETileElement.h:
1866         * svg/SVGFETileElement.idl:
1867         * svg/SVGFETurbulenceElement.cpp:
1868         * svg/SVGFETurbulenceElement.h:
1869         * svg/SVGFETurbulenceElement.idl:
1870         * svg/SVGFilterElement.cpp:
1871         * svg/SVGFilterElement.h:
1872         * svg/SVGFilterElement.idl:
1873         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
1874         * svg/SVGTimer.cpp:
1875         (WebCore::SVGTimer::animationsByElement):
1876         * svg/SVGUseElement.cpp:
1877         (WebCore::SVGUseElement::buildPendingResource):
1878         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
1879         * svg/SVGUseElement.h:
1880         * svg/TimeScheduler.cpp:
1881         (WebCore::TimeScheduler::connectIntervalTimer):
1882         (WebCore::TimeScheduler::disconnectIntervalTimer):
1883         * svg/graphics/SVGResourceFilter.cpp:
1884         * svg/graphics/SVGResourceFilter.h:
1885         * svg/graphics/cg/SVGResourceFilterCg.cpp:
1886         * svg/graphics/cg/SVGResourceFilterCg.mm:
1887         * svg/graphics/filters/SVGDistantLightSource.h:
1888         * svg/graphics/filters/SVGFEBlend.cpp:
1889         * svg/graphics/filters/SVGFEBlend.h:
1890         * svg/graphics/filters/SVGFEColorMatrix.cpp:
1891         * svg/graphics/filters/SVGFEColorMatrix.h:
1892         * svg/graphics/filters/SVGFEComponentTransfer.cpp:
1893         * svg/graphics/filters/SVGFEComponentTransfer.h:
1894         * svg/graphics/filters/SVGFEComposite.cpp:
1895         * svg/graphics/filters/SVGFEComposite.h:
1896         * svg/graphics/filters/SVGFEConvolveMatrix.cpp:
1897         * svg/graphics/filters/SVGFEConvolveMatrix.h:
1898         * svg/graphics/filters/SVGFEDiffuseLighting.cpp:
1899         * svg/graphics/filters/SVGFEDiffuseLighting.h:
1900         * svg/graphics/filters/SVGFEDisplacementMap.cpp:
1901         * svg/graphics/filters/SVGFEDisplacementMap.h:
1902         * svg/graphics/filters/SVGFEFlood.cpp:
1903         * svg/graphics/filters/SVGFEFlood.h:
1904         * svg/graphics/filters/SVGFEGaussianBlur.cpp:
1905         * svg/graphics/filters/SVGFEGaussianBlur.h:
1906         * svg/graphics/filters/SVGFEImage.cpp:
1907         * svg/graphics/filters/SVGFEImage.h:
1908         * svg/graphics/filters/SVGFEMerge.cpp:
1909         * svg/graphics/filters/SVGFEMerge.h:
1910         * svg/graphics/filters/SVGFEMorphology.cpp:
1911         * svg/graphics/filters/SVGFEMorphology.h:
1912         * svg/graphics/filters/SVGFEOffset.cpp:
1913         * svg/graphics/filters/SVGFEOffset.h:
1914         * svg/graphics/filters/SVGFESpecularLighting.cpp:
1915         * svg/graphics/filters/SVGFESpecularLighting.h:
1916         * svg/graphics/filters/SVGFETile.h:
1917         * svg/graphics/filters/SVGFETurbulence.cpp:
1918         * svg/graphics/filters/SVGFETurbulence.h:
1919         * svg/graphics/filters/SVGFilterEffect.cpp:
1920         * svg/graphics/filters/SVGFilterEffect.h:
1921         * svg/graphics/filters/SVGLightSource.cpp:
1922         * svg/graphics/filters/SVGLightSource.h:
1923         * svg/graphics/filters/SVGPointLightSource.h:
1924         * svg/graphics/filters/SVGSpotLightSource.h:
1925         * svg/graphics/filters/cg/SVGFEBlendCg.mm:
1926         * svg/graphics/filters/cg/SVGFEColorMatrixCg.mm:
1927         * svg/graphics/filters/cg/SVGFEComponentTransferCg.mm:
1928         * svg/graphics/filters/cg/SVGFECompositeCg.mm:
1929         * svg/graphics/filters/cg/SVGFEDiffuseLightingCg.mm:
1930         * svg/graphics/filters/cg/SVGFEDisplacementMapCg.mm:
1931         * svg/graphics/filters/cg/SVGFEFloodCg.mm:
1932         * svg/graphics/filters/cg/SVGFEGaussianBlurCg.mm:
1933         * svg/graphics/filters/cg/SVGFEHelpersCg.h:
1934         * svg/graphics/filters/cg/SVGFEHelpersCg.mm:
1935         * svg/graphics/filters/cg/SVGFEImageCg.mm:
1936         * svg/graphics/filters/cg/SVGFEMergeCg.mm:
1937         * svg/graphics/filters/cg/SVGFEOffsetCg.mm:
1938         * svg/graphics/filters/cg/SVGFESpecularLightingCg.mm:
1939         * svg/graphics/filters/cg/SVGFETileCg.mm:
1940         * svg/graphics/filters/cg/SVGFilterEffectCg.mm:
1941         * svg/graphics/filters/cg/WKArithmeticFilter.h:
1942         * svg/graphics/filters/cg/WKArithmeticFilter.m:
1943         * svg/graphics/filters/cg/WKComponentMergeFilter.h:
1944         * svg/graphics/filters/cg/WKComponentMergeFilter.m:
1945         * svg/graphics/filters/cg/WKDiffuseLightingFilter.h:
1946         * svg/graphics/filters/cg/WKDiffuseLightingFilter.m:
1947         * svg/graphics/filters/cg/WKDiscreteTransferFilter.h:
1948         * svg/graphics/filters/cg/WKDiscreteTransferFilter.m:
1949         * svg/graphics/filters/cg/WKDisplacementMapFilter.h:
1950         * svg/graphics/filters/cg/WKDisplacementMapFilter.m:
1951         * svg/graphics/filters/cg/WKDistantLightFilter.h:
1952         * svg/graphics/filters/cg/WKDistantLightFilter.m:
1953         * svg/graphics/filters/cg/WKGammaTransferFilter.h:
1954         * svg/graphics/filters/cg/WKGammaTransferFilter.m:
1955         * svg/graphics/filters/cg/WKIdentityTransferFilter.h:
1956         * svg/graphics/filters/cg/WKIdentityTransferFilter.m:
1957         * svg/graphics/filters/cg/WKLinearTransferFilter.h:
1958         * svg/graphics/filters/cg/WKLinearTransferFilter.m:
1959         * svg/graphics/filters/cg/WKNormalMapFilter.h:
1960         * svg/graphics/filters/cg/WKNormalMapFilter.m:
1961         * svg/graphics/filters/cg/WKPointLightFilter.h:
1962         * svg/graphics/filters/cg/WKPointLightFilter.m:
1963         * svg/graphics/filters/cg/WKSpecularLightingFilter.h:
1964         * svg/graphics/filters/cg/WKSpecularLightingFilter.m:
1965         * svg/graphics/filters/cg/WKSpotLightFilter.h:
1966         * svg/graphics/filters/cg/WKSpotLightFilter.m:
1967         * svg/graphics/filters/cg/WKTableTransferFilter.h:
1968         * svg/graphics/filters/cg/WKTableTransferFilter.m:
1969         * svg/graphics/mac/SVGResourceFilterPlatformDataMac.h:
1970         * svg/graphics/mac/SVGResourceFilterPlatformDataMac.mm:
1971         * svg/svgtags.in:
1972
1973 2007-12-08  Dan Bernstein  <mitz@apple.com>
1974
1975         Reviewed by Adele Peterson.
1976
1977         - fix two bugs in parsing of stylesheets in <style> elements created by
1978           the parser:
1979           1. each such stylesheet is parsed twice, once when the text node is
1980              added and again when the </style> tag is reached
1981           2. re-inserting such a <style> element into the document fails to
1982              re-parse and apply its stylesheet.
1983
1984         Test for bug #2: fast/dom/HTMLStyleElement/insert-parser-generated.html
1985
1986         * html/HTMLStyleElement.cpp:
1987         (WebCore::HTMLStyleElement::finishedParsing):
1988         * svg/SVGStyleElement.cpp:
1989         (WebCore::SVGStyleElement::finishedParsing):
1990
1991 2007-12-07  Sam Weinig  <sam@webkit.org>
1992
1993         Reviewed by Darin.
1994
1995         - Removes the faulty isSafeScript implementation that was only
1996           used for plugins.
1997         - Renames isSafeScript to allowsAccessFrom.
1998
1999         * bindings/js/JSDOMWindowCustom.cpp:
2000         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
2001         (WebCore::JSDOMWindow::customPut):
2002         * bindings/js/kjs_dom.cpp:
2003         (WebCore::checkNodeSecurity):
2004         * bindings/js/kjs_window.cpp:
2005         (KJS::createWindow):
2006         (KJS::Window::getValueProperty):
2007         (KJS::Window::namedItemGetter):
2008         (KJS::Window::getOwnPropertySlot):
2009         (KJS::Window::put):
2010         (KJS::Window::allowsAccessFrom):
2011         (KJS::Window::setListener):
2012         (KJS::Window::getListener):
2013         (KJS::WindowProtoFuncOpen::callAsFunction):
2014         (KJS::WindowProtoFuncSetTimeout::callAsFunction):
2015         (KJS::WindowProtoFuncClearTimeout::callAsFunction):
2016         (KJS::WindowProtoFuncSetInterval::callAsFunction):
2017         (KJS::WindowProtoFuncAddEventListener::callAsFunction):
2018         (KJS::WindowProtoFuncRemoveEventListener::callAsFunction):
2019         (KJS::WindowProtoFuncNotImplemented::callAsFunction):
2020         (KJS::Location::getOwnPropertySlot):
2021         (KJS::Location::put):
2022         (KJS::LocationProtoFuncReplace::callAsFunction):
2023         (KJS::LocationProtoFuncReload::callAsFunction):
2024         (KJS::LocationProtoFuncAssign::callAsFunction):
2025         (KJS::LocationProtoFuncToString::callAsFunction):
2026         * bindings/js/kjs_window.h:
2027         (KJS::Window::allowsAccessFrom):
2028         * bindings/objc/WebScriptObject.mm:
2029         (-[WebScriptObject _isSafeScript]): Reverse caller/argument of allowsAccessFrom to match
2030         the new call.
2031         * bindings/scripts/CodeGeneratorJS.pm:
2032
2033 2007-12-08  Rob Buis  <buis@kde.org>
2034
2035         Reviewed by Darin.
2036
2037         http://bugs.webkit.org/show_bug.cgi?id=15464
2038         SVGLengthList allows bad values
2039
2040         Be more strict with svg lengths without a unit identifier.
2041
2042         Test: svg/custom/invalid-lengthlist.svg
2043
2044         * svg/SVGLength.cpp:
2045         (WebCore::SVGLength::setValueAsString):
2046
2047 2007-12-08  Rob Buis  <buis@kde.org>
2048
2049         Mac Tiger build fix.
2050
2051         Use the wtf prefix when including MathExtras.h.
2052
2053         * rendering/RenderMedia.cpp:
2054
2055 2007-12-08  Alp Toker  <alp@atoker.com>
2056
2057         GTK+ build fix (for ENABLE_VIDEO builds):
2058
2059         Include MathExtras.h to get isfinite().
2060
2061         * rendering/RenderMedia.cpp:
2062
2063 2007-12-08  Rob Buis  <buis@kde.org>
2064
2065         Reviewed by Darin.
2066
2067         http://bugs.webkit.org/show_bug.cgi?id=15528
2068         svg_dynamic_cast should be removed
2069
2070         Replace svg_dynamic_cast with a combination of
2071         isSVGElement and static_cast.
2072
2073         * rendering/SVGRootInlineBox.cpp:
2074         (WebCore::SVGRootInlineBox::buildLayoutInformation):
2075         (WebCore::SVGRootInlineBox::buildTextChunks):
2076         * svg/SVGAnimationElement.cpp:
2077         (WebCore::SVGAnimationElement::targetElement):
2078         * svg/SVGElement.h:
2079         * svg/SVGElementInstance.cpp:
2080         (WebCore::SVGElementInstance::updateInstance):
2081         * svg/SVGFilterElement.cpp:
2082         (WebCore::SVGFilterElement::canvasResource):
2083         * svg/SVGGradientElement.cpp:
2084         (WebCore::SVGGradientElement::buildStops):
2085         * svg/SVGLocatable.cpp:
2086         (WebCore::SVGLocatable::getTransformToElement):
2087         * svg/SVGMaskElement.cpp:
2088         (WebCore::SVGMaskElement::drawMaskerContent):
2089         * svg/SVGSwitchElement.cpp:
2090         (WebCore::SVGSwitchElement::childShouldCreateRenderer):
2091         * svg/SVGUseElement.cpp:
2092         (WebCore::SVGUseElement::insertedIntoDocument):
2093         (WebCore::SVGUseElement::buildPendingResource):
2094         (WebCore::SVGUseElement::buildInstanceTree):
2095         (WebCore::SVGUseElement::handleDeepUseReferencing):
2096         (WebCore::SVGUseElement::buildShadowTree):
2097         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
2098         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
2099         * svg/graphics/SVGResource.cpp:
2100         (WebCore::getResourceById):
2101
2102 2007-12-07  Antti Koivisto  <antti@apple.com>
2103
2104         Reviewed by Adele.
2105         
2106         Partial fix for <rdar://problem/5633400>
2107         Transformed <video>, <img>, <embed> are not clipped correctly until a repaint is forced
2108         
2109         Fix video painting when transform is applied.
2110
2111         Test: media/video-transformed.html
2112
2113         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2114         (WebCore::MediaPlayerPrivate::paint):
2115
2116 2007-12-07  Dan Bernstein  <mitz@apple.com>
2117
2118         Reviewed by Sam Weinig.
2119
2120         - fix http://bugs.webkit.org/show_bug.cgi?id=16348
2121           @font-face does not affect the default style
2122
2123         Test: fast/css/font-face-default-font.html
2124
2125         * dom/Document.cpp:
2126         (WebCore::Document::recalcStyle): Pass our font selector to
2127         Font::update() if we already have one.
2128
2129 2007-12-07  Darin Adler  <darin@apple.com>
2130
2131         - fix Windows build
2132
2133         * bridge/win/GlobalHistoryWin.cpp:
2134         (WebCore::historyContains): Missed a rename.
2135
2136 2007-12-07  Brady Eidson  <beidson@apple.com>
2137
2138         Reviewed by Anders and Darin
2139
2140         When a statement bumps up against the quota and the UI Delegate grants more space, we need to
2141         actually set the new maximum size on the SQLiteDatabase (in addition to storing the new max quota
2142         in the DatabaseTracker, which was already done)
2143
2144         * storage/SQLTransaction.cpp:
2145         (WebCore::SQLTransaction::runStatements): If a statement is being retried, set the maximum size on
2146           the SQLiteDatabase to the new maximum size
2147
2148 2007-12-07  Darin Adler  <darin@apple.com>
2149
2150         - fix Tiger build
2151
2152         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Tiger didn't even have
2153         QTKIT_VERSION_MAX_ALLOWED, so add logic to work without that.
2154
2155 2007-12-07  Darin Adler  <darin@apple.com>
2156
2157         - fix 64-bit build, hopefully without breaking Tiger build
2158
2159         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2160         (WebCore::MediaPlayerPrivate::updateStates):
2161         Don't use Movies.h constants that are nonexistent in 64-bit.
2162         Define the new QTMovie.h constants, though, when using an older QTKit.
2163
2164 2007-12-07  Brady Eidson  <beidson@apple.com>
2165
2166         Reviewed by Anders
2167
2168         Fix <rdar://problem/5636115> - Prompted for quota increase to create database when it already existed
2169
2170         * storage/DatabaseTracker.cpp:
2171         (WebCore::DatabaseTracker::canEstablishDatabase): Check hasEntryForDatabase before doing any prompting
2172         (WebCore::DatabaseTracker::hasEntryForDatabase): Check and see if this database already exists
2173         * storage/DatabaseTracker.h:
2174
2175 2007-12-07  Darin Adler  <darin@apple.com>
2176
2177         Reviewed by Mitz.
2178
2179         - http://bugs.webkit.org/show_bug.cgi?id=15981
2180           speed up visited-link code a bit
2181
2182         * bridge/GlobalHistory.h: Change historyContains to take a character pointer plus length
2183         instead of requiring a DeprecatedString.
2184
2185         * bridge/mac/GlobalHistoryMac.mm: (WebCore::historyContains): Updated for above change.
2186         Also removes pointless "fast Latin-1" case that was never used.
2187         * bridge/win/GlobalHistoryWin.cpp: (WebCore::historyContains): Ditto.
2188         * platform/gtk/TemporaryLinkStubs.cpp: (WebCore::historyContains): Ditto.
2189         * platform/wx/TemporaryLinkStubs.cpp: (WebCore::historyContains): Ditto.
2190
2191         * css/CSSStyleSelector.cpp:
2192         (WebCore::findHash): Added. Helper for cleanpath.
2193         (WebCore::findSlashDotDotSlash): Ditto.
2194         (WebCore::findSlashSlash): Ditto.
2195         (WebCore::findSlashDotSlash): Ditto.
2196         (WebCore::cleanpath): Changed to use fast helper functions instead of slower general-purpose
2197         DeprecatedString find function.
2198         (WebCore::containsColonSlashSlash): Added. Helper for checkPseudoState.
2199         (WebCore::checkPseudoState): Got rid of reference count churn by using an AtomicString*
2200         instead of an AtomicString for the attribute value. Changed to use fast helper function
2201         instead of slower DeprecatedString::contains function, and also made the fast case not
2202         bother allocating a DeprecatedConstString.
2203
2204         - unrelated tiny cleanup
2205
2206         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
2207         (WebCore::releaseCachedStops): Use static_cast instead of reinterpret_cast.
2208         (WebCore::cgGradientCallback): Ditto.
2209
2210 2007-12-07  Darin Adler  <darin@apple.com>
2211
2212         Fix build on Tiger (Mark Rowe told me how).
2213
2214         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2215         Include <objc/objc-runtime.h>, which existed back on Tiger,
2216         rather than <objc/runtime.h>, which did not.
2217
2218 2007-12-07  Geoffrey Garen  <ggaren@apple.com>
2219
2220         Build fix: rolling out last build fix to change #include path.
2221
2222         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2223
2224 2007-12-07  Steve Falkenburg  <sfalken@apple.com>
2225
2226         Re-named our B&I flag from BUILDBOT to PRODUCTION.
2227
2228         Reviewed by Sam Weinig.
2229
2230         * WebCore.vcproj/WebCore.make:
2231
2232 2007-12-07  Geoffrey Garen  <ggaren@apple.com>
2233
2234         Build fix: corrected #include path.
2235
2236         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2237
2238 2007-12-07  Geoffrey Garen  <ggaren@apple.com>
2239
2240         Reviewed by Sam Weinig.
2241
2242         Added some namespace qualifications and a forwarding header, now that
2243         KJS::Node is sometimes #included in WebCore by JavaScriptCore headers.
2244
2245         * ForwardingHeaders/wtf/ListRefPtr.h: Added.
2246         * bindings/js/JSXSLTProcessor.cpp:
2247         (KJS::JSXSLTProcessorPrototypeFunctionTransformToFragment::callAsFunction):
2248         * bindings/js/kjs_binding.cpp:
2249         (KJS::ScriptInterpreter::getDOMNodeForDocument):
2250         (KJS::ScriptInterpreter::forgetDOMNodeForDocument):
2251         (KJS::ScriptInterpreter::putDOMNodeForDocument):
2252         (KJS::ScriptInterpreter::markDOMNodesForDocument):
2253         (KJS::ScriptInterpreter::updateDOMNodeDocument):
2254
2255 2007-12-07  Adam Roben  <aroben@apple.com>
2256
2257         Add SoftLinking.h for Windows and use it in a few places
2258
2259         Reviewed by Oliver.
2260
2261         * WebCore.vcproj/WebCore.vcproj: Added new file to project.
2262         * platform/win/PlatformScrollBarSafari.cpp: Use SoftLinking.h.
2263         (WebCore::PlatformScrollbar::PlatformScrollbar): Removed manual
2264         soft-linking calls.
2265         (WebCore::PlatformScrollbar::paintButton): Check for the presence of
2266         the SafariTheme library now that we can't check for the presence of
2267         paintThemePart directly.
2268         (WebCore::PlatformScrollbar::paintTrack): Ditto.
2269         (WebCore::PlatformScrollbar::paintThumb): Ditto.
2270         * platform/win/SoftLinking.h: Copied from WebCore/platform/mac/SoftLinking.h.
2271         * rendering/RenderThemeSafari.cpp: Same basic changes as to
2272         PlatformScrollBarSafari.cpp.
2273         (WebCore::RenderThemeSafari::RenderThemeSafari):
2274         (WebCore::RenderThemeSafari::isControlStyled):
2275         (WebCore::RenderThemeSafari::paintCapsLockIndicator):
2276         * rendering/RenderThemeSafari.h: Removed m_themeDLL member.
2277
2278 2007-12-07  Darin Adler  <darin@apple.com>
2279
2280         Reviewed by Adele.
2281
2282         - fix <rdar://problem/5608795> CrashTracer: 481 crashes in Safari
2283           at WebCore::HTMLSelectElement::saveState const + 152
2284
2285         Test: fast/forms/select-set-inner.html
2286
2287         * dom/ContainerNode.cpp:
2288         (WebCore::ContainerNode::removeChildren): Added a return value, as with other
2289         calls that change children, so we can optimize for the case where it does nothing.
2290         (WebCore::ContainerNode::cloneChildNodes): Changed parameter type to ContainerNode.
2291         * dom/ContainerNode.h: See above.
2292
2293         * html/HTMLOptGroupElement.cpp:
2294         (WebCore::HTMLOptGroupElement::removeChildren): Override removeChildren and call
2295         recalcSelectOptions in that case.
2296         (WebCore::HTMLOptGroupElement::childrenChanged): Override childrenChanged instead of
2297         addChild, for consistency with HTMLSelectElement; no need to override both.
2298         (WebCore::HTMLOptGroupElement::groupLabelText): Made const.
2299         * html/HTMLOptGroupElement.h: See above.
2300
2301         * html/HTMLSelectElement.cpp: Don't override addChild any more, because we already
2302         override childrenChanged, and addChild calls that.
2303         (WebCore::HTMLSelectElement::removeChildren): Override removeChildren and call
2304         recalcSelectOptions in that case.
2305         (WebCore::HTMLSelectElement::recalcListItems): Tightened up the code a little bit
2306         by using a for loop and traverseNextSibling. Also added some new comments and
2307         removed some obsolete ones.
2308         (WebCore::HTMLSelectElement::checkListItems): Added. Debug-only check to make
2309         sure we don't have a stale list items vector.
2310         * html/HTMLSelectElement.h: Changed listItems() to invoke checkListItems().
2311         This will help us catch cases where we have too few calls to setRecalcListItems.
2312
2313 2007-12-07  Dan Bernstein  <mitz@apple.com>
2314
2315         Reviewed by Darin Adler.
2316
2317         - WebCore part of fixing <rdar://problem/5499918> REGRESSION: insertion point in input field with custom border cuts holes in focus ring interior edges
2318
2319         Test: fast/repaint/focus-ring.html
2320
2321         * editing/SelectionController.cpp:
2322         (WebCore::SelectionController::caretRepaintRect): Changed to return just
2323         the caret rect without any padding.
2324         (WebCore::SelectionController::recomputeCaretRect): Changed to repaint
2325         just the caret rect without any padding.
2326         * platform/graphics/GraphicsContext.h: Removed setFocusRingClip() and
2327         clearFocusRingClip().
2328         * platform/graphics/cairo/GraphicsContextCairo.cpp: Ditto.
2329         * platform/graphics/cg/GraphicsContextCG.cpp: Ditto.
2330         * platform/graphics/cg/GraphicsContextPlatformPrivate.h: Removed
2331         m_focusRingClip member.
2332         * platform/graphics/mac/GraphicsContextMac.mm:
2333         (WebCore::GraphicsContext::drawFocusRing): Changed to call
2334         wkDrawFocusRing() once without setting up additional clip. On Leopard,
2335         wkDrawFocusRing() respects the context clip now. On Tiger, a
2336         transparency layer is used to apply clipping to the focus ring.
2337         * platform/graphics/qt/GraphicsContextQt.cpp: Removed focus ring clip
2338         methods and member.
2339         * platform/graphics/wx/GraphicsContextWx.cpp: Ditto.
2340         * platform/mac/WebCoreSystemInterface.h: Removed the clipRect argument
2341         to wkDrawFocusRing().
2342         * platform/mac/WebCoreSystemInterface.mm: Ditto.
2343         * rendering/RenderLayer.cpp:
2344         (WebCore::setClip): Removed call to set the focus ring clip.
2345         (WebCore::restoreClip): Removed call to reset the focus ring clip.
2346
2347 2007-12-07  Darin Adler  <darin@apple.com>
2348
2349         Reviewed by Antti Koivisto and Kevin Decker.
2350
2351         - fix <rdar://problem/5601586> QtKit should be dynamically loaded upon need, not linked at startup
2352
2353         Also did a lot of small tweaks to MediaPlayerPrivateQTKit.
2354
2355         * WebCore.xcodeproj/project.pbxproj: Don't link to QTKit.
2356
2357         * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Omit unneeded includes and declarations.
2358         Made a lot more functions const. Made a few more members private and a couple inline.
2359         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Added soft linking machinery for all the
2360         things we currently use in QTKit. It's a little more awkward for classes and other data objects
2361         than it is for functions, but still relatively straightforward, with no changes needed to the
2362         client code. Added using namespace directives. Made a cuePointTimerInterval constant and put
2363         it at the top of the file. Use 0 consistently instead of sometimes 0 and sometimes 0.0f.
2364         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Removed unneeded initialization of RetainPtr
2365         members to nil.
2366         (WebCore::MediaPlayerPrivate::createQTMovie): Use adoptNS instead of autorelease.
2367         (WebCore::MediaPlayerPrivate::createQTMovieView): Ditto. Also use -[NSColor clearColor].
2368         (WebCore::MediaPlayerPrivate::createQTTime): Remove an unneeded type cast that had no effect.
2369         Changed to use long instead of int because that's the type for a QTTime time scale anyway.
2370         (WebCore::MediaPlayerPrivate::duration): Use a static_cast instead of a C-style cast.
2371         (WebCore::MediaPlayerPrivate::currentTime): Ditto. Also merged into a single expression.
2372         (WebCore::MediaPlayerPrivate::cuePointTimerFired): Added code to make a copy of the cue
2373         points set to avoid a potential problem with a set being modified as we iterate it.
2374         (WebCore::MediaPlayerPrivate::bytesLoaded): Removed unneeded null check of m_qtMovie.
2375         (WebCore::MediaPlayerPrivate::updateStates): Instead of comments explaining the numeric
2376         values, used the constants from the headers directly.
2377         (WebCore::MediaPlayerPrivate::getSupportedTypes): Instead of (QTMovieFileTypeOptions)0,
2378         pass the named constant with value 0, QTIncludeCommonTypes. Skipped the intermediate type
2379         of NSString to remove one cast. Replaced C-style cast with reinterpret_cast (arguably
2380         no better). Used RetainPtr instead of explicit CFRelease calls.
2381
2382         * platform/mac/SoftLinking.h: Added macros to do soft linking for classes and for pointers.
2383         It's not quite as automatic as the soft linking we can do for functions, since these define
2384         functions to get the values, so you need to define macros to make what look like variable
2385         accesses turn into function calls. See MediaPlayerPrivateQTKit for the details.
2386
2387         * html/HTMLMediaElement.h:
2388         * html/TimeRanges.h:
2389         * html/VoidCallback.h:
2390         * platform/graphics/MediaPlayer.h:
2391         Use angle brackets for wtf includes. Omit unneeded includes.
2392
2393 2007-12-07  Dan Bernstein  <mitz@apple.com>
2394
2395         Reviewed by Darin Adler.
2396
2397         - fix http://bugs.webkit.org/show_bug.cgi?id=16334
2398           <rdar://problem/5634923> REGRESSION (r28299): Homepage of any DotMac Web Gallery won't load completely
2399
2400         Test: fast/dynamic/subtree-no-common-root-static-y.html
2401
2402         * rendering/RenderObject.cpp:
2403         (WebCore::RenderObject::markContainingBlocksForLayout): Changed the call
2404         to setChildNeedsLayout() to not mark containing blocks and added a
2405         separate call to markContainingBlocksForLayout() that will not schedule
2406         a layout if we are already in the middle of scheduleRelayoutOfSubtree().
2407
2408 2007-12-07  Alexey Proskuryakov  <ap@webkit.org>
2409
2410         Reviewed by Darin.
2411
2412         http://bugs.webkit.org/show_bug.cgi?id=16325
2413         <rdar://problem/5632997> REGRESSION: www.xerox.ru doesn't work
2414         
2415         Test: http/tests/misc/empty-cookie.html
2416
2417         * platform/mac/CookieJar.mm:
2418         (WebCore::setCookies): Don't store empty cookies.
2419         (WebCore::cookies): Filter out empty cookies if we have them, as they could have been set
2420         with an earlier version of Leopard!
2421
2422 2007-12-06  Ada Chan  <adachan@apple.com>
2423
2424         Fixed the if statement (ERROR_SUCCESS is 0 and we were actually
2425         returning true when there's an error).
2426
2427         Reviewed by Steve.
2428
2429         * platform/win/FileSystemWin.cpp:
2430         (WebCore::makeAllDirectories):
2431
2432 2007-12-06  Darin Adler  <darin@apple.com>
2433
2434         - fix broken regression test
2435
2436         * bindings/js/kjs_binding.cpp:
2437         (KJS::setDOMException): Oops, this was just supposed to be PERMISSION_DENIED.
2438
2439 2007-12-06  Darin Adler  <darin@apple.com>
2440
2441         Reviewed by Sam Weinig.
2442
2443         - fix http://bugs.webkit.org/show_bug.cgi?id=16332
2444           ObjC DOM exception object descriptions should include the exception name
2445
2446         * WebCore.pro: Added ExceptionCode.cpp.
2447         * WebCore.vcproj/WebCore.vcproj: Added ExceptionCode.cpp.
2448         * WebCore.xcodeproj/project.pbxproj: Added ExceptionCode.cpp.
2449         * WebCoreSources.bkl: Added ExceptionCode.cpp.
2450
2451         * bindings/js/kjs_binding.cpp: (KJS::setDOMException): Moved the code to decompose an
2452         ExceptionCode into ExceptionCode.h/cpp -- getExceptionCodeDescription. Also removed
2453         the many unneeded includes that were here. Had to keep one special case here, for
2454         SECURITY_ERR.
2455
2456         * bindings/objc/ExceptionHandlers.mm: (WebCore::raiseDOMException): Changed to use the
2457         new getExceptionCodeDescription function so that this shares the exception name
2458         information that was previously only available to JavaScript.
2459
2460         * dom/ExceptionCode.cpp: Copied from bindings/js/kjs_binding.cpp.
2461         (WebCore::getExceptionCodeDescription): Added some assertions, and made the function
2462         handle exception names in a slightly more robust way that is not subject to integer
2463         overflow. (Not a real world issue since we should never receive a bad exception code.)
2464
2465         * dom/ExceptionCode.h: Added the ExceptionCodeDescription struct and the
2466         getExceptionCodeDescription function.
2467
2468         * svg/SVGException.h: Added a missing #include and got rid of some comments. Some of
2469         the comments were mildly helpful, but others were incorrect. This now matches the other
2470         exception-related headers such as RangeException.h.
2471
2472 2007-12-06  Brady Eidson  <beidson@apple.com>
2473
2474         Reviewed by Darin
2475
2476         Fixed a glaring bug that would prevent a statement from getting run a second time
2477
2478         * storage/SQLStatement.cpp:
2479         (WebCore::SQLStatement::execute): Clear failure due to quota *before* we check the error
2480           and return early
2481         (WebCore::SQLStatement::clearFailureDueToQuota): Only clear the error if it was a quota error
2482
2483 2007-12-06  Timothy Hatcher  <timothy@apple.com>
2484
2485         Reviewed by Oliver Hunt.
2486
2487         Use keydown instead of keypress so keyIdentifier can be used.
2488
2489         * page/inspector/ConsolePanel.js: Use keydown instead of keypress.
2490         * page/inspector/DatabasePanel.js: Ditto.
2491         * page/inspector/inspector.js: Ditto. Plus call removeEventListener
2492         before deleting windowLoaded.
2493
2494 2007-12-06  Adam Roben  <aroben@apple.com>
2495
2496         Rename FontsTable.plist to FontsList.plist
2497
2498         Rubberstamped by Hyatt.
2499
2500         * platform/graphics/win/FontDatabase.cpp:
2501
2502 2007-12-06  Brady Eidson  <beidson@apple.com>
2503
2504         Reviewed by Darin
2505
2506         Tweaked a comment and a few assertions from my last checkin
2507
2508         * storage/SQLStatement.cpp:
2509         (WebCore::SQLStatement::execute):
2510         (WebCore::SQLStatement::clearFailureDueToQuota):
2511         (WebCore::SQLStatement::lastExecutionFailedDueToQuota):
2512
2513 2007-12-06  Brady Eidson <beidson@apple.com>
2514
2515         Reviewed by Darin
2516
2517         Finished hooking up UI Delegate for databases - Database operations will now enforce a size quota and
2518         will ask the UI Delegate for more space when that quota is met
2519
2520         * platform/sql/SQLiteDatabase.cpp: Add the new SQLResultFull constant
2521         * platform/sql/SQLiteDatabase.h: Ditto
2522
2523         * storage/Database.cpp:
2524         (WebCore::Database::securityOriginData): Added this accessor, copying for thread safety
2525         (WebCore::Database::stringIdentifier): Ditto
2526         * storage/Database.h:
2527
2528         * storage/SQLStatement.cpp:
2529         (WebCore::SQLStatement::SQLStatement):
2530         (WebCore::SQLStatement::execute): Change to return an enum that represents 3 states - success, error, and quota.
2531           If the result is quota, this statement expects that it might be run again, presumably after the user increases 
2532           the quota
2533         (WebCore::SQLStatement::setFailureDueToQuota): Setup a quota failure, including a flag and the error
2534         (WebCore::SQLStatement::clearFailureDueToQuota): Clear a quota failure, for when the statement is rerun
2535         (WebCore::SQLStatement::lastExecutionFailedDueToQuota):
2536         * storage/SQLStatement.h:
2537
2538         * storage/SQLTransaction.cpp:
2539         (WebCore::SQLTransaction::SQLTransaction):
2540         (WebCore::SQLTransaction::performPendingCallback): Added an acceptable callback pointer
2541         (WebCore::SQLTransaction::openTransactionAndPreflight): Setup the quota in the database that will remain for this 
2542           transaction.  Note that in this patch, the quota being set is wrong - it makes sense to fix that in a follow up patch
2543         (WebCore::SQLTransaction::runStatements): Modified to add the ability to re-run a statement based on the UI delegate
2544           decision and whether the current statement was already run
2545         (WebCore::SQLTransaction::runCurrentStatement): Added another result condition - the Quota result - and handle it
2546         (WebCore::SQLTransaction::handleCurrentStatementError): Statements can now error-out from two places, so the code
2547           that handles a statement error was moved here
2548         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback): Added - Consult the UI delegate for more quota, then 
2549           reschedule the current statement on the database thread
2550         * storage/SQLTransaction.h:
2551
2552 2007-12-06  Steve Falkenburg  <sfalken@apple.com>
2553
2554         <rdar://problem/5614257> Crash in timer / hashtable code due to uncaught exception
2555         
2556         Don't use callback-based timers, since these cause Windows to eat Windows crashes
2557         in code the timers call.
2558         
2559         Windows appears to be defending against "shatter" attacks partially by setting
2560         up a structured exception block while dispatching callback-based WM_TIMERs.
2561         
2562         I verified this by adding a divide by zero into some timer callback code.
2563         In the case where the timer was dispatched via a callback, the divide by zero
2564         exception was silently handled and ignored, with execution continuing after
2565         our call to DispatchMessage.  When processed via the WNDPROC, no SEH
2566         block was established by Windows, and our divide by zero generated a real
2567         crash (which is what we wanted).
2568         
2569         Windows handling our crashes for us led us to leave the timer data structures
2570         in an invalid state so the next time a timer was set, we'd crash accessing an
2571         invalid HashMap of timer data.
2572         
2573         Reviewed by Hyatt.
2574
2575         * platform/win/SharedTimerWin.cpp:
2576         (WebCore::TimerWindowWndProc):
2577         (WebCore::setSharedTimerFireTime):
2578
2579 2007-12-06  Adam Roben  <aroben@apple.com>
2580
2581         Fix <rdar://5108390> Feed title is too low in blue banner
2582
2583         Way back in r23069 we started applying the same font ascent hack that
2584         Mac WebKit applies to Helvetica, Times, and Courier. We did this so
2585         that those fonts would match the Mac metrics when we run the
2586         regression tests. However, this hack was applying to Arial on Windows
2587         when a site would specify the Helvetica font face because Windows will
2588         alias the font names. Instead of removing the hack entirely, we
2589         turn it off by default but provide some SPI so that DumpRenderTree can
2590         turn it on.
2591
2592         Reviewed by Hyatt.
2593
2594         All tests pass.
2595
2596         * platform/graphics/FontData.h: Add a new static method to turn on the
2597         hack on Windows only.
2598         * platform/graphics/win/FontDataWin.cpp:
2599         (WebCore::FontData::setShouldApplyMacAscentHack): Added.
2600         (WebCore::FontData::platformInit): Only perform the hack if
2601         shouldApplyMacAscentHack is true.
2602
2603 2007-12-06  Geoffrey Garen  <ggaren@apple.com>
2604
2605         Reviewed by Sam Weinig.
2606
2607         Fixed http://bugs.webkit.org/show_bug.cgi?id=16328
2608         REGRESSION (r28470): Crash expanding a GMail conversation
2609         
2610         * page/Frame.cpp:
2611         (WebCore::Frame::scriptProxy): Only return 0 if JS seems disabled *and*
2612         we haven't created the proxy yet. If we've created the proxy already, a
2613         script may be in the midst of execution, even though we've lost our
2614         settings object. During execution, scripts assume they have free access
2615         to the proxy.
2616
2617 2007-12-06  Adele Peterson  <adele@apple.com>
2618
2619         Reviewed by Oliver.
2620
2621         Fix for <rdar://problem/5631356> Toggling display property on video causes controls to get lost
2622
2623         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::attach): Call updateFromElement.
2624         * html/HTMLMediaElement.h:
2625
2626 2007-12-05  Antti Koivisto  <antti@apple.com>
2627
2628         Reviewed by Oliver.
2629
2630         Rename
2631
2632         Movie -> MediaPlayer
2633         MoviePrivate -> MediaPlayerPrivate
2634         
2635         Movie is QuickTime terminology and clashes with its C API.
2636
2637         * WebCore.xcodeproj/project.pbxproj:
2638         * html/HTMLMediaElement.cpp:
2639         (WebCore::HTMLMediaElement::HTMLMediaElement):
2640         (WebCore::HTMLMediaElement::~HTMLMediaElement):
2641         (WebCore::HTMLMediaElement::initAndDispatchProgressEvent):
2642         (WebCore::HTMLMediaElement::bufferingRate):
2643         (WebCore::HTMLMediaElement::load):
2644         (WebCore::HTMLMediaElement::mediaPlayerNetworkStateChanged):
2645         (WebCore::HTMLMediaElement::mediaPlayerReadyStateChanged):
2646         (WebCore::HTMLMediaElement::setReadyState):
2647         (WebCore::HTMLMediaElement::progressEventTimerFired):
2648         (WebCore::HTMLMediaElement::seek):
2649         (WebCore::HTMLMediaElement::currentTime):
2650         (WebCore::HTMLMediaElement::duration):
2651         (WebCore::HTMLMediaElement::playbackRate):
2652         (WebCore::HTMLMediaElement::setPlaybackRate):
2653         (WebCore::HTMLMediaElement::play):
2654         (WebCore::HTMLMediaElement::pause):
2655         (WebCore::HTMLMediaElement::setVolume):
2656         (WebCore::HTMLMediaElement::setMuted):
2657         (WebCore::HTMLMediaElement::pickMedia):
2658         (WebCore::HTMLMediaElement::checkIfSeekNeeded):
2659         (WebCore::HTMLMediaElement::mediaPlayerVolumeChanged):
2660         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
2661         (WebCore::HTMLMediaElement::mediaPlayerCuePointReached):
2662         (WebCore::HTMLMediaElement::addCuePoint):
2663         (WebCore::HTMLMediaElement::buffered):
2664         (WebCore::HTMLMediaElement::seekable):
2665         (WebCore::HTMLMediaElement::effectiveStart):
2666         (WebCore::HTMLMediaElement::effectiveEnd):
2667         (WebCore::HTMLMediaElement::effectiveLoopStart):
2668         (WebCore::HTMLMediaElement::effectiveLoopEnd):
2669         (WebCore::HTMLMediaElement::updateMediaPlayer):
2670         (WebCore::HTMLMediaElement::willSaveToCache):
2671         * html/HTMLMediaElement.h:
2672         (WebCore::HTMLMediaElement::player):
2673         * html/HTMLVideoElement.cpp:
2674         (WebCore::HTMLVideoElement::videoWidth):
2675         (WebCore::HTMLVideoElement::videoHeight):
2676         * platform/MIMETypeRegistry.cpp:
2677         (WebCore::initialiseSupportedMediaMIMETypes):
2678         (WebCore::MIMETypeRegistry::isSupportedMediaMIMEType):
2679         (WebCore::MIMETypeRegistry::getSupportedMediaMIMETypes):
2680         * platform/MIMETypeRegistry.h:
2681         * platform/graphics/MediaPlayer.cpp: Copied from WebCore/platform/graphics/Movie.cpp.
2682         (WebCore::MediaPlayer::MediaPlayer):
2683         (WebCore::MediaPlayer::~MediaPlayer):
2684         (WebCore::MediaPlayer::load):
2685         (WebCore::MediaPlayer::cancelLoad):
2686         (WebCore::MediaPlayer::play):
2687         (WebCore::MediaPlayer::pause):
2688         (WebCore::MediaPlayer::duration):
2689         (WebCore::MediaPlayer::currentTime):
2690         (WebCore::MediaPlayer::seek):
2691         (WebCore::MediaPlayer::paused):
2692         (WebCore::MediaPlayer::seeking):
2693         (WebCore::MediaPlayer::naturalSize):
2694         (WebCore::MediaPlayer::hasVideo):
2695         (WebCore::MediaPlayer::networkState):
2696         (WebCore::MediaPlayer::readyState):
2697         (WebCore::MediaPlayer::volume):
2698         (WebCore::MediaPlayer::setVolume):
2699         (WebCore::MediaPlayer::rate):
2700         (WebCore::MediaPlayer::setRate):
2701         (WebCore::MediaPlayer::muted):
2702         (WebCore::MediaPlayer::setMuted):
2703         (WebCore::MediaPlayer::dataRate):
2704         (WebCore::MediaPlayer::setEndTime):
2705         (WebCore::MediaPlayer::addCuePoint):
2706         (WebCore::MediaPlayer::removeCuePoint):
2707         (WebCore::MediaPlayer::clearCuePoints):
2708         (WebCore::MediaPlayer::maxTimeBuffered):
2709         (WebCore::MediaPlayer::maxTimeSeekable):
2710         (WebCore::MediaPlayer::bytesLoaded):
2711         (WebCore::MediaPlayer::totalBytesKnown):
2712         (WebCore::MediaPlayer::totalBytes):
2713         (WebCore::MediaPlayer::setRect):
2714         (WebCore::MediaPlayer::visible):
2715         (WebCore::MediaPlayer::setVisible):
2716         (WebCore::MediaPlayer::paint):
2717         (WebCore::MediaPlayer::getSupportedTypes):
2718         (WebCore::MediaPlayer::networkStateChanged):
2719         (WebCore::MediaPlayer::readyStateChanged):
2720         (WebCore::MediaPlayer::volumeChanged):
2721         (WebCore::MediaPlayer::timeChanged):
2722         (WebCore::MediaPlayer::cuePointReached):
2723         * platform/graphics/MediaPlayer.h: Copied from WebCore/platform/graphics/Movie.h.
2724         (WebCore::MediaPlayerClient::~MediaPlayerClient):
2725         (WebCore::MediaPlayerClient::mediaPlayerNetworkStateChanged):
2726         (WebCore::MediaPlayerClient::mediaPlayerReadyStateChanged):
2727         (WebCore::MediaPlayerClient::mediaPlayerVolumeChanged):
2728         (WebCore::MediaPlayerClient::mediaPlayerTimeChanged):
2729         (WebCore::MediaPlayerClient::mediaPlayerCuePointReached):
2730         * platform/graphics/Movie.cpp: Removed.
2731         * platform/graphics/Movie.h: Removed.
2732         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: Copied from WebCore/platform/graphics/gtk/MoviePrivateGStreamer.cpp.
2733         (WebCore::mediaPlayerPrivateErrorCallback):
2734         (WebCore::mediaPlayerPrivateEOSCallback):
2735         (WebCore::mediaPlayerPrivateStateCallback):
2736         (WebCore::mediaPlayerPrivateBufferingCallback):
2737         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
2738         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
2739         (WebCore::MediaPlayerPrivate::load):
2740         (WebCore::MediaPlayerPrivate::play):
2741         (WebCore::MediaPlayerPrivate::pause):
2742         (WebCore::MediaPlayerPrivate::duration):
2743         (WebCore::MediaPlayerPrivate::currentTime):
2744         (WebCore::MediaPlayerPrivate::seek):
2745         (WebCore::MediaPlayerPrivate::setEndTime):
2746         (WebCore::MediaPlayerPrivate::addCuePoint):
2747         (WebCore::MediaPlayerPrivate::removeCuePoint):
2748         (WebCore::MediaPlayerPrivate::clearCuePoints):
2749         (WebCore::MediaPlayerPrivate::startCuePointTimerIfNeeded):
2750         (WebCore::MediaPlayerPrivate::cancelSeek):
2751         (WebCore::MediaPlayerPrivate::cuePointTimerFired):
2752         (WebCore::MediaPlayerPrivate::paused):
2753         (WebCore::MediaPlayerPrivate::seeking):
2754         (WebCore::MediaPlayerPrivate::naturalSize):
2755         (WebCore::MediaPlayerPrivate::hasVideo):
2756         (WebCore::MediaPlayerPrivate::setVolume):
2757         (WebCore::MediaPlayerPrivate::setMuted):
2758         (WebCore::MediaPlayerPrivate::setRate):
2759         (WebCore::MediaPlayerPrivate::dataRate):
2760         (WebCore::MediaPlayerPrivate::networkState):
2761         (WebCore::MediaPlayerPrivate::readyState):
2762         (WebCore::MediaPlayerPrivate::maxTimeBuffered):
2763         (WebCore::MediaPlayerPrivate::maxTimeSeekable):
2764         (WebCore::MediaPlayerPrivate::maxTimeLoaded):
2765         (WebCore::MediaPlayerPrivate::bytesLoaded):
2766         (WebCore::MediaPlayerPrivate::totalBytesKnown):
2767         (WebCore::MediaPlayerPrivate::totalBytes):
2768         (WebCore::MediaPlayerPrivate::cancelLoad):
2769         (WebCore::MediaPlayerPrivate::updateStates):
2770         (WebCore::MediaPlayerPrivate::loadStateChanged):
2771         (WebCore::MediaPlayerPrivate::rateChanged):
2772         (WebCore::MediaPlayerPrivate::sizeChanged):
2773         (WebCore::MediaPlayerPrivate::timeChanged):
2774         (WebCore::MediaPlayerPrivate::volumeChanged):
2775         (WebCore::MediaPlayerPrivate::didEnd):
2776         (WebCore::MediaPlayerPrivate::loadingFailed):
2777         (WebCore::MediaPlayerPrivate::setRect):
2778         (WebCore::MediaPlayerPrivate::setVisible):
2779         (WebCore::MediaPlayerPrivate::paint):
2780         (WebCore::MediaPlayerPrivate::getSupportedTypes):
2781         (WebCore::MediaPlayerPrivate::createGSTPlayBin):
2782         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h: Copied from WebCore/platform/graphics/gtk/MoviePrivateGStreamer.h.
2783         * platform/graphics/gtk/MoviePrivateGStreamer.cpp: Removed.
2784         * platform/graphics/gtk/MoviePrivateGStreamer.h: Removed.
2785         * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Copied from WebCore/platform/graphics/mac/MoviePrivateQTKit.h.
2786         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Copied from WebCore/platform/graphics/mac/MoviePrivateQTKit.mm.
2787         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
2788         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
2789         (WebCore::MediaPlayerPrivate::createQTMovie):
2790         (WebCore::MediaPlayerPrivate::createQTMovieView):
2791         (WebCore::MediaPlayerPrivate::createQTTime):
2792         (WebCore::MediaPlayerPrivate::load):
2793         (WebCore::MediaPlayerPrivate::play):
2794         (WebCore::MediaPlayerPrivate::pause):
2795         (WebCore::MediaPlayerPrivate::duration):
2796         (WebCore::MediaPlayerPrivate::currentTime):
2797         (WebCore::MediaPlayerPrivate::seek):
2798         (WebCore::MediaPlayerPrivate::doSeek):
2799         (WebCore::MediaPlayerPrivate::cancelSeek):
2800         (WebCore::MediaPlayerPrivate::seekTimerFired):
2801         (WebCore::MediaPlayerPrivate::setEndTime):
2802         (WebCore::MediaPlayerPrivate::addCuePoint):
2803         (WebCore::MediaPlayerPrivate::removeCuePoint):
2804         (WebCore::MediaPlayerPrivate::clearCuePoints):
2805         (WebCore::MediaPlayerPrivate::startCuePointTimerIfNeeded):
2806         (WebCore::MediaPlayerPrivate::cuePointTimerFired):
2807         (WebCore::MediaPlayerPrivate::paused):
2808         (WebCore::MediaPlayerPrivate::seeking):
2809         (WebCore::MediaPlayerPrivate::naturalSize):
2810         (WebCore::MediaPlayerPrivate::hasVideo):
2811         (WebCore::MediaPlayerPrivate::setVolume):
2812         (WebCore::MediaPlayerPrivate::setMuted):
2813         (WebCore::MediaPlayerPrivate::setRate):
2814         (WebCore::MediaPlayerPrivate::dataRate):
2815         (WebCore::MediaPlayerPrivate::networkState):
2816         (WebCore::MediaPlayerPrivate::readyState):
2817         (WebCore::MediaPlayerPrivate::maxTimeBuffered):
2818         (WebCore::MediaPlayerPrivate::maxTimeSeekable):
2819         (WebCore::MediaPlayerPrivate::maxTimeLoaded):
2820         (WebCore::MediaPlayerPrivate::bytesLoaded):
2821         (WebCore::MediaPlayerPrivate::totalBytesKnown):
2822         (WebCore::MediaPlayerPrivate::totalBytes):
2823         (WebCore::MediaPlayerPrivate::cancelLoad):
2824         (WebCore::MediaPlayerPrivate::updateStates):
2825         (WebCore::MediaPlayerPrivate::loadStateChanged):
2826         (WebCore::MediaPlayerPrivate::rateChanged):
2827         (WebCore::MediaPlayerPrivate::sizeChanged):
2828         (WebCore::MediaPlayerPrivate::timeChanged):
2829         (WebCore::MediaPlayerPrivate::volumeChanged):
2830         (WebCore::MediaPlayerPrivate::didEnd):
2831         (WebCore::MediaPlayerPrivate::setRect):
2832         (WebCore::MediaPlayerPrivate::setVisible):
2833         (WebCore::MediaPlayerPrivate::paint):
2834         (WebCore::MediaPlayerPrivate::getSupportedTypes):
2835         (-[WebCoreMovieObserver initWithCallback:WebCore::]):
2836         * platform/graphics/mac/MoviePrivateQTKit.h: Removed.
2837         * platform/graphics/mac/MoviePrivateQTKit.mm: Removed.
2838         * rendering/RenderMedia.cpp:
2839         (WebCore::RenderMedia::player):
2840         * rendering/RenderMedia.h:
2841         * rendering/RenderVideo.cpp:
2842         (WebCore::RenderVideo::RenderVideo):
2843         (WebCore::RenderVideo::~RenderVideo):
2844         (WebCore::RenderVideo::videoSizeChanged):
2845         (WebCore::RenderVideo::paintReplaced):
2846         (WebCore::RenderVideo::layout):
2847         (WebCore::RenderVideo::updateFromElement):
2848         (WebCore::RenderVideo::updatePlayer):
2849         * rendering/RenderVideo.h:
2850
2851 2007-12-06  Geoffrey Garen  <ggaren@apple.com>
2852
2853         Build fix: access global object directly.
2854
2855         * plugins/win/PluginViewWin.cpp:
2856         (WebCore::PluginViewWin::bindingInstance):
2857
2858 2007-12-06  Mark Rowe  <mrowe@apple.com>
2859
2860         Reviewed by Eric.
2861
2862         Fix bug spotted by GCC 4.2.
2863
2864         * bindings/js/kjs_window.cpp:
2865         (KJS::allowPopUp): Remove extraneous semicolon that completely changed the meaning of allowPopUp.
2866
2867 2007-12-06  Holger Hans Peter Freyther <holger.freyther@trolltech.com>
2868
2869         Reviewed by Alp Toker.
2870
2871         http://bugs.webkit.org/show_bug.cgi?id=16173
2872         Licensing change
2873
2874         Change license from BSD to LGPL.
2875
2876         * platform/gtk/FileSystemGtk.cpp:
2877
2878 2007-12-05  Rob Buis  <buis@kde.org>
2879
2880         Reviewed by Mitz.
2881
2882         http://bugs.webkit.org/show_bug.cgi?id=15289
2883         WebKit does not respect clip paths of a 0x0 rect
2884
2885         Make empty clip paths clip the whole referencing graphic.
2886
2887         * svg/SVGClipPathElement.cpp:
2888         (WebCore::SVGClipPathElement::canvasResource):
2889         * svg/graphics/SVGResourceClipper.h:
2890         (WebCore::ClipDataList::isEmpty):
2891
2892 2007-12-05  Darin Adler  <darin@apple.com>
2893
2894         Reviewed by Maciej.
2895
2896         - fix http://bugs.webkit.org/show_bug.cgi?id=16266
2897           <rdar://problem/5625279> REGRESSION: crash loading CNN.com at
2898           Interpreter::createObjectsForGlobalObjectProperties()
2899
2900         I don't know how to reproduce this in a test.
2901
2902         * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::mark):
2903         Call JSEventTargetNode::mark instead of DOMObject::mark. There's no difference
2904         right now, but it's best to call your base class, not your base's base.
2905
2906         * bindings/js/kjs_events.h: Removed unneeded virtual from the
2907         JSUnprotectedEventListener::mark() function; it neither derives from or is
2908         derived from anyone else with a mark() function so there's no need for virtual.
2909
2910         * bindings/js/kjs_window.cpp: (KJS::Window::mark): Call JSGlobalObject::mark,
2911         not JSObject::mark. This is the actual bug fix.
2912
2913 2007-12-05  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
2914
2915         http://bugs.webkit.org/show_bug.cgi?id=16145
2916         [gtk] Implement media support in GTK backend
2917
2918         Reviewed by Alp Toker.
2919
2920         Remove old comments, fix variable names, match WebKit coding style.
2921
2922         * platform/graphics/gtk/MoviePrivateGStreamer.cpp:
2923         (WebCore::moviePrivateEOSCallback):
2924         (WebCore::MoviePrivate::MoviePrivate):
2925         (WebCore::MoviePrivate::load):
2926         (WebCore::MoviePrivate::play):
2927         (WebCore::MoviePrivate::pause):
2928         (WebCore::MoviePrivate::currentTime):
2929         (WebCore::MoviePrivate::seek):
2930         (WebCore::MoviePrivate::cancelSeek):
2931         (WebCore::MoviePrivate::seeking):
2932         (WebCore::MoviePrivate::naturalSize):
2933         (WebCore::MoviePrivate::setVolume):
2934         (WebCore::MoviePrivate::setMuted):
2935         (WebCore::MoviePrivate::maxTimeBuffered):
2936         (WebCore::MoviePrivate::bytesLoaded):
2937         (WebCore::MoviePrivate::totalBytesKnown):
2938         (WebCore::MoviePrivate::totalBytes):
2939         (WebCore::MoviePrivate::updateStates):
2940         (WebCore::MoviePrivate::didEnd):
2941         (WebCore::MoviePrivate::paint):
2942         (WebCore::MoviePrivate::createGSTPlayBin):
2943         * platform/graphics/gtk/MoviePrivateGStreamer.h:
2944
2945 2007-12-05  Mark Rowe  <mrowe@apple.com>
2946
2947         Speculative wx build fix.  Add PlugInInfoStore::pluginNameForMIMEType to the temporary link stubs.
2948
2949         * platform/wx/TemporaryLinkStubs.cpp:
2950
2951 2007-12-05  Alp Toker  <alp@atoker.com>
2952
2953         Rubber stamped by Mark Rowe.
2954
2955         Remove DEPENDPATH on the generated sources directory. This causes
2956         trouble and is no longer necessary following the glib-genmarshal
2957         generator split.
2958
2959         * WebCore.pro:
2960
2961 2007-12-04  Geoffrey Garen  <ggaren@apple.com>
2962
2963         Reviewed by Darin Adler.
2964
2965         Third step in refactoring JSGlobalObject: Moved data members and data
2966         member access from Interpreter to JSGlobalObject. Changed Interpreter
2967         member functions to static functions. Same for the subclass, 
2968         ScriptInterpreter.
2969         
2970         This is a big change, but it's mostly code motion and renaming.
2971         
2972 2007-12-05  Darin Adler  <darin@apple.com>
2973
2974         "Reviewed" by Geoff.
2975
2976         * loader/FrameLoader.cpp:
2977         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Removed assertion.
2978         (WebCore::FrameLoader::dispatchDidCommitLoad): This one too.
2979         The assertions are firing like crazy. Not sure why yet.
2980
2981 2007-12-05  Darin Adler  <darin@apple.com>
2982
2983         Reviewed by Adam Roben.
2984
2985         - fix http://bugs.webkit.org/show_bug.cgi?id=16306
2986           Assertion failed in WebCore/loader/FrameLoader.cpp:4642
2987
2988         * loader/FrameLoader.cpp:
2989         (WebCore::FrameLoader::dispatchDidCommitLoad): Check m_creatingInitialEmptyDocument
2990         and don't deliver the client call in that case.
2991
2992 2007-12-05  Mark Rowe  <mrowe@apple.com>
2993
2994         Reviewed by Kevin Decker.
2995
2996         Fix 64-bit debug build.
2997
2998         * platform/text/mac/TextCodecMac.cpp:
2999         (WebCore::TextCodecMac::decode): OSStatus is a long for 32-bit but int on 64-bit,
3000         so we need to cast it to be able to use a single format specifier on both.
3001
3002 2007-12-05  Kevin Decker  <kdecker@apple.com>
3003
3004         Reviewed by Hyatt.
3005
3006         <rdar://problem/5613106> Acordex: REGRESSION (Tiger-Leopard): plug-ins can no longer take over TIFF images (affects uspto.gov)
3007        
3008         * loader/FrameLoader.cpp:
3009         (WebCore::FrameLoader::shouldUsePlugin): Allow plug-ins (with the exception of QuickTime) to
3010         takeover TIFF once again.
3011         
3012 2007-12-05  Luca Bruno  <lethalman88@gmail.com>
3013
3014         Reviewed by Alp Toker.
3015
3016         http://bugs.webkit.org/show_bug.cgi?id=16290
3017         [GTK] Pasting clipboard in rich text.
3018
3019         * platform/gtk/PasteboardGtk.cpp:
3020         (Pasteboard::documentFragment): Implement rich text paste support.
3021
3022 2007-12-05  Adele Peterson  <adele@apple.com>
3023
3024         Reviewed by Hyatt.
3025
3026         Reverting fix for <rdar://problem/5499918> REGRESSION: insertion point in input field with custom border cuts holes in focus ring interior edges
3027
3028         We need to just fix the underlying focus ring repaint problem.
3029
3030         * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::setStyle):
3031
3032 2007-12-04  Kevin McCullough  <kmccullough@apple.com>
3033
3034         Reviewed by Darin.
3035
3036         - <rdar://5621435>
3037         - Security Fix. Instead of having it off by default, WebKit now must
3038         explicitly turn off local-resource restriction when needed for backwards
3039         compatibility reasons.
3040
3041         * loader/FrameLoader.cpp:
3042
3043 2007-12-05  Adam Roben  <aroben@apple.com>
3044
3045         Set the menu item identifier for all menu items
3046
3047         This allows WebKit clients to distinguish between submenus in the
3048         context menu.
3049
3050         Reviewed by Darin.
3051
3052         No test possible.
3053
3054         * platform/win/ContextMenuItemWin.cpp:
3055         (WebCore::ContextMenuItem::ContextMenuItem):
3056
3057 2007-12-05  Dan Bernstein  <mitz@apple.com>
3058
3059         Reviewed by Darin Adler.
3060
3061         - WebCore part of fixing <rdar://problem/5111082> Flash popup video ad doesn't close when clicked at http://www.firestonecompleteautocare.com/
3062
3063         * manual-tests/nested-plug-ins.html: Added.
3064         * manual-tests/resources/nested-plug-ins-inner-frame.html: Added.
3065         * manual-tests/resources/nested-plug-ins-outer-frame.html: Added.
3066         * platform/ScrollView.h:
3067         * platform/Widget.h:
3068         (WebCore::Widget::attachToWindow): Added. Tells the widget that it is connected
3069         via visible ScrollViews to the root ScrollView of the WebView.
3070         (WebCore::Widget::detachFromWindow): Added. Tells the widget that it is no longer
3071         connected via visible ScrollViews to the root ScrollView of the WebView.
3072         * platform/win/ScrollViewWin.cpp:
3073         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate): Added
3074         m_visible and m_attachedToWindow members.
3075         (WebCore::ScrollView::attachToWindow): Added. Attaches all children if this
3076         view is visible.
3077         (WebCore::ScrollView::detachFromWindow): Added. Detaches all children if this
3078         view is visible (otherwise they would be detached already).
3079         (WebCore::ScrollView::show): Added. Attaches all children if this view
3080         is attached.
3081         (WebCore::ScrollView::hide): Added. Detaches all children if this view
3082         is attached (otherwise they would be detached already).
3083         (WebCore::ScrollView::isAttachedToWindow): Added.
3084         * platform/win/WidgetWin.cpp:
3085         (WebCore::Widget::setParent): Added calls to attachToWindow() and detachFromWindow()
3086         depending on whether the parent is set and attached or not.
3087         * plugins/win/PluginViewWin.cpp:
3088         (WebCore::PluginViewWin::setFocus):
3089         (WebCore::PluginViewWin::show): Changed to show the plug-in only if
3090         this view is attached.
3091         (WebCore::PluginViewWin::hide): Changed to hide the plug-in only if this
3092         view is attached (otherwise it would be hidden already).
3093         (WebCore::PluginViewWin::attachToWindow): Added. Shows the plug-in if this view
3094         is visible.
3095         (WebCore::PluginViewWin::detachFromWindow): Added. Hides the plug-in if this view
3096         is visible (otherwise it would be hidden already).
3097         (WebCore::PluginViewWin::PluginViewWin):
3098         * plugins/win/PluginViewWin.h: Added m_attachedToWindow member.
3099
3100 2007-12-04  Alp Toker  <alp@atoker.com>
3101
3102         Potential GTK+ build fix for the glib-genmarshal issue.
3103
3104         Split the glib-genmarshal qmake generator in two; one for the source
3105         file, another for the header.
3106
3107         * WebCore.pro:
3108
3109 2007-12-04  Alp Toker  <alp@atoker.com>
3110
3111         GTK+ build fix.
3112
3113         * platform/PlugInInfoStore.h:
3114
3115 2007-12-04  Kevin Decker  <kdecker@apple.com>
3116
3117         Reviewed by Anders.
3118
3119         <rdar://problem/5629125> PluginInfoStore needs the ability to return the name of a plug-in for a given MIME type
3120
3121         * page/mac/WebCoreViewFactory.h: Added pluginNameForMIMEType: method.
3122         * platform/PlugInInfoStore.h:
3123         * platform/gtk/TemporaryLinkStubs.cpp: Added stub version of pluginNameForMIMEType.
3124         (PlugInInfoStore::pluginNameForMIMEType):
3125         * platform/mac/PlugInInfoStoreMac.mm:
3126         (WebCore::PlugInInfoStore::pluginNameForMIMEType): Added.
3127         * platform/qt/PlugInInfoStoreQt.cpp: 
3128         (WebCore::PlugInInfoStore::pluginNameForMIMEType): Added stub version of pluginNameForMIMEType.
3129         * plugins/win/PlugInInfoStoreWin.cpp: 
3130         (WebCore::PlugInInfoStore::pluginNameForMIMEType): Added stub version of pluginNameForMIMEType.
3131
3132 2007-12-04  Adele Peterson  <adele@apple.com>
3133
3134         Reviewed by Darin.
3135
3136         Fix for <rdar://problem/5499918> REGRESSION: insertion point in input field with custom border cuts holes in focus ring interior edges
3137
3138         * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::setStyle):
3139         Adjust outline-offset so it doesn't extend beyond the border to interfere with typing
3140
3141 2007-12-04  Anders Carlsson  <andersca@apple.com>
3142
3143         Reviewed by Jon.
3144
3145         Always call NPP_NewStream, NPP_DestroyStream and NPP_URLNotify for JavaScript
3146         result streams, even if the JavaScript expression threw an exception or returned undefined.
3147         This matches what Firefox does.
3148         
3149         * plugins/win/PluginStreamWin.cpp:
3150         (WebCore::PluginStreamWin::sendJavaScriptStream):
3151         Handle the result string being null, and set the correct NPReason if it is.
3152         
3153         * plugins/win/PluginViewWin.cpp:
3154         (WebCore::PluginViewWin::performRequest):
3155         Always send the JavaScript stream, regardless of the result could be converted to a string or not.
3156
3157 2007-12-04  Adele Peterson  <adele@apple.com>
3158
3159         Reviewed by Hyatt.
3160
3161         Fix for <rdar://problem/5622464> controls should show up for audio element
3162
3163         * css/html4.css: Added styles for audio controls.  This will need to be refined, since we may want a different look for audio controls.
3164         * html/HTMLMediaElement.cpp:
3165         (WebCore::HTMLMediaElement::attributeChanged): When the controls attribute changes detach and reattach if necessary. 
3166         (WebCore::HTMLMediaElement::rendererIsNeeded): Added.
3167         (WebCore::HTMLMediaElement::createRenderer): Added.  Uses RenderMedia.
3168         * html/HTMLMediaElement.h:
3169         * rendering/RenderMedia.cpp: (WebCore::RenderMedia::RenderMedia): Added constructor that doesn't take intrinsic size.
3170         * rendering/RenderMedia.h:
3171
3172 2007-12-04  Anders Carlsson  <andersca@apple.com>
3173
3174         Reviewed by Sam.
3175
3176         Add isSafeScript(const JSGlobalObject*) so we won't get the JSGlobalObject
3177         implementation, which always returns true(!).
3178         
3179         * bindings/js/kjs_window.cpp:
3180         (KJS::Window::isSafeScript):
3181         Make the static isSafeScript method take two JSGlobalObjects.
3182         
3183         * bindings/js/kjs_window.h:
3184         (KJS::Window::isSafeScript):
3185         Implement isSafeScript and have it call the static method.
3186
3187 2007-11-27  Adam Roben  <aroben@apple.com>
3188
3189         Make the implementation of Frame::setNeedsReapplyStyles cross-platform
3190
3191         Reviewed by Hyatt.
3192
3193         No change in functionality.
3194
3195         * page/Frame.cpp:
3196         (WebCore::Frame::setNeedsReapplyStyles): Added. Invalidates the
3197         FrameView so that FrameView::layout will be called, which ends up
3198         calling reapplyStyles.
3199         (WebCore::Frame::needsReapplyStyles): Added.
3200         (WebCore::Frame::reapplyStyles): Renamed from reparseConfiguration.
3201         (WebCore::FramePrivate::FramePrivate):
3202         * page/Frame.h:
3203         * page/FramePrivate.h: Added new boolean member.
3204         * page/FrameView.cpp:
3205         (WebCore::FrameView::layout): Call Frame::reapplyStyles if needed.
3206         (WebCore::FrameView::needsLayout): Say that we need layout if the
3207         Frame needs styles reapplied.
3208         * page/mac/WebCoreFrameBridge.h: Removed setNeedsReapplyStyles.
3209         * page/mac/WebCoreFrameBridge.mm:
3210         (-[WebCoreFrameBridge reapplyStylesForDeviceType:]): Updated for
3211         rename.
3212
3213         * bridge/win/FrameWin.cpp: Removed Frame::setNeedsReapplyStyles.
3214         * page/gtk/FrameGtk.cpp: Ditto.
3215         * page/mac/FrameMac.mm: Ditto.
3216         * page/qt/FrameQt.cpp: Ditto.
3217         * platform/wx/TemporaryLinkStubs.cpp: Ditto.
3218
3219 2007-12-04  Antti Koivisto  <antti@apple.com>
3220
3221         Reviewed by Adele.
3222
3223         Pass intrinsic size to the base class.
3224
3225         * rendering/RenderMedia.cpp:
3226         (WebCore::RenderMedia::RenderMedia):
3227
3228 2007-12-04  Adele Peterson  <adele@apple.com>
3229
3230         Reviewed by Darin.
3231
3232         Fix for <rdar://problem/5578209> REGRESSION: Crash in WebCore::DeprecatedValueListImpl::Private::copyList when going back on zoomerang.com/survey
3233
3234         * loader/FrameLoader.cpp: (WebCore::FrameLoader::scheduleHistoryNavigation):
3235           When the new url is exactly the same as the old url, don't treat it like a fragment navigation, since its going to cause a reload.
3236
3237 2007-12-04  Darin Adler  <darin@apple.com>
3238
3239         Reviewed by Kevin Decker.
3240
3241         - added an assertion for a situation that leads to a Safari assertion:
3242           a commit that is not followed by a load completion
3243
3244         - removed some unneeded FrameLoader stuff -- maybe some day we'll get this
3245           class cut down to size
3246
3247         * loader/FrameLoader.cpp:
3248         (WebCore::FrameLoader::FrameLoader): Added boolean for assertion.
3249         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Added code to assert
3250         that we already sent a commit before sending a complete.
3251         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy): Call
3252         client directly instead of indirecting through a function.
3253         (WebCore::FrameLoader::loadItem): Ditto.
3254         (WebCore::FrameLoader::goToItem): Ditto.
3255         (WebCore::FrameLoader::addHistoryForCurrentLocation): Get the private browsing
3256         state from Settings instead of FrameLoaderClient. Also call client directly
3257         instead of indirecting through a function.
3258         (WebCore::FrameLoader::updateHistoryForReload): Call client directly instead
3259         of indirecting through a function.
3260         (WebCore::FrameLoader::dispatchDidCommitLoad): Added code to assert
3261         that we did not yet send a commit and set the flag that will be used to check
3262         that we don't do this twice in a row without an intervening completion call.
3263
3264         * loader/FrameLoader.h: Added a boolean for the assertion. Removed six
3265         now-unneeded functions.
3266
3267         * loader/FrameLoaderClient.h: Removed now-unneeded privateBrowsingEnabled function.
3268
3269         * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::willCacheResponse): Get
3270         the private browsing state from Settings instead of FrameLoaderClient.
3271
3272         * svg/graphics/SVGImageEmptyClients.h: Removed obsolete privateBrowsingEnabled.
3273
3274 2007-12-03  Antti Koivisto  <antti@apple.com>
3275
3276         Reviewed by Adele.
3277         
3278         Fix <rdar://problem/5624802> 
3279         Controller displays outside of <video> element when width and height aren't specified 
3280
3281         - Explicitly adjust size of the controls tree root.
3282         - Switch RenderMedia base class back to RenderReplaced. It is easier to manage the shadow tree
3283           by hand. This also allows better code sharing with other replaced element classes.
3284         - Move duplicated layout and painting code from subclasses up to RenderReplaced.
3285
3286         Test: media/video-controls-rendering.html
3287
3288         * rendering/RenderHTMLCanvas.cpp:
3289         (WebCore::RenderHTMLCanvas::paintReplaced):
3290         * rendering/RenderHTMLCanvas.h:
3291             Share code.
3292         * rendering/RenderImage.cpp:
3293         (WebCore::RenderImage::paintReplaced):
3294         (WebCore::RenderImage::minimumReplacedHeight):
3295         * rendering/RenderImage.h:
3296             Share code.
3297         * rendering/RenderMedia.cpp:
3298         (WebCore::RenderMediaControlShadowRoot::RenderMediaControlShadowRoot):
3299         (WebCore::RenderMediaControlShadowRoot::setParent):
3300             Add a subclass just to get through encapsulation to use setParent().
3301         (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement):
3302             Move initialization to the constructor.
3303         (WebCore::RenderMedia::RenderMedia):
3304         (WebCore::RenderMedia::~RenderMedia):
3305         (WebCore::RenderMedia::layout):
3306             Resize and layout the controller root by hand.
3307         (WebCore::RenderMedia::firstChild):
3308         (WebCore::RenderMedia::lastChild):
3309         (WebCore::RenderMedia::removeChild):
3310             Support one child renderer for controls.
3311         (WebCore::RenderMedia::createControlsShadowRoot):
3312         * rendering/RenderMedia.h:
3313         (WebCore::RenderMedia::isMedia):
3314             Switch base class to RenderReplaced, delete the now unnecessary stuff.
3315         * rendering/RenderReplaced.cpp:
3316         (WebCore::RenderReplaced::layout):
3317         (WebCore::RenderReplaced::paint):
3318         * rendering/RenderReplaced.h:
3319         (WebCore::RenderReplaced::minimumReplacedHeight):
3320         (WebCore::RenderReplaced::paintReplaced):
3321             Share code.
3322         * rendering/RenderVideo.cpp:
3323         (WebCore::RenderVideo::videoSizeChanged):
3324             Simplify, just request relayout.
3325         (WebCore::RenderVideo::paintReplaced):
3326         (WebCore::RenderVideo::layout):
3327         * rendering/RenderVideo.h:
3328             Share code.
3329
3330 2007-12-04  Michael Natterer  <mitch@imendio.com>
3331
3332         Reviewed by Alp Toker.
3333
3334         * WebCore.pro: fix build of webkit-marshal by building the
3335         functions into a separate .cpp file instead of including them in
3336         the header. This way we can use the marshallers from more than one
3337         file without using bad hacks.
3338
3339         Add the generated sources directory to DEPENDPATH.
3340
3341 2007-12-04  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
3342
3343         Reviewed by Alp Toker.
3344
3345         http://bugs.webkit.org/show_bug.cgi?id=16145
3346         [gtk] Implement media support in GTK backend
3347
3348         This implements the media tags of HTML5 on the GTK+ port based on the 
3349         Mac port. Media tests pass although some tests required a small modifications: 
3350         As per the HTML5 spec, the loading of the clip should start only after 
3351         all script are done.  But in the case of the tests, the loading starts 
3352         before some callbacks get registered.  This has been discussed with 
3353         Antti Koivisto, and the tests should be updated.
3354
3355         There is only one known issue: one time in 10 tries, loading a buffered 
3356         clip will never end buffering.  The buffering will stall at 97% for no 
3357         apparent reasons.  Reloading the page usually works around the problem.
3358         On the GStreamer side, some codecs don't return correct values, therefore
3359         they make the tests fail.  For instance H.264 will make the video-end 
3360         test fail.  This should be fixed in GStreamer 0.10.15.
3361
3362         This version displays video in a pop up window.  A place holder is drawn
3363         on the page where the video should appear.
3364
3365         By default, it is turned off in WebCore.pro until GStreamer/X
3366         detection issues are sorted out.
3367
3368         * WebCore.pro:
3369         Disable video for now
3370         * platform/Logging.cpp:
3371         (WebCore::):
3372         * platform/Logging.h:
3373         Added a logging level for Media stuff
3374         * platform/graphics/Movie.cpp:
3375         * platform/graphics/gtk/MoviePrivateGStreamer.cpp: Added.
3376         (WebCore::moviePrivateErrorCallback):
3377         (WebCore::moviePrivateEOSCallback):
3378         (WebCore::moviePrivateStateCallback):
3379         (WebCore::moviePrivateBufferingCallback):
3380         (WebCore::moviePrivateWindowIDCallback):
3381         (WebCore::MoviePrivate::MoviePrivate):
3382         (WebCore::MoviePrivate::~MoviePrivate):
3383         (WebCore::MoviePrivate::load):
3384         (WebCore::MoviePrivate::play):
3385         (WebCore::MoviePrivate::pause):
3386         (WebCore::MoviePrivate::duration):
3387         (WebCore::MoviePrivate::currentTime):
3388         (WebCore::MoviePrivate::seek):
3389         (WebCore::MoviePrivate::setEndTime):
3390         (WebCore::MoviePrivate::addCuePoint):
3391         (WebCore::MoviePrivate::removeCuePoint):
3392         (WebCore::MoviePrivate::clearCuePoints):
3393         (WebCore::MoviePrivate::startCuePointTimerIfNeeded):
3394         (WebCore::MoviePrivate::cancelSeek):
3395         (WebCore::MoviePrivate::cuePointTimerFired):
3396         (WebCore::MoviePrivate::paused):
3397         (WebCore::MoviePrivate::seeking):
3398         (WebCore::MoviePrivate::naturalSize):
3399         (WebCore::MoviePrivate::hasVideo):
3400         (WebCore::MoviePrivate::setVolume):
3401         (WebCore::MoviePrivate::setMuted):
3402         (WebCore::MoviePrivate::setRate):
3403         (WebCore::MoviePrivate::dataRate):
3404         (WebCore::MoviePrivate::networkState):
3405         (WebCore::MoviePrivate::readyState):
3406         (WebCore::MoviePrivate::maxTimeBuffered):
3407         (WebCore::MoviePrivate::maxTimeSeekable):
3408         (WebCore::MoviePrivate::maxTimeLoaded):
3409         (WebCore::MoviePrivate::bytesLoaded):
3410         (WebCore::MoviePrivate::totalBytesKnown):
3411         (WebCore::MoviePrivate::totalBytes):
3412         (WebCore::MoviePrivate::cancelLoad):
3413         (WebCore::MoviePrivate::updateStates):
3414         (WebCore::MoviePrivate::loadStateChanged):
3415         (WebCore::MoviePrivate::rateChanged):
3416         (WebCore::MoviePrivate::sizeChanged):
3417         (WebCore::MoviePrivate::timeChanged):
3418         (WebCore::MoviePrivate::volumeChanged):
3419         (WebCore::MoviePrivate::didEnd):
3420         (WebCore::MoviePrivate::loadingFailed):
3421         (WebCore::MoviePrivate::setRect):
3422         (WebCore::MoviePrivate::setVisible):
3423         (WebCore::MoviePrivate::paint):
3424         (WebCore::MoviePrivate::getSupportedTypes):
3425         (WebCore::MoviePrivate::createGSTPlayBin):
3426         * platform/graphics/gtk/MoviePrivateGStreamer.h: Added.
3427
3428 2007-12-04  Holger Hans Peter Freyther <holger.freyther@trolltech.com>
3429
3430         Reviewed by Simon.
3431
3432         * Implement the InspectorClient for the Qt port
3433         * It does not support highlighting of nodes yet
3434         * Use QRC to open the internal page. The important thing is the
3435         '/' in the URL to make WebCore::Document::completeURL behave the
3436         way we want.
3437         * To make the InspectorClient work we will have to mark qrc as secure.
3438
3439         * WebCore.pro:
3440         * loader/FrameLoader.cpp:
3441         (WebCore::localSchemes):
3442         * page/inspector/WebKit.qrc: Added.
3443
3444 2007-12-04  Alp Toker  <alp@atoker.com>
3445
3446         Rubber stamped by Mark Rowe.
3447
3448         Remove two unused variables to silence warnings.
3449
3450         * html/CanvasRenderingContext2D.cpp:
3451         (WebCore::CanvasRenderingContext2D::fill):
3452         (WebCore::CanvasRenderingContext2D::stroke):
3453
3454 2007-12-03  Dan Bernstein  <mitz@apple.com>
3455
3456         Reviewed by Darin Adler.
3457
3458         - fix <rdar://problem/5134044> fast/frames/frame-src-attribute.html fails on Windows
3459
3460         * platform/win/ScrollViewWin.cpp:
3461         (WebCore::ScrollView::visibleWidth): Do not return negative values.
3462         (WebCore::ScrollView::visibleHeight): Ditto.
3463
3464 2007-12-03  Dan Bernstein  <mitz@apple.com>
3465
3466         Reviewed by Dave Hyatt.
3467
3468         - fix <rdar://problem/5346452> Resize event doesn't fire on body element inside a frame
3469
3470         Test: fast/events/resize-subframe.html
3471
3472         * page/FrameView.cpp:
3473         (WebCore::FrameViewPrivate::FrameViewPrivate): Added a timer used when
3474         deferring tasks that need to be done after layout.
3475         (WebCore::FrameViewPrivate::reset):
3476         (WebCore::FrameView::~FrameView):
3477         (WebCore::FrameView::layout): Moved the updating of widget positions,
3478         loading plug-ins and sending events queued up during layout into
3479         performPostLayoutTasks(). performPostLayoutTasks() is called after
3480         layout unless the layout was triggered by a previous layout's post-
3481         layout tasks. In the latter case, performPostLayoutTasks() is scheduled
3482         to run later.
3483         (WebCore::FrameView::performPostLayoutTasks): Performs work that needs
3484         to be done after layout but which can result in arbitrary code
3485         execution and therefore may re-invalidate the layout. This includes
3486         updating widget positions, loading plug-ins, and dispatching layout-
3487         related DOM events (scroll, overflow and resize).
3488         (WebCore::FrameView::postLayoutTimerFired):
3489         (WebCore::FrameView::dispatchScheduledEvents):
3490         * page/FrameView.h:
3491         * page/mac/WebCoreFrameBridge.h:
3492         * page/mac/WebCoreFrameBridge.mm: Removed -sendResizeEvent since this
3493         is handled by FrameView now.
3494
3495 2007-12-03  Rob Buis  <buis@kde.org>
3496
3497         Reviewed by Darin.
3498
3499         http://bugs.webkit.org/show_bug.cgi?id=15767
3500         Text decorations do not respect "visibility" property
3501
3502         Only paint decorations if visibility is "visible".
3503
3504         * rendering/SVGInlineTextBox.cpp:
3505         (WebCore::SVGInlineTextBox::paintDecoration):
3506
3507 2007-12-03  Steve Falkenburg  <sfalken@apple.com>
3508
3509         Fix build.
3510
3511         * WebCore.vcproj/WebCore.vcproj:
3512
3513 2007-12-03  Nikolas Zimmermann  <zimmermann@kde.org>
3514
3515         Reviewed by David.
3516
3517         Fixes: http://bugs.webkit.org/show_bug.cgi?id=15645
3518         Don't allow selectors to interfere with the SVG shadow tree (<use> internal non-exposed tree).
3519
3520         * css/CSSStyleSelector.cpp:
3521         (WebCore::CSSStyleSelector::checkSelector):
3522
3523 2007-12-03  Dan Bernstein  <mitz@apple.com>
3524
3525         Reviewed by Adam Roben.
3526
3527         - fix <rdar://problem/5538651> REGRESSSION: domfuzz: null deref in WebCore::Document::canReplaceChild
3528
3529         Test: fast/dom/Document/replaceChild-null-oldChild.html
3530
3531         * dom/Document.cpp:
3532         (WebCore::Document::canReplaceChild):
3533
3534 2007-12-03  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>