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