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