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