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