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