b047bd2f66670296f9f3b18499a373c068a01bc3
[WebKit-https.git] / WebCore / ChangeLog
1 2007-11-24  Mark Rowe  <mrowe@apple.com>
2
3         Reviewed by Tim Hatcher.
4
5         Fix <rdar://problem/5432686> 333MB RPRVT seems to leak @ www.43folders.com (1hr plug-in stream).
6         http://bugs.webkit.org/show_bug.cgi?id=13705
7
8         Don't buffer the entire stream contents in memory in the ResourceLoader.
9
10         * loader/mac/NetscapePlugInStreamLoaderMac.mm:
11         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
12         (WebCore::NetscapePlugInStreamLoader::didFinishLoading):
13         * loader/mac/WebPlugInStreamLoaderDelegate.h:
14
15 2007-11-23  Adam Roben  <aroben@apple.com>
16
17         Get rid of WebCoreSystemInterface on Windows
18
19         The one function defined in that file is now in WebKitSystemInterface.
20
21         Reviewed by Tim.
22
23         * WebCore.vcproj/WebCore.vcproj: Removed
24         WebCoreSystemInterface.{cpp,h}.
25         * platform/graphics/cg/ImageCG.cpp: Made #include of
26         WebCoreSystemInterface.h Mac-only.
27         * platform/win/GraphicsContextWin.cpp: Ditto.
28         * platform/win/WebCoreSystemInterface.cpp: Removed.
29         * platform/win/WebCoreSystemInterface.h: Removed.
30
31 2007-11-24  Adam Roben  <aroben@apple.com>
32
33         Replace uses of %@ with %s in the inspector
34
35         Rubberstamped by Tim.
36
37         * English.lproj/InspectorLocalizedStrings.js: Changed %@ to %s.
38         * page/inspector/DatabasePanel.js: Ditto.
39         * page/inspector/StylesSidebarPane.js: Ditto.
40         * page/inspector/inspector.js: Ditto.
41         * page/inspector/utilities.js:
42         (String.vsprintf): Removed @ as a format specifier.
43
44 2007-11-24  Adam Roben  <aroben@apple.com>
45
46         Windows build fix
47
48         Turn off the change made in r27984 on Windows for now.
49
50         * xml/XSLTProcessor.cpp:
51         (WebCore::XSLTProcessor::transformToString):
52         * xml/XSLTUnicodeSort.cpp:
53
54 2007-11-24  Timothy Hatcher  <timothy@apple.com>
55
56         Reviewed by Adam Roben.
57
58         Bug 16121: Web Inspector needs helper functions that pass a 'this' object to
59         addEventListener and setTimeout
60         http://bugs.webkit.org/show_bug.cgi?id=16121
61
62         Add Function.prototype.bind. This helper will return a wrapper function
63         that will call the original function with the supplied arguments
64         and using the supplied 'this' object.
65
66         * page/inspector/Database.js: Remove a use of setTimeout by
67           inheriting some common functions from Resource.
68         * page/inspector/DatabasePanel.js: Use the new bind function.
69         * page/inspector/ConsolePanel.js: Ditto.
70         * page/inspector/DocumentPanel.js: Ditto.
71         * page/inspector/NetworkPanel.js: Ditto.
72         * page/inspector/PropertiesSection.js: Ditto.
73         * page/inspector/Resource.js: Ditto.
74         * page/inspector/SidebarPane.js: Ditto.
75         * page/inspector/inspector.html: Moved Database.js after Resource.js,
76           now that Database.js uses it.
77         * page/inspector/inspector.js: Use the new bind function. Also
78           removed a setTimeout used for the localized strings code. There is
79           now a load event listener added to the localized strings script
80           element that will call WebInspector.loaded.
81         * page/inspector/utilities.js: Add Function.prototype.bind.
82
83 2007-11-24  Timothy Hatcher  <timothy@apple.com>
84
85         Reviewed by Adam Roben.
86
87         Bug 16112: Some Web Inspector UI elements use offsetWidth and offsetHeight before the stylesheet loads
88         http://bugs.webkit.org/show_bug.cgi?id=16112
89
90         In the places where we use offsetWidth and offsetHeight before
91         the stylesheet loads there is now a check. If the body's
92         offsetWidth is not greater than zero, then set a timeout
93         to do the updates requiring the stylesheet later.
94
95         The three places this happened:
96         - DOM tree selection highlight would show up at the wrong height
97           when using Inspect Element to open the inspector.
98         - DOM tree breadcrumbs would not collapse when using Inspect Element
99           to open the inspector.
100         - Network Timeline divider lines would not show when opening directly
101           into the timeline.
102
103         * page/inspector/DocumentPanel.js: Check if the stylesheet loaded.
104         * page/inspector/NetworkPanel.js: Ditto.
105         * page/inspector/inspector.html: Include the stylesheet before
106           any scripts, this will help get it loaded sooner.
107
108 2007-11-24  Kevin Ollivier  <kevino@theolliviers.com>
109
110         Add wx implementation for pathGetFilename
111
112         Reviewed by David D. Kilzer.
113
114         * html/HTMLFormElement.cpp:
115         (WebCore::pathGetFilename):
116
117 2007-11-23  Timothy Hatcher  <timothy@apple.com>
118
119         Reviewed by Adam Roben.
120
121         Bug 16110: Clicking inside the resource headers in the network timeline collapses them
122         http://bugs.webkit.org/show_bug.cgi?id=16110
123
124         Toggle the resource headers only if the click happens on the
125         resource row, not within the headers area.
126
127         * WebCore.xcodeproj/project.pbxproj:
128         * page/inspector/NetworkPanel.js:
129
130 2007-11-23  Kevin Ollivier  <kevino@theolliviers.com>
131
132         Win build fixes. CURL needs winsock, so don't disable it, and
133         include pthreads.h to get the threadsafe *_r functions.
134
135         Reviewed by Adam Roben.
136
137         * config.h:
138         * loader/FTPDirectoryDocument.cpp:
139         * loader/FTPDirectoryParser.cpp:
140
141 2007-11-23  Kevin Ollivier  <kevino@theolliviers.com>
142
143         wx build fix. Move wx settings to project build settings,
144         remove some old settings that were masking a build problem,
145         and fix include ordering to ensure proper config.h and
146         unicode/utf8.h headers are used. 
147
148         * webcore-base.bkl:
149         * webcore-wx.bkl:
150
151 2007-11-23  Simon Hausmann  <hausmann@webkit.org>
152
153         Reviewed by George Staikos <staikos@kde.org>.
154
155         Another build fix specific to trunk (instead of the stable branch) to fix make clean (which the buildbots call).
156
157         * WebCore.pro:
158
159 2007-11-23  Alexey Proskuryakov  <ap@webkit.org>
160
161         Not reviewed, trivial leak fix.
162
163         Fix xsltUnicodeSortFunction() memory leaks.
164
165         * xml/XSLTUnicodeSort.cpp:
166         (WebCore::xsltUnicodeSortFunction):
167
168 2007-11-23  Alexey Proskuryakov  <ap@webkit.org>
169
170         Reviewed by Maciej.
171
172         <rdar://problem/5539306> REGRESSION: redirect fails when subframe's document is opened but
173         not closed (affects digg.com)
174
175         Tests: fast/loader/meta-refresh-vs-open.html
176                fast/loader/redirect-with-open-subframe-2.html
177                fast/loader/redirect-with-open-subframe.html
178                http/tests/loading/onload-vs-immediate-refresh.pl
179
180         * loader/FrameLoader.cpp:
181         (WebCore::FrameLoader::scheduleRedirection): Only check whether the load is complete for
182         HTTP redirects - JavaScript-initiated ones are effective immediately.
183
184 2007-11-23  Dan Bernstein  <mitz@apple.com>
185
186         Reviewed by Alexey Proskuryakov.
187
188         - apply matrix transforms on the correct side of the transformation
189           matrix (not on the side where the vector is multiplied).
190
191         Test: fast/transforms/matrix-02.html
192
193         * rendering/RenderStyle.h:
194         (WebCore::MatrixTransformOperation::apply):
195
196 2007-11-23  Alexey Proskuryakov  <ap@webkit.org>
197
198         Reviewed by Maciej.
199
200         http://bugs.webkit.org/show_bug.cgi?id=16077
201         <rdar://problem/5609785> XSLT processor <xsl:sort> algorithm is incompatible with other
202         browser implementations
203
204         Test: fast/xsl/sort-unicode.xml
205
206         * xml/XSLTProcessor.cpp:
207         (WebCore::XSLTProcessor::transformToString): Set a custom sort function.
208
209         * xml/XSLTUnicodeSort.cpp: Added.
210         (init_xsltTransformError):
211         (xsltTransformError):
212         (WebCore::xsltUnicodeSortFunction):
213         * xml/XSLTUnicodeSort.h: Added.
214         ICU-based implementation of xsl:sort, using an example from libxslt distribution.
215         Only minimal coding style fixes to ease synchronization with upstream in the future.
216
217         * icu/unicode/ucol.h: Added.
218         * icu/unicode/uset.h: Added.
219         Taken from ICU 3.2
220
221         * WebCore.pro:
222         * WebCore.vcproj/WebCore.vcproj:
223         * WebCore.xcodeproj/project.pbxproj:
224         * WebCoreSources.bkl:
225         Added XSLTUnicodeSort.cpp.
226
227 2007-11-22  Alexey Proskuryakov  <ap@webkit.org>
228
229         Reviewed by Maciej.
230
231         http://bugs.webkit.org/show_bug.cgi?id=14977
232         Hixie's DOM Core performance test shows insert >10x slower than append
233
234         Each invocation of Element.childNodes[n] was creating and registering a new ChildNodeList,
235         which persisted and listened to notifications until GC.
236
237         A fix is to avoid registering child node lists for notifications - they don't need them, as
238         they share a common cache in Node.
239
240         * dom/Node.cpp:
241         (WebCore::Node::registerNodeList):
242         (WebCore::Node::unregisterNodeList):
243         (WebCore::Node::notifyLocalNodeListsAttributeChanged):
244         (WebCore::Node::notifyLocalNodeListsChildrenChanged):
245         * dom/NodeList.h:
246         (WebCore::NodeList::needsNotifications):
247
248 2007-11-22  Dan Bernstein  <mitz@apple.com>
249
250         Reviewed by Antti Koivisto.
251
252         - fix http://bugs.webkit.org/show_bug.cgi?id=15811
253           WebKit plug-ins can re-enter WebKit under attach()
254           <rdar://problem/5577978>
255
256         Defer plug-in loading until after attach and recalcStyle using the
257         post-attach callback mechanism. Netscape plug-ins are still loaded only
258         after layout.
259
260         * dom/ContainerNode.cpp:
261         Made NodeCallbackQueue elements retain the Node because callbacks might
262         delete nodes that are in the callback queue.
263         (WebCore::ContainerNode::suspendPostAttachCallbacks): Added. Needed to
264         prevent post-attach callbacks from being dispatched under recalcStyle().
265         (WebCore::ContainerNode::resumePostAttachCallbacks): Ditto.
266         (WebCore::ContainerNode::dispatchPostAttachCallbacks): Factored out from
267         attach().
268         (WebCore::ContainerNode::attach):
269         * dom/ContainerNode.h:
270         * dom/Document.cpp:
271         (WebCore::Document::recalcStyle): Added calls to
272         suspendPostAttachCallbacks() and resumePostAttachCallbacks().
273         * html/HTMLEmbedElement.cpp:
274         (WebCore::HTMLEmbedElement::HTMLEmbedElement):
275         (WebCore::HTMLEmbedElement::attach): Changed to queue the widget update
276         for post-attach.
277         (WebCore::HTMLEmbedElement::updateWidget): Added. Called by the
278         post-attach callback.
279         * html/HTMLEmbedElement.h: Added an m_needWidgetUpdate member needed to
280         prevent a double update if another plug-in's post-attach updateWidget()
281         triggers a layout which updates the widget before this plug-in's
282         post-attach callback is invoked.
283         (WebCore::HTMLEmbedElement::setNeedWidgetUpdate): Added a setter for
284         m_needWidgetUpdate.
285         * html/HTMLObjectElement.cpp:
286         (WebCore::HTMLObjectElement::attach): Changed to queue the widget update
287         for post-attach.
288         (WebCore::HTMLObjectElement::updateWidget): Added. Called by the
289         post-attach callback.
290         * html/HTMLObjectElement.h:
291         (WebCore::HTMLObjectElement::setNeedWidgetUpdate): Added a setter for
292         m_needWidgetUpdate.
293         * html/HTMLPlugInElement.cpp:
294         (WebCore::HTMLPlugInElement::updateWidgetCallback): Added.
295         * html/HTMLPlugInElement.h:
296         (WebCore::HTMLPlugInElement::updateWidget):
297         * rendering/RenderPartObject.cpp:
298         (WebCore::RenderPartObject::updateWidget): Added calls to
299         setNeedWidgetUpdate(false) so that if this method is called from
300         FrameView::layout() during post-attach dispatch of another plug-in,
301         it will not be called again when this plug-in's post-attach callback
302         is dispatched.
303         * rendering/RenderPartObject.h:
304         (WebCore::RenderPartObject::updateWidget) Renamed argument to match
305         the method definition.
306
307 2007-11-22  Timothy Hatcher  <timothy@apple.com>
308
309         Reviewed by Dan Bernstein.
310
311         Fix the Element.hasStyleClass and Element.removeStyleClass helpers
312         to not find and replace substrings, but whole class names at the
313         beginning or end of the string or surrounded by whitespace.
314
315         * page/inspector/utilities.js:
316
317 2007-11-22  Timothy Hatcher  <timothy@apple.com>
318
319         Revert part of my r27935 change that made the Tip balloons
320         animate with CSS transitions. The balloon was only opacity 0,
321         so it would cause its row to highlight when hovering over
322         another row.
323
324         * page/inspector/NetworkPanel.js:
325         * page/inspector/inspector.css:
326
327 2007-11-22  Dan Bernstein  <mitz@apple.com>
328
329         Reviewed by Maciej Stachowiak.
330
331         - fix http://bugs.webkit.org/show_bug.cgi?id=15943
332           -webkit-transform matrix does not work
333
334         Test: fast/transforms/matrix-01.html
335
336         Parse all six matrix entries as numbers.
337
338         * css/CSSParser.cpp:
339         (WebCore::TransformOperationInfo::TransformOperationInfo):
340         (WebCore::CSSParser::parseTransform):
341         * css/CSSStyleSelector.cpp:
342         (WebCore::CSSStyleSelector::applyProperty):
343         * rendering/RenderStyle.cpp:
344         (WebCore::MatrixTransformOperation::blend):
345         * rendering/RenderStyle.h:
346         (WebCore::MatrixTransformOperation::MatrixTransformOperation):
347         (WebCore::MatrixTransformOperation::apply):
348
349 2007-11-22  Laszlo Gombos  <laszlo.gombos@gmail.com>
350
351         Reviewed by Alp Toker.
352
353         Fix some compilation warnings.  Do not reference undefined (platform) specific type (WebCore::CachedFont::m_fontData)
354
355         * loader/CachedFont.cpp:
356         (WebCore::CachedFont::~CachedFont):
357         (WebCore::CachedFont::allReferencesRemoved):
358
359 2007-11-22  Alp Toker  <alp@atoker.com>
360
361         Reviewed by Mark Rowe.
362
363         GTK+ drawing fix.
364
365         Add a check to avoid crashing when the GraphicsContext is not
366         associated with a GdkEventExpose. This was noticed when adding
367         printing support but might be triggered in other situations too.
368
369         * platform/gtk/WidgetGtk.cpp:
370         (WebCore::Widget::paint):
371
372 2007-11-22  Julien Chaffraix  <julien.chaffraix@gmail.com>
373
374         Reviewed by Alexey.
375
376         Bug 15530: XMLHttpRequest should not support certain methods
377
378         Test: http/tests/xmlhttprequest/xmlhttprequest-forbidden-methods-exception.html
379
380         * xml/XMLHttpRequest.cpp:
381         (WebCore::XMLHttpRequest::open):
382
383 2007-11-22  Simon Hausmann  <hausmann@kde.org>
384
385         Reviewed by George.
386
387         For the build inside Qt include qbase.pri and don't duplicate what qbase.pri otherwise does (install targets, etc.)
388
389         * WebCore.pro:
390
391 2007-11-22  Simon Hausmann  <hausmann@kde.org>
392
393         Reviewed by George.
394
395         Don't set OBJECTS_DIR when building inside Qt
396
397         * WebCore.pro:
398
399 2007-11-22  Simon Hausmann  <hausmann@kde.org>
400
401         Reviewed by George.
402
403         Use ../generated as path for the generated sources for builds inside Qt
404
405         * WebCore.pro:
406
407 2007-11-22  Simon Hausmann  <hausmann@kde.org>
408
409         Reviewed by George.
410
411         Make the directory of where to put the generated sources configurable through the GENERATED_SOURCE_DIR variable
412
413         * WebCore.pro:
414
415 2007-11-22  Simon Hausmann  <hausmann@kde.org>
416
417         Reviewed by George.
418
419         Centralize the setup for all the extra compilers in a addExtraCompiler function.
420         
421         This allows adding a "generated_files" target that builds all generated files using "make generated_files".
422         For the build inside Qt we do not generate actual rules for the extra compilers but instead
423         do the variable substitution of compiler.output manually and add the generated sources to SOURCES.
424
425         * WebCore.pro:
426
427 2007-11-21  Timothy Hatcher  <timothy@apple.com>
428
429         Reviewed by Eric Seidel.
430
431         Show Fonts as Yellow in the network timeline.
432
433         * page/inspector/NetworkPanel.js:
434         * page/inspector/inspector.css:
435
436 2007-11-21  Dan Bernstein  <mitz@apple.com>
437
438         Reviewed by Eric Seidel.
439
440         - fix <rdar://problem/5607037> REGRESSION (r27351): Departure date does not repaint when changed on Google Maps public transit planner (16034)
441
442         Test: fast/repaint/subtree-root-skipped.html
443
444         * page/FrameView.cpp:
445         (WebCore::FrameViewPrivate::FrameViewPrivate): Initialize the layout
446         root to 0.
447         (WebCore::FrameView::layoutRoot): Changed to return a RenderObject
448         instead of a Node.
449         (WebCore::FrameView::layout): Changed for layout root being a renderer
450         rather than a DOM node. Also replaced clearing the repaint rects
451         set with asserting that it is empty if this is the top-level call to
452         layout(). If it is not, the set may contain rects from enclosing
453         layout() and those should not be removed.
454         (WebCore::FrameView::scheduleRelayout): Changed for layout root being
455         a renderer rather than a DOM node.
456         (WebCore::isObjectAncestorContainerOf): Added this helper function that
457         tests whether one object will be marked by calling
458         markContainingBlocksForLayout() on the other.
459         (WebCore::FrameView::scheduleRelayoutOfSubtree): Changed for layout
460         root being a renderer rather than a DOM node. Changed the check if new
461         and current layout roots are on the same path from the root to use
462         the subgraph of the render tree defined by container()hood instead of
463         the DOM tree and parenthood.
464         * page/FrameView.h:
465         * rendering/RenderBox.cpp: 
466         (WebCore::RenderBox::calcWidth): Changed for layout root being a
467         renderer rather than a DOM node.
468         * rendering/RenderObject.cpp:
469         (WebCore::RenderObject::~RenderObject): Added an assertion that the
470         object being deleted is not currently the layout root.
471         (WebCore::RenderObject::scheduleRelayout): Changed for layout root being
472         a renderer rather than a DOM node.
473
474 2007-11-21  Mark Rowe  <mrowe@apple.com>
475
476         Reviewed by Eric.
477
478         Fix WebCore to build without warnings under GCC 4.2.
479
480         * Configurations/Base.xcconfig:
481         * css/CSSRuleList.cpp:
482         (WebCore::CSSRuleList::deleteRule):
483         * css/CSSStyleSelector.cpp:
484         (WebCore::CSSStyleSelector::locateSharedStyle):
485         * html/HTMLParser.cpp:
486         (WebCore::HTMLParser::allowNestedRedundantTag):
487         * rendering/RenderBlock.cpp:
488         (WebCore::RenderBlock::fillInlineSelectionGaps):
489         (WebCore::RenderBlock::fillBlockSelectionGaps):
490         * rendering/RenderLayer.cpp:
491         (WebCore::RenderLayer::stackingContext):
492         (WebCore::RenderLayer::enclosingPositionedAncestor):
493         (WebCore::RenderLayer::transparentAncestor):
494         * rendering/RenderStyle.cpp:
495         (WebCore::BackgroundLayer::fillUnsetProperties):
496         (WebCore::Transition::fillUnsetProperties):
497         * rendering/RenderText.cpp:
498         (WebCore::RenderText::containsOnlyWhitespace):
499         * rendering/bidi.cpp:
500         (WebCore::RenderBlock::determineStartPosition):
501
502 2007-11-21  Alp Toker  <alp@atoker.com>
503
504         Reviewed by Mark Rowe.
505
506         http://bugs.webkit.org/show_bug.cgi?id=16071
507         Curl backend handles EINTR incorrectly
508
509         Defer timers during select() to avoid interruption by timer signals.
510
511         * platform/network/curl/ResourceHandleManager.cpp:
512         (WebCore::ResourceHandleManager::downloadTimerCallback):
513
514 2007-11-21  Mark Rowe  <mrowe@apple.com>
515
516         Reviewed by Tim Hatcher.
517
518         Changes due to <rdar://problem/5602936> Need to resolve new GCC 4.2 warnings
519
520         Update format strings to use format specifiers that match the argument types.
521
522         * loader/icon/IconDatabase.cpp:
523         (WebCore::IconDatabase::performURLImport):
524         (WebCore::IconDatabase::writeToDatabase):
525         * platform/mac/TextCodecMac.cpp:
526         (WebCore::TextCodecMac::decode):
527         * storage/Database.cpp:
528         (WebCore::Database::deliverAllPendingCallbacks):
529
530 2007-11-21  Xan Lopez  <xan@gnome.org>
531
532         Reviewed by Alp Toker.
533
534         Clarify scroll event processing with a comment.
535
536         * platform/gtk/PlatformScrollBarGtk.cpp:
537         (gtkScrollEventCallback):
538
539 2007-11-21  Timothy Hatcher  <timothy@apple.com>
540
541         Reviewed by Adam Roben.
542
543         Bug 16085: Web Inspector's Network Timeline graph code clean up and misc. fixes
544         http://bugs.webkit.org/show_bug.cgi?id=16085
545         
546         Changes include:
547         - Refactor the drawing code as nested functions instead of global functions.
548         - Compute the segment percentages only once per call to drawSummaryGraph.
549         - Account for percentages that rounded down to total less-than 100%.
550         - Draw the pill shadow better using the canvas shadow drawing properties.
551         - Removes a couple canvas context saves and restores.
552
553         * page/inspector/NetworkPanel.js:
554
555 2007-11-21  Alexey Proskuryakov  <ap@webkit.org>
556
557         Reviewed by Adam Roben.
558
559         http://bugs.webkit.org/show_bug.cgi?id=16056
560         Unicode not being interpreted correctly in Web Inspector source view
561
562         Cannot be tested automatically.
563
564         * loader/CachedCSSStyleSheet.cpp:
565         (WebCore::CachedCSSStyleSheet::encoding):
566         * loader/CachedCSSStyleSheet.h:
567         * loader/CachedResource.h:
568         (WebCore::CachedResource::encoding):
569         * loader/CachedScript.cpp:
570         (WebCore::CachedScript::encoding):
571         * loader/CachedScript.h:
572         * loader/CachedXBLDocument.cpp:
573         (WebCore::CachedXBLDocument::encoding):
574         * loader/CachedXBLDocument.h:
575         * loader/CachedXSLStyleSheet.cpp:
576         (WebCore::CachedXSLStyleSheet::encoding):
577         * loader/CachedXSLStyleSheet.h:
578         Teach textual CachedResources to report their encodings.
579
580         * page/InspectorController.cpp:
581         (WebCore::addSourceToFrame):
582         (WebCore::updateResourceResponse):
583         Use the actual encoding - the network layer has little idea about it.
584
585 2007-11-20  Mark Rowe  <mrowe@apple.com>
586
587         Reviewed by Maciej Stachowiak.
588
589         Fix <rdar://problem/5609579> (DOMParser().parseFromString() freezes Safari when parsing large nodes with XML entities)
590         http://bugs.webkit.org/show_bug.cgi?id=16076
591
592         XMLTokenizer was calling CharacterData::appendData twice per entity in the fragment of XML being
593         parsed (once for text before the entity, once for the entity itself).  This triggered O(n^2) copying
594         of the CharacterData's string due to resizing.  We now prevent this happening by buffering all the
595         content for a given Text node in the XMLTokenizer before sending it out to the node in a single go.
596
597         * dom/XMLTokenizer.cpp:
598         (WebCore::XMLTokenizer::characters): Append the characters to the buffer.
599         (WebCore::XMLTokenizer::endDocument): Ensure the buffer is flushed when the document has ended.
600         (WebCore::endDocumentHandler):
601         (WebCore::XMLTokenizer::enterText):
602         (WebCore::XMLTokenizer::exitText): Append the contents of the buffer to the node.
603         (WebCore::XMLTokenizer::initializeParserContext): Add the endDocument handler.
604         (WebCore::parseXMLDocumentFragment): Force endDocument to be called when parsing a fragment to ensure
605         that the buffer gets flushed to the node.
606         * dom/XMLTokenizer.h:
607
608 2007-11-20  Timothy Hatcher  <timothy@apple.com>
609
610         Reviewed by Mark Rowe.
611
612         Animate the status area and tip balloons in the Web Inspector
613         with CSS animations.
614
615         * page/inspector/NetworkPanel.js:
616         * page/inspector/inspector.css:
617         * page/inspector/inspector.js:
618
619 2007-11-20  Kevin Ollivier  <kevino@theolliviers.com>
620
621         wx build fix for Windows. Don't use WebCore/move-js-headers.sh as
622         it indiscriminately copies any headers inside JavaScriptCore,
623         which includes Tiger ICU headers. 
624
625         * webcore-base.bkl:
626         Remove references to the WebCore/include dir generated by
627         move-js-headers.sh, and also get headers from JavaScriptCore
628         directly rather than from WebCore/ForwardingHeaders. 
629
630 2007-11-20  Alp Toker  <alp@atoker.com>
631
632         Reviewed by Mark Rowe.
633
634         Avoid pointlessly mallocing and freeing this transform matrix.
635
636         * platform/gtk/FontPlatformDataGtk.cpp:
637         (WebCore::FontPlatformData::FontPlatformData):
638
639 2007-11-20  Naiem Shaik  <naiem.shaik@gmail.com>
640
641         Reviewed by Alp Toker.
642
643         http://bugs.webkit.org/show_bug.cgi?id=15763
644         [GTK] Enter key does not take to the link highlighted.
645
646         Add missing keycode cases.
647
648         * platform/gtk/KeyEventGtk.cpp:
649         (WebCore::keyIdentifierForGdkKeyCode):
650         (WebCore::windowsKeyCodeForKeyEvent):
651         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
652
653 2007-11-20  Mark Rowe  <mrowe@apple.com>
654
655         Reviewed by Sam Weinig.
656
657         Fix http://bugs.webkit.org/show_bug.cgi?id=16074
658         Bug 16074: execCommand("InsertHorizontalRule", false, "") results in id="" being inserted
659
660         For consistency with InsertOrderedList and InsertUnorderedList a value parameter of "" should
661         not result in an id being set.
662
663         * editing/JSEditor.cpp: Don't set the id attribute if value is empty.
664
665 2007-11-20  Dan Bernstein  <mitz@apple.com>
666
667         Reviewed by Adam Roben.
668
669         - fix <rdar://problem/5090708> Textareas render broken-looking scrollbars when too short to show full scrollbar
670
671         * platform/win/PlatformScrollBar.h:
672         * platform/win/PlatformScrollBarSafari.cpp:
673         Added the "hit inset" constants (representing how far the track eats
674         into the button).
675         (WebCore::PlatformScrollbar::paint): Changed to paint the buttons and
676         the thumb only if they should be showing.
677         (WebCore::PlatformScrollbar::hasButtons): Added. Returns whether the
678         arrows should be drawn.
679         (WebCore::PlatformScrollbar::hasThumb): Added. Returns whether the thumb
680         should be drawn.
681         (WebCore::PlatformScrollbar::forwardButtonRect):
682         (WebCore::PlatformScrollbar::trackRect): Changed to return the entire
683         bounds of the scrollbar if the scrollbar has no buttons.
684         (WebCore::PlatformScrollbar::paintTrack): Changed to paint a disabled
685         track along the entire scrollbar if it has not buttons.
686         (WebCore::PlatformScrollbar::hitTest): Changed to hit test only the
687         parts that the scrollbar has in its current dimensions.
688
689 2007-11-20  Mark Rowe  <mrowe@apple.com>
690
691         Reviewed by Alp Toker.
692
693         * config.h: Change #if to #ifdef to silence warnings on non-Apple platforms.
694
695 2007-11-20  Simon Hausmann  <hausmann@kde.org>
696
697         Reviewed by Adam Treat <treat@kde.org>.
698
699         Remove static linkage of QtWebKit against the ICO image format plugin.
700         Instead build the support for the ICO image format as a proper standalone qt image format plugin and install it.
701
702         * WebCore.pro:
703         * platform/graphics/qt/ImageDecoderQt.cpp:
704
705 2007-11-20  David D. Kilzer  <ddkilzer@webkit.org>
706
707         no-svg build broken after r27278
708         <http://bugs.webkit.org/show_bug.cgi?id=16061>
709
710         Reviewed by Eric.
711
712         * bindings/scripts/CodeGeneratorObjC.pm: Always generate DOMHTMLEmbedElementPrivate.h
713         and DOMHTMLObjectElementPrivate.h for no-svg build.
714
715 2007-11-20  Adam Treat  <treat@kde.org>
716
717         Reviewed by Simon.
718
719         * Don't use so much heap memory.
720
721         * platform/graphics/qt/ImageDecoderQt.cpp:
722         * platform/graphics/qt/ImageDecoderQt.h:
723         * platform/graphics/qt/ImageSourceQt.cpp:
724         (WebCore::ImageSource::createFrameAtIndex):
725
726 2007-11-20  Lars Knoll  <lars@trolltech.com>
727
728         Reviewed by Simon.
729
730         Fix text break interators.
731         
732         The break iterators where trying to be smart about the input
733         string and caching their results. Unfortunately a pointer/string length
734         comparison is not good enough in all cases (since some input is stack based
735         temp strings). Removed the caching but at the same time started to use a more
736         efficient constructor of QTextBoundaryFinder that doesn't need to malloc for
737         most strings.
738         
739         Fixes two test cases that test "text-transform: capitalize".
740
741         * platform/qt/TextBreakIteratorQt.cpp:
742         (WebCore::wordBreakIterator):
743         (WebCore::characterBreakIterator):
744         (WebCore::lineBreakIterator):
745         (WebCore::sentenceBreakIterator):
746
747 2007-11-20  Adam Treat  <treat@kde.org>
748
749         Reviewed by George.
750
751         * Make gif animations work for instance.
752
753         * platform/graphics/qt/ImageDecoderQt.cpp:
754         (WebCore::ImageDecoderQt::reset):
755         (WebCore::ImageDecoderQt::setData):
756         (WebCore::ImageDecoderQt::frameCount):
757         (WebCore::ImageDecoderQt::repetitionCount):
758         * platform/graphics/qt/ImageDecoderQt.h:
759
760 2007-11-20  Adam Treat  <treat@kde.org>
761
762         * Build in release mode
763
764         * platform/NotImplemented.h:
765
766 2007-11-20  Adam Treat  <treat@kde.org>
767
768         Reviewed by Simon and George.
769
770         * Be quiet and allow suppression of NotImplemented calls at runtime.
771
772         * platform/NotImplemented.h:
773
774 2007-11-19  Doug Turner  <dougt@meer.net>
775
776         Reviewed by Alp Toker.
777
778         http://bugs.webkit.org/show_bug.cgi?id=16054
779         Crash when GlyphPage::fill is called with more than 256 bytes of data
780
781         http://bugs.webkit.org/show_bug.cgi?id=14446
782         [GDK] Crash on http://www.wikipedia.org/
783
784         setGlyphDataForIndex() uses a fixed array of size 256 which we can't
785         exceed. We need to return failure if the buffer has Unicode
786         supplementary characters for now.
787
788         This strategy matches the Win port, which also doesn't support this
789         case yet.
790
791         Add an assertion so nobody makes this mistake again.
792
793         * platform/GlyphPageTreeNode.h:
794         (WebCore::GlyphPage::setGlyphDataForIndex):
795         * platform/gtk/GlyphPageTreeNodeGtk.cpp:
796         (WebCore::GlyphPage::fill):
797
798 2007-11-19  Doug Turner  <dougt@meer.net>
799
800         Reviewed by Timothy Hatcher.
801
802         http://bugs.webkit.org/show_bug.cgi?id=16050
803         sqlite3_prepare16_v2 build bustage.
804
805         Using the correct SQLITE_VERSION_NUMBER around sqlite_prepare16_v2
806         to fix build bustage.
807
808         * platform/sql/SQLiteStatement.cpp:
809         (WebCore::SQLiteStatement::prepare):
810
811 2007-11-19  Mark Rowe  <mrowe@apple.com>
812
813         Build fix.  Don't over-qualify the constructor name.
814
815         * storage/DatabaseDetails.h:
816
817 2007-11-19  Brady Eidson <beidson@apple.com>
818
819         Reviewed by Maciej
820
821         Stub out the WebCore parts of the WebKit API
822
823         * WebCore.base.exp:
824         * WebCore.xcodeproj/project.pbxproj:
825
826         * storage/DatabaseDetails.h: Added.  Simple container for vitals on a specific database
827         (WebCore::DatabaseDetails::DatabaseDetails::DatabaseDetails):
828         (WebCore::DatabaseDetails::DatabaseDetails):
829         (WebCore::DatabaseDetails::isValid):
830         (WebCore::DatabaseDetails::name):
831         (WebCore::DatabaseDetails::version):
832         (WebCore::DatabaseDetails::displayName):
833         (WebCore::DatabaseDetails::expectedUsage):
834         (WebCore::DatabaseDetails::currentUsage):
835
836         * storage/DatabaseTracker.cpp:  Added various methods for API usage
837         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
838         (WebCore::DatabaseTracker::usageForOrigin):
839         (WebCore::DatabaseTracker::quotaForOrigin):
840         (WebCore::DatabaseTracker::setQuota):
841         * storage/DatabaseTracker.h:
842
843 2007-11-19  Kevin Ollivier  <kevino@theolliviers.com>
844
845         wx port build fix.
846
847         * platform/graphics/wx/AffineTransformWx.cpp:
848         (WebCore::AffineTransform::operator== ):
849         m_transform is only available when using wxGraphicsContext.
850
851 2007-11-19  Alp Toker  <alp@atoker.com>
852
853         Reviewed by Mark Rowe.
854
855         GTK+ drawing fixes.
856
857         Add a check to avoid crashing when the GraphicsContext is not
858         associated with a GdkDrawable. This was noticed when adding printing
859         support but might be triggered in other situations too.
860
861         Do not render themes when painting is disabled. This is an
862         optimisation for cases where GraphicsContext is used to calculate page
863         dimensions etc. without actually rendering.
864
865         * platform/graphics/cairo/GraphicsContextCairo.cpp:
866         (WebCore::GraphicsContext::gdkDrawable):
867         * platform/gtk/RenderThemeGtk.cpp:
868         (WebCore::paintMozWidget):
869
870 2007-11-13  Rahul Abrol  <ra5ul@comcast.net>
871
872         Reviewed by Tim Hatcher.
873
874         http://bugs.webkit.org/show_bug.cgi?id=15977
875         Resizing images preference now toggles default image state.
876
877         * loader/ImageDocument.cpp:
878         (WebCore::ImageDocument::ImageDocument):
879         (WebCore::ImageDocument::createDocumentStructure):
880         (WebCore::ImageDocument::imageChanged):
881
882 2007-11-19  Kevin Ollivier  <kevino@theolliviers.com>
883
884         Update wx port build sources with recent changes, update
885         wx FontPlatformData to be a class (MSVC7 gets confused
886         otherwise...) and implement its hash() method.
887
888         Reviewed by Adam.
889
890         * WebCoreSources.bkl:
891         * platform/wx/FontPlatformData.h:
892         (WebCore::FontPlatformData::hash):
893
894 2007-11-19  Julien Chaffraix  <julien.chaffraix@gmail.com>
895
896         Reviewed by Darin.
897
898         http://bugs.webkit.org/show_bug.cgi?id=12194
899         Bug 12194: Trying to access XMLHttpRequest.responseText or responseXML when they 
900         are not available should raise an exception
901
902         Tests: http/tests/xmlhttprequest/xmlhttprequest-responseText-exception.html
903                http/tests/xmlhttprequest/xmlhttprequest-responseXML-exception.html
904
905         * bindings/js/JSXMLHttpRequest.cpp:
906         (KJS::JSXMLHttpRequest::getValueProperty):
907         * xml/XMLHttpRequest.cpp:
908         (WebCore::XMLHttpRequest::getResponseText):
909         (WebCore::XMLHttpRequest::getResponseXML):
910         * xml/XMLHttpRequest.h:
911
912 2007-11-19  Peter Kasting  <zerodpx@gmail.com>
913
914         Reviewed by Darin Adler.
915
916         http://bugs.webkit.org/show_bug.cgi?id=15971
917         The GIF decoder should not fail decoding if the caller asks it to
918         decode again when no new data has arrived since the last call.
919
920         * platform/image-decoders/gif/GIFImageReader.cpp:
921         (GIFImageReader::read):
922
923 2007-11-18  Brady Eidson <beidson@apple.com>
924
925         Reviewed by Eric
926
927         Fix a crash hashing a default SecurityOriginData object 
928
929         * storage/DatabaseTracker.cpp:
930         (WebCore::SecurityOriginDataHash::hash): The default object has some default strings with NULL
931           StringImpls - don't try to hash those!
932
933 2007-11-18  Timothy Hatcher  <timothy@apple.com>
934
935         Reviewed by Sam Weinig.
936
937         Bug 16043: Remove InspectorController.log now that console.log works
938         http://bugs.webkit.org/show_bug.cgi?id=16043
939
940         Remove the last uses of InspectorController.log. Once use was no longer needed,
941         checking an erro case that can't happen anymore. The other case now uses console.error.
942
943         * page/InspectorController.cpp: Remove the log function.
944         (WebCore::InspectorController::windowScriptObjectAvailable): Remove the log function from
945         InspectorController script class.
946         * page/inspector/DocumentPanel.js: Remove a use of InspectorController.log that isn't needed.
947         * page/inspector/Panel.js: Change InspectorController.log to console.log and early return.
948
949 2007-11-18  Timothy Hatcher  <timothy@apple.com>
950
951         Reviewed by Brady.
952
953         Bug 16041: REGRESSION: the Database panel in the Inspector stopped showing errors
954         http://bugs.webkit.org/show_bug.cgi?id=16041
955
956         * page/inspector/DatabasePanel.js: Implement error callbacks to pass to executeSql()
957           and transaction(). Refactored some code for the success and error callbacks to use.
958
959 2007-11-18  Alexey Proskuryakov  <ap@webkit.org>
960
961         Reviewed by Maciej.
962
963         <rdar://problem/5546393> Whitespace handling doesn't match HTML5.
964
965         HTML5 definition is the same as MSIE's, with the exception that the latter strips null
966         characters. Firefox also treats U+0008 as whitespace, but not U+000B or U+000C.
967
968         Test: fast/parser/html-whitespace.html
969
970         * html/HTMLTokenizer.cpp:
971         (WebCore::HTMLTokenizer::parseSpecial):
972         (WebCore::HTMLTokenizer::parseTag):
973         Use isASCIISpace, which matches HTML5 definition of whitespace, and also what we use to
974         check for whitespace almost everywhere.
975
976 2007-11-17  Mark Rowe  <mrowe@apple.com>
977
978         Reviewed by Darin Adler.
979
980         Fix: <rdar://problem/5607032> REGRESSION: testapi exits with assertion failure in debug build
981              <rdar://problem/5440659> JSGlobalContextCreate throws away globalObjectClass's prototype
982              http://bugs.webkit.org/show_bug.cgi?id=16033
983
984         Update for changes in Interpreter method signatures.
985
986         * bindings/js/kjs_binding.cpp:
987         (KJS::ScriptInterpreter::ScriptInterpreter):
988         * bindings/js/kjs_window.cpp:
989         (KJS::Window::clear):
990
991 2007-11-17  Timothy Hatcher  <timothy@apple.com>
992
993         Reviewed by Mark Rowe.
994
995         Bug 13470: i18n: The Web Inspector is not localizable
996         http://bugs.webkit.org/show_bug.cgi?id=13470
997
998         Add support for localization to the Web Inspector. Clients need to
999         implement localizedStringsURL() to return the URL of the
1000         InspectorLocalizedStrings.js that best matches the user's language.
1001
1002         * English.lproj: Added.
1003         * English.lproj/InspectorLocalizedStrings.js: Added.
1004         * WebCore.xcodeproj/project.pbxproj: Add InspectorLocalizedStrings.js.
1005         * page/InspectorClient.h: Add localizedStringsURL.
1006         * page/InspectorController.cpp: Add localizedStringsURL that calls
1007           the client. Also added a version exposed to JavaScript.
1008         * page/InspectorController.h: Add localizedStringsURL.
1009         * page/inspector/ConsolePanel.js: Call WebInspector.UIString
1010           for user visible strings.
1011         * page/inspector/DatabasePanel.js: Ditto.
1012         * page/inspector/DocumentPanel.js: Ditto.
1013         * page/inspector/ImagePanel.js: Ditto.
1014         * page/inspector/MetricsSidebarPane.js: Ditto.
1015         * page/inspector/NetworkPanel.js: Ditto.
1016         * page/inspector/Panel.js: Ditto.
1017         * page/inspector/PropertiesSidebarPane.js: Ditto.
1018         * page/inspector/Resource.js: Ditto.
1019         * page/inspector/ResourceCategory.js: Ditto.
1020         * page/inspector/SourcePanel.js: Ditto.
1021         * page/inspector/StylesSidebarPane.js: Ditto.
1022         * page/inspector/inspector.css: Use pre-wrap so database errors can use \n.
1023         * page/inspector/inspector.html: Remove some user visible strings.
1024         * page/inspector/inspector.js: Added WebInspector.UIString and call
1025           WebInspector.UIString for user visible strings. Some code needed to be 
1026           moved to WebInspector.loaded to use UIString after the localized strings
1027           get loaded.
1028         * platform/graphics/svg/SVGImageEmptyClients.h:
1029         (WebCore::SVGEmptyFrameLoaderClient::redirectDataToPlugin): Remove WebCore:: prefix.
1030         (WebCore::SVGEmptyInspectorClient::createPage): Ditto.
1031         (WebCore::SVGEmptyInspectorClient::localizedStringsURL): Add empty stub.
1032         (WebCore::SVGEmptyInspectorClient::highlight): Remove WebCore:: prefix.
1033         (WebCore::SVGEmptyInspectorClient::inspectedURLChanged): Ditto.
1034
1035 2007-11-17  Timothy Hatcher  <timothy@apple.com>
1036
1037         Reviewed by Adam.
1038
1039         Reworte String.sprintf to fix many bad bugs and to not use RegExp. Also added
1040         String.vsprintf so it can be used later for the localization function.
1041
1042         This version only supports argument reordering, precision for floats, and these
1043         format characters: d, f, s and @. Any unsupported format characters are logged
1044         and substituted like strings.
1045
1046         * page/inspector/utilities.js:
1047
1048 2007-11-17  Alexey Proskuryakov  <ap@webkit.org>
1049
1050         Windows build fix.
1051
1052         * editing/Editor.h: Made canSmartCopyOrDelete public, as Windows WebView still needs it.
1053
1054 2007-11-17  Alexey Proskuryakov  <ap@webkit.org>
1055
1056         Reviewed by Darin.
1057
1058         http://bugs.webkit.org/show_bug.cgi?id=15969
1059         Eliminate Editor::deleteRange()
1060
1061         No change in functionality.
1062
1063         * editing/CompositeEditCommand.h: Removed unimplemented deleteKeyPressed().
1064
1065         * editing/Editor.cpp:
1066         (WebCore::Editor::deleteWithDirection):
1067         (WebCore::Editor::cut):
1068         (WebCore::Editor::performDelete):
1069         * editing/Editor.h:
1070         Moved relevant Editor::deleteRange() functionality to its callers.
1071         Removed deleteSelectionWithSmartDelete(void), which was more confusing than helpful
1072         in my opinion.
1073
1074         * editing/mac/EditorMac.mm:
1075         (WebCore::initializeKillRingIfNeeded):
1076         (WebCore::Editor::addToKillRing):
1077         (WebCore::Editor::yank):
1078         (WebCore::Editor::yankAndSelect):
1079         (WebCore::Editor::setMark):
1080         (WebCore::unionDOMRanges):
1081         (WebCore::Editor::deleteToMark):
1082         (WebCore::Editor::selectToMark):
1083         (WebCore::Editor::swapWithMark):
1084         Pushed kill ring handling down from WebCore.
1085
1086         * page/mac/WebCoreFrameBridge.h:
1087         * page/mac/WebCoreFrameBridge.mm:
1088         Removed setMarkDOMRange (the corresponding getter is still needed).
1089
1090         * WebCore.base.exp: No longer need to export Editor::deleteRange() and Editor::insertTextWithoutSendingTextEvent().
1091         Export the new kill ring functions.
1092
1093 2007-11-16  Ryan Leavengood  <leavengood@gmail.com>
1094
1095         Reviewed by David Kilzer.
1096
1097         Build fix: the needed headers for POSIX file functions were not
1098         included.
1099
1100         * platform/posix/FileSystemPOSIX.cpp:
1101
1102 2007-11-16  Dan Bernstein  <mitz@apple.com>
1103
1104         Reviewed by Darin Adler.
1105
1106         - fix the common case of <http://bugs.webkit.org/show_bug.cgi?id=15994>
1107           REGRESSION: Incomplete repaint of CSS image substitution
1108
1109         Test: fast/repaint/clip-with-layout-delta.html
1110
1111         * rendering/LayoutState.cpp:
1112         (WebCore::LayoutState::LayoutState): Account for layout delta when
1113         pushing additional clip.
1114
1115 2007-11-16  Antti Koivisto  <antti@apple.com>
1116
1117         Reviewed by Adele.
1118         
1119         Seeking related fixes, updates to match the latest specification
1120         - rename loopCount of HTMLMediaElement to playCount
1121         - add explicit seeking attribute to HTMLMediaElement to get semantics right
1122         - implement the specification behavior that currentTime must immediately return seeked position in HTMLMediaElement 
1123           instead of MoviePrivateQTKit 
1124         - fix broken behavior when seeking past end of the media, add tests
1125         - replace Movie didEnd callback with broader timeChanged callback (which gets called in didEnd case too)
1126         - use setDelayCallbacks: in various MoviePrivateQTKit methods to avoid bug prone synchronous callbacks from QT, make
1127           HTMLMediaElement not depend on synchronous callbacks
1128         - do some cleanups and simplifications in MoviePrivateQTKit, get rid of m_rateBeforeSeek and m_blockStateUpdate variables
1129
1130         Tests: http/tests/media/video-seekable-stall.html
1131                media/video-seeking.html
1132                media/video-seek-past-end-paused.html
1133                media/video-seek-past-end-playing.html
1134
1135         * html/HTMLAttributeNames.in: 
1136         * html/HTMLMediaElement.cpp:
1137         (WebCore::HTMLMediaElement::HTMLMediaElement):
1138         (WebCore::HTMLMediaElement::load):
1139         (WebCore::HTMLMediaElement::movieNetworkStateChanged):
1140         (WebCore::HTMLMediaElement::setReadyState):
1141         (WebCore::HTMLMediaElement::seek):
1142         (WebCore::HTMLMediaElement::seeking):
1143         (WebCore::HTMLMediaElement::currentTime):
1144         (WebCore::HTMLMediaElement::ended):
1145         (WebCore::HTMLMediaElement::play):
1146         (WebCore::HTMLMediaElement::pause):
1147         (WebCore::HTMLMediaElement::playCount):
1148         (WebCore::HTMLMediaElement::setPlayCount):
1149         (WebCore::HTMLMediaElement::checkIfSeekNeeded):
1150         (WebCore::HTMLMediaElement::movieTimeChanged):
1151         (WebCore::HTMLMediaElement::endedPlayback):
1152         (WebCore::HTMLMediaElement::updateMovie):
1153         * html/HTMLMediaElement.h:
1154         * html/HTMLMediaElement.idl:
1155         * platform/graphics/Movie.cpp:
1156         (WebCore::Movie::timeChanged):
1157         * platform/graphics/Movie.h:
1158         (WebCore::MovieClient::movieTimeChanged):
1159         * platform/graphics/mac/MoviePrivateQTKit.h:
1160         * platform/graphics/mac/MoviePrivateQTKit.mm:
1161         (WebCore::MoviePrivate::MoviePrivate):
1162         (WebCore::MoviePrivate::load):
1163         (WebCore::MoviePrivate::play):
1164         (WebCore::MoviePrivate::pause):
1165         (WebCore::MoviePrivate::currentTime):
1166         (WebCore::MoviePrivate::seek):
1167         (WebCore::MoviePrivate::doSeek):
1168         (WebCore::MoviePrivate::cancelSeek):
1169         (WebCore::MoviePrivate::seekTimerFired):
1170         (WebCore::MoviePrivate::startCuePointTimerIfNeeded):
1171         (WebCore::MoviePrivate::paused):
1172         (WebCore::MoviePrivate::updateStates):
1173         (WebCore::MoviePrivate::timeChanged):
1174         (WebCore::MoviePrivate::didEnd):
1175
1176 2007-11-16  Anders Carlsson  <andersca@apple.com>
1177
1178         Reviewed by Adam.
1179
1180         <rdar://problem/5603832>
1181         XMLHttpRequest readyState 3 & responseText buffer issues.
1182
1183         * platform/network/cf/ResourceHandleCFNet.cpp:
1184         (WebCore::makeFinalRequest):
1185         Add new parameter which controls whether content sniffing should be turned off.
1186         
1187         (WebCore::ResourceHandle::loadResourceSynchronously):
1188         Always content sniff sync loads.
1189         
1190         * platform/network/cf/ResourceRequestCFNet.cpp:
1191         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1192         If the ResourceRequest already has a backing CFURLRequest, make a copy of it. This preserves
1193         any properties set on the CFURLRequest.
1194
1195 2007-11-16  Jon Honeycutt  <jhoneycutt@apple.com>
1196
1197         Reviewed by Ollie.
1198
1199         <rdar://problem/5605175> Crash closing or leaving window with ViewPoint 
1200         Media player plugin
1201
1202         ViewPoint plugin requires that we pass a valid NPSavedData* to
1203         NPP_Destroy.
1204
1205         * plugins/win/PluginViewWin.cpp: Pass a valid NPSavedData* to
1206         NPP_Destroy. If the plugin allocates data, discard it
1207
1208 2007-11-16  Mark Rowe  <mrowe@apple.com>
1209
1210         Reviewed by Tim Hatcher.
1211
1212         Build WebCore as a sub-framework of WebKit in all configurations.
1213
1214         * Configurations/WebCore.xcconfig:
1215         * WebCore.xcodeproj/project.pbxproj:
1216
1217 2007-11-16  Doug Turner  <dougt@meer.net>
1218
1219         Reviewed by Alp.
1220
1221         http://bugs.webkit.org/show_bug.cgi?id=16018
1222         build bustage when building on debian 4.0
1223
1224         Fix build bustage on GTK+ with older versions of Pango.
1225
1226         Don't cache the return value since the docs say it can change.
1227
1228         * platform/gtk/Language.cpp:
1229         (WebCore::defaultLanguage):
1230
1231 2007-11-16  Brady Eidson  <beidson@apple.com>
1232
1233         Build fix
1234
1235         * platform/SecurityOriginData.h:
1236         (WebCore::operator!=): Whoops!
1237
1238 2007-11-16  Brady Eidson  <beidson@apple.com>
1239
1240         Reviewed by Sam
1241
1242         Further purify DatabaseTracker to use SecurityOriginData instead of "a String"
1243
1244         * WebCore.base.exp:
1245         * WebCore.xcodeproj/project.pbxproj:
1246         * WebCore.vcproj/WebCore.vcproj
1247         * WebCore.pro
1248
1249         * platform/SecurityOriginData.cpp: Added.
1250         (WebCore::SecurityOriginData::SecurityOriginData): Add a constructor that takes a "stringIdentifier"-style string,
1251           since that form is what will be stored in the Databases.db on disk
1252         (WebCore::SecurityOriginData::stringIdentifier):
1253         * platform/SecurityOriginData.h:
1254         (WebCore::SecurityOriginData::protocol):
1255         (WebCore::SecurityOriginData::host):
1256         (WebCore::SecurityOriginData::port):
1257
1258         * storage/DatabaseTracker.cpp:
1259         (WebCore::SecurityOriginDataHash::hash): Follow the pattern Darin set in FontCache.cpp to make a decent hash for 
1260           a SecurityOriginData object
1261         (WebCore::SecurityOriginDataHash::equal):
1262         (WebCore::SecurityOriginDataTraits::deletedValue): "file::1" will never exist in normal operation
1263         (WebCore::SecurityOriginDataTraits::emptyValue): "file::2" will never exist in normal operation
1264         (WebCore::DatabaseTracker::fullPathForDatabase):
1265         (WebCore::DatabaseTracker::populateOrigins):
1266         (WebCore::DatabaseTracker::origins):
1267         (WebCore::DatabaseTracker::addDatabase):
1268         * storage/DatabaseTracker.h:
1269
1270 2007-11-16  Alexey Proskuryakov  <ap@webkit.org>
1271
1272         Windows build fix.
1273
1274         * WebCore.vcproj/WebCore.vcproj: Removed VoidCallback.cpp, added JSCustomVoidCallback.{h,cpp}.
1275
1276 2007-11-16  Nikolas Zimmermann  <zimmermann@kde.org>
1277
1278         Reviewed by Eric.
1279
1280         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12290
1281
1282         Implement all SVGTextContentElement DOM methods.
1283         This is the last missing SVG text feature. SVG fonts is next.
1284
1285         Added testcase: svg/custom/text-dom-01-f.svg (tests all new methods)
1286
1287         * ksvg2/svg/SVGTextContentElement.cpp:
1288         (WebCore::cummulatedCharacterRangeLength):
1289         (WebCore::SVGInlineTextBoxQueryWalker::):
1290         (WebCore::SVGInlineTextBoxQueryWalker::SVGInlineTextBoxQueryWalker):
1291         (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback):
1292         (WebCore::SVGInlineTextBoxQueryWalker::setQueryInputParameters):
1293         (WebCore::SVGInlineTextBoxQueryWalker::longResult):
1294         (WebCore::SVGInlineTextBoxQueryWalker::floatResult):
1295         (WebCore::SVGInlineTextBoxQueryWalker::pointResult):
1296         (WebCore::SVGInlineTextBoxQueryWalker::rectResult):
1297         (WebCore::SVGInlineTextBoxQueryWalker::stopProcessing):
1298         (WebCore::findInlineTextBoxInTextChunks):
1299         (WebCore::rootInlineBoxForTextContentElement):
1300         (WebCore::executeTextQuery):
1301         (WebCore::SVGTextContentElement::getNumberOfChars):
1302         (WebCore::SVGTextContentElement::getComputedTextLength):
1303         (WebCore::SVGTextContentElement::getSubStringLength):
1304         (WebCore::SVGTextContentElement::getStartPositionOfChar):
1305         (WebCore::SVGTextContentElement::getEndPositionOfChar):
1306         (WebCore::SVGTextContentElement::getExtentOfChar):
1307         (WebCore::SVGTextContentElement::getRotationOfChar):
1308         (WebCore::SVGTextContentElement::getCharNumAtPosition):
1309         (WebCore::SVGTextContentElement::selectSubString):
1310         * ksvg2/svg/SVGTextContentElement.h:
1311         * rendering/SVGInlineTextBox.h:
1312
1313 2007-11-15  Adele Peterson  <adele@apple.com>
1314
1315         Reviewed by Oliver.
1316
1317         Fix for <rdar://problem/5566652> CrashTracer: [USER] 3 crashes in Safari at HTMLSelectElement::menuListDefaultEventHandler (reproducible on mactc30.com)
1318
1319         Test: fast/forms/menulist-no-renderer-onmousedown.html
1320
1321         * html/HTMLSelectElement.cpp:
1322         (WebCore::HTMLSelectElement::defaultEventHandler): Nil check the renderer here.  None of the default behavior makes sense if there's no renderer.
1323         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Moved the nil check to the main defaultEventHandler.
1324
1325 2007-11-15  Antti Koivisto  <antti@apple.com>
1326
1327         Reviewed by Adele.
1328
1329         Fix <rdar://problem/5601598>
1330         The movie tag should do initialization on need and not during startup.
1331         
1332         Initialize Movie MIME type hash on demand
1333
1334         * platform/MIMETypeRegistry.cpp:
1335         (WebCore::initialiseSupportedMovieMIMETypes):
1336         (WebCore::initialiseMIMETypeRegistry):
1337         (WebCore::MIMETypeRegistry::isSupportedMovieMIMEType):
1338         (WebCore::MIMETypeRegistry::getSupportedMovieMIMETypes):
1339
1340 2007-11-15  Mark Rowe  <mrowe@apple.com>
1341
1342         Build fix for Qt on Windows.
1343
1344         * xml/XPathStep.cpp:
1345         (WebCore::XPath::Step::nodesInAxis):
1346
1347 2007-11-15  Timothy Hatcher  <timothy@apple.com>
1348
1349         Reviewed by Mark Rowe.
1350
1351         Bug 14761: Web Inspector leaks JS objects and DOM nodes
1352         http://bugs.webkit.org/show_bug.cgi?id=14761
1353
1354         * page/InspectorController.cpp:
1355         (WebCore::InspectorController::~InspectorController):
1356         Change the tear down order so that inspectorDestroyed() is called before
1357         InspectorController private data is set to Zero. The inspectorDestroyed()
1358         call ends up closing the WebView and triggering InspectorController::close()
1359         which unprotects m_scriptObject. This didn't happen when the private data
1360         was cleared before calling inspectorDestroyed().
1361
1362 2007-11-15  Mark Rowe  <mrowe@apple.com>
1363
1364         Gtk build fix.
1365
1366         * WebCore.pro:
1367
1368 2007-11-15  Alexey Proskuryakov  <ap@webkit.org>
1369
1370         Reviewed by Darin.
1371
1372         http://bugs.webkit.org/show_bug.cgi?id=15989
1373         XPath queries with predicates incorrectly retains the current node across unions
1374
1375         Test: fast/xpath/union-context-node.xhtml
1376
1377         * xml/XPathPath.cpp:
1378         (WebCore::XPath::LocationPath::evaluate): Restore context after evaluation.
1379         * xml/XPathStep.cpp:
1380         (WebCore::XPath::Step::evaluate): Do not backup context, as we can easily re-create it.
1381
1382 2007-11-15  Alexey Proskuryakov  <ap@webkit.org>
1383
1384         Reviewed by Darin.
1385
1386         http://bugs.webkit.org/show_bug.cgi?id=15988
1387         REGRESSION: XPath preceding-axis query misses nested elements
1388
1389         Test: fast/xpath/preceding-axis.xhtml
1390
1391         * xml/XPathStep.cpp:
1392         (WebCore::XPath::Step::nodesInAxis): Hopefully correct this time.
1393
1394 2007-11-15  Timothy Hatcher  <timothy@apple.com>
1395
1396         Reviewed by Mark Rowe and Sam.
1397
1398         This corrects a couple of issues in the Web Inspector where selected search results
1399         would not have the right text color when the window is inactive or the results are focused.
1400
1401         * page/inspector/inspector.css:
1402
1403 2007-11-15  Timothy Hatcher  <timothy@apple.com>
1404
1405         Reviewed by Sam.
1406
1407         Bug 16007: REGRESSION: Disclosure triangle click zone for resource categories is off by 10 pixels
1408         http://bugs.webkit.org/show_bug.cgi?id=16007
1409
1410         Makes the click width an option on TreeElement and make ResourceCategoryTreeElement
1411         a true subclass of TreeElement. The click width for ResourceCategoryTreeElement is 
1412         20 pixels, and the default is 10 pixels.
1413
1414         * page/inspector/ResourceCategory.js:
1415         * page/inspector/treeoutline.js:
1416
1417 2007-11-15  Anders Carlsson  <andersca@apple.com>
1418
1419         Reviewed by Brady.
1420
1421         Pass a VoidCallback to Database::transaction and Database::changeVersion.
1422         This is not yet hooked up to the database machinery.
1423         
1424         * WebCore.vcproj/WebCore.vcproj:
1425         * bindings/js/JSDatabaseCustom.cpp:
1426         (WebCore::JSDatabase::changeVersion):
1427         (WebCore::JSDatabase::transaction):
1428         * storage/Database.cpp:
1429         (WebCore::Database::changeVersion):
1430         (WebCore::Database::transaction):
1431         * storage/Database.h:
1432
1433 2007-11-15  Timothy Hatcher  <timothy@apple.com>
1434
1435         Reviewed by Adam.
1436
1437         Bug 16005: Hovering in the breadcrumbs causes jumpy behavior
1438         http://bugs.webkit.org/show_bug.cgi?id=16005
1439
1440         Hovering over cumbs no longer exposes new crumbs. Clicking on a collapsed
1441         crumb will expose as many hidden crumbs as possible to the user. Also crumbs
1442         that have ID attributes will compact to the ID over the tag name.
1443
1444         * page/inspector/DocumentPanel.js:
1445
1446 2007-11-15  Anders Carlsson  <andersca@apple.com>
1447
1448         Reviewed by Sam.
1449
1450         Make the VoidCallback DOM interface behave more like our other DOM interfaces.
1451         
1452         * bindings/js/JSCustomVoidCallback.h: Added.
1453         * bindings/js/JSCustomVoidCallback.cpp: Added.
1454         (WebCore::JSCustomVoidCallback::JSCustomVoidCallback):
1455         (WebCore::JSCustomVoidCallback::handleEvent):
1456         VoidCallback implementation that wraps a JS object.
1457         
1458         (WebCore::toVoidCallback):
1459         New method that creates a VoidCallback implementation given a JS object.
1460         
1461         * bindings/scripts/CodeGeneratorJS.pm:
1462         Specify that VoidCallback can fail conversion and add a custom conversion function.
1463         
1464         * html/HTMLMediaElement.cpp:
1465         (WebCore::HTMLMediaElement::movieCuePointReached):
1466         Call handleEvent on the callback.
1467         
1468         (WebCore::HTMLMediaElement::removeCuePoint):
1469         Comment out parts of this method, it has already been removed in the HTML5 spec and it relies
1470         on overriding VoidCallback equality.
1471         
1472         * html/VoidCallback.cpp: Removed.
1473         
1474         * html/VoidCallback.h:
1475         (WebCore::VoidCallback::VoidCallback):
1476         (WebCore::VoidCallback::~VoidCallback):
1477         Make this an abstract class with a pure virtual handleEvent method.
1478         
1479 2007-11-15  Adam Roben  <aroben@apple.com>
1480
1481         Fix <rdar://5485108> Type-select while a <select> menu is open doesn't work
1482
1483         There were two things broken here:
1484            - WebView now requires a WM_CHAR message to be sent before it will
1485              create a keyboard event with a charCode, but we were only sending
1486              a WM_KEYDOWN event.
1487            - The popup menu was not updating its focused index when the
1488              <select> element's selectedIndex changed.
1489
1490         Reviewed by Adele.
1491
1492         * platform/win/PopupMenuWin.cpp:
1493         (WebCore::PopupMenu::updateFromElement): Update the focused index from
1494         the client's selected index.
1495         (WebCore::PopupWndProc): When we receive a WM_CHAR message for a
1496         printable character, manufacture a WM_KEYDOWN message for it and post
1497         both that and the current WM_CHAR message to the WebView.
1498
1499 2007-11-15  Brady Eidson  <beidson@apple.com>
1500
1501         Build fix
1502
1503         * storage/DatabaseTracker.cpp:
1504         (WebCore::DatabaseTracker::fullPathForDatabase):
1505         (WebCore::DatabaseTracker::databaseNamesForOrigin):
1506
1507 2007-11-15  Brady Eidson  <beidson@apple.com>
1508
1509         Reviewed by John and Sam
1510
1511         Stubbing out everything required for a WebKit API for databases
1512
1513         Biggest change in WebCore is that we passed around SecurityOriginData as the representation
1514         of a SecurityOrigin, instead of a String or a SecurityOrigin itself (which is an opaque object
1515         that has a different purpose besides just hanging on to the data)
1516
1517         * WebCore.base.exp:
1518         * WebCore.xcodeproj/project.pbxproj:
1519
1520         * platform/SecurityOrigin.cpp:
1521         * platform/SecurityOrigin.h:
1522         * platform/SecurityOriginData.h: Added.  Simple object to encapsulate the 3
1523           pieces of data in the SecurityOrigin tuple
1524         (WebCore::SecurityOriginData::SecurityOriginData):
1525         (WebCore::SecurityOriginData::protocol):
1526         (WebCore::SecurityOriginData::host):
1527         (WebCore::SecurityOriginData::port):
1528         (WebCore::SecurityOriginData::toString): Simple concatenation of the 3 components,
1529           colon separated
1530
1531         * storage/Database.cpp:
1532         (WebCore::Database::Database): Use SecurityOriginData instead
1533
1534         * storage/DatabaseTracker.cpp:
1535         (WebCore::DatabaseTracker::fullPathForDatabase):
1536         (WebCore::DatabaseTracker::databaseNamesForOrigin):
1537         (WebCore::DatabaseTracker::deleteDatabasesWithOrigin):
1538         (WebCore::DatabaseTracker::deleteDatabase):
1539         * storage/DatabaseTracker.h:
1540
1541         * storage/DatabaseTrackerClient.h: Added.  For dispatching notifications up to WebKit
1542         (WebCore::DatabaseTrackerClient::~DatabaseTrackerClient):2007-11-15  Jon Honeycutt  <jhoneycutt@apple.com>
1543
1544 2007-11-15  Jon Honeycutt  <jhoneycutt@apple.com>
1545
1546         Reviewed by Anders.
1547
1548         NP_ASFILEONLY streams should not buffer data in m_deliveryData.
1549
1550         * plugins/win/PluginStreamWin.cpp:
1551         (WebCore::PluginStreamWin::didReceiveData):
1552
1553 2007-11-15  Justin Garcia  <justin.garcia@apple.com>
1554
1555         Reviewed by Adele Peterson.
1556
1557         <rdar://problem/5497643> Crash at Node::isDescendantOf when switching out of Edit HTML Source mode
1558         
1559         A textarea that contained the selection was removed but the selection wasn't cleared,
1560         and we'd crash in code that assumed a valid, in-document selection.
1561
1562         * editing/SelectionController.cpp:
1563         (WebCore::removingNodeRemovesPosition): Clear the selection if the node being removed is the
1564         shadowAncestorNode of the node that contains the position, not just if the node being removed
1565         contains that shadowAncestorNode.
1566
1567 2007-11-15  Nikolas Zimmermann  <zimmermann@kde.org>
1568
1569         Reviewed by Maciej.
1570
1571         Fix logic error: calculateGlyphBoundaries takes RTL text into account itself, no need to adjust offsets before.
1572
1573         * rendering/SVGInlineTextBox.cpp:
1574         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::chunkPortionCallback):
1575         (WebCore::SVGInlineTextBoxSelectionRectWalker::chunkPortionCallback):
1576
1577 2007-11-15  Anders Carlsson  <andersca@apple.com>
1578
1579         Reviewed by Brady.
1580
1581         <rdar://problem/5562470>
1582         openDatabase does not work when the version string is empty
1583
1584         If the string is empty, pass a real empty string to sqlite3_bind_text16.
1585         
1586         * platform/sql/SQLiteStatement.cpp:
1587         (WebCore::SQLiteStatement::bindText):
1588
1589 2007-11-15  Anders Carlsson  <andersca@apple.com>
1590
1591         Reviewed by Brady.
1592
1593         Get rid of SQLiteStatement::bindText and rename bindText16 to bindText.
1594         Remove the copy parameter from bindText and bindBlob and always copy passed in data instead.
1595
1596         * loader/icon/IconDatabase.cpp:
1597         (WebCore::IconDatabase::setIconIDForPageURLInSQLDatabase):
1598         (WebCore::IconDatabase::removePageURLFromSQLDatabase):
1599         (WebCore::IconDatabase::getIconIDForIconURLFromSQLDatabase):
1600         (WebCore::IconDatabase::addIconURLToSQLDatabase):
1601         (WebCore::IconDatabase::getImageDataForIconURLFromSQLDatabase):
1602         (WebCore::IconDatabase::writeIconSnapshotToSQLDatabase):
1603         * platform/sql/SQLiteStatement.cpp:
1604         (WebCore::SQLiteStatement::prepare):
1605         * platform/sql/SQLiteStatement.h:
1606         * storage/Database.cpp:
1607         (WebCore::setTextValueInDatabase):
1608         * storage/DatabaseTracker.cpp:
1609         (WebCore::DatabaseTracker::fullPathForDatabase):
1610         (WebCore::DatabaseTracker::databaseNamesForOrigin):
1611         (WebCore::DatabaseTracker::addDatabase):
1612
1613 2007-11-14  Brady Eidson <beidson@apple.com>
1614
1615         Rubberstamped by Sam
1616
1617         * platform/SecurityOrigin.h: Lets make this an unsigned short and *not* rule out half the possible ports?
1618
1619 2007-11-14  Alexey Proskuryakov  <ap@webkit.org>
1620
1621         Reviewed by Justin Garcia.
1622
1623         http://bugs.webkit.org/show_bug.cgi?id=15781
1624         REGRESSION: Ligatures fail to form when typing in Devanagari (because WebKit can't handle
1625         a marked range that covers half of a composed character sequence)
1626
1627         Test: platform/mac/editing/input/devanagari-ligature.html
1628
1629         This fix is somewhat of a hack, as it asks editing commands to work with invalid selections.
1630         However, this is not entirely new for them, as Roman accents are typed in a similar manner.
1631
1632         In the future, we probably want to make commands work with ranges (or Positions explicitly).
1633
1634         * editing/Editor.cpp:
1635         (WebCore::Editor::selectComposition): Force selection to composition range.
1636         * editing/InsertTextCommand.cpp:
1637         (WebCore::InsertTextCommand::input): Force ending selection to inserted text range.
1638
1639 2007-11-14  Beth Dakin  <bdakin@apple.com>
1640
1641         Reviewed by Hyatt.
1642
1643         Fix for <rdar://problem/5540855> REGRESSION: Combination of client-
1644         side image map and <a> tag is not working properly (15522)
1645
1646         * html/HTMLMapElement.cpp:
1647         (WebCore::HTMLMapElement::checkDTD): Allow <map> to have both block 
1648         and inline children rather than just block children. This matches 
1649         Firefox. 
1650
1651 2007-11-14  Justin Garcia  <justin.garcia@apple.com>
1652
1653         Reviewed by Alexey Proskuryakov.
1654
1655         <rdar://problem/5546763> CrashTracer: [USER] 362 crashes at WebCore::DeleteSelectionCommand::mergeParagraphs
1656
1657         * editing/DeleteSelectionCommand.cpp:
1658         (WebCore::DeleteSelectionCommand::handleGeneralDelete): 
1659         Removed an irrelevant FIXME.
1660         (WebCore::DeleteSelectionCommand::mergeParagraphs): If the block that contained the end of the selection
1661         hasn't been removed but has been emptied by deletion, we would to try and fail to create a VisiblePosition
1662         inside that block, which could lead to a crash.  If that happens, there's no content in the block to move,
1663         so just remove the block and return.
1664         Preserve m_needPlaceholder during the call to moveParagraphs, since it may change it and since it does
1665         its own placeholder insertion when necessary.
1666         (WebCore::DeleteSelectionCommand::doApply): No need to check m_needPlaceholder before calling mergeParagraphs,
1667         because it handles preserving m_needPlaceholder when it calls moveParagraphs.
1668         
1669 2007-11-14  Timothy Hatcher  <timothy@apple.com>
1670
1671         Reviewed by Adam.
1672
1673         Bug 14380: Long DOM ancestry breadcrumb lists get cut off
1674         http://bugs.webkit.org/show_bug.cgi?id=14380
1675
1676         The breadcumbs will now be compacted and collapsed if there isn't enough room
1677         to show everything. The collapsing algorithm always affects the crumbs that
1678         are farthest away from the selected or hovered crumb first.
1679
1680         * page/inspector/DocumentPanel.js:
1681         * page/inspector/inspector.css:
1682
1683 2007-11-14  Anders Carlsson  <andersca@apple.com>
1684
1685         Use the correct include path.
1686         
1687         * platform/Cursor.h:
1688         * plugins/win/PluginPackageWin.h:
1689         * plugins/win/PluginStreamWin.h:
1690
1691 2007-11-13  Brady Eidson  <beidson@apple.com>
1692
1693         Reviewed by Adam
1694
1695         http://bugs.webkit.org/show_bug.cgi?id=15976 - ASSERT/crash when SQLTransactionCallback throws an exception
1696
1697         * storage/SQLTransaction.cpp:
1698         (WebCore::SQLTransaction::deliverTransactionCallback): Make a transaction error for the case where the 
1699           SQLTransactionCallback fails
1700         (WebCore::SQLTransaction::deliverTransactionErrorCallback): Don't assert on the error callback, but null check it
1701           and make the commit/rollback decision accordingly
1702
1703 2007-11-13  Oliver Hunt  <oliver@apple.com>
1704
1705         Reviewed by Anders.
1706
1707         <rdar://problem/5365030> calling dataWithPDFInsideRect on an SVG with a gradient crashes (14780)
1708
1709         When drawing directly to PDF CG may delay the use of the gradient function until outside our
1710         standard drawing path, which in turn could let us invalidate the caches before they were used.
1711
1712         To work around this we now store the cached stops in a RefCounted object, so that we can ensure
1713         that cache exists as long as required.
1714         
1715         * platform/graphics/svg/SVGPaintServerGradient.cpp:
1716         (WebCore::SVGPaintServerGradient::SVGPaintServerGradient):
1717         * platform/graphics/svg/SVGPaintServerGradient.h:
1718         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
1719         (WebCore::cgGradientCallback):
1720         (WebCore::CGShadingRefForLinearGradient):
1721         (WebCore::CGShadingRefForRadialGradient):
1722         (WebCore::SVGPaintServerGradient::updateQuartzGradientStopsCache):
1723
1724 2007-11-13  Anders Carlsson  <andersca@apple.com>
1725
1726         Fix Windows build.
1727         
1728         * platform/Cursor.h:
1729         * plugins/win/PluginPackageWin.h:
1730         * plugins/win/PluginStreamWin.h:
1731
1732 2007-11-13  Geoffrey Garen  <ggaren@apple.com>
1733
1734         Reviewed by Anders Carlsson.
1735
1736         Renamed Shared to RefCounted.
1737
1738         * ForwardingHeaders/wtf/RefCounted.h: Copied from WebCore/ForwardingHeaders/wtf/Shared.h.
1739         * ForwardingHeaders/wtf/Shared.h: Removed.
1740         * bindings/js/JSSVGPODTypeWrapper.h:
1741         * css/CSSFontFace.h:
1742         * css/CSSRuleList.h:
1743         * css/Counter.h:
1744         * css/Pair.h:
1745         * css/Rect.h:
1746         * css/StyleBase.h:
1747         * css/StyleSheetList.h:
1748         * dom/Attribute.h:
1749         * dom/Clipboard.h:
1750         * dom/DOMImplementation.h:
1751         * dom/Event.h:
1752         * dom/EventListener.h:
1753         * dom/NamedNodeMap.h:
1754         * dom/NodeFilter.h:
1755         * dom/NodeFilterCondition.h:
1756         * dom/NodeList.h:
1757         * dom/QualifiedName.h:
1758         * dom/Range.h:
1759         * dom/RangeException.h:
1760         * dom/RegisteredEventListener.h:
1761         * dom/Traversal.h:
1762         * editing/EditCommand.h:
1763         * history/BackForwardList.h:
1764         * history/CachedPage.h:
1765         * history/HistoryItem.cpp:
1766         (WebCore::HistoryItem::HistoryItem):
1767         * history/HistoryItem.h:
1768         * html/CanvasGradient.h:
1769         * html/CanvasPattern.h:
1770         * html/CanvasRenderingContext2D.h:
1771         * html/CanvasStyle.h:
1772         * html/HTMLCollection.h:
1773         * html/MediaError.h:
1774         * html/TimeRanges.h:
1775         * html/VoidCallback.h:
1776         * ksvg2/css/SVGRenderStyle.cpp:
1777         (WebCore::SVGRenderStyle::SVGRenderStyle):
1778         * ksvg2/css/SVGRenderStyle.h:
1779         * ksvg2/css/SVGRenderStyleDefs.cpp:
1780         (StyleFillData::StyleFillData):
1781         (StyleStrokeData::StyleStrokeData):
1782         (StyleStopData::StyleStopData):
1783         (StyleTextData::StyleTextData):
1784         (StyleClipData::StyleClipData):
1785         (StyleMaskData::StyleMaskData):
1786         (StyleMarkerData::StyleMarkerData):
1787         (StyleMiscData::StyleMiscData):
1788         * ksvg2/css/SVGRenderStyleDefs.h:
1789         * ksvg2/svg/SVGAngle.cpp:
1790         (WebCore::SVGAngle::SVGAngle):
1791         * ksvg2/svg/SVGAngle.h:
1792         * ksvg2/svg/SVGAnimatedTemplate.h:
1793         * ksvg2/svg/SVGElementInstanceList.h:
1794         * ksvg2/svg/SVGException.h:
1795         * ksvg2/svg/SVGList.h:
1796         * ksvg2/svg/SVGPathSeg.h:
1797         * ksvg2/svg/SVGPreserveAspectRatio.cpp:
1798         (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
1799         * ksvg2/svg/SVGPreserveAspectRatio.h:
1800         * ksvg2/svg/SVGRenderingIntent.h:
1801         * ksvg2/svg/SVGTransform.h:
1802         * ksvg2/svg/SVGUnitTypes.h:
1803         * loader/DocumentLoader.h:
1804         * loader/FormState.h:
1805         * loader/ResourceLoader.h:
1806         * loader/TextResourceDecoder.h:
1807         * loader/icon/IconRecord.h:
1808         * page/BarInfo.h:
1809         * page/Console.h:
1810         * page/DOMSelection.h:
1811         * page/DOMWindow.h:
1812         * page/Frame.h:
1813         * page/History.h:
1814         * page/InspectorController.cpp:
1815         * page/Plugin.h:
1816         * page/Screen.h:
1817         * platform/ArrayImpl.h:
1818         * platform/CString.h:
1819         * platform/Cursor.h:
1820         * platform/DeprecatedValueListImpl.cpp:
1821         (WebCore::DeprecatedValueListImpl::Private::Private):
1822         * platform/FileChooser.h:
1823         * platform/FontFallbackList.h:
1824         * platform/FontFamily.cpp:
1825         (WebCore::FontFamily::FontFamily):
1826         * platform/FontFamily.h:
1827         * platform/FontSelector.h:
1828         * platform/GlyphPageTreeNode.h:
1829         * platform/PopupMenu.h:
1830         * platform/RegularExpression.cpp:
1831         * platform/ScrollBar.h:
1832         * platform/SharedBuffer.h:
1833         * platform/StringImpl.h:
1834         * platform/graphics/Icon.h:
1835         * platform/graphics/svg/SVGResource.h:
1836         * platform/network/FormData.cpp:
1837         (WebCore::FormData::FormData):
1838         * platform/network/FormData.h:
1839         * platform/network/ResourceHandle.h:
1840         * platform/network/ResourceHandleClient.h:
1841         * rendering/RenderStyle.cpp:
1842         (WebCore::StyleSurroundData::StyleSurroundData):
1843         (WebCore::StyleBoxData::StyleBoxData):
1844         (WebCore::StyleVisualData::StyleVisualData):
1845         (WebCore::StyleBackgroundData::StyleBackgroundData):
1846         (WebCore::StyleMarqueeData::StyleMarqueeData):
1847         (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
1848         (WebCore::StyleMultiColData::StyleMultiColData):
1849         (WebCore::StyleTransformData::StyleTransformData):
1850         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1851         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1852         (WebCore::StyleInheritedData::StyleInheritedData):
1853         * rendering/RenderStyle.h:
1854         * rendering/SVGCharacterLayoutInfo.h:
1855         (WebCore::SVGCharOnPath::SVGCharOnPath):
1856         * storage/SQLResultSetRowList.h:
1857         * xml/DOMParser.h:
1858         * xml/XMLHttpRequest.h:
1859         * xml/XMLSerializer.h:
1860         * xml/XPathEvaluator.h:
1861         * xml/XPathExpression.h:
1862         * xml/XPathNSResolver.h:
1863         * xml/XPathResult.h:
1864         * xml/XPathValue.h:
1865         * xml/XSLTProcessor.h:
1866
1867 2007-11-13  Brady Eidson  <beidson@apple.com>
1868
1869         Reviewed by Mark Rowe
1870
1871         Remove errantly added files, and fix the idl (for reference's sake)
1872
1873         * storage/JSCustomSQLStatementCallback.h: Removed.
1874         * storage/JSCustomSQLStatementErrorCallback.h: Removed.
1875         * storage/JSCustomSQLTransactionCallback.h: Removed.
1876         * storage/JSCustomSQLTransactionErrorCallback.h: Removed.
1877         * storage/SQLStatementCallback.idl:
1878
1879 2007-11-13  Adam Roben  <aroben@apple.com>
1880
1881         Fix a bug and improve upon Brady's fix
1882
1883         Reviewed by Anders.
1884
1885         * bindings/js/JSSQLTransactionCustom.cpp:
1886         (WebCore::JSSQLTransaction::executeSql): Made the code a little
1887         clearer and more correct.
1888         * loader/icon/IconDatabase.cpp: Put parentheses around the expansion
1889         of IS_ICON_SYNC_THREAD() so that ASSERT_NOT_SYNC_THREAD() does the
1890         comparison it meant to.
1891
1892 2007-11-13  Sam Weinig  <sam@webkit.org>
1893
1894         Fix Qt and Gtk builds.
1895
1896         * WebCore.pro: Remove non-generated idl files.
1897
1898 2007-11-13  Mark Rowe  <mrowe@apple.com>
1899
1900         Remove removed file from the project.
1901
1902         * WebCore.pro:
1903
1904 2007-11-13  Brady Eidson  <beidson@apple.com>
1905
1906         Release build fix
1907
1908         * bindings/js/JSSQLTransactionCustom.cpp:
1909         (WebCore::JSSQLTransaction::executeSql):
1910
1911 2007-11-13  Adam Roben  <aroben@apple.com>
1912
1913         Add WindowMessageBroadcaster
1914
1915         This class is used to listen in on messages sent to HWNDs. Multiple
1916         WindowMessageListeners can be notified about messages sent to a single
1917         HWND, and one WindowMessageListener can listen to messages from
1918         multiple HWNDs.
1919
1920         Reviewed by Ada.
1921
1922         * WebCore.vcproj/WebCore.vcproj: Added new files to project.
1923         * platform/win/WindowMessageBroadcaster.cpp: Added.
1924         (WebCore::instancesMap): Static helper.
1925         (WebCore::WindowMessageBroadcaster::addListener): Registers a listener
1926         for a particular HWND.
1927         (WebCore::WindowMessageBroadcaster::removeListener): Removes a
1928         listener for a particular HWND.
1929         (WebCore::WindowMessageBroadcaster::WindowMessageBroadcaster):
1930         (WebCore::WindowMessageBroadcaster::~WindowMessageBroadcaster):
1931         (WebCore::WindowMessageBroadcaster::destroy): Removes this broadcaster
1932         from the instancesMap, removes all of its listeners, unsubclasses the
1933         window, and deletes the broadcaster.
1934         (WebCore::WindowMessageBroadcaster::unsubclassWindow): Unsubclasses
1935         the window (which means that SubclassedWndProc won't be called again
1936         for this window).
1937         (WebCore::WindowMessageBroadcaster::SubclassedWndProc): Notifies all
1938         the listeners about every message sent to the HWND
1939         * platform/win/WindowMessageBroadcaster.h: Added.
1940         (WebCore::WindowMessageBroadcaster::listeners):
1941         (WebCore::WindowMessageBroadcaster::originalWndProc):
1942         * platform/win/WindowMessageListener.h: Added.
1943
1944 2007-11-13  Geoffrey Garen  <ggaren@apple.com>
1945
1946         Reviewed by Sam Weinig.
1947
1948         Moved Shared.h into wtf so it could be used in more places. Retained 
1949         TreeShared, but moved it to its own file, TreeShared.h.
1950
1951         * ForwardingHeaders/wtf/Shared.h: Added.
1952         * WebCore.xcodeproj/project.pbxproj:
1953         * bindings/js/JSSVGPODTypeWrapper.h:
1954         * css/CSSFontFace.h:
1955         * css/CSSRuleList.h:
1956         * css/Counter.h:
1957         * css/Pair.h:
1958         * css/Rect.h:
1959         * css/StyleBase.h:
1960         * css/StyleSheetList.h:
1961         * dom/Clipboard.h:
1962         * dom/DOMImplementation.h:
1963         * dom/Event.h:
1964         * dom/EventListener.h:
1965         * dom/NamedNodeMap.h:
1966         * dom/NodeFilterCondition.h:
1967         * dom/NodeList.h:
1968         * dom/Range.h:
1969         * dom/RangeException.h:
1970         * dom/RegisteredEventListener.h:
1971         * dom/Traversal.h:
1972         * history/BackForwardList.h:
1973         * history/CachedPage.h:
1974         * history/HistoryItem.h:
1975         * html/CanvasGradient.h:
1976         * html/CanvasPattern.h:
1977         * html/HTMLCollection.h:
1978         * html/MediaError.h:
1979         * html/TimeRanges.h:
1980         * html/VoidCallback.h:
1981         * ksvg2/css/SVGRenderStyleDefs.h:
1982         * ksvg2/svg/SVGAnimatedTemplate.h:
1983         * ksvg2/svg/SVGElementInstanceList.h:
1984         * ksvg2/svg/SVGList.h:
1985         * ksvg2/svg/SVGPathSeg.h:
1986         * ksvg2/svg/SVGPreserveAspectRatio.h:
1987         * ksvg2/svg/SVGRenderingIntent.h:
1988         * ksvg2/svg/SVGTransform.h:
1989         * ksvg2/svg/SVGUnitTypes.h:
1990         * loader/DocumentLoader.h:
1991         * loader/FormState.h:
1992         * loader/ResourceLoader.h:
1993         * loader/TextResourceDecoder.h:
1994         * loader/icon/IconRecord.h:
1995         * page/BarInfo.h:
1996         * page/Console.h:
1997         * page/DOMSelection.h:
1998         * page/DOMWindow.h:
1999         * page/History.h:
2000         * page/InspectorController.cpp:
2001         * page/Plugin.h:
2002         * page/Screen.h:
2003         * platform/ArrayImpl.h:
2004         * platform/CString.h:
2005         * platform/DeprecatedValueListImpl.cpp:
2006         * platform/FontFallbackList.h:
2007         * platform/FontFamily.h:
2008         * platform/FontSelector.h:
2009         * platform/GlyphPageTreeNode.h:
2010         * platform/PopupMenu.h:
2011         * platform/RegularExpression.cpp:
2012         * platform/ScrollBar.h:
2013         * platform/Shared.h: Removed.
2014         * platform/SharedBuffer.h:
2015         * platform/StringImpl.h:
2016         * platform/graphics/Icon.h:
2017         * platform/graphics/svg/SVGResource.h:
2018         * platform/network/FormData.h:
2019         * platform/network/ResourceHandleClient.h:
2020         * rendering/RenderStyle.h:
2021         * rendering/SVGCharacterLayoutInfo.h:
2022         * storage/SQLResultSetRowList.h:
2023         * xml/DOMParser.h:
2024         * xml/XMLSerializer.h:
2025         * xml/XPathEvaluator.h:
2026         * xml/XPathExpression.h:
2027         * xml/XPathNSResolver.h:
2028         * xml/XPathResult.h:
2029
2030 2007-11-13  Brady Eidson  <beidson@apple.com>
2031
2032         JS bindings by Anders, reviewed by Brady
2033         WebCore changes by Brady, reviewed by Anders and Tim
2034
2035         Adapt to the new iteration of the HTML5 client-side storage spec.
2036
2037         Based largely on implementation feedback we generated in landing our first version of this API and also
2038         on the input of others in the community, the database spec went through a large overhaul that addresses
2039         many concerns.  Amongst other changes/improvements:
2040         - SQLTransaction object is added and all transactions are explicit.  In addition, since the API manages
2041           transactions explicitly, transaction-related language in SQL statements is disallowed
2042         - executeSql() is now on a transaction object instead of the database object.
2043         - Database.changeVersion() now takes place within the context of a transaction.  Therefore the version 
2044           change can be atomic along with the statements that modify the DB schema
2045
2046         Most of the logic now takes place during the "transaction steps," which the specification clearly lays out
2047         as a chain of events on the SQLTransaction object where processing is handed off between being processed 
2048         asynchronously and calling back up to javascript.  To accomplish this voodoo, SQLTransaction has a series of 
2049         methods that roughly match up with the "transaction steps" and it keeps a pointer to the next step.
2050
2051         * DerivedSources.make:
2052         * WebCore.xcodeproj/project.pbxproj:
2053
2054         * bindings/js/JSDatabaseCustom.cpp:
2055         (WebCore::JSDatabase::changeVersion): Adapt to the new API
2056         (WebCore::JSDatabase::transaction): Added
2057
2058         * bindings/js/JSSQLTransactionCustom.cpp: Added.
2059         (WebCore::JSSQLTransaction::executeSql): Added
2060
2061         * page/DOMWindow.cpp:
2062         (WebCore::DOMWindow::openDatabase): Add the new arguments
2063         * page/DOMWindow.h:
2064         * page/DOMWindow.idl:
2065
2066         * page/inspector/DatabasePanel.js: Use the new API
2067
2068         * storage/ChangeVersionWrapper.cpp: Added.  Implementation of "SQLTransactionWrapper" that enforces
2069           changing the version of the database
2070         (WebCore::ChangeVersionWrapper::ChangeVersionWrapper):
2071         (WebCore::ChangeVersionWrapper::performPreflight):
2072         (WebCore::ChangeVersionWrapper::performPostflight):
2073         * storage/ChangeVersionWrapper.h: Added.
2074         (WebCore::ChangeVersionWrapper::sqlError):
2075
2076         * storage/Database.cpp: Removed the "main thread" and "background thread" sqlite handles as all sqlite operations can now
2077           happen solely on the background thread - most of these changes result from that change
2078         (WebCore::Database::Database): Removed an obsolete FIXME
2079         (WebCore::Database::openAndVerifyVersion): 
2080         (WebCore::Database::getVersionFromDatabase):
2081         (WebCore::Database::setVersionInDatabase):
2082         (WebCore::Database::versionMatchesExpected): Atomically guarantee that the current version and expected version are the same
2083         (WebCore::Database::performOpenAndVerify):
2084         (WebCore::Database::performTransactionStep): Added, as a hook for the DatabaseTransactionTask on the DatabaseThread
2085         (WebCore::Database::changeVersion): Changed for the new API from JS
2086         (WebCore::Database::transaction): Added, for the new API from JS
2087         (WebCore::Database::scheduleTransaction): Add a transaction to this Database's transaction queue
2088         (WebCore::Database::scheduleTransactionStep): Schedule the current transaction to be called on the background thread
2089         (WebCore::Database::scheduleTransactionCallback): Schedule the current transaction to perform a callback on the main thread
2090         (WebCore::Database::performGetTableNames):
2091         (WebCore::Database::deliverAllPendingCallbacks):
2092         (WebCore::Database::deliverPendingCallback):
2093         (WebCore::Database::setExpectedVersion):
2094         * storage/Database.h: 
2095         * storage/Database.idl:
2096
2097         * storage/DatabaseTask.cpp:  Changed DatabaseTask to create a mutex on demand, and use the existence of that mutex
2098           to replace the m_synchronous flag
2099         (WebCore::DatabaseTask::performTask):
2100         (WebCore::DatabaseTask::lockForSynchronousScheduling):
2101         (WebCore::DatabaseTask::waitForSynchronousCompletion):
2102         (WebCore::DatabaseTransactionTask::DatabaseTransactionTask):
2103         * storage/DatabaseTask.h:
2104
2105         * storage/SQLError.h: New API object
2106
2107         * storage/SQLResultSet.cpp:
2108         (WebCore::SQLResultSet::SQLResultSet): Small changes to the API object
2109         * storage/SQLResultSet.h:
2110         * storage/SQLResultSet.idl:
2111
2112         * storage/SQLStatement.cpp: Added.
2113         (WebCore::SQLStatement::SQLStatement):
2114         (WebCore::SQLStatement::execute): Actually execute the sql statement on the SQLiteDatabase if it's still valid
2115         (WebCore::SQLStatement::setVersionMismatchedError): Flag this statement as bad before it even starts in case
2116           of an actual version vs. expected version mismatch
2117         (WebCore::SQLStatement::performCallback): Call the right callback (SQLStatement or SQLStatementError) for this statement
2118         * storage/SQLStatement.h: Added.
2119         (WebCore::SQLStatement::hasStatementCallback):
2120         (WebCore::SQLStatement::hasStatementErrorCallback):
2121         (WebCore::SQLStatement::sqlError): Get the error for this statement, if any
2122
2123         * storage/SQLTransaction.cpp: Added.
2124         (WebCore::SQLTransaction::SQLTransaction):
2125         (WebCore::SQLTransaction::executeSQL): Entry point for the API from JS
2126         (WebCore::SQLTransaction::enqueueStatement): Add a new statement onto the queue
2127         (WebCore::SQLTransaction::performNextStep): Call the method for the next step
2128         (WebCore::SQLTransaction::performPendingCallback): Call the method for the pending callback
2129         (WebCore::SQLTransaction::openTransactionAndPreflight): Open a transaction to the database and preflight 
2130           using the SQLTransactionWrapper, if any
2131         (WebCore::SQLTransaction::deliverTransactionCallback): Deliver the transaction callback to the javascript thread
2132         (WebCore::SQLTransaction::scheduleToRunStatements): Convinience to schedule this transaction on the database thread 
2133           and make runStatements() the next step
2134         (WebCore::SQLTransaction::runStatements): Start running the sql statements queued up for this transaction 
2135         (WebCore::SQLTransaction::getNextStatement): Bring the next statement off the queue
2136         (WebCore::SQLTransaction::runCurrentStatement): Execute the current statement
2137         (WebCore::SQLTransaction::deliverStatementCallback): Deliver the SQLStatementCallback for this statement
2138         (WebCore::SQLTransaction::postflightAndCommit): Postflight the transaction using SQLTransactionWrapper and commit it
2139         (WebCore::SQLTransaction::handleTransactionError): Make the right call for any error that occurred on the Transaction
2140         (WebCore::SQLTransaction::deliverTransactionErrorCallback): Deliver the SQLTransactionErrorCallback
2141         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback): Either do a final commit or rollback to cleanup the
2142           transaction after it error'ed out
2143         * storage/SQLTransaction.h:
2144         (WebCore::SQLTransactionWrapper::~SQLTransactionWrapper): 
2145         (WebCore::SQLTransaction::database):
2146         * storage/SQLTransaction.idl:
2147
2148         The following were made obsolete by the new version of the API:
2149         * bindings/js/JSCustomSQLCallback.cpp: Removed.
2150         * bindings/js/JSCustomSQLCallback.h: Removed.
2151         * bindings/js/JSCustomVersionChangeCallback.cpp: Removed.
2152         * bindings/js/JSCustomVersionChangeCallback.h: Removed.
2153         * storage/DatabaseCallback.cpp: Removed.
2154         * storage/DatabaseCallback.h: Removed.
2155         * storage/SQLCallback.h: Removed.
2156         * storage/SQLCallback.idl: Removed.
2157         * storage/VersionChangeCallback.h: Removed.
2158         * storage/VersionChangeCallback.idl: Removed.
2159
2160 2007-11-13  Dan Bernstein  <mitz@apple.com>
2161
2162         Reviewed by Beth Dakin.
2163
2164         - fix <rdar://problem/5551163> REGRESSION: Cursor does not change to arrow on "X" button in google maps, making it hard to click
2165
2166         * css/html4.css: Added a 'cursor: auto' rule for links.
2167         * manual-tests/link-cursor-auto.html: Added.
2168
2169 2007-11-13  Dan Bernstein  <mitz@apple.com>
2170
2171         Reviewed by Beth Dakin.
2172
2173         - fix <rdar://problem/5516272> Reproducible crash in RenderObject::setStyle involving going Back from a non-HTML document (Bookmarks view, PDF view)
2174
2175         The root cause for the crash is that when a non-HTML view enters the
2176         frame, the frame's document pointer keeps pointing at the last HTML-type
2177         document it contained. This patch does not address the root cause, but
2178         makes changes to account for that condition.
2179
2180         * loader/FrameLoader.cpp:
2181         (WebCore::FrameLoader::receivedMainResourceError): Do not change the
2182         frame's current document's page cache state here.
2183         (WebCore::FrameLoader::invalidateCurrentItemCachedPage): If the frame's
2184         current document is in fact the history item being invalidated, then
2185         set its page cache state here.
2186
2187 2007-11-12  Antti Koivisto  <antti@apple.com>
2188
2189         Reviewed by Adele.
2190
2191         Fix that 'timeupdate' and 'waiting' events were never dispatched.
2192         
2193         Add explicit m_paused attribute instead of trying to derive paused state from
2194         underlying media. Call updatePlayState() to start/stop media playback
2195         when any attribute that affects active playback state changes. This matches 
2196         specification text.
2197         
2198         Test: http/tests/media/video-play-stall.html
2199
2200         * html/HTMLMediaElement.cpp:
2201         (WebCore::HTMLMediaElement::HTMLMediaElement):
2202         (WebCore::HTMLMediaElement::setReadyState):
2203         (WebCore::HTMLMediaElement::paused):
2204         (WebCore::HTMLMediaElement::play):
2205         (WebCore::HTMLMediaElement::pause):
2206         (WebCore::HTMLMediaElement::checkIfSeekNeeded):
2207         (WebCore::HTMLMediaElement::movieDidEnd):
2208         (WebCore::HTMLMediaElement::updatePlayState):
2209         * html/HTMLMediaElement.h:
2210
2211 2007-11-13  John Sullivan  <sullivan@apple.com>
2212
2213         Reviewed by Darin.
2214
2215         removed recently-added PreferredType concept; we found a better way to do what
2216         ths was accomplishing
2217
2218         * bridge/WindowFeatures.h:
2219         (WebCore::WindowFeatures::WindowFeatures):
2220         removed definition of PreferredType
2221                         
2222         * page/ContextMenuController.cpp:
2223         (WebCore::openNewWindow):
2224         removed use of PreferredType
2225
2226 2007-11-12  Alexey Proskuryakov  <ap@webkit.org>
2227
2228         Reviewed by Darin.
2229
2230         http://bugs.webkit.org/show_bug.cgi?id=15954
2231         Move DOM Selection operations out of SelectionController
2232
2233         No change in functionality.
2234
2235         * editing/SelectionController.cpp:
2236         (WebCore::SelectionController::setSelectedRange):
2237         * editing/SelectionController.h:
2238         * page/DOMSelection.cpp:
2239         (WebCore::DOMSelection::anchorNode):
2240         (WebCore::DOMSelection::baseNode):
2241         (WebCore::DOMSelection::anchorOffset):
2242         (WebCore::DOMSelection::baseOffset):
2243         (WebCore::DOMSelection::focusNode):
2244         (WebCore::DOMSelection::extentNode):
2245         (WebCore::DOMSelection::focusOffset):
2246         (WebCore::DOMSelection::extentOffset):
2247         (WebCore::DOMSelection::isCollapsed):
2248         (WebCore::DOMSelection::type):
2249         (WebCore::DOMSelection::rangeCount):
2250         (WebCore::DOMSelection::collapse):
2251         (WebCore::DOMSelection::collapseToEnd):
2252         (WebCore::DOMSelection::collapseToStart):
2253         (WebCore::DOMSelection::empty):
2254         (WebCore::DOMSelection::setBaseAndExtent):
2255         (WebCore::DOMSelection::setPosition):
2256         (WebCore::DOMSelection::modify):
2257         (WebCore::DOMSelection::extend):
2258         (WebCore::DOMSelection::getRangeAt):
2259         (WebCore::DOMSelection::removeAllRanges):
2260         (WebCore::DOMSelection::addRange):
2261         (WebCore::DOMSelection::deleteFromDocument):
2262         (WebCore::DOMSelection::containsNode):
2263         (WebCore::DOMSelection::selectAllChildren):
2264         (WebCore::DOMSelection::toString):
2265         * page/DOMSelection.h:
2266         Moved all DOM API methods to DOMSelection; changed SelectionController::setSelectedRange()
2267         to return its result directly instead of via an ExceptionCode that no caller wanted.
2268
2269         * editing/Editor.cpp:
2270         (WebCore::Editor::deleteRange):
2271         (WebCore::Editor::removeFormattingAndStyle):
2272         (WebCore::Editor::selectComposition):
2273         (WebCore::Editor::setComposition):
2274         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
2275         Adapted for SelectionController::setSelectedRange() now returning a bool.
2276         SelectionController::toString() is no longer avasilable, use plainText() explicitly.
2277
2278         * WebCore.base.exp: Changed SelectionController::setSelectedRange() signature.
2279
2280 2007-11-12  Dan Bernstein  <mitz@apple.com>
2281
2282         Reviewed by Darin Adler.
2283
2284         - <http://bugs.webkit.org/show_bug.cgi?id=15890>
2285           Most of www.aol.com still redraws unnecessarily when headline/photo section changes
2286
2287         Test: fast/repaint/invisible-objects.html
2288
2289         Avoid repainting invisible blocks if they are enclosed in a layer that
2290         contains no visible objects.
2291
2292         * rendering/RenderBlock.cpp:
2293         (WebCore::RenderBlock::layoutBlock):
2294         * rendering/RenderBox.cpp:
2295         (WebCore::RenderBox::absoluteClippedOverflowRect):
2296
2297 2007-11-12  Timothy Hatcher  <timothy@apple.com>
2298
2299         Reviewed by Mark Rowe.
2300
2301         Prevent selecting a word in the breadcrumb or the styles section when double
2302         clicking on a DOM node in the outline tree.
2303
2304         * page/inspector/DocumentPanel.js: Call preventDefault() when a mousedown event
2305           with a detail of 2 or higher comes in. This prevents the selection.
2306         * page/inspector/inspector.css: Mark the breadcrumb as user-select: none.
2307
2308 2007-11-12  Oliver Hunt  <oliver@apple.com>
2309
2310         Reviewed by John S.
2311
2312         <rdar://problem/5537289> REGRESSION: Dragging a link or an image from an IFrame causes the page to not respond to clicks afterwards (15460)
2313         
2314         EventHandler needs to reset these fields when a drag terminates, otherwise
2315         EventHandler is left in an inconsistent state when a drag is initiated on a
2316         page with multiple frames.
2317
2318         * page/EventHandler.cpp:
2319         (WebCore::EventHandler::cancelDragAndDrop):
2320         (WebCore::EventHandler::performDragAndDrop):
2321         (WebCore::EventHandler::clearDragState):
2322         * page/EventHandler.h:
2323
2324 2007-11-12  Oliver Hunt  <oliver@apple.com>
2325
2326         Reviewed by Darin and Antti.
2327
2328         Return behaviour for 0 sized pattern back to what it was prior to r27704
2329
2330         This change in behaviour broke two layout tests in DRT, so correcting it
2331         corrects existing tests.
2332
2333         * platform/graphics/cg/ImageBufferCG.cpp:
2334
2335 2007-11-12  Timothy Hatcher  <timothy@apple.com>
2336
2337         Reviewed by John.
2338
2339         <rdar://problem/5268311> REGRESSION (Safari 2-3): Exception thrown when calling -[WebDataSource subresources]
2340
2341         * page/mac/WebCoreFrameBridge.mm:
2342         (-[WebCoreFrameBridge getAllResourceDatas:andResponses:]):
2343         If the SharedBuffer is null insert an empty NSData instead of nil.
2344
2345 2007-11-12  Darin Adler  <darin@apple.com>
2346
2347         Reviewed by Tim.
2348
2349         - http://bugs.webkit.org/show_bug.cgi?id=15947
2350           speed up page loading a bit by inlining
2351
2352         * loader/FrameLoader.cpp: (WebCore::FrameLoader::isLocationChange):
2353         Factored out the slow case of isScheduledLocationChangePending into this.
2354
2355         * loader/FrameLoader.h:
2356         (WebCore::FrameLoader::isScheduledLocationChangePending): Added an
2357         inline check of the far and away most common case, where m_scheduledRedirection
2358         is 0; the rest is in the isLocationChange function.
2359
2360 2007-11-12  George Staikos  <staikos@kde.org>
2361
2362         Reviewed by Tim.
2363
2364         Extract the text match marker highlight color into RenderTheme instead
2365         of the hardcoded yellow.
2366
2367         * rendering/InlineTextBox.cpp:
2368         (WebCore::InlineTextBox::paintTextMatchMarker):
2369         * rendering/RenderTheme.cpp:
2370         (WebCore::RenderTheme::platformTextSearchHighlightColor):
2371         * rendering/RenderTheme.h:
2372
2373 2007-11-12  Mark Rowe  <mrowe@apple.com>
2374
2375         Fix deadlock on launch on the Mac.
2376
2377         * loader/icon/IconDatabase.cpp:
2378         (WebCore::IconDatabase::open): Restore unlock that was mistakenly removed in r27717.
2379
2380 2007-11-12  Justin Haygood  <jhaygood@reaktix.com>
2381
2382         Reviewed by Brady.
2383
2384         http://bugs.webkit.org/show_bug.cgi?id=15955
2385         Reimplement threading functions in IconDatabase and SQLiteDatabase in terms of the threading abstractions
2386
2387         * loader/icon/IconDatabase.cpp:
2388         (WebCore::IconDatabase::open):
2389         (WebCore::IconDatabase::close):
2390         * loader/icon/IconDatabase.h:
2391         * platform/sql/SQLiteDatabase.cpp:
2392         (WebCore::SQLiteDatabase::SQLiteDatabase):
2393         (WebCore::SQLiteDatabase::open):
2394         (WebCore::SQLiteDatabase::close):
2395         * platform/sql/SQLiteDatabase.h:
2396
2397 2007-11-12  Adam Roben  <aroben@apple.com>
2398
2399         Windows build fix
2400
2401         * config.h: Touch because VS apparently can't figure out which files
2402         depend on ResourceResponse.h.
2403         * WebCore.vcproj/WebCore.vcproj: Add ResourceResponseBase files to
2404         project and remove old ResourceResponse files.
2405
2406 2007-11-12  Julien Chaffraix  <julien.chaffraix@gmail.com>
2407
2408         Reviewed by Darin.
2409
2410         http://bugs.webkit.org/show_bug.cgi?id=15334
2411         Split ResourceResponse into platform specific files
2412
2413         * WebCore.base.exp:
2414         * WebCore.pro:
2415         * WebCore.vcproj/WebCore.vcproj:
2416         * WebCore.xcodeproj/project.pbxproj:
2417         * platform/network/ResourceResponse.cpp: Removed.
2418         * platform/network/ResourceResponse.h: Removed.
2419         * platform/network/ResourceResponseBase.cpp: Copied from platform/network/ResourceResponse.cpp.
2420         (WebCore::ResourceResponseBase::asResourceResponse):
2421         (WebCore::ResourceResponseBase::isHTTP):
2422         (WebCore::ResourceResponseBase::url):
2423         (WebCore::ResourceResponseBase::setUrl):
2424         (WebCore::ResourceResponseBase::mimeType):
2425         (WebCore::ResourceResponseBase::setMimeType):
2426         (WebCore::ResourceResponseBase::expectedContentLength):
2427         (WebCore::ResourceResponseBase::setExpectedContentLength):
2428         (WebCore::ResourceResponseBase::textEncodingName):
2429         (WebCore::ResourceResponseBase::setTextEncodingName):
2430         (WebCore::ResourceResponseBase::suggestedFilename):
2431         (WebCore::ResourceResponseBase::setSuggestedFilename):
2432         (WebCore::ResourceResponseBase::httpStatusCode):
2433         (WebCore::ResourceResponseBase::setHTTPStatusCode):
2434         (WebCore::ResourceResponseBase::httpStatusText):
2435         (WebCore::ResourceResponseBase::setHTTPStatusText):
2436         (WebCore::ResourceResponseBase::httpHeaderField):
2437         (WebCore::ResourceResponseBase::setHTTPHeaderField):
2438         (WebCore::ResourceResponseBase::httpHeaderFields):
2439         (WebCore::ResourceResponseBase::isAttachment):
2440         (WebCore::ResourceResponseBase::setExpirationDate):
2441         (WebCore::ResourceResponseBase::expirationDate):
2442         (WebCore::ResourceResponseBase::setLastModifiedDate):
2443         (WebCore::ResourceResponseBase::lastModifiedDate):
2444         (WebCore::ResourceResponseBase::updateResourceResponse):
2445         * platform/network/ResourceResponseBase.h: Copied from platform/network/ResourceResponse.h.
2446         (WebCore::ResourceResponseBase::ResourceResponseBase):
2447         * platform/network/cf/ResourceResponse.h: Added.
2448         (WebCore::ResourceResponse::ResourceResponse):
2449         * platform/network/curl/ResourceResponse.h: Added.
2450         (WebCore::ResourceResponse::ResourceResponse):
2451         (WebCore::ResourceResponse::doUpdateResourceResponse):
2452         * platform/network/mac/ResourceResponse.h: Added.
2453         (WebCore::ResourceResponse::ResourceResponse):
2454         * platform/network/qt/ResourceResponse.h: Added.
2455         (WebCore::ResourceResponse::ResourceResponse):
2456         (WebCore::ResourceResponse::doUpdateResourceResponse):
2457
2458 2007-11-11  Justin Haygood  <jhaygood@reaktix.com>
2459
2460         Reviewed by Adam Roben.
2461
2462         http://bugs.webkit.org/show_bug.cgi?id=15939
2463         Adds a currentThread API for use by SQLiteDatabase, etc.
2464
2465         * platform/Threading.h:
2466         * platform/ThreadingNone.cpp:
2467         (WebCore::currentThread):
2468         * platform/gtk/ThreadingGtk.cpp:
2469         (WebCore::identifierByGthreadHandle):
2470         (WebCore::):
2471         * platform/pthreads/ThreadingPthreads.cpp:
2472         (WebCore::identifierByPthreadHandle):
2473         (WebCore::currentThread):
2474
2475 2007-11-11  Dan Bernstein  <mitz@apple.com>
2476
2477         Reviewed by Adam Roben.
2478
2479         - fix http://bugs.webkit.org/show_bug.cgi?id=15942
2480           REGRESSION: Selecting "Edit Html" tab in Blogger causes crash (Assertion failed: isRange())
2481
2482         Test: editing/selection/cleared-by-relayout.html
2483
2484         * editing/Selection.cpp:
2485         (WebCore::Selection::toRange): Check if the selection has been cleared
2486         by updating layout.
2487
2488 2007-11-11  Darin Adler  <darin@apple.com>
2489
2490         Reviewed by Mark Rowe.
2491
2492         - fix line numbers that were off since my recent patch
2493
2494         * platform/SegmentedString.h:
2495         (WebCore::SegmentedSubstring::SegmentedSubstring): Reversed the sense of m_excludeLineNumbers
2496         and rename it to m_doNotExcludeLineNumbers.
2497         (WebCore::SegmentedSubstring::excludeLineNumbers): Updated.
2498         (WebCore::SegmentedSubstring::doNotExcludeLineNumbers): Added.
2499         (WebCore::SegmentedSubstring::setExcludeLineNumbers): Updated.
2500         (WebCore::SegmentedString::advance): Use doNotExcludeLineNumbers to reverse the sense and fix
2501         the regression, but keep the speediness. I accidentally had removed a ! here.
2502
2503         * platform/SegmentedString.cpp:
2504         (WebCore::SegmentedString::advanceSlowCase): Use doNotExcludeLineNumbers.
2505
2506 2007-11-11  Oliver Hunt  <oliver@apple.com>
2507
2508         Reviewed by Darin.
2509
2510         Fix for <rdar://problem/5585334> numfuzz: integer overflows opening
2511         malformed SVG file in WebCore::ImageBuffer::create. Add protection
2512         against a potential overflow.
2513
2514         * platform/graphics/cg/ImageBufferCG.cpp:
2515
2516 2007-11-11  Antti Koivisto  <antti@apple.com>
2517
2518         Reviewed by Darin.
2519
2520         Fix a bunch of cases where the exception code is checked by the function but is not zeroed first.
2521
2522         * bindings/js/kjs_binding.cpp:
2523         (KJS::setDOMException):
2524         * dom/Attr.cpp:
2525         (WebCore::Attr::setPrefix):
2526         * dom/Document.cpp:
2527         (WebCore::Document::createElement):
2528         * dom/Element.cpp:
2529         (WebCore::Element::setPrefix):
2530         * dom/Range.cpp:
2531         (WebCore::Range::setStart):
2532         (WebCore::Range::setEnd):
2533         (WebCore::Range::isPointInRange):
2534         (WebCore::Range::comparePoint):
2535         (WebCore::Range::compareBoundaryPoints):
2536         (WebCore::Range::deleteContents):
2537         (WebCore::Range::processContents):
2538         (WebCore::Range::extractContents):
2539         (WebCore::Range::insertNode):
2540         (WebCore::Range::setStartAfter):
2541         (WebCore::Range::setEndBefore):
2542         (WebCore::Range::setEndAfter):
2543         (WebCore::Range::selectNode):
2544         (WebCore::Range::surroundContents):
2545         (WebCore::Range::setStartBefore):
2546         * editing/TextIterator.cpp:
2547         (WebCore::TextIterator::TextIterator):
2548         * html/CanvasRenderingContext2D.cpp:
2549         (WebCore::CanvasRenderingContext2D::createPattern):
2550         * html/HTMLMediaElement.cpp:
2551         (WebCore::HTMLMediaElement::play):
2552         (WebCore::HTMLMediaElement::pause):
2553         * html/HTMLSelectElement.cpp:
2554         (WebCore::HTMLSelectElement::add):
2555         (WebCore::HTMLSelectElement::setOption):
2556         * xml/XPathEvaluator.cpp:
2557         (WebCore::XPathEvaluator::evaluate):
2558
2559 2007-11-11  Darin Adler  <darin@apple.com>
2560
2561         Reviewed by Mitz.
2562
2563         - http://bugs.webkit.org/show_bug.cgi?id=15945
2564           speed up GraphicsContextCG typical case by skipping roundToDevicePixels
2565
2566         * platform/graphics/cg/GraphicsContextCG.cpp:
2567         (WebCore::GraphicsContext::restorePlatformState): Clear the flag since we no
2568         longer know if the transform is identity or not.
2569         (WebCore::GraphicsContext::strokeArc): Removed an extra set of redundant
2570         CGContextSave/RestoreGState.
2571         (WebCore::GraphicsContext::beginTransparencyLayer): Clear the flag since we no
2572         longer know if the transform is identity or not.
2573         (WebCore::GraphicsContext::endTransparencyLayer): Ditto.
2574         (WebCore::GraphicsContext::scale): Ditto.
2575         (WebCore::GraphicsContext::rotate): Ditto.
2576         (WebCore::GraphicsContext::translate): Ditto.
2577         (WebCore::GraphicsContext::concatCTM): Ditto.
2578         (WebCore::GraphicsContext::roundToDevicePixels): Return quickly if the transform
2579         is known to be identity, and record that fact when we discover it otherwise.
2580
2581         * platform/graphics/cg/GraphicsContextPlatformPrivate.h:
2582         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
2583         Added a m_userToDeviceTransformKnownToBeIdentity flag, initialized to false.
2584
2585 2007-11-11  Darin Adler  <darin@apple.com>
2586
2587         Reviewed by Mitz.
2588
2589         - http://bugs.webkit.org/show_bug.cgi?id=15944
2590           streamline SegmentedString to speed up parsing
2591
2592         I measured a speed-up of the page load test while developing this patch. I don't
2593         have a precise figure, though.
2594
2595         * html/HTMLTokenizer.h: Removed unneeded lineNumberPtr() function. Also renamed
2596         lineno to m_lineNumber.
2597         * html/HTMLTokenizer.cpp:
2598         (WebCore::HTMLTokenizer::processListing): Don't pass 0 to the advance function
2599         since we don't want to update a line number.
2600         (WebCore::HTMLTokenizer::parseSpecial): Ditto.
2601         (WebCore::HTMLTokenizer::parseComment): Pass the line number data member directly
2602         instead of lineNumberPtr() since the advance function now takes a reference.
2603         (WebCore::HTMLTokenizer::parseServer): Ditto.
2604         (WebCore::HTMLTokenizer::parseProcessingInstruction): Ditto.
2605         (WebCore::HTMLTokenizer::parseText): Ditto.
2606         (WebCore::HTMLTokenizer::parseEntity): Ditto.
2607         (WebCore::HTMLTokenizer::parseTag): Ditto.
2608         (WebCore::HTMLTokenizer::write): Ditto.
2609
2610         * loader/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryTokenizer::write):
2611         * loader/TextDocument.cpp: (WebCore::TextTokenizer::write):
2612         Don't pass 0 to the advance function.
2613
2614         * platform/SegmentedString.h: (WebCore::SegmentedString::advance): Streamlined
2615         the most common case, and pushed less common cases into a separate function
2616         that is not inlined. Also got rid of a branch by separating the case with a
2617         line number from the case without one.
2618
2619         * platform/SegmentedString.cpp: (WebCore::SegmentedString::advanceSlowCase):
2620         Added. The aforementioned less common cases are here.
2621
2622 2007-11-11  Antti Koivisto  <antti@apple.com>
2623
2624         Forgot to do this review change (and test HTTP commit).
2625
2626         * html/HTMLMediaElement.cpp:
2627         (WebCore::HTMLMediaElement::play):
2628
2629 2007-11-11  Antti Koivisto  <antti@apple.com>
2630
2631         Reviewed by Darin.
2632         
2633         - Update play() and pause() to match current HTML5 draft
2634             - send events asynchronously
2635             - add timeupdate event to pause
2636             - rethrow load() exception, not others
2637         - Use list for async events to get ordering right
2638
2639         Tests: media/video-pause-empty-events.html
2640                media/video-play-empty-events.html
2641                media/video-play-pause-events.html
2642                media/video-play-pause-exception.html
2643
2644         * html/HTMLMediaElement.cpp:
2645         (WebCore::HTMLMediaElement::dispatchEventAsync): 
2646         (WebCore::HTMLMediaElement::asyncEventTimerFired):
2647         (WebCore::HTMLMediaElement::play):
2648         (WebCore::HTMLMediaElement::pause):
2649         * html/HTMLMediaElement.h:
2650
2651 2007-11-11  Nikolas Zimmermann  <zimmermann@kde.org>
2652
2653         Reviewed by Eric.
2654
2655         Fixes: http://bugs.webkit.org/show_bug.cgi?id=6424 (<text>, <tspan> dominant-baseline attribute is not respected)
2656
2657         Add (basic) support for dominant-baseline / alignment-baseline text properties.
2658         Note: there are no official testcases, and no-one implemented it before. Only ASV3
2659               supported dominant-baseline, but not correct it seems.
2660
2661         * rendering/SVGRootInlineBox.cpp:
2662         (WebCore::dominantBaselineToShift):
2663         (WebCore::alignmentBaselineToShift):
2664         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
2665
2666 2007-11-11  Adam Roben  <aroben@apple.com>
2667
2668         Add wrappers around CoCreateInstance to COMPtr
2669
2670         I followed the example of the Query constructor and query method by
2671         adding a Create constructor and create method.
2672
2673         Reviewed by Darin.
2674
2675         * platform/win/COMPtr.h:
2676         (COMPtr::COMPtr): Added a new constructor that calls
2677         CoCreateInstance.
2678         (COMPtr::create): Added.
2679         (COMPtr::createInstance): Added.
2680
2681 2007-11-11  Alexey Proskuryakov  <ap@nypop.com>
2682
2683         Reviewed by Darin.
2684
2685         http://bugs.webkit.org/show_bug.cgi?id=15896
2686         More editing cleanup
2687
2688         No functionality changes.
2689
2690         * dom/Node.h: Moved several editing-related methods elsewhere.
2691         * dom/Node.cpp: (WebCore::Node::maxCharacterOffset): Renamed from maxOffset()
2692         to highlight that it is a match to offsetInCharacters(), and much different from other
2693         offset-related methods. Added ASSERT_NOT_REACHED(), as callers are supposed to check
2694         offsetInCharacters() before calling this.
2695
2696         * dom/CharacterData.cpp: (WebCore::CharacterData::maxCharacterOffset):
2697         * dom/CharacterData.h: (WebCore::CharacterData::isCharacterDataNode):
2698         Updated for above renamings.
2699
2700         * dom/Comment.{h,cpp}: Removed an override for offsetInCharacters(), which is already present in CharacterData.
2701
2702         * dom/Document.{h,cpp}: Folded updateSelection() into Frame::selectionLayoutChanged().
2703
2704         * dom/Position.h:
2705         * dom/Position.cpp:
2706         (WebCore::Position::uncheckedPreviousOffset): Moved from Node::previousOffset().
2707         (WebCore::Position::uncheckedNextOffset): Moved from Node::NextOffset().
2708         (WebCore::Position::previous): Adapted to the above move.
2709         (WebCore::Position::next): Ditto.
2710         (WebCore::Position::upstream): Removed an isBR() check, since a non-BR element cannot have a BR renderer (I think),
2711         and BR elements are covered by editingIgnoresContent().
2712         (WebCore::Position::downstream): Ditto.
2713         (WebCore::caretMaxRenderedOffset): Moved from Node::caretMaxRenderedOffset().
2714         (WebCore::Position::rendersInDifferentPosition): Updated for the above moves.
2715
2716         * dom/PositionIterator.h: Added a comment describing this class from the original check-in.
2717         * dom/PositionIterator.cpp:
2718         (WebCore::PositionIterator::increment): Updated for the above moves.
2719         (WebCore::PositionIterator::decrement): Ditto.
2720
2721         * dom/ProcessingInstruction.h:
2722         * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::maxCharacterOffset):
2723         ProcessingInstruction was already returning true from offsetInCharacters(), but didn't override maxCharacterOffset().
2724         I think that implementing it has no actual effect, as PIs are not rendered, but it looks cleaner this way.
2725
2726         * dom/Range.cpp:
2727         (WebCore::Range::selectNodeContents):
2728         * editing/ApplyStyleCommand.cpp:
2729         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
2730         (WebCore::ApplyStyleCommand::applyInlineStyle):
2731         (WebCore::maxRangeOffset):
2732         (WebCore::ApplyStyleCommand::removeInlineStyle):
2733         (WebCore::ApplyStyleCommand::splitTextAtStartIfNeeded):
2734         (WebCore::ApplyStyleCommand::splitTextAtEndIfNeeded):
2735         (WebCore::ApplyStyleCommand::splitTextElementAtStartIfNeeded):
2736         (WebCore::ApplyStyleCommand::splitTextElementAtEndIfNeeded):
2737         (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
2738         * editing/CompositeEditCommand.cpp:
2739         (WebCore::CompositeEditCommand::insertNodeAt):
2740         (WebCore::CompositeEditCommand::positionOutsideTabSpan):
2741         * editing/DeleteSelectionCommand.cpp:
2742         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
2743         * editing/InsertLineBreakCommand.cpp:
2744         (WebCore::InsertLineBreakCommand::doApply):
2745         * editing/InsertParagraphSeparatorCommand.cpp:
2746         (WebCore::InsertParagraphSeparatorCommand::doApply):
2747         * editing/InsertTextCommand.cpp:
2748         (WebCore::InsertTextCommand::insertTab):
2749         * editing/visible_units.cpp:
2750         (WebCore::previousLinePosition):
2751         (WebCore::nextLinePosition):
2752         Updated for the above moves.
2753
2754         * editing/Editor.cpp:
2755         (WebCore::Editor::advanceToNextMisspelling): Added a missing rangeCompliantEquivalent() call.
2756
2757         * editing/TextIterator.cpp:
2758         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator): Changed the condition to obviously
2759         match a maxCharacterOffset() call made after it; hopefully, this doesn't break any border cases.
2760         (WebCore::SimplifiedBackwardsTextIterator::advance): Updated for the above moves.
2761
2762         * editing/htmlediting.h:
2763         * editing/htmlediting.cpp:
2764         (WebCore::canHaveChildrenForEditing): Removed a bogus comment: I don't thin BRs have a special ability to accept
2765         child nodes, other than via DOM manipulation, which is not specific to BRs.
2766         (WebCore::rangeCompliantEquivalent): Removed a check for BR, which is already covered by editingIgnoresContent().
2767         (WebCore::maxDeepOffset): Ditto.
2768         (WebCore::caretMinOffset): Moved from Node. Changed some runtime checks that seemingly cannot fail into assertions.
2769         (WebCore::caretMaxOffset): Ditto.
2770
2771         * page/EventHandler.cpp:
2772         (WebCore::EventHandler::handleMousePressEventSingleClick): Pass 0 to VisiblePosition constructor instead of
2773         caretMinOffset. I didn't want to include htmlediting.h here, and I think that VisiblePosition constructor
2774         will take care of adjusting the offset.
2775
2776         * page/Frame.cpp: (WebCore::Frame::selectionLayoutChanged): Folded Document::updateSelection() here.
2777         * page/mac/WebCoreFrameBridge.mm:
2778         (-[WebCoreFrameBridge smartDeleteRangeForProposedRange:]): Added missing rangeCompliantEquivalent() calls.
2779         * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionForRenderer): Changed to not round-trip via editing.
2780         Changed some runtime checks that seemingly cannot fail into assertions.
2781
2782 2007-11-11  Darin Adler  <darin@apple.com>
2783
2784         Reviewed by Sam.
2785
2786         - updated for JSRegExp function changes
2787
2788         * platform/RegularExpression.cpp:
2789         (WebCore::RegularExpression::Private::compile):
2790         (WebCore::RegularExpression::match):
2791
2792 2007-11-10  Mark Rowe  <mrowe@apple.com>
2793
2794         Qt Linux build fix.
2795
2796         * platform/UnicodeRange.h:
2797
2798 2007-11-10  Mark Rowe  <mrowe@apple.com>
2799
2800         Qt Windows build fix.
2801
2802         * platform/UnicodeRange.h:
2803
2804 2007-11-10  Nikolas Zimmermann  <zimmermann@kde.org>
2805
2806         Reviewed by Eric.
2807
2808         Fixes: http://bugs.webkit.org/show_bug.cgi?id=15937 (Add glyph-orientation-horizontal/vertical support)
2809         Fixes: http://bugs.webkit.org/show_bug.cgi?id=13971 (text-anchor support on vertical text seems slightly off)
2810
2811         Add glyph-orientation-* support for text & textPath. (90/180/270 and 'auto')
2812         Also fix all vertical text handling - for text & textPath! (especially latin1 characters auto orientation in vertical writing modes)
2813
2814         * WebCore.pro: Add platform/UnicodeRange.cpp to build
2815         * WebCore.xcodeproj/project.pbxproj: Dito.
2816         * rendering/SVGCharacterLayoutInfo.cpp: Respect orientationShiftX/Y & angle in characterTransform()
2817         (WebCore::SVGChar::characterTransform):
2818         * rendering/SVGCharacterLayoutInfo.h: New variables.
2819         (WebCore::SVGCharOnPath::SVGCharOnPath):
2820         (WebCore::SVGChar::SVGChar):
2821         * rendering/SVGRootInlineBox.cpp: Added glyph-orientation-* handling.
2822         (WebCore::glyphOrientationToAngle):
2823         (WebCore::glyphOrientationIsMultiplyOf180Degrees):
2824         (WebCore::calculateGlyphAdvanceAndShiftRespectingOrientation):
2825         (WebCore::cummulatedHeightOfInlineBoxCharacterRange):
2826         (WebCore::cummulatedWidthOrHeightOfTextChunk):
2827         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
2828
2829 2007-11-10  Timothy Hatcher  <timothy@apple.com>
2830
2831         Reviewed by Sam Weinig.
2832
2833         * page/inspector/StylesSidebarPane.js: Fix the wording of a comment
2834           and switch over to use getUniqueProperties in another place.
2835
2836 2007-11-10  John Sullivan  <sullivan@apple.com>
2837
2838         Reviewed by Sam Weinig
2839
2840         Rest of fix for 5394877
2841
2842         * bindings/js/kjs_window.cpp:
2843         (KJS::Window::isSafeScript):
2844         Don't log unsafe JavaScript attempts in the other version of isSafeScript() if in
2845         private browsing mode either.
2846
2847 2007-11-10  Nikolas Zimmermann  <zimmermann@kde.org>
2848
2849         Reviewed by Oliver.
2850
2851         Fix function name difference - header said 'unicodeRangeForCharacter', actually
2852         implemented function is 'findCharUnicodeRange'. They are not compiled yet.
2853
2854         * platform/UnicodeRange.h:
2855
2856 2007-11-10  Dan Bernstein  <mitz@apple.com>
2857
2858         Reviewed by Darin Adler.
2859
2860         - fix <rdar://problem/5450655> Control-clicking text in a link can surprisingly select only part of the link, should select entire link
2861
2862         No test because context menu events cannot be tested in DumpRenderTree.
2863
2864         * page/EventHandler.cpp:
2865         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): Added.
2866         If the click occurred in an active link, selects the entire link
2867         element. Otherwise selects the closest word.
2868         (WebCore::EventHandler::sendContextMenuEvent): Call
2869         selectClosestWordOrLinkFromMouseEvent().
2870         * page/EventHandler.h:
2871
2872 2007-11-10  John Sullivan  <sullivan@apple.com>
2873
2874         Reviewed by Tim Hatcher
2875
2876         - fixed <rdar://problem/5394877> Safari should not log unsafe JavaScript attempts when 
2877           in private browsing mode (only an issue if Log JavaScript Exceptions is turned on)
2878
2879         * bindings/js/kjs_window.cpp:
2880         (KJS::Window::isSafeScript):
2881         Don't log unsafe JavaScript attempts to console or chromeClient if in private browsing mode
2882
2883 2007-11-10  Alexey Proskuryakov  <ap@webkit.org>
2884
2885         Reviewed by Darin.
2886
2887         http://bugs.webkit.org/show_bug.cgi?id=15922
2888         Implement more of Mozilla Selection API
2889
2890         Tests: editing/selection/containsNode.html
2891                editing/selection/deleteFromDocument.html
2892                editing/selection/extend.html
2893                editing/selection/selectAllChildren.html
2894
2895         * editing/SelectionController.cpp:
2896         (WebCore::SelectionController::deleteFromDocument):
2897         (WebCore::SelectionController::containsNode):
2898         (WebCore::SelectionController::selectAllChildren):
2899         (WebCore::SelectionController::extend):
2900         * editing/SelectionController.h:
2901         Added deleteFromDocument(), containsNode(), and selectAllChildren(). Reimplemented extend(),
2902         which existed, but didn't match Firefox behavior and wasn't exposed via bindings.
2903         Removed a comment mentioning removeRange(), as this method makes no sense without multiple
2904         selection range support.
2905
2906         * page/DOMSelection.cpp:
2907         (WebCore::DOMSelection::extend):
2908         (WebCore::DOMSelection::deleteFromDocument):
2909         (WebCore::DOMSelection::containsNode):
2910         (WebCore::DOMSelection::selectAllChildren):
2911         * page/DOMSelection.h:
2912         * page/DOMSelection.idl:
2913         Exposed the new methods.
2914
2915 2007-11-10  Alexey Proskuryakov  <ap@webkit.org>
2916
2917         Reviewed by Darin.
2918
2919         http://bugs.webkit.org/show_bug.cgi?id=15892
2920         DOM Range operations are not implemented for ProcessingInstruction nodes
2921
2922         Test: fast/dom/Range/range-processing-instructions.html
2923
2924         * dom/Range.cpp:
2925         (WebCore::Range::processContents): Implemented ProcessingInstruction cases.
2926         (WebCore::Range::checkNodeWOffset): Removed a FIXME - yes, I think that we are supposed
2927         to use ProcessingInstruction.data.
2928
2929 2007-11-09  Timothy Hatcher  <timothy@apple.com>
2930
2931         Reviewed by Mark Rowe.
2932
2933         Bug 12054: Ability to serialize an element subtree (into clipboard?) from the DOM inspector
2934         http://bugs.webkit.org/show_bug.cgi?id=12054
2935
2936         - Add support code for routing copy events to the focused element.
2937         - Implement copying the currently selected DOM node. The node
2938           and it's subtree is copied to the clipboard. If the node has no
2939           outerHTML, the nodeValue is copied (text nodes, etc.)
2940         - Implement copy for the resource sidebar. The URL is copied for the
2941           currently selected resource.
2942
2943         * page/inspector/DocumentPanel.js:
2944         * page/inspector/inspector.js:
2945
2946 2007-11-09  Antti Koivisto  <antti@apple.com>
2947
2948         Reviewed by Adele.
2949
2950         Fix occasional blank video with poster attribute.
2951
2952         * ChangeLog:
2953         * html/HTMLMediaElement.cpp:
2954         (WebCore::HTMLMediaElement::load):
2955         (WebCore::HTMLMediaElement::didRestoreFromCache):
2956         Just calling updateFromElement() does the right thing for both poster image and video.
2957
2958 2007-11-04  Sam Weinig  <sam@webkit.org>
2959
2960         Reviewed by Adam Roben.
2961
2962         <rdar://problem/5435940>
2963         The COM bindings for the DOM should be autogenerated like the other DOM bindings
2964
2965         Initial commit of the autogeneration of the COM DOM Bindings.  No behavior change
2966         is being introduced in this patch and to insure that no conflicts arise, a temporary
2967         prefix of "GEN_" has been used for all the new classes.
2968
2969         The build architecture for these bindings differs slightly from the other autogenerated
2970         bindings.  Instead of building in WebCore and migrating the resuting code to WebKit (as
2971         is done for the Objective-C bindigs currently), the IDLs and generation scripts are
2972         migrated to WebKit and built there.  This is done with a series of scripts and Makefiles.
2973
2974         This commit includes:
2975             - Hand rolled root class/Interface GEN_DOMObject used to facilated object creation
2976               and ref-counting.
2977             - Generating all of the Core DOM and most of HTML and CSS
2978             - Generating Event, EventTarget, and EventListener
2979
2980         * WebCore.vcproj/MigrateIDLAndScripts.make: Added.
2981         * WebCore.vcproj/WebCore.vcproj:
2982         * WebCore.vcproj/migrate-idls.sh: Added.
2983         * bindings/scripts/CodeGenerator.pm:
2984         * bindings/scripts/CodeGeneratorCOM.pm: Added.
2985         * dom/EventListener.h: Make the isWindowEvent parameter default to false
2986         to allow autogeneration based on the IDL.
2987
2988 2007-11-09  Tristan O'Tierney  <tristan@apple.com>
2989
2990         Reviewed by Timothy Hatcher.
2991         
2992         This patch is for the WebKit side of <rdar://problem/5591115>.
2993         We need a way to tell context menu navigations, such as "Open in New Window"
2994         to override any sort of browser preference for tab based navigation.
2995
2996         * bridge/WindowFeatures.h:
2997         (WebCore::WindowFeatures::WindowFeatures):
2998         Added a new struct member var, preferredType
2999         and an accompanying enum type PreferredType
3000         to send a window type recommendation up to the Chrome. 
3001         
3002         * page/ContextMenuController.cpp:
3003         (WebCore::openNewWindow):
3004         Set the window features to recommend a new Window for
3005         "Open in New Window" context menu action.
3006
3007 2007-11-08  Adam Roben  <aroben@apple.com>
3008
3009         Fix <rdar://5483519> Pressing Enter on selected buttons should fire onclick
3010
3011         We now match the behavior of Firefox and IE, which is to always just
3012         send a click event to the focused button when the Enter key is pressed
3013         (previously we were submitting forms directly in some cases).
3014
3015         Reviewed by Adele.
3016
3017         Test: fast/forms/enter-clicks-buttons.html
3018
3019         * html/HTMLButtonElement.cpp:
3020         (WebCore::HTMLButtonElement::defaultEventHandler): Don't do anything
3021         fancy when Enter is pressed on a <button type=button> -- just send a
3022         click event like we do for other button types.
3023         * html/HTMLInputElement.cpp:
3024         (WebCore::HTMLInputElement::defaultEventHandler): Treat type=button
3025         the same way we treat type=submit and type=reset: just send a click
3026         event when Enter is pressed.
3027
3028 2007-11-09  Dan Bernstein  <mitz@apple.com>
3029
3030         Reviewed by Antti Koivisto.
3031
3032         - fix a bug in invisible layer culling: dynamically changing a 
3033           descendant of an invisible layer to be visible did not work
3034
3035         Test: fast/layers/layer-content-visibility-change.html
3036
3037         * rendering/RenderLayer.cpp:
3038         (WebCore::RenderLayer::setHasVisibleContent): If we got visible content,
3039         make sure that our stacking context rebuilds its z-order lists to
3040         include us.
3041
3042 2007-11-09  David Hyatt  <hyatt@apple.com>
3043
3044         Clean up matrix() parsing.  Make sure the first four arguments can be lengths or numbers.  The last two
3045         args can be lengths or numbers or percents.
3046
3047         Reviewed by Beth
3048
3049         * WebCore.xcodeproj/project.pbxproj:
3050         * css/CSSParser.cpp:
3051         (WebCore::TransformOperationInfo::TransformOperationInfo):
3052         (WebCore::CSSParser::parseTransform):
3053         * rendering/RenderStyle.h:
3054         (WebCore::MatrixTransformOperation::apply):
3055
3056 2007-11-09  Beth Dakin  <bdakin@apple.com>
3057
3058         Reviewed by Oliver.
3059
3060         Fix for <rdar://problem/5586370> CSS Transform - incorrect matrix 
3061         math leads to crazy problems
3062
3063         Transform matrices accept the first four parameters as CSS lengths. 
3064         CSS lengths get mapped into WebCore::Lengths as percents by 
3065         WebCore::convertToLength(). Percent lengths cannot call value(). It 
3066         does not yield a correct result and it asserts on Debug builds. 
3067
3068         * rendering/RenderStyle.h:
3069         (WebCore::MatrixTransformOperation::apply): Instead of calling 
3070         value() on the lengths, call calcValue. This fixes the assert and 
3071         the bad rendering. 
3072
3073 2007-11-09  Simon Hausmann  <hausmann@kde.org>
3074
3075         Reviewed by nobody, build/link fix for Qt/Windows.
3076
3077         userIdleTime() is stubbed in win/SystemTimeWin.cpp, so don't
3078         define it twice.
3079
3080         * platform/qt/TemporaryLinkStubs.cpp:
3081
3082 2007-11-09  Simon Hausmann  <hausmann@kde.org>
3083
3084         Reviewed by Holger.
3085
3086         Fix ContextMenu allocation in the Qt port.
3087
3088         Store all items and submenus value based in ContextMenu and ContextMenuItem.
3089         That fixes the crashes when the context menu was populated with sub-menus because
3090         of the use of temporary ContextMenu objects like this:
3091
3092         ContextMenu subMenu(...);
3093         subMenu.appendItem(...);
3094         subMenu.appendItem(...);
3095
3096         subMenuItem.setSubMenu(&subMenu); // temporary pointer, need to _copy_ contents
3097
3098         * platform/ContextMenu.h:
3099         * platform/ContextMenuItem.h:
3100         * platform/PlatformMenuDescription.h:
3101         * platform/qt/ContextMenuItemQt.cpp:
3102         (WebCore::ContextMenuItem::ContextMenuItem):
3103         (WebCore::ContextMenuItem::platformSubMenu):
3104         * platform/qt/ContextMenuQt.cpp:
3105         (WebCore::ContextMenu::ContextMenu):
3106         (WebCore::ContextMenu::~ContextMenu):
3107         (WebCore::ContextMenu::appendItem):
3108         (WebCore::ContextMenu::itemCount):
3109
3110 2007-11-09  Peter Kasting  <zerodpx@gmail.com>
3111
3112         Reviewed by Mark Rowe.
3113
3114         http://bugs.webkit.org/show_bug.cgi?id=15909
3115         Malformed GIFs should not result in memory corruption.
3116
3117         * platform/image-decoders/gif/GIFImageDecoder.cpp:
3118         (WebCore::GIFImageDecoder::haveDecodedRow):
3119
3120 2007-11-08  Timothy Hatcher  <timothy@apple.com>
3121
3122         Reviewed by Sam Weinig.
3123
3124         Some Web Inspector CSS editing changes.
3125         - Only delete the property if all the text is delete or the new user input correctly parses.
3126           This prevents deleting the existing property if the new text is invalid.
3127         - Intercept the Escape key and cancel editing, not saving any changes.
3128
3129         * page/inspector/StylesSidebarPane.js:
3130
3131 2007-11-08  Kevin Ollivier  <kevino@theolliviers.com>
3132
3133         Bakefiles for building WebCore, needed by wx port.
3134
3135         Reviewed by Mark Rowe.
3136
3137         * WebCoreSources.bkl: Added.
3138         * webcore-base.bkl: Added.
3139         * webcore-wx.bkl: Added.
3140
3141 2007-11-08  Justin Haygood  <jhaygood@reaktix.com>
3142
3143         Reviewed by Mark Rowe.
3144
3145         http://bugs.webkit.org/show_bug.cgi?id=15905
3146
3147         Fix builds with HTML 5 Storage support disabled.
3148         ENABLE(DATABASE) needs to be added in a few places.
3149
3150         * page/InspectorController.cpp:
3151         * storage/Database.h:
3152
3153 2007-11-08  Steve Falkenburg  <sfalken@apple.com>
3154
3155         <rdar://problem/5524082> Allow images to be dragged out directly into other apps
3156         
3157         We weren't including CF_HDROP in our image drops.  This broke drag of
3158         images out of the browser window directly into other apps (examples
3159         include notepad, mspaint, msword).
3160         
3161         Reviewed by Oliver, Ada.
3162
3163         * platform/win/ClipboardWin.cpp:
3164         (WebCore::createGlobalImageFileContent): Removed unused variable.
3165         (WebCore::createGlobalHDropContent): Added
3166         (WebCore::writeFileToDataObject): Write HDROP data if available.
3167         (WebCore::writeImageToDataObject): Write HDROP for dragged images.
3168         (WebCore::ClipboardWin::writeURL): Don't write HDROP for dragged URLs.
3169
3170 2007-11-08  Xan Lopez  <xan@gnome.org>
3171
3172         Reviewed by Alp.
3173
3174         http://bugs.webkit.org/show_bug.cgi?id=15908
3175         Use g_object_ref_sink when available
3176
3177         * platform/gtk/PopupMenuGtk.cpp:
3178         (WebCore::PopupMenu::show):
3179         * platform/gtk/ScrollViewGtk.cpp:
3180         (WebCore::ScrollView::setGtkAdjustments):
3181
3182 2007-11-08  Dan Bernstein  <mitz@apple.com>
3183
3184         Reviewed by Beth Dakin.
3185
3186         - fix <rdar://problem/5491922> REGRESSION (Safari 2-3): Flash-based "Cash Optimizer" on etrade.com does not draw completely
3187
3188         Test: fast/dom/length-attribute-mapping.html
3189
3190         * dom/StyledElement.cpp:
3191         (WebCore::StyledElement::addCSSLength): Changed the garbage-stripping
3192         logic to stop after the first "%" or "*" in the string. This allows for
3193         "100%25" to be mapped to "100%" like it is in Firefox and WinIE.
3194
3195 2007-11-08  Kevin McCullough  <kmccullough@apple.com>
3196
3197         - Build fix.
3198
3199         * loader/FrameLoaderClient.h:
3200         * platform/graphics/svg/SVGImageEmptyClients.h:
3201         (WebCore::SVGEmptyFrameLoaderClient::windowObjectCleared):
3202
3203 2007-11-08  Kevin McCullough  <kmccullough@apple.com>
3204
3205         Reviewed by Sam.
3206
3207         - windowObjectCleared() is no longer const.  It needs to setup the
3208         script debugger and cannot be const to do so.
3209
3210         * loader/FrameLoaderClient.h:
3211         * platform/graphics/svg/SVGImageEmptyClients.h:
3212         (WebCore::SVGEmptyFrameLoaderClient::windowObjectCleared):
3213
3214 2007-11-08  Adam Roben  <aroben@apple.com>
3215
3216         Hopeful Windows build fix
3217
3218         * rendering/RenderObject.cpp: Touch this file to make it recompile.
3219
3220 2007-11-08  Sam Weinig  <sam@webkit.org>
3221
3222         Reviewed by Darin.
3223
3224         Convert JavaScript internal function objects to use one class per
3225         function.  This avoids a switch statement inside what used to be
3226         the shared function classes and will allow Shark to better analyze
3227         the code.
3228
3229         To make this switch, the value property of the HashEntry was changed
3230         to a union of an intptr_t (which is used to continue handle valueGetters)
3231         and function pointer which points to a static constructor for the
3232         individual new function objects.
3233
3234         SunSpider claims this is a 1.0% speedup.
3235
3236         - On the WebCore side, I updated CodeGeneratorJS.pm to generate the
3237           new classes and hand updated the remain non-generated (groan) classes.
3238
3239         * bindings/js/JSDOMWindowCustom.cpp:
3240         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
3241         * bindings/js/JSEventTargetNode.cpp:
3242         (WebCore::JSEventTargetNodePrototypeFunctionAddEventListener::callAsFunction):
3243         (WebCore::JSEventTargetNodePrototypeFunctionRemoveEventListener::callAsFunction):
3244         (WebCore::JSEventTargetNodePrototypeFunctionDispatchEvent::callAsFunction):
3245         * bindings/js/JSEventTargetNode.h:
3246         * bindings/js/JSHTMLInputElementBase.cpp:
3247         (WebCore::JSHTMLInputElementBaseFunctionSetSelectionRange::callAsFunction):
3248         (WebCore::JSHTMLInputElementBase::getOwnPropertySlot):
3249         * bindings/js/JSHTMLInputElementBase.h:
3250         (WebCore::JSHTMLInputElementBase::):
3251         * bindings/js/JSXMLHttpRequest.cpp:
3252         (KJS::JSXMLHttpRequestPrototypeFunctionAbort::callAsFunction):
3253         (KJS::JSXMLHttpRequestPrototypeFunctionGetAllResponseHeaders::callAsFunction):
3254         (KJS::JSXMLHttpRequestPrototypeFunctionGetResponseHeader::callAsFunction):
3255         (KJS::JSXMLHttpRequestPrototypeFunctionOpen::callAsFunction):
3256         (KJS::JSXMLHttpRequestPrototypeFunctionSend::callAsFunction):
3257         (KJS::JSXMLHttpRequestPrototypeFunctionSetRequestHeader::callAsFunction):
3258         (KJS::JSXMLHttpRequestPrototypeFunctionOverrideMIMEType::callAsFunction):
3259         (KJS::JSXMLHttpRequestPrototypeFunctionAddEventListener::callAsFunction):
3260         (KJS::JSXMLHttpRequestPrototypeFunctionRemoveEventListener::callAsFunction):
3261         (KJS::JSXMLHttpRequestPrototypeFunctionDispatchEvent::callAsFunction):
3262         * bindings/js/JSXMLHttpRequest.h:
3263         (KJS::JSXMLHttpRequest::impl):
3264         * bindings/js/JSXSLTProcessor.cpp:
3265         (KJS::JSXSLTProcessorPrototypeFunctionImportStylesheet::callAsFunction):
3266         (KJS::JSXSLTProcessorPrototypeFunctionTransformToFragment::callAsFunction):
3267         (KJS::JSXSLTProcessorPrototypeFunctionTransformToDocument::callAsFunction):
3268         (KJS::JSXSLTProcessorPrototypeFunctionSetParameter::callAsFunction):
3269         (KJS::JSXSLTProcessorPrototypeFunctionGetParameter::callAsFunction):
3270         (KJS::JSXSLTProcessorPrototypeFunctionRemoveParameter::callAsFunction):
3271         (KJS::JSXSLTProcessorPrototypeFunctionClearParameters::callAsFunction):
3272         (KJS::JSXSLTProcessorPrototypeFunctionReset::callAsFunction):
3273         * bindings/js/JSXSLTProcessor.h:
3274         * bindings/js/kjs_events.cpp:
3275         (WebCore::JSClipboardPrototypeFunctionClearData::callAsFunction):
3276         (WebCore::JSClipboardPrototypeFunctionGetData::callAsFunction):
3277         (WebCore::JSClipboardPrototypeFunctionSetData::callAsFunction):
3278         (WebCore::JSClipboardPrototypeFunctionSetDragImage::callAsFunction):
3279         * bindings/js/kjs_events.h:
3280         * bindings/js/kjs_navigator.cpp:
3281         (KJS::Plugins::):
3282         (KJS::Navigator::getOwnPropertySlot):
3283         (KJS::Plugins::getOwnPropertySlot):
3284         (KJS::PluginsFunctionRefresh::callAsFunction):
3285         (KJS::NavigatorProtoFuncJavaEnabled::callAsFunction):
3286         * bindings/js/kjs_navigator.h:
3287         (KJS::Navigator::):
3288         * bindings/js/kjs_window.cpp:
3289         (KJS::Window::getOwnPropertySlot):
3290         (KJS::Window::put):
3291         (KJS::WindowProtoFuncAToB::callAsFunction):
3292         (KJS::WindowProtoFuncBToA::callAsFunction):
3293         (KJS::WindowProtoFuncOpen::callAsFunction):
3294         (KJS::WindowProtoFuncScrollBy::callAsFunction):
3295         (KJS::WindowProtoFuncScrollTo::callAsFunction):
3296         (KJS::WindowProtoFuncMoveBy::callAsFunction):
3297         (KJS::WindowProtoFuncMoveTo::callAsFunction):
3298         (KJS::WindowProtoFuncResizeBy::callAsFunction):
3299         (KJS::WindowProtoFuncResizeTo::callAsFunction):
3300         (KJS::WindowProtoFuncSetTimeout::callAsFunction):
3301         (KJS::WindowProtoFuncClearTimeout::callAsFunction):
3302         (KJS::WindowProtoFuncSetInterval::callAsFunction):
3303         (KJS::WindowProtoFuncAddEventListener::callAsFunction):
3304         (KJS::WindowProtoFuncRemoveEventListener::callAsFunction):
3305         (KJS::WindowProtoFuncShowModalDialog::callAsFunction):
3306         (KJS::WindowProtoFuncNotImplemented::callAsFunction):
3307         (KJS::Location::getOwnPropertySlot):
3308         (KJS::Location::put):
3309         (KJS::LocationProtoFuncReplace::callAsFunction):
3310         (KJS::LocationProtoFuncReload::callAsFunction):
3311         (KJS::LocationProtoFuncAssign::callAsFunction):
3312         (KJS::LocationProtoFuncToString::callAsFunction):
3313         * bindings/js/kjs_window.h:
3314         (KJS::Window::):
3315         * bindings/scripts/CodeGeneratorJS.pm:
3316
3317 2007-11-08  Mark Rowe  <mrowe@apple.com>
3318
3319         Fix the Gtk, Qt and Wx builds.
3320
3321         * platform/gtk/TemporaryLinkStubs.cpp:
3322         * platform/qt/TemporaryLinkStubs.cpp:
3323         * platform/wx/TemporaryLinkStubs.cpp:
3324
3325 2007-11-08  Mark Rowe  <mrowe@apple.com>
3326
3327         Not reviewed.  Fix two instances of includes using the wrong case in the filename.
3328
3329         * platform/graphics/mac/MoviePrivateQTKit.mm:
3330         * platform/wx/MimeTypeRegistryWx.cpp:
3331
3332 2007-11-08  Darin Adler  <darin@apple.com>
3333
3334         Reviewed by Adam.
3335
3336         - fix <rdar://problem/5552943> accesskey does not focus <button> elements
3337
3338         Test: fast/forms/access-key.html
3339
3340         * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::accessKeyAction):
3341         Added a call to focus.
3342
3343 2007-11-07  Darin Adler  <darin@apple.com>
3344
3345         Reviewed by Steve.
3346
3347         - cut down on notImplemented() functions on Windows
3348
3349         * bridge/AXObjectCache.h: Put #if around the accessibility
3350         global.
3351
3352         * bridge/win/FrameWin.cpp: (WebCore::Frame::setNeedsReapplyStyles):
3353         Moved here from TemporaryLinkStubs.
3354
3355         * dom/Document.cpp: (WebCore::Document::lastModified): Re-implemented
3356         using the ResourceResponse that's now available from the DocumentLoader.
3357
3358         * editing/JSEditor.cpp: (execTranspose): Changed to call transpose() on
3359         the Editor instead of the obsolete one on the Frame.
3360
3361         * loader/DocumentLoader.h: Removed getResponseModifiedHeader.
3362         * loader/FrameLoader.h: Removed overrideMediaType.
3363
3364         * loader/gtk/DocumentLoaderGtk.cpp: Removed.
3365         * loader/mac/DocumentLoaderMac.mm: Removed.
3366         * loader/qt/DocumentLoaderQt.cpp: Removed.
3367
3368         * page/Frame.cpp: Removed transpose.
3369         * page/Frame.h: Ditto.
3370         * page/FrameView.h: Removed updateBorder.
3371         * page/gtk/FrameGtk.cpp: Removed issueTransposeCommand.
3372         * page/mac/FrameMac.mm: Ditto.
3373         * page/mac/WebCoreFrameBridge.h: Removed issueTransposeCommand and
3374         overrideMediaType.
3375         * page/qt/FrameQt.cpp: Removed issueTransposeCommand.
3376
3377         * platform/gtk/TemporaryLinkStubs.cpp: Removed gAccessibilityEnabled.
3378         * platform/qt/TemporaryLinkStubs.cpp: Ditto.
3379         * platform/win/TemporaryLinkStubs.cpp: Removed or moved all but 3 of the stubs.
3380         * platform/wx/TemporaryLinkStubs.cpp: Removed gAccessibilityEnabled,
3381         issueTransposeCommand, and overrideMediaType.
3382
3383         * platform/network/cf/ResourceHandleCFNet.cpp:
3384         (WebCore::ResourceHandle::loadsBlocked): Moved here from TemporaryLinkStubs.
3385         (WebCore::ResourceHandle::willLoadFromCache): Ditto.
3386         * platform/win/GraphicsContextWin.cpp:
3387         (WebCore::GraphicsContextPlatformPrivate::clip): Ditto.
3388         * platform/win/ScrollViewWin.cpp: (WebCore::ScrollView::inWindow): Ditto.
3389         * platform/win/SystemTimeWin.cpp: (WebCore::userIdleTime): Ditto.
3390         * platform/win/WidgetWin.cpp: (WebCore::Widget::setIsSelected): Ditto.
3391
3392         * WebCore.pro: Updated for removed files.
3393         * WebCore.xcodeproj/project.pbxproj: Updated for removed file.
3394
3395 2007-11-08  Mark Rowe  <mrowe@apple.com>
3396
3397        Build fix for case-sensitive file systems.  Fix case of file names
3398        in #include's.
3399
3400         * html/HTMLMediaElement.cpp:
3401         * platform/graphics/Movie.cpp:
3402
3403 2007-11-08  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3404
3405         Reviewed by Lars Knoll <lars@trolltech.com>.
3406
3407         Remove some warnings about not implemented methods.
3408
3409         * ResourceHandle::loadsBlocked and ResourceHandle::supportsBufferedData are
3410         specific to the NS API and won't be implemented on Qt.
3411         * ResourceHandle::bufferedData can not be reached as we return false in
3412         ResourceHandle::supportsBufferedData.
3413
3414
3415         * platform/network/qt/ResourceHandleQt.cpp:
3416         (WebCore::ResourceHandle::supportsBufferedData):
3417
3418 2007-11-08  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3419
3420         Reviewed by Lars Knoll <lars@trolltech.com>.
3421
3422         Cleanup checking for the request method.
3423
3424         * Check the request method only in QWebNetworkManager::add.
3425         * Currently HEAD, GET, POST are allowed and for everything else
3426         QWebNetworkManager::add returns false.
3427         * Returning false is compatible with ResourceHandle::start and it
3428         can be used in ResourceHandle::loadResourceSynchronously to generate
3429         a ResourceError
3430
3431
3432         * platform/network/qt/ResourceHandleQt.cpp:
3433         (WebCore::ResourceHandle::start):
3434         (WebCore::ResourceHandle::loadResourceSynchronously):
3435
3436 2007-11-08  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3437
3438         Reviewed by Lars Knoll <lars@trolltech.com>.
3439
3440         Implement WebCore::callOnMainThread
3441
3442         Implemented using a global QObject, that is moved to the main thread
3443         and then sending a custom event to it.
3444         Picked a number below QEvent::User but above any other documented value.
3445
3446
3447         * platform/qt/ThreadingQt.cpp:
3448         (WebCore::PerformFunctionEvent::PerformFunctionEvent):
3449         (WebCore::MainThreadInvoker::MainThreadInvoker):
3450         (WebCore::MainThreadInvoker::event):
3451         (WebCore::callOnMainThread):
3452
3453 2007-11-08  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3454
3455         Reviewed by Lars Knoll <lars@trolltech.com>.
3456
3457         Avoid problems with calling QPainter::begin() on an already active paintdevice
3458
3459         * Partial pick from 6200e04c3e0a77873c3b3f3969b65bc701020326 to avoid getting
3460         crashes on Qt/Mac 4.4 with QPainter::begin to fail because we already draw.
3461         * If we are in a layout or need one do not paint. This can happen for the PlatformScrollBar
3462         used by the ScrollView on a layout triggered by QWebPage::paintEvent.
3463
3464
3465         * platform/qt/WidgetQt.cpp:
3466         (WebCore::Widget::invalidateRect):
3467
3468 2007-11-08  Eric Seidel  <eric@webkit.org>
3469
3470         No review.
3471
3472         * ksvg2/svg/SVGPathElement.h: remove old comment
3473
3474 2007-11-07  Antti Koivisto  <antti@apple.com>
3475
3476         Reviewed by Ollie.
3477
3478         Ensure video renderer has correct size if video has already been loaded
3479         when it is constructed.
3480
3481         * rendering/RenderVideo.cpp:
3482         (WebCore::RenderVideo::RenderVideo):
3483
3484 2007-11-07  Antti Koivisto  <antti@apple.com>
3485
3486         Reviewed by Ollie.
3487
3488         Ensure video is visible when it should be.
3489
3490         * rendering/RenderVideo.cpp:
3491         (WebCore::RenderVideo::updateMovie):
3492
3493 2007-11-07  Dan Bernstein  <mitz@apple.com>
3494
3495         Reviewed by Darin Adler.
3496
3497         - fix <rdar://problem/5523503> Safari crashes clicking scroll bar in FaceBook 'Trips'
3498
3499         Layers and listboxes are two kinds of ScrollBarClient that can be
3500         removed while the scrollbar is tracking the mouse. The scrollbar is not
3501         destroyed until later, and meanwhile it can try to call the client,
3502         which results in a crash.
3503
3504         * manual-tests/stale-scrollbar-client-crash.html: Added.
3505         * platform/ScrollBar.h:
3506         (WebCore::Scrollbar::setClient): Added.
3507         * rendering/RenderLayer.cpp:
3508         (WebCore::RenderLayer::destroyScrollbar): Call Scrollbar::setClient().
3509         * rendering/RenderListBox.cpp:
3510         (WebCore::RenderListBox::~RenderListBox): Ditto.
3511
3512 2007-11-07  Adam Roben  <aroben@apple.com>
3513
3514         Fix <rdar://5569268> Crash when opening any FTP site in second tab/window
3515
3516         Reviewed by Sam.
3517
3518         No test possible.
3519
3520         * platform/win/SharedBufferWin.cpp:
3521         (WebCore::SharedBuffer::createWithContentsOfFile): Bail if we get an
3522         empty path, because _wfopen_s will crash if we pass it a null pointer.
3523
3524 2007-11-07  David Kilzer  <ddkilzer@apple.com>
3525
3526         WebKit confuses width/height for Media Queries device-aspect-ratio evaluation
3527         <http://bugs.webkit.org/show_bug.cgi?id=14893>
3528         <rdar://problem/5380295>
3529
3530         Reviewed by Darin.
3531
3532         Tests: fast/css/device-aspect-ratio.html
3533                fast/css/max-device-aspect-ratio.html
3534                fast/css/min-device-aspect-ratio.html
3535
3536         * css/MediaQueryEvaluator.cpp:
3537         (WebCore::parseAspectRatio): Renamed method parameters from a/b to h/v.
3538         (WebCore::device_aspect_ratioMediaFeatureEval): Renamed local variables from
3539         a/b to h/v.  Switched first two arguments of the call to cmpvalue() to fix
3540         the bug.
3541
3542 2007-11-07  Dan Bernstein  <mitz@apple.com>
3543
3544         Reviewed by Dave Hyatt.
3545
3546         - fix http://bugs.webkit.org/show_bug.cgi?id=15887
3547           REGRESSION (r27576): Crash in RenderStyle::affectedByHoverRules clicking link on Digg
3548
3549         Test: fast/css/display-none-inline-style-change-crash.html
3550
3551         * dom/Element.cpp:
3552         (WebCore::Element::recalcStyle): Fixed the crash by null-checking
3553         the current style and removed other checks that are not strictly
3554         necessary.
3555
3556 2007-11-07  Brady Eidson  <beidson@apple.com>
3557
3558         Rubberstamped by Sam
3559
3560         Remove FrameLoaderClient methods from SVG that were pruned awhile ago
3561
3562         * platform/graphics/svg/SVGImageEmptyClients.h:
3563
3564 2007-11-07  Dan Bernstein  <mitz@apple.com>
3565
3566         Reviewed by Darin Adler.
3567
3568         - fix a bug where CSS rules with :hover in the ancestor chain stopped
3569           working after changing the inline style declaration of the ancestor
3570
3571         Test: fast/css/affected-by-hover-after-style-change.html
3572
3573         * dom/Element.cpp:
3574         (WebCore::Element::recalcStyle): If we are not forcing style
3575         recalculation for all descendants, preserve any "affected by
3576         {hover|active|drag} bits that we may have acquired from them.
3577         Also renamed _style to currentStyle.
3578
3579 2007-11-06  Timothy Hatcher  <timothy@apple.com>
3580
3581         Reviewed by Adam.
3582
3583         Bug 11920: Web Inspector should have Firebug-like CSS editing
3584         http://bugs.webkit.org/show_bug.cgi?id=11920
3585
3586         * css/CSSComputedStyleDeclaration.h:
3587           (WebCore::CSSComputedStyleDeclaration::isPropertyImplicit): Return false. I'm not sure why
3588           this was true, but computed style has no concept of implicit. So false makes more sense
3589           and makes the code simpler in the inspector. This function was added for the inspector,
3590           so this isn't a compatibility change.
3591         * page/inspector/PropertiesSection.js: Add a getter/setter to reset populated status.
3592         * page/inspector/StylesSidebarPane.js: Some refactoring along with the main support for
3593           style editing.
3594     &nb