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