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