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