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