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