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