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