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