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